@atlaskit/menu 2.4.0 → 2.5.0
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 +20 -1
- package/__perf__/button.tsx +7 -9
- package/__perf__/custom.tsx +13 -17
- package/__perf__/link.tsx +6 -6
- package/__perf__/utils/example-runner.tsx +36 -41
- package/__perf__/utils/interaction-tasks.tsx +63 -86
- package/codemods/0.7.0-change-css-fn-prop.tsx +128 -156
- package/codemods/2.1.0-invalid-link-item-to-button-item.tsx +121 -145
- package/codemods/__tests__/0.7.0-change-css-fn-prop.tsx +77 -77
- package/codemods/__tests__/next-invalid-link-item-to-button-item.tsx +117 -117
- package/codemods/helpers/generic.tsx +528 -564
- package/dist/cjs/internal/components/menu-item-primitive.js +13 -2
- package/dist/cjs/internal/components/skeleton-shimmer.js +6 -0
- package/dist/cjs/menu-item/button-item.js +4 -0
- package/dist/cjs/menu-item/custom-item.js +8 -2
- package/dist/cjs/menu-item/heading-item.js +12 -2
- package/dist/cjs/menu-item/link-item.js +4 -0
- package/dist/cjs/menu-item/skeleton-heading-item.js +12 -1
- package/dist/cjs/menu-item/skeleton-item.js +25 -1
- package/dist/cjs/menu-section/menu-group.js +4 -0
- package/dist/cjs/menu-section/popup-menu-group.js +4 -0
- package/dist/cjs/menu-section/section.js +19 -4
- package/dist/es2019/internal/components/menu-item-primitive.js +13 -2
- package/dist/es2019/internal/components/skeleton-shimmer.js +5 -0
- package/dist/es2019/menu-item/button-item.js +5 -0
- package/dist/es2019/menu-item/custom-item.js +9 -2
- package/dist/es2019/menu-item/heading-item.js +13 -2
- package/dist/es2019/menu-item/link-item.js +5 -0
- package/dist/es2019/menu-item/skeleton-heading-item.js +11 -1
- package/dist/es2019/menu-item/skeleton-item.js +24 -1
- package/dist/es2019/menu-section/menu-group.js +4 -0
- package/dist/es2019/menu-section/popup-menu-group.js +4 -0
- package/dist/es2019/menu-section/section.js +20 -4
- package/dist/esm/internal/components/menu-item-primitive.js +13 -2
- package/dist/esm/internal/components/skeleton-shimmer.js +5 -0
- package/dist/esm/menu-item/button-item.js +5 -0
- package/dist/esm/menu-item/custom-item.js +9 -2
- package/dist/esm/menu-item/heading-item.js +13 -2
- package/dist/esm/menu-item/link-item.js +5 -0
- package/dist/esm/menu-item/skeleton-heading-item.js +11 -1
- package/dist/esm/menu-item/skeleton-item.js +24 -1
- package/dist/esm/menu-section/menu-group.js +4 -0
- package/dist/esm/menu-section/popup-menu-group.js +4 -0
- package/dist/esm/menu-section/section.js +20 -4
- package/dist/types/internal/components/skeleton-shimmer.d.ts +4 -1
- package/dist/types/menu-item/custom-item.d.ts +3 -0
- package/dist/types/menu-section/menu-group.d.ts +3 -0
- package/dist/types/menu-section/popup-menu-group.d.ts +3 -0
- package/dist/types-ts4.5/internal/components/skeleton-shimmer.d.ts +4 -1
- package/dist/types-ts4.5/menu-item/custom-item.d.ts +3 -0
- package/dist/types-ts4.5/menu-section/menu-group.d.ts +3 -0
- package/dist/types-ts4.5/menu-section/popup-menu-group.d.ts +3 -0
- package/package.json +133 -133
- package/report.api.md +130 -138
|
@@ -13,8 +13,13 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
13
13
|
var _primitives = require("@atlaskit/primitives");
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _menuContext = require("./menu-context");
|
|
16
|
+
/**
|
|
17
|
+
* @jsxRuntime classic
|
|
18
|
+
*/
|
|
16
19
|
/** @jsx jsx */
|
|
17
20
|
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
22
|
+
|
|
18
23
|
var defaultRender = function defaultRender(Component, props) {
|
|
19
24
|
return (
|
|
20
25
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
@@ -74,6 +79,7 @@ var primitiveStyles = (0, _react2.css)({
|
|
|
74
79
|
outline: 0,
|
|
75
80
|
textDecoration: 'none',
|
|
76
81
|
userSelect: 'none',
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
77
83
|
'&::-moz-focus-inner': {
|
|
78
84
|
border: 0
|
|
79
85
|
},
|
|
@@ -118,6 +124,7 @@ var unselectedStyles = (0, _react2.css)({
|
|
|
118
124
|
});
|
|
119
125
|
var disabledStyles = (0, _react2.css)({
|
|
120
126
|
cursor: 'not-allowed',
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
121
128
|
'&, :hover, :active': {
|
|
122
129
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
123
130
|
color: "var(--ds-text-disabled, ".concat(_colors.N200, ")")
|
|
@@ -225,14 +232,18 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
|
|
|
225
232
|
}, iconBefore), title && (0, _react2.jsx)(_primitives.Stack, {
|
|
226
233
|
alignBlock: "center",
|
|
227
234
|
grow: "fill",
|
|
228
|
-
xcss:
|
|
235
|
+
xcss:
|
|
236
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
237
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-tokenised-typography-styles') ? contentStyles : [contentStyles, baseContentStyles]
|
|
229
238
|
}, renderTitle('span', {
|
|
230
239
|
children: title,
|
|
231
240
|
className: cn((0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-tokenised-typography-styles') ? titleStyles : undefined, shouldTitleWrap ? wordBreakStyles : truncateStyles),
|
|
232
241
|
'data-item-title': true
|
|
233
242
|
}), description && (0, _react2.jsx)("span", {
|
|
234
243
|
"data-item-description": true,
|
|
235
|
-
css: [descriptionStyles,
|
|
244
|
+
css: [descriptionStyles,
|
|
245
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
246
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedDescriptionStyles : baseDescriptionStyles, isDisabled && disabledDescriptionStyles, shouldDescriptionWrap ? wordBreakStyles : truncateStyles]
|
|
236
247
|
}, description)), iconAfter && (0, _react2.jsx)("span", {
|
|
237
248
|
"data-item-elem-after": true,
|
|
238
249
|
css: beforeAfterElementStyles,
|
|
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
+
/**
|
|
10
|
+
* @jsxRuntime classic
|
|
11
|
+
*/
|
|
9
12
|
/** @jsx jsx */
|
|
10
13
|
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* These keyframes are mirrored in:
|
|
13
18
|
* packages/design-system/theme/src/constants.tsx
|
|
@@ -30,6 +35,7 @@ var shimmerKeyframes = (0, _react.keyframes)({
|
|
|
30
35
|
* Please update both.
|
|
31
36
|
*/
|
|
32
37
|
var shimmerStyles = (0, _react.css)({
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
33
39
|
'::before, ::after': {
|
|
34
40
|
animationDirection: 'alternate',
|
|
35
41
|
animationDuration: '1.5s',
|
|
@@ -14,7 +14,11 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _menuItemPrimitive = _interopRequireDefault(require("../internal/components/menu-item-primitive"));
|
|
16
16
|
var _excluded = ["children", "cssFn", "description", "iconAfter", "iconBefore", "isDisabled", "isSelected", "onClick", "testId", "overrides", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className"];
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
*/
|
|
17
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
22
|
/**
|
|
19
23
|
* __Button item__
|
|
20
24
|
*
|
|
@@ -14,7 +14,11 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _menuItemPrimitive = _interopRequireDefault(require("../internal/components/menu-item-primitive"));
|
|
16
16
|
var _excluded = ["component", "cssFn", "isDisabled", "isSelected", "onClick", "testId", "children", "description", "iconAfter", "iconBefore", "overrides", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className"];
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
*/
|
|
17
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
22
|
var preventEvent = function preventEvent(e) {
|
|
19
23
|
e.preventDefault();
|
|
20
24
|
};
|
|
@@ -70,9 +74,11 @@ var CustomItem = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardR
|
|
|
70
74
|
isDisabled: isDisabled,
|
|
71
75
|
shouldTitleWrap: shouldTitleWrap,
|
|
72
76
|
shouldDescriptionWrap: shouldDescriptionWrap
|
|
73
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
74
78
|
,
|
|
75
|
-
css: (0, _react2.css)(
|
|
79
|
+
css: (0, _react2.css)(
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
81
|
+
cssFn({
|
|
76
82
|
isDisabled: isDisabled,
|
|
77
83
|
isSelected: isSelected
|
|
78
84
|
})),
|
|
@@ -15,7 +15,11 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
15
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
16
|
var _typography = require("@atlaskit/theme/typography");
|
|
17
17
|
var _excluded = ["children", "testId", "headingLevel", "id", "cssFn", "className"];
|
|
18
|
+
/**
|
|
19
|
+
* @jsxRuntime classic
|
|
20
|
+
*/
|
|
18
21
|
/** @jsx jsx */
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
23
|
var itemHeadingContentHeight = _typography.headingSizes.h100.lineHeight;
|
|
20
24
|
var itemHeadingFontSize = _typography.headingSizes.h100.size;
|
|
21
25
|
var headingStyles = (0, _react2.css)({
|
|
@@ -25,8 +29,10 @@ var headingStyles = (0, _react2.css)({
|
|
|
25
29
|
textTransform: 'uppercase'
|
|
26
30
|
});
|
|
27
31
|
var baseHeadingStyles = (0, _react2.css)({
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
33
|
fontSize: itemHeadingFontSize,
|
|
29
34
|
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
36
|
lineHeight: itemHeadingContentHeight / itemHeadingFontSize
|
|
31
37
|
});
|
|
32
38
|
var tokenizedHeadingStyles = (0, _react2.css)({
|
|
@@ -53,9 +59,13 @@ var HeadingItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
53
59
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
54
60
|
(0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
55
61
|
);
|
|
56
|
-
var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
62
|
+
var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
|
+
(0, _react2.css)(cssFn(undefined));
|
|
57
65
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
58
|
-
css: [headingStyles,
|
|
66
|
+
css: [headingStyles,
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
68
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedHeadingStyles : baseHeadingStyles,
|
|
59
69
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
60
70
|
UNSAFE_overrides],
|
|
61
71
|
role: "heading",
|
|
@@ -14,7 +14,11 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _menuItemPrimitive = _interopRequireDefault(require("../internal/components/menu-item-primitive"));
|
|
16
16
|
var _excluded = ["children", "href", "cssFn", "description", "iconAfter", "iconBefore", "isDisabled", "isSelected", "onClick", "testId", "overrides", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className"];
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
*/
|
|
17
20
|
/** @jsx jsx */
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
18
22
|
var preventEvent = function preventEvent(e) {
|
|
19
23
|
e.preventDefault();
|
|
20
24
|
};
|
|
@@ -11,11 +11,17 @@ var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
var _skeletonShimmer = _interopRequireDefault(require("../internal/components/skeleton-shimmer"));
|
|
14
|
+
/**
|
|
15
|
+
* @jsxRuntime classic
|
|
16
|
+
*/
|
|
14
17
|
/** @jsx jsx */
|
|
15
18
|
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
|
+
|
|
16
21
|
var skeletonStyles = (0, _react.css)({
|
|
17
22
|
paddingBlock: "var(--ds-space-0, 0px)",
|
|
18
23
|
paddingInline: "var(--ds-space-200, 16px)",
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
19
25
|
'::after': {
|
|
20
26
|
display: 'block',
|
|
21
27
|
width: '30%',
|
|
@@ -26,11 +32,13 @@ var skeletonStyles = (0, _react.css)({
|
|
|
26
32
|
}
|
|
27
33
|
});
|
|
28
34
|
var defaultWidthStyles = (0, _react.css)({
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
29
36
|
'::after': {
|
|
30
37
|
width: '30%'
|
|
31
38
|
}
|
|
32
39
|
});
|
|
33
40
|
var customWidthStyles = (0, _react.css)({
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
34
42
|
'::after': {
|
|
35
43
|
width: 'var(--width)'
|
|
36
44
|
}
|
|
@@ -53,7 +61,9 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
|
|
|
53
61
|
cssFn = _ref$cssFn === void 0 ? _noop.default : _ref$cssFn;
|
|
54
62
|
(0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
55
63
|
);
|
|
56
|
-
var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
64
|
+
var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
+
(0, _react.css)(cssFn(undefined));
|
|
57
67
|
return (0, _react.jsx)(_skeletonShimmer.default, {
|
|
58
68
|
isShimmering: isShimmering
|
|
59
69
|
}, function (_ref2) {
|
|
@@ -65,6 +75,7 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
|
|
|
65
75
|
,
|
|
66
76
|
style: {
|
|
67
77
|
'--width': width
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
68
79
|
},
|
|
69
80
|
css: [skeletonStyles, width ? customWidthStyles : defaultWidthStyles,
|
|
70
81
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -12,8 +12,13 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
13
|
var _constants = require("@atlaskit/theme/constants");
|
|
14
14
|
var _skeletonShimmer = _interopRequireDefault(require("../internal/components/skeleton-shimmer"));
|
|
15
|
+
/**
|
|
16
|
+
* @jsxRuntime classic
|
|
17
|
+
*/
|
|
15
18
|
/** @jsx jsx */
|
|
16
19
|
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
|
+
|
|
17
22
|
var gridSize = (0, _constants.gridSize)();
|
|
18
23
|
var borderRadius = (0, _constants.borderRadius)();
|
|
19
24
|
var itemElemSpacing = gridSize * 1.5;
|
|
@@ -26,10 +31,12 @@ var skeletonContentHeight = 9;
|
|
|
26
31
|
var skeletonColor = "var(--ds-skeleton, ".concat(_colors.N20A, ")");
|
|
27
32
|
var skeletonStyles = (0, _react.css)({
|
|
28
33
|
display: 'flex',
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
29
35
|
minHeight: itemMinHeight,
|
|
30
36
|
padding: "0 ".concat("var(--ds-space-250, 20px)"),
|
|
31
37
|
alignItems: 'center',
|
|
32
38
|
pointerEvents: 'none',
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
33
40
|
'::after': {
|
|
34
41
|
height: skeletonContentHeight,
|
|
35
42
|
backgroundColor: skeletonColor,
|
|
@@ -42,48 +49,62 @@ var skeletonStyles = (0, _react.css)({
|
|
|
42
49
|
}
|
|
43
50
|
});
|
|
44
51
|
var defaultWidthStyles = (0, _react.css)({
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
45
53
|
':nth-of-type(1n)::after': {
|
|
46
54
|
flexBasis: '70%'
|
|
47
55
|
},
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
48
57
|
':nth-of-type(2n)::after': {
|
|
49
58
|
flexBasis: '50%'
|
|
50
59
|
},
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
51
61
|
':nth-of-type(3n)::after': {
|
|
52
62
|
flexBasis: '60%'
|
|
53
63
|
},
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
54
65
|
':nth-of-type(4n)::after': {
|
|
55
66
|
flexBasis: '90%'
|
|
56
67
|
},
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
57
69
|
':nth-of-type(5n)::after': {
|
|
58
70
|
flexBasis: '35%'
|
|
59
71
|
},
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
73
|
':nth-of-type(6n)::after': {
|
|
61
74
|
flexBasis: '77%'
|
|
62
75
|
}
|
|
63
76
|
});
|
|
64
77
|
var customWidthStyles = (0, _react.css)({
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
65
79
|
'::after': {
|
|
66
80
|
flexBasis: 'var(--width)'
|
|
67
81
|
}
|
|
68
82
|
});
|
|
69
83
|
var beforeElementStyles = (0, _react.css)({
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
70
85
|
'::before': {
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
87
|
width: skeletonItemElemSize,
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
89
|
height: skeletonItemElemSize,
|
|
73
90
|
flexShrink: 0,
|
|
74
91
|
backgroundColor: skeletonColor,
|
|
75
92
|
content: '""',
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
76
94
|
marginInlineEnd: itemElemSpacing + itemElemSkeletonOffset,
|
|
77
95
|
marginInlineStart: "var(--ds-space-025, 2px)"
|
|
78
96
|
}
|
|
79
97
|
});
|
|
80
98
|
var avatarStyles = (0, _react.css)({
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
81
100
|
'::before': {
|
|
82
101
|
borderRadius: '100%'
|
|
83
102
|
}
|
|
84
103
|
});
|
|
85
104
|
var iconStyles = (0, _react.css)({
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
86
106
|
'::before': {
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
87
108
|
borderRadius: borderRadius
|
|
88
109
|
}
|
|
89
110
|
});
|
|
@@ -107,7 +128,9 @@ var SkeletonItem = function SkeletonItem(_ref) {
|
|
|
107
128
|
cssFn = _ref$cssFn === void 0 ? _noop.default : _ref$cssFn;
|
|
108
129
|
(0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
109
130
|
);
|
|
110
|
-
var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
131
|
+
var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
133
|
+
(0, _react.css)(cssFn());
|
|
111
134
|
return (0, _react.jsx)(_skeletonShimmer.default, {
|
|
112
135
|
isShimmering: isShimmering
|
|
113
136
|
}, function (_ref2) {
|
|
@@ -119,6 +142,7 @@ var SkeletonItem = function SkeletonItem(_ref) {
|
|
|
119
142
|
,
|
|
120
143
|
style: {
|
|
121
144
|
'--width': width
|
|
145
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
122
146
|
},
|
|
123
147
|
css: [skeletonStyles, (hasAvatar || hasIcon) && beforeElementStyles, hasAvatar && avatarStyles, hasIcon && iconStyles, width ? customWidthStyles : defaultWidthStyles,
|
|
124
148
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -11,7 +11,11 @@ var _react = require("@emotion/react");
|
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
12
|
var _menuContext = require("../internal/components/menu-context");
|
|
13
13
|
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
14
|
+
/**
|
|
15
|
+
* @jsxRuntime classic
|
|
16
|
+
*/
|
|
14
17
|
/** @jsx jsx */
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
19
|
var baseStyles = (0, _react.css)({
|
|
16
20
|
display: 'flex',
|
|
17
21
|
position: 'static',
|
|
@@ -10,7 +10,11 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
11
|
var _menuGroup = _interopRequireDefault(require("./menu-group"));
|
|
12
12
|
var _excluded = ["maxWidth", "minWidth"];
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
*/
|
|
13
16
|
/** @jsx jsx */
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
14
18
|
/**
|
|
15
19
|
* @deprecated refer to MenuGroup, explicitly set maxWidth and minWidth
|
|
16
20
|
*/
|
|
@@ -17,7 +17,11 @@ var _typography = require("@atlaskit/theme/typography");
|
|
|
17
17
|
var _headingItem = _interopRequireDefault(require("../menu-item/heading-item"));
|
|
18
18
|
var _excluded = ["children", "overrides", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "className"];
|
|
19
19
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
20
|
+
/**
|
|
21
|
+
* @jsxRuntime classic
|
|
22
|
+
*/
|
|
20
23
|
/** @jsx jsx */
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
21
25
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
22
26
|
var gridSize = (0, _constants.gridSize)();
|
|
23
27
|
var itemHeadingTopMargin = gridSize * 2.5;
|
|
@@ -36,22 +40,31 @@ var VAR_SEPARATOR_COLOR = '--ds-menu-seperator-color';
|
|
|
36
40
|
var sectionStyles = (0, _react2.css)({
|
|
37
41
|
'&::before, &::after': {
|
|
38
42
|
display: 'block',
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
39
44
|
height: sectionPaddingTopBottom,
|
|
40
45
|
content: '""'
|
|
41
46
|
},
|
|
42
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
47
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
48
|
'& [data-ds--menu--heading-item]': {
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
50
|
marginBlockEnd: itemHeadingBottomMargin,
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
45
52
|
marginBlockStart: itemHeadingTopMargin,
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
46
54
|
'&:first-of-type': {
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
47
56
|
marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
|
|
48
57
|
}
|
|
49
58
|
},
|
|
50
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
59
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
51
60
|
'& [data-ds--menu--skeleton-heading-item]': {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
62
|
marginBlockEnd: skeletonHeadingBottomMargin,
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
53
64
|
marginBlockStart: skeletonHeadingTopMargin,
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
54
66
|
'&:first-of-type': {
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
68
|
marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
|
|
56
69
|
}
|
|
57
70
|
},
|
|
@@ -78,7 +91,7 @@ var thinSeparatorStyles = (0, _react2.css)({
|
|
|
78
91
|
});
|
|
79
92
|
var noSeparatorStyles = (0, _react2.css)({
|
|
80
93
|
// this is to ensure that adjacent sections without separators don't get additional margins.
|
|
81
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
94
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
82
95
|
'[data-section] + &': {
|
|
83
96
|
marginBlockStart: -6
|
|
84
97
|
}
|
|
@@ -140,7 +153,9 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
140
153
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
141
154
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
142
155
|
,
|
|
143
|
-
css: [sectionStyles, isScrollable ? scrollableStyles : unscrollableStyles, hasSeparator ?
|
|
156
|
+
css: [sectionStyles, isScrollable ? scrollableStyles : unscrollableStyles, hasSeparator ?
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
158
|
+
(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.section-1px-seperator-borders') ? thinSeparatorStyles : thickSeparatorStyles : noSeparatorStyles],
|
|
144
159
|
"aria-label": title,
|
|
145
160
|
"aria-labelledby": titleId,
|
|
146
161
|
"data-testid": testId,
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { useContext } from 'react';
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
8
|
import { ClassNames, css, jsx } from '@emotion/react';
|
|
4
9
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
5
10
|
import FocusRing from '@atlaskit/focus-ring';
|
|
@@ -63,6 +68,7 @@ const primitiveStyles = css({
|
|
|
63
68
|
outline: 0,
|
|
64
69
|
textDecoration: 'none',
|
|
65
70
|
userSelect: 'none',
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
66
72
|
'&::-moz-focus-inner': {
|
|
67
73
|
border: 0
|
|
68
74
|
},
|
|
@@ -107,6 +113,7 @@ const unselectedStyles = css({
|
|
|
107
113
|
});
|
|
108
114
|
const disabledStyles = css({
|
|
109
115
|
cursor: 'not-allowed',
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
110
117
|
'&, :hover, :active': {
|
|
111
118
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
112
119
|
color: `var(--ds-text-disabled, ${N200})`
|
|
@@ -212,14 +219,18 @@ const MenuItemPrimitive = ({
|
|
|
212
219
|
}, iconBefore), title && jsx(Stack, {
|
|
213
220
|
alignBlock: "center",
|
|
214
221
|
grow: "fill",
|
|
215
|
-
xcss:
|
|
222
|
+
xcss:
|
|
223
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
224
|
+
getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? contentStyles : [contentStyles, baseContentStyles]
|
|
216
225
|
}, renderTitle('span', {
|
|
217
226
|
children: title,
|
|
218
227
|
className: cn(getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? titleStyles : undefined, shouldTitleWrap ? wordBreakStyles : truncateStyles),
|
|
219
228
|
'data-item-title': true
|
|
220
229
|
}), description && jsx("span", {
|
|
221
230
|
"data-item-description": true,
|
|
222
|
-
css: [descriptionStyles,
|
|
231
|
+
css: [descriptionStyles,
|
|
232
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
233
|
+
getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedDescriptionStyles : baseDescriptionStyles, isDisabled && disabledDescriptionStyles, shouldDescriptionWrap ? wordBreakStyles : truncateStyles]
|
|
223
234
|
}, description)), iconAfter && jsx("span", {
|
|
224
235
|
"data-item-elem-after": true,
|
|
225
236
|
css: beforeAfterElementStyles,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
7
|
import { ClassNames, css, jsx, keyframes } from '@emotion/react';
|
|
4
8
|
import { N20A, N30A } from '@atlaskit/theme/colors';
|
|
5
9
|
/**
|
|
@@ -24,6 +28,7 @@ const shimmerKeyframes = keyframes({
|
|
|
24
28
|
* Please update both.
|
|
25
29
|
*/
|
|
26
30
|
const shimmerStyles = css({
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
27
32
|
'::before, ::after': {
|
|
28
33
|
animationDirection: 'alternate',
|
|
29
34
|
animationDuration: '1.5s',
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { forwardRef, memo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
6
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
|
|
4
7
|
import { forwardRef, memo } from 'react';
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
10
|
import { css, jsx } from '@emotion/react';
|
|
6
11
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
7
12
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -64,9 +69,11 @@ const CustomItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
|
|
|
64
69
|
isDisabled: isDisabled,
|
|
65
70
|
shouldTitleWrap: shouldTitleWrap,
|
|
66
71
|
shouldDescriptionWrap: shouldDescriptionWrap
|
|
67
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
72
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
68
73
|
,
|
|
69
|
-
css: css(
|
|
74
|
+
css: css(
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
76
|
+
cssFn({
|
|
70
77
|
isDisabled,
|
|
71
78
|
isSelected
|
|
72
79
|
})),
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { memo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { css, jsx } from '@emotion/react';
|
|
5
10
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
6
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -16,8 +21,10 @@ const headingStyles = css({
|
|
|
16
21
|
textTransform: 'uppercase'
|
|
17
22
|
});
|
|
18
23
|
const baseHeadingStyles = css({
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
25
|
fontSize: itemHeadingFontSize,
|
|
20
26
|
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
28
|
lineHeight: itemHeadingContentHeight / itemHeadingFontSize
|
|
22
29
|
});
|
|
23
30
|
const tokenizedHeadingStyles = css({
|
|
@@ -47,9 +54,13 @@ const HeadingItem = /*#__PURE__*/memo(({
|
|
|
47
54
|
}) => {
|
|
48
55
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
49
56
|
);
|
|
50
|
-
const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
57
|
+
const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
59
|
+
css(cssFn(undefined));
|
|
51
60
|
return jsx("div", _extends({
|
|
52
|
-
css: [headingStyles,
|
|
61
|
+
css: [headingStyles,
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
|
+
getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedHeadingStyles : baseHeadingStyles,
|
|
53
64
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
54
65
|
UNSAFE_overrides],
|
|
55
66
|
role: "heading",
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
3
6
|
import { forwardRef, memo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
9
|
import { jsx } from '@emotion/react';
|
|
5
10
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
6
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
7
|
import { css, jsx } from '@emotion/react';
|
|
4
8
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
5
9
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -9,6 +13,7 @@ import SkeletonShimmer from '../internal/components/skeleton-shimmer';
|
|
|
9
13
|
const skeletonStyles = css({
|
|
10
14
|
paddingBlock: "var(--ds-space-0, 0px)",
|
|
11
15
|
paddingInline: "var(--ds-space-200, 16px)",
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
12
17
|
'::after': {
|
|
13
18
|
display: 'block',
|
|
14
19
|
width: '30%',
|
|
@@ -19,11 +24,13 @@ const skeletonStyles = css({
|
|
|
19
24
|
}
|
|
20
25
|
});
|
|
21
26
|
const defaultWidthStyles = css({
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
22
28
|
'::after': {
|
|
23
29
|
width: '30%'
|
|
24
30
|
}
|
|
25
31
|
});
|
|
26
32
|
const customWidthStyles = css({
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
27
34
|
'::after': {
|
|
28
35
|
width: 'var(--width)'
|
|
29
36
|
}
|
|
@@ -45,7 +52,9 @@ const SkeletonHeadingItem = ({
|
|
|
45
52
|
}) => {
|
|
46
53
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
47
54
|
);
|
|
48
|
-
const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
55
|
+
const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
|
+
css(cssFn(undefined));
|
|
49
58
|
return jsx(SkeletonShimmer, {
|
|
50
59
|
isShimmering: isShimmering
|
|
51
60
|
}, ({
|
|
@@ -57,6 +66,7 @@ const SkeletonHeadingItem = ({
|
|
|
57
66
|
,
|
|
58
67
|
style: {
|
|
59
68
|
'--width': width
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
60
70
|
},
|
|
61
71
|
css: [skeletonStyles, width ? customWidthStyles : defaultWidthStyles,
|
|
62
72
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|