@astryxdesign/core 0.5.2-canary.c9c8564 → 0.5.2-canary.e4f8e4e

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 (146) hide show
  1. package/dist/BottomSheet/BottomSheet.d.ts +3 -1
  2. package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
  3. package/dist/BottomSheet/BottomSheet.js +4 -3
  4. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts +2 -2
  5. package/dist/BottomSheet/BottomSheetEdgeTint.d.ts.map +1 -1
  6. package/dist/BottomSheet/BottomSheetEdgeTint.js +7 -10
  7. package/dist/BottomSheet/BottomSheetSwitcher.d.ts.map +1 -1
  8. package/dist/BottomSheet/BottomSheetSwitcher.js +1 -1
  9. package/dist/Button/Button.d.ts +2 -1
  10. package/dist/Button/Button.d.ts.map +1 -1
  11. package/dist/Button/Button.js +11 -4
  12. package/dist/Carousel/Carousel.d.ts.map +1 -1
  13. package/dist/Carousel/Carousel.js +2 -2
  14. package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
  15. package/dist/Chat/ChatToolCalls.js +34 -17
  16. package/dist/ContextMenu/ContextMenu.d.ts +14 -3
  17. package/dist/ContextMenu/ContextMenu.d.ts.map +1 -1
  18. package/dist/ContextMenu/ContextMenu.js +149 -26
  19. package/dist/ContextMenu/index.d.ts +1 -0
  20. package/dist/ContextMenu/index.d.ts.map +1 -1
  21. package/dist/DropdownMenu/DropdownMenu.d.ts +24 -5
  22. package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  23. package/dist/DropdownMenu/DropdownMenu.js +340 -26
  24. package/dist/DropdownMenu/DropdownMenuContext.d.ts +1 -1
  25. package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
  26. package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  27. package/dist/DropdownMenu/DropdownMenuItem.js +1 -1
  28. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts +6 -2
  29. package/dist/DropdownMenu/DropdownMenuSubMenu.d.ts.map +1 -1
  30. package/dist/DropdownMenu/DropdownMenuSubMenu.js +43 -14
  31. package/dist/DropdownMenu/MenuBottomSheet.d.ts +20 -0
  32. package/dist/DropdownMenu/MenuBottomSheet.d.ts.map +1 -0
  33. package/dist/DropdownMenu/MenuBottomSheet.js +36 -0
  34. package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts +10 -0
  35. package/dist/DropdownMenu/MenuBottomSheetActionList.d.ts.map +1 -0
  36. package/dist/DropdownMenu/MenuBottomSheetActionList.js +111 -0
  37. package/dist/DropdownMenu/index.d.ts +2 -1
  38. package/dist/DropdownMenu/index.d.ts.map +1 -1
  39. package/dist/DropdownMenu/menuWidth.d.ts +14 -0
  40. package/dist/DropdownMenu/menuWidth.d.ts.map +1 -0
  41. package/dist/DropdownMenu/menuWidth.js +35 -0
  42. package/dist/DropdownMenu/useMenuOverflow.d.ts +10 -0
  43. package/dist/DropdownMenu/useMenuOverflow.d.ts.map +1 -0
  44. package/dist/DropdownMenu/useMenuOverflow.js +60 -0
  45. package/dist/MoreMenu/MoreMenu.d.ts +8 -2
  46. package/dist/MoreMenu/MoreMenu.d.ts.map +1 -1
  47. package/dist/MoreMenu/MoreMenu.js +2 -0
  48. package/dist/MultiSelector/MultiSelector.d.ts +11 -1
  49. package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
  50. package/dist/MultiSelector/MultiSelector.js +97 -68
  51. package/dist/MultiSelector/index.d.ts +1 -1
  52. package/dist/MultiSelector/index.d.ts.map +1 -1
  53. package/dist/Popover/Popover.d.ts +10 -6
  54. package/dist/Popover/Popover.d.ts.map +1 -1
  55. package/dist/Popover/Popover.js +141 -16
  56. package/dist/Popover/usePopover.d.ts +4 -0
  57. package/dist/Popover/usePopover.d.ts.map +1 -1
  58. package/dist/Popover/usePopover.js +52 -5
  59. package/dist/Selector/Selector.d.ts +10 -0
  60. package/dist/Selector/Selector.d.ts.map +1 -1
  61. package/dist/Selector/Selector.js +106 -80
  62. package/dist/Selector/SelectorBottomSheet.d.ts +21 -0
  63. package/dist/Selector/SelectorBottomSheet.d.ts.map +1 -0
  64. package/dist/Selector/SelectorBottomSheet.js +83 -0
  65. package/dist/Selector/index.d.ts +1 -1
  66. package/dist/Selector/index.d.ts.map +1 -1
  67. package/dist/Selector/selectorPresentation.stylex.d.ts +16 -0
  68. package/dist/Selector/selectorPresentation.stylex.d.ts.map +1 -0
  69. package/dist/Selector/selectorPresentation.stylex.js +21 -0
  70. package/dist/Selector/useSelectorPresentation.d.ts +32 -0
  71. package/dist/Selector/useSelectorPresentation.d.ts.map +1 -0
  72. package/dist/Selector/useSelectorPresentation.js +90 -0
  73. package/dist/Toast/useToastGesture.d.ts.map +1 -1
  74. package/dist/Toast/useToastGesture.js +46 -9
  75. package/dist/astryx.css +19 -1
  76. package/dist/hooks/useAdaptivePresentation.d.ts +5 -0
  77. package/dist/hooks/useAdaptivePresentation.d.ts.map +1 -0
  78. package/dist/hooks/useAdaptivePresentation.js +19 -0
  79. package/dist/hooks/useFocusReturnVisibility.d.ts +7 -0
  80. package/dist/hooks/useFocusReturnVisibility.d.ts.map +1 -0
  81. package/dist/hooks/useFocusReturnVisibility.js +35 -0
  82. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  83. package/dist/hooks/useFocusTrap.js +12 -0
  84. package/locales/en.json +20 -0
  85. package/locales/pseudo.json +15 -0
  86. package/package.json +2 -2
  87. package/src/BottomSheet/BottomSheet.doc.mjs +6 -0
  88. package/src/BottomSheet/BottomSheet.test.tsx +29 -0
  89. package/src/BottomSheet/BottomSheet.tsx +7 -4
  90. package/src/BottomSheet/BottomSheetEdgeTint.test.tsx +4 -6
  91. package/src/BottomSheet/BottomSheetEdgeTint.tsx +7 -10
  92. package/src/BottomSheet/BottomSheetSwitcher.tsx +1 -2
  93. package/src/Button/Button.doc.mjs +56 -0
  94. package/src/Button/Button.test.tsx +10 -0
  95. package/src/Button/Button.tsx +13 -5
  96. package/src/ButtonGroup/ButtonGroup.doc.mjs +47 -0
  97. package/src/Carousel/Carousel.test.tsx +83 -0
  98. package/src/Carousel/Carousel.tsx +8 -2
  99. package/src/Chat/ChatToolCalls.test.tsx +44 -0
  100. package/src/Chat/ChatToolCalls.tsx +36 -15
  101. package/src/ContextMenu/ContextMenu.doc.mjs +13 -1
  102. package/src/ContextMenu/ContextMenu.test.tsx +131 -1
  103. package/src/ContextMenu/ContextMenu.tsx +199 -32
  104. package/src/ContextMenu/index.ts +1 -0
  105. package/src/DropdownMenu/DropdownMenu.doc.mjs +201 -40
  106. package/src/DropdownMenu/DropdownMenu.test.tsx +518 -7
  107. package/src/DropdownMenu/DropdownMenu.tsx +459 -28
  108. package/src/DropdownMenu/DropdownMenuContext.tsx +1 -1
  109. package/src/DropdownMenu/DropdownMenuItem.tsx +2 -0
  110. package/src/DropdownMenu/DropdownMenuSubMenu.doc.mjs +4 -2
  111. package/src/DropdownMenu/DropdownMenuSubMenu.test.tsx +124 -0
  112. package/src/DropdownMenu/DropdownMenuSubMenu.tsx +72 -17
  113. package/src/DropdownMenu/MenuBottomSheet.tsx +46 -0
  114. package/src/DropdownMenu/MenuBottomSheetActionList.tsx +141 -0
  115. package/src/DropdownMenu/index.ts +2 -0
  116. package/src/DropdownMenu/menuWidth.ts +51 -0
  117. package/src/DropdownMenu/useMenuOverflow.ts +77 -0
  118. package/src/IconButton/IconButton.doc.mjs +38 -0
  119. package/src/MoreMenu/MoreMenu.doc.mjs +17 -0
  120. package/src/MoreMenu/MoreMenu.test.tsx +47 -0
  121. package/src/MoreMenu/MoreMenu.tsx +13 -1
  122. package/src/MultiSelector/MultiSelector.doc.mjs +16 -0
  123. package/src/MultiSelector/MultiSelector.test.tsx +127 -0
  124. package/src/MultiSelector/MultiSelector.tsx +121 -73
  125. package/src/MultiSelector/index.ts +1 -0
  126. package/src/Popover/Popover.doc.mjs +11 -11
  127. package/src/Popover/Popover.test.tsx +397 -2
  128. package/src/Popover/Popover.tsx +228 -21
  129. package/src/Popover/usePopover.tsx +92 -15
  130. package/src/ProgressBar/ProgressBar.spec.md +208 -0
  131. package/src/SegmentedControl/SegmentedControl.doc.mjs +56 -0
  132. package/src/Selector/Selector.doc.mjs +12 -0
  133. package/src/Selector/Selector.test.tsx +135 -0
  134. package/src/Selector/Selector.tsx +141 -82
  135. package/src/Selector/SelectorBottomSheet.tsx +97 -0
  136. package/src/Selector/index.ts +1 -0
  137. package/src/Selector/selectorPresentation.stylex.ts +20 -0
  138. package/src/Selector/useSelectorPresentation.ts +147 -0
  139. package/src/Toast/ToastViewport.test.tsx +118 -4
  140. package/src/Toast/useToastGesture.ts +61 -8
  141. package/src/ToggleButton/ToggleButton.doc.mjs +56 -0
  142. package/src/hooks/useAdaptivePresentation.ts +35 -0
  143. package/src/hooks/useFocusReturnVisibility.ts +45 -0
  144. package/src/hooks/useFocusTrap.test.tsx +40 -0
  145. package/src/hooks/useFocusTrap.ts +13 -0
  146. package/src/theme/themingTargets.test.ts +91 -25
@@ -7,24 +7,42 @@ export const docs = {
7
7
  displayName: 'Dropdown Menu',
8
8
  group: 'DropdownMenu',
9
9
  category: 'Action',
10
- keywords: ["dropdown","menu","popover","select","actions","contextmenu","overflow","kebab","menubutton"],
10
+ keywords: [
11
+ 'dropdown',
12
+ 'menu',
13
+ 'popover',
14
+ 'select',
15
+ 'actions',
16
+ 'contextmenu',
17
+ 'overflow',
18
+ 'kebab',
19
+ 'menubutton',
20
+ ],
11
21
  playground: {
12
22
  // `items` is required; without seeded entries the properties-tab preview
13
23
  // renders an empty trigger button. Provide a few actions so the preview
14
24
  // is meaningful.
15
25
  defaults: {
16
26
  button: {label: 'Actions'},
27
+ presentation: 'popover',
17
28
  items: [
18
- {label: 'Edit'},
19
- {label: 'Duplicate'},
20
- {label: 'Delete'},
29
+ {label: 'Edit project', icon: 'wrench'},
30
+ {label: 'Duplicate project', icon: 'copy'},
31
+ {label: 'Share project', icon: 'externalLink'},
32
+ {label: 'Archive project', icon: 'stop'},
21
33
  ],
22
34
  },
23
35
  },
24
36
  theming: {
25
37
  targets: [
26
- {className: 'astryx-dropdown-menu'},
27
- {className: 'astryx-dropdown-menu-item', visualProps: ['size', 'variant']},
38
+ {
39
+ className: 'astryx-dropdown-menu',
40
+ visualProps: ['presentation'],
41
+ },
42
+ {
43
+ className: 'astryx-dropdown-menu-item',
44
+ visualProps: ['size', 'variant'],
45
+ },
28
46
  {
29
47
  className: 'astryx-dropdown-menu-radio',
30
48
  visualProps: ['size'],
@@ -35,28 +53,48 @@ export const docs = {
35
53
  {className: 'astryx-dropdown-menu-indicator-icon'},
36
54
  ],
37
55
  vars: [
38
- {name: '--_dropdown-menu-radius', description: 'Border radius of the menu popup', default: 'var(--radius-element)', private: true},
39
- {name: '--_dropdown-menu-padding', description: 'Inner padding of the menu popup', default: 'var(--spacing-1)', private: true},
56
+ {
57
+ name: '--_dropdown-menu-radius',
58
+ description: 'Border radius of the menu popup',
59
+ default: 'var(--radius-element)',
60
+ private: true,
61
+ },
62
+ {
63
+ name: '--_dropdown-menu-padding',
64
+ description: 'Inner padding of the menu popup',
65
+ default: 'var(--spacing-1)',
66
+ private: true,
67
+ },
40
68
  ],
41
69
  derived: [
42
70
  {property: 'borderRadius', vars: ['--_dropdown-menu-radius']},
43
71
  {property: 'padding', vars: ['--_dropdown-menu-padding']},
44
72
  ],
45
73
  },
46
- description: 'Main dropdown menu component with a trigger button and popup item list.',
74
+ description:
75
+ 'Action menu with a trigger button and anchored, bottom-sheet, or adaptive presentation.',
47
76
  props: [
48
77
  {
49
78
  name: 'button',
50
79
  type: 'DropdownMenuButtonProps',
51
- description: 'Props for the trigger button (Button props except onClick).',
80
+ description:
81
+ 'Props for the trigger button (Button props except onClick).',
52
82
  default: "{ label: 'Menu' }",
53
83
  },
54
84
  {
55
85
  name: 'items',
56
86
  type: 'DropdownMenuOption[]',
57
- description: 'Array of menu entries. Each entry is one of: an action item `{label, onClick?, icon?, description?, endContent?, isDisabled?, variant?, hasCloseOnSelect?, id?}` (variant `"destructive"` renders it in the error color; `endContent` holds trailing content such as a keyboard-shortcut hint; `id` is the row\'s stable React key, needed only when the array reorders or filters), a divider `{type: "divider"}`, or a section `{type: "section", title?, id?, items: [...action items]}`.',
87
+ description:
88
+ 'Array of menu entries. Each entry is one of: an action item `{label, onClick?, icon?, description?, endContent?, isDisabled?, variant?, hasCloseOnSelect?, id?}` (variant `"destructive"` renders it in the error color; `endContent` holds trailing content such as a keyboard-shortcut hint; `id` is the row\'s stable React key, needed only when the array reorders or filters), a divider `{type: "divider"}`, or a section `{type: "section", title?, id?, items: [...action items]}`.',
58
89
  required: true,
59
90
  },
91
+ {
92
+ name: 'presentation',
93
+ type: "'popover' | 'bottom-sheet' | 'adaptive'",
94
+ description:
95
+ "Presentation surface for data-driven items. 'popover' stays anchored, 'bottom-sheet' always renders the actions in a modal BottomSheet, and 'adaptive' uses a BottomSheet on compact coarse-pointer layouts while remaining anchored elsewhere. Compound children currently support popover only.",
96
+ default: "'popover'",
97
+ },
60
98
  {
61
99
  name: 'isMenuOpen',
62
100
  type: 'boolean',
@@ -70,18 +108,21 @@ export const docs = {
70
108
  {
71
109
  name: 'menuWidth',
72
110
  type: 'number | string',
73
- description: 'Custom menu width; defaults to matching the trigger button width.',
111
+ description:
112
+ 'Minimum width for the popover presentation. Length values may grow for content; intrinsic and CSS-wide keywords select the preferred inline size. Every form is capped to the available viewport space. Defaults to matching the trigger width up to that cap.',
74
113
  },
75
114
  {
76
115
  name: 'placement',
77
116
  type: "'above' | 'below' | 'start' | 'end'",
78
- description: "Position placement relative to the trigger. Logical: start/end resolve against the menu's own inherited direction (RTL mirrors).",
117
+ description:
118
+ "Popover placement relative to the trigger. Ignored by the bottom-sheet presentation. Logical: start/end resolve against the menu's own inherited direction (RTL mirrors).",
79
119
  default: "'below'",
80
120
  },
81
121
  {
82
122
  name: 'alignment',
83
123
  type: "'start' | 'center' | 'end'",
84
- description: "Alignment along the placement axis. Logical: start/end follow the menu's own inherited direction (RTL mirrors).",
124
+ description:
125
+ "Popover alignment along the placement axis. Ignored by the bottom-sheet presentation. Logical: start/end follow the menu's own inherited direction (RTL mirrors).",
85
126
  default: "'start'",
86
127
  },
87
128
  {
@@ -89,34 +130,70 @@ export const docs = {
89
130
  type: '() => void',
90
131
  description: 'Callback fired when the trigger button is clicked.',
91
132
  },
92
- {
93
- name: 'placement',
94
- type: "'above' | 'below' | 'start' | 'end'",
95
- description: 'Position placement for the menu popover relative to the trigger button.',
96
- default: "'below'",
97
- },
98
133
  {
99
134
  name: 'hasChevron',
100
135
  type: 'boolean',
101
- description: 'Whether to show a chevron icon on the trigger button. Set to false for icon-only triggers.',
136
+ description:
137
+ 'Whether to show a chevron icon on the trigger button. Set to false for icon-only triggers.',
102
138
  default: 'true',
103
- }, {
139
+ },
140
+ {
104
141
  name: 'children',
105
142
  type: 'ReactNode',
106
143
  description:
107
144
  'Compound-mode menu content: DropdownMenuItem, DropdownMenuDivider, DropdownMenuSubMenu, and the selectable items. Mutually exclusive with `items`.',
108
145
  },
109
146
  ],
110
- components: [
111
- {name: 'DropdownMenuItem'},
112
- ],
147
+ components: [{name: 'DropdownMenuItem'}],
113
148
  usage: {
114
- description: 'A dropdown menu that displays a list of actionable items in a popup triggered by a button. Use to present action options as a next step in a process, or to offer contextual actions without cluttering the interface.',
149
+ description:
150
+ 'A dropdown menu that displays a list of actionable items in a popup triggered by a button. Use to present action options as a next step in a process, or to offer contextual actions without cluttering the interface.',
115
151
  bestPractices: [
116
- { guidance: true, description: 'Keep menu items concise and action-oriented so users can scan options quickly.' },
117
- { guidance: true, description: 'Use sections and dividers to group related actions when the menu has many items.' },
118
- { guidance: false, description: 'Use a DropdownMenu for navigation; use a navigation component instead.' },
119
- { guidance: false, description: 'Place more than 10–12 items in a single menu without grouping them into sections.' },
152
+ {
153
+ guidance: true,
154
+ description:
155
+ 'Keep menu items concise and action-oriented so users can scan options quickly.',
156
+ },
157
+ {
158
+ guidance: true,
159
+ description:
160
+ 'Use sections and dividers to group related actions when the menu has many items.',
161
+ },
162
+ {
163
+ guidance: true,
164
+ description:
165
+ 'For a short, flat action set, use presentation="bottom-sheet" when product policy calls for a modal touch surface.',
166
+ },
167
+ {
168
+ guidance: true,
169
+ description:
170
+ 'Use presentation="adaptive" when the same short action set should remain anchored on pointer layouts and become a BottomSheet on compact coarse-pointer layouts.',
171
+ },
172
+ {
173
+ guidance: true,
174
+ description:
175
+ 'For a hierarchy that cannot fit as adjacent flyouts on a compact touch surface, a product may explicitly use a drill-in interaction with a Back action.',
176
+ },
177
+ {
178
+ guidance: true,
179
+ description:
180
+ 'Choose presentation explicitly in product code. A compact, coarse-pointer, hover-free media query is one useful policy, but DropdownMenu does not impose a universal device breakpoint.',
181
+ },
182
+ {
183
+ guidance: true,
184
+ description:
185
+ 'When the content is no longer a short list of immediate actions, reevaluate the interaction and choose a component that matches the actual task; content traits alone do not determine the component.',
186
+ },
187
+ {
188
+ guidance: false,
189
+ description:
190
+ 'Use a DropdownMenu for navigation; use a navigation component instead.',
191
+ },
192
+ {
193
+ guidance: false,
194
+ description:
195
+ 'Place more than 10–12 items in a single menu without grouping them into sections.',
196
+ },
120
197
  ],
121
198
  },
122
199
  };
@@ -124,12 +201,54 @@ export const docs = {
124
201
  /** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
125
202
  export const docsZh = {
126
203
  usage: {
127
- description: 'A dropdown menu that displays a list of actionable items in a popup triggered by a button. Use to present action options as a next step in a process, or to offer contextual actions without cluttering the interface.',
204
+ description:
205
+ 'A dropdown menu that displays a list of actionable items in a popup triggered by a button. Use to present action options as a next step in a process, or to offer contextual actions without cluttering the interface.',
128
206
  bestPractices: [
129
- { guidance: true, description: 'Keep menu items concise and action-oriented so users can scan options quickly.' },
130
- { guidance: true, description: 'Use sections and dividers to group related actions when the menu has many items.' },
131
- { guidance: false, description: 'Use a DropdownMenu for navigation; use a navigation component instead.' },
132
- { guidance: false, description: 'Place more than 10–12 items in a single menu without grouping them into sections.' },
207
+ {
208
+ guidance: true,
209
+ description:
210
+ 'Keep menu items concise and action-oriented so users can scan options quickly.',
211
+ },
212
+ {
213
+ guidance: true,
214
+ description:
215
+ 'Use sections and dividers to group related actions when the menu has many items.',
216
+ },
217
+ {
218
+ guidance: true,
219
+ description:
220
+ 'For a short, flat action set, use presentation="bottom-sheet" when product policy calls for a modal touch surface.',
221
+ },
222
+ {
223
+ guidance: true,
224
+ description:
225
+ 'Use presentation="adaptive" when the same short action set should remain anchored on pointer layouts and become a BottomSheet on compact coarse-pointer layouts.',
226
+ },
227
+ {
228
+ guidance: true,
229
+ description:
230
+ 'For a hierarchy that cannot fit as adjacent flyouts on a compact touch surface, a product may explicitly use a drill-in interaction with a Back action.',
231
+ },
232
+ {
233
+ guidance: true,
234
+ description:
235
+ 'Choose presentation explicitly in product code. A compact, coarse-pointer, hover-free media query is one useful policy, but DropdownMenu does not impose a universal device breakpoint.',
236
+ },
237
+ {
238
+ guidance: true,
239
+ description:
240
+ 'When the content is no longer a short list of immediate actions, reevaluate the interaction and choose a component that matches the actual task; content traits alone do not determine the component.',
241
+ },
242
+ {
243
+ guidance: false,
244
+ description:
245
+ 'Use a DropdownMenu for navigation; use a navigation component instead.',
246
+ },
247
+ {
248
+ guidance: false,
249
+ description:
250
+ 'Place more than 10–12 items in a single menu without grouping them into sections.',
251
+ },
133
252
  ],
134
253
  },
135
254
  };
@@ -138,12 +257,54 @@ export const docsZh = {
138
257
  export const docsDense = {
139
258
  description: 'dropdown menu for actionable items in popup',
140
259
  usage: {
141
- description: 'A dropdown menu that displays a list of actionable items in a popup triggered by a button. Use to present action options as a next step in a process, or to offer contextual actions without cluttering the interface.',
260
+ description:
261
+ 'A dropdown menu that displays a list of actionable items in a popup triggered by a button. Use to present action options as a next step in a process, or to offer contextual actions without cluttering the interface.',
142
262
  bestPractices: [
143
- { guidance: true, description: 'Keep menu items concise and action-oriented so users can scan options quickly.' },
144
- { guidance: true, description: 'Use sections and dividers to group related actions when the menu has many items.' },
145
- { guidance: false, description: 'Use a DropdownMenu for navigation; use a navigation component instead.' },
146
- { guidance: false, description: 'Place more than 10–12 items in a single menu without grouping them into sections.' },
263
+ {
264
+ guidance: true,
265
+ description:
266
+ 'Keep menu items concise and action-oriented so users can scan options quickly.',
267
+ },
268
+ {
269
+ guidance: true,
270
+ description:
271
+ 'Use sections and dividers to group related actions when the menu has many items.',
272
+ },
273
+ {
274
+ guidance: true,
275
+ description:
276
+ 'For a short, flat action set, use presentation="bottom-sheet" when product policy calls for a modal touch surface.',
277
+ },
278
+ {
279
+ guidance: true,
280
+ description:
281
+ 'Use presentation="adaptive" when the same short action set should remain anchored on pointer layouts and become a BottomSheet on compact coarse-pointer layouts.',
282
+ },
283
+ {
284
+ guidance: true,
285
+ description:
286
+ 'For a hierarchy that cannot fit as adjacent flyouts on a compact touch surface, a product may explicitly use a drill-in interaction with a Back action.',
287
+ },
288
+ {
289
+ guidance: true,
290
+ description:
291
+ 'Choose presentation explicitly in product code. A compact, coarse-pointer, hover-free media query is one useful policy, but DropdownMenu does not impose a universal device breakpoint.',
292
+ },
293
+ {
294
+ guidance: true,
295
+ description:
296
+ 'When the content is no longer a short list of immediate actions, reevaluate the interaction and choose a component that matches the actual task; content traits alone do not determine the component.',
297
+ },
298
+ {
299
+ guidance: false,
300
+ description:
301
+ 'Use a DropdownMenu for navigation; use a navigation component instead.',
302
+ },
303
+ {
304
+ guidance: false,
305
+ description:
306
+ 'Place more than 10–12 items in a single menu without grouping them into sections.',
307
+ },
147
308
  ],
148
309
  },
149
310
  };