@atlaskit/lozenge 13.2.2 → 13.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/lozenge.compiled.css +2 -2
- package/dist/cjs/lozenge.js +17 -3
- package/dist/cjs/new/lozenge-base.compiled.css +1 -1
- package/dist/cjs/new/lozenge-base.js +1 -1
- package/dist/cjs/new/lozenge.js +0 -1
- package/dist/es2019/lozenge.compiled.css +2 -2
- package/dist/es2019/lozenge.js +17 -3
- package/dist/es2019/new/lozenge-base.compiled.css +1 -1
- package/dist/es2019/new/lozenge-base.js +1 -1
- package/dist/es2019/new/lozenge.js +0 -1
- package/dist/esm/lozenge.compiled.css +2 -2
- package/dist/esm/lozenge.js +17 -3
- package/dist/esm/new/lozenge-base.compiled.css +1 -1
- package/dist/esm/new/lozenge-base.js +1 -1
- package/dist/esm/new/lozenge.js +0 -1
- package/dist/types/new/lozenge-base.d.ts +9 -1
- package/dist/types/new/types.d.ts +1 -27
- package/dist/types-ts4.5/new/lozenge-base.d.ts +9 -1
- package/dist/types-ts4.5/new/types.d.ts +1 -27
- package/lozenge-dropdown-trigger/package.json +17 -0
- package/offerings.json +0 -1
- package/package.json +27 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/lozenge
|
|
2
2
|
|
|
3
|
+
## 13.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 13.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`3f338c9019166`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f338c9019166) -
|
|
14
|
+
Added “./lozenge-dropdown-trigger” entrypoint. Mapped the new semantic values to the existing
|
|
15
|
+
appearance to ensure backward compatibility.
|
|
16
|
+
|
|
3
17
|
## 13.2.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
25
25
|
._bfhkxmjf{background-color:#f9c84e}
|
|
26
26
|
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
27
|
-
.
|
|
28
|
-
.
|
|
27
|
+
._ect4ttxp{font-family:var(--ds-font-family-body,"Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
28
|
+
._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
|
|
29
29
|
._kqswpfqs{position:static}
|
|
30
30
|
._o5721q9c{white-space:nowrap}
|
|
31
31
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
package/dist/cjs/lozenge.js
CHANGED
|
@@ -21,7 +21,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
21
21
|
var styles = {
|
|
22
22
|
container: "_2rkofajl _1reo15vq _18m915vq _1e0c116y _vchhusvi _kqswpfqs _1kz6184x _bozg1b66 _y4ti1b66",
|
|
23
23
|
containerSubtle: "_1cwg1n1a",
|
|
24
|
-
text: "_1reo15vq _18m915vq
|
|
24
|
+
text: "_1reo15vq _18m915vq _ect4ttxp _1wyb1skh _zg8l4jg8 _k48pwu06 _vwz47vkz _1bto1l2s _1p1dangw _o5721q9c",
|
|
25
25
|
customLetterspacing: "_1dyz9vsi",
|
|
26
26
|
'bg.bold.default': "_bfhk1fkg",
|
|
27
27
|
'bg.bold.inprogress': "_bfhk1ymo",
|
|
@@ -44,7 +44,21 @@ var styles = {
|
|
|
44
44
|
'text.subtle': "_syazi7uo",
|
|
45
45
|
'text.bold': "_syazwwip"
|
|
46
46
|
};
|
|
47
|
-
var appearanceTypes = ['default', 'inprogress', 'moved', 'new', 'removed'
|
|
47
|
+
var appearanceTypes = ['default', 'inprogress', 'moved', 'new', 'removed'];
|
|
48
|
+
var newSemanticColors = ['success', 'discovery', 'warning', 'danger', 'information', 'neutral'];
|
|
49
|
+
var appearanceMapping = {
|
|
50
|
+
neutral: 'default',
|
|
51
|
+
default: 'default',
|
|
52
|
+
information: 'inprogress',
|
|
53
|
+
inprogress: 'inprogress',
|
|
54
|
+
warning: 'moved',
|
|
55
|
+
moved: 'moved',
|
|
56
|
+
removed: 'removed',
|
|
57
|
+
danger: 'removed',
|
|
58
|
+
success: 'success',
|
|
59
|
+
discovery: 'new',
|
|
60
|
+
new: 'new'
|
|
61
|
+
};
|
|
48
62
|
/**
|
|
49
63
|
* __Lozenge__
|
|
50
64
|
*
|
|
@@ -66,7 +80,7 @@ var LegacyLozenge = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
66
80
|
style = _ref.style;
|
|
67
81
|
var appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
68
82
|
var appearanceType = (0, _react.useMemo)(function () {
|
|
69
|
-
return appearanceTypes.includes(appearance) ? appearance : 'default';
|
|
83
|
+
return appearanceTypes.includes(appearance) || newSemanticColors.includes(appearance) ? appearanceMapping[appearance] : 'default';
|
|
70
84
|
}, [appearance]);
|
|
71
85
|
var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
|
|
72
86
|
var maxWidthIsPc = typeof maxWidth === 'string' && /%$/.test(maxWidth);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
2
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
4
4
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
5
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
@@ -24,7 +24,7 @@ var styles = {
|
|
|
24
24
|
container: "_2rko12b0 _1reo15vq _18m915vq _zulp1b66 _1rjcv77o _18zr1b66 _189ee4h9 _1dqonqa1 _1h6d1j28 _1e0c116y _4cvr1h6o _vchhusvi _4t3igktf",
|
|
25
25
|
containerInteractive: "_80omtlke _mizu1v1w _1ah3v77o _ra3xnqa1 _128mdkaa",
|
|
26
26
|
containerSelected: "_bfhk15s3 _syaz6x5g _irr3ufnl _1di6nozp",
|
|
27
|
-
text: "
|
|
27
|
+
text: "_11c8wadc _1reo15vq _18m915vq _1bto1l2s _o5721q9c",
|
|
28
28
|
textSelected: "_syaz6x5g",
|
|
29
29
|
'semantic.success': "_1b3i4pcx _3wu01mps _bfhk14j0 _syaz1p1e",
|
|
30
30
|
'semantic.warning': "_1b3iervl _3wu01xiv _bfhk10f4 _syazmgs1",
|
package/dist/cjs/new/lozenge.js
CHANGED
|
@@ -32,7 +32,6 @@ var Lozenge = function Lozenge(_ref) {
|
|
|
32
32
|
return /*#__PURE__*/React.createElement(_lozengeBase.default, {
|
|
33
33
|
appearance: appearance,
|
|
34
34
|
iconBefore: iconBefore,
|
|
35
|
-
isInteractive: true,
|
|
36
35
|
maxWidth: maxWidth
|
|
37
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
38
37
|
,
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
25
25
|
._bfhkxmjf{background-color:#f9c84e}
|
|
26
26
|
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
27
|
-
.
|
|
28
|
-
.
|
|
27
|
+
._ect4ttxp{font-family:var(--ds-font-family-body,"Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
28
|
+
._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
|
|
29
29
|
._kqswpfqs{position:static}
|
|
30
30
|
._o5721q9c{white-space:nowrap}
|
|
31
31
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
package/dist/es2019/lozenge.js
CHANGED
|
@@ -12,7 +12,7 @@ import NewLozenge from './new/lozenge';
|
|
|
12
12
|
const styles = {
|
|
13
13
|
container: "_2rkofajl _1reo15vq _18m915vq _1e0c116y _vchhusvi _kqswpfqs _1kz6184x _bozg1b66 _y4ti1b66",
|
|
14
14
|
containerSubtle: "_1cwg1n1a",
|
|
15
|
-
text: "_1reo15vq _18m915vq
|
|
15
|
+
text: "_1reo15vq _18m915vq _ect4ttxp _1wyb1skh _zg8l4jg8 _k48pwu06 _vwz47vkz _1bto1l2s _1p1dangw _o5721q9c",
|
|
16
16
|
customLetterspacing: "_1dyz9vsi",
|
|
17
17
|
'bg.bold.default': "_bfhk1fkg",
|
|
18
18
|
'bg.bold.inprogress': "_bfhk1ymo",
|
|
@@ -35,7 +35,21 @@ const styles = {
|
|
|
35
35
|
'text.subtle': "_syazi7uo",
|
|
36
36
|
'text.bold': "_syazwwip"
|
|
37
37
|
};
|
|
38
|
-
const appearanceTypes = ['default', 'inprogress', 'moved', 'new', 'removed'
|
|
38
|
+
const appearanceTypes = ['default', 'inprogress', 'moved', 'new', 'removed'];
|
|
39
|
+
const newSemanticColors = ['success', 'discovery', 'warning', 'danger', 'information', 'neutral'];
|
|
40
|
+
const appearanceMapping = {
|
|
41
|
+
neutral: 'default',
|
|
42
|
+
default: 'default',
|
|
43
|
+
information: 'inprogress',
|
|
44
|
+
inprogress: 'inprogress',
|
|
45
|
+
warning: 'moved',
|
|
46
|
+
moved: 'moved',
|
|
47
|
+
removed: 'removed',
|
|
48
|
+
danger: 'removed',
|
|
49
|
+
success: 'success',
|
|
50
|
+
discovery: 'new',
|
|
51
|
+
new: 'new'
|
|
52
|
+
};
|
|
39
53
|
/**
|
|
40
54
|
* __Lozenge__
|
|
41
55
|
*
|
|
@@ -54,7 +68,7 @@ const LegacyLozenge = /*#__PURE__*/memo(({
|
|
|
54
68
|
style
|
|
55
69
|
}) => {
|
|
56
70
|
const appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
57
|
-
const appearanceType = useMemo(() => appearanceTypes.includes(appearance) ? appearance : 'default', [appearance]);
|
|
71
|
+
const appearanceType = useMemo(() => appearanceTypes.includes(appearance) || newSemanticColors.includes(appearance) ? appearanceMapping[appearance] : 'default', [appearance]);
|
|
58
72
|
const maxWidthValue = typeof maxWidth === 'string' ? maxWidth : `${maxWidth}px`;
|
|
59
73
|
const maxWidthIsPc = typeof maxWidth === 'string' && /%$/.test(maxWidth);
|
|
60
74
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
2
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
4
4
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
5
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
@@ -12,7 +12,7 @@ const styles = {
|
|
|
12
12
|
container: "_2rko12b0 _1reo15vq _18m915vq _zulp1b66 _1rjcv77o _18zr1b66 _189ee4h9 _1dqonqa1 _1h6d1j28 _1e0c116y _4cvr1h6o _vchhusvi _4t3igktf",
|
|
13
13
|
containerInteractive: "_80omtlke _mizu1v1w _1ah3v77o _ra3xnqa1 _128mdkaa",
|
|
14
14
|
containerSelected: "_bfhk15s3 _syaz6x5g _irr3ufnl _1di6nozp",
|
|
15
|
-
text: "
|
|
15
|
+
text: "_11c8wadc _1reo15vq _18m915vq _1bto1l2s _o5721q9c",
|
|
16
16
|
textSelected: "_syaz6x5g",
|
|
17
17
|
'semantic.success': "_1b3i4pcx _3wu01mps _bfhk14j0 _syaz1p1e",
|
|
18
18
|
'semantic.warning': "_1b3iervl _3wu01xiv _bfhk10f4 _syazmgs1",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
|
|
25
25
|
._bfhkxmjf{background-color:#f9c84e}
|
|
26
26
|
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
27
|
-
.
|
|
28
|
-
.
|
|
27
|
+
._ect4ttxp{font-family:var(--ds-font-family-body,"Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
28
|
+
._k48pwu06{font-weight:var(--ds-font-weight-bold,653)}
|
|
29
29
|
._kqswpfqs{position:static}
|
|
30
30
|
._o5721q9c{white-space:nowrap}
|
|
31
31
|
._syazi7uo{color:var(--ds-text,#292a2e)}
|
package/dist/esm/lozenge.js
CHANGED
|
@@ -12,7 +12,7 @@ import NewLozenge from './new/lozenge';
|
|
|
12
12
|
var styles = {
|
|
13
13
|
container: "_2rkofajl _1reo15vq _18m915vq _1e0c116y _vchhusvi _kqswpfqs _1kz6184x _bozg1b66 _y4ti1b66",
|
|
14
14
|
containerSubtle: "_1cwg1n1a",
|
|
15
|
-
text: "_1reo15vq _18m915vq
|
|
15
|
+
text: "_1reo15vq _18m915vq _ect4ttxp _1wyb1skh _zg8l4jg8 _k48pwu06 _vwz47vkz _1bto1l2s _1p1dangw _o5721q9c",
|
|
16
16
|
customLetterspacing: "_1dyz9vsi",
|
|
17
17
|
'bg.bold.default': "_bfhk1fkg",
|
|
18
18
|
'bg.bold.inprogress': "_bfhk1ymo",
|
|
@@ -35,7 +35,21 @@ var styles = {
|
|
|
35
35
|
'text.subtle': "_syazi7uo",
|
|
36
36
|
'text.bold': "_syazwwip"
|
|
37
37
|
};
|
|
38
|
-
var appearanceTypes = ['default', 'inprogress', 'moved', 'new', 'removed'
|
|
38
|
+
var appearanceTypes = ['default', 'inprogress', 'moved', 'new', 'removed'];
|
|
39
|
+
var newSemanticColors = ['success', 'discovery', 'warning', 'danger', 'information', 'neutral'];
|
|
40
|
+
var appearanceMapping = {
|
|
41
|
+
neutral: 'default',
|
|
42
|
+
default: 'default',
|
|
43
|
+
information: 'inprogress',
|
|
44
|
+
inprogress: 'inprogress',
|
|
45
|
+
warning: 'moved',
|
|
46
|
+
moved: 'moved',
|
|
47
|
+
removed: 'removed',
|
|
48
|
+
danger: 'removed',
|
|
49
|
+
success: 'success',
|
|
50
|
+
discovery: 'new',
|
|
51
|
+
new: 'new'
|
|
52
|
+
};
|
|
39
53
|
/**
|
|
40
54
|
* __Lozenge__
|
|
41
55
|
*
|
|
@@ -57,7 +71,7 @@ var LegacyLozenge = /*#__PURE__*/memo(function (_ref) {
|
|
|
57
71
|
style = _ref.style;
|
|
58
72
|
var appearanceStyle = isBold ? 'bold' : 'subtle';
|
|
59
73
|
var appearanceType = useMemo(function () {
|
|
60
|
-
return appearanceTypes.includes(appearance) ? appearance : 'default';
|
|
74
|
+
return appearanceTypes.includes(appearance) || newSemanticColors.includes(appearance) ? appearanceMapping[appearance] : 'default';
|
|
61
75
|
}, [appearance]);
|
|
62
76
|
var maxWidthValue = typeof maxWidth === 'string' ? maxWidth : "".concat(maxWidth, "px");
|
|
63
77
|
var maxWidthIsPc = typeof maxWidth === 'string' && /%$/.test(maxWidth);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
2
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
4
4
|
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
5
5
|
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
@@ -15,7 +15,7 @@ var styles = {
|
|
|
15
15
|
container: "_2rko12b0 _1reo15vq _18m915vq _zulp1b66 _1rjcv77o _18zr1b66 _189ee4h9 _1dqonqa1 _1h6d1j28 _1e0c116y _4cvr1h6o _vchhusvi _4t3igktf",
|
|
16
16
|
containerInteractive: "_80omtlke _mizu1v1w _1ah3v77o _ra3xnqa1 _128mdkaa",
|
|
17
17
|
containerSelected: "_bfhk15s3 _syaz6x5g _irr3ufnl _1di6nozp",
|
|
18
|
-
text: "
|
|
18
|
+
text: "_11c8wadc _1reo15vq _18m915vq _1bto1l2s _o5721q9c",
|
|
19
19
|
textSelected: "_syaz6x5g",
|
|
20
20
|
'semantic.success': "_1b3i4pcx _3wu01mps _bfhk14j0 _syaz1p1e",
|
|
21
21
|
'semantic.warning': "_1b3iervl _3wu01xiv _bfhk10f4 _syazmgs1",
|
package/dist/esm/new/lozenge.js
CHANGED
|
@@ -23,7 +23,6 @@ var Lozenge = function Lozenge(_ref) {
|
|
|
23
23
|
return /*#__PURE__*/React.createElement(LozengeBase, {
|
|
24
24
|
appearance: appearance,
|
|
25
25
|
iconBefore: iconBefore,
|
|
26
|
-
isInteractive: true,
|
|
27
26
|
maxWidth: maxWidth
|
|
28
27
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
29
28
|
,
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type Ref } from 'react';
|
|
1
6
|
import { type LozengeDropdownTriggerProps, type NewLozengeProps } from './types';
|
|
7
|
+
interface LozengeBaseProps extends NewLozengeProps, LozengeDropdownTriggerProps {
|
|
8
|
+
ref?: Ref<HTMLElement | HTMLButtonElement>;
|
|
9
|
+
}
|
|
2
10
|
/**
|
|
3
11
|
* __New Lozenge__
|
|
4
12
|
*
|
|
5
13
|
* A lozenge is a visual indicator used to highlight an item's status for quick recognition.
|
|
6
14
|
* This is the updated version with the new North Star visual language.
|
|
7
15
|
*/
|
|
8
|
-
declare const LozengeBase: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<
|
|
16
|
+
declare const LozengeBase: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<LozengeBaseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement | HTMLElement>>>;
|
|
9
17
|
export default LozengeBase;
|
|
@@ -35,16 +35,6 @@ export interface NewLozengeProps {
|
|
|
35
35
|
* Icon to display before the text content. Should be an ADS icon component.
|
|
36
36
|
*/
|
|
37
37
|
iconBefore?: IconProp;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the lozenge is interactive (dropdown trigger). Only used internally.
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
isInteractive?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the lozenge is selected (for dropdown triggers). Only used internally.
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
isSelected?: boolean;
|
|
48
38
|
/**
|
|
49
39
|
* max-width of lozenge container. Default to 200px.
|
|
50
40
|
*/
|
|
@@ -54,22 +44,6 @@ export interface NewLozengeProps {
|
|
|
54
44
|
* @deprecated This prop is deprecated and will be removed in a future version.
|
|
55
45
|
*/
|
|
56
46
|
style?: Pick<CSSProperties, 'backgroundColor' | 'color'>;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when the lozenge is clicked (only for interactive lozenges).
|
|
59
|
-
* The second argument provides an Atlaskit UI analytics event.
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Additional information to be included in the `context` of Atlaskit analytics events.
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
analyticsContext?: Record<string, any>;
|
|
68
|
-
/**
|
|
69
|
-
* An optional name used to identify events for React UFO press interactions.
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
interactionName?: string;
|
|
73
47
|
/**
|
|
74
48
|
* A `testId` prop is provided for specified elements, which is a unique
|
|
75
49
|
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
@@ -84,7 +58,7 @@ export interface NewLozengeProps {
|
|
|
84
58
|
/**
|
|
85
59
|
* Props for the LozengeDropdownTrigger component
|
|
86
60
|
*/
|
|
87
|
-
export interface LozengeDropdownTriggerProps extends
|
|
61
|
+
export interface LozengeDropdownTriggerProps extends NewLozengeProps {
|
|
88
62
|
/**
|
|
89
63
|
* Whether the dropdown is currently selected/open.
|
|
90
64
|
*/
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type Ref } from 'react';
|
|
1
6
|
import { type LozengeDropdownTriggerProps, type NewLozengeProps } from './types';
|
|
7
|
+
interface LozengeBaseProps extends NewLozengeProps, LozengeDropdownTriggerProps {
|
|
8
|
+
ref?: Ref<HTMLElement | HTMLButtonElement>;
|
|
9
|
+
}
|
|
2
10
|
/**
|
|
3
11
|
* __New Lozenge__
|
|
4
12
|
*
|
|
5
13
|
* A lozenge is a visual indicator used to highlight an item's status for quick recognition.
|
|
6
14
|
* This is the updated version with the new North Star visual language.
|
|
7
15
|
*/
|
|
8
|
-
declare const LozengeBase: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<
|
|
16
|
+
declare const LozengeBase: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<LozengeBaseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement | HTMLElement>>>;
|
|
9
17
|
export default LozengeBase;
|
|
@@ -35,16 +35,6 @@ export interface NewLozengeProps {
|
|
|
35
35
|
* Icon to display before the text content. Should be an ADS icon component.
|
|
36
36
|
*/
|
|
37
37
|
iconBefore?: IconProp;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the lozenge is interactive (dropdown trigger). Only used internally.
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
isInteractive?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Whether the lozenge is selected (for dropdown triggers). Only used internally.
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
isSelected?: boolean;
|
|
48
38
|
/**
|
|
49
39
|
* max-width of lozenge container. Default to 200px.
|
|
50
40
|
*/
|
|
@@ -54,22 +44,6 @@ export interface NewLozengeProps {
|
|
|
54
44
|
* @deprecated This prop is deprecated and will be removed in a future version.
|
|
55
45
|
*/
|
|
56
46
|
style?: Pick<CSSProperties, 'backgroundColor' | 'color'>;
|
|
57
|
-
/**
|
|
58
|
-
* Callback fired when the lozenge is clicked (only for interactive lozenges).
|
|
59
|
-
* The second argument provides an Atlaskit UI analytics event.
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void;
|
|
63
|
-
/**
|
|
64
|
-
* Additional information to be included in the `context` of Atlaskit analytics events.
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
analyticsContext?: Record<string, any>;
|
|
68
|
-
/**
|
|
69
|
-
* An optional name used to identify events for React UFO press interactions.
|
|
70
|
-
* @internal
|
|
71
|
-
*/
|
|
72
|
-
interactionName?: string;
|
|
73
47
|
/**
|
|
74
48
|
* A `testId` prop is provided for specified elements, which is a unique
|
|
75
49
|
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
@@ -84,7 +58,7 @@ export interface NewLozengeProps {
|
|
|
84
58
|
/**
|
|
85
59
|
* Props for the LozengeDropdownTrigger component
|
|
86
60
|
*/
|
|
87
|
-
export interface LozengeDropdownTriggerProps extends
|
|
61
|
+
export interface LozengeDropdownTriggerProps extends NewLozengeProps {
|
|
88
62
|
/**
|
|
89
63
|
* Whether the dropdown is currently selected/open.
|
|
90
64
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/lozenge/lozenge-dropdown-trigger",
|
|
3
|
+
"main": "../dist/cjs/new/lozenge-dropdown-trigger.js",
|
|
4
|
+
"module": "../dist/esm/new/lozenge-dropdown-trigger.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/new/lozenge-dropdown-trigger.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/new/lozenge-dropdown-trigger.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/new/lozenge-dropdown-trigger.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/offerings.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/lozenge",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.1",
|
|
4
4
|
"description": "A lozenge is a visual indicator used to highlight an item's status for quick recognition.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,17 +28,34 @@
|
|
|
28
28
|
"team": "Design System Team",
|
|
29
29
|
"website": {
|
|
30
30
|
"name": "Lozenge",
|
|
31
|
-
"category": "Status indicators"
|
|
31
|
+
"category": "Status indicators",
|
|
32
|
+
"subPages": [
|
|
33
|
+
{
|
|
34
|
+
"title": "Lozenge",
|
|
35
|
+
"id": "lozenge",
|
|
36
|
+
"status": {
|
|
37
|
+
"type": "alpha",
|
|
38
|
+
"description": "This is an experiment under a feature flag. We may make frequent breaking changes with limited notice. We don't recommend using this without support from our team."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"title": "Lozenge Dropdown Trigger",
|
|
43
|
+
"id": "lozenge-dropdown-trigger",
|
|
44
|
+
"status": {
|
|
45
|
+
"type": "alpha"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
]
|
|
32
49
|
}
|
|
33
50
|
},
|
|
34
51
|
"dependencies": {
|
|
35
52
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
36
53
|
"@atlaskit/css": "^0.19.0",
|
|
37
54
|
"@atlaskit/ds-lib": "^5.3.0",
|
|
38
|
-
"@atlaskit/icon": "^29.
|
|
55
|
+
"@atlaskit/icon": "^29.4.0",
|
|
39
56
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/primitives": "^17.
|
|
41
|
-
"@atlaskit/tokens": "^
|
|
57
|
+
"@atlaskit/primitives": "^17.1.0",
|
|
58
|
+
"@atlaskit/tokens": "^10.0.0",
|
|
42
59
|
"@babel/runtime": "^7.0.0",
|
|
43
60
|
"@compiled/react": "^0.18.6"
|
|
44
61
|
},
|
|
@@ -49,14 +66,14 @@
|
|
|
49
66
|
"@af/accessibility-testing": "workspace:^",
|
|
50
67
|
"@af/integration-testing": "workspace:^",
|
|
51
68
|
"@af/visual-regression": "workspace:^",
|
|
52
|
-
"@atlaskit/docs": "^11.
|
|
53
|
-
"@atlaskit/dropdown-menu": "^16.
|
|
69
|
+
"@atlaskit/docs": "^11.3.0",
|
|
70
|
+
"@atlaskit/dropdown-menu": "^16.4.0",
|
|
54
71
|
"@atlaskit/heading": "^5.2.0",
|
|
55
|
-
"@atlaskit/link": "^3.
|
|
56
|
-
"@atlaskit/section-message": "^8.
|
|
72
|
+
"@atlaskit/link": "^3.3.0",
|
|
73
|
+
"@atlaskit/section-message": "^8.12.0",
|
|
57
74
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
58
75
|
"@atlassian/ssr-tests": "workspace:^",
|
|
59
|
-
"@testing-library/react": "^
|
|
76
|
+
"@testing-library/react": "^16.3.0",
|
|
60
77
|
"jscodeshift": "^17.0.0",
|
|
61
78
|
"react-dom": "^18.2.0"
|
|
62
79
|
},
|