@atlaskit/menu 1.11.0 → 2.0.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +102 -76
  2. package/dist/cjs/internal/components/menu-context.js +2 -4
  3. package/dist/cjs/internal/components/menu-item-primitive.js +13 -14
  4. package/dist/cjs/internal/components/skeleton-shimmer.js +1 -2
  5. package/dist/cjs/menu-item/button-item.js +2 -3
  6. package/dist/cjs/menu-item/custom-item.js +2 -3
  7. package/dist/cjs/menu-item/heading-item.js +2 -3
  8. package/dist/cjs/menu-item/link-item.js +2 -3
  9. package/dist/cjs/menu-item/skeleton-heading-item.js +2 -3
  10. package/dist/cjs/menu-item/skeleton-item.js +9 -13
  11. package/dist/cjs/menu-section/menu-group.js +1 -2
  12. package/dist/cjs/menu-section/popup-menu-group.js +1 -2
  13. package/dist/cjs/menu-section/section.js +10 -11
  14. package/dist/es2019/internal/components/menu-item-primitive.js +12 -12
  15. package/dist/es2019/menu-item/button-item.js +1 -1
  16. package/dist/es2019/menu-item/custom-item.js +1 -1
  17. package/dist/es2019/menu-item/heading-item.js +1 -1
  18. package/dist/es2019/menu-item/link-item.js +1 -1
  19. package/dist/es2019/menu-item/skeleton-heading-item.js +1 -1
  20. package/dist/es2019/menu-item/skeleton-item.js +8 -11
  21. package/dist/es2019/menu-section/section.js +9 -9
  22. package/dist/esm/internal/components/menu-item-primitive.js +12 -12
  23. package/dist/esm/menu-item/button-item.js +1 -1
  24. package/dist/esm/menu-item/custom-item.js +1 -1
  25. package/dist/esm/menu-item/heading-item.js +1 -1
  26. package/dist/esm/menu-item/link-item.js +1 -1
  27. package/dist/esm/menu-item/skeleton-heading-item.js +1 -1
  28. package/dist/esm/menu-item/skeleton-item.js +8 -11
  29. package/dist/esm/menu-section/section.js +9 -9
  30. package/package.json +1 -4
  31. package/dist/types-ts4.5/entry-points/menu-item/button-item.d.ts +0 -1
  32. package/dist/types-ts4.5/entry-points/menu-item/custom-item.d.ts +0 -1
  33. package/dist/types-ts4.5/entry-points/menu-item/heading-item.d.ts +0 -1
  34. package/dist/types-ts4.5/entry-points/menu-item/link-item.d.ts +0 -1
  35. package/dist/types-ts4.5/entry-points/menu-item/skeleton-heading-item.d.ts +0 -1
  36. package/dist/types-ts4.5/entry-points/menu-item/skeleton-item.d.ts +0 -1
  37. package/dist/types-ts4.5/entry-points/menu-section/menu-group.d.ts +0 -1
  38. package/dist/types-ts4.5/entry-points/menu-section/popup-menu-group.d.ts +0 -1
  39. package/dist/types-ts4.5/entry-points/menu-section/section.d.ts +0 -1
  40. package/dist/types-ts4.5/index.d.ts +0 -11
  41. package/dist/types-ts4.5/internal/components/menu-context.d.ts +0 -18
  42. package/dist/types-ts4.5/internal/components/menu-item-primitive.d.ts +0 -18
  43. package/dist/types-ts4.5/internal/components/skeleton-shimmer.d.ts +0 -24
  44. package/dist/types-ts4.5/menu-item/button-item.d.ts +0 -12
  45. package/dist/types-ts4.5/menu-item/custom-item.d.ts +0 -18
  46. package/dist/types-ts4.5/menu-item/heading-item.d.ts +0 -13
  47. package/dist/types-ts4.5/menu-item/link-item.d.ts +0 -12
  48. package/dist/types-ts4.5/menu-item/skeleton-heading-item.d.ts +0 -12
  49. package/dist/types-ts4.5/menu-item/skeleton-item.d.ts +0 -12
  50. package/dist/types-ts4.5/menu-section/menu-group.d.ts +0 -13
  51. package/dist/types-ts4.5/menu-section/popup-menu-group.d.ts +0 -8
  52. package/dist/types-ts4.5/menu-section/section.d.ts +0 -12
  53. package/dist/types-ts4.5/types.d.ts +0 -396
  54. package/tmp/api-report-tmp.d.ts +0 -222
@@ -59,9 +59,9 @@ var wordBreakStyles = (0, _react2.css)({
59
59
  wordBreak: 'break-word'
60
60
  });
61
61
  var descriptionStyles = (0, _react2.css)({
62
- marginTop: "var(--ds-space-050, 4px)",
63
62
  color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
64
- fontSize: "var(--ds-font-size-075, 12px)"
63
+ fontSize: "var(--ds-font-size-075, 12px)",
64
+ marginBlockStart: "var(--ds-space-050, 4px)"
65
65
  });
66
66
  var disabledDescriptionStyles = (0, _react2.css)({
67
67
  color: "var(--ds-text-disabled, ".concat(_colors.N200, ")")
@@ -131,23 +131,23 @@ var selectedBorderStyles = (0, _react2.css)({
131
131
  '&::before': {
132
132
  width: 2,
133
133
  position: 'absolute',
134
- top: 0,
135
- bottom: 0,
136
- left: 0,
137
134
  background: "var(--ds-border-selected, transparent)",
138
- content: '""'
135
+ content: '""',
136
+ insetBlockEnd: 0,
137
+ insetBlockStart: 0,
138
+ insetInlineStart: 0
139
139
  }
140
140
  });
141
141
  var selectedNotchStyles = (0, _react2.css)({
142
142
  '&::before': {
143
143
  width: 4,
144
144
  position: 'absolute',
145
- top: "var(--ds-space-150, 12px)",
146
- bottom: "var(--ds-space-150, 12px)",
147
- left: 0,
148
145
  background: "var(--ds-border-selected, transparent)",
149
146
  borderRadius: "0 ".concat("var(--ds-border-radius, 4px)", " ", "var(--ds-border-radius, 4px)", " 0"),
150
- content: '""'
147
+ content: '""',
148
+ insetBlockEnd: "var(--ds-space-150, 12px)",
149
+ insetBlockStart: "var(--ds-space-150, 12px)",
150
+ insetInlineStart: 0
151
151
  }
152
152
  });
153
153
  var selectedStyles = (0, _react2.css)({
@@ -201,7 +201,7 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
201
201
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
202
202
  _ref$isSelected = _ref.isSelected,
203
203
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected;
204
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
204
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
205
205
  );
206
206
 
207
207
  var spacing = (0, _react.useContext)(_menuContext.SpacingContext);
@@ -214,7 +214,7 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
214
214
  return (0, _react2.jsx)(_focusRing.default, {
215
215
  isInset: true
216
216
  }, children({
217
- className: cx([cn([(0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-selected-state-change_0see9') && positionRelativeStyles, primitiveStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.menu-selected-state-change_0see9') && [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
217
+ className: cx([cn([positionRelativeStyles, primitiveStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
218
218
  children: (0, _react2.jsx)(_inline.default, {
219
219
  as: "span",
220
220
  spread: "space-between",
@@ -240,5 +240,4 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
240
240
  }));
241
241
  });
242
242
  };
243
- var _default = MenuItemPrimitive;
244
- exports.default = _default;
243
+ var _default = exports.default = MenuItemPrimitive;
@@ -64,5 +64,4 @@ var SkeletonShimmer = function SkeletonShimmer(_ref) {
64
64
  });
65
65
  });
66
66
  };
67
- var _default = SkeletonShimmer;
68
- exports.default = _default;
67
+ var _default = exports.default = SkeletonShimmer;
@@ -48,7 +48,7 @@ function (props, ref) {
48
48
  if (!children) {
49
49
  return null;
50
50
  }
51
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
51
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
52
52
  );
53
53
 
54
54
  return (0, _react2.jsx)(_menuItemPrimitive.default, (0, _extends2.default)({
@@ -85,5 +85,4 @@ function (props, ref) {
85
85
  }), children);
86
86
  });
87
87
  }));
88
- var _default = ButtonItem;
89
- exports.default = _default;
88
+ var _default = exports.default = ButtonItem;
@@ -53,7 +53,7 @@ var CustomItem = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardR
53
53
  if (!Component) {
54
54
  return null;
55
55
  }
56
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
56
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
57
57
  );
58
58
 
59
59
  return (0, _react2.jsx)(_menuItemPrimitive.default, (0, _extends2.default)({
@@ -94,5 +94,4 @@ var CustomItem = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardR
94
94
  })
95
95
  // Dirty hack to get generics working with forward ref [2/2]
96
96
  );
97
- var _default = CustomItem;
98
- exports.default = _default;
97
+ var _default = exports.default = CustomItem;
@@ -44,7 +44,7 @@ var HeadingItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
44
44
  cssFn = _ref$cssFn === void 0 ? _noop.default : _ref$cssFn,
45
45
  UNSAFE_className = _ref.className,
46
46
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
47
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
48
48
  );
49
49
 
50
50
  var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : (0, _react2.css)(cssFn(undefined));
@@ -58,5 +58,4 @@ var HeadingItem = /*#__PURE__*/(0, _react.memo)(function (_ref) {
58
58
  className: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : UNSAFE_className
59
59
  }, rest), children);
60
60
  });
61
- var _default = HeadingItem;
62
- exports.default = _default;
61
+ var _default = exports.default = HeadingItem;
@@ -53,7 +53,7 @@ function (props, ref) {
53
53
  if (!children) {
54
54
  return null;
55
55
  }
56
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
56
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
57
57
  );
58
58
 
59
59
  return (0, _react2.jsx)(_menuItemPrimitive.default, (0, _extends2.default)({}, rest, {
@@ -93,5 +93,4 @@ function (props, ref) {
93
93
  }), children);
94
94
  });
95
95
  }));
96
- var _default = LinkItem;
97
- exports.default = _default;
96
+ var _default = exports.default = LinkItem;
@@ -51,7 +51,7 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
51
51
  width = _ref.width,
52
52
  _ref$cssFn = _ref.cssFn,
53
53
  cssFn = _ref$cssFn === void 0 ? _noop.default : _ref$cssFn;
54
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
54
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
55
55
  );
56
56
 
57
57
  var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : (0, _react.css)(cssFn(undefined));
@@ -72,5 +72,4 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
72
72
  });
73
73
  });
74
74
  };
75
- var _default = SkeletonHeadingItem;
76
- exports.default = _default;
75
+ var _default = exports.default = SkeletonHeadingItem;
@@ -32,14 +32,13 @@ var skeletonStyles = (0, _react.css)({
32
32
  pointerEvents: 'none',
33
33
  '::after': {
34
34
  height: skeletonContentHeight,
35
+ backgroundColor: skeletonColor,
36
+ borderRadius: skeletonTextBorderRadius,
37
+ content: '""',
35
38
  // This is a little bespoke but we need to push everything down 1px
36
39
  // because the skeleton content should align to the bottom of the text.
37
40
  // Confirm VR test failures before accepting a change.
38
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
39
- marginTop: 1,
40
- backgroundColor: skeletonColor,
41
- borderRadius: skeletonTextBorderRadius,
42
- content: '""'
41
+ marginBlockStart: 1
43
42
  }
44
43
  });
45
44
  var defaultWidthStyles = (0, _react.css)({
@@ -71,13 +70,11 @@ var beforeElementStyles = (0, _react.css)({
71
70
  '::before': {
72
71
  width: skeletonItemElemSize,
73
72
  height: skeletonItemElemSize,
74
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
75
- marginRight: itemElemSpacing + itemElemSkeletonOffset,
76
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
77
- marginLeft: itemElemSkeletonOffset,
78
73
  flexShrink: 0,
79
74
  backgroundColor: skeletonColor,
80
- content: '""'
75
+ content: '""',
76
+ marginInlineEnd: itemElemSpacing + itemElemSkeletonOffset,
77
+ marginInlineStart: "var(--ds-space-025, 2px)"
81
78
  }
82
79
  });
83
80
  var avatarStyles = (0, _react.css)({
@@ -108,7 +105,7 @@ var SkeletonItem = function SkeletonItem(_ref) {
108
105
  width = _ref.width,
109
106
  _ref$cssFn = _ref.cssFn,
110
107
  cssFn = _ref$cssFn === void 0 ? _noop.default : _ref$cssFn;
111
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
108
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'cssFn', cssFn !== _noop.default, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
112
109
  );
113
110
 
114
111
  var UNSAFE_overrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : (0, _react.css)(cssFn());
@@ -128,5 +125,4 @@ var SkeletonItem = function SkeletonItem(_ref) {
128
125
  });
129
126
  });
130
127
  };
131
- var _default = SkeletonItem;
132
- exports.default = _default;
128
+ var _default = exports.default = SkeletonItem;
@@ -58,5 +58,4 @@ var MenuGroup = function MenuGroup(_ref) {
58
58
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
59
59
  }, rest))));
60
60
  };
61
- var _default = MenuGroup;
62
- exports.default = _default;
61
+ var _default = exports.default = MenuGroup;
@@ -28,5 +28,4 @@ var PopupMenuGroup = function PopupMenuGroup(_ref) {
28
28
  }, rest))
29
29
  );
30
30
  };
31
- var _default = PopupMenuGroup;
32
- exports.default = _default;
31
+ var _default = exports.default = PopupMenuGroup;
@@ -41,18 +41,18 @@ var sectionStyles = (0, _react2.css)({
41
41
  },
42
42
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
43
43
  '& [data-ds--menu--heading-item]': {
44
- marginTop: itemHeadingTopMargin,
45
- marginBottom: itemHeadingBottomMargin,
44
+ marginBlockEnd: itemHeadingBottomMargin,
45
+ marginBlockStart: itemHeadingTopMargin,
46
46
  '&:first-of-type': {
47
- marginTop: itemHeadingTopMargin - sectionPaddingTopBottom
47
+ marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
48
48
  }
49
49
  },
50
50
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
51
51
  '& [data-ds--menu--skeleton-heading-item]': {
52
- marginTop: skeletonHeadingTopMargin,
53
- marginBottom: skeletonHeadingBottomMargin,
52
+ marginBlockEnd: skeletonHeadingBottomMargin,
53
+ marginBlockStart: skeletonHeadingTopMargin,
54
54
  '&:first-of-type': {
55
- marginTop: skeletonHeadingTopMargin - sectionPaddingTopBottom
55
+ marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
56
56
  }
57
57
  },
58
58
  '&:focus': {
@@ -71,13 +71,13 @@ var unscrollableStyles = (0, _react2.css)({
71
71
  flexShrink: 0
72
72
  });
73
73
  var separatorStyles = (0, _react2.css)({
74
- borderTop: "2px solid var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30A, ")"), ")")
74
+ borderBlockStart: "2px solid var(".concat(VAR_SEPARATOR_COLOR, ", ", "var(--ds-border, ".concat(_colors.N30A, ")"), ")")
75
75
  });
76
76
  var noSeparatorStyles = (0, _react2.css)({
77
77
  // this is to ensure that adjacent sections without separators don't get additional margins.
78
78
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
79
79
  '[data-section] + &': {
80
- marginTop: -6
80
+ marginBlockStart: -6
81
81
  }
82
82
  });
83
83
 
@@ -101,7 +101,7 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
101
101
  isList = _ref$isList === void 0 ? false : _ref$isList,
102
102
  UNSAFE_className = _ref.className,
103
103
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
104
- (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu", 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
104
+ (0, _deprecationWarning.propDeprecationWarning)("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
105
105
  );
106
106
 
107
107
  var UNSAFE_headingOverrides = (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : overrides && overrides.HeadingItem && overrides.HeadingItem.cssFn;
@@ -141,5 +141,4 @@ var Section = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
141
141
  ref: ref
142
142
  }), childrenMarkup);
143
143
  });
144
- var _default = Section;
145
- exports.default = _default;
144
+ var _default = exports.default = Section;
@@ -48,9 +48,9 @@ const wordBreakStyles = css({
48
48
  wordBreak: 'break-word'
49
49
  });
50
50
  const descriptionStyles = css({
51
- marginTop: "var(--ds-space-050, 4px)",
52
51
  color: `var(--ds-text-subtlest, ${N200})`,
53
- fontSize: "var(--ds-font-size-075, 12px)"
52
+ fontSize: "var(--ds-font-size-075, 12px)",
53
+ marginBlockStart: "var(--ds-space-050, 4px)"
54
54
  });
55
55
  const disabledDescriptionStyles = css({
56
56
  color: `var(--ds-text-disabled, ${N200})`
@@ -120,23 +120,23 @@ const selectedBorderStyles = css({
120
120
  '&::before': {
121
121
  width: 2,
122
122
  position: 'absolute',
123
- top: 0,
124
- bottom: 0,
125
- left: 0,
126
123
  background: "var(--ds-border-selected, transparent)",
127
- content: '""'
124
+ content: '""',
125
+ insetBlockEnd: 0,
126
+ insetBlockStart: 0,
127
+ insetInlineStart: 0
128
128
  }
129
129
  });
130
130
  const selectedNotchStyles = css({
131
131
  '&::before': {
132
132
  width: 4,
133
133
  position: 'absolute',
134
- top: "var(--ds-space-150, 12px)",
135
- bottom: "var(--ds-space-150, 12px)",
136
- left: 0,
137
134
  background: "var(--ds-border-selected, transparent)",
138
135
  borderRadius: `0 ${"var(--ds-border-radius, 4px)"} ${"var(--ds-border-radius, 4px)"} 0`,
139
- content: '""'
136
+ content: '""',
137
+ insetBlockEnd: "var(--ds-space-150, 12px)",
138
+ insetBlockStart: "var(--ds-space-150, 12px)",
139
+ insetInlineStart: 0
140
140
  }
141
141
  });
142
142
  const selectedStyles = css({
@@ -187,7 +187,7 @@ const MenuItemPrimitive = ({
187
187
  isDisabled = false,
188
188
  isSelected = false
189
189
  }) => {
190
- propDeprecationWarning("@atlaskit/menu", 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
190
+ propDeprecationWarning("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
191
191
  );
192
192
 
193
193
  const spacing = useContext(SpacingContext);
@@ -201,7 +201,7 @@ const MenuItemPrimitive = ({
201
201
  return jsx(FocusRing, {
202
202
  isInset: true
203
203
  }, children({
204
- className: cx([cn([getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9') && positionRelativeStyles, primitiveStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9') && [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
204
+ 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
205
  children: jsx(Inline, {
206
206
  as: "span",
207
207
  spread: "space-between",
@@ -42,7 +42,7 @@ const ButtonItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(
42
42
  if (!children) {
43
43
  return null;
44
44
  }
45
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
45
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
46
46
  );
47
47
 
48
48
  return jsx(MenuItemPrimitive, _extends({
@@ -47,7 +47,7 @@ const CustomItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
47
47
  if (!Component) {
48
48
  return null;
49
49
  }
50
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
50
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
51
51
  );
52
52
 
53
53
  return jsx(MenuItemPrimitive, _extends({
@@ -39,7 +39,7 @@ const HeadingItem = /*#__PURE__*/memo(({
39
39
  className: UNSAFE_className,
40
40
  ...rest
41
41
  }) => {
42
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
42
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
43
43
  );
44
44
 
45
45
  const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : css(cssFn(undefined));
@@ -47,7 +47,7 @@ const LinkItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(
47
47
  if (!children) {
48
48
  return null;
49
49
  }
50
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
50
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
51
51
  );
52
52
 
53
53
  return jsx(MenuItemPrimitive, _extends({}, rest, {
@@ -43,7 +43,7 @@ const SkeletonHeadingItem = ({
43
43
  width,
44
44
  cssFn = noop
45
45
  }) => {
46
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
46
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
47
47
  );
48
48
 
49
49
  const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : css(cssFn(undefined));
@@ -27,14 +27,13 @@ const skeletonStyles = css({
27
27
  pointerEvents: 'none',
28
28
  '::after': {
29
29
  height: skeletonContentHeight,
30
+ backgroundColor: skeletonColor,
31
+ borderRadius: skeletonTextBorderRadius,
32
+ content: '""',
30
33
  // This is a little bespoke but we need to push everything down 1px
31
34
  // because the skeleton content should align to the bottom of the text.
32
35
  // Confirm VR test failures before accepting a change.
33
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
34
- marginTop: 1,
35
- backgroundColor: skeletonColor,
36
- borderRadius: skeletonTextBorderRadius,
37
- content: '""'
36
+ marginBlockStart: 1
38
37
  }
39
38
  });
40
39
  const defaultWidthStyles = css({
@@ -66,13 +65,11 @@ const beforeElementStyles = css({
66
65
  '::before': {
67
66
  width: skeletonItemElemSize,
68
67
  height: skeletonItemElemSize,
69
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
70
- marginRight: itemElemSpacing + itemElemSkeletonOffset,
71
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
72
- marginLeft: itemElemSkeletonOffset,
73
68
  flexShrink: 0,
74
69
  backgroundColor: skeletonColor,
75
- content: '""'
70
+ content: '""',
71
+ marginInlineEnd: itemElemSpacing + itemElemSkeletonOffset,
72
+ marginInlineStart: "var(--ds-space-025, 2px)"
76
73
  }
77
74
  });
78
75
  const avatarStyles = css({
@@ -102,7 +99,7 @@ const SkeletonItem = ({
102
99
  width,
103
100
  cssFn = noop
104
101
  }) => {
105
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
102
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
106
103
  );
107
104
 
108
105
  const UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : css(cssFn());
@@ -32,18 +32,18 @@ const sectionStyles = css({
32
32
  },
33
33
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
34
34
  '& [data-ds--menu--heading-item]': {
35
- marginTop: itemHeadingTopMargin,
36
- marginBottom: itemHeadingBottomMargin,
35
+ marginBlockEnd: itemHeadingBottomMargin,
36
+ marginBlockStart: itemHeadingTopMargin,
37
37
  '&:first-of-type': {
38
- marginTop: itemHeadingTopMargin - sectionPaddingTopBottom
38
+ marginBlockStart: itemHeadingTopMargin - sectionPaddingTopBottom
39
39
  }
40
40
  },
41
41
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
42
42
  '& [data-ds--menu--skeleton-heading-item]': {
43
- marginTop: skeletonHeadingTopMargin,
44
- marginBottom: skeletonHeadingBottomMargin,
43
+ marginBlockEnd: skeletonHeadingBottomMargin,
44
+ marginBlockStart: skeletonHeadingTopMargin,
45
45
  '&:first-of-type': {
46
- marginTop: skeletonHeadingTopMargin - sectionPaddingTopBottom
46
+ marginBlockStart: skeletonHeadingTopMargin - sectionPaddingTopBottom
47
47
  }
48
48
  },
49
49
  '&:focus': {
@@ -62,13 +62,13 @@ const unscrollableStyles = css({
62
62
  flexShrink: 0
63
63
  });
64
64
  const separatorStyles = css({
65
- borderTop: `2px solid var(${VAR_SEPARATOR_COLOR}, ${`var(--ds-border, ${N30A})`})`
65
+ borderBlockStart: `2px solid var(${VAR_SEPARATOR_COLOR}, ${`var(--ds-border, ${N30A})`})`
66
66
  });
67
67
  const noSeparatorStyles = css({
68
68
  // this is to ensure that adjacent sections without separators don't get additional margins.
69
69
  // eslint-disable-next-line @atlaskit/design-system/no-nested-styles
70
70
  '[data-section] + &': {
71
- marginTop: -6
71
+ marginBlockStart: -6
72
72
  }
73
73
  });
74
74
 
@@ -96,7 +96,7 @@ const Section = /*#__PURE__*/forwardRef(({
96
96
  className: UNSAFE_className,
97
97
  ...rest
98
98
  }, ref) => {
99
- propDeprecationWarning("@atlaskit/menu", 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
99
+ propDeprecationWarning("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
100
100
  );
101
101
 
102
102
  const UNSAFE_headingOverrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : overrides && overrides.HeadingItem && overrides.HeadingItem.cssFn;
@@ -51,9 +51,9 @@ var wordBreakStyles = css({
51
51
  wordBreak: 'break-word'
52
52
  });
53
53
  var descriptionStyles = css({
54
- marginTop: "var(--ds-space-050, 4px)",
55
54
  color: "var(--ds-text-subtlest, ".concat(N200, ")"),
56
- fontSize: "var(--ds-font-size-075, 12px)"
55
+ fontSize: "var(--ds-font-size-075, 12px)",
56
+ marginBlockStart: "var(--ds-space-050, 4px)"
57
57
  });
58
58
  var disabledDescriptionStyles = css({
59
59
  color: "var(--ds-text-disabled, ".concat(N200, ")")
@@ -123,23 +123,23 @@ var selectedBorderStyles = css({
123
123
  '&::before': {
124
124
  width: 2,
125
125
  position: 'absolute',
126
- top: 0,
127
- bottom: 0,
128
- left: 0,
129
126
  background: "var(--ds-border-selected, transparent)",
130
- content: '""'
127
+ content: '""',
128
+ insetBlockEnd: 0,
129
+ insetBlockStart: 0,
130
+ insetInlineStart: 0
131
131
  }
132
132
  });
133
133
  var selectedNotchStyles = css({
134
134
  '&::before': {
135
135
  width: 4,
136
136
  position: 'absolute',
137
- top: "var(--ds-space-150, 12px)",
138
- bottom: "var(--ds-space-150, 12px)",
139
- left: 0,
140
137
  background: "var(--ds-border-selected, transparent)",
141
138
  borderRadius: "0 ".concat("var(--ds-border-radius, 4px)", " ", "var(--ds-border-radius, 4px)", " 0"),
142
- content: '""'
139
+ content: '""',
140
+ insetBlockEnd: "var(--ds-space-150, 12px)",
141
+ insetBlockStart: "var(--ds-space-150, 12px)",
142
+ insetInlineStart: 0
143
143
  }
144
144
  });
145
145
  var selectedStyles = css({
@@ -193,7 +193,7 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
193
193
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
194
194
  _ref$isSelected = _ref.isSelected,
195
195
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected;
196
- propDeprecationWarning("@atlaskit/menu", 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
196
+ propDeprecationWarning("@atlaskit/menu" || '', 'overrides', overrides !== undefined, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
197
197
  );
198
198
 
199
199
  var spacing = useContext(SpacingContext);
@@ -206,7 +206,7 @@ var MenuItemPrimitive = function MenuItemPrimitive(_ref) {
206
206
  return jsx(FocusRing, {
207
207
  isInset: true
208
208
  }, children({
209
- className: cx([cn([getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9') && positionRelativeStyles, primitiveStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, getBooleanFF('platform.design-system-team.menu-selected-state-change_0see9') && [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
209
+ className: cx([cn([positionRelativeStyles, primitiveStyles, spacingMapStyles[spacing], !isDisabled && !isSelected && unselectedStyles, !isDisabled && isSelected && [selectedStyles, [selectionStyle === 'border' && selectedBorderStyles, selectionStyle === 'notch' && selectedNotchStyles]], isDisabled ? disabledStyles : interactiveStyles]), UNSAFE_className]),
210
210
  children: jsx(Inline, {
211
211
  as: "span",
212
212
  spread: "space-between",
@@ -41,7 +41,7 @@ function (props, ref) {
41
41
  if (!children) {
42
42
  return null;
43
43
  }
44
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
44
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
45
45
  );
46
46
 
47
47
  return jsx(MenuItemPrimitive, _extends({
@@ -47,7 +47,7 @@ var CustomItem = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function (_ref, ref)
47
47
  if (!Component) {
48
48
  return null;
49
49
  }
50
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
50
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
51
51
  );
52
52
 
53
53
  return jsx(MenuItemPrimitive, _extends({
@@ -37,7 +37,7 @@ var HeadingItem = /*#__PURE__*/memo(function (_ref) {
37
37
  cssFn = _ref$cssFn === void 0 ? noop : _ref$cssFn,
38
38
  UNSAFE_className = _ref.className,
39
39
  rest = _objectWithoutProperties(_ref, _excluded);
40
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
40
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
41
41
  );
42
42
 
43
43
  var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : css(cssFn(undefined));
@@ -46,7 +46,7 @@ function (props, ref) {
46
46
  if (!children) {
47
47
  return null;
48
48
  }
49
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
49
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
50
50
  );
51
51
 
52
52
  return jsx(MenuItemPrimitive, _extends({}, rest, {
@@ -44,7 +44,7 @@ var SkeletonHeadingItem = function SkeletonHeadingItem(_ref) {
44
44
  width = _ref.width,
45
45
  _ref$cssFn = _ref.cssFn,
46
46
  cssFn = _ref$cssFn === void 0 ? noop : _ref$cssFn;
47
- propDeprecationWarning("@atlaskit/menu", 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
47
+ propDeprecationWarning("@atlaskit/menu" || '', 'cssFn', cssFn !== noop, '' // TODO: Create DAC post when primitives/xcss are available as alternatives
48
48
  );
49
49
 
50
50
  var UNSAFE_overrides = getBooleanFF('platform.design-system-team.unsafe-overrides-killswitch_c8j9m') ? undefined : css(cssFn(undefined));