carbon-react 132.2.0 → 133.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/README.md +1 -1
  2. package/esm/__internal__/focus-trap/focus-trap.component.js +1 -1
  3. package/esm/__internal__/input/input.component.d.ts +0 -2
  4. package/esm/__internal__/input/input.component.js +0 -8
  5. package/esm/components/button/button-types.style.d.ts +0 -1
  6. package/esm/components/button/button-types.style.js +0 -21
  7. package/esm/components/button/button.component.d.ts +1 -5
  8. package/esm/components/button/button.component.js +5 -377
  9. package/esm/components/button/button.config.js +1 -1
  10. package/esm/components/button/index.d.ts +1 -1
  11. package/esm/components/button/index.js +1 -1
  12. package/esm/components/checkbox/checkbox.component.d.ts +0 -2
  13. package/esm/components/checkbox/checkbox.component.js +1 -10
  14. package/esm/components/confirm/confirm.component.d.ts +4 -4
  15. package/esm/components/date/date.component.js +0 -9
  16. package/esm/components/decimal/decimal.component.js +1 -9
  17. package/esm/components/grouped-character/grouped-character.component.js +0 -8
  18. package/esm/components/icon/icon.component.d.ts +2 -1
  19. package/esm/components/icon/icon.component.js +7 -3
  20. package/esm/components/menu/__internal__/submenu/submenu.component.js +45 -12
  21. package/esm/components/menu/__internal__/submenu/submenu.style.d.ts +1 -0
  22. package/esm/components/menu/__internal__/submenu/submenu.style.js +31 -1
  23. package/esm/components/modal/__internal__/modal-manager.js +2 -3
  24. package/esm/components/number/number.component.js +0 -8
  25. package/esm/components/radio-button/radio-button.component.d.ts +0 -2
  26. package/esm/components/radio-button/radio-button.component.js +1 -11
  27. package/esm/components/select/filterable-select/filterable-select.component.js +2 -10
  28. package/esm/components/select/list-action-button/list-action-button.component.js +1 -1
  29. package/esm/components/select/multi-select/multi-select.component.js +2 -10
  30. package/esm/components/select/select-textbox/select-textbox.component.js +0 -1
  31. package/esm/components/select/simple-select/simple-select.component.js +2 -10
  32. package/esm/components/switch/switch.component.d.ts +0 -2
  33. package/esm/components/switch/switch.component.js +2 -11
  34. package/esm/components/textarea/textarea.component.js +0 -8
  35. package/esm/components/textbox/textbox.component.js +0 -8
  36. package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +2 -3
  37. package/lib/__internal__/character-count/character-count.style.js +1 -1
  38. package/lib/__internal__/checkable-input/checkable-input.component.js +1 -1
  39. package/lib/__internal__/checkable-input/checkable-input.style.js +1 -1
  40. package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +1 -1
  41. package/lib/__internal__/field-help/field-help.style.js +1 -1
  42. package/lib/__internal__/fieldset/fieldset.component.js +1 -1
  43. package/lib/__internal__/fieldset/fieldset.style.js +1 -1
  44. package/lib/__internal__/focus-trap/focus-trap.component.js +2 -2
  45. package/lib/__internal__/form-field/form-field.component.js +1 -1
  46. package/lib/__internal__/form-field/form-field.style.js +1 -1
  47. package/lib/__internal__/full-screen-heading/full-screen-heading.component.js +1 -1
  48. package/lib/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
  49. package/lib/__internal__/input/input-presentation.component.js +1 -1
  50. package/lib/__internal__/input/input-presentation.style.js +1 -1
  51. package/lib/__internal__/input/input.component.d.ts +0 -2
  52. package/lib/__internal__/input/input.component.js +1 -9
  53. package/lib/__internal__/input/input.style.js +1 -1
  54. package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
  55. package/lib/__internal__/label/label.component.js +1 -1
  56. package/lib/__internal__/label/label.style.js +1 -1
  57. package/lib/__internal__/popover/popover.component.js +1 -1
  58. package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +1 -1
  59. package/lib/__internal__/sticky-footer/sticky-footer.component.js +1 -1
  60. package/lib/__internal__/sticky-footer/sticky-footer.style.js +1 -1
  61. package/lib/__internal__/tooltip-provider/index.js +1 -1
  62. package/lib/__internal__/validation-message/validation-message.style.js +1 -1
  63. package/lib/__internal__/validations/validation-icon.component.js +1 -1
  64. package/lib/__internal__/validations/validation-icon.style.js +1 -1
  65. package/lib/components/accordion/accordion-group/accordion-group.component.js +1 -1
  66. package/lib/components/accordion/accordion.component.js +1 -1
  67. package/lib/components/accordion/accordion.style.js +1 -1
  68. package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +1 -1
  69. package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +1 -1
  70. package/lib/components/action-popover/action-popover.component.js +1 -1
  71. package/lib/components/action-popover/action-popover.style.js +1 -1
  72. package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
  73. package/lib/components/advanced-color-picker/advanced-color-picker.component.js +1 -1
  74. package/lib/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
  75. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  76. package/lib/components/anchor-navigation/anchor-navigation.component.js +1 -1
  77. package/lib/components/badge/badge.style.js +1 -1
  78. package/lib/components/batch-selection/batch-selection.style.js +1 -1
  79. package/lib/components/box/box.style.js +1 -1
  80. package/lib/components/breadcrumbs/crumb/crumb.style.js +1 -1
  81. package/lib/components/button/button-types.style.d.ts +0 -1
  82. package/lib/components/button/button-types.style.js +0 -21
  83. package/lib/components/button/button.component.d.ts +1 -5
  84. package/lib/components/button/button.component.js +7 -378
  85. package/lib/components/button/button.config.js +1 -1
  86. package/lib/components/button/button.style.js +1 -1
  87. package/lib/components/button/index.d.ts +1 -1
  88. package/lib/components/button/index.js +2 -9
  89. package/lib/components/button-bar/button-bar.style.js +1 -1
  90. package/lib/components/button-minor/button-minor.component.js +1 -1
  91. package/lib/components/button-minor/button-minor.style.js +1 -1
  92. package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.js +1 -1
  93. package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
  94. package/lib/components/button-toggle/button-toggle.component.js +1 -1
  95. package/lib/components/button-toggle/button-toggle.style.js +1 -1
  96. package/lib/components/carbon-provider/carbon-provider.component.js +1 -1
  97. package/lib/components/carbon-provider/top-modal-context.js +1 -1
  98. package/lib/components/card/card-footer/card-footer.component.js +1 -1
  99. package/lib/components/card/card-footer/card-footer.style.js +1 -1
  100. package/lib/components/card/card-row/card-row.component.js +1 -1
  101. package/lib/components/card/card-row/card-row.style.js +1 -1
  102. package/lib/components/card/card.component.js +1 -1
  103. package/lib/components/card/card.style.js +1 -1
  104. package/lib/components/carousel/carousel.component.js +1 -1
  105. package/lib/components/carousel/carousel.style.js +1 -1
  106. package/lib/components/carousel/slide/slide.style.js +1 -1
  107. package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +1 -1
  108. package/lib/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
  109. package/lib/components/checkbox/checkbox.component.d.ts +0 -2
  110. package/lib/components/checkbox/checkbox.component.js +2 -11
  111. package/lib/components/checkbox/checkbox.style.js +1 -1
  112. package/lib/components/confirm/confirm.component.d.ts +4 -4
  113. package/lib/components/confirm/confirm.component.js +1 -1
  114. package/lib/components/confirm/confirm.style.js +1 -1
  115. package/lib/components/content/content.style.js +1 -1
  116. package/lib/components/date/__internal__/date-picker/date-picker.component.js +1 -1
  117. package/lib/components/date/__internal__/date-picker/day-picker.style.js +1 -1
  118. package/lib/components/date/date.component.js +1 -10
  119. package/lib/components/date/date.style.js +1 -1
  120. package/lib/components/date-range/date-range.component.js +1 -1
  121. package/lib/components/decimal/decimal.component.js +2 -10
  122. package/lib/components/definition-list/dd/dd.component.js +1 -1
  123. package/lib/components/definition-list/definition-list.style.js +1 -1
  124. package/lib/components/definition-list/dt/dt.component.js +1 -1
  125. package/lib/components/detail/detail.style.js +1 -1
  126. package/lib/components/dialog/dialog.component.js +1 -1
  127. package/lib/components/dialog/dialog.style.js +1 -1
  128. package/lib/components/dialog-full-screen/content.style.js +1 -1
  129. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -1
  130. package/lib/components/dialog-full-screen/dialog-full-screen.style.js +1 -1
  131. package/lib/components/dismissible-box/dismissible-box.style.js +1 -1
  132. package/lib/components/draggable/draggable-container.component.js +1 -1
  133. package/lib/components/drawer/drawer.component.js +1 -1
  134. package/lib/components/drawer/drawer.style.js +1 -1
  135. package/lib/components/drawer/index.js +1 -1
  136. package/lib/components/duelling-picklist/duelling-picklist.component.js +1 -1
  137. package/lib/components/duelling-picklist/duelling-picklist.style.js +1 -1
  138. package/lib/components/duelling-picklist/picklist/picklist.component.js +1 -1
  139. package/lib/components/duelling-picklist/picklist-group/picklist-group.component.js +1 -1
  140. package/lib/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
  141. package/lib/components/duelling-picklist/picklist-item/picklist-item.component.js +1 -1
  142. package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
  143. package/lib/components/fieldset/fieldset.component.js +1 -1
  144. package/lib/components/fieldset/fieldset.style.js +1 -1
  145. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  146. package/lib/components/file-input/file-input.component.js +1 -1
  147. package/lib/components/file-input/file-input.style.js +1 -1
  148. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js +1 -1
  149. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
  150. package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.js +1 -1
  151. package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
  152. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +1 -1
  153. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  154. package/lib/components/flat-table/flat-table-head/flat-table-head.component.js +1 -1
  155. package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +1 -1
  156. package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  157. package/lib/components/flat-table/flat-table-row/__internal__/sub-row-provider.js +1 -1
  158. package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +1 -1
  159. package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  160. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +1 -1
  161. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
  162. package/lib/components/flat-table/flat-table.component.js +1 -1
  163. package/lib/components/flat-table/flat-table.style.js +1 -1
  164. package/lib/components/flat-table/sort/sort.component.js +1 -1
  165. package/lib/components/form/__internal__/form-summary.component.js +1 -1
  166. package/lib/components/form/__internal__/form-summary.style.js +1 -1
  167. package/lib/components/form/form.component.js +1 -1
  168. package/lib/components/form/form.style.js +1 -1
  169. package/lib/components/grid/grid-item/grid-item.style.js +1 -1
  170. package/lib/components/grouped-character/grouped-character.component.js +1 -9
  171. package/lib/components/heading/heading.style.js +1 -1
  172. package/lib/components/help/help.component.js +1 -1
  173. package/lib/components/help/help.style.js +1 -1
  174. package/lib/components/icon/icon.component.d.ts +2 -1
  175. package/lib/components/icon/icon.component.js +8 -4
  176. package/lib/components/icon/icon.style.js +1 -1
  177. package/lib/components/icon-button/icon-button.component.js +1 -1
  178. package/lib/components/icon-button/icon-button.style.js +1 -1
  179. package/lib/components/image/image.style.js +1 -1
  180. package/lib/components/inline-inputs/inline-inputs.component.js +1 -1
  181. package/lib/components/inline-inputs/inline-inputs.style.js +1 -1
  182. package/lib/components/link/link.component.js +1 -1
  183. package/lib/components/link/link.style.js +1 -1
  184. package/lib/components/link-preview/link-preview.style.js +1 -1
  185. package/lib/components/loader/loader-square.style.js +1 -1
  186. package/lib/components/loader-bar/loader-bar.component.js +1 -1
  187. package/lib/components/loader-bar/loader-bar.style.js +1 -1
  188. package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
  189. package/lib/components/menu/__internal__/submenu/submenu.component.js +46 -13
  190. package/lib/components/menu/__internal__/submenu/submenu.style.d.ts +1 -0
  191. package/lib/components/menu/__internal__/submenu/submenu.style.js +32 -2
  192. package/lib/components/menu/menu-divider/menu-divider.component.js +1 -1
  193. package/lib/components/menu/menu-divider/menu-divider.style.js +1 -1
  194. package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +1 -1
  195. package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
  196. package/lib/components/menu/menu-item/menu-item.component.js +1 -1
  197. package/lib/components/menu/menu-item/menu-item.style.js +1 -1
  198. package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +1 -1
  199. package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  200. package/lib/components/menu/menu.component.js +1 -1
  201. package/lib/components/menu/menu.style.js +1 -1
  202. package/lib/components/menu/scrollable-block/scrollable-block.component.js +1 -1
  203. package/lib/components/menu/scrollable-block/scrollable-block.style.js +1 -1
  204. package/lib/components/message/message.component.js +1 -1
  205. package/lib/components/message/message.style.js +1 -1
  206. package/lib/components/message/type-icon/type-icon.style.js +1 -1
  207. package/lib/components/modal/__internal__/modal-manager.js +2 -3
  208. package/lib/components/modal/index.js +1 -1
  209. package/lib/components/modal/modal.component.js +1 -1
  210. package/lib/components/modal/modal.style.js +1 -1
  211. package/lib/components/multi-action-button/multi-action-button.component.js +1 -1
  212. package/lib/components/multi-action-button/multi-action-button.style.js +1 -1
  213. package/lib/components/navigation-bar/fixed-navigation-bar.context.js +1 -1
  214. package/lib/components/navigation-bar/navigation-bar.component.js +1 -1
  215. package/lib/components/navigation-bar/navigation-bar.style.js +1 -1
  216. package/lib/components/note/note.style.js +1 -1
  217. package/lib/components/number/number.component.js +1 -9
  218. package/lib/components/numeral-date/numeral-date.component.js +1 -1
  219. package/lib/components/numeral-date/numeral-date.style.js +1 -1
  220. package/lib/components/pager/__internal__/pager-navigation-link.component.js +1 -1
  221. package/lib/components/pager/__internal__/pager-navigation.component.js +1 -1
  222. package/lib/components/pager/pager.component.js +1 -1
  223. package/lib/components/pager/pager.style.js +1 -1
  224. package/lib/components/pages/page/page.component.js +1 -1
  225. package/lib/components/pages/pages.component.js +1 -1
  226. package/lib/components/password/password.component.js +1 -1
  227. package/lib/components/pill/pill.style.js +1 -1
  228. package/lib/components/pod/pod.component.js +1 -1
  229. package/lib/components/pod/pod.style.js +1 -1
  230. package/lib/components/popover-container/popover-container.component.js +1 -1
  231. package/lib/components/portal/portal.js +1 -1
  232. package/lib/components/portrait/portrait.component.js +1 -1
  233. package/lib/components/preview/__internal__/preview-placeholder.style.js +1 -1
  234. package/lib/components/progress-tracker/progress-tracker.component.js +1 -1
  235. package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
  236. package/lib/components/radio-button/radio-button-group/radio-button-group.component.js +1 -1
  237. package/lib/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
  238. package/lib/components/radio-button/radio-button.component.d.ts +0 -2
  239. package/lib/components/radio-button/radio-button.component.js +2 -12
  240. package/lib/components/radio-button/radio-button.style.js +1 -1
  241. package/lib/components/search/search.component.js +1 -1
  242. package/lib/components/search/search.style.js +1 -1
  243. package/lib/components/select/__internal__/select-text/select-text.style.js +1 -1
  244. package/lib/components/select/filterable-select/filterable-select.component.js +3 -11
  245. package/lib/components/select/list-action-button/list-action-button.component.js +1 -1
  246. package/lib/components/select/multi-select/multi-select.component.js +3 -11
  247. package/lib/components/select/option/option.component.js +1 -1
  248. package/lib/components/select/option/option.style.js +1 -1
  249. package/lib/components/select/option-group-header/option-group-header.component.js +1 -1
  250. package/lib/components/select/option-row/option-row.component.js +1 -1
  251. package/lib/components/select/option-row/option-row.style.js +1 -1
  252. package/lib/components/select/select-list/select-list.component.js +1 -1
  253. package/lib/components/select/select-list/select-list.style.js +1 -1
  254. package/lib/components/select/select-textbox/select-textbox.component.js +1 -2
  255. package/lib/components/select/select.style.js +1 -1
  256. package/lib/components/select/simple-select/simple-select.component.js +3 -11
  257. package/lib/components/select/utils/with-filter.hoc.js +1 -1
  258. package/lib/components/settings-row/settings-row.style.js +1 -1
  259. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
  260. package/lib/components/sidebar/index.js +1 -1
  261. package/lib/components/sidebar/sidebar.component.js +1 -1
  262. package/lib/components/sidebar/sidebar.style.js +1 -1
  263. package/lib/components/simple-color-picker/simple-color/simple-color.component.js +1 -1
  264. package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
  265. package/lib/components/simple-color-picker/simple-color-picker.component.js +1 -1
  266. package/lib/components/simple-color-picker/simple-color-picker.style.js +1 -1
  267. package/lib/components/split-button/split-button-children.style.js +1 -1
  268. package/lib/components/split-button/split-button-toggle.style.js +1 -1
  269. package/lib/components/split-button/split-button.component.js +1 -1
  270. package/lib/components/split-button/split-button.style.js +1 -1
  271. package/lib/components/step-flow/step-flow.component.js +1 -1
  272. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +1 -1
  273. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
  274. package/lib/components/step-sequence/step-sequence.style.js +1 -1
  275. package/lib/components/switch/__internal__/switch-slider-panel.style.js +1 -1
  276. package/lib/components/switch/__internal__/switch-slider.style.js +1 -1
  277. package/lib/components/switch/switch.component.d.ts +0 -2
  278. package/lib/components/switch/switch.component.js +3 -12
  279. package/lib/components/switch/switch.style.js +1 -1
  280. package/lib/components/tabs/__internal__/tab-title/index.js +1 -1
  281. package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +1 -1
  282. package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +1 -1
  283. package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.js +1 -1
  284. package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +1 -1
  285. package/lib/components/tabs/tab/index.js +1 -1
  286. package/lib/components/tabs/tab/tab.component.js +1 -1
  287. package/lib/components/tabs/tab/tab.style.js +1 -1
  288. package/lib/components/tabs/tabs.component.js +1 -1
  289. package/lib/components/tabs/tabs.style.js +1 -1
  290. package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +1 -1
  291. package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +1 -1
  292. package/lib/components/text-editor/__internal__/toolbar/toolbar.component.js +1 -1
  293. package/lib/components/text-editor/index.js +1 -1
  294. package/lib/components/text-editor/text-editor.component.js +1 -1
  295. package/lib/components/text-editor/text-editor.style.js +1 -1
  296. package/lib/components/textarea/textarea.component.js +1 -9
  297. package/lib/components/textarea/textarea.style.js +1 -1
  298. package/lib/components/textbox/textbox.component.js +1 -9
  299. package/lib/components/textbox/textbox.style.js +1 -1
  300. package/lib/components/tile/tile-content/tile-content.component.js +1 -1
  301. package/lib/components/tile/tile-content/tile-content.style.js +1 -1
  302. package/lib/components/tile/tile-footer/tile-footer.style.js +1 -1
  303. package/lib/components/tile/tile-header/tile-header.style.js +1 -1
  304. package/lib/components/tile/tile.style.js +1 -1
  305. package/lib/components/tile-select/__internal__/accordion/accordion.component.js +1 -1
  306. package/lib/components/tile-select/tile-select.component.js +1 -1
  307. package/lib/components/tile-select/tile-select.style.js +1 -1
  308. package/lib/components/time/__internal__/time-toggle/time-toggle.component.js +1 -1
  309. package/lib/components/time/time.component.js +1 -1
  310. package/lib/components/toast/toast.component.js +1 -1
  311. package/lib/components/toast/toast.style.js +1 -1
  312. package/lib/components/tooltip/tooltip-pointer.style.js +1 -1
  313. package/lib/components/tooltip/tooltip.component.js +1 -1
  314. package/lib/components/tooltip/tooltip.style.js +1 -1
  315. package/lib/components/typography/typography.style.js +1 -1
  316. package/lib/components/vertical-divider/vertical-divider.component.js +1 -1
  317. package/lib/components/vertical-divider/vertical-divider.style.js +1 -1
  318. package/lib/components/vertical-menu/vertical-menu-full-screen/vertical-menu-full-screen.component.js +1 -1
  319. package/lib/components/vertical-menu/vertical-menu-item/vertical-menu-item.component.js +1 -1
  320. package/lib/components/vertical-menu/vertical-menu.style.js +1 -1
  321. package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.js +1 -1
  322. package/lib/hooks/__internal__/useIsStickyFooterForm/useIsStickyFooterForm.js +1 -1
  323. package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +2 -3
  324. package/package.json +6 -14
@@ -3,10 +3,10 @@ import { DialogProps } from "../dialog";
3
3
  import { IconType } from "../icon";
4
4
  import { TagProps } from "../../__internal__/utils/helpers/tags";
5
5
  export interface ConfirmProps extends Omit<DialogProps, "className" | "disableFocusTrap" | "bespokeFocusTrap" | "focusableSelectors" | "help" | "role" | "contentPadding" | "focusableContainers" | "ariaRole" | "timeout" | "enableBackgroundUI" | "disableClose"> {
6
- /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
7
- cancelButtonType?: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground";
8
- /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" */
9
- confirmButtonType?: "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground";
6
+ /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "darkBackground" */
7
+ cancelButtonType?: "primary" | "secondary" | "tertiary" | "darkBackground";
8
+ /** Color variants for new business themes: "primary" | "secondary" | "tertiary" | "darkBackground" */
9
+ confirmButtonType?: "primary" | "secondary" | "tertiary" | "darkBackground";
10
10
  /** Customise the cancel button label */
11
11
  cancelLabel?: string;
12
12
  /** Customise the confirm button label */
@@ -11,10 +11,8 @@ import Textbox from "../textbox";
11
11
  import DatePicker from "./__internal__/date-picker";
12
12
  import DateRangeContext from "../date-range/date-range.context";
13
13
  import useClickAwayListener from "../../hooks/__internal__/useClickAwayListener";
14
- import Logger from "../../__internal__/utils/logger";
15
14
  import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
16
15
  import guid from "../../__internal__/utils/helpers/guid";
17
- let deprecateInputRefWarnTriggered = false;
18
16
  const DateInput = /*#__PURE__*/React.forwardRef(({
19
17
  adaptiveLabelBreakpoint,
20
18
  allowEmptyValue,
@@ -38,7 +36,6 @@ const DateInput = /*#__PURE__*/React.forwardRef(({
38
36
  size = "medium",
39
37
  tooltipPosition,
40
38
  value,
41
- inputRef,
42
39
  inputWidth,
43
40
  labelWidth,
44
41
  maxWidth,
@@ -67,10 +64,6 @@ const DateInput = /*#__PURE__*/React.forwardRef(({
67
64
  const [selectedDays, setSelectedDays] = useState(checkISOFormatAndLength(value) ? parseISODate(value) : parseDate(format, value));
68
65
  const isInitialValue = useRef(true);
69
66
  const pickerTabGuardId = useRef(guid());
70
- if (!deprecateInputRefWarnTriggered && inputRef) {
71
- deprecateInputRefWarnTriggered = true;
72
- Logger.deprecate("The `inputRef` prop in `DateInput` component is deprecated and will soon be removed. Please use `ref` instead.");
73
- }
74
67
  const computeInvalidRawValue = inputValue => allowEmptyValue && !inputValue.length ? inputValue : null;
75
68
  const buildCustomEvent = ev => {
76
69
  const {
@@ -286,7 +279,6 @@ const DateInput = /*#__PURE__*/React.forwardRef(({
286
279
  maxWidth: maxWidth,
287
280
  inputWidth: inputWidth
288
281
  }), /*#__PURE__*/React.createElement(Textbox, _extends({}, filterOutStyledSystemSpacingProps(rest), {
289
- inputRef: inputRef,
290
282
  value: computedValue(),
291
283
  onBlur: handleBlur,
292
284
  onChange: handleChange,
@@ -428,7 +420,6 @@ if (process.env.NODE_ENV !== "production") {
428
420
  "inputHint": PropTypes.string,
429
421
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
430
422
  "inputName": PropTypes.oneOf(["end", "start"]),
431
- "inputRef": PropTypes.func,
432
423
  "inputWidth": PropTypes.number,
433
424
  "is": PropTypes.string,
434
425
  "isOptional": PropTypes.bool,
@@ -6,7 +6,6 @@ import Textbox from "../textbox";
6
6
  import LocaleContext from "../../__internal__/i18n-context";
7
7
  import usePrevious from "../../hooks/__internal__/usePrevious";
8
8
  import Logger from "../../__internal__/utils/logger";
9
- let deprecateInputRefWarnTriggered = false;
10
9
  let deprecateUncontrolledWarnTriggered = false;
11
10
  const Decimal = /*#__PURE__*/React.forwardRef(({
12
11
  align = "right",
@@ -22,14 +21,9 @@ const Decimal = /*#__PURE__*/React.forwardRef(({
22
21
  allowEmptyValue = false,
23
22
  locale,
24
23
  value,
25
- inputRef,
26
24
  ...rest
27
25
  }, ref) => {
28
26
  const l = useContext(LocaleContext);
29
- if (!deprecateInputRefWarnTriggered && inputRef) {
30
- deprecateInputRefWarnTriggered = true;
31
- Logger.deprecate("The `inputRef` prop in `Decimal` component is deprecated and will soon be removed. Please use `ref` instead.");
32
- }
33
27
  const getSeparator = useCallback(separatorType => {
34
28
  const numberWithGroupAndDecimalSeparator = 10000.1;
35
29
  return Intl.NumberFormat(locale || l.locale()).formatToParts(numberWithGroupAndDecimalSeparator).find(part => part.type === separatorType)?.value;
@@ -182,8 +176,7 @@ const Decimal = /*#__PURE__*/React.forwardRef(({
182
176
  value: stateValue,
183
177
  "data-component": "decimal",
184
178
  id: id,
185
- ref: ref,
186
- inputRef: inputRef
179
+ ref: ref
187
180
  }, rest)), /*#__PURE__*/React.createElement("input", {
188
181
  name: name,
189
182
  value: toStandardDecimal(stateValue),
@@ -299,7 +292,6 @@ if (process.env.NODE_ENV !== "production") {
299
292
  "inputHint": PropTypes.string,
300
293
  "inputIcon": PropTypes.oneOf(["accessibility_web", "add", "admin", "alert_on", "alert", "analysis", "app_facebook", "app_instagram", "app_tiktok", "app_twitter", "app_youtube", "apps", "arrow_bottom_right_circle", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_top_left_circle", "arrow_up", "arrow", "arrows_left_right", "attach", "bank_with_card", "bank", "basket_with_squares", "basket", "bed", "bill_paid", "bill_unpaid", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "box_arrow_right", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_pay_date", "calendar_today", "calendar", "call", "camera", "car_lock", "car_money", "car_repair", "card_view", "card_wallet", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "cash", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "check_all", "check_none", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "cloud_co2", "coins", "collaborate", "computer_clock", "connect_off", "connect", "construction", "contact_card", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "dashboard", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "drill", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "form_refresh", "gift", "go", "graduation_hat", "graph", "grid", "hand_cash_coins", "hand_cash_note", "heart_pulse", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "intranet", "italic", "job_seeked", "key", "laptop", "leaf", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "like_no", "like", "link_cloud", "link_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "microphone", "minimise", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "percentage_boxed", "person_info", "person_tick", "person", "petrol_pump", "phone", "piggy_bank", "pin", "plane", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "protect", "question_hollow", "question_mark", "question", "recruiting", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "send", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "support_online", "sync", "tag", "talk", "target_man", "target", "theatre_masks", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "volunteering", "warning", "website", "welfare"]),
301
294
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
302
- "inputRef": PropTypes.func,
303
295
  "inputWidth": PropTypes.number,
304
296
  "is": PropTypes.string,
305
297
  "isOptional": PropTypes.bool,
@@ -21,7 +21,6 @@ const buildCustomTarget = ({
21
21
  value
22
22
  };
23
23
  };
24
- let deprecateInputRefWarnTriggered = false;
25
24
  let deprecateUncontrolledWarnTriggered = false;
26
25
  const GroupedCharacter = /*#__PURE__*/React.forwardRef(({
27
26
  defaultValue,
@@ -30,7 +29,6 @@ const GroupedCharacter = /*#__PURE__*/React.forwardRef(({
30
29
  onChange,
31
30
  separator: rawSeparator,
32
31
  value: externalValue,
33
- inputRef,
34
32
  ...rest
35
33
  }, ref) => {
36
34
  const [internalValue, setInternalValue] = useState(defaultValue || "");
@@ -38,10 +36,6 @@ const GroupedCharacter = /*#__PURE__*/React.forwardRef(({
38
36
  const separator = rawSeparator.substring(0, 1); // Ensure max length is 1
39
37
 
40
38
  const maxRawLength = groups.reduce(toSum);
41
- if (!deprecateInputRefWarnTriggered && inputRef) {
42
- deprecateInputRefWarnTriggered = true;
43
- Logger.deprecate("The `inputRef` prop in `GroupedCharacter` component is deprecated and will soon be removed. Please use `ref` instead.");
44
- }
45
39
  if (!deprecateUncontrolledWarnTriggered && !isControlled) {
46
40
  deprecateUncontrolledWarnTriggered = true;
47
41
  Logger.deprecate("Uncontrolled behaviour in `Grouped Character` is deprecated and support will soon be removed. Please make sure all your inputs are controlled.");
@@ -114,7 +108,6 @@ const GroupedCharacter = /*#__PURE__*/React.forwardRef(({
114
108
  onChange: handleChange,
115
109
  onBlur: handleBlur,
116
110
  onKeyPress: handleKeyPress,
117
- inputRef: inputRef,
118
111
  ref: ref
119
112
  }));
120
113
  });
@@ -227,7 +220,6 @@ if (process.env.NODE_ENV !== "production") {
227
220
  "inputHint": PropTypes.string,
228
221
  "inputIcon": PropTypes.oneOf(["accessibility_web", "add", "admin", "alert_on", "alert", "analysis", "app_facebook", "app_instagram", "app_tiktok", "app_twitter", "app_youtube", "apps", "arrow_bottom_right_circle", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_top_left_circle", "arrow_up", "arrow", "arrows_left_right", "attach", "bank_with_card", "bank", "basket_with_squares", "basket", "bed", "bill_paid", "bill_unpaid", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "box_arrow_right", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_pay_date", "calendar_today", "calendar", "call", "camera", "car_lock", "car_money", "car_repair", "card_view", "card_wallet", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "cash", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "check_all", "check_none", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "cloud_co2", "coins", "collaborate", "computer_clock", "connect_off", "connect", "construction", "contact_card", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "dashboard", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "drill", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "form_refresh", "gift", "go", "graduation_hat", "graph", "grid", "hand_cash_coins", "hand_cash_note", "heart_pulse", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "intranet", "italic", "job_seeked", "key", "laptop", "leaf", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "like_no", "like", "link_cloud", "link_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "microphone", "minimise", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "percentage_boxed", "person_info", "person_tick", "person", "petrol_pump", "phone", "piggy_bank", "pin", "plane", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "protect", "question_hollow", "question_mark", "question", "recruiting", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "send", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "support_online", "sync", "tag", "talk", "target_man", "target", "theatre_masks", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "volunteering", "warning", "website", "welfare"]),
229
222
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
230
- "inputRef": PropTypes.func,
231
223
  "inputWidth": PropTypes.number,
232
224
  "is": PropTypes.string,
233
225
  "isOptional": PropTypes.bool,
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
+ import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
3
4
  import { StyledIconProps } from "./icon.style";
4
5
  import { IconType } from "./icon-type";
5
6
  import { TooltipPositions } from "../tooltip/tooltip.config";
6
7
  export declare type LegacyIconTypes = "help" | "maintenance" | "new" | "success" | "messages";
7
- export interface IconProps extends Omit<StyledIconProps, "type">, MarginProps {
8
+ export interface IconProps extends Omit<StyledIconProps, "type">, MarginProps, Omit<TagProps, "data-component"> {
8
9
  /** Set whether icon should be recognised by assistive technologies */
9
10
  "aria-hidden"?: boolean;
10
11
  /** Aria label for accessibility purposes */
@@ -4,7 +4,6 @@ import invariant from "invariant";
4
4
  import Tooltip from "../tooltip";
5
5
  import { filterStyledSystemMarginProps } from "../../style/utils";
6
6
  import { TooltipContext } from "../../__internal__/tooltip-provider";
7
- import tagComponent from "../../__internal__/utils/helpers/tags/tags";
8
7
  import StyledIcon from "./icon.style";
9
8
  import { ICON_TOOLTIP_POSITIONS } from "./icon-config";
10
9
  import { TabTitleContext } from "../tabs/__internal__/tab-title";
@@ -18,6 +17,8 @@ const Icon = /*#__PURE__*/React.forwardRef(({
18
17
  bgSize,
19
18
  className,
20
19
  color,
20
+ "data-element": dataElement,
21
+ "data-role": dataRole,
21
22
  disabled,
22
23
  focusable = true,
23
24
  fontSize = "small",
@@ -91,7 +92,9 @@ const Icon = /*#__PURE__*/React.forwardRef(({
91
92
  bgShape,
92
93
  className: className || undefined,
93
94
  color,
94
- "data-element": iconType,
95
+ "data-component": "icon",
96
+ "data-element": dataElement ?? iconType,
97
+ "data-role": dataRole ?? "icon",
95
98
  disabled: disabledFromContext || disabled,
96
99
  fontSize,
97
100
  hasTooltip,
@@ -102,7 +105,6 @@ const Icon = /*#__PURE__*/React.forwardRef(({
102
105
  role,
103
106
  tabIndex: computedTabIndex,
104
107
  type: iconType,
105
- ...tagComponent("icon", rest),
106
108
  ...filterStyledSystemMarginProps(rest)
107
109
  };
108
110
  const shouldShowTooltip = () => {
@@ -135,6 +137,8 @@ if (process.env.NODE_ENV !== "production") {
135
137
  "bgSize": PropTypes.oneOf(["extra-large", "extra-small", "large", "medium", "small"]),
136
138
  "className": PropTypes.string,
137
139
  "color": PropTypes.string,
140
+ "data-element": PropTypes.string,
141
+ "data-role": PropTypes.string,
138
142
  "disabled": PropTypes.bool,
139
143
  "focusable": PropTypes.bool,
140
144
  "fontSize": PropTypes.oneOf(["extra-large", "large", "medium", "small"]),
@@ -30,7 +30,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
30
30
  onClick,
31
31
  ...rest
32
32
  }, ref) => {
33
- const submenuRef = useRef(null);
33
+ const [submenuRef, setSubmenuRef] = useState(null);
34
34
  const submenuId = useRef(guid());
35
35
  const menuContext = useContext(MenuContext);
36
36
  const {
@@ -43,6 +43,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
43
43
  const [submenuFocusId, setSubmenuFocusId] = useState(null);
44
44
  const [submenuItemIds, setSubmenuItemIds] = useState([]);
45
45
  const [characterString, setCharacterString] = useState("");
46
+ const [applyFocusRadius, setApplyFocusRadius] = useState(false);
46
47
  const shiftTabPressed = useRef(false);
47
48
  const focusFirstMenuItemOnOpen = useRef(false);
48
49
  const numberOfChildren = submenuItemIds.length;
@@ -51,15 +52,15 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
51
52
  } = useContext(FixedNavigationBarContext);
52
53
  const onSubmenuOpen = useStableCallback(onSubmenuOpenProp);
53
54
  const blockIndex = useMemo(() => {
54
- const items = submenuRef.current?.querySelectorAll(BLOCK_INDEX_SELECTOR);
55
+ const items = submenuRef?.querySelectorAll(BLOCK_INDEX_SELECTOR);
55
56
  if (items && submenuOpen && numberOfChildren) {
56
57
  const childrenArray = Array.from(items);
57
- const scrollableBlock = submenuRef.current?.querySelector(`[data-component='${SCROLLABLE_BLOCK}']`);
58
+ const scrollableBlock = submenuRef?.querySelector(`[data-component='${SCROLLABLE_BLOCK}']`);
58
59
  const index = scrollableBlock ? childrenArray.indexOf(scrollableBlock) : -1;
59
60
  return scrollableBlock?.querySelector(`[data-component='${SCROLLABLE_BLOCK_PARENT}']`) ? index + 1 : index;
60
61
  }
61
62
  return -1;
62
- }, [submenuOpen, numberOfChildren]);
63
+ }, [submenuOpen, numberOfChildren, submenuRef]);
63
64
  const characterTimer = useRef(null);
64
65
  const startCharacterTimeout = useCallback(() => {
65
66
  characterTimer.current = setTimeout(() => {
@@ -77,6 +78,35 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
77
78
  setSubmenuOpen(true);
78
79
  setOpenSubmenuId(submenuId.current);
79
80
  }, [setOpenSubmenuId]);
81
+ const lastMenuItemElement = useRef();
82
+ useEffect(() => {
83
+ const handleBorderRadiusStyling = () => {
84
+ // Finds all ul elements that are not submenus
85
+ const ulElements = Array.from(submenuRef?.querySelectorAll("ul:not([data-component='submenu'])") || /* istanbul ignore next */[]);
86
+
87
+ // Terminate early if there are no ul elements as we have nothing we need to apply styles to.
88
+ if (ulElements.length === 0) return;
89
+
90
+ // Get the last menu item in the submenu
91
+ const lastMenuItem = Array.from(submenuRef?.querySelectorAll("[data-component='menu-item']") || /* istanbul ignore next */[]).pop();
92
+ lastMenuItemElement.current = lastMenuItem;
93
+
94
+ // Get the last segment block
95
+ const lastSegmentBlock = ulElements.pop();
96
+
97
+ // Get all the menu items from the last segment block
98
+ const segmentBlockMenuItems = Array.from(lastSegmentBlock?.querySelectorAll("[data-component='menu-item']") || /* istanbul ignore next */[]);
99
+
100
+ // Get the last menu item in the last segment block
101
+ const lastMenuItemInSegmentBlock = segmentBlockMenuItems.pop();
102
+ // Check if the last item in the segment block is the same as the last MenuItem in the submenu
103
+ const menuItemsMatch = !!lastMenuItemInSegmentBlock && lastMenuItemInSegmentBlock === lastMenuItem;
104
+ setApplyFocusRadius(menuItemsMatch);
105
+ };
106
+ if (submenuOpen && submenuRef) {
107
+ handleBorderRadiusStyling();
108
+ }
109
+ }, [submenuOpen, submenuRef]);
80
110
  useEffect(() => {
81
111
  if (submenuOpen && onSubmenuOpen) {
82
112
  onSubmenuOpen();
@@ -144,6 +174,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
144
174
  if (Events.isUpKey(event)) {
145
175
  event.preventDefault();
146
176
  shiftTabPressed.current = false;
177
+ setApplyFocusRadius(false);
147
178
  if (nextIndex > 0) {
148
179
  nextIndex -= 1;
149
180
  }
@@ -194,15 +225,15 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
194
225
  }, [submenuItemIds, submenuOpen, href, numberOfChildren, submenuFocusId, findCurrentIndex, openSubmenu, closeSubmenu, onKeyDown, characterString, restartCharacterTimeout, startCharacterTimeout]);
195
226
  useEffect(() => {
196
227
  /* istanbul ignore else */
197
- if (submenuRef.current && children) {
198
- const items = submenuRef.current?.querySelectorAll(ALL_CHILDREN_SELECTOR);
228
+ if (submenuRef && children) {
229
+ const items = submenuRef?.querySelectorAll(ALL_CHILDREN_SELECTOR);
199
230
 
200
231
  /* istanbul ignore else */
201
232
  if (items) {
202
233
  setSubmenuItemIds(Array.from(items).map(item => item.getAttribute("id")));
203
234
  }
204
235
  }
205
- }, [children, submenuOpen]);
236
+ }, [children, submenuOpen, submenuRef]);
206
237
  useEffect(() => {
207
238
  if (focusFirstMenuItemOnOpen.current && submenuOpen && !submenuFocusId && submenuItemIds.length) {
208
239
  focusFirstMenuItemOnOpen.current = false;
@@ -221,7 +252,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
221
252
  }
222
253
  };
223
254
  useEffect(() => {
224
- const items = submenuRef.current?.querySelectorAll(ALL_CHILDREN_SELECTOR);
255
+ const items = submenuRef?.querySelectorAll(ALL_CHILDREN_SELECTOR);
225
256
  if (items && characterString !== "") {
226
257
  const submenuChildren = Array.from(items);
227
258
  const nextItem = characterNavigation(characterString, submenuChildren);
@@ -229,7 +260,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
229
260
  setSubmenuFocusId(nextItem.id);
230
261
  }
231
262
  }
232
- }, [characterString, submenuItemIds]);
263
+ }, [submenuRef, characterString, submenuItemIds]);
233
264
  if (inFullscreenView) {
234
265
  return /*#__PURE__*/React.createElement(StyledSubmenuWrapper, {
235
266
  "data-component": "submenu-wrapper",
@@ -251,7 +282,8 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
251
282
  variant: variant,
252
283
  menuType: menuType,
253
284
  inFullscreenView: inFullscreenView,
254
- ref: submenuRef
285
+ ref: setSubmenuRef,
286
+ applyFocusRadiusStyling: false
255
287
  }, /*#__PURE__*/React.createElement(SubmenuContext.Provider, {
256
288
  value: {
257
289
  handleKeyDown,
@@ -266,7 +298,7 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
266
298
  onMouseLeave: () => closeSubmenu(),
267
299
  isSubmenuOpen: submenuOpen,
268
300
  onClick: handleClickInside,
269
- ref: submenuRef
301
+ ref: setSubmenuRef
270
302
  }, /*#__PURE__*/React.createElement(StyledMenuItemWrapper, _extends({}, rest, {
271
303
  className: className,
272
304
  menuType: menuType,
@@ -289,7 +321,8 @@ const Submenu = /*#__PURE__*/React.forwardRef(({
289
321
  variant: variant,
290
322
  menuType: menuType,
291
323
  role: blockIndex === 0 ? "presentation" : "list",
292
- maxHeight: submenuMaxHeight
324
+ maxHeight: submenuMaxHeight,
325
+ applyFocusRadiusStyling: applyFocusRadius
293
326
  }, /*#__PURE__*/React.createElement(SubmenuContext.Provider, {
294
327
  value: {
295
328
  submenuFocusId,
@@ -11,6 +11,7 @@ interface StyledSubmenuWrapperProps extends SharedStyleProps {
11
11
  interface StyledSubmenuProps extends SharedStyleProps, Pick<SubmenuProps, "variant"> {
12
12
  submenuDirection?: string;
13
13
  maxHeight?: string;
14
+ applyFocusRadiusStyling: boolean;
14
15
  }
15
16
  declare const StyledSubmenuWrapper: import("styled-components").StyledComponent<"div", any, StyledSubmenuWrapperProps, never>;
16
17
  declare const StyledSubmenu: import("styled-components").StyledComponent<"ul", any, StyledSubmenuProps, never>;
@@ -1,10 +1,13 @@
1
1
  import styled, { css } from "styled-components";
2
+ import StyledScrollableBlock from "../../../menu/scrollable-block/scrollable-block.style";
2
3
  import { baseTheme } from "../../../../style/themes";
3
4
  import { StyledLink } from "../../../link/link.style";
4
5
  import { StyledMenuItem } from "../../menu.style";
6
+ import StyledBox from "../../../box/box.style";
5
7
  import StyledMenuItemWrapper from "../../menu-item/menu-item.style";
6
8
  import StyledIcon from "../../../icon/icon.style";
7
9
  import menuConfigVariants from "../../menu.config";
10
+ import { StyledSegmentChildren } from "../../menu-segment-title/menu-segment-title.style";
8
11
  const StyledSubmenuWrapper = styled.div`
9
12
  position: relative;
10
13
  width: fit-content;
@@ -38,7 +41,8 @@ const StyledSubmenu = styled.ul`
38
41
  submenuDirection,
39
42
  variant,
40
43
  inFullscreenView,
41
- maxHeight
44
+ maxHeight,
45
+ applyFocusRadiusStyling
42
46
  }) => css`
43
47
  ${!inFullscreenView && menuType && css`
44
48
  box-shadow: var(--boxShadow100);
@@ -71,6 +75,32 @@ const StyledSubmenu = styled.ul`
71
75
  border-bottom-left-radius: var(--borderRadius100);
72
76
  border-bottom-right-radius: var(--borderRadius100);
73
77
  }
78
+
79
+ & ${StyledSegmentChildren} > ${StyledMenuItem}:last-of-type a,
80
+ ${StyledSegmentChildren} > ${StyledMenuItem}:last-of-type button,
81
+ ${StyledSegmentChildren} > ${StyledMenuItem}:last-of-type > span,
82
+ ${StyledSegmentChildren} > ${StyledMenuItem}:last-of-type > div {
83
+ border-bottom-right-radius: var(--borderRadius000);
84
+ border-bottom-left-radius: var(--borderRadius000);
85
+
86
+ :focus {
87
+ border-bottom-right-radius: ${applyFocusRadiusStyling ? "var(--borderRadius100)" : "var(--borderRadius000)"};
88
+ border-bottom-left-radius: ${applyFocusRadiusStyling ? "var(--borderRadius100)" : "var(--borderRadius000)"};
89
+ }
90
+ }
91
+
92
+ &&&& ${StyledScrollableBlock} {
93
+ ${StyledBox} {
94
+ border-bottom-right-radius: var(--borderRadius000);
95
+ border-bottom-left-radius: ${applyFocusRadiusStyling ? "var(--borderRadius100)" : "var(--borderRadius000)"};
96
+
97
+ ${StyledMenuItem}:last-child ${StyledLink}, ${StyledMenuItem}:last-child a,
98
+ ${StyledMenuItem}:last-child button {
99
+ border-bottom-right-radius: var(--borderRadius000);
100
+ border-bottom-left-radius: ${applyFocusRadiusStyling ? "var(--borderRadius100)" : "var(--borderRadius000)"};
101
+ }
102
+ }
103
+ }
74
104
  `}
75
105
 
76
106
  display: block;
@@ -2,7 +2,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
2
2
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
3
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
6
6
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  let ModalManagerInstance = /*#__PURE__*/function () {
8
8
  function ModalManagerInstance() {
@@ -34,7 +34,7 @@ let ModalManagerInstance = /*#__PURE__*/function () {
34
34
  }
35
35
  this.modalList = window.__CARBON_INTERNALS_MODAL_LIST;
36
36
  }
37
- _createClass(ModalManagerInstance, [{
37
+ return _createClass(ModalManagerInstance, [{
38
38
  key: "getTopModal",
39
39
  value: function getTopModal() {
40
40
  if (!this.modalList.length) {
@@ -93,7 +93,6 @@ let ModalManagerInstance = /*#__PURE__*/function () {
93
93
  }
94
94
  }
95
95
  }]);
96
- return ModalManagerInstance;
97
96
  }();
98
97
  const ModalManager = new ModalManagerInstance();
99
98
  export { ModalManagerInstance };
@@ -4,7 +4,6 @@ import PropTypes from "prop-types";
4
4
  import Textbox from "../textbox";
5
5
  import Logger from "../../__internal__/utils/logger";
6
6
  import { ALIGN_DEFAULT, LABEL_VALIDATION_DEFAULT, LABEL_WIDTH_DEFAULT, SIZE_DEFAULT } from "../textbox/textbox.component";
7
- let deprecateInputRefWarnTriggered = false;
8
7
  let deprecateUncontrolledWarnTriggered = false;
9
8
  function isValidNumber(value) {
10
9
  const regex = new RegExp("^[-]?[0-9]*$");
@@ -15,7 +14,6 @@ const Number = /*#__PURE__*/React.forwardRef(({
15
14
  onChange,
16
15
  onKeyDown,
17
16
  value,
18
- inputRef,
19
17
  align = ALIGN_DEFAULT,
20
18
  labelWidth = LABEL_WIDTH_DEFAULT,
21
19
  size = SIZE_DEFAULT,
@@ -24,10 +22,6 @@ const Number = /*#__PURE__*/React.forwardRef(({
24
22
  }, ref) => {
25
23
  const selectionStart = useRef(null);
26
24
  const selectionEnd = useRef(null);
27
- if (!deprecateInputRefWarnTriggered && inputRef) {
28
- deprecateInputRefWarnTriggered = true;
29
- Logger.deprecate("The `inputRef` prop in `Number` component is deprecated and will soon be removed. Please use `ref` instead.");
30
- }
31
25
  if (!deprecateUncontrolledWarnTriggered && !onChange) {
32
26
  deprecateUncontrolledWarnTriggered = true;
33
27
  Logger.deprecate("Uncontrolled behaviour in `Number` is deprecated and support will soon be removed. Please make sure all your inputs are controlled.");
@@ -52,7 +46,6 @@ const Number = /*#__PURE__*/React.forwardRef(({
52
46
  onChange: handleOnChange,
53
47
  onKeyDown: handleKeyDown,
54
48
  ref: ref,
55
- inputRef: inputRef,
56
49
  align: align,
57
50
  labelWidth: labelWidth,
58
51
  size: size,
@@ -167,7 +160,6 @@ if (process.env.NODE_ENV !== "production") {
167
160
  "inputHint": PropTypes.string,
168
161
  "inputIcon": PropTypes.oneOf(["accessibility_web", "add", "admin", "alert_on", "alert", "analysis", "app_facebook", "app_instagram", "app_tiktok", "app_twitter", "app_youtube", "apps", "arrow_bottom_right_circle", "arrow_down", "arrow_left_boxed", "arrow_left_right_small", "arrow_left_small", "arrow_left", "arrow_right_small", "arrow_right", "arrow_top_left_circle", "arrow_up", "arrow", "arrows_left_right", "attach", "bank_with_card", "bank", "basket_with_squares", "basket", "bed", "bill_paid", "bill_unpaid", "bin", "block_arrow_right", "blocked_square", "blocked", "bold", "box_arrow_left", "box_arrow_right", "boxed_shapes", "bulk_destroy", "bullet_list_dotted", "bullet_list_numbers", "bullet_list", "business", "calendar_pay_date", "calendar_today", "calendar", "call", "camera", "car_lock", "car_money", "car_repair", "card_view", "card_wallet", "caret_down", "caret_large_down", "caret_large_left", "caret_large_right", "caret_large_up", "caret_left", "caret_right", "caret_up", "cart", "cash", "chart_bar", "chart_line", "chart_pie", "chat_notes", "chat", "check_all", "check_none", "chevron_down_thick", "chevron_down", "chevron_left_thick", "chevron_left", "chevron_right_thick", "chevron_right", "chevron_up_thick", "chevron_up", "circle_with_dots", "circles_connection", "clock", "close", "cloud_co2", "coins", "collaborate", "computer_clock", "connect_off", "connect", "construction", "contact_card", "contacts", "copy", "create", "credit_card_slash", "credit_card", "cross_circle", "cross", "csv", "dashboard", "delete", "delivery", "disconnect", "disputed", "document_right_align", "document_tick", "document_vertical_lines", "download", "draft", "drag_vertical", "drag", "drill", "dropdown", "duplicate", "edit", "edited", "ellipsis_horizontal", "ellipsis_vertical", "email_switch", "email", "entry", "envelope_dollar", "envelope_euro", "error_square", "error", "euro", "expand", "factory", "favourite_lined", "favourite", "fax", "feedback", "file_excel", "file_generic", "file_image", "file_pdf", "file_word", "files_leaning", "filter_new", "filter", "fit_height", "fit_width", "flag", "folder", "form_refresh", "gift", "go", "graduation_hat", "graph", "grid", "hand_cash_coins", "hand_cash_note", "heart_pulse", "help", "hide", "home", "image", "in_progress", "in_transit", "individual", "info", "intranet", "italic", "job_seeked", "key", "laptop", "leaf", "ledger_arrow_left", "ledger_arrow_right", "ledger", "lightbulb_off", "lightbulb_on", "like_no", "like", "link_cloud", "link_on", "link", "list_view", "location", "locked", "logout", "lookup", "marker", "message", "microphone", "minimise", "minus_large", "minus", "mobile", "money_bag", "none", "old_warning", "palm_tree", "pause_circle", "pause", "pdf", "people_switch", "people", "percentage_boxed", "person_info", "person_tick", "person", "petrol_pump", "phone", "piggy_bank", "pin", "plane", "play_circle", "play", "plus_large", "plus", "pound", "print", "progress", "progressed", "protect", "question_hollow", "question_mark", "question", "recruiting", "refresh_clock", "refresh", "remove", "sage_coin", "save", "scan", "search", "send", "services", "settings_old", "settings", "share", "shop", "sort_down", "sort_up", "spanner", "split_container", "split", "square_dot", "squares_nine", "stacked_boxes", "stacked_squares", "submitted", "support_online", "sync", "tag", "talk", "target_man", "target", "theatre_masks", "three_boxes", "tick_circle", "tick_thick", "tick", "true_tick", "u_turn_left", "u_turn_right", "undo", "unlocked", "upload", "uploaded", "video", "view", "volunteering", "warning", "website", "welfare"]),
169
162
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
170
- "inputRef": PropTypes.func,
171
163
  "inputWidth": PropTypes.number,
172
164
  "is": PropTypes.string,
173
165
  "isOptional": PropTypes.bool,
@@ -19,8 +19,6 @@ export interface RadioButtonProps extends Omit<CommonCheckableInputProps, "requi
19
19
  tooltipPosition?: "top" | "bottom" | "left" | "right";
20
20
  /** Aria label for rendered help component */
21
21
  helpAriaLabel?: string;
22
- /** A callback to retrieve the input reference (deprecated) */
23
- inputRef?: React.Ref<HTMLInputElement>;
24
22
  }
25
23
  export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>;
26
24
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>>;
@@ -7,9 +7,7 @@ import CheckableInput from "../../__internal__/checkable-input/checkable-input.c
7
7
  import RadioButtonSvg from "./radio-button-svg.component";
8
8
  import { filterStyledSystemMarginProps } from "../../style/utils";
9
9
  import { TooltipProvider } from "../../__internal__/tooltip-provider";
10
- import Logger from "../../__internal__/utils/logger";
11
10
  import { NewValidationContext } from "../carbon-provider/carbon-provider.component";
12
- let deprecateInputRefWarnTriggered = false;
13
11
  const RadioButton = /*#__PURE__*/React.forwardRef(({
14
12
  autoFocus,
15
13
  checked,
@@ -38,7 +36,6 @@ const RadioButton = /*#__PURE__*/React.forwardRef(({
38
36
  "data-element": dataElement,
39
37
  "data-role": dataRole,
40
38
  helpAriaLabel,
41
- inputRef,
42
39
  ...props
43
40
  }, ref) => {
44
41
  const {
@@ -54,10 +51,6 @@ const RadioButton = /*#__PURE__*/React.forwardRef(({
54
51
  // trigger focus, as Safari doesn't focus radioButtons on click by default
55
52
  event.target.focus();
56
53
  }, [onChange]);
57
- if (!deprecateInputRefWarnTriggered && inputRef) {
58
- deprecateInputRefWarnTriggered = true;
59
- Logger.deprecate("The `inputRef` prop in `RadioButton` component is deprecated and will soon be removed. Please use `ref` instead.");
60
- }
61
54
  const validationProps = {
62
55
  disabled,
63
56
  inputWidth,
@@ -96,7 +89,7 @@ const RadioButton = /*#__PURE__*/React.forwardRef(({
96
89
  * opposite way around by default)
97
90
  */
98
91
  reverse: !reverse,
99
- ref: ref || inputRef,
92
+ ref,
100
93
  ...props
101
94
  };
102
95
  !!props.children ? process.env.NODE_ENV !== "production" ? invariant(false, "This component is meant to be used as a self-closing tag. " + "You should probably use the label prop instead.") : invariant(false) : void 0;
@@ -218,9 +211,6 @@ if (process.env.NODE_ENV !== "production") {
218
211
  "inline": PropTypes.bool,
219
212
  "inlist": PropTypes.any,
220
213
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
221
- "inputRef": PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
222
- "current": PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired
223
- })]),
224
214
  "inputWidth": PropTypes.number,
225
215
  "is": PropTypes.string,
226
216
  "isOptional": PropTypes.bool,