@atlaskit/menu 2.2.1 → 2.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 +610 -596
- package/__perf__/custom.tsx +1 -1
- package/__perf__/utils/interaction-tasks.tsx +2 -2
- package/codemods/0.7.0-change-css-fn-prop.tsx +3 -2
- package/codemods/2.1.0-invalid-link-item-to-button-item.tsx +2 -1
- package/codemods/helpers/generic.tsx +4 -3
- package/dist/cjs/internal/components/menu-item-primitive.js +35 -25
- package/dist/cjs/menu-item/button-item.js +4 -1
- package/dist/cjs/menu-item/custom-item.js +4 -1
- package/dist/cjs/menu-item/heading-item.js +12 -5
- package/dist/cjs/menu-item/link-item.js +2 -0
- package/dist/cjs/menu-item/skeleton-heading-item.js +4 -1
- package/dist/cjs/menu-item/skeleton-item.js +4 -1
- package/dist/cjs/menu-section/menu-group.js +3 -1
- package/dist/cjs/menu-section/section.js +4 -0
- package/dist/es2019/internal/components/menu-item-primitive.js +34 -24
- package/dist/es2019/menu-item/button-item.js +4 -1
- package/dist/es2019/menu-item/custom-item.js +4 -1
- package/dist/es2019/menu-item/heading-item.js +12 -5
- package/dist/es2019/menu-item/link-item.js +2 -0
- package/dist/es2019/menu-item/skeleton-heading-item.js +4 -1
- package/dist/es2019/menu-item/skeleton-item.js +4 -1
- package/dist/es2019/menu-section/menu-group.js +3 -1
- package/dist/es2019/menu-section/section.js +4 -0
- package/dist/esm/internal/components/menu-item-primitive.js +34 -24
- package/dist/esm/menu-item/button-item.js +4 -1
- package/dist/esm/menu-item/custom-item.js +4 -1
- package/dist/esm/menu-item/heading-item.js +12 -5
- package/dist/esm/menu-item/link-item.js +2 -0
- package/dist/esm/menu-item/skeleton-heading-item.js +4 -1
- package/dist/esm/menu-item/skeleton-item.js +4 -1
- package/dist/esm/menu-section/menu-group.js +3 -1
- package/dist/esm/menu-section/section.js +4 -0
- package/dist/types/internal/components/skeleton-shimmer.d.ts +1 -1
- package/dist/types/types.d.ts +2 -2
- package/dist/types-ts4.5/internal/components/skeleton-shimmer.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +2 -2
- package/package.json +8 -7
|
@@ -4,7 +4,7 @@ import { ClassNames, css, jsx } from '@emotion/react';
|
|
|
4
4
|
import { propDeprecationWarning } from '@atlaskit/ds-lib/deprecation-warning';
|
|
5
5
|
import FocusRing from '@atlaskit/focus-ring';
|
|
6
6
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import Inline from '@atlaskit/primitives
|
|
7
|
+
import { Inline, Stack, xcss } from '@atlaskit/primitives';
|
|
8
8
|
import { N20, N200, N30 } from '@atlaskit/theme/colors';
|
|
9
9
|
import { SELECTION_STYLE_CONTEXT_DO_NOT_USE, SpacingContext } from './menu-context';
|
|
10
10
|
var defaultRender = function defaultRender(Component, props) {
|
|
@@ -19,29 +19,35 @@ var beforeAfterElementStyles = css({
|
|
|
19
19
|
justifyContent: 'center',
|
|
20
20
|
flexShrink: 0
|
|
21
21
|
});
|
|
22
|
-
var contentStyles =
|
|
23
|
-
display: 'flex',
|
|
24
|
-
justifyContent: 'center',
|
|
25
|
-
flexDirection: 'column',
|
|
26
|
-
flexGrow: 1,
|
|
27
|
-
lineHeight: "var(--ds-font-lineHeight-100, 16px)",
|
|
22
|
+
var contentStyles = xcss({
|
|
28
23
|
outline: 'none',
|
|
29
24
|
overflow: 'hidden',
|
|
30
25
|
textAlign: 'left'
|
|
31
26
|
});
|
|
27
|
+
var baseContentStyles = xcss({
|
|
28
|
+
lineHeight: "var(--ds-font-lineHeight-100, 16px)"
|
|
29
|
+
});
|
|
32
30
|
var truncateStyles = css({
|
|
33
31
|
display: 'block',
|
|
34
32
|
overflow: 'hidden',
|
|
35
33
|
textOverflow: 'ellipsis',
|
|
36
34
|
whiteSpace: 'nowrap'
|
|
37
35
|
});
|
|
36
|
+
var titleStyles = css({
|
|
37
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
38
|
+
});
|
|
38
39
|
var wordBreakStyles = css({
|
|
39
40
|
wordBreak: 'break-word'
|
|
40
41
|
});
|
|
41
42
|
var descriptionStyles = css({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")")
|
|
44
|
+
});
|
|
45
|
+
var baseDescriptionStyles = css({
|
|
46
|
+
fontSize: "var(--ds-font-size-075, 12px)",
|
|
47
|
+
marginBlockStart: "var(--ds-space-050, 4px)"
|
|
48
|
+
});
|
|
49
|
+
var tokenizedDescriptionStyles = css({
|
|
50
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
45
51
|
});
|
|
46
52
|
var disabledDescriptionStyles = css({
|
|
47
53
|
color: "var(--ds-text-disabled, ".concat(N200, ")")
|
|
@@ -57,7 +63,6 @@ var primitiveStyles = css({
|
|
|
57
63
|
margin: "var(--ds-space-0, 0px)",
|
|
58
64
|
alignItems: 'center',
|
|
59
65
|
border: 0,
|
|
60
|
-
fontSize: "var(--ds-font-size-100, 14px)",
|
|
61
66
|
outline: 0,
|
|
62
67
|
textDecoration: 'none',
|
|
63
68
|
userSelect: 'none',
|
|
@@ -68,6 +73,9 @@ var primitiveStyles = css({
|
|
|
68
73
|
textDecoration: 'none'
|
|
69
74
|
}
|
|
70
75
|
});
|
|
76
|
+
var primitiveBaseStyles = css({
|
|
77
|
+
fontSize: "var(--ds-font-size-100, 14px)"
|
|
78
|
+
});
|
|
71
79
|
var spacingMapStyles = {
|
|
72
80
|
cozy: css({
|
|
73
81
|
// 8 * 2 (16) + icon (24) === 40
|
|
@@ -111,23 +119,23 @@ var selectedBorderStyles = css({
|
|
|
111
119
|
'&::before': {
|
|
112
120
|
width: 2,
|
|
113
121
|
position: 'absolute',
|
|
114
|
-
top: 0,
|
|
115
|
-
bottom: 0,
|
|
116
|
-
left: 0,
|
|
117
122
|
background: "var(--ds-border-selected, transparent)",
|
|
118
|
-
content: '""'
|
|
123
|
+
content: '""',
|
|
124
|
+
insetBlockEnd: 0,
|
|
125
|
+
insetBlockStart: 0,
|
|
126
|
+
insetInlineStart: 0
|
|
119
127
|
}
|
|
120
128
|
});
|
|
121
129
|
var selectedNotchStyles = css({
|
|
122
130
|
'&::before': {
|
|
123
131
|
width: 4,
|
|
124
132
|
position: 'absolute',
|
|
125
|
-
top: "var(--ds-space-150, 12px)",
|
|
126
|
-
bottom: "var(--ds-space-150, 12px)",
|
|
127
|
-
left: 0,
|
|
128
133
|
background: "var(--ds-border-selected, transparent)",
|
|
129
134
|
borderRadius: "0 ".concat("var(--ds-border-radius, 4px)", " ", "var(--ds-border-radius, 4px)", " 0"),
|
|
130
|
-
content: '""'
|
|
135
|
+
content: '""',
|
|
136
|
+
insetBlockEnd: "var(--ds-space-150, 12px)",
|
|
137
|
+
insetBlockStart: "var(--ds-space-150, 12px)",
|
|
138
|
+
insetInlineStart: 0
|
|
131
139
|
}
|
|
132
140
|
});
|
|
133
141
|
var selectedStyles = css({
|
|
@@ -194,7 +202,7 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
|
|
|
194
202
|
return jsx(FocusRing, {
|
|
195
203
|
isInset: true
|
|
196
204
|
}, children({
|
|
197
|
-
className: cx([cn([positionRelativeStyles, primitiveStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
|
|
205
|
+
className: cx([cn([positionRelativeStyles, primitiveStyles, getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? undefined : primitiveBaseStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
|
|
198
206
|
children: jsx(Inline, {
|
|
199
207
|
as: "span",
|
|
200
208
|
spread: "space-between",
|
|
@@ -206,15 +214,17 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
|
|
|
206
214
|
"data-item-elem-before": true,
|
|
207
215
|
css: beforeAfterElementStyles,
|
|
208
216
|
"data-testid": testId && "".concat(testId, "--icon-before")
|
|
209
|
-
}, iconBefore), title && jsx(
|
|
210
|
-
|
|
217
|
+
}, iconBefore), title && jsx(Stack, {
|
|
218
|
+
alignBlock: "center",
|
|
219
|
+
grow: "fill",
|
|
220
|
+
xcss: getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? contentStyles : [contentStyles, baseContentStyles]
|
|
211
221
|
}, renderTitle('span', {
|
|
212
222
|
children: title,
|
|
213
|
-
className: cn(shouldTitleWrap ? wordBreakStyles : truncateStyles),
|
|
223
|
+
className: cn(getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? titleStyles : undefined, shouldTitleWrap ? wordBreakStyles : truncateStyles),
|
|
214
224
|
'data-item-title': true
|
|
215
225
|
}), description && jsx("span", {
|
|
216
226
|
"data-item-description": true,
|
|
217
|
-
css: [descriptionStyles, isDisabled && disabledDescriptionStyles, shouldDescriptionWrap ? wordBreakStyles : truncateStyles]
|
|
227
|
+
css: [descriptionStyles, getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedDescriptionStyles : baseDescriptionStyles, isDisabled && disabledDescriptionStyles, shouldDescriptionWrap ? wordBreakStyles : truncateStyles]
|
|
218
228
|
}, description)), iconAfter && jsx("span", {
|
|
219
229
|
"data-item-elem-after": true,
|
|
220
230
|
css: beforeAfterElementStyles,
|
|
@@ -43,7 +43,9 @@ function (props, ref) {
|
|
|
43
43
|
}
|
|
44
44
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
45
45
|
);
|
|
46
|
-
return jsx(MenuItemPrimitive
|
|
46
|
+
return jsx(MenuItemPrimitive
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
48
|
+
, _extends({
|
|
47
49
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
48
50
|
}, rest, {
|
|
49
51
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
@@ -69,6 +71,7 @@ function (props, ref) {
|
|
|
69
71
|
return jsx("button", _extends({
|
|
70
72
|
"data-testid": testId
|
|
71
73
|
}, rest, {
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
75
|
className: className,
|
|
73
76
|
ref: ref,
|
|
74
77
|
disabled: isDisabled,
|
|
@@ -49,7 +49,9 @@ var CustomItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
49
49
|
}
|
|
50
50
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
51
51
|
);
|
|
52
|
-
return jsx(MenuItemPrimitive
|
|
52
|
+
return jsx(MenuItemPrimitive
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
54
|
+
, _extends({
|
|
53
55
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
54
56
|
}, rest, {
|
|
55
57
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
@@ -75,6 +77,7 @@ var CustomItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
75
77
|
return jsx(Component, _extends({
|
|
76
78
|
"data-testid": testId
|
|
77
79
|
}, rest, {
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
78
81
|
className: className,
|
|
79
82
|
ref: ref,
|
|
80
83
|
draggable: false,
|
|
@@ -13,13 +13,18 @@ var itemHeadingContentHeight = headingSizes.h100.lineHeight;
|
|
|
13
13
|
var itemHeadingFontSize = headingSizes.h100.size;
|
|
14
14
|
var headingStyles = css({
|
|
15
15
|
color: "var(--ds-text-subtle, ".concat(N300, ")"),
|
|
16
|
-
fontSize: itemHeadingFontSize,
|
|
17
|
-
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
18
|
-
lineHeight: itemHeadingContentHeight / itemHeadingFontSize,
|
|
19
16
|
paddingBlock: "var(--ds-space-0, 0px)",
|
|
20
17
|
paddingInline: "var(--ds-space-200, 16px)",
|
|
21
18
|
textTransform: 'uppercase'
|
|
22
19
|
});
|
|
20
|
+
var baseHeadingStyles = css({
|
|
21
|
+
fontSize: itemHeadingFontSize,
|
|
22
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
23
|
+
lineHeight: itemHeadingContentHeight / itemHeadingFontSize
|
|
24
|
+
});
|
|
25
|
+
var tokenizedHeadingStyles = css({
|
|
26
|
+
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
27
|
+
});
|
|
23
28
|
|
|
24
29
|
/**
|
|
25
30
|
* __Heading item__
|
|
@@ -43,14 +48,16 @@ var HeadingItem = /*#__PURE__*/memo(function (_ref) {
|
|
|
43
48
|
);
|
|
44
49
|
var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : css(cssFn(undefined));
|
|
45
50
|
return jsx("div", _extends({
|
|
46
|
-
css: [headingStyles,
|
|
51
|
+
css: [headingStyles, getBooleanFF('platform.design-system-team.menu-tokenised-typography-styles') ? tokenizedHeadingStyles : baseHeadingStyles,
|
|
47
52
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
48
53
|
UNSAFE_overrides],
|
|
49
54
|
role: "heading",
|
|
50
55
|
"aria-level": headingLevel,
|
|
51
56
|
"data-testid": testId,
|
|
52
57
|
"data-ds--menu--heading-item": true,
|
|
53
|
-
id: id
|
|
58
|
+
id: id
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
60
|
+
,
|
|
54
61
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
55
62
|
}, rest), children);
|
|
56
63
|
});
|
|
@@ -49,6 +49,7 @@ function (props, ref) {
|
|
|
49
49
|
propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
|
|
50
50
|
);
|
|
51
51
|
return jsx(MenuItemPrimitive, _extends({}, rest, {
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
52
53
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
53
54
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
54
55
|
,
|
|
@@ -74,6 +75,7 @@ function (props, ref) {
|
|
|
74
75
|
return jsx("a", _extends({
|
|
75
76
|
"data-testid": testId
|
|
76
77
|
}, rest, {
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
77
79
|
className: className,
|
|
78
80
|
href: isDisabled ? undefined : href,
|
|
79
81
|
draggable: false
|
|
@@ -52,7 +52,10 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
|
|
|
52
52
|
}, function (_ref2) {
|
|
53
53
|
var className = _ref2.className;
|
|
54
54
|
return jsx("div", {
|
|
55
|
-
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
56
|
+
className: className
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
58
|
+
,
|
|
56
59
|
style: {
|
|
57
60
|
'--width': width
|
|
58
61
|
},
|
|
@@ -108,7 +108,10 @@ var SkeletonItem = function SkeletonItem(_ref) {
|
|
|
108
108
|
}, function (_ref2) {
|
|
109
109
|
var className = _ref2.className;
|
|
110
110
|
return jsx("div", {
|
|
111
|
-
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
112
|
+
className: className
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
114
|
+
,
|
|
112
115
|
style: {
|
|
113
116
|
'--width': width
|
|
114
117
|
},
|
|
@@ -46,7 +46,9 @@ var MenuGroup = function MenuGroup(_ref) {
|
|
|
46
46
|
},
|
|
47
47
|
css: baseStyles,
|
|
48
48
|
"data-testid": testId,
|
|
49
|
-
role: role
|
|
49
|
+
role: role
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
51
|
+
,
|
|
50
52
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
|
|
51
53
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
52
54
|
}, rest))));
|
|
@@ -102,11 +102,14 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
102
102
|
var UNSAFE_headingOverrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : overrides && overrides.HeadingItem && overrides.HeadingItem.cssFn;
|
|
103
103
|
var content = isList ? jsx("ul", {
|
|
104
104
|
style: {
|
|
105
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
105
106
|
margin: 0,
|
|
107
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
106
108
|
padding: 0
|
|
107
109
|
}
|
|
108
110
|
}, Children.map(Children.toArray(children), function (child, index) {
|
|
109
111
|
return jsx("li", {
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
110
113
|
style: {
|
|
111
114
|
listStyleType: 'none',
|
|
112
115
|
margin: 0,
|
|
@@ -123,6 +126,7 @@ var Section = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
123
126
|
"aria-hidden": true
|
|
124
127
|
}, title), content) : jsx(Fragment, null, content);
|
|
125
128
|
return jsx("div", _extends({}, rest, {
|
|
129
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
126
130
|
className: getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className,
|
|
127
131
|
id: id
|
|
128
132
|
// NOTE: Firefox allows elements that have "overflow: auto" to gain focus (as if it had tab-index="0")
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentType, PropsWithChildren, ReactNode, Ref } from 'react';
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
1
|
+
import { type ComponentType, type PropsWithChildren, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type CSSObject } from '@emotion/react';
|
|
3
3
|
import type { SpacingMode } from './internal/components/menu-context';
|
|
4
4
|
export interface RenderFunction<TProps = {}> {
|
|
5
5
|
(Component: ComponentType | string, props: TProps): React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentType, PropsWithChildren, ReactNode, Ref } from 'react';
|
|
2
|
-
import { CSSObject } from '@emotion/react';
|
|
1
|
+
import { type ComponentType, type PropsWithChildren, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type CSSObject } from '@emotion/react';
|
|
3
3
|
import type { SpacingMode } from './internal/components/menu-context';
|
|
4
4
|
export interface RenderFunction<TProps = {}> {
|
|
5
5
|
(Component: ComponentType | string, props: TProps): React.ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/menu",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "A list of options to help users navigate, or perform actions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@atlaskit/ds-lib": "^2.3.0",
|
|
47
47
|
"@atlaskit/focus-ring": "^1.4.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
49
|
-
"@atlaskit/primitives": "^6.
|
|
50
|
-
"@atlaskit/theme": "^12.
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
49
|
+
"@atlaskit/primitives": "^6.4.0",
|
|
50
|
+
"@atlaskit/theme": "^12.8.0",
|
|
51
|
+
"@atlaskit/tokens": "^1.49.0",
|
|
52
52
|
"@babel/runtime": "^7.0.0",
|
|
53
53
|
"@emotion/react": "^11.7.1"
|
|
54
54
|
},
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"@af/integration-testing": "*",
|
|
62
62
|
"@af/visual-regression": "*",
|
|
63
63
|
"@atlaskit/visual-regression": "*",
|
|
64
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
65
64
|
"@atlassian/feature-flags-test-utils": "*",
|
|
66
65
|
"@emotion/jest": "^11.8.0",
|
|
67
66
|
"@testing-library/dom": "^8.17.1",
|
|
@@ -126,8 +125,10 @@
|
|
|
126
125
|
},
|
|
127
126
|
"platform.design-system-team.section-1px-seperator-borders": {
|
|
128
127
|
"type": "boolean"
|
|
128
|
+
},
|
|
129
|
+
"platform.design-system-team.menu-tokenised-typography-styles": {
|
|
130
|
+
"type": "boolean"
|
|
129
131
|
}
|
|
130
132
|
},
|
|
131
|
-
"homepage": "https://atlassian.design/components/menu/"
|
|
132
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
133
|
+
"homepage": "https://atlassian.design/components/menu/"
|
|
133
134
|
}
|