@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
|
@@ -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';
|
|
@@ -21,10 +25,12 @@ const skeletonContentHeight = 9;
|
|
|
21
25
|
const skeletonColor = `var(--ds-skeleton, ${N20A})`;
|
|
22
26
|
const skeletonStyles = css({
|
|
23
27
|
display: 'flex',
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
29
|
minHeight: itemMinHeight,
|
|
25
30
|
padding: `0 ${"var(--ds-space-250, 20px)"}`,
|
|
26
31
|
alignItems: 'center',
|
|
27
32
|
pointerEvents: 'none',
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
28
34
|
'::after': {
|
|
29
35
|
height: skeletonContentHeight,
|
|
30
36
|
backgroundColor: skeletonColor,
|
|
@@ -37,48 +43,62 @@ const skeletonStyles = css({
|
|
|
37
43
|
}
|
|
38
44
|
});
|
|
39
45
|
const defaultWidthStyles = css({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
40
47
|
':nth-of-type(1n)::after': {
|
|
41
48
|
flexBasis: '70%'
|
|
42
49
|
},
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
43
51
|
':nth-of-type(2n)::after': {
|
|
44
52
|
flexBasis: '50%'
|
|
45
53
|
},
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
46
55
|
':nth-of-type(3n)::after': {
|
|
47
56
|
flexBasis: '60%'
|
|
48
57
|
},
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
49
59
|
':nth-of-type(4n)::after': {
|
|
50
60
|
flexBasis: '90%'
|
|
51
61
|
},
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
52
63
|
':nth-of-type(5n)::after': {
|
|
53
64
|
flexBasis: '35%'
|
|
54
65
|
},
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
55
67
|
':nth-of-type(6n)::after': {
|
|
56
68
|
flexBasis: '77%'
|
|
57
69
|
}
|
|
58
70
|
});
|
|
59
71
|
const customWidthStyles = css({
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
73
|
'::after': {
|
|
61
74
|
flexBasis: 'var(--width)'
|
|
62
75
|
}
|
|
63
76
|
});
|
|
64
77
|
const beforeElementStyles = css({
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
65
79
|
'::before': {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
81
|
width: skeletonItemElemSize,
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
67
83
|
height: skeletonItemElemSize,
|
|
68
84
|
flexShrink: 0,
|
|
69
85
|
backgroundColor: skeletonColor,
|
|
70
86
|
content: '""',
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
88
|
marginInlineEnd: itemElemSpacing + itemElemSkeletonOffset,
|
|
72
89
|
marginInlineStart: "var(--ds-space-025, 2px)"
|
|
73
90
|
}
|
|
74
91
|
});
|
|
75
92
|
const avatarStyles = css({
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
76
94
|
'::before': {
|
|
77
95
|
borderRadius: '100%'
|
|
78
96
|
}
|
|
79
97
|
});
|
|
80
98
|
const iconStyles = css({
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
81
100
|
'::before': {
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
82
102
|
borderRadius
|
|
83
103
|
}
|
|
84
104
|
});
|
|
@@ -101,7 +121,9 @@ const SkeletonItem = ({
|
|
|
101
121
|
}) => {
|
|
102
122
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
103
123
|
);
|
|
104
|
-
const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
124
|
+
const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
126
|
+
css(cssFn());
|
|
105
127
|
return jsx(SkeletonShimmer, {
|
|
106
128
|
isShimmering: isShimmering
|
|
107
129
|
}, ({
|
|
@@ -113,6 +135,7 @@ const SkeletonItem = ({
|
|
|
113
135
|
,
|
|
114
136
|
style: {
|
|
115
137
|
'--width': width
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
116
139
|
},
|
|
117
140
|
css: [skeletonStyles, (hasAvatar || hasIcon) && beforeElementStyles, hasAvatar && avatarStyles, hasIcon && iconStyles, width ? customWidthStyles : defaultWidthStyles,
|
|
118
141
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
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 { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
5
9
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context';
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
*/
|
|
2
5
|
/** @jsx jsx */
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
7
|
import { jsx } from '@emotion/react';
|
|
4
8
|
import MenuGroup from './menu-group';
|
|
5
9
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
*/
|
|
3
6
|
/** @jsx jsx */
|
|
4
7
|
import { Children, forwardRef, Fragment } 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 { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -27,22 +32,31 @@ const VAR_SEPARATOR_COLOR = '--ds-menu-seperator-color';
|
|
|
27
32
|
const sectionStyles = css({
|
|
28
33
|
'&::before, &::after': {
|
|
29
34
|
display: 'block',
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
36
|
height: sectionPaddingTopBottom,
|
|
31
37
|
content: '""'
|
|
32
38
|
},
|
|
33
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
40
|
'& [data-ds--menu--heading-item]': {
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
35
42
|
marginBlockEnd: itemHeadingBottomMargin,
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
44
|
marginBlockStart: itemHeadingTopMargin,
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
37
46
|
'&:first-of-type': {
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
48
|
marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
|
|
39
49
|
}
|
|
40
50
|
},
|
|
41
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
52
|
'& [data-ds--menu--skeleton-heading-item]': {
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
43
54
|
marginBlockEnd: skeletonHeadingBottomMargin,
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
44
56
|
marginBlockStart: skeletonHeadingTopMargin,
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
45
58
|
'&:first-of-type': {
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
46
60
|
marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
|
|
47
61
|
}
|
|
48
62
|
},
|
|
@@ -69,7 +83,7 @@ const thinSeparatorStyles = css({
|
|
|
69
83
|
});
|
|
70
84
|
const noSeparatorStyles = css({
|
|
71
85
|
// this is to ensure that adjacent sections without separators don't get additional margins.
|
|
72
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
86
|
+
// 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
|
|
73
87
|
'[data-section] + &': {
|
|
74
88
|
marginBlockStart: -6
|
|
75
89
|
}
|
|
@@ -133,7 +147,9 @@ const Section = /*#__PURE__*/forwardRef(({
|
|
|
133
147
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
134
148
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
135
149
|
,
|
|
136
|
-
css: [sectionStyles, isScrollable ? scrollableStyles : unscrollableStyles, hasSeparator ?
|
|
150
|
+
css: [sectionStyles, isScrollable ? scrollableStyles : unscrollableStyles, hasSeparator ?
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
152
|
+
getBooleanFF('platform.design-system-team.section-1px-seperator-borders') ? thinSeparatorStyles : thickSeparatorStyles : noSeparatorStyles],
|
|
137
153
|
"aria-label": title,
|
|
138
154
|
"aria-labelledby": titleId,
|
|
139
155
|
"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';
|
|
@@ -66,6 +71,7 @@ var primitiveStyles = css({
|
|
|
66
71
|
outline: 0,
|
|
67
72
|
textDecoration: 'none',
|
|
68
73
|
userSelect: 'none',
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
69
75
|
'&::-moz-focus-inner': {
|
|
70
76
|
border: 0
|
|
71
77
|
},
|
|
@@ -110,6 +116,7 @@ var unselectedStyles = css({
|
|
|
110
116
|
});
|
|
111
117
|
var disabledStyles = css({
|
|
112
118
|
cursor: 'not-allowed',
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
113
120
|
'&, :hover, :active': {
|
|
114
121
|
backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
|
|
115
122
|
color: "var(--ds-text-disabled, ".concat(N200, ")")
|
|
@@ -217,14 +224,18 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
|
|
|
217
224
|
}, iconBefore), title && jsx(Stack, {
|
|
218
225
|
alignBlock: "center",
|
|
219
226
|
grow: "fill",
|
|
220
|
-
xcss:
|
|
227
|
+
xcss:
|
|
228
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
229
|
+
getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? contentStyles : [contentStyles, baseContentStyles]
|
|
221
230
|
}, renderTitle('span', {
|
|
222
231
|
children: title,
|
|
223
232
|
className: cn(getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? titleStyles : undefined, shouldTitleWrap ? wordBreakStyles : truncateStyles),
|
|
224
233
|
'data-item-title': true
|
|
225
234
|
}), description && jsx("span", {
|
|
226
235
|
"data-item-description": true,
|
|
227
|
-
css: [descriptionStyles,
|
|
236
|
+
css: [descriptionStyles,
|
|
237
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
238
|
+
getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedDescriptionStyles : baseDescriptionStyles, isDisabled && disabledDescriptionStyles, shouldDescriptionWrap ? wordBreakStyles : truncateStyles]
|
|
228
239
|
}, description)), iconAfter && jsx("span", {
|
|
229
240
|
"data-item-elem-after": true,
|
|
230
241
|
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 @@ var shimmerKeyframes = keyframes({
|
|
|
24
28
|
* Please update both.
|
|
25
29
|
*/
|
|
26
30
|
var 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,8 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "cssFn", "description", "iconAfter", "iconBefore", "isDisabled", "isSelected", "onClick", "testId", "overrides", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
import { forwardRef, memo } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
11
|
import { jsx } from '@emotion/react';
|
|
7
12
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
8
13
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["component", "cssFn", "isDisabled", "isSelected", "onClick", "testId", "children", "description", "iconAfter", "iconBefore", "overrides", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
|
|
6
9
|
import { forwardRef, memo } from 'react';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
12
|
import { css, jsx } from '@emotion/react';
|
|
8
13
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
9
14
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -64,9 +69,11 @@ var CustomItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
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: isDisabled,
|
|
71
78
|
isSelected: isSelected
|
|
72
79
|
})),
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "testId", "headingLevel", "id", "cssFn", "className"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
import { memo } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
11
|
import { css, jsx } from '@emotion/react';
|
|
7
12
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
8
13
|
import noop from '@atlaskit/ds-lib/noop';
|
|
@@ -18,8 +23,10 @@ var headingStyles = css({
|
|
|
18
23
|
textTransform: 'uppercase'
|
|
19
24
|
});
|
|
20
25
|
var baseHeadingStyles = css({
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
27
|
fontSize: itemHeadingFontSize,
|
|
22
28
|
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
30
|
lineHeight: itemHeadingContentHeight / itemHeadingFontSize
|
|
24
31
|
});
|
|
25
32
|
var tokenizedHeadingStyles = css({
|
|
@@ -46,9 +53,13 @@ var HeadingItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
46
53
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
54
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
48
55
|
);
|
|
49
|
-
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
56
|
+
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
|
+
css(cssFn(undefined));
|
|
50
59
|
return jsx("div", _extends({
|
|
51
|
-
css: [headingStyles,
|
|
60
|
+
css: [headingStyles,
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
62
|
+
getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedHeadingStyles : baseHeadingStyles,
|
|
52
63
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
53
64
|
UNSAFE_overrides],
|
|
54
65
|
role: "heading",
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "href", "cssFn", "description", "iconAfter", "iconBefore", "isDisabled", "isSelected", "onClick", "testId", "overrides", "onMouseDown", "shouldTitleWrap", "shouldDescriptionWrap", "className"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
5
8
|
import { forwardRef, memo } from 'react';
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
11
|
import { jsx } from '@emotion/react';
|
|
7
12
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
8
13
|
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
|
var 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 @@ var skeletonStyles = css({
|
|
|
19
24
|
}
|
|
20
25
|
});
|
|
21
26
|
var 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
|
var 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
|
}
|
|
@@ -46,7 +53,9 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
|
|
|
46
53
|
cssFn = _ref$cssFn === void 0 ? noop : _ref$cssFn;
|
|
47
54
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
48
55
|
);
|
|
49
|
-
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
56
|
+
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
|
+
css(cssFn(undefined));
|
|
50
59
|
return jsx(SkeletonShimmer, {
|
|
51
60
|
isShimmering: isShimmering
|
|
52
61
|
}, function (_ref2) {
|
|
@@ -58,6 +67,7 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
|
|
|
58
67
|
,
|
|
59
68
|
style: {
|
|
60
69
|
'--width': width
|
|
70
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
61
71
|
},
|
|
62
72
|
css: [skeletonStyles, width ? customWidthStyles : defaultWidthStyles,
|
|
63
73
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -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';
|
|
@@ -21,10 +25,12 @@ var skeletonContentHeight = 9;
|
|
|
21
25
|
var skeletonColor = "var(--ds-skeleton, ".concat(N20A, ")");
|
|
22
26
|
var skeletonStyles = css({
|
|
23
27
|
display: 'flex',
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
29
|
minHeight: itemMinHeight,
|
|
25
30
|
padding: "0 ".concat("var(--ds-space-250, 20px)"),
|
|
26
31
|
alignItems: 'center',
|
|
27
32
|
pointerEvents: 'none',
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
28
34
|
'::after': {
|
|
29
35
|
height: skeletonContentHeight,
|
|
30
36
|
backgroundColor: skeletonColor,
|
|
@@ -37,48 +43,62 @@ var skeletonStyles = css({
|
|
|
37
43
|
}
|
|
38
44
|
});
|
|
39
45
|
var defaultWidthStyles = css({
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
40
47
|
':nth-of-type(1n)::after': {
|
|
41
48
|
flexBasis: '70%'
|
|
42
49
|
},
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
43
51
|
':nth-of-type(2n)::after': {
|
|
44
52
|
flexBasis: '50%'
|
|
45
53
|
},
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
46
55
|
':nth-of-type(3n)::after': {
|
|
47
56
|
flexBasis: '60%'
|
|
48
57
|
},
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
49
59
|
':nth-of-type(4n)::after': {
|
|
50
60
|
flexBasis: '90%'
|
|
51
61
|
},
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
52
63
|
':nth-of-type(5n)::after': {
|
|
53
64
|
flexBasis: '35%'
|
|
54
65
|
},
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
55
67
|
':nth-of-type(6n)::after': {
|
|
56
68
|
flexBasis: '77%'
|
|
57
69
|
}
|
|
58
70
|
});
|
|
59
71
|
var customWidthStyles = css({
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
60
73
|
'::after': {
|
|
61
74
|
flexBasis: 'var(--width)'
|
|
62
75
|
}
|
|
63
76
|
});
|
|
64
77
|
var beforeElementStyles = css({
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
65
79
|
'::before': {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
81
|
width: skeletonItemElemSize,
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
67
83
|
height: skeletonItemElemSize,
|
|
68
84
|
flexShrink: 0,
|
|
69
85
|
backgroundColor: skeletonColor,
|
|
70
86
|
content: '""',
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
88
|
marginInlineEnd: itemElemSpacing + itemElemSkeletonOffset,
|
|
72
89
|
marginInlineStart: "var(--ds-space-025, 2px)"
|
|
73
90
|
}
|
|
74
91
|
});
|
|
75
92
|
var avatarStyles = css({
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
76
94
|
'::before': {
|
|
77
95
|
borderRadius: '100%'
|
|
78
96
|
}
|
|
79
97
|
});
|
|
80
98
|
var iconStyles = css({
|
|
99
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
81
100
|
'::before': {
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
82
102
|
borderRadius: borderRadius
|
|
83
103
|
}
|
|
84
104
|
});
|
|
@@ -102,7 +122,9 @@ var SkeletonItem = function SkeletonItem(_ref) {
|
|
|
102
122
|
cssFn = _ref$cssFn === void 0 ? noop : _ref$cssFn;
|
|
103
123
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
104
124
|
);
|
|
105
|
-
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
125
|
+
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined :
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
127
|
+
css(cssFn());
|
|
106
128
|
return jsx(SkeletonShimmer, {
|
|
107
129
|
isShimmering: isShimmering
|
|
108
130
|
}, function (_ref2) {
|
|
@@ -114,6 +136,7 @@ var SkeletonItem = function SkeletonItem(_ref) {
|
|
|
114
136
|
,
|
|
115
137
|
style: {
|
|
116
138
|
'--width': width
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
117
140
|
},
|
|
118
141
|
css: [skeletonStyles, (hasAvatar || hasIcon) && beforeElementStyles, hasAvatar && avatarStyles, hasIcon && iconStyles, width ? customWidthStyles : defaultWidthStyles,
|
|
119
142
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["isLoading", "maxWidth", "minWidth", "minHeight", "maxHeight", "testId", "role", "spacing", "className"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
9
|
import { css, jsx } from '@emotion/react';
|
|
6
10
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
11
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from '../internal/components/menu-context';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["maxWidth", "minWidth"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
*/
|
|
4
7
|
/** @jsx jsx */
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
9
|
import { jsx } from '@emotion/react';
|
|
6
10
|
import MenuGroup from './menu-group';
|
|
7
11
|
|
|
@@ -2,8 +2,13 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["children", "overrides", "title", "titleId", "testId", "isScrollable", "hasSeparator", "id", "isList", "className"];
|
|
4
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage, @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
5
|
+
/**
|
|
6
|
+
* @jsxRuntime classic
|
|
7
|
+
*/
|
|
5
8
|
/** @jsx jsx */
|
|
6
9
|
import { Children, forwardRef, Fragment } from 'react';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
12
|
import { css, jsx } from '@emotion/react';
|
|
8
13
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
9
14
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -29,22 +34,31 @@ var VAR_SEPARATOR_COLOR = '--ds-menu-seperator-color';
|
|
|
29
34
|
var sectionStyles = css({
|
|
30
35
|
'&::before, &::after': {
|
|
31
36
|
display: 'block',
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
32
38
|
height: sectionPaddingTopBottom,
|
|
33
39
|
content: '""'
|
|
34
40
|
},
|
|
35
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
36
42
|
'& [data-ds--menu--heading-item]': {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
37
44
|
marginBlockEnd: itemHeadingBottomMargin,
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
38
46
|
marginBlockStart: itemHeadingTopMargin,
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
39
48
|
'&:first-of-type': {
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
50
|
marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
|
|
41
51
|
}
|
|
42
52
|
},
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
54
|
'& [data-ds--menu--skeleton-heading-item]': {
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
45
56
|
marginBlockEnd: skeletonHeadingBottomMargin,
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
46
58
|
marginBlockStart: skeletonHeadingTopMargin,
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
47
60
|
'&:first-of-type': {
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
62
|
marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
|
|
49
63
|
}
|
|
50
64
|
},
|
|
@@ -71,7 +85,7 @@ var thinSeparatorStyles = css({
|
|
|
71
85
|
});
|
|
72
86
|
var noSeparatorStyles = css({
|
|
73
87
|
// this is to ensure that adjacent sections without separators don't get additional margins.
|
|
74
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
88
|
+
// 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
|
|
75
89
|
'[data-section] + &': {
|
|
76
90
|
marginBlockStart: -6
|
|
77
91
|
}
|
|
@@ -133,7 +147,9 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
133
147
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
|
134
148
|
// We have made a deliberate choice to leave this behaviour as is.
|
|
135
149
|
,
|
|
136
|
-
css: [sectionStyles, isScrollable ? scrollableStyles : unscrollableStyles, hasSeparator ?
|
|
150
|
+
css: [sectionStyles, isScrollable ? scrollableStyles : unscrollableStyles, hasSeparator ?
|
|
151
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
152
|
+
getBooleanFF('platform.design-system-team.section-1px-seperator-borders') ? thinSeparatorStyles : thickSeparatorStyles : noSeparatorStyles],
|
|
137
153
|
"aria-label": title,
|
|
138
154
|
"aria-labelledby": titleId,
|
|
139
155
|
"data-testid": testId,
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
*/
|
|
1
4
|
/** @jsx jsx */
|
|
2
5
|
import { type ReactNode } from 'react';
|
|
3
6
|
import { jsx } from '@emotion/react';
|
|
@@ -20,5 +23,5 @@ type SkeletonShimmerProps = {
|
|
|
20
23
|
*
|
|
21
24
|
* @internal
|
|
22
25
|
*/
|
|
23
|
-
declare const SkeletonShimmer: ({ children, isShimmering
|
|
26
|
+
declare const SkeletonShimmer: ({ children, isShimmering }: SkeletonShimmerProps) => jsx.JSX.Element;
|
|
24
27
|
export default SkeletonShimmer;
|