Lozenge
A lozenge is a visual indicator used to highlight an item's status for quick recognition.
Installation
yarn add @atlaskit/lozenge
Usage
Detailed docs and example usage can be found here.
A lozenge is a visual indicator used to highlight an item's status for quick recognition.
A lozenge is a visual indicator used to highlight an item's status for quick recognition.
yarn add @atlaskit/lozenge
Detailed docs and example usage can be found here.
248faa32d4835
-
Internal changes to how borders are applied.255837cfba315
-
Internal changes to how border radius is applied.23bcc5bbc9cee
-
Internal changes to how border radius is applied.c661806a65543
-
Internal changes to how border radius and border width values are applied. No visual change.e9334c37a9e16
-
Removes Emotion variant of the Lozenge and replaces contents with styles from Compiled CSS.08019848e3eab
-
Refreshed "issue" terminology.736c6f3dad151
-
Remove deprecated theme definitions.1378ea7a99ce1
-
Upgrades jscodeshift
to handle generics properly.b2d69a39e6687
-
Update @compiled/react
dependency for improved type checking support.d5c8218ff84d4
-
Internally test the @atlaskit/lozenge/compiled variant replacing the current Emotion variant,
behind a feature gate.f6fa74e4221cd
-
[ux] We are increasing the letter spacing behind a feature flag. If testing successful, this
change will be made available in a later release.#117363
10a0f7f6c2027
-
This package's peerDependencies
have been adjusted for react
and/or react-dom
to reflect the
status of only supporting React 18 going forward. No explicit breaking change to React support has
been made in this release, but this is to signify going forward, breaking changes for React 16 or
React 17 may come via non-major semver releases.
Please refer this community post for more details: https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
b50c5d5d65ae2
-
Bump to the latest version of @compiled/react2c88e65615d04
-
Update dependencies and remove old codemods.4660ec858a305
-
Update React
from v16 to v180935b5dc9db22
-
[ux] updated visually refresh styles for subtle styled lozenge9f62ecec4d422
-
Update dependencies.9c961c3cbcc7f
-
Internal changes to typography.01676a379617b
-
The experimental compiled variant makes use of the compiled Primitives variant.8108b044c362b
-
Changes the way our JSX pragma is applied and removes Compiled as a direct dependency (it is still
an indirect dependncy via @atlaskit/css)20db78434becd
-
Bump to the latest version of @compiled/*a92a52978058c
-
Adds an experimental Compiled CSS-in-JS entrypoint for our Lozenge component. This requires
specific setup that is not documented fully and is not intended for external consumption.#127511
db30e29344013
-
Widening range of react
and react-dom
peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0
to the wider range of ^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).
This change has been done to enable usage of `react@18.3as well as to have a consistent peer
dependency range for
reactand
react-domfor
/platform` packages.
2fac9118d33bd
-
modify styling behind a feature flag23be44b6bf355
-
Internal change to hardcode font size for now to ensure it doesn't change with new typography
themes.c733254a2dd6e
-
Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime
is implicitly set to automatic.6402a7929b4d
-
Internal changes to typography, no visual change.1a4242743804
-
Add support for React 18 in non-strict mode.8d4e99057fe0
-
Upgrade Typescript from 4.9.5
to 5.4.2
395c74147990
-
Migrate packages to use declarative entry points436936ea8914
-
Export prop types96de6e4e4ca2
-
Lozenge now uses height: min-content so it doesn't stretch when directly used as a flex / grid
item.8d838ab41ed
- Removed
all remaining legacy theming logic from Badge, IconObject, Lozenge and SectionMessage. This only
affects the examples and some tests in each component. No internal component logic contained
legacy theming.3b97837c528
- The
internal composition of this component has changed. There is no expected change in behavior.1ed303de3e8
- Updated
dependencies9d00501a414
- Ensure
legacy types are published for TS 4.5-4.841fae2c6f68
- Upgrade
Typescript from 4.5.5
to 4.9.5
56507598609
- Skip
minor dependency bumpdf9cefb35e1
- Enrol
@atlaskit/lozenge on push model consumption in Jira2e01c9c74b5
- DUMMY
remove before merging to master; dupe adf-schema via adf-utilscfe48bb7ece
- Internal
change only. Replace usages of Inline/Stack with stable version from @atlaskit/primitives
.eadbf13d8c0
- Updated
usages of Text
, Box
, Stack
, and Inline
primitives to reflect their updated APIs. There are
no visual or behaviour changes.76428a4966a
- Fix
lozenge truncation at maxWidth=100%#27076
25e09731caa
- Fixes:
vertical-align: baseline
from Lozenge which was being applied incorrectly.Updated dependencies
f97c945d57f
- Updates
@emotion/core
to @emotion/react
; v10 to v11. There is no expected behavior change.7c6009de2f1
- [ux]
Updates the visual appearance to match the legacy light mode palette.e35fc41dc33
- Internal
change to use updated primtive spacing prop values. No expected behaviour change.9de88fa1e1e
- Internal
changes to include spacing tokens in component implementations.4c6b6f0c927
- Removes
@emotion/core
dependency as it is no longer used within Lozenge. There is no expected behavior
change.3ee63238f49
- Update
internals of Box, Text, Inline and Stack to handle children
more accurately. Also update scope
of use-primitives
to suggest Box and Text more selectively.8cc2f888c83
- Upgrade
Typescript from 4.3.5
to 4.5.5
fe54d8f1aec
- Update
ds-explorations dependency. No change in behaviour.bf235e83ac0
- Internal
changes to the way styles are applied. The Lozenge background is now centred properly resulting in
it sitting 1px higher, however the text inside the Lozenge is unaffected.37246e87cfc
- Adds
position static to Box. Changes lozenge to use position static instead of relative.6e0671cb45c
- Internal
change to implementation which should not have any noticeable impact.8d4228767b0
- Upgrade
Typescript from 4.2.4
to 4.3.5
.cb2392f6d33
- Upgrade
to TypeScript 4.2.462edf20ab1e
- Migrates
all usage of brand tokens to either selected or information tokens. This change is purely for
semantic reasons, there are no visual or behavioural changes.19d72473dfb
- The
no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when
auto-fixing by correctly formatting token ids.19d72473dfb
- The
no-unsafe-design-token-usage eslint rule now respects the new token naming conventions when
auto-fixing by correctly formatting token ids.f460cc7c411
- Builds
for this package now pass through a tokens babel plugin, removing runtime invocations of the
tokens() function and improving bundle size.d7caf75e732
- - [ux]
Colors are now sourced through tokens.@atlaskit/lozenge/theme
entry-point.#12837
1cd379a2199
- - In
this version we made Lozenge
dramatically faster and lighter. 🤩
General performance improvements.
We are now exporting a new style
prop which you can use to pass a custom backgroundColor
and
color
.
BREAKING We have removed the deprecated theme
prop. Don't worry if you do use the theming
API, you can now use the new style
prop for custom styling.
Before:
import Lozenge from '@atlaskit/lozenge';
type GetThemeTokensFn<ThemeTokens, ThemeProps> = (props: ThemeProps) => ThemeTokens;
const lozengeTheme = (
getTokens: GetThemeTokensFn<ThemeTokens, ThemeProps>,
themeProps: ThemeProps,
): ThemeTokens => {
const defaultTokens = getTokens(themeProps);
if (themeProps.appearance === 'removed') {
return {
...defaultTokens,
textColor: 'grey',
};
return defaultTokens;
}
};
<Lozenge appearance="removed" theme={lozengeTheme}>
removed
</Lozenge>;
After:
import Badge, { BadgeProps } from '@atlaskit/badge';
<Lozenge appearance="removed" style={{ color: 'grey' }}>
removed
</Lozenge>;
appearance
prop object value. Please use style
prop for customization.Before:
import Lozenge from '@atlaskit/lozenge';
<Lozenge appearance={{ backgroundColor: 'blue', textColor: 'white' }}>custom</Lozenge>;
After:
import Lozenge from '@atlaskit/lozenge';
<Lozenge style={{ backgroundColor: 'blue', color: 'white' }}>custom</Lozenge>;
Running the codemod cli
To run the codemod: You first need to have the latest version installed
yarn upgrade @atlaskit/lozenge@^11.0.0
Once upgraded, use @atlaskit/codemod-cli
via npx
:
npx @atlaskit/codemod-cli --parser babel --extensions ts,tsx,js [relativePath]
The CLI will show a list of components and versions so select @atlaskit/lozenge@^11.0.0
and you
will automatically be upgraded.
What will be changed:
backgroundColor
and textColor
from appearance
prop (if object is passed as
appearance
prop value) to style
prop.Run npx @atlaskit/codemod-cli -h
for more details on usage.
For Atlassians,
refer to the documentation for more details on the codemod CLI.
0d0ecc6e790
- Corrects
eslint supressions.378d1cef00f
- Bump
@atlaskit/theme
to version ^11.3.0
.9c98e8227f6
- Internal
refactor for style declarations.42e722938da
-
Converted class components to functional components8f0e5cbea57
- Migrated
from @compiled
to @emotion
f84de8233f3
- Add
Techstacks rules to package.json7bb3268f2c8
- Removed
version.json and unused dependency - react-test-renderer
f78ced42525
- Wrapped
the root component in React.memo()
to memorize the rendered lozenge69badd52b1
- Bumps
compiled to v0.6 to surface various fixes61d08bb92d
- Upgrades
@compiled/react to v0.5.205ef83ee27
- Lozenge
now uses @compiled/react
to power its styles.d3265f19be
- Transpile
packages using babel rather than tsc5f58283e1f
- Export
types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules
compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript
versions here: https://atlaskit.atlassian.com/get-started Also add typescript
to
devDependencies
to denote version that the package was built with.6360c46009
- Reenable
integration tests for Edge browser#3885
6c525a8229
- Upgraded
to TypeScript 3.9.6 and tslib to 2.0.0
Since tslib is a dependency for all our packages we recommend that products also follow this tslib upgrade to prevent duplicates of tslib being bundled.
954cc87b62
- The readme
and package information has been updated to point to the new design system website.db053b24d8
- Update all
the theme imports to be tree-shakable87f4720f27
- Officially
dropping IE11 support, from this version onwards there are no warranties of the package working in
IE11. For more information see:
https://community.developer.atlassian.com/t/atlaskit-to-drop-support-for-internet-explorer-11-from-1st-july-2020/3953454a9514fcf
- Build and
supporting files will no longer be published to npm[patch]a4d063330a:
Change imports to comply with Atlassian conventions- Updated dependencies fd41d77c29:
[patch]6548261c9a:
Remove namespace imports from React, ReactDom, and PropTypes- Updated dependencies 6548261c9a:
[patch]4a223473c5:
Removes babel/runtime from dependencies. Users should see a smaller bundlesize as a result- Updated dependencies 82747f2922:
[patch]557a8e2451:
Rebuilds package to fix typescript typing error.
[patch]35d2229b2a:
Adding missing license to packages and update to Copyright 2019 Atlassian Pty Ltd.
[minor]10e0798da6:
Adding an optional prop testId
that will set the attribute value data-testid
. It will help
products to write better integration and end to end tests.
[patch]097b696613:
Components now depend on TS 3.6 internally, in order to fix an issue with TS resolving non-relative imports as relative imports
[patch]ecca4d1dbb:
Upgraded Typescript to 3.3.x
[patch]708028db86:
Change all the imports to theme in Core to use multi entry points
[patch]de35ce8c67:
Updates component maintainers
[patch]bbff8a7d87:
Fixes bug, missing version.json file
[patch]18dfac7332:
In this PR, we are:
[patch]f8778d517a:
Remove index.ts from built module
[major]76299208e6:
As a breaking change, all @atlaskit packages will be dropping cjs distributions and will only
distribute esm. This means all distributed code will be transpiled, but will still contain
import
and export
declarations.
The major reason for doing this is to allow us to support multiple entry points in packages, e.g:
import colors from `@atlaskit/theme/colors`;
Previously this was sort of possible for consumers by doing something like:
import colors from `@atlaskit/theme/dist/esm/colors`;
This has a couple of issues. 1, it treats the file system as API making internal refactors harder, we have to worry about how consumers might be using things that aren't actually supposed to be used. 2. We are unable to do this internally in @atlaskit packages. This leads to lots of packages bundling all of theme, just to use a single color, especially in situations where tree shaking fails.
To support being able to use multiple entrypoints internally, we unfortunately cannot have multiple distributions as they would need to have very different imports from of their own internal dependencies.
ES Modules are widely supported by all modern bundlers and can be worked around in node environments.
We may choose to revisit this solution in the future if we find any unintended condequences, but we see this as a pretty sane path forward which should lead to some major bundle size decreases, saner API's and simpler package architecture.
Please reach out to #fabric-build (if in Atlassian) or create an issue in Design System Support (for external) if you have any questions or queries about this.