@atlaskit/menu 3.1.2 → 4.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 (30) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/cjs/internal/components/menu-item-primitive.compiled.css +81 -0
  3. package/dist/cjs/internal/components/menu-item-primitive.js +47 -174
  4. package/dist/cjs/menu-item/button-item.js +10 -22
  5. package/dist/cjs/menu-item/custom-item.js +11 -25
  6. package/dist/cjs/menu-item/link-item.js +10 -22
  7. package/dist/cjs/menu-item/skeleton-heading-item.js +1 -4
  8. package/dist/cjs/menu-item/skeleton-item.js +1 -4
  9. package/dist/cjs/menu-section/section.js +1 -4
  10. package/dist/es2019/internal/components/menu-item-primitive.compiled.css +81 -0
  11. package/dist/es2019/internal/components/menu-item-primitive.js +43 -172
  12. package/dist/es2019/menu-item/button-item.js +5 -24
  13. package/dist/es2019/menu-item/custom-item.js +6 -28
  14. package/dist/es2019/menu-item/link-item.js +5 -24
  15. package/dist/es2019/menu-item/skeleton-heading-item.js +1 -4
  16. package/dist/es2019/menu-item/skeleton-item.js +1 -4
  17. package/dist/es2019/menu-section/section.js +1 -4
  18. package/dist/esm/internal/components/menu-item-primitive.compiled.css +81 -0
  19. package/dist/esm/internal/components/menu-item-primitive.js +43 -171
  20. package/dist/esm/menu-item/button-item.js +6 -22
  21. package/dist/esm/menu-item/custom-item.js +7 -26
  22. package/dist/esm/menu-item/link-item.js +6 -22
  23. package/dist/esm/menu-item/skeleton-heading-item.js +1 -4
  24. package/dist/esm/menu-item/skeleton-item.js +1 -4
  25. package/dist/esm/menu-section/section.js +1 -4
  26. package/dist/types/internal/components/menu-item-primitive.d.ts +2 -2
  27. package/dist/types/types.d.ts +4 -7
  28. package/dist/types-ts4.5/internal/components/menu-item-primitive.d.ts +2 -2
  29. package/dist/types-ts4.5/types.d.ts +4 -7
  30. package/package.json +17 -13
@@ -126,7 +126,7 @@ export interface SectionProps {
126
126
  }
127
127
  export interface MenuItemPrimitiveProps {
128
128
  children: (props: {
129
- className: string;
129
+ className?: string;
130
130
  children: React.ReactNode;
131
131
  }) => JSX.Element;
132
132
  title: React.ReactNode | undefined;
@@ -146,12 +146,9 @@ export interface MenuItemPrimitiveProps {
146
146
  }
147
147
  export interface MenuItemProps {
148
148
  /**
149
- * A function that overrides the styles of the component.
150
- * It receives the current styles and state and expects a styles object.
151
- *
152
- * @deprecated This API is deprecated and will be removed in a future release. See DSP-2676 for more information.
149
+ * Not recommended for general use as it enables unsafe style overrides.
153
150
  */
154
- cssFn?: CSSFn;
151
+ className?: string;
155
152
  /**
156
153
  * Element to render before the item text.
157
154
  * Usually this is an [icon](https://atlaskit.atlassian.com/packages/design-system/icon) component.
@@ -261,7 +258,7 @@ export interface CustomItemComponentProps {
261
258
  * Class to apply to the root container of the custom component.
262
259
  * Ensure this has been applied so the item styling is consistent.
263
260
  */
264
- className: string;
261
+ className?: string;
265
262
  /**
266
263
  * Test ID that's passed through to the custom component.
267
264
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/menu",
3
- "version": "3.1.2",
3
+ "version": "4.0.0",
4
4
  "description": "A list of options to help users navigate, or perform actions.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -41,15 +41,16 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@atlaskit/app-provider": "^2.0.0",
44
+ "@atlaskit/app-provider": "^2.1.0",
45
45
  "@atlaskit/ds-lib": "^4.0.0",
46
46
  "@atlaskit/focus-ring": "^3.0.0",
47
47
  "@atlaskit/interaction-context": "^3.0.0",
48
48
  "@atlaskit/platform-feature-flags": "^1.1.0",
49
- "@atlaskit/primitives": "^14.2.0",
49
+ "@atlaskit/primitives": "^14.4.0",
50
50
  "@atlaskit/theme": "^18.0.0",
51
- "@atlaskit/tokens": "^4.5.0",
51
+ "@atlaskit/tokens": "^4.8.0",
52
52
  "@babel/runtime": "^7.0.0",
53
+ "@compiled/react": "^0.18.3",
53
54
  "@emotion/react": "^11.7.1"
54
55
  },
55
56
  "peerDependencies": {
@@ -57,22 +58,22 @@
57
58
  "react-dom": "^18.2.0"
58
59
  },
59
60
  "devDependencies": {
60
- "@af/accessibility-testing": "^2.0.0",
61
- "@af/integration-testing": "^0.5.0",
62
- "@af/visual-regression": "^1.3.0",
63
- "@atlaskit/button": "^21.1.0",
61
+ "@af/accessibility-testing": "workspace:^",
62
+ "@af/integration-testing": "workspace:^",
63
+ "@af/visual-regression": "workspace:^",
64
+ "@atlaskit/button": "^23.0.0",
64
65
  "@atlaskit/docs": "^10.0.0",
65
- "@atlaskit/icon": "^25.0.0",
66
+ "@atlaskit/icon": "^25.6.0",
66
67
  "@atlaskit/icon-file-type": "^7.0.0",
67
- "@atlaskit/icon-object": "^7.0.0",
68
- "@atlaskit/link": "^3.0.0",
68
+ "@atlaskit/icon-object": "^7.1.0",
69
+ "@atlaskit/link": "^3.1.0",
69
70
  "@atlaskit/section-message": "^8.2.0",
70
- "@atlaskit/visual-regression": "^0.10.0",
71
+ "@atlaskit/visual-regression": "workspace:^",
71
72
  "@atlassian/feature-flags-test-utils": "^0.3.0",
72
73
  "@emotion/jest": "^11.8.0",
73
74
  "@testing-library/react": "^13.4.0",
74
75
  "ast-types": "^0.13.3",
75
- "jscodeshift": "^0.16.1",
76
+ "jscodeshift": "^17.0.0",
76
77
  "typescript": "~5.4.2"
77
78
  },
78
79
  "keywords": [
@@ -126,6 +127,9 @@
126
127
  },
127
128
  "platform_button_item-add-ufo-metrics": {
128
129
  "type": "boolean"
130
+ },
131
+ "platform_fix_a11y_selected_and_hovered_state_color": {
132
+ "type": "boolean"
129
133
  }
130
134
  },
131
135
  "homepage": "https://atlassian.design/components/menu/"