carbon-react 162.10.0 → 162.11.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 (483) hide show
  1. package/esm/__internal__/character-count/character-count.style.js +1 -1
  2. package/esm/__internal__/checkable-input/checkable-input.style.js +1 -1
  3. package/esm/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
  4. package/esm/__internal__/error-border/error-border.style.js +1 -1
  5. package/esm/__internal__/field-help/field-help.style.js +1 -1
  6. package/esm/__internal__/fieldset/__next__/fieldset.style.js +1 -1
  7. package/esm/__internal__/fieldset/fieldset.style.js +1 -1
  8. package/esm/__internal__/form-field/form-field.style.js +1 -1
  9. package/esm/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
  10. package/esm/__internal__/hint-text/hint-text.style.js +1 -1
  11. package/esm/__internal__/input/input-style-overrides.style.d.ts +0 -1
  12. package/esm/__internal__/input/input-style-overrides.style.js +1 -1
  13. package/esm/__internal__/input/input.style.js +1 -1
  14. package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
  15. package/esm/__internal__/label/label.style.js +1 -1
  16. package/esm/__internal__/legacy-error-border/error-border.style.js +1 -1
  17. package/esm/__internal__/legacy-hint-text/hint-text.style.js +1 -1
  18. package/esm/__internal__/legacy-input/input-presentation.style.js +1 -1
  19. package/esm/__internal__/legacy-input/input.style.js +1 -1
  20. package/esm/__internal__/legacy-label/icon-wrapper.style.js +1 -1
  21. package/esm/__internal__/legacy-label/label.style.js +1 -1
  22. package/esm/__internal__/modal/modal.style.js +1 -1
  23. package/esm/__internal__/popover/popover.style.js +1 -1
  24. package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js +1 -1
  25. package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js +1 -1
  26. package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js +1 -1
  27. package/esm/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js +1 -1
  28. package/esm/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js +1 -1
  29. package/esm/__internal__/popover-menu/menu-item/menu-item.component.js +1 -1
  30. package/esm/__internal__/popover-menu/popover-menu.component.js +1 -1
  31. package/esm/__internal__/validation-message/__next__/validation-message.style.js +1 -1
  32. package/esm/__internal__/validation-message/validation-message.style.js +1 -1
  33. package/esm/__internal__/validations/validation-icon.style.js +1 -1
  34. package/esm/components/accordion/accordion.style.js +1 -1
  35. package/esm/components/action-popover/action-popover.style.js +1 -1
  36. package/esm/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
  37. package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
  38. package/esm/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
  39. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  40. package/esm/components/anchor-navigation/anchor-navigation.style.js +1 -1
  41. package/esm/components/anchor-navigation/anchor-section-divider.component.js +1 -1
  42. package/esm/components/badge/badge.style.js +1 -1
  43. package/esm/components/batch-selection/batch-selection.style.js +1 -1
  44. package/esm/components/box/box.style.js +1 -1
  45. package/esm/components/breadcrumbs/breadcrumbs.style.js +1 -1
  46. package/esm/components/breadcrumbs/crumb/crumb.style.js +1 -1
  47. package/esm/components/button/__next__/button.style.js +1 -1
  48. package/esm/components/button/button.style.js +1 -1
  49. package/esm/components/button-bar/button-bar.style.js +1 -1
  50. package/esm/components/button-minor/button-minor.style.js +1 -1
  51. package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
  52. package/esm/components/button-toggle/button-toggle.style.js +1 -1
  53. package/esm/components/card/card-column/card-column.style.js +1 -1
  54. package/esm/components/card/card-footer/card-footer.style.js +1 -1
  55. package/esm/components/card/card-row/card-row.style.js +1 -1
  56. package/esm/components/card/card.style.js +1 -1
  57. package/esm/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
  58. package/esm/components/checkbox/checkbox.style.js +1 -1
  59. package/esm/components/confirm/confirm.style.js +1 -1
  60. package/esm/components/content/content.style.js +1 -1
  61. package/esm/components/date/__internal__/date-picker/day-picker.style.js +1 -1
  62. package/esm/components/date/__internal__/navbar/button.style.js +1 -1
  63. package/esm/components/date/__internal__/navbar/navbar.style.js +1 -1
  64. package/esm/components/date/__internal__/weekday/abbr.style.js +1 -1
  65. package/esm/components/date/__internal__/weekday/weekday.style.js +1 -1
  66. package/esm/components/date/date.style.js +1 -1
  67. package/esm/components/date-range/date-range.style.js +1 -1
  68. package/esm/components/decimal/__internal__/decimal-popover-button.style.js +1 -1
  69. package/esm/components/decimal/decimal.style.js +1 -1
  70. package/esm/components/definition-list/definition-list.style.js +1 -1
  71. package/esm/components/detail/detail.style.js +1 -1
  72. package/esm/components/dialog/__internal__/__next__/dialog.style.js +1 -1
  73. package/esm/components/dismissible-box/dismissible-box.style.js +1 -1
  74. package/esm/components/divider/divider.component.d.ts +4 -1
  75. package/esm/components/divider/divider.component.js +1 -1
  76. package/esm/components/divider/divider.style.js +1 -1
  77. package/esm/components/draggable/draggable-item/draggable-item.style.js +1 -1
  78. package/esm/components/drawer/drawer.style.js +1 -1
  79. package/esm/components/duelling-picklist/duelling-picklist.style.js +1 -1
  80. package/esm/components/duelling-picklist/picklist/picklist.style.js +1 -1
  81. package/esm/components/duelling-picklist/picklist-divider/picklist-divider.style.js +1 -1
  82. package/esm/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
  83. package/esm/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
  84. package/esm/components/fieldset/fieldset.style.js +1 -1
  85. package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  86. package/esm/components/file-input/file-input.style.js +1 -1
  87. package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
  88. package/esm/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
  89. package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  90. package/esm/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
  91. package/esm/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  92. package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  93. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
  94. package/esm/components/flat-table/flat-table.style.js +1 -1
  95. package/esm/components/flat-table/sort/sort.style.js +1 -1
  96. package/esm/components/form/__internal__/form-summary.style.js +1 -1
  97. package/esm/components/form/form.style.js +1 -1
  98. package/esm/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
  99. package/esm/components/global-header/global-header.component.js +1 -1
  100. package/esm/components/grid/grid-container/grid-container.style.js +1 -1
  101. package/esm/components/grid/grid-item/grid-item.style.js +1 -1
  102. package/esm/components/heading/heading.style.js +1 -1
  103. package/esm/components/help/help.style.js +1 -1
  104. package/esm/components/hr/hr.style.js +1 -1
  105. package/esm/components/icon/icon.style.js +1 -1
  106. package/esm/components/icon-button/icon-button.style.js +1 -1
  107. package/esm/components/image/image.style.js +1 -1
  108. package/esm/components/inline-inputs/inline-inputs.style.js +1 -1
  109. package/esm/components/link/link.component.d.ts +0 -2
  110. package/esm/components/link/link.component.js +1 -1
  111. package/esm/components/link/link.style.d.ts +0 -1
  112. package/esm/components/link/link.style.js +1 -1
  113. package/esm/components/link-preview/__internal__/placeholder.component.js +1 -1
  114. package/esm/components/link-preview/link-preview.style.js +1 -1
  115. package/esm/components/loader/__next__/internal/star.style.js +1 -1
  116. package/esm/components/loader/__next__/loader.style.js +1 -1
  117. package/esm/components/loader/loader-square.style.js +1 -1
  118. package/esm/components/loader/loader.style.js +1 -1
  119. package/esm/components/loader-bar/loader-bar.style.js +1 -1
  120. package/esm/components/loader-spinner/loader-spinner.style.js +1 -1
  121. package/esm/components/loader-star/internal/star.style.js +1 -1
  122. package/esm/components/loader-star/loader-star.style.js +1 -1
  123. package/esm/components/menu/__internal__/menu-item-variant.context.d.ts +6 -0
  124. package/esm/components/menu/__internal__/menu-item-variant.context.js +1 -0
  125. package/esm/components/menu/__internal__/strict-menu.context.d.ts +2 -2
  126. package/esm/components/menu/__internal__/strict-menu.context.js +1 -1
  127. package/esm/components/menu/__internal__/submenu/submenu.component.d.ts +3 -11
  128. package/esm/components/menu/__internal__/submenu/submenu.component.js +1 -1
  129. package/esm/components/menu/__internal__/submenu/submenu.context.d.ts +1 -1
  130. package/esm/components/menu/__internal__/submenu/submenu.style.d.ts +15 -18
  131. package/esm/components/menu/__internal__/submenu/submenu.style.js +1 -1
  132. package/esm/components/menu/index.d.ts +1 -1
  133. package/esm/components/menu/menu-divider/menu-divider.component.js +1 -1
  134. package/esm/components/menu/menu-divider/menu-divider.style.d.ts +6 -4
  135. package/esm/components/menu/menu-divider/menu-divider.style.js +1 -1
  136. package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +1 -1
  137. package/esm/components/menu/menu-full-screen/menu-full-screen.style.d.ts +14 -14
  138. package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
  139. package/esm/components/menu/menu-item/menu-item.component.d.ts +10 -10
  140. package/esm/components/menu/menu-item/menu-item.component.js +1 -1
  141. package/esm/components/menu/menu-item/menu-item.style.d.ts +30 -21
  142. package/esm/components/menu/menu-item/menu-item.style.js +1 -1
  143. package/esm/components/menu/menu-segment-title/menu-segment-title.component.d.ts +4 -3
  144. package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +1 -1
  145. package/esm/components/menu/menu-segment-title/menu-segment-title.style.d.ts +6 -8
  146. package/esm/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  147. package/esm/components/menu/menu.component.d.ts +16 -2
  148. package/esm/components/menu/menu.component.js +1 -1
  149. package/esm/components/menu/menu.config.d.ts +10 -50
  150. package/esm/components/menu/menu.config.js +1 -1
  151. package/esm/components/menu/menu.style.d.ts +4 -13
  152. package/esm/components/menu/menu.style.js +1 -1
  153. package/esm/components/menu/scrollable-block/scrollable-block.component.d.ts +1 -1
  154. package/esm/components/menu/scrollable-block/scrollable-block.component.js +1 -1
  155. package/esm/components/menu/scrollable-block/scrollable-block.style.d.ts +5 -7
  156. package/esm/components/menu/scrollable-block/scrollable-block.style.js +1 -1
  157. package/esm/components/message/message.style.js +1 -1
  158. package/esm/components/multi-action-button/multi-action-button.style.js +1 -1
  159. package/esm/components/navigation-bar/navigation-bar.style.js +1 -1
  160. package/esm/components/note/note.style.js +1 -1
  161. package/esm/components/numeral-date/numeral-date.style.js +1 -1
  162. package/esm/components/option-tile/option-tile.style.js +1 -1
  163. package/esm/components/pager/__internal__/pagination-navigation.style.js +1 -1
  164. package/esm/components/pager/pager.style.js +1 -1
  165. package/esm/components/pages/page/page.style.js +1 -1
  166. package/esm/components/pages/pages.style.js +1 -1
  167. package/esm/components/password/password.style.js +1 -1
  168. package/esm/components/pill/pill.style.js +1 -1
  169. package/esm/components/pod/pod.style.js +1 -1
  170. package/esm/components/popover-container/popover-container.component.js +1 -1
  171. package/esm/components/popover-container/popover-container.style.js +1 -1
  172. package/esm/components/portal/portal.js +1 -1
  173. package/esm/components/portal/portal.style.js +1 -1
  174. package/esm/components/portrait/portrait.style.js +1 -1
  175. package/esm/components/preview/preview.style.js +1 -1
  176. package/esm/components/profile/profile.style.js +1 -1
  177. package/esm/components/progress-tracker/progress-tracker.style.js +1 -1
  178. package/esm/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
  179. package/esm/components/radio-button/radio-button.style.js +1 -1
  180. package/esm/components/search/__internal__/results-announcement.component.js +1 -1
  181. package/esm/components/search/search.component.d.ts +1 -0
  182. package/esm/components/search/search.component.js +1 -1
  183. package/esm/components/select/__internal__/list-action-button/list-action-button.style.js +1 -1
  184. package/esm/components/select/__internal__/select-list/select-list.style.js +1 -1
  185. package/esm/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
  186. package/esm/components/select/__internal__/utils/matching-text.style.js +1 -1
  187. package/esm/components/select/multi-select/multi-select.style.js +1 -1
  188. package/esm/components/select/option/option.style.js +1 -1
  189. package/esm/components/select/option-group-header/option-group-header.style.js +1 -1
  190. package/esm/components/select/option-row/option-row.style.js +1 -1
  191. package/esm/components/select/select.style.js +1 -1
  192. package/esm/components/settings-row/settings-row.style.js +1 -1
  193. package/esm/components/sidebar/__internal__/sidebar-content/sidebar-content.style.js +1 -1
  194. package/esm/components/sidebar/__internal__/sidebar-footer/sidebar-footer.style.js +1 -1
  195. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
  196. package/esm/components/sidebar/sidebar.style.js +1 -1
  197. package/esm/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
  198. package/esm/components/simple-color-picker/simple-color-picker.style.js +1 -1
  199. package/esm/components/split-button/split-button-toggle.style.js +1 -1
  200. package/esm/components/split-button/split-button.style.js +1 -1
  201. package/esm/components/step-flow/step-flow.style.js +1 -1
  202. package/esm/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
  203. package/esm/components/step-sequence/step-sequence.style.js +1 -1
  204. package/esm/components/switch/switch.style.js +1 -1
  205. package/esm/components/tabs/__next__/tabs.style.js +1 -1
  206. package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -1
  207. package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -1
  208. package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -1
  209. package/esm/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -1
  210. package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -1
  211. package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -1
  212. package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -1
  213. package/esm/components/text-editor/text-editor.style.js +1 -1
  214. package/esm/components/textarea/textarea.style.js +1 -1
  215. package/esm/components/textbox/__internal__/__next__/text-input.style.js +1 -1
  216. package/esm/components/tile/tile-footer/tile-footer.style.js +1 -1
  217. package/esm/components/tile/tile.style.js +1 -1
  218. package/esm/components/tile-select/__internal__/accordion/accordion.style.js +1 -1
  219. package/esm/components/tile-select/tile-select.style.js +1 -1
  220. package/esm/components/time/time.style.js +1 -1
  221. package/esm/components/toast/toast.style.js +1 -1
  222. package/esm/components/tokens-wrapper/tokens-wrapper.component.js +1 -1
  223. package/esm/components/tooltip/tooltip-pointer.style.js +1 -1
  224. package/esm/components/tooltip/tooltip.style.js +1 -1
  225. package/esm/components/typography/__internal__/__next__/typography.style.js +1 -1
  226. package/esm/components/typography/typography.style.js +1 -1
  227. package/esm/components/vertical-divider/vertical-divider.style.js +1 -1
  228. package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js +1 -1
  229. package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js +1 -1
  230. package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js +1 -1
  231. package/esm/components/vertical-menu/vertical-menu.style.js +1 -1
  232. package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
  233. package/lib/__internal__/character-count/character-count.style.js +1 -1
  234. package/lib/__internal__/checkable-input/checkable-input.style.js +1 -1
  235. package/lib/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
  236. package/lib/__internal__/error-border/error-border.style.js +1 -1
  237. package/lib/__internal__/field-help/field-help.style.js +1 -1
  238. package/lib/__internal__/fieldset/__next__/fieldset.style.js +1 -1
  239. package/lib/__internal__/fieldset/fieldset.style.js +1 -1
  240. package/lib/__internal__/form-field/form-field.style.js +1 -1
  241. package/lib/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
  242. package/lib/__internal__/hint-text/hint-text.style.js +1 -1
  243. package/lib/__internal__/input/input-style-overrides.style.d.ts +0 -1
  244. package/lib/__internal__/input/input-style-overrides.style.js +1 -1
  245. package/lib/__internal__/input/input.style.js +1 -1
  246. package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
  247. package/lib/__internal__/label/label.style.js +1 -1
  248. package/lib/__internal__/legacy-error-border/error-border.style.js +1 -1
  249. package/lib/__internal__/legacy-hint-text/hint-text.style.js +1 -1
  250. package/lib/__internal__/legacy-input/input-presentation.style.js +1 -1
  251. package/lib/__internal__/legacy-input/input.style.js +1 -1
  252. package/lib/__internal__/legacy-label/icon-wrapper.style.js +1 -1
  253. package/lib/__internal__/legacy-label/label.style.js +1 -1
  254. package/lib/__internal__/modal/modal.style.js +1 -1
  255. package/lib/__internal__/popover/popover.style.js +1 -1
  256. package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js +1 -1
  257. package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js +1 -1
  258. package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js +1 -1
  259. package/lib/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js +1 -1
  260. package/lib/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js +1 -1
  261. package/lib/__internal__/popover-menu/menu-item/menu-item.component.js +1 -1
  262. package/lib/__internal__/popover-menu/popover-menu.component.js +1 -1
  263. package/lib/__internal__/validation-message/__next__/validation-message.style.js +1 -1
  264. package/lib/__internal__/validation-message/validation-message.style.js +1 -1
  265. package/lib/__internal__/validations/validation-icon.style.js +1 -1
  266. package/lib/components/accordion/accordion.style.js +1 -1
  267. package/lib/components/action-popover/action-popover.style.js +1 -1
  268. package/lib/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
  269. package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
  270. package/lib/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
  271. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  272. package/lib/components/anchor-navigation/anchor-navigation.style.js +1 -1
  273. package/lib/components/anchor-navigation/anchor-section-divider.component.js +1 -1
  274. package/lib/components/badge/badge.style.js +1 -1
  275. package/lib/components/batch-selection/batch-selection.style.js +1 -1
  276. package/lib/components/box/box.style.js +1 -1
  277. package/lib/components/breadcrumbs/breadcrumbs.style.js +1 -1
  278. package/lib/components/breadcrumbs/crumb/crumb.style.js +1 -1
  279. package/lib/components/button/__next__/button.style.js +1 -1
  280. package/lib/components/button/button.style.js +1 -1
  281. package/lib/components/button-bar/button-bar.style.js +1 -1
  282. package/lib/components/button-minor/button-minor.style.js +1 -1
  283. package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
  284. package/lib/components/button-toggle/button-toggle.style.js +1 -1
  285. package/lib/components/card/card-column/card-column.style.js +1 -1
  286. package/lib/components/card/card-footer/card-footer.style.js +1 -1
  287. package/lib/components/card/card-row/card-row.style.js +1 -1
  288. package/lib/components/card/card.style.js +1 -1
  289. package/lib/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
  290. package/lib/components/checkbox/checkbox.style.js +1 -1
  291. package/lib/components/confirm/confirm.style.js +1 -1
  292. package/lib/components/content/content.style.js +1 -1
  293. package/lib/components/date/__internal__/date-picker/day-picker.style.js +1 -1
  294. package/lib/components/date/__internal__/navbar/button.style.js +1 -1
  295. package/lib/components/date/__internal__/navbar/navbar.style.js +1 -1
  296. package/lib/components/date/__internal__/weekday/abbr.style.js +1 -1
  297. package/lib/components/date/__internal__/weekday/weekday.style.js +1 -1
  298. package/lib/components/date/date.style.js +1 -1
  299. package/lib/components/date-range/date-range.style.js +1 -1
  300. package/lib/components/decimal/__internal__/decimal-popover-button.style.js +1 -1
  301. package/lib/components/decimal/decimal.style.js +1 -1
  302. package/lib/components/definition-list/definition-list.style.js +1 -1
  303. package/lib/components/detail/detail.style.js +1 -1
  304. package/lib/components/dialog/__internal__/__next__/dialog.style.js +1 -1
  305. package/lib/components/dismissible-box/dismissible-box.style.js +1 -1
  306. package/lib/components/divider/divider.component.d.ts +4 -1
  307. package/lib/components/divider/divider.component.js +1 -1
  308. package/lib/components/divider/divider.style.js +1 -1
  309. package/lib/components/draggable/draggable-item/draggable-item.style.js +1 -1
  310. package/lib/components/drawer/drawer.style.js +1 -1
  311. package/lib/components/duelling-picklist/duelling-picklist.style.js +1 -1
  312. package/lib/components/duelling-picklist/picklist/picklist.style.js +1 -1
  313. package/lib/components/duelling-picklist/picklist-divider/picklist-divider.style.js +1 -1
  314. package/lib/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
  315. package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
  316. package/lib/components/fieldset/fieldset.style.js +1 -1
  317. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  318. package/lib/components/file-input/file-input.style.js +1 -1
  319. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
  320. package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
  321. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  322. package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
  323. package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  324. package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  325. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
  326. package/lib/components/flat-table/flat-table.style.js +1 -1
  327. package/lib/components/flat-table/sort/sort.style.js +1 -1
  328. package/lib/components/form/__internal__/form-summary.style.js +1 -1
  329. package/lib/components/form/form.style.js +1 -1
  330. package/lib/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
  331. package/lib/components/global-header/global-header.component.js +1 -1
  332. package/lib/components/grid/grid-container/grid-container.style.js +1 -1
  333. package/lib/components/grid/grid-item/grid-item.style.js +1 -1
  334. package/lib/components/heading/heading.style.js +1 -1
  335. package/lib/components/help/help.style.js +1 -1
  336. package/lib/components/hr/hr.style.js +1 -1
  337. package/lib/components/icon/icon.style.js +1 -1
  338. package/lib/components/icon-button/icon-button.style.js +1 -1
  339. package/lib/components/image/image.style.js +1 -1
  340. package/lib/components/inline-inputs/inline-inputs.style.js +1 -1
  341. package/lib/components/link/link.component.d.ts +0 -2
  342. package/lib/components/link/link.component.js +1 -1
  343. package/lib/components/link/link.style.d.ts +0 -1
  344. package/lib/components/link/link.style.js +1 -1
  345. package/lib/components/link-preview/__internal__/placeholder.component.js +1 -1
  346. package/lib/components/link-preview/link-preview.style.js +1 -1
  347. package/lib/components/loader/__next__/internal/star.style.js +1 -1
  348. package/lib/components/loader/__next__/loader.style.js +1 -1
  349. package/lib/components/loader/loader-square.style.js +1 -1
  350. package/lib/components/loader/loader.style.js +1 -1
  351. package/lib/components/loader-bar/loader-bar.style.js +1 -1
  352. package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
  353. package/lib/components/loader-star/internal/star.style.js +1 -1
  354. package/lib/components/loader-star/loader-star.style.js +1 -1
  355. package/lib/components/menu/__internal__/menu-item-variant.context.d.ts +6 -0
  356. package/lib/components/menu/__internal__/menu-item-variant.context.js +1 -0
  357. package/lib/components/menu/__internal__/strict-menu.context.d.ts +2 -2
  358. package/lib/components/menu/__internal__/strict-menu.context.js +1 -1
  359. package/lib/components/menu/__internal__/submenu/submenu.component.d.ts +3 -11
  360. package/lib/components/menu/__internal__/submenu/submenu.component.js +1 -1
  361. package/lib/components/menu/__internal__/submenu/submenu.context.d.ts +1 -1
  362. package/lib/components/menu/__internal__/submenu/submenu.style.d.ts +15 -18
  363. package/lib/components/menu/__internal__/submenu/submenu.style.js +1 -1
  364. package/lib/components/menu/index.d.ts +1 -1
  365. package/lib/components/menu/menu-divider/menu-divider.component.js +1 -1
  366. package/lib/components/menu/menu-divider/menu-divider.style.d.ts +6 -4
  367. package/lib/components/menu/menu-divider/menu-divider.style.js +1 -1
  368. package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +1 -1
  369. package/lib/components/menu/menu-full-screen/menu-full-screen.style.d.ts +14 -14
  370. package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
  371. package/lib/components/menu/menu-item/menu-item.component.d.ts +10 -10
  372. package/lib/components/menu/menu-item/menu-item.component.js +1 -1
  373. package/lib/components/menu/menu-item/menu-item.style.d.ts +30 -21
  374. package/lib/components/menu/menu-item/menu-item.style.js +1 -1
  375. package/lib/components/menu/menu-segment-title/menu-segment-title.component.d.ts +4 -3
  376. package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +1 -1
  377. package/lib/components/menu/menu-segment-title/menu-segment-title.style.d.ts +6 -8
  378. package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  379. package/lib/components/menu/menu.component.d.ts +16 -2
  380. package/lib/components/menu/menu.component.js +1 -1
  381. package/lib/components/menu/menu.config.d.ts +10 -50
  382. package/lib/components/menu/menu.config.js +1 -1
  383. package/lib/components/menu/menu.style.d.ts +4 -13
  384. package/lib/components/menu/menu.style.js +1 -1
  385. package/lib/components/menu/scrollable-block/scrollable-block.component.d.ts +1 -1
  386. package/lib/components/menu/scrollable-block/scrollable-block.component.js +1 -1
  387. package/lib/components/menu/scrollable-block/scrollable-block.style.d.ts +5 -7
  388. package/lib/components/menu/scrollable-block/scrollable-block.style.js +1 -1
  389. package/lib/components/message/message.style.js +1 -1
  390. package/lib/components/multi-action-button/multi-action-button.style.js +1 -1
  391. package/lib/components/navigation-bar/navigation-bar.style.js +1 -1
  392. package/lib/components/note/note.style.js +1 -1
  393. package/lib/components/numeral-date/numeral-date.style.js +1 -1
  394. package/lib/components/option-tile/option-tile.style.js +1 -1
  395. package/lib/components/pager/__internal__/pagination-navigation.style.js +1 -1
  396. package/lib/components/pager/pager.style.js +1 -1
  397. package/lib/components/pages/page/page.style.js +1 -1
  398. package/lib/components/pages/pages.style.js +1 -1
  399. package/lib/components/password/password.style.js +1 -1
  400. package/lib/components/pill/pill.style.js +1 -1
  401. package/lib/components/pod/pod.style.js +1 -1
  402. package/lib/components/popover-container/popover-container.component.js +1 -1
  403. package/lib/components/popover-container/popover-container.style.js +1 -1
  404. package/lib/components/portal/portal.js +1 -1
  405. package/lib/components/portal/portal.style.js +1 -1
  406. package/lib/components/portrait/portrait.style.js +1 -1
  407. package/lib/components/preview/preview.style.js +1 -1
  408. package/lib/components/profile/profile.style.js +1 -1
  409. package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
  410. package/lib/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
  411. package/lib/components/radio-button/radio-button.style.js +1 -1
  412. package/lib/components/search/__internal__/results-announcement.component.js +1 -1
  413. package/lib/components/search/search.component.d.ts +1 -0
  414. package/lib/components/search/search.component.js +1 -1
  415. package/lib/components/select/__internal__/list-action-button/list-action-button.style.js +1 -1
  416. package/lib/components/select/__internal__/select-list/select-list.style.js +1 -1
  417. package/lib/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
  418. package/lib/components/select/__internal__/utils/matching-text.style.js +1 -1
  419. package/lib/components/select/multi-select/multi-select.style.js +1 -1
  420. package/lib/components/select/option/option.style.js +1 -1
  421. package/lib/components/select/option-group-header/option-group-header.style.js +1 -1
  422. package/lib/components/select/option-row/option-row.style.js +1 -1
  423. package/lib/components/select/select.style.js +1 -1
  424. package/lib/components/settings-row/settings-row.style.js +1 -1
  425. package/lib/components/sidebar/__internal__/sidebar-content/sidebar-content.style.js +1 -1
  426. package/lib/components/sidebar/__internal__/sidebar-footer/sidebar-footer.style.js +1 -1
  427. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
  428. package/lib/components/sidebar/sidebar.style.js +1 -1
  429. package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
  430. package/lib/components/simple-color-picker/simple-color-picker.style.js +1 -1
  431. package/lib/components/split-button/split-button-toggle.style.js +1 -1
  432. package/lib/components/split-button/split-button.style.js +1 -1
  433. package/lib/components/step-flow/step-flow.style.js +1 -1
  434. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
  435. package/lib/components/step-sequence/step-sequence.style.js +1 -1
  436. package/lib/components/switch/switch.style.js +1 -1
  437. package/lib/components/tabs/__next__/tabs.style.js +1 -1
  438. package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -1
  439. package/lib/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -1
  440. package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -1
  441. package/lib/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -1
  442. package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -1
  443. package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -1
  444. package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -1
  445. package/lib/components/text-editor/text-editor.style.js +1 -1
  446. package/lib/components/textarea/textarea.style.js +1 -1
  447. package/lib/components/textbox/__internal__/__next__/text-input.style.js +1 -1
  448. package/lib/components/tile/tile-footer/tile-footer.style.js +1 -1
  449. package/lib/components/tile/tile.style.js +1 -1
  450. package/lib/components/tile-select/__internal__/accordion/accordion.style.js +1 -1
  451. package/lib/components/tile-select/tile-select.style.js +1 -1
  452. package/lib/components/time/time.style.js +1 -1
  453. package/lib/components/toast/toast.style.js +1 -1
  454. package/lib/components/tokens-wrapper/tokens-wrapper.component.js +1 -1
  455. package/lib/components/tooltip/tooltip-pointer.style.js +1 -1
  456. package/lib/components/tooltip/tooltip.style.js +1 -1
  457. package/lib/components/typography/__internal__/__next__/typography.style.js +1 -1
  458. package/lib/components/typography/typography.style.js +1 -1
  459. package/lib/components/vertical-divider/vertical-divider.style.js +1 -1
  460. package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js +1 -1
  461. package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js +1 -1
  462. package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js +1 -1
  463. package/lib/components/vertical-menu/vertical-menu.style.js +1 -1
  464. package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
  465. package/package.json +1 -1
  466. package/esm/components/menu/menu-segment-title/menu-segment-title.context.d.ts +0 -7
  467. package/esm/components/menu/menu-segment-title/menu-segment-title.context.js +0 -1
  468. package/esm/components/menu/menu.types.d.ts +0 -9
  469. package/esm/components/search/__internal__/legacy/search-button.style.d.ts +0 -5
  470. package/esm/components/search/__internal__/legacy/search-button.style.js +0 -1
  471. package/esm/components/search/__internal__/legacy/search.component.d.ts +0 -71
  472. package/esm/components/search/__internal__/legacy/search.component.js +0 -1
  473. package/esm/components/search/__internal__/legacy/search.style.d.ts +0 -13
  474. package/esm/components/search/__internal__/legacy/search.style.js +0 -1
  475. package/lib/components/menu/menu-segment-title/menu-segment-title.context.d.ts +0 -7
  476. package/lib/components/menu/menu-segment-title/menu-segment-title.context.js +0 -1
  477. package/lib/components/menu/menu.types.d.ts +0 -9
  478. package/lib/components/search/__internal__/legacy/search-button.style.d.ts +0 -5
  479. package/lib/components/search/__internal__/legacy/search-button.style.js +0 -1
  480. package/lib/components/search/__internal__/legacy/search.component.d.ts +0 -71
  481. package/lib/components/search/__internal__/legacy/search.component.js +0 -1
  482. package/lib/components/search/__internal__/legacy/search.style.d.ts +0 -13
  483. package/lib/components/search/__internal__/legacy/search.style.js +0 -1
@@ -1 +1 @@
1
- import e,{keyframes as o,css as r}from"styled-components";import{margin as t}from"styled-system";import a from"../../style/themes/apply-base-theme.js";function n(e){switch(e){case"small":return"4px";case"large":return"16px";default:return"8px"}}const i="128px",s=e.div.attrs(a).withConfig({displayName:"loader-bar.style__StyledLoader",componentId:"carbon_v162_9_1__sc-290b8a7-0"})([""," text-align:center;"],t),l=o(["0%{left:-",";}100%{left:100%;}"],i),d=e.div.withConfig({displayName:"loader-bar.style__StyledLoaderBar",componentId:"carbon_v162_9_1__sc-290b8a7-1"})(["",""],(({size:e})=>r(["border-radius:var(--borderRadius400);height:",";width:100%;background-color:var(--colorsActionMajor150);overflow:hidden;position:relative;"],n(e)))),c=e.div.withConfig({displayName:"loader-bar.style__InnerBar",componentId:"carbon_v162_9_1__sc-290b8a7-2"})(["",""],(({size:e})=>r(["position:absolute;background-color:var(--colorsActionMajor500);width:",";height:",";animation:2s "," linear 0s infinite normal none running;"],i,n(e),l)));export{c as InnerBar,s as StyledLoader,d as default};
1
+ import e,{keyframes as o,css as r}from"styled-components";import{margin as t}from"styled-system";import a from"../../style/themes/apply-base-theme.js";function n(e){switch(e){case"small":return"4px";case"large":return"16px";default:return"8px"}}const i="128px",s=e.div.attrs(a).withConfig({displayName:"loader-bar.style__StyledLoader",componentId:"carbon_v162_10_0__sc-290b8a7-0"})([""," text-align:center;"],t),l=o(["0%{left:-",";}100%{left:100%;}"],i),d=e.div.withConfig({displayName:"loader-bar.style__StyledLoaderBar",componentId:"carbon_v162_10_0__sc-290b8a7-1"})(["",""],(({size:e})=>r(["border-radius:var(--borderRadius400);height:",";width:100%;background-color:var(--colorsActionMajor150);overflow:hidden;position:relative;"],n(e)))),c=e.div.withConfig({displayName:"loader-bar.style__InnerBar",componentId:"carbon_v162_10_0__sc-290b8a7-2"})(["",""],(({size:e})=>r(["position:absolute;background-color:var(--colorsActionMajor500);width:",";height:",";animation:2s "," linear 0s infinite normal none running;"],i,n(e),l)));export{c as InnerBar,s as StyledLoader,d as default};
@@ -1 +1 @@
1
- import r,{css as e}from"styled-components";import{margin as t}from"styled-system";import{LOADER_SPINNER_SIZE_PARAMS as a}from"./loader-spinner.config.js";import{Typography as n}from"../typography/typography.component.js";import"react/jsx-runtime";import"react";const o=(r,e)=>{switch(e){case"neutral":return r?"var(--colorsSemanticNeutral500)":"var(--colorsSemanticNeutral200)";case"gradient-grey":return r?"#00D639":"#0000001A";case"gradient-white":return r?"#00D639":"var(--colorsActionMajorYang100)";case"inverse":return"var(--colorsActionMajorYang100)";default:return r?"var(--colorsActionMajor500)":"var(--colorsActionMajor150)"}},i=r.div.withConfig({displayName:"loader-spinner.style__StyledSpinnerWrapper",componentId:"carbon_v162_9_1__sc-fe9a4dc0-0"})([""," display:flex;flex-direction:",";"],t,(({size:r})=>"extra-small"===r?"row":"column")),s=r(n).withConfig({displayName:"loader-spinner.style__StyledLabel",componentId:"carbon_v162_9_1__sc-fe9a4dc0-1"})(["",""],(({$size:r})=>e(["display:flex;justify-content:center;text-align:center;",";"],"extra-small"===r?"margin-left: var(--spacing100)":`margin-top: ${a[r].labelMarginTop}px`))),c=r.svg.withConfig({displayName:"loader-spinner.style__StyledSpinnerCircleSvg",componentId:"carbon_v162_9_1__sc-fe9a4dc0-2"})(["",";"],(({size:r,isTracked:t,hasMotion:n,isGradientVariant:i,animationTime:s,variant:c})=>{const d=`${a[r].wrapperDimensions}px`;return r&&e(["height:",";min-height:",';circle[data-role="outer-arc"]{fill:transparent;stroke-width:',"px;stroke:",";",' cx:12px;cy:12px;r:10px;}circle[data-role="inner-arc"]{fill:transparent;stroke-width:',"px;stroke:",";stroke-linecap:round;stroke-dasharray:100px;stroke-dashoffset:80px;transform-origin:12px 12px 0px;cx:12px;cy:12px;r:10px;transform:rotate(270deg);@keyframes gradientAnimation{0%{stroke:#00d639;}33%{stroke:#11afff;}66%{stroke:#8f49fe;}}@keyframes trackedAnimation{from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}}@keyframes untrackedAnimation{0%{transform:rotate(0deg);stroke-dasharray:100;}40%{stroke-dasharray:80;}80%{stroke-dasharray:100;}100%{transform:rotate(360deg);}}animation-name:",",",";",";animation-timing-function:cubic-bezier(0.2,0.1,0.8,1);animation-iteration-count:",";"],d,d,a[r].strokeWidth,o(!1,c),"inverse"===c&&"stroke-opacity: 0.3;",a[r].strokeWidth,o(!0,c),t&&!i?"trackedAnimation":"untrackedAnimation","gradient-grey"===c||"gradient-white"===c?"gradientAnimation":"none",n&&`animation-duration: ${s}s`,n?"infinite":"none")}));export{s as StyledLabel,c as StyledSpinnerCircleSvg,i as StyledSpinnerWrapper};
1
+ import r,{css as e}from"styled-components";import{margin as t}from"styled-system";import{LOADER_SPINNER_SIZE_PARAMS as a}from"./loader-spinner.config.js";import{Typography as n}from"../typography/typography.component.js";import"react/jsx-runtime";import"react";const o=(r,e)=>{switch(e){case"neutral":return r?"var(--colorsSemanticNeutral500)":"var(--colorsSemanticNeutral200)";case"gradient-grey":return r?"#00D639":"#0000001A";case"gradient-white":return r?"#00D639":"var(--colorsActionMajorYang100)";case"inverse":return"var(--colorsActionMajorYang100)";default:return r?"var(--colorsActionMajor500)":"var(--colorsActionMajor150)"}},i=r.div.withConfig({displayName:"loader-spinner.style__StyledSpinnerWrapper",componentId:"carbon_v162_10_0__sc-fe9a4dc0-0"})([""," display:flex;flex-direction:",";"],t,(({size:r})=>"extra-small"===r?"row":"column")),s=r(n).withConfig({displayName:"loader-spinner.style__StyledLabel",componentId:"carbon_v162_10_0__sc-fe9a4dc0-1"})(["",""],(({$size:r})=>e(["display:flex;justify-content:center;text-align:center;",";"],"extra-small"===r?"margin-left: var(--spacing100)":`margin-top: ${a[r].labelMarginTop}px`))),c=r.svg.withConfig({displayName:"loader-spinner.style__StyledSpinnerCircleSvg",componentId:"carbon_v162_10_0__sc-fe9a4dc0-2"})(["",";"],(({size:r,isTracked:t,hasMotion:n,isGradientVariant:i,animationTime:s,variant:c})=>{const d=`${a[r].wrapperDimensions}px`;return r&&e(["height:",";min-height:",';circle[data-role="outer-arc"]{fill:transparent;stroke-width:',"px;stroke:",";",' cx:12px;cy:12px;r:10px;}circle[data-role="inner-arc"]{fill:transparent;stroke-width:',"px;stroke:",";stroke-linecap:round;stroke-dasharray:100px;stroke-dashoffset:80px;transform-origin:12px 12px 0px;cx:12px;cy:12px;r:10px;transform:rotate(270deg);@keyframes gradientAnimation{0%{stroke:#00d639;}33%{stroke:#11afff;}66%{stroke:#8f49fe;}}@keyframes trackedAnimation{from{stroke-dasharray:100;stroke-dashoffset:100;}to{stroke-dasharray:100;stroke-dashoffset:20;}}@keyframes untrackedAnimation{0%{transform:rotate(0deg);stroke-dasharray:100;}40%{stroke-dasharray:80;}80%{stroke-dasharray:100;}100%{transform:rotate(360deg);}}animation-name:",",",";",";animation-timing-function:cubic-bezier(0.2,0.1,0.8,1);animation-iteration-count:",";"],d,d,a[r].strokeWidth,o(!1,c),"inverse"===c&&"stroke-opacity: 0.3;",a[r].strokeWidth,o(!0,c),t&&!i?"trackedAnimation":"untrackedAnimation","gradient-grey"===c||"gradient-white"===c?"gradientAnimation":"none",n&&`animation-duration: ${s}s`,n?"infinite":"none")}));export{s as StyledLabel,c as StyledSpinnerCircleSvg,i as StyledSpinnerWrapper};
@@ -1 +1 @@
1
- import a,{keyframes as t}from"styled-components";const o=t(["0%{transform:translate3d(0px,0px,0px) scale(0.3);opacity:0;}10%{transform:translate3d(0px,0px,0px) scale(0.3);opacity:0;}20%{transform:translate3d(0px,0px,0px) scale(0.6);opacity:1;}35%{transform:translate3d(0px,0px,0px) scale(0.6);opacity:1;}55%{transform:translate3d(16px,-12px,0px) scale(1.4);opacity:1;}60%{transform:translate3d(16px,-12px,0px) scale(1.4);opacity:1;}90%{transform:translate3d(0px,-24px,0px) scale(0.8);opacity:1;}100%{transform:translate3d(0px,-24px,0px) scale(0.6);opacity:0;}"]),i=t(["0%{stop-color:#13a038;}10%{stop-color:#13a038;}50%{stop-color:#0092db;}90%{stop-color:#8f49fe;}100%{stop-color:#8f49fe;}"]),s=t(["0%{stop-color:#13a038;}10%{stop-color:#13a038;}50%{stop-color:#13a038;}90%{stop-color:#0092db;}100%{stop-color:#0092db;}"]),n="3s",r=a.svg.withConfig({displayName:"star.style__StyledStarSVG",componentId:"carbon_v162_9_1__sc-1b60e449-0"})(["animation:"," "," ease-in-out forwards infinite;height:var(--sizing200);opacity:0;width:var(--sizing200);"],o,n),e=a.stop.withConfig({displayName:"star.style__GradientStopTop",componentId:"carbon_v162_9_1__sc-1b60e449-1"})(["animation:"," "," ease-in-out forwards infinite;"],i,n),p=a.stop.withConfig({displayName:"star.style__GradientStopBottom",componentId:"carbon_v162_9_1__sc-1b60e449-2"})(["animation:"," "," ease-in-out forwards infinite;"],s,n),l=a.div.withConfig({displayName:"star.style__StyledLoaderStarContainer",componentId:"carbon_v162_9_1__sc-1b60e449-3"})(["bottom:0;height:var(--sizing200);left:0;position:absolute;width:var(--sizing200);&.star-1{.ai-star-path{fill:url(#gradient1);}","{animation-delay:-2s;}#gradient1{","{animation-delay:-2s;}","{animation-delay:-2s;}}}&.star-2{.ai-star-path{fill:url(#gradient2);}","{animation-delay:-1s;}#gradient2{","{animation-delay:-1s;}","{animation-delay:-1s;}}}&.star-3{.ai-star-path{fill:url(#gradient3);}","{animation-delay:0s;}#gradient3{","{animation-delay:0s;}","{animation-delay:0s;}}}"],r,e,p,r,e,p,r,e,p);export{p as GradientStopBottom,e as GradientStopTop,l as StyledLoaderStarContainer,r as StyledStarSVG};
1
+ import a,{keyframes as t}from"styled-components";const o=t(["0%{transform:translate3d(0px,0px,0px) scale(0.3);opacity:0;}10%{transform:translate3d(0px,0px,0px) scale(0.3);opacity:0;}20%{transform:translate3d(0px,0px,0px) scale(0.6);opacity:1;}35%{transform:translate3d(0px,0px,0px) scale(0.6);opacity:1;}55%{transform:translate3d(16px,-12px,0px) scale(1.4);opacity:1;}60%{transform:translate3d(16px,-12px,0px) scale(1.4);opacity:1;}90%{transform:translate3d(0px,-24px,0px) scale(0.8);opacity:1;}100%{transform:translate3d(0px,-24px,0px) scale(0.6);opacity:0;}"]),i=t(["0%{stop-color:#13a038;}10%{stop-color:#13a038;}50%{stop-color:#0092db;}90%{stop-color:#8f49fe;}100%{stop-color:#8f49fe;}"]),s=t(["0%{stop-color:#13a038;}10%{stop-color:#13a038;}50%{stop-color:#13a038;}90%{stop-color:#0092db;}100%{stop-color:#0092db;}"]),n="3s",r=a.svg.withConfig({displayName:"star.style__StyledStarSVG",componentId:"carbon_v162_10_0__sc-1b60e449-0"})(["animation:"," "," ease-in-out forwards infinite;height:var(--sizing200);opacity:0;width:var(--sizing200);"],o,n),e=a.stop.withConfig({displayName:"star.style__GradientStopTop",componentId:"carbon_v162_10_0__sc-1b60e449-1"})(["animation:"," "," ease-in-out forwards infinite;"],i,n),p=a.stop.withConfig({displayName:"star.style__GradientStopBottom",componentId:"carbon_v162_10_0__sc-1b60e449-2"})(["animation:"," "," ease-in-out forwards infinite;"],s,n),l=a.div.withConfig({displayName:"star.style__StyledLoaderStarContainer",componentId:"carbon_v162_10_0__sc-1b60e449-3"})(["bottom:0;height:var(--sizing200);left:0;position:absolute;width:var(--sizing200);&.star-1{.ai-star-path{fill:url(#gradient1);}","{animation-delay:-2s;}#gradient1{","{animation-delay:-2s;}","{animation-delay:-2s;}}}&.star-2{.ai-star-path{fill:url(#gradient2);}","{animation-delay:-1s;}#gradient2{","{animation-delay:-1s;}","{animation-delay:-1s;}}}&.star-3{.ai-star-path{fill:url(#gradient3);}","{animation-delay:0s;}#gradient3{","{animation-delay:0s;}","{animation-delay:0s;}}}"],r,e,p,r,e,p,r,e,p);export{p as GradientStopBottom,e as GradientStopTop,l as StyledLoaderStarContainer,r as StyledStarSVG};
@@ -1 +1 @@
1
- import t from"styled-components";import{Typography as e}from"../typography/typography.component.js";import"react/jsx-runtime";import"react";const o=t.div.withConfig({displayName:"loader-star.style__StyledLoaderStarWrapper",componentId:"carbon_v162_9_1__sc-d84f526-0"})(["position:relative;width:max-content;"]),r=t(e).withConfig({displayName:"loader-star.style__StyledLabel",componentId:"carbon_v162_9_1__sc-d84f526-1"})(["display:flex;justify-content:center;text-align:center;"]),a=t.div.withConfig({displayName:"loader-star.style__StyledStars",componentId:"carbon_v162_9_1__sc-d84f526-2"})(["width:40px;height:40px;"]);export{r as StyledLabel,o as StyledLoaderStarWrapper,a as StyledStars};
1
+ import t from"styled-components";import{Typography as e}from"../typography/typography.component.js";import"react/jsx-runtime";import"react";const o=t.div.withConfig({displayName:"loader-star.style__StyledLoaderStarWrapper",componentId:"carbon_v162_10_0__sc-d84f526-0"})(["position:relative;width:max-content;"]),r=t(e).withConfig({displayName:"loader-star.style__StyledLabel",componentId:"carbon_v162_10_0__sc-d84f526-1"})(["display:flex;justify-content:center;text-align:center;"]),a=t.div.withConfig({displayName:"loader-star.style__StyledStars",componentId:"carbon_v162_10_0__sc-d84f526-2"})(["width:40px;height:40px;"]);export{r as StyledLabel,o as StyledLoaderStarWrapper,a as StyledStars};
@@ -0,0 +1,6 @@
1
+ import { VariantType } from "../menu-item/menu-item.component";
2
+ interface VariantContextType {
3
+ menuItemVariant?: VariantType;
4
+ }
5
+ declare const _default: import("react").Context<VariantContextType>;
6
+ export default _default;
@@ -0,0 +1 @@
1
+ import{createContext as r}from"react";var a=r({});export{a as default};
@@ -1,6 +1,6 @@
1
- import type { MenuType } from "../menu.types";
1
+ import { MenuVariantType } from "../menu.component";
2
2
  export interface StrictMenuContextType {
3
- menuType: MenuType;
3
+ menuVariant: MenuVariantType;
4
4
  openSubmenuId: string | null;
5
5
  inFullscreenView?: boolean;
6
6
  setOpenSubmenuId: (id: string | null) => void;
@@ -1 +1 @@
1
- import e from"../../../__internal__/utils/createStrictContext/createStrictContext.js";const[t,n]=e({name:"MenuContext",errorMessage:"Carbon Menu: Context not found. Have you wrapped your Carbon subcomponents properly? See stack trace for more details.",defaultValue:{menuType:"light",openSubmenuId:null,setOpenSubmenuId:()=>{}}});export{t as StrictMenuProvider,n as useStrictMenuContext};
1
+ import e from"../../../__internal__/utils/createStrictContext/createStrictContext.js";const[t,n]=e({name:"MenuContext",errorMessage:"Carbon Menu: Context not found. Have you wrapped your Carbon subcomponents properly? See stack trace for more details.",defaultValue:{menuVariant:"white",openSubmenuId:null,setOpenSubmenuId:()=>{}}});export{t as StrictMenuProvider,n as useStrictMenuContext};
@@ -6,22 +6,14 @@ export interface SubmenuProps {
6
6
  children: React.ReactNode;
7
7
  /** Custom className */
8
8
  className?: string;
9
- /**
10
- * * <a href="https://brand.sage.com/d/NdbrveWvNheA/foundations#/icons/icons" target="_blank">List of supported icons</a>
11
- *
12
- * Adds an icon to the menu item.
13
- * */
14
- icon?: string;
15
9
  /** Defines which direction the submenu will hang eg. left/right */
16
10
  submenuDirection?: string;
17
11
  /** A title for the menu item that has a submenu. */
18
12
  title?: React.ReactNode;
19
13
  /** onKeyDown handler */
20
14
  onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
21
- /** set the colour variant for a menuType */
15
+ /** Set the variant of the Submenu */
22
16
  variant?: VariantType;
23
- /** Flag to display the dropdown arrow when an item has a submenu */
24
- showDropdownArrow?: boolean;
25
17
  /** When set the submenu opens by click instead of hover */
26
18
  clickToOpen?: boolean;
27
19
  /** The href to use for the menu item. */
@@ -36,12 +28,12 @@ export interface SubmenuProps {
36
28
  onSubmenuClose?: () => void;
37
29
  /** Callback triggered when the top-level menu item is clicked */
38
30
  onClick?: (event: React.MouseEvent<HTMLAnchorElement> | React.MouseEvent<HTMLButtonElement>) => void;
39
- /** Accessible label for when no text children are passed to menu item */
40
- ariaLabel?: string;
41
31
  /** Sets the max-width of the submenu container element */
42
32
  submenuMaxWidth?: string;
43
33
  /** Sets the min-width of the submenu container element */
44
34
  submenuMinWidth?: string;
35
+ /** Is the menu item the currently selected item. */
36
+ selected?: boolean;
45
37
  }
46
38
  declare const Submenu: React.ForwardRefExoticComponent<SubmenuProps & React.RefAttributes<HTMLAnchorElement>>;
47
39
  export default Submenu;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import n,{useState as r,useRef as o,useContext as i,useMemo as u,useCallback as l,useEffect as a}from"react";import s from"../../menu-item/menu-item.style.js";import{StyledSubmenuWrapper as c,StyledSubmenu as m}from"./submenu.style.js";import p from"../../../../__internal__/utils/helpers/events/events.js";import{useStrictMenuContext as d}from"../strict-menu.context.js";import{characterNavigation as b}from"../keyboard-navigation/index.js";import f from"./submenu.context.js";import y from"../../../../__internal__/utils/helpers/guid/index.js";import{BLOCK_INDEX_SELECTOR as h,SCROLLABLE_BLOCK as v,SCROLLABLE_BLOCK_PARENT as g,ALL_CHILDREN_SELECTOR as O}from"../locators.js";import w from"../../../../hooks/__internal__/useStableCallback/useStableCallback.js";import S from"../../../navigation-bar/__internal__/fixed-navigation-bar.context.js";import{defaultFocusableSelectors as j}from"../../../../__internal__/focus-trap/focus-trap-utils.js";function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){x(e,t,n[t])}))}return e}function P(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const A=n.forwardRef(((n,x)=>{var{children:A,className:_,title:T,icon:k,submenuDirection:I="right",onKeyDown:K,variant:C="default",showDropdownArrow:E=!0,clickToOpen:F,href:M,maxWidth:q,asPassiveItem:W,onSubmenuOpen:R,onSubmenuClose:V,onClick:H,submenuMaxWidth:L,submenuMinWidth:N}=n,$=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,["children","className","title","icon","submenuDirection","onKeyDown","variant","showDropdownArrow","clickToOpen","href","maxWidth","asPassiveItem","onSubmenuOpen","onSubmenuClose","onClick","submenuMaxWidth","submenuMinWidth"]);const[B,U]=r(null),z=o(y()),{inFullscreenView:G,openSubmenuId:J,setOpenSubmenuId:Q,menuType:X}=d(),[Y,Z]=r(!1),[ee,te]=r(null),[ne,re]=r([]),[oe,ie]=r(""),[ue,le]=r(!1),[ae,se]=r(!1),ce=ne.length,{submenuMaxHeight:me}=i(S),pe=w(R),de=u((()=>{const e=null==B?void 0:B.querySelectorAll(h);if(e&&Y&&ce){const t=Array.from(e),n=null==B?void 0:B.querySelector(`[data-component='${v}']`),r=n?t.indexOf(n):-1;return(null==n?void 0:n.querySelector(`[data-component='${g}']`))?r+1:r}return-1}),[Y,ce,B]),be=o(null),fe=l((()=>{be.current=setTimeout((()=>{ie("")}),1500)}),[]),ye=l((()=>{be.current&&clearTimeout(be.current),fe()}),[fe]);a((()=>()=>{be.current&&clearTimeout(be.current)}),[]);const he=l((()=>{Z(!0),Q(z.current)}),[Q]),ve=o();a((()=>{Y&&B&&(()=>{var e;if(!B)return;const t=Array.from(B.querySelectorAll("[data-component='menu-item']")||[]),n=t.length>0?t[t.length-1]:null;ve.current=null!=n?n:void 0,B.querySelectorAll("[data-last-visible-menu-item]").forEach((e=>e.removeAttribute("data-last-visible-menu-item"))),n&&n.setAttribute("data-last-visible-menu-item","true");const r=Array.from(B.querySelectorAll("ul:not([data-component='submenu'])")||[]);if(0===r.length)return le(!1),void se(!1);const o=r[r.length-1],i=(null==o||null===(e=o.parentElement)||void 0===e?void 0:e.dataset.component)===v,u=Array.from(o.querySelectorAll("[data-component='menu-item']")||[]),l=u.length>0?u[u.length-1]:null;let a=!1;l&&o&&(a=l.getBoundingClientRect().bottom<o.getBoundingClientRect().bottom);const s=!!l&&!!n&&l===n;le(s),se(s&&!i||s&&i&&!a)})()}),[Y,B,ce]),a((()=>{Y&&pe&&pe()}),[Y,pe]);const ge=l((()=>{Z(!1),te(null),V&&V(),ie("")}),[V]);a((()=>{J&&J!==z.current&&ge()}),[J,ge]);const Oe=l((e=>ne.findIndex((t=>t===e))),[ne]),we=l((e=>{const t=p.isEnterKey(e)||p.isSpaceKey(e);if(!t&&!p.isDownKey(e)||Y||(e.preventDefault(),he()),Y){const n=Oe(ee);let r=n;if(ee||((t&&!M||p.isSpaceKey(e)&&M)&&(e.preventDefault(),ge()),p.isShiftKey(e)&&p.isTabKey(e)&&ge()),p.isDownKey(e)&&(e.preventDefault(),r<ce-1&&(r+=1)),p.isUpKey(e)&&(e.preventDefault(),le(!1),r>0&&(r-=1)),p.isEscKey(e))return null==K||K(e),void ge();p.isHomeKey(e)&&(e.preventDefault(),e.stopPropagation(),r=0),p.isEndKey(e)&&(e.preventDefault(),e.stopPropagation(),r=ce-1),1===e.key.length?(e.stopPropagation(),be.current?ye():fe(),ie(`${oe}${e.key.toLowerCase()}`)):ie(""),p.composedPath(e.nativeEvent).find((e=>e instanceof HTMLElement&&("input"===e.getAttribute("data-element")||"input-icon-toggle"===e.getAttribute("data-element"))))||p.isEnterKey(e)&&setTimeout((()=>ge()),0),r!==n&&te(ne[r])}}),[ne,Y,M,ce,ee,Oe,he,ge,K,oe,ye,fe]);return a((()=>{if(B&&A){const e=null==B?void 0:B.querySelectorAll(O);e&&re(Array.from(e).filter((e=>e.querySelector(j))).map((e=>e.getAttribute("id"))))}}),[A,Y,B]),a((()=>{const e=null==B?void 0:B.querySelectorAll(O);if(e&&""!==oe){const t=Array.from(e),n=b(oe,t);n&&te(n.id)}}),[B,oe,ne]),e(c,G?{"data-component":"submenu-wrapper",inFullscreenView:G,asPassiveItem:W,menuType:X,children:[t(s,P(D({},$),{onClick:W?void 0:H,className:_,menuType:X,ref:x,href:M,menuItemVariant:C,inFullscreenView:G,asDiv:W,children:T})),t(m,{"data-component":"submenu",variant:C,menuType:X,inFullscreenView:G,ref:U,applyFocusRadiusStyling:!1,applyFocusRadiusStylingToLastItem:ae,children:t(f.Provider,{value:{handleKeyDown:we,blockIndex:de,updateFocusId:te},children:A})})]}:{"data-component":"submenu-wrapper","data-role":"submenu-wrapper",onMouseOver:F?void 0:()=>he(),onMouseLeave:()=>ge(),isSubmenuOpen:Y,ref:U,children:[t(s,P(D({},$),{className:_,menuType:X,ref:x,icon:k,tabIndex:-1,menuItemVariant:C,isOpen:Y,hasSubmenu:!0,showDropdownArrow:E,onKeyDown:we,onClick:e=>{he(),H&&H(e)},clickToOpen:F,href:M,maxWidth:q,"aria-expanded":Y,"data-role":"submenu-parent-item",children:T})),Y&&t(m,{"data-component":"submenu",submenuDirection:I,variant:C,menuType:X,role:0===de?"presentation":"list",maxHeight:me,applyFocusRadiusStyling:ue,applyFocusRadiusStylingToLastItem:ae,submenuMaxWidth:L,submenuMinWidth:N,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||ge()},children:t(f.Provider,{value:{submenuFocusId:ee,handleKeyDown:we,blockIndex:de,updateFocusId:te,submenuHasMaxWidth:!!L,closeSubmenu:ge},children:A})})]})}));A.displayName="submenu";export{A as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import n,{useState as r,useRef as o,useContext as i,useMemo as u,useCallback as a,useEffect as l,useLayoutEffect as s}from"react";import{StyledMenuItemWrapper as c}from"../../menu-item/menu-item.style.js";import{StyledSubmenuWrapper as m,StyledSubmenu as p}from"./submenu.style.js";import d from"../../../../__internal__/utils/helpers/events/events.js";import{useStrictMenuContext as b}from"../strict-menu.context.js";import{characterNavigation as f}from"../keyboard-navigation/index.js";import y from"./submenu.context.js";import h from"../../../../__internal__/utils/helpers/guid/index.js";import{BLOCK_INDEX_SELECTOR as v,SCROLLABLE_BLOCK as O,SCROLLABLE_BLOCK_PARENT as g,ALL_CHILDREN_SELECTOR as j}from"../locators.js";import w from"../../../../hooks/__internal__/useStableCallback/useStableCallback.js";import S from"../../../navigation-bar/__internal__/fixed-navigation-bar.context.js";import{defaultFocusableSelectors as x}from"../../../../__internal__/focus-trap/focus-trap-utils.js";function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){$(e,t,n[t])}))}return e}function P(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const _=n.forwardRef(((n,$)=>{var{children:_,className:k,title:K,submenuDirection:I="right",onKeyDown:A,variant:M="default",clickToOpen:V,href:E,maxWidth:T,asPassiveItem:W,onSubmenuOpen:C,onSubmenuClose:q,onClick:F,submenuMaxWidth:N,submenuMinWidth:H,selected:L}=n,B=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,["children","className","title","submenuDirection","onKeyDown","variant","clickToOpen","href","maxWidth","asPassiveItem","onSubmenuOpen","onSubmenuClose","onClick","submenuMaxWidth","submenuMinWidth","selected"]);const[R,U]=r(null),z=o(h()),{inFullscreenView:G,openSubmenuId:J,setOpenSubmenuId:Q,menuVariant:X}=b(),[Y,Z]=r(!1),[ee,te]=r(null),[ne,re]=r([]),[oe,ie]=r(""),ue=ne.length,{submenuMaxHeight:ae}=i(S),le=w(C),se=u((()=>{const e=null==R?void 0:R.querySelectorAll(v);if(e&&Y&&ue){const t=Array.from(e),n=null==R?void 0:R.querySelector(`[data-component='${O}']`),r=n?t.indexOf(n):-1;return(null==n?void 0:n.querySelector(`[data-component='${g}']`))?r+1:r}return-1}),[Y,ue,R]),ce=o(null),me=a((()=>{ce.current=setTimeout((()=>{ie("")}),1500)}),[]),pe=a((()=>{ce.current&&clearTimeout(ce.current),me()}),[me]);l((()=>()=>{ce.current&&clearTimeout(ce.current)}),[]);const de=a((()=>{Z(!0),Q(z.current)}),[Q]);l((()=>{Y&&le&&le()}),[Y,le]);const be=a((()=>{Z(!1),te(null),q&&q(),ie("")}),[q]);l((()=>{J&&J!==z.current&&be()}),[J,be]);const fe=a((e=>ne.findIndex((t=>t===e))),[ne]),ye=a((e=>{const t=d.isEnterKey(e)||d.isSpaceKey(e);if(!t&&!d.isDownKey(e)||Y||(e.preventDefault(),de()),Y){const n=fe(ee);let r=n;if(ee||((t&&!E||d.isSpaceKey(e)&&E)&&(e.preventDefault(),be()),d.isShiftKey(e)&&d.isTabKey(e)&&be()),d.isDownKey(e)&&(e.preventDefault(),r<ue-1&&(r+=1)),d.isUpKey(e)&&(e.preventDefault(),r>0&&(r-=1)),d.isEscKey(e))return null==A||A(e),void be();d.isHomeKey(e)&&(e.preventDefault(),e.stopPropagation(),r=0),d.isEndKey(e)&&(e.preventDefault(),e.stopPropagation(),r=ue-1);const o=d.composedPath(e.nativeEvent).find((e=>e instanceof HTMLElement&&("input"===e.getAttribute("data-element")||"input-icon-toggle"===e.getAttribute("data-element"))));1!==e.key.length||o?ie(""):(e.stopPropagation(),ce.current?pe():me(),ie(`${oe}${e.key.toLowerCase()}`)),o||d.isEnterKey(e)&&setTimeout((()=>be()),0),r!==n&&te(ne[r])}}),[ne,Y,E,ue,ee,fe,de,be,A,oe,pe,me]);return l((()=>{if(R&&_){const e=null==R?void 0:R.querySelectorAll(j);e&&re(Array.from(e).filter((e=>e.querySelector(x))).map((e=>e.getAttribute("id"))))}}),[_,Y,R]),l((()=>{const e=null==R?void 0:R.querySelectorAll(j);if(e&&""!==oe){const t=Array.from(e),n=f(oe,t);n&&te(n.id)}}),[R,oe,ne]),s((()=>{const e=null==R?void 0:R.querySelectorAll('[data-element="menu-item-wrapper"]');null==e||e.forEach(((t,n)=>{n===e.length-1?t.setAttribute("data-last-menu-item","true"):t.removeAttribute("data-last-menu-item")}))}),[R,Y,ue]),e(m,G?{"data-component":"submenu-wrapper",$inFullscreenView:G,children:[t(c,P(D({},B),{as:F&&!E?"button":"a",onClick:W?void 0:F,className:k,$menuVariant:X,ref:$,href:E,$menuItemVariant:M,$inFullscreenView:G,$asDiv:W,$hasSubmenu:!0,$selected:L,children:K})),t(p,{"data-component":"submenu",$menuVariant:X,$inFullscreenView:G,ref:U,children:t(y.Provider,{value:{handleKeyDown:ye,blockIndex:se,updateFocusId:te},children:_})})]}:{"data-component":"submenu-wrapper","data-role":"submenu-wrapper",onMouseOver:V?void 0:()=>de(),onMouseLeave:()=>be(),ref:U,children:[t(c,P(D({},B),{as:E?"a":"button",className:k,$menuVariant:X,ref:$,$menuItemVariant:M,$isOpen:Y,$hasSubmenu:!0,onKeyDown:ye,onClick:e=>{de(),F&&F(e)},href:E,$maxWidth:T,$selected:L,"aria-expanded":Y,"data-element":"submenu-parent-item","data-role":"submenu-parent-item",children:K})),Y&&t(p,{"data-component":"submenu","data-role":"submenu",$submenuDirection:I,$menuVariant:X,role:0===se?"presentation":"list",$maxHeight:ae,$submenuMaxWidth:N,$submenuMinWidth:H,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||be()},children:t(y.Provider,{value:{submenuFocusId:ee,handleKeyDown:ye,blockIndex:se,updateFocusId:te,submenuMaxWidth:N,closeSubmenu:be},children:_})})]})}));_.displayName="submenu";export{_ as default};
@@ -4,7 +4,7 @@ export interface SubmenuContextProps {
4
4
  updateFocusId?: (id: string) => void;
5
5
  handleKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement> | React.KeyboardEvent<HTMLButtonElement>) => void;
6
6
  blockIndex?: number;
7
- submenuHasMaxWidth?: boolean;
7
+ submenuMaxWidth?: string;
8
8
  closeSubmenu?: () => void;
9
9
  }
10
10
  declare const SubmenuContext: React.Context<SubmenuContextProps>;
@@ -1,21 +1,18 @@
1
- import { SubmenuProps } from "./submenu.component";
2
- import type { MenuType } from "../../menu.types";
3
- interface SharedStyleProps {
4
- inFullscreenView?: boolean;
5
- menuType?: MenuType;
1
+ interface StyledSubmenuWrapperProps {
2
+ $inFullscreenView?: boolean;
6
3
  }
7
- interface StyledSubmenuWrapperProps extends SharedStyleProps {
8
- isSubmenuOpen?: boolean;
9
- asPassiveItem?: boolean;
10
- }
11
- interface StyledSubmenuProps extends SharedStyleProps, Pick<SubmenuProps, "variant" | "submenuMaxWidth" | "submenuMinWidth"> {
12
- submenuDirection?: string;
13
- maxHeight?: string;
14
- applyFocusRadiusStyling: boolean;
15
- applyFocusRadiusStylingToLastItem: boolean;
16
- }
17
- declare const StyledSubmenuWrapper: import("styled-components").StyledComponent<"div", any, {
4
+ export declare const StyledSubmenuWrapper: import("styled-components").StyledComponent<"div", any, {
18
5
  theme: object;
19
6
  } & StyledSubmenuWrapperProps, "theme">;
20
- declare const StyledSubmenu: import("styled-components").StyledComponent<"ul", any, StyledSubmenuProps, never>;
21
- export { StyledSubmenu, StyledSubmenuWrapper };
7
+ interface StyledSubmenuProps {
8
+ $submenuDirection?: string;
9
+ $maxHeight?: string;
10
+ $inFullscreenView?: boolean;
11
+ $menuVariant: "white" | "black";
12
+ $submenuMaxWidth?: string;
13
+ $submenuMinWidth?: string;
14
+ }
15
+ export declare const StyledSubmenu: import("styled-components").StyledComponent<"ul", any, {
16
+ theme: object;
17
+ } & StyledSubmenuProps, "theme">;
18
+ export {};
@@ -1 +1 @@
1
- import t,{css as e}from"styled-components";import o from"../../scrollable-block/scrollable-block.style.js";import r from"../../../../style/themes/apply-base-theme.js";import{StyledLink as i}from"../../../link/link.style.js";import{StyledMenuItem as a}from"../../menu.style.js";import d from"../../menu-item/menu-item.style.js";import s from"../../../icon/icon.style.js";import n from"../../menu.config.js";import{StyledSegmentChildren as u}from"../../menu-segment-title/menu-segment-title.style.js";const l=t.div.attrs(r).withConfig({displayName:"submenu.style__StyledSubmenuWrapper",componentId:"carbon_v162_9_1__sc-5ce62130-0"})(["position:relative;width:fit-content;max-width:inherit;height:inherit;"," ",""],(({isSubmenuOpen:t,theme:o})=>t&&e(["z-index:",";"],o.zIndex.popover)),(({inFullscreenView:t,menuType:o,asPassiveItem:r})=>e([""," ",""],t&&e(["width:100%;",""],r&&o&&e(["","{outline:none;color:",";}"],d,n[o].title)),!t&&e(["display:flex;"])))),m=t.ul.withConfig({displayName:"submenu.style__StyledSubmenu",componentId:"carbon_v162_9_1__sc-5ce62130-1"})(["",""],(({menuType:t,submenuDirection:r,variant:l,inFullscreenView:m,maxHeight:b,applyFocusRadiusStyling:h,applyFocusRadiusStylingToLastItem:p,submenuMaxWidth:c,submenuMinWidth:g})=>e([""," "," "," display:block;list-style:none;margin:0;padding:0;",":after,",":hover:after{display:none;}","{display:flex;align-items:center;white-space:nowrap;"," "," "," a{text-decoration:none;}> ",'{width:16px;height:16px;margin-right:5px;}}[data-component="icon"]{line-height:20px;&:before{line-height:unset;}span{vertical-align:middle;svg{height:16px;width:16px;}}}&:before{background-color:transparent;border-radius:0 0 4px 4px;content:"";height:5px;position:absolute;top:-5px;width:100%;}',""],!m&&t&&e(["box-shadow:var(--boxShadow100);position:absolute;top:100%;background-color:",";min-width:",";"," a,button,"," a,"," button{width:100%;}"],"default"===l?n[t].submenuItemBackground:n[t].background,null!=g?g:"100%",c&&e(["width:max-content;max-width:",";li{max-width:",";}&&&{a,button,"," a,"," button{white-space:normal;height:auto;}}"],c,c,i,i),i,i),m&&e(["min-width:100%;","{width:100%;}"],a),!m&&e(["border-bottom-right-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);overflow-y:auto;"," & "," > ",":last-of-type:not([data-last-visible-menu-item='true']){a,button,> span,> div{border-bottom-right-radius:var(--borderRadius000);border-bottom-left-radius:var(--borderRadius000);:focus{border-bottom-right-radius:var(--borderRadius000);border-bottom-left-radius:var(--borderRadius000);}}}[data-last-visible-menu-item=\"true\"]{a,button,> span,> div{border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);:focus{border-bottom-right-radius:var(--borderRadius100);border-bottom-left-radius:var(--borderRadius100);}}}&&&& ",'{[data-element="scrollable-block-list"]{border-bottom-right-radius:var(--borderRadius000);border-bottom-left-radius:',";",":last-child ",",",":last-child a,",":last-child button{border-bottom-right-radius:var(--borderRadius000);border-bottom-left-radius:",";}}}"],b&&`max-height: ${b};`,u,a,o,h?"var(--borderRadius100)":"var(--borderRadius000)",a,i,a,a,p?"var(--borderRadius100)":"var(--borderRadius000)"),d,d,d,m&&e(["white-space:normal;height:auto;"]),c&&e(["height:auto;min-height:40px;"]),!m&&t&&e(["background-color:",";> a:focus,> button:focus{background-color:",";}> a,> button{padding:11px 16px 12px;}"],n[t].submenuItemBackground,n[t].submenuItemBackground),s,"left"===r&&e(["right:0;"]))));export{m as StyledSubmenu,l as StyledSubmenuWrapper};
1
+ import e,{css as t}from"styled-components";import i from"../../../../style/themes/apply-base-theme.js";import o from"../../menu.config.js";const r=e.div.attrs(i).withConfig({displayName:"submenu.style__StyledSubmenuWrapper",componentId:"carbon_v162_10_0__sc-92487cd8-0"})(["position:relative;width:fit-content;max-width:inherit;height:inherit;",""],(({$inFullscreenView:e})=>t([""," ",""],e&&t(["width:100%;"]),!e&&t(["display:flex;"])))),a=e.ul.attrs(i).withConfig({displayName:"submenu.style__StyledSubmenu",componentId:"carbon_v162_10_0__sc-92487cd8-1"})(["",""],(({$menuVariant:e,$submenuDirection:i,$inFullscreenView:r,$maxHeight:a,$submenuMaxWidth:n,$submenuMinWidth:d,theme:l})=>t(["display:block;list-style:none;margin:0;padding:0;background-color:",";"," ",""],o[e].submenuItemBackground,!r&&t(["position:absolute;top:100%;z-index:",";box-shadow:var(--global-depth-lvl1);width:max-content;min-width:100%;box-sizing:border-box;border-radius:var(--global-radius-none) var(--global-radius-none) var(--global-radius-container-m) var(--global-radius-container-m);overflow-y:auto;"," "," "," "," "," [data-last-menu-item='true']{border-bottom-left-radius:var(--global-radius-container-m);border-bottom-right-radius:var(--global-radius-container-m);}"],l.zIndex.popover,"white"===e&&t(["margin-top:-1px;border:var(--global-borderwidth-xs) solid var(--nav-tertiary-border-default);"]),n&&t(["max-width:",";"],n),d&&t(["min-width:",";"],d),"left"===i&&t(["right:0;"]),a&&`max-height: ${a};`),r&&t(["min-width:100%;"]))));export{a as StyledSubmenu,r as StyledSubmenuWrapper};
@@ -1,5 +1,5 @@
1
1
  export { default as Menu } from "./menu.component";
2
- export type { MenuProps } from "./menu.types";
2
+ export type { MenuProps } from "./menu.component";
3
3
  export { default as MenuItem } from "./menu-item";
4
4
  export type { MenuWithIcon, MenuWithChildren, MenuItemHandle, } from "./menu-item";
5
5
  export { default as MenuDivider } from "./menu-divider";
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import r from"react";import t from"./menu-divider.style.js";import{useStrictMenuContext as n}from"../__internal__/strict-menu.context.js";import{StyledMenuItem as o}from"../menu.style.js";import i from"../../../__internal__/utils/helpers/tags/tags.js";function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){c(e,r,t[r])}))}return e}const l=r.forwardRef(((r,c)=>{var{size:l="default"}=r,a=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(r,["size"]);const{menuType:f}=n();return e(o,{inSubmenu:!0,"aria-hidden":"true","data-role":"divider-container",children:e(t,(s=u({size:l},i("menu-divider",a)),p={menuType:f,ref:c},p=null!=p?p:{},Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(p)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(p)).forEach((function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(p,e))})),s))});var s,p}));l.displayName="MenuDivider";export{l as default};
1
+ import{jsx as e}from"react/jsx-runtime";import r from"react";import t from"./menu-divider.style.js";import{useStrictMenuContext as n}from"../__internal__/strict-menu.context.js";import{StyledMenuItem as i}from"../menu-item/menu-item.style.js";import o from"../../../__internal__/utils/helpers/tags/tags.js";function c(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},n=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),n.forEach((function(r){c(e,r,t[r])}))}return e}const l=r.forwardRef(((r,c)=>{var{size:l="default"}=r,a=function(e,r){if(null==e)return{};var t,n,i=function(e,r){if(null==e)return{};var t,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||(i[t]=e[t]);return i}(e,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)t=o[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(r,["size"]);const{menuVariant:s,inFullscreenView:f}=n();return e(i,{$inSubmenu:!0,$removeHeight:!0,"aria-hidden":"true","data-role":"divider-container",children:e(t,(m=u({$size:l},o("menu-divider",a)),p={$menuVariant:s,$inFullscreenView:f,ref:c},p=null!=p?p:{},Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(p)):function(e){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(p)).forEach((function(e){Object.defineProperty(m,e,Object.getOwnPropertyDescriptor(p,e))})),m))});var m,p}));l.displayName="MenuDivider";export{l as default};
@@ -1,6 +1,8 @@
1
1
  import { MenuDividerProps } from "./menu-divider.component";
2
- import type { MenuType } from "../menu.types";
3
- declare const StyledDivider: import("styled-components").StyledComponent<"div", any, MenuDividerProps & {
4
- menuType: MenuType;
5
- }, never>;
2
+ interface StyledDividerProps {
3
+ $menuVariant: "white" | "black";
4
+ $size: MenuDividerProps["size"];
5
+ $inFullscreenView?: boolean;
6
+ }
7
+ declare const StyledDivider: import("styled-components").StyledComponent<"div", any, StyledDividerProps, never>;
6
8
  export default StyledDivider;
@@ -1 +1 @@
1
- import e,{css as o}from"styled-components";import i from"../menu.config.js";const r=e.div.withConfig({displayName:"menu-divider.style__StyledDivider",componentId:"carbon_v162_9_1__sc-ce8f3542-0"})(["cursor:default;",""],(({menuType:e,size:r})=>o(["margin:0px ",";height:",";background-color:",";"],"large"===r?"":"16px","large"===r?"4px":"1px",i[e].divider)));export{r as default};
1
+ import e,{css as a}from"styled-components";import o from"../menu.config.js";const i=e.div.withConfig({displayName:"menu-divider.style__StyledDivider",componentId:"carbon_v162_10_0__sc-b48c8639-0"})(["",""],(({$menuVariant:e,$size:i,$inFullscreenView:n})=>a(["background-color:",";margin:var(--global-space-none) var(--global-space-comp-l);height:1px;"," ",""],o[e].divider,n&&a(["margin:var(--global-space-comp-s) var(--global-space-comp-l);"]),"large"===i&&a(["margin:var(--global-space-none);height:4px;"]))));export{i as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as n}from"react/jsx-runtime";import r,{useRef as t,useCallback as l}from"react";import{CSSTransition as i}from"react-transition-group";import{StyledMenuFullscreen as a,StyledMenuModal as m,StyledMenuFullscreenHeader as c}from"./menu-full-screen.style.js";import{StyledMenuWrapper as s}from"../menu.style.js";import{useStrictMenuContext as u,StrictMenuProvider as p}from"../__internal__/strict-menu.context.js";import d from"../../../__internal__/utils/helpers/events/events.js";import{Box as f}from"../../box/box.component.js";import _ from"../../icon-button/icon-button.component.js";import h from"../../icon/icon.component.js";import"../../icon/icon.style.js";import{Portal as b}from"../../portal/portal.js";import j from"../../../__internal__/focus-trap/focus-trap.component.js";import y from"../menu-divider/menu-divider.component.js";import{getDocument as v}from"../../../__internal__/dom/globals.js";import O from"../../../hooks/__internal__/useLocale/useLocale.js";import g from"../../../hooks/__internal__/useModalAria/useModalAria.js";import x from"../../../hooks/__internal__/useModalManager/useModalManager.js";function w(e,o,n){return o in e?Object.defineProperty(e,o,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[o]=n,e}function M(e){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(o){w(e,o,n[o])}))}return e}const k=({"aria-label":b="Fullscreen menu","data-element":w,"data-role":M,children:k,isOpen:P=!1,onClose:T,startPosition:A="left",topModalOverride:C})=>{var E;const F=t(null),I=t(null),S=t(null),D=g(I),{menuType:L}=u(),R=["dark","black"].includes(L),V=O(),B=r.Children.toArray(k),K=r.Children.toArray(B.map(((r,t)=>t<B.length-1?o(n,{children:[r,e(y,{"data-role":"divider"})]}):r))),Y=l((e=>{T&&d.isEscKey(e)&&(e.stopImmediatePropagation(),T(e))}),[T]);return x({open:P,closeModal:Y,modalRef:F,topModalOverride:C,focusCallToActionElement:null===(E=v())||void 0===E?void 0:E.activeElement}),e(i,{nodeRef:F,in:P,timeout:200,unmountOnExit:!0,children:e(a,{ref:F,startPosition:A,transitionDuration:200,children:e(j,{wrapperRef:I,isOpen:P,children:o(m,{"aria-label":b,"aria-modal":!!D||void 0,"data-component":"menu-fullscreen","data-element":w,"data-role":M,menuType:L,ref:I,role:"dialog",tabIndex:-1,children:[e(c,{menuType:L,children:e(_,{"aria-label":V.menuFullscreen.ariaLabels.closeButton(),onClick:T,"data-element":"close",children:e(h,{type:"close",inverse:R})})}),e(f,{overflowY:"auto",width:"100%",height:"calc(100% - 40px)",children:e(s,{"data-component":"menu",menuType:L,ref:S,display:"flex",flexDirection:"column",role:"list",inFullscreenView:!0,children:e(p,{value:{inFullscreenView:!0,menuType:L,openSubmenuId:null,setOpenSubmenuId:()=>{}},children:K})})})]})})})})},P=o=>e("li",{children:e(b,{children:e(k,M({},o))})});export{P as MenuFullscreen,P as default};
1
+ import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import o,{useRef as t,useCallback as l}from"react";import{CSSTransition as i}from"react-transition-group";import{StyledMenuFullscreen as a,StyledMenuModal as m,StyledMenuFullscreenHeader as s,StyledMenuFullscreenContent as c}from"./menu-full-screen.style.js";import{StyledMenuWrapper as u}from"../menu.style.js";import{useStrictMenuContext as d,StrictMenuProvider as p}from"../__internal__/strict-menu.context.js";import f from"../../../__internal__/utils/helpers/events/events.js";import{Button as _}from"../../button/__next__/button.component.js";import b from"../../icon/icon.component.js";import"../../icon/icon.style.js";import{Portal as h}from"../../portal/portal.js";import j from"../../../__internal__/focus-trap/focus-trap.component.js";import v from"../menu-divider/menu-divider.component.js";import{getDocument as y}from"../../../__internal__/dom/globals.js";import O from"../../../hooks/__internal__/useLocale/useLocale.js";import g from"../../../hooks/__internal__/useModalAria/useModalAria.js";import M from"../../../hooks/__internal__/useModalManager/useModalManager.js";function w(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function P(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){w(e,n,r[n])}))}return e}const k=({"aria-label":h="Fullscreen menu","data-element":w,"data-role":P,children:k,isOpen:x=!1,onClose:V,startPosition:A="left",topModalOverride:C})=>{var E;const $=t(null),F=t(null),I=t(null),S=g(F),{menuVariant:L}=d(),R=O(),B=o.Children.toArray(k),D=o.Children.toArray(B.map(((o,t)=>t<B.length-1?n(r,{children:[o,e(v,{"data-role":"divider"})]}):o))),T=l((e=>{V&&f.isEscKey(e)&&(e.stopImmediatePropagation(),V(e))}),[V]);return M({open:x,closeModal:T,modalRef:$,topModalOverride:C,focusCallToActionElement:null===(E=y())||void 0===E?void 0:E.activeElement}),e(i,{nodeRef:$,in:x,timeout:200,unmountOnExit:!0,children:e(a,{ref:$,$startPosition:A,$transitionDuration:200,children:e(j,{wrapperRef:F,isOpen:x,children:n(m,{"aria-label":h,"aria-modal":!!S||void 0,"data-component":"menu-fullscreen","data-element":w,"data-role":P,$menuVariant:L,ref:F,role:"dialog",tabIndex:-1,children:[e(s,{$menuVariant:L,children:e(_,{variantType:"subtle",size:"small",inverse:Boolean("black"===L),"aria-label":R.menuFullscreen.ariaLabels.closeButton(),onClick:e=>V(e),"data-element":"close",children:e(b,{type:"close"})})}),e(c,{children:e(u,{"data-component":"menu",ref:I,role:"list",$inFullscreenView:!0,children:e(p,{value:{inFullscreenView:!0,menuVariant:L,openSubmenuId:null,setOpenSubmenuId:()=>{}},children:D})})})]})})})})},x=n=>e("li",{children:e(h,{children:e(k,P({},n))})});export{x as MenuFullscreen,x as default};
@@ -1,16 +1,16 @@
1
- import type { MenuType } from "../menu.types";
2
- declare const StyledMenuFullscreen: import("styled-components").StyledComponent<"div", any, {
1
+ interface StyledMenuFullscreenProps {
2
+ $transitionDuration: number;
3
+ $startPosition: "left" | "right";
4
+ }
5
+ export declare const StyledMenuFullscreen: import("styled-components").StyledComponent<"div", any, {
3
6
  theme: object;
4
- } & {
5
- transitionDuration: number;
6
- startPosition: "left" | "right";
7
- }, "theme">;
8
- declare const StyledMenuModal: import("styled-components").StyledComponent<"div", any, {
7
+ } & StyledMenuFullscreenProps, "theme">;
8
+ interface StyledMenuModalProps {
9
+ $menuVariant: "white" | "black";
10
+ }
11
+ export declare const StyledMenuModal: import("styled-components").StyledComponent<"div", any, {
9
12
  theme: object;
10
- } & {
11
- menuType: MenuType;
12
- }, "theme">;
13
- declare const StyledMenuFullscreenHeader: import("styled-components").StyledComponent<"div", any, {
14
- menuType: MenuType;
15
- }, never>;
16
- export { StyledMenuModal, StyledMenuFullscreen, StyledMenuFullscreenHeader };
13
+ } & StyledMenuModalProps, "theme">;
14
+ export declare const StyledMenuFullscreenHeader: import("styled-components").StyledComponent<"div", any, StyledMenuModalProps, never>;
15
+ export declare const StyledMenuFullscreenContent: import("styled-components").StyledComponent<"div", any, {}, never>;
16
+ export {};
@@ -1 +1 @@
1
- import o,{css as t}from"styled-components";import e from"../../../style/themes/apply-base-theme.js";import i from"../../icon-button/icon-button.style.js";import r from"../../box/box.style.js";import n from"../../search/__internal__/legacy/search.style.js";import s from"../../icon/icon.style.js";import l from"../../button/button.style.js";import a from"../menu.config.js";import d from"../../../style/utils/add-focus-styling.js";import{StyledLink as c}from"../../link/link.style.js";const m=o.div.attrs(e).withConfig({displayName:"menu-full-screen.style__StyledMenuFullscreen",componentId:"carbon_v162_9_1__sc-f9ae5d65-0"})(["position:fixed;top:0;bottom:0;"," ",""],(({theme:o})=>t(["z-index:",";"],o.zIndex.fullScreenModal)),(({startPosition:o,transitionDuration:e})=>t(["&.enter{visibility:hidden;",":-100%;}&.enter-active{visibility:visible;",":0;transition:all ","ms ease;}&.exit{visibility:visible;",":0;}&.exit-active{visibility:hidden;",":-100%;transition:all ","ms ease;}"],o,o,e,o,o,e))),b=o.div.attrs(e).withConfig({displayName:"menu-full-screen.style__StyledMenuModal",componentId:"carbon_v162_9_1__sc-f9ae5d65-1"})(["height:100vh;width:100vw;outline:none;&&{","{max-width:100vw;}"," > a,"," > button,> div{font-size:var(--fontSizes200);}}",""],c,c,c,(({menuType:o})=>t(["background-color:",";&&&{","{","{display:inline-flex;bottom:auto;}","{display:flex;line-height:normal;padding-bottom:0;&:focus{border-bottom-right-radius:var(--borderRadius050);border-top-right-radius:var(--borderRadius050);","}}}}","{scrollbar-color:",";&::-webkit-scrollbar{width:var(--sizing150);}&::-webkit-scrollbar-thumb{background-color:",";}&::-webkit-scrollbar-track{background-color:",";}}"],a[o].background,n,s,l,d(),r,a[o].scrollbarColor,a[o].scrollbarThumb,a[o].scrollbarTrack))),u=o.div.withConfig({displayName:"menu-full-screen.style__StyledMenuFullscreenHeader",componentId:"carbon_v162_9_1__sc-f9ae5d65-2"})(["height:40px;","{position:absolute;z-index:1;right:16px;top:8px;}",""],i,(({menuType:o})=>t(["background-color:",";"],a[o].submenuItemBackground)));export{m as StyledMenuFullscreen,u as StyledMenuFullscreenHeader,b as StyledMenuModal};
1
+ import e,{css as i}from"styled-components";import n from"../../../style/themes/apply-base-theme.js";import t from"../menu.config.js";const l=e.div.attrs(n).withConfig({displayName:"menu-full-screen.style__StyledMenuFullscreen",componentId:"carbon_v162_10_0__sc-9603f910-0"})(["",""],(({$startPosition:e,$transitionDuration:n,theme:t})=>i(["position:fixed;top:0;bottom:0;z-index:",";&.enter{visibility:hidden;",":-100%;}&.enter-active{visibility:visible;",":0;transition:all ","ms ease;}&.exit{visibility:visible;",":0;}&.exit-active{visibility:hidden;",":-100%;transition:all ","ms ease;}"],t.zIndex.fullScreenModal,e,e,n,e,e,n))),o=e.div.attrs(n).withConfig({displayName:"menu-full-screen.style__StyledMenuModal",componentId:"carbon_v162_10_0__sc-9603f910-1"})(["",""],(({$menuVariant:e})=>i(["height:100vh;width:100vw;outline:none;background-color:",";"],t[e].background))),a=e.div.withConfig({displayName:"menu-full-screen.style__StyledMenuFullscreenHeader",componentId:"carbon_v162_10_0__sc-9603f910-2"})(["",""],(({$menuVariant:e})=>i(["height:var(--global-size-m);display:flex;justify-content:flex-end;align-items:center;padding:var(--global-space-none) var(--global-space-comp-l);margin-bottom:var(--global-space-comp-s);background-color:",";"],t[e].fullScreenHeader))),s=e.div.withConfig({displayName:"menu-full-screen.style__StyledMenuFullscreenContent",componentId:"carbon_v162_10_0__sc-9603f910-3"})(["overflow-y:auto;width:100%;height:calc(100% - var(--global-size-m) - var(--global-space-comp-s));"]);export{l as StyledMenuFullscreen,s as StyledMenuFullscreenContent,a as StyledMenuFullscreenHeader,o as StyledMenuModal};
@@ -21,7 +21,7 @@ interface MenuItemBaseProps extends TagProps, Pick<LayoutProps, "width" | "maxWi
21
21
  target?: string;
22
22
  /** The rel attribute to be used for the underlying <a> tag */
23
23
  rel?: string;
24
- /** set the colour variant for a menuType */
24
+ /** Set the variant of the MenuItem */
25
25
  variant?: VariantType;
26
26
  /** Flag to display the dropdown arrow when an item has a submenu */
27
27
  showDropdownArrow?: boolean;
@@ -33,12 +33,6 @@ interface MenuItemBaseProps extends TagProps, Pick<LayoutProps, "width" | "maxWi
33
33
  onSubmenuOpen?: () => void;
34
34
  /** Callback triggered when submenu closes. Only valid with submenu prop */
35
35
  onSubmenuClose?: () => void;
36
- /**
37
- @ignore @private
38
- private prop, used inside ScrollableBlock to ensure the MenuItem's color variant overrides the CSS
39
- for other MenuItems inside the block
40
- */
41
- overrideColor?: boolean;
42
36
  /** When set the submenu opens by click instead of hover */
43
37
  clickToOpen?: boolean;
44
38
  /**
@@ -47,7 +41,7 @@ interface MenuItemBaseProps extends TagProps, Pick<LayoutProps, "width" | "maxWi
47
41
  * */
48
42
  maxWidth?: MaxWidthProps["maxWidth"];
49
43
  /**
50
- * @private @ignore
44
+ * @private @ignore @internal
51
45
  * Renders MenuItem as a div element
52
46
  * */
53
47
  as?: "div";
@@ -67,11 +61,17 @@ interface MenuItemBaseProps extends TagProps, Pick<LayoutProps, "width" | "maxWi
67
61
  }
68
62
  export interface MenuWithChildren extends MenuItemBaseProps {
69
63
  children?: React.ReactNode;
70
- /** Either prop `icon` must be defined or this node must have children. */
64
+ /**
65
+ * @deprecated Please pass any desired icons as children instead.
66
+ * Either prop `icon` must be defined or this node must have children.
67
+ */
71
68
  icon?: IconType;
72
69
  }
73
70
  export interface MenuWithIcon extends MenuItemBaseProps {
74
- /** Either prop `icon` must be defined or this node must have children. */
71
+ /**
72
+ * @deprecated Please pass any desired icons as children instead.
73
+ * Either prop `icon` must be defined or this node must have children.
74
+ */
75
75
  icon: IconType;
76
76
  children?: React.ReactNode;
77
77
  }
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import n,{forwardRef as t,useRef as r,useContext as o,useState as i,useLayoutEffect as u,useEffect as l,useImperativeHandle as a}from"react";import s from"invariant";import{defaultFocusableSelectors as c}from"../../../__internal__/focus-trap/focus-trap-utils.js";import m from"../../../style/utils/filter-styled-system-padding-props.js";import d from"./menu-item.style.js";import p from"../../../__internal__/utils/helpers/events/events.js";import{useStrictMenuContext as b}from"../__internal__/strict-menu.context.js";import f from"../__internal__/submenu/submenu.component.js";import h from"../__internal__/submenu/submenu.context.js";import{MenuSegmentContext as y}from"../menu-segment-title/menu-segment-title.context.js";import{StyledMenuItem as v}from"../menu.style.js";import O from"../../../__internal__/utils/helpers/guid/index.js";function g(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function j(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){g(e,n,t[n])}))}return e}function w(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const _=t(((t,g)=>{var{submenu:_,submenuMaxWidth:x,submenuMinWidth:S,children:P,href:D,onClick:C,target:k,submenuDirection:I="right",icon:W,selected:F,onKeyDown:M,variant:T="default",showDropdownArrow:V=!0,ariaLabel:E,ariaCurrent:L,clickToOpen:K,maxWidth:A,onSubmenuOpen:q,onSubmenuClose:H,overrideColor:N,rel:Y,as:z,"data-element":B,"data-role":G}=t,J=function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,["submenu","submenuMaxWidth","submenuMinWidth","children","href","onClick","target","submenuDirection","icon","selected","onKeyDown","variant","showDropdownArrow","ariaLabel","ariaCurrent","clickToOpen","maxWidth","onSubmenuOpen","onSubmenuClose","overrideColor","rel","as","data-element","data-role"]);s(W||P,"Either prop `icon` must be defined or this node must have `children`."),s(P||E||_||"string"==typeof _&&_.length,"If no text or node is provided via the `submenu` prop, an `ariaLabel` should be given to facilitate accessibility."),s("boolean"==typeof _||void 0===_||n.isValidElement(_)||P&&"string"==typeof _&&_.length,"You should not pass `children` when `submenu` is an empty string");const Q=r(O()),{isChildOfSegment:R,overriddenVariant:U}=o(y),{inFullscreenView:X,registerItem:Z,unregisterItem:$,focusId:ee,updateFocusId:ne,menuType:te}=b(),re=o(h),oe=Object.keys(re).length>0,{submenuFocusId:ie,updateFocusId:ue,handleKeyDown:le,submenuHasMaxWidth:ae,closeSubmenu:se}=re,ce=ee===Q.current,me=ie?ie===Q.current:void 0,[de,pe]=i(null),[be,fe]=i(null);u((()=>{var e;const n=null!==(e=null==de?void 0:de.querySelector(c))&&void 0!==e?e:null;n!==be&&fe(n)}),[be,de]),l((()=>{const e=Q.current;return Z&&Z(e),()=>{$&&$(e)}}),[Z,$]),l((()=>{if(ce&&!me||me){if(be)return void be.focus();null==de||de.focus()}}),[be,ce,me,de]),a(g,(()=>({focus(){null==de||de.focus()}})),[de]);const he=e=>{oe?(e.stopPropagation(),null==ue||ue(Q.current)):null==ne||ne(Q.current)},ye={className:D||C?"carbon-menu-item--has-link":"",href:be?void 0:D,onClick:be||!D&&!C?void 0:e=>{null==C||C(e),null==se||se()},target:k,rel:Y,icon:W,removeAriaLabelOnIcon:!0,selected:F,onKeyDown:X?void 0:e=>{null==M||M(e),p.isEscKey(e)&&(null==de||de.focus()),null==le||le(e)},overrideColor:N,ref:pe};"alternate"===U&&R&&"alternate"===T&&["white","black"].includes(te)&&(ye.overrideColor=!0);const ve=e=>A&&"string"==typeof e?e:void 0,Oe=X?void 0:A,ge=!(C||D||be);if(_)return e(v,w(j({"data-component":"menu-item","data-element":B,"data-role":G,menuType:te,title:ve(_),maxWidth:Oe},J),{inFullscreenView:X,id:Q.current,as:z,onFocus:he,children:e(f,w(j(w(j(w(j({},"boolean"!=typeof _&&{title:_}),{submenuDirection:I,showDropdownArrow:V,clickToOpen:K,maxWidth:A,asPassiveItem:ge,ariaLabel:E,onSubmenuOpen:q,onSubmenuClose:H,submenuMaxWidth:x,submenuMinWidth:S}),ye),{variant:T}),J),{children:P}))}));const je=m(J),we=!!(null==de?void 0:de.querySelector("[data-element='input']"));return e(v,w(j({"data-component":"menu-item","data-element":B,"data-role":G,menuType:te,inSubmenu:oe,title:ve(P),maxWidth:Oe},J),{inFullscreenView:X&&!Object.keys(re).length,id:Q.current,as:z,onFocus:he,children:e(d,w(j(w(j({menuType:te,"data-role":"menu-item-wrapper"},ye),{menuItemVariant:T,ariaLabel:E,"aria-current":L,maxWidth:ae?void 0:Oe,inFullscreenView:X,asPassiveItem:ge}),je),{asDiv:we||"div"===z,hasFocusableChild:!!be,hasInput:we,inSubmenu:oe,children:P}))}))}));export{_ as MenuItem,_ as default};
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import r,{forwardRef as i,useRef as o,useContext as u,useState as a,useLayoutEffect as l,useEffect as s,useImperativeHandle as c}from"react";import m from"invariant";import{defaultFocusableSelectors as d}from"../../../__internal__/focus-trap/focus-trap-utils.js";import p from"../../../style/utils/filter-styled-system-padding-props.js";import{StyledMenuItem as b,StyledMenuItemWrapper as f,StyledMenuItemContent as h}from"./menu-item.style.js";import y from"../../../__internal__/utils/helpers/events/events.js";import{useStrictMenuContext as O}from"../__internal__/strict-menu.context.js";import v from"../__internal__/submenu/submenu.component.js";import g from"../__internal__/submenu/submenu.context.js";import j from"../../../__internal__/utils/helpers/guid/index.js";import w from"../../icon/icon.component.js";import"../../icon/icon.style.js";import _ from"../__internal__/menu-item-variant.context.js";function x(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function S(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){x(e,n,t[n])}))}return e}function P(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e}const W=i(((i,x)=>{var{submenu:W,submenuMaxWidth:$,submenuMinWidth:D,children:I,href:k,onClick:M,target:F,submenuDirection:V="right",icon:C,selected:E,onKeyDown:K,variant:L="default",showDropdownArrow:T=!0,ariaLabel:q,ariaCurrent:A,clickToOpen:N,maxWidth:Y,onSubmenuOpen:z,onSubmenuClose:B,rel:G,as:H,"data-element":J,"data-role":Q}=i,R=function(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}(i,["submenu","submenuMaxWidth","submenuMinWidth","children","href","onClick","target","submenuDirection","icon","selected","onKeyDown","variant","showDropdownArrow","ariaLabel","ariaCurrent","clickToOpen","maxWidth","onSubmenuOpen","onSubmenuClose","rel","as","data-element","data-role"]);m(C||I,"Either prop `icon` must be defined or this node must have `children`."),m(I||q||W||"string"==typeof W&&W.length,"If no text or node is provided via the `submenu` prop, an `ariaLabel` should be given to facilitate accessibility."),m("boolean"==typeof W||void 0===W||r.isValidElement(W)||I&&"string"==typeof W&&W.length,"You should not pass `children` when `submenu` is an empty string");const U=o(j()),{inFullscreenView:X,registerItem:Z,unregisterItem:ee,focusId:ne,updateFocusId:te,menuVariant:re}=O(),ie=u(g),oe=Object.keys(ie).length>0,{submenuFocusId:ue,updateFocusId:ae,handleKeyDown:le,submenuMaxWidth:se,closeSubmenu:ce}=ie,{menuItemVariant:me}=u(_),de=ne===U.current,pe=ue?ue===U.current:void 0,[be,fe]=a(null),[he,ye]=a(null);l((()=>{var e;const n=null!==(e=null==be?void 0:be.querySelector(d))&&void 0!==e?e:null;n!==he&&ye(n)}),[he,be]),s((()=>{const e=U.current;return Z&&Z(e),()=>{ee&&ee(e)}}),[Z,ee]),s((()=>{if(de&&!pe||pe){if(he)return void he.focus();null==be||be.focus()}}),[he,de,pe,be]),c(x,(()=>({focus(){null==be||be.focus()}})),[be]);const Oe=e=>{oe?(e.stopPropagation(),null==ae||ae(U.current)):null==te||te(U.current)},ve={className:k||M?"carbon-menu-item--has-link":"",href:he?void 0:k,onClick:he||!k&&!M?void 0:e=>{null==M||M(e),null==ce||ce()},target:F,rel:G,onKeyDown:X?void 0:e=>{null==K||K(e),y.isEscKey(e)&&(null==be||be.focus()),null==le||le(e)},ref:fe},ge=e=>Y&&"string"==typeof e?e:void 0,je=X?void 0:Y,we=!(M||k||he);if(W){const r=n(t,{children:[n(h,{$hasMaxWidth:!!je,children:[C&&e(w,{type:C}),W]}),T&&!X&&e(w,{ml:"4px",type:"dropdown"})]});return e(b,P(S({"data-component":"menu-item","data-element":J,"data-role":Q,title:ge(W),$maxWidth:je},R),{$inFullscreenView:X,id:U.current,as:H,onFocus:Oe,children:e(v,P(S(P(S({title:r,submenuDirection:V,clickToOpen:N,maxWidth:Y,asPassiveItem:we,"aria-label":q,onSubmenuOpen:z,onSubmenuClose:B,submenuMaxWidth:$,submenuMinWidth:D,selected:E},ve),{variant:L}),R),{children:I}))}))}const _e=p(R),xe=!!(null==be?void 0:be.querySelector("[data-element='input']"));return e(b,P(S({"data-component":"menu-item","data-element":J,"data-role":Q,$inSubmenu:oe,title:ge(I),$maxWidth:je},R),{$inFullscreenView:X,id:U.current,as:H,onFocus:Oe,children:e(f,P(S(P(S({as:M&&!k?"button":"a",$menuVariant:re,"data-element":"menu-item-wrapper","data-role":"menu-item-wrapper"},ve),{$menuItemVariant:me||L,"aria-label":q,"aria-current":A,$maxWidth:je,$submenuMaxWidth:se,$inFullscreenView:X,$asPassiveItem:we}),_e),{$asDiv:xe||"div"===H,$inSubmenu:oe,$selected:E,children:n(h,{$hasMaxWidth:!!je,children:[C&&e(w,{type:C}),I]})}))}))}));export{W as MenuItem,W as default};
@@ -1,24 +1,33 @@
1
- import { PaddingProps } from "styled-system";
2
- import { MenuWithChildren } from "./menu-item.component";
3
- import type { MenuType } from "../menu.types";
4
- interface StyledMenuItemWrapperProps extends Pick<MenuWithChildren, "href" | "showDropdownArrow" | "overrideColor" | "clickToOpen" | "maxWidth" | "ariaCurrent">, PaddingProps {
5
- menuType: MenuType;
6
- selected?: boolean;
7
- hasSubmenu?: boolean;
8
- isOpen?: boolean;
9
- inFullscreenView?: boolean;
10
- asPassiveItem?: boolean;
11
- icon?: string;
12
- ariaLabel?: string;
13
- asDiv?: boolean;
14
- hasFocusableChild?: boolean;
15
- hasInput?: boolean;
16
- menuItemVariant?: Pick<MenuWithChildren, "variant">["variant"];
17
- inSubmenu?: boolean;
1
+ import { MaxWidthProps } from "styled-system";
2
+ import { MenuVariantType } from "../menu.component";
3
+ import { VariantType } from "./menu-item.component";
4
+ export interface StyledMenuItemProps {
5
+ $maxWidth?: MaxWidthProps["maxWidth"];
6
+ $inFullscreenView?: boolean;
7
+ $inSubmenu?: boolean;
8
+ $removeHeight?: boolean;
18
9
  }
19
- declare const StyledMenuItemWrapper: import("styled-components").StyledComponent<"a", any, {
10
+ export declare const StyledMenuItem: import("styled-components").StyledComponent<"li", any, {
20
11
  theme: object;
21
- } & {
22
- as: import("react").ForwardRefExoticComponent<import("../../link").LinkProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
23
- } & StyledMenuItemWrapperProps, "theme" | "as">;
12
+ } & StyledMenuItemProps, "theme">;
13
+ export interface StyledMenuItemWrapperProps {
14
+ $menuVariant: MenuVariantType;
15
+ $selected?: boolean;
16
+ $hasSubmenu?: boolean;
17
+ $isOpen?: boolean;
18
+ $inFullscreenView?: boolean;
19
+ $asPassiveItem?: boolean;
20
+ $asDiv?: boolean;
21
+ $menuItemVariant?: VariantType;
22
+ $inSubmenu?: boolean;
23
+ $submenuMaxWidth?: string;
24
+ $maxWidth?: MaxWidthProps["maxWidth"];
25
+ }
26
+ export declare const StyledMenuItemWrapper: import("styled-components").StyledComponent<"a", any, {
27
+ theme: object;
28
+ } & StyledMenuItemWrapperProps, "theme">;
29
+ interface StyledMenuItemContentProps {
30
+ $hasMaxWidth?: boolean;
31
+ }
32
+ export declare const StyledMenuItemContent: import("styled-components").StyledComponent<"span", any, StyledMenuItemContentProps, never>;
24
33
  export default StyledMenuItemWrapper;
@@ -1 +1 @@
1
- import o,{css as n}from"styled-components";import{padding as t}from"styled-system";import r from"../menu.config.js";import{Link as a}from"../../link/link.component.js";import e from"../../button/button.style.js";import i from"../../icon-button/icon-button.style.js";import c from"../../icon/icon.style.js";import{StyledContent as u,StyledLink as s}from"../../link/link.style.js";import p from"../../../style/themes/apply-base-theme.js";import d from"../../../style/utils/add-focus-styling.js";const l=o=>{var n,t;const{paddingRight:r}=o,a=null===(t=String(r))||void 0===t||null===(n=t.match(/\d+/))||void 0===n?void 0:n[0];if("var(--spacing000)"===r||"0"===a)return{padding:"var(--spacing200)",iconSpacing:"2px"};switch(r){case"var(--spacing100)":return{padding:"var(--spacing300)",iconSpacing:r};case"var(--spacing200)":return{padding:"var(--spacing400)",iconSpacing:r};case"var(--spacing300)":return{padding:"var(--spacing500)",iconSpacing:r};case"var(--spacing400)":return{padding:"var(--spacing600)",iconSpacing:r};case"var(--spacing500)":return{padding:"var(--spacing700)",iconSpacing:r};case"var(--spacing600)":return{padding:"var(--spacing800)",iconSpacing:r};case"var(--spacing700)":return{padding:"var(--spacing900)",iconSpacing:r};case"var(--spacing800)":return{padding:"var(--spacing1000)",iconSpacing:r};default:return a?{padding:`${16+Number(a)}px`,iconSpacing:`${a}px`}:{padding:"var(--spacing400)",iconSpacing:"var(--spacing200)"}}},g=o.a.attrs(p).attrs({as:a}).withConfig({displayName:"menu-item.style__StyledMenuItemWrapper",componentId:"carbon_v162_9_1__sc-3770d50b-0"})([""," &&&{> a,> button{","}}"],(({menuType:o,selected:a,hasSubmenu:p,isOpen:g,menuItemVariant:b,showDropdownArrow:m,href:h,clickToOpen:v,maxWidth:f,inFullscreenView:x,overrideColor:k,asPassiveItem:y,asDiv:w,hasFocusableChild:S,hasInput:C,inSubmenu:M})=>n(["display:flex;align-items:center;min-height:40px;position:relative;box-shadow:none;a,button{min-height:40px;height:100%;box-sizing:border-box;font-size:14px;font-weight:500;&:not(.legacy-search-button) > ","{margin-right:var(--spacing050);}}&& a:focus,&& button:focus{",'}:has([data-element="input"]) ',"{width:100%;}"," "," "," "," "," button,"," button,a,"," a{margin:0px;text-align:left;",'}&&&{a,button,[data-component="icon"],'," a,"," button,",' [data-component="icon"]{font-weight:500;text-decoration:none;',"}","}"," "," "," "," ",""],c,d(!0),u,!k&&n(["background-color:",';&:has([data-popover-container-button="true"]){background-color:var(--colorsActionMajor500);}'],r[o].background),k&&!x&&n(["&&&&{background-color:",";}"],"alternate"===b?r[o].alternate:r[o].submenuItemBackground),!x&&n(["max-width:inherit;width:inherit;height:inherit;> a,> button{display:flex;align-items:center;"," width:inherit;max-width:inherit;}&&{a:focus,button:focus{background-color:",";color:",';z-index:1;position:relative;}}&:has([data-popover-container-button="true"]){&&{a:focus,button:focus{background-color:var(--colorsActionMajor500);}}}&&&{a,button{',"}a:hover,button:hover{","{border-radius:0;background-color:transparent;}"," ::before{border-top-color:var(--colorsComponentsMenuYang100);}}}"],M?"":"justify-content: center;",r[o].background,r[o].color,f&&n(["box-sizing:border-box;max-width:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;vertical-align:bottom;display:block;"]),e,!w&&!y&&n(['background-color:var(--colorsComponentsMenuAutumnStandard600);color:var(--colorsComponentsMenuYang100);[data-component="icon"]{color:var(--colorsComponentsMenuYang100);}'])),S&&n(["&& "," ",'{> span{display:inline-flex;margin-right:0;}:focus{outline:none;[data-component="icon"]{color:',";}}}"],!x&&n(["&& > a:not(:has(button)){padding:11px 16px;}> a:has(",":not(.legacy-search-button)){height:100%;","{height:inherit;div{height:inherit;}}","{min-height:40px;padding:10px 0px;box-sizing:border-box;height:100%;}}"],e,u,e),i,r[o].color),!S&&!x&&n(["",""],p||f?n(["& > a,& > button{padding:11px 16px ",";}"],p&&f?"12px":"10px"):n(["& > a,& > button{padding:11px 16px;}"])),s,s,x&&n(["height:auto;white-space:normal;","{top:-2px;}"],c),s,s,s,!C&&`color: ${r[o].color};`,!x&&n(["a > ",",button > ","{display:inline-block;height:18px;top:-2px;}"],c,c),a&&n(["background-color:",";a:focus,button:focus{background-color:",";}a:hover,button:hover{background-color:var(--colorsComponentsMenuAutumnStandard600);}"],r[o].selected,r[o].selected),"alternate"===b&&!x&&n(["&&&{background-color:",";}&&& a:focus,&&& button:focus{background-color:",";}",""],r[o].alternate,r[o].alternate,!C&&n(["&&& a:hover,&&& button:hover{background-color:",";}"],r[o].alternateHover)),g&&n(["a,button{background-color:",";color:",";}"],r[o].submenuItemBackground,r[o].color),p&&n(["background-color:",";a:focus,button:focus{background-color:",";color:",';[data-component="icon"]{color:',";}","}a:hover,button:hover{background-color:",";color:var(--colorsComponentsMenuYang100);",' [data-component="icon"]{color:',";}}"," ",""],r[o].submenuBackground,r[o].submenuBackground,r[o].color,r[o].color,v&&g&&n(["background-color:",";"],r[o].submenuOpenedBackground),r[o].submenuOpenedBackground,!(h||v)&&n(["cursor:default;background-color:",";color:",";"],r[o].submenuItemBackground,r[o].color),r[o].color,a&&n(["background-color:",";a:focus,button:focus{background-color:",";}a:hover,button:hover{background-color:var(--colorsComponentsMenuAutumnStandard600);color:var(--colorsComponentsMenuYang100);}"],r[o].submenuSelected,r[o].submenuSelected),m&&n(["&&&{> a,> button:not(","){padding-right:",";}}a::before,button::before{display:block;margin-top:-1px;pointer-events:none;position:absolute;right:",';top:50%;z-index:2;content:"";width:0;height:0;border-width:5px 4px 4px;border-style:solid;border-top-color:initial;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}'],i,(o=>l(t(o)).padding),(o=>l(t(o)).iconSpacing))),x&&n([""," > a,> button{min-height:40px;line-height:40px;padding:0px 16px;width:100vw;box-sizing:border-box;}a:focus,button:focus{z-index:1;position:relative;}","}"],w&&n(["&&&{> a,> button{color:",";outline:none;}> button:hover,> a:hover{background-color:transparent;cursor:default;outline:none;color:",";}}"],r[o].title,r[o].title),!y&&n(["&&{> a:focus,> a:hover,> button:focus,> button:hover{background-color:var(--colorsComponentsMenuAutumnStandard600);color:var(--colorsComponentsMenuYang100);","}}"],!C&&n(['[data-component="icon"]{color:var(--colorsComponentsMenuYang100);}']))))),t);export{g as default};
1
+ import o,{css as e}from"styled-components";import{layout as t,flexbox as a,padding as r}from"styled-system";import i from"../menu.config.js";import n from"../../../style/themes/apply-base-theme.js";import l from"../../../style/utils/add-focus-styling.js";const s=o.li.attrs(n).withConfig({displayName:"menu-item.style__StyledMenuItem",componentId:"carbon_v162_10_0__sc-338885db-0"})(["display:flex;list-style:none;align-items:stretch;min-height:var(--global-size-m);"," "," ",""],t,a,(({$inSubmenu:o,$removeHeight:t,$inFullscreenView:a,$maxWidth:r})=>e([""," "," ",""],o&&e(["display:list-item;",""],a&&e(["width:100%;"])),t&&e(["min-height:0;"]),r&&e(["max-width:",";"],r)))),c=e(['padding:0;.popover-open-component{[data-component="button"]{background-color:inherit;color:inherit;border-radius:inherit;border:none;padding:var(--global-space-comp-xs) var(--global-space-comp-l);&:focus{','}}[data-popover-container-button="true"]{background-color:var(--colorsActionMajor500);&:focus{background-color:var(--colorsActionMajor500);}}}'],l(!0)),d=o.a.attrs(n).withConfig({displayName:"menu-item.style__StyledMenuItemWrapper",componentId:"carbon_v162_10_0__sc-338885db-1"})(["",""],(({$menuVariant:o,$selected:t,$hasSubmenu:a,$isOpen:n,$menuItemVariant:s,$maxWidth:d,$inFullscreenView:m,$asPassiveItem:p,$asDiv:b,$inSubmenu:u,$submenuMaxWidth:g,theme:h})=>e(["position:relative;display:flex;align-items:center;box-sizing:border-box;min-height:var(--global-size-m);text-decoration:none;text-align:left;font:var(--global-font-static-comp-medium-m);padding:var(--global-space-comp-xs) var(--global-space-comp-l);background-color:",";color:",";border:none;"," "," "," "," "," "," &:has([data-component='popover-container']){","}"],i[o].background,i[o].color,r,d&&e(["max-width:",";"],d),m&&e(["width:100%;font:var(--global-font-static-comp-medium-l);",""],a&&e(["color:",";"],i[o].title)),!p&&!b&&e(["&:hover{cursor:pointer;background-color:",";color:",";}&:focus{","}&:active{background-color:",";color:",";}"],i[o].backgroundHover,i[o].colorHover,l(!0),i[o].backgroundActive,i[o].colorActive),t&&e(['&::before{content:"";position:absolute;width:var(--global-size-xs);height:var(--global-size-6-xs);background-color:var(--nav-primary-bg-selected);'," ","}"],!m&&e(["bottom:0px;left:50%;transform:translate(-50%,0%);width:var(--global-size-xs);height:var(--global-size-6-xs);"]),m&&e(["left:0px;top:50%;transform:translate(0%,-50%);height:var(--global-size-xs);width:var(--global-size-6-xs);"])),!m&&e([""," ",""],a&&n&&e(["z-index:calc("," + 1);background-color:",";",""],h.zIndex.popover,i[o].submenuOpenedBackground,"white"===o&&e(["box-shadow:inset 1px 0 0 var(--nav-tertiary-border-default),inset -1px 0 0 var(--nav-tertiary-border-default);"])),u&&e(["width:100%;background-color:",";"," ",""],i[o].submenuItemBackground,"alternate"===s&&e(["background-color:",";"],i[o].alternate),g&&e(["max-width:",";"],g))),c))),m=o.span.withConfig({displayName:"menu-item.style__StyledMenuItemContent",componentId:"carbon_v162_10_0__sc-338885db-2"})(["",""],(({$hasMaxWidth:o})=>e(["display:flex;align-items:center;gap:var(--global-space-comp-s);width:100%;"," .search{width:100%;}"],o&&e(["display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;vertical-align:middle;"]))));export{s as StyledMenuItem,m as StyledMenuItemContent,d as StyledMenuItemWrapper,d as default};
@@ -1,12 +1,13 @@
1
1
  import React from "react";
2
2
  import { VariantType } from "../menu-item";
3
3
  import { TagProps } from "../../../__internal__/utils/helpers/tags";
4
- declare const AS_VALUES: readonly ["h2", "h3", "h4", "h5", "h6"];
5
- type AllowedAsValues = (typeof AS_VALUES)[number];
4
+ type AllowedAsValues = "h2" | "h3" | "h4" | "h5" | "h6";
6
5
  export interface MenuTitleProps extends TagProps {
6
+ /** MenuItem children to be rendered within the segment */
7
7
  children?: React.ReactNode;
8
+ /** The text content for the segment title */
8
9
  text: string;
9
- /** Set the colour variant for a menuType */
10
+ /** Set the variant of the MenuSegmentTitle */
10
11
  variant?: VariantType;
11
12
  /** Set the heading level for the segment title */
12
13
  as?: AllowedAsValues;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import r,{useContext as n,useMemo as o}from"react";import{StyledTitle as i,StyledSegmentChildren as l}from"./menu-segment-title.style.js";import{useStrictMenuContext as u}from"../__internal__/strict-menu.context.js";import{StyledMenuItem as a}from"../menu.style.js";import c from"../../../__internal__/utils/helpers/tags/tags.js";import s from"../__internal__/submenu/submenu.context.js";import{MenuSegmentContext as m}from"./menu-segment-title.context.js";function p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){p(e,t,r[t])}))}return e}function b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const y=["h2","h3","h4","h5","h6"],O=r.forwardRef(((r,p)=>{var{children:O,variant:d="default",text:g,as:h="h2",segmentWrapperProps:j}=r,v=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,["children","variant","text","as","segmentWrapperProps"]);const{menuType:P,inFullscreenView:w}=u(),{submenuHasMaxWidth:_}=n(s),x=!!w,S=o((()=>x&&"alternate"===d&&["white","black"].includes(P)?"default":d),[x,P,d]);return e(a,{inSubmenu:!0,children:[t(i,b(f({as:y.includes(h)?h:"h2"},c("menu-segment-title",v)),{menuType:P,ref:p,variant:S,shouldWrap:_,children:g})),O&&t(l,b(f({menuType:P,variant:S},c("menu-segment-title",f({"data-role":"menu-segment-children"},j))),{children:t(m.Provider,{value:{isChildOfSegment:!0,overriddenVariant:S},children:O})}))]})}));O.displayName="MenuSegmentTitle";export{O as default};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import r,{useContext as n}from"react";import{StyledTitle as o,StyledSegmentChildren as i}from"./menu-segment-title.style.js";import{useStrictMenuContext as u}from"../__internal__/strict-menu.context.js";import a from"../__internal__/menu-item-variant.context.js";import{StyledMenuItem as l}from"../menu-item/menu-item.style.js";import c from"../../../__internal__/utils/helpers/tags/tags.js";import m from"../__internal__/submenu/submenu.context.js";function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function f(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const b=r.forwardRef(((r,s)=>{var{children:b,variant:O="default",text:y,as:j="h2",segmentWrapperProps:g}=r,d=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(r,["children","variant","text","as","segmentWrapperProps"]);const{menuVariant:h,inFullscreenView:v}=u(),{submenuMaxWidth:P}=n(m);return e(l,{$inSubmenu:!0,$removeHeight:!0,children:[t(o,f(p({as:j},c("menu-segment-title",d)),{$menuVariant:h,ref:s,$variant:v?void 0:O,$shouldWrap:!!P,$isInFullscreen:v,children:y})),b&&t(i,f(p({},c("menu-segment-title",p({"data-role":"menu-segment-children"},g))),{children:t(a.Provider,{value:{menuItemVariant:O},children:b})}))]})}));b.displayName="MenuSegmentTitle";export{b as default};