@atlaskit/side-navigation 7.0.1 → 9.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 (57) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/common/styles.js +1 -49
  3. package/dist/cjs/components/Footer/index.js +1 -3
  4. package/dist/cjs/components/Header/index.js +1 -4
  5. package/dist/cjs/components/Item/button-item.compiled.css +17 -0
  6. package/dist/cjs/components/Item/button-item.js +22 -11
  7. package/dist/cjs/components/Item/custom-item.compiled.css +17 -0
  8. package/dist/cjs/components/Item/custom-item.js +22 -12
  9. package/dist/cjs/components/Item/go-back-item.js +4 -4
  10. package/dist/cjs/components/Item/link-item.compiled.css +17 -0
  11. package/dist/cjs/components/Item/link-item.js +22 -10
  12. package/dist/cjs/components/NavigationContent/styles.js +1 -1
  13. package/dist/cjs/components/NestingItem/hack-for-ert.js +1 -1
  14. package/dist/cjs/components/NestingItem/index.compiled.css +5 -1
  15. package/dist/cjs/components/NestingItem/index.js +15 -9
  16. package/dist/es2019/common/styles.js +0 -50
  17. package/dist/es2019/components/Footer/index.js +1 -3
  18. package/dist/es2019/components/Header/index.js +1 -4
  19. package/dist/es2019/components/Item/button-item.compiled.css +17 -0
  20. package/dist/es2019/components/Item/button-item.js +20 -9
  21. package/dist/es2019/components/Item/custom-item.compiled.css +17 -0
  22. package/dist/es2019/components/Item/custom-item.js +19 -10
  23. package/dist/es2019/components/Item/go-back-item.js +3 -3
  24. package/dist/es2019/components/Item/link-item.compiled.css +17 -0
  25. package/dist/es2019/components/Item/link-item.js +19 -7
  26. package/dist/es2019/components/NavigationContent/styles.js +0 -1
  27. package/dist/es2019/components/NestingItem/hack-for-ert.js +1 -1
  28. package/dist/es2019/components/NestingItem/index.compiled.css +5 -1
  29. package/dist/es2019/components/NestingItem/index.js +14 -8
  30. package/dist/esm/common/styles.js +0 -47
  31. package/dist/esm/components/Footer/index.js +1 -3
  32. package/dist/esm/components/Header/index.js +1 -4
  33. package/dist/esm/components/Item/button-item.compiled.css +17 -0
  34. package/dist/esm/components/Item/button-item.js +21 -10
  35. package/dist/esm/components/Item/custom-item.compiled.css +17 -0
  36. package/dist/esm/components/Item/custom-item.js +20 -11
  37. package/dist/esm/components/Item/go-back-item.js +4 -4
  38. package/dist/esm/components/Item/link-item.compiled.css +17 -0
  39. package/dist/esm/components/Item/link-item.js +21 -9
  40. package/dist/esm/components/NavigationContent/styles.js +0 -1
  41. package/dist/esm/components/NestingItem/hack-for-ert.js +1 -1
  42. package/dist/esm/components/NestingItem/index.compiled.css +5 -1
  43. package/dist/esm/components/NestingItem/index.js +15 -9
  44. package/dist/types/common/styles.d.ts +0 -1
  45. package/dist/types/components/Item/button-item.d.ts +2 -2
  46. package/dist/types/components/Item/link-item.d.ts +2 -2
  47. package/dist/types/components/NestingItem/index.d.ts +3 -4
  48. package/dist/types-ts4.5/common/styles.d.ts +0 -1
  49. package/dist/types-ts4.5/components/Item/button-item.d.ts +2 -2
  50. package/dist/types-ts4.5/components/Item/link-item.d.ts +2 -2
  51. package/dist/types-ts4.5/components/NestingItem/index.d.ts +3 -4
  52. package/package.json +18 -18
  53. package/dist/cjs/components/NestingItem/styles.js +0 -36
  54. package/dist/es2019/components/NestingItem/styles.js +0 -40
  55. package/dist/esm/components/NestingItem/styles.js +0 -29
  56. package/dist/types/components/NestingItem/styles.d.ts +0 -28
  57. package/dist/types-ts4.5/components/NestingItem/styles.d.ts +0 -28
@@ -1 +1,5 @@
1
- ._1e0c1nu9{display:inline}
1
+ ._1c06idpf [data-item-elem-after]{opacity:0}
2
+ ._1e0c1nu9{display:inline}
3
+ ._9mqr1kw7:active [data-right-arrow], ._povs1kw7:focus [data-right-arrow], ._uv2d1kw7:hover [data-right-arrow], ._atks1kw7 [data-custom-icon]{display:inherit}
4
+ ._udl3glyw [data-right-arrow], ._kqsfglyw:active [data-custom-icon], ._udrwglyw:focus [data-custom-icon], ._13qvglyw:hover [data-custom-icon]{display:none}
5
+ ._udl3glyw [data-right-arrow]{display:none}
@@ -4,7 +4,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
5
5
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
6
6
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
7
- var _excluded = ["children", "iconAfter", "title", "onClick", "cssFn", "isSelected", "id", "component", "testId"];
7
+ var _excluded = ["children", "iconAfter", "title", "onClick", "className", "isDisabled", "isSelected", "id", "component", "testId"];
8
8
  import "./index.compiled.css";
9
9
  import { ax, ix } from "@compiled/react/runtime";
10
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -14,14 +14,14 @@ import ArrowRightIcon from '@atlaskit/icon/core/migration/arrow-right--arrow-rig
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import { Box } from '@atlaskit/primitives/compiled';
16
16
  import { N10 } from '@atlaskit/theme/colors';
17
- import { overrideStyleFunction } from '../../common/styles';
18
17
  import { ButtonItem, CustomItem, NavigationContent } from '../index';
19
18
  import { ROOT_ID } from '../NestableNavigationContent';
20
19
  import { NestedContext, useNestedContext } from '../NestableNavigationContent/context';
21
20
  import { useChildIdsEffect } from '../utils/hooks';
22
- import { nestingItemStyle } from './styles';
23
21
  var styles = {
24
- iconContainer: "_1e0c1nu9"
22
+ iconContainer: "_1e0c1nu9",
23
+ nestingItem: "_udl3glyw _kqsfglyw _udrwglyw _13qvglyw _9mqr1kw7 _povs1kw7 _uv2d1kw7 _atks1kw7",
24
+ nestingItemDisabled: "_1c06idpf _udl3glyw"
25
25
  };
26
26
 
27
27
  // Doesn't extend from ButtonItemProps because it blows ERT up.
@@ -36,7 +36,8 @@ var NestingItem = function NestingItem(props) {
36
36
  iconAfter = props.iconAfter,
37
37
  title = props.title,
38
38
  onClick = props.onClick,
39
- cssFn = props.cssFn,
39
+ className = props.className,
40
+ isDisabled = props.isDisabled,
40
41
  isSelected = props.isSelected,
41
42
  id = props.id,
42
43
  component = props.component,
@@ -54,7 +55,6 @@ var NestingItem = function NestingItem(props) {
54
55
  goBackButtonRef = _useNestedContext.goBackButtonRef,
55
56
  isDefaultFocusControl = _useNestedContext.isDefaultFocusControl,
56
57
  focusGoBackButton = _useNestedContext.focusGoBackButton;
57
- var mergedStyles = overrideStyleFunction(nestingItemStyle, cssFn);
58
58
  var _useState = useState(false),
59
59
  _useState2 = _slicedToArray(_useState, 2),
60
60
  isInteracted = _useState2[0],
@@ -160,21 +160,27 @@ var NestingItem = function NestingItem(props) {
160
160
  }))),
161
161
  onClick: onClickHandler,
162
162
  isSelected: isSelected,
163
+ isDisabled: isDisabled,
163
164
  testId: testId && "".concat(testId, "--item")
164
165
  }, rest), {}, {
165
- children: title,
166
- cssFn: mergedStyles
166
+ children: title
167
167
  });
168
168
  if (component) {
169
169
  return /*#__PURE__*/React.createElement(CustomItem, _extends({
170
170
  ref: isForwardRefCheck(component) ? parentItemRef : null
171
171
  }, componentProps, {
172
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
173
+ className: ax([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
172
174
  //@ts-expect-error TODO Fix legit TypeScript 3.9.6 improved inference error
175
+ ,
173
176
  component: component
174
177
  }));
175
178
  }
176
179
  return /*#__PURE__*/React.createElement(ButtonItem, _extends({
177
180
  ref: activeParentRef
178
- }, componentProps));
181
+ }, componentProps, {
182
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
183
+ className: ax([styles.nestingItem, isDisabled && styles.nestingItemDisabled, className])
184
+ }));
179
185
  };
180
186
  export default NestingItem;
@@ -7,5 +7,4 @@ import { type CSSFn, type StatelessCSSFn } from '@atlaskit/menu';
7
7
  * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
8
8
  */
9
9
  export declare const overrideStyleFunction: <TState>(baseStyle: CSSFn<TState>, newStyle?: CSSFn<TState> | undefined) => CSSFn<TState>;
10
- export declare const baseSideNavItemStyle: CSSFn;
11
10
  export declare const sectionHeaderSpacingStyles: StatelessCSSFn;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { type ButtonItemProps } from '@atlaskit/menu';
3
3
  export type { ButtonItemProps } from '@atlaskit/menu';
4
4
  /**
@@ -10,5 +10,5 @@ export type { ButtonItemProps } from '@atlaskit/menu';
10
10
  * - [Examples](https://atlassian.design/components/side-navigation/examples#button-item)
11
11
  * - [Code](https://atlassian.design/components/side-navigation/code)
12
12
  */
13
- declare const ButtonItem: React.ForwardRefExoticComponent<ButtonItemProps & React.RefAttributes<HTMLElement>>;
13
+ declare const ButtonItem: import("react").ForwardRefExoticComponent<ButtonItemProps & import("react").RefAttributes<HTMLElement>>;
14
14
  export default ButtonItem;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { type LinkItemProps } from '@atlaskit/menu';
3
3
  export type { LinkItemProps } from '@atlaskit/menu';
4
4
  /**
@@ -12,5 +12,5 @@ export type { LinkItemProps } from '@atlaskit/menu';
12
12
  * - [Examples](https://atlassian.design/components/side-navigation/examples#link-item)
13
13
  * - [Code](https://atlassian.design/components/side-navigation/code)
14
14
  */
15
- declare const LinkItem: React.ForwardRefExoticComponent<LinkItemProps & React.RefAttributes<HTMLElement>>;
15
+ declare const LinkItem: import("react").ForwardRefExoticComponent<LinkItemProps & import("react").RefAttributes<HTMLElement>>;
16
16
  export default LinkItem;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { type CSSFn, type CustomItemComponentProps, type Overrides } from '@atlaskit/menu';
6
+ import { type CustomItemComponentProps, type Overrides } from '@atlaskit/menu';
7
7
  interface NestingItemOverrides extends Overrides {
8
8
  /**
9
9
  * Use this to override the back button displayed when navigation is nested.
@@ -52,10 +52,9 @@ export interface NestingItemProps<TCustomComponentProps = CustomItemComponentPro
52
52
  */
53
53
  testId?: string;
54
54
  /**
55
- * A function that can be used to override the styles of the component.
56
- * It receives the current styles and state and expects a styles object.
55
+ * Not recommended for general use as it enables unsafe style overrides.
57
56
  */
58
- cssFn?: CSSFn;
57
+ className?: string;
59
58
  /**
60
59
  * Element to render before the item text.
61
60
  * Generally should be an [icon](https://atlassian.design/components/icon/icon-explorer) component.
@@ -7,5 +7,4 @@ import { type CSSFn, type StatelessCSSFn } from '@atlaskit/menu';
7
7
  * @deprecated Please avoid using this prop as we intend to remove the prop completely in a future release. See DSP-2682 for more information.
8
8
  */
9
9
  export declare const overrideStyleFunction: <TState>(baseStyle: CSSFn<TState>, newStyle?: CSSFn<TState> | undefined) => CSSFn<TState>;
10
- export declare const baseSideNavItemStyle: CSSFn;
11
10
  export declare const sectionHeaderSpacingStyles: StatelessCSSFn;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { type ButtonItemProps } from '@atlaskit/menu';
3
3
  export type { ButtonItemProps } from '@atlaskit/menu';
4
4
  /**
@@ -10,5 +10,5 @@ export type { ButtonItemProps } from '@atlaskit/menu';
10
10
  * - [Examples](https://atlassian.design/components/side-navigation/examples#button-item)
11
11
  * - [Code](https://atlassian.design/components/side-navigation/code)
12
12
  */
13
- declare const ButtonItem: React.ForwardRefExoticComponent<ButtonItemProps & React.RefAttributes<HTMLElement>>;
13
+ declare const ButtonItem: import("react").ForwardRefExoticComponent<ButtonItemProps & import("react").RefAttributes<HTMLElement>>;
14
14
  export default ButtonItem;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { type LinkItemProps } from '@atlaskit/menu';
3
3
  export type { LinkItemProps } from '@atlaskit/menu';
4
4
  /**
@@ -12,5 +12,5 @@ export type { LinkItemProps } from '@atlaskit/menu';
12
12
  * - [Examples](https://atlassian.design/components/side-navigation/examples#link-item)
13
13
  * - [Code](https://atlassian.design/components/side-navigation/code)
14
14
  */
15
- declare const LinkItem: React.ForwardRefExoticComponent<LinkItemProps & React.RefAttributes<HTMLElement>>;
15
+ declare const LinkItem: import("react").ForwardRefExoticComponent<LinkItemProps & import("react").RefAttributes<HTMLElement>>;
16
16
  export default LinkItem;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { type CSSFn, type CustomItemComponentProps, type Overrides } from '@atlaskit/menu';
6
+ import { type CustomItemComponentProps, type Overrides } from '@atlaskit/menu';
7
7
  interface NestingItemOverrides extends Overrides {
8
8
  /**
9
9
  * Use this to override the back button displayed when navigation is nested.
@@ -52,10 +52,9 @@ export interface NestingItemProps<TCustomComponentProps = CustomItemComponentPro
52
52
  */
53
53
  testId?: string;
54
54
  /**
55
- * A function that can be used to override the styles of the component.
56
- * It receives the current styles and state and expects a styles object.
55
+ * Not recommended for general use as it enables unsafe style overrides.
57
56
  */
58
- cssFn?: CSSFn;
57
+ className?: string;
59
58
  /**
60
59
  * Element to render before the item text.
61
60
  * Generally should be an [icon](https://atlassian.design/components/icon/icon-explorer) component.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "7.0.1",
3
+ "version": "9.0.0",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,13 +34,13 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/css": "^0.10.0",
36
36
  "@atlaskit/ds-lib": "^4.0.0",
37
- "@atlaskit/icon": "^25.0.0",
38
- "@atlaskit/menu": "^3.1.0",
37
+ "@atlaskit/icon": "^25.6.0",
38
+ "@atlaskit/menu": "^4.0.0",
39
39
  "@atlaskit/motion": "^5.1.0",
40
40
  "@atlaskit/platform-feature-flags": "^1.1.0",
41
- "@atlaskit/primitives": "^14.2.0",
41
+ "@atlaskit/primitives": "^14.4.0",
42
42
  "@atlaskit/theme": "^18.0.0",
43
- "@atlaskit/tokens": "^4.5.0",
43
+ "@atlaskit/tokens": "^4.8.0",
44
44
  "@babel/runtime": "^7.0.0",
45
45
  "@compiled/react": "^0.18.3"
46
46
  },
@@ -48,25 +48,25 @@
48
48
  "react": "^18.2.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@af/accessibility-testing": "^2.0.0",
52
- "@af/integration-testing": "^0.5.0",
53
- "@af/visual-regression": "^1.3.0",
54
- "@atlaskit/atlassian-navigation": "^5.0.0",
55
- "@atlaskit/button": "^21.1.0",
51
+ "@af/accessibility-testing": "workspace:^",
52
+ "@af/integration-testing": "workspace:^",
53
+ "@af/visual-regression": "workspace:^",
54
+ "@atlaskit/atlassian-navigation": "^5.1.0",
55
+ "@atlaskit/button": "^23.0.0",
56
56
  "@atlaskit/docs": "^10.0.0",
57
- "@atlaskit/dropdown-menu": "^13.0.0",
57
+ "@atlaskit/dropdown-menu": "^14.1.0",
58
58
  "@atlaskit/form": "^12.0.0",
59
- "@atlaskit/image": "^2.0.0",
60
- "@atlaskit/link": "^3.0.0",
59
+ "@atlaskit/image": "^3.0.0",
60
+ "@atlaskit/link": "^3.1.0",
61
61
  "@atlaskit/logo": "^16.0.0",
62
- "@atlaskit/onboarding": "^13.0.0",
63
- "@atlaskit/pragmatic-drag-and-drop": "^1.5.0",
62
+ "@atlaskit/onboarding": "^14.0.0",
63
+ "@atlaskit/pragmatic-drag-and-drop": "^1.6.0",
64
64
  "@atlaskit/pragmatic-drag-and-drop-live-region": "^1.3.0",
65
65
  "@atlaskit/pragmatic-drag-and-drop-react-accessibility": "^2.0.0",
66
- "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.0.0",
66
+ "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.1.0",
67
67
  "@atlaskit/section-message": "^8.2.0",
68
- "@atlaskit/select": "^20.0.0",
69
- "@atlaskit/visual-regression": "^0.10.0",
68
+ "@atlaskit/select": "^20.4.0",
69
+ "@atlaskit/visual-regression": "workspace:^",
70
70
  "@testing-library/react": "^13.4.0",
71
71
  "raf-stub": "^2.0.1",
72
72
  "tiny-invariant": "^1.2.0",
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.nestingItemStyle = exports.enabledCSS = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- // exposed for testing purposes
12
- var enabledCSS = exports.enabledCSS = (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '&:hover [data-custom-icon]', {
13
- display: 'none'
14
- }), '&:active [data-custom-icon]', {
15
- display: 'none'
16
- }), '&:focus [data-custom-icon]', {
17
- display: 'none'
18
- }), '& [data-custom-icon]', {
19
- display: 'inherit'
20
- }), '&:hover [data-right-arrow]', {
21
- display: 'inherit'
22
- }), '&:active [data-right-arrow]', {
23
- display: 'inherit'
24
- }), '&:focus [data-right-arrow]', {
25
- display: 'inherit'
26
- }), '& [data-right-arrow]', {
27
- display: 'none'
28
- });
29
- var disabledCSS = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, '[data-item-elem-after]', {
30
- opacity: 0
31
- }), '& [data-right-arrow]', {
32
- display: 'none'
33
- });
34
- var nestingItemStyle = exports.nestingItemStyle = function nestingItemStyle(state) {
35
- return _objectSpread({}, state.isDisabled ? disabledCSS : enabledCSS);
36
- };
@@ -1,40 +0,0 @@
1
- // exposed for testing purposes
2
- export const enabledCSS = {
3
- ['&:hover [data-custom-icon]']: {
4
- display: 'none'
5
- },
6
- ['&:active [data-custom-icon]']: {
7
- display: 'none'
8
- },
9
- ['&:focus [data-custom-icon]']: {
10
- display: 'none'
11
- },
12
- ['& [data-custom-icon]']: {
13
- display: 'inherit'
14
- },
15
- ['&:hover [data-right-arrow]']: {
16
- display: 'inherit'
17
- },
18
- ['&:active [data-right-arrow]']: {
19
- display: 'inherit'
20
- },
21
- ['&:focus [data-right-arrow]']: {
22
- display: 'inherit'
23
- },
24
- ['& [data-right-arrow]']: {
25
- display: 'none'
26
- }
27
- };
28
- const disabledCSS = {
29
- ['[data-item-elem-after]']: {
30
- opacity: 0
31
- },
32
- ['& [data-right-arrow]']: {
33
- display: 'none'
34
- }
35
- };
36
- export const nestingItemStyle = state => {
37
- return {
38
- ...(state.isDisabled ? disabledCSS : enabledCSS)
39
- };
40
- };
@@ -1,29 +0,0 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- // exposed for testing purposes
5
- export var enabledCSS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, '&:hover [data-custom-icon]', {
6
- display: 'none'
7
- }), '&:active [data-custom-icon]', {
8
- display: 'none'
9
- }), '&:focus [data-custom-icon]', {
10
- display: 'none'
11
- }), '& [data-custom-icon]', {
12
- display: 'inherit'
13
- }), '&:hover [data-right-arrow]', {
14
- display: 'inherit'
15
- }), '&:active [data-right-arrow]', {
16
- display: 'inherit'
17
- }), '&:focus [data-right-arrow]', {
18
- display: 'inherit'
19
- }), '& [data-right-arrow]', {
20
- display: 'none'
21
- });
22
- var disabledCSS = _defineProperty(_defineProperty({}, '[data-item-elem-after]', {
23
- opacity: 0
24
- }), '& [data-right-arrow]', {
25
- display: 'none'
26
- });
27
- export var nestingItemStyle = function nestingItemStyle(state) {
28
- return _objectSpread({}, state.isDisabled ? disabledCSS : enabledCSS);
29
- };
@@ -1,28 +0,0 @@
1
- import { type CSSFn } from '@atlaskit/menu';
2
- export declare const enabledCSS: {
3
- "&:hover [data-custom-icon]": {
4
- display: string;
5
- };
6
- "&:active [data-custom-icon]": {
7
- display: string;
8
- };
9
- "&:focus [data-custom-icon]": {
10
- display: string;
11
- };
12
- "& [data-custom-icon]": {
13
- display: string;
14
- };
15
- "&:hover [data-right-arrow]": {
16
- display: string;
17
- };
18
- "&:active [data-right-arrow]": {
19
- display: string;
20
- };
21
- "&:focus [data-right-arrow]": {
22
- display: string;
23
- };
24
- "& [data-right-arrow]": {
25
- display: string;
26
- };
27
- };
28
- export declare const nestingItemStyle: CSSFn;
@@ -1,28 +0,0 @@
1
- import { type CSSFn } from '@atlaskit/menu';
2
- export declare const enabledCSS: {
3
- "&:hover [data-custom-icon]": {
4
- display: string;
5
- };
6
- "&:active [data-custom-icon]": {
7
- display: string;
8
- };
9
- "&:focus [data-custom-icon]": {
10
- display: string;
11
- };
12
- "& [data-custom-icon]": {
13
- display: string;
14
- };
15
- "&:hover [data-right-arrow]": {
16
- display: string;
17
- };
18
- "&:active [data-right-arrow]": {
19
- display: string;
20
- };
21
- "&:focus [data-right-arrow]": {
22
- display: string;
23
- };
24
- "& [data-right-arrow]": {
25
- display: string;
26
- };
27
- };
28
- export declare const nestingItemStyle: CSSFn;