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
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Carbon [![npm](https://img.shields.io/npm/v/carbon-react.svg)](https://www.npmjs.com/package/carbon-react) [![Cypress](https://github.com/Sage/carbon/actions/workflows/cypress.yml/badge.svg)](https://github.com/Sage/carbon/actions/workflows/cypress.yml) [![Playwright](https://github.com/Sage/carbon/actions/workflows/playwright.yml/badge.svg)](https://github.com/Sage/carbon/actions/workflows/playwright.yml)
1
+ # Carbon [![npm](https://img.shields.io/npm/v/carbon-react.svg)](https://www.npmjs.com/package/carbon-react) [![Playwright](https://github.com/Sage/carbon/actions/workflows/playwright.yml/badge.svg)](https://github.com/Sage/carbon/actions/workflows/playwright.yml)
2
2
 
3
3
  Carbon is a [React](https://react.dev/) component library developed by Sage.
4
4
 
@@ -137,7 +137,7 @@ const FocusTrap = ({
137
137
  }, [triggerRefocusFlag, refocusTrap]);
138
138
  const [tabIndex, setTabIndex] = useState(0);
139
139
  useEffect(() => {
140
- // issue in cypress prevents setting tabIndex to -1, instead tabIndex is set to 0 and removed on blur.
140
+ // tabIndex is set to 0 and removed on blur.
141
141
  if (!isOpen) {
142
142
  setTabIndex(0);
143
143
  }
@@ -15,8 +15,6 @@ export interface CommonInputProps extends Omit<React.InputHTMLAttributes<HTMLInp
15
15
  id?: string;
16
16
  /** Specify a custom border radius for the input. Any valid border-radius design token, or an array of border-radius design tokens. */
17
17
  inputBorderRadius?: BorderRadiusType | BorderRadiusType[];
18
- /** A callback to retrieve the input reference */
19
- inputRef?: (input: React.RefObject<HTMLInputElement | HTMLTextAreaElement>) => void;
20
18
  /** Name of the input */
21
19
  name?: string;
22
20
  /** Specify a callback triggered on blur */
@@ -32,8 +32,6 @@ const Input = /*#__PURE__*/React.forwardRef(({
32
32
  disabled,
33
33
  readOnly,
34
34
  autoFocus,
35
- // TODO: remove inputRef prop from this component (and props interface) when it has been removed from all exposed input components
36
- inputRef,
37
35
  onClick,
38
36
  onChangeDeferred,
39
37
  onChange,
@@ -67,11 +65,6 @@ const Input = /*#__PURE__*/React.forwardRef(({
67
65
  element.setAttribute("enterkeyhint", enterKeyHint);
68
66
  }
69
67
  }, [autoFocus, ref, enterKeyHint]);
70
- useEffect(() => {
71
- if (inputRef) {
72
- inputRef(input);
73
- }
74
- }, [input, inputRef]);
75
68
  useEffect(() => {
76
69
  if (context.inputRef) {
77
70
  context.inputRef(input);
@@ -249,7 +242,6 @@ if (process.env.NODE_ENV !== "production") {
249
242
  "inlist": PropTypes.any,
250
243
  "inputBorderRadius": PropTypes.any,
251
244
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
252
- "inputRef": PropTypes.func,
253
245
  "is": PropTypes.string,
254
246
  "itemID": PropTypes.string,
255
247
  "itemProp": PropTypes.string,
@@ -2,7 +2,6 @@ declare const _default: (isDisabled?: boolean, destructive?: boolean) => {
2
2
  primary: string;
3
3
  secondary: string;
4
4
  tertiary: string;
5
- dashed: string;
6
5
  darkBackground: string;
7
6
  "gradient-grey": string;
8
7
  "gradient-white": string;
@@ -123,27 +123,6 @@ export default ((isDisabled, destructive) => ({
123
123
  ${disabledImageStyle}
124
124
  ` : ""}
125
125
  `,
126
- dashed: `
127
- background: transparent;
128
- border: 2px dashed var(--colorsActionMinor500);
129
- ${makeColors("var(--colorsActionMinor500)")};
130
- &:hover {
131
- background-color: var(--colorsActionMinor200);
132
- }
133
-
134
- ${destructive ? `
135
- border-color: var(--colorsSemanticNegative500);
136
- ` : ""}
137
-
138
- ${isDisabled ? `
139
- border-color: var(--colorsActionDisabled500);
140
- ${makeColors("var(--colorsActionMinorYin030)")};
141
- &:hover {
142
- background-color: transparent;
143
- }
144
- ${disabledImageStyle}
145
- ` : ""}
146
- `,
147
126
  darkBackground: `
148
127
  background: var(--colorsActionMajorYang100);
149
128
  border-color: transparent;
@@ -3,7 +3,7 @@ import { SpaceProps } from "styled-system";
3
3
  import { IconType } from "../icon";
4
4
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
5
5
  import { TooltipPositions } from "../tooltip/tooltip.config";
6
- export declare type ButtonTypes = "primary" | "secondary" | "tertiary" | "dashed" | "darkBackground" | "gradient-grey" | "gradient-white";
6
+ export declare type ButtonTypes = "primary" | "secondary" | "tertiary" | "darkBackground" | "gradient-grey" | "gradient-white";
7
7
  export declare type SizeOptions = "small" | "medium" | "large";
8
8
  export declare type ButtonIconPosition = "before" | "after";
9
9
  export interface ButtonProps extends SpaceProps, TagProps {
@@ -26,8 +26,6 @@ export interface ButtonProps extends SpaceProps, TagProps {
26
26
  disabled?: boolean;
27
27
  /** Apply destructive style to the button */
28
28
  destructive?: boolean;
29
- /** Ref to be forwarded */
30
- forwardRef?: React.RefCallback<HTMLButtonElement> | React.MutableRefObject<HTMLButtonElement | null> | null;
31
29
  /** Apply fullWidth style to the button */
32
30
  fullWidth?: boolean;
33
31
  /** Used to transform button into anchor */
@@ -66,6 +64,4 @@ export interface ButtonProps extends SpaceProps, TagProps {
66
64
  rel?: string;
67
65
  }
68
66
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
69
- declare const ButtonWithForwardRef: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
70
- export { ButtonWithForwardRef };
71
67
  export default Button;
@@ -6,7 +6,6 @@ import Icon from "../icon";
6
6
  import StyledButton, { StyledButtonSubtext, StyledButtonMainText } from "./button.style";
7
7
  import tagComponent from "../../__internal__/utils/helpers/tags/tags";
8
8
  import { TooltipProvider } from "../../__internal__/tooltip-provider";
9
- import Logger from "../../__internal__/utils/logger";
10
9
  import { ButtonBarContext } from "../button-bar/button-bar.component";
11
10
  import SplitButtonContext from "../split-button/__internal__/split-button.context";
12
11
  function renderChildren({
@@ -57,8 +56,6 @@ function renderChildren({
57
56
  type: iconType
58
57
  }, iconProps)));
59
58
  }
60
- let deprecatedForwardRefWarnTriggered = false;
61
- let deprecatedDashedButtonWarnTriggered = false;
62
59
  const Button = /*#__PURE__*/React.forwardRef(({
63
60
  "aria-describedby": ariaDescribedBy,
64
61
  "aria-label": ariaLabel,
@@ -67,7 +64,6 @@ const Button = /*#__PURE__*/React.forwardRef(({
67
64
  children,
68
65
  destructive = false,
69
66
  disabled = false,
70
- forwardRef,
71
67
  fullWidth: fullWidthProp = false,
72
68
  href,
73
69
  iconPosition: iconPositionProp = "before",
@@ -98,14 +94,6 @@ const Button = /*#__PURE__*/React.forwardRef(({
98
94
  if (subtext) {
99
95
  !(size === "large") ? process.env.NODE_ENV !== "production" ? invariant(false, "subtext prop has no effect unless the button is large.") : invariant(false) : void 0;
100
96
  }
101
- if (!deprecatedForwardRefWarnTriggered && forwardRef) {
102
- deprecatedForwardRefWarnTriggered = true;
103
- Logger.deprecate("The `forwardRef` prop in `Button` component is deprecated and will soon be removed. Please use `ref` instead.");
104
- }
105
- if (!deprecatedDashedButtonWarnTriggered && buttonType === "dashed") {
106
- deprecatedDashedButtonWarnTriggered = true;
107
- Logger.deprecate("The `dashed` variant of the `buttonType` prop for `Button` component is deprecated and will soon be removed.");
108
- }
109
97
  const [internalRef, setInternalRef] = useState();
110
98
  const {
111
99
  inSplitButton,
@@ -131,11 +119,10 @@ const Button = /*#__PURE__*/React.forwardRef(({
131
119
  }
132
120
  const setRefs = useCallback(reference => {
133
121
  setInternalRef(reference);
134
- const activeRef = ref || forwardRef;
135
- if (!activeRef) return;
136
- if (typeof activeRef === "object") activeRef.current = reference;
137
- if (typeof activeRef === "function") activeRef(reference);
138
- }, [ref, forwardRef]);
122
+ if (!ref) return;
123
+ if (typeof ref === "object") ref.current = reference;
124
+ if (typeof ref === "function") ref(reference);
125
+ }, [ref]);
139
126
  const isValidChildren = children !== undefined && children !== false;
140
127
  return /*#__PURE__*/React.createElement(StyledButton, _extends({
141
128
  "aria-label": !isValidChildren && iconType ? ariaLabel || iconType : ariaLabel,
@@ -181,370 +168,13 @@ if (process.env.NODE_ENV !== "production") {
181
168
  "aria-describedby": PropTypes.string,
182
169
  "aria-label": PropTypes.string,
183
170
  "aria-labelledby": PropTypes.string,
184
- "buttonType": PropTypes.oneOf(["darkBackground", "dashed", "gradient-grey", "gradient-white", "primary", "secondary", "tertiary"]),
185
- "children": PropTypes.node,
186
- "data-component": PropTypes.string,
187
- "data-element": PropTypes.string,
188
- "data-role": PropTypes.string,
189
- "destructive": PropTypes.bool,
190
- "disabled": PropTypes.bool,
191
- "forwardRef": PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
192
- "current": PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired
193
- })]),
194
- "fullWidth": PropTypes.bool,
195
- "href": PropTypes.string,
196
- "iconPosition": PropTypes.oneOf(["after", "before"]),
197
- "iconTooltipMessage": PropTypes.string,
198
- "iconTooltipPosition": PropTypes.oneOf(["bottom", "left", "right", "top"]),
199
- "iconType": 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"]),
200
- "id": PropTypes.string,
201
- "m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
202
- "__@toStringTag": PropTypes.string.isRequired,
203
- "description": PropTypes.string,
204
- "toString": PropTypes.func.isRequired,
205
- "valueOf": PropTypes.func.isRequired
206
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
207
- "__@toStringTag": PropTypes.string.isRequired,
208
- "description": PropTypes.string,
209
- "toString": PropTypes.func.isRequired,
210
- "valueOf": PropTypes.func.isRequired
211
- }), PropTypes.string]),
212
- "margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
213
- "__@toStringTag": PropTypes.string.isRequired,
214
- "description": PropTypes.string,
215
- "toString": PropTypes.func.isRequired,
216
- "valueOf": PropTypes.func.isRequired
217
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
218
- "__@toStringTag": PropTypes.string.isRequired,
219
- "description": PropTypes.string,
220
- "toString": PropTypes.func.isRequired,
221
- "valueOf": PropTypes.func.isRequired
222
- }), PropTypes.string]),
223
- "marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
224
- "__@toStringTag": PropTypes.string.isRequired,
225
- "description": PropTypes.string,
226
- "toString": PropTypes.func.isRequired,
227
- "valueOf": PropTypes.func.isRequired
228
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
229
- "__@toStringTag": PropTypes.string.isRequired,
230
- "description": PropTypes.string,
231
- "toString": PropTypes.func.isRequired,
232
- "valueOf": PropTypes.func.isRequired
233
- }), PropTypes.string]),
234
- "marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
235
- "__@toStringTag": PropTypes.string.isRequired,
236
- "description": PropTypes.string,
237
- "toString": PropTypes.func.isRequired,
238
- "valueOf": PropTypes.func.isRequired
239
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
240
- "__@toStringTag": PropTypes.string.isRequired,
241
- "description": PropTypes.string,
242
- "toString": PropTypes.func.isRequired,
243
- "valueOf": PropTypes.func.isRequired
244
- }), PropTypes.string]),
245
- "marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
246
- "__@toStringTag": PropTypes.string.isRequired,
247
- "description": PropTypes.string,
248
- "toString": PropTypes.func.isRequired,
249
- "valueOf": PropTypes.func.isRequired
250
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
251
- "__@toStringTag": PropTypes.string.isRequired,
252
- "description": PropTypes.string,
253
- "toString": PropTypes.func.isRequired,
254
- "valueOf": PropTypes.func.isRequired
255
- }), PropTypes.string]),
256
- "marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
257
- "__@toStringTag": PropTypes.string.isRequired,
258
- "description": PropTypes.string,
259
- "toString": PropTypes.func.isRequired,
260
- "valueOf": PropTypes.func.isRequired
261
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
262
- "__@toStringTag": PropTypes.string.isRequired,
263
- "description": PropTypes.string,
264
- "toString": PropTypes.func.isRequired,
265
- "valueOf": PropTypes.func.isRequired
266
- }), PropTypes.string]),
267
- "marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
268
- "__@toStringTag": PropTypes.string.isRequired,
269
- "description": PropTypes.string,
270
- "toString": PropTypes.func.isRequired,
271
- "valueOf": PropTypes.func.isRequired
272
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
273
- "__@toStringTag": PropTypes.string.isRequired,
274
- "description": PropTypes.string,
275
- "toString": PropTypes.func.isRequired,
276
- "valueOf": PropTypes.func.isRequired
277
- }), PropTypes.string]),
278
- "marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
279
- "__@toStringTag": PropTypes.string.isRequired,
280
- "description": PropTypes.string,
281
- "toString": PropTypes.func.isRequired,
282
- "valueOf": PropTypes.func.isRequired
283
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
284
- "__@toStringTag": PropTypes.string.isRequired,
285
- "description": PropTypes.string,
286
- "toString": PropTypes.func.isRequired,
287
- "valueOf": PropTypes.func.isRequired
288
- }), PropTypes.string]),
289
- "mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
290
- "__@toStringTag": PropTypes.string.isRequired,
291
- "description": PropTypes.string,
292
- "toString": PropTypes.func.isRequired,
293
- "valueOf": PropTypes.func.isRequired
294
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
295
- "__@toStringTag": PropTypes.string.isRequired,
296
- "description": PropTypes.string,
297
- "toString": PropTypes.func.isRequired,
298
- "valueOf": PropTypes.func.isRequired
299
- }), PropTypes.string]),
300
- "ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
301
- "__@toStringTag": PropTypes.string.isRequired,
302
- "description": PropTypes.string,
303
- "toString": PropTypes.func.isRequired,
304
- "valueOf": PropTypes.func.isRequired
305
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
306
- "__@toStringTag": PropTypes.string.isRequired,
307
- "description": PropTypes.string,
308
- "toString": PropTypes.func.isRequired,
309
- "valueOf": PropTypes.func.isRequired
310
- }), PropTypes.string]),
311
- "mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
312
- "__@toStringTag": PropTypes.string.isRequired,
313
- "description": PropTypes.string,
314
- "toString": PropTypes.func.isRequired,
315
- "valueOf": PropTypes.func.isRequired
316
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
317
- "__@toStringTag": PropTypes.string.isRequired,
318
- "description": PropTypes.string,
319
- "toString": PropTypes.func.isRequired,
320
- "valueOf": PropTypes.func.isRequired
321
- }), PropTypes.string]),
322
- "mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
323
- "__@toStringTag": PropTypes.string.isRequired,
324
- "description": PropTypes.string,
325
- "toString": PropTypes.func.isRequired,
326
- "valueOf": PropTypes.func.isRequired
327
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
328
- "__@toStringTag": PropTypes.string.isRequired,
329
- "description": PropTypes.string,
330
- "toString": PropTypes.func.isRequired,
331
- "valueOf": PropTypes.func.isRequired
332
- }), PropTypes.string]),
333
- "mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
334
- "__@toStringTag": PropTypes.string.isRequired,
335
- "description": PropTypes.string,
336
- "toString": PropTypes.func.isRequired,
337
- "valueOf": PropTypes.func.isRequired
338
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
339
- "__@toStringTag": PropTypes.string.isRequired,
340
- "description": PropTypes.string,
341
- "toString": PropTypes.func.isRequired,
342
- "valueOf": PropTypes.func.isRequired
343
- }), PropTypes.string]),
344
- "my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
345
- "__@toStringTag": PropTypes.string.isRequired,
346
- "description": PropTypes.string,
347
- "toString": PropTypes.func.isRequired,
348
- "valueOf": PropTypes.func.isRequired
349
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
350
- "__@toStringTag": PropTypes.string.isRequired,
351
- "description": PropTypes.string,
352
- "toString": PropTypes.func.isRequired,
353
- "valueOf": PropTypes.func.isRequired
354
- }), PropTypes.string]),
355
- "name": PropTypes.string,
356
- "noWrap": PropTypes.bool,
357
- "onBlur": PropTypes.func,
358
- "onChange": PropTypes.func,
359
- "onClick": PropTypes.func,
360
- "onFocus": PropTypes.func,
361
- "onKeyDown": PropTypes.func,
362
- "p": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
363
- "__@toStringTag": PropTypes.string.isRequired,
364
- "description": PropTypes.string,
365
- "toString": PropTypes.func.isRequired,
366
- "valueOf": PropTypes.func.isRequired
367
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
368
- "__@toStringTag": PropTypes.string.isRequired,
369
- "description": PropTypes.string,
370
- "toString": PropTypes.func.isRequired,
371
- "valueOf": PropTypes.func.isRequired
372
- }), PropTypes.string]),
373
- "padding": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
374
- "__@toStringTag": PropTypes.string.isRequired,
375
- "description": PropTypes.string,
376
- "toString": PropTypes.func.isRequired,
377
- "valueOf": PropTypes.func.isRequired
378
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
379
- "__@toStringTag": PropTypes.string.isRequired,
380
- "description": PropTypes.string,
381
- "toString": PropTypes.func.isRequired,
382
- "valueOf": PropTypes.func.isRequired
383
- }), PropTypes.string]),
384
- "paddingBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
385
- "__@toStringTag": PropTypes.string.isRequired,
386
- "description": PropTypes.string,
387
- "toString": PropTypes.func.isRequired,
388
- "valueOf": PropTypes.func.isRequired
389
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
390
- "__@toStringTag": PropTypes.string.isRequired,
391
- "description": PropTypes.string,
392
- "toString": PropTypes.func.isRequired,
393
- "valueOf": PropTypes.func.isRequired
394
- }), PropTypes.string]),
395
- "paddingLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
396
- "__@toStringTag": PropTypes.string.isRequired,
397
- "description": PropTypes.string,
398
- "toString": PropTypes.func.isRequired,
399
- "valueOf": PropTypes.func.isRequired
400
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
401
- "__@toStringTag": PropTypes.string.isRequired,
402
- "description": PropTypes.string,
403
- "toString": PropTypes.func.isRequired,
404
- "valueOf": PropTypes.func.isRequired
405
- }), PropTypes.string]),
406
- "paddingRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
407
- "__@toStringTag": PropTypes.string.isRequired,
408
- "description": PropTypes.string,
409
- "toString": PropTypes.func.isRequired,
410
- "valueOf": PropTypes.func.isRequired
411
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
412
- "__@toStringTag": PropTypes.string.isRequired,
413
- "description": PropTypes.string,
414
- "toString": PropTypes.func.isRequired,
415
- "valueOf": PropTypes.func.isRequired
416
- }), PropTypes.string]),
417
- "paddingTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
418
- "__@toStringTag": PropTypes.string.isRequired,
419
- "description": PropTypes.string,
420
- "toString": PropTypes.func.isRequired,
421
- "valueOf": PropTypes.func.isRequired
422
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
423
- "__@toStringTag": PropTypes.string.isRequired,
424
- "description": PropTypes.string,
425
- "toString": PropTypes.func.isRequired,
426
- "valueOf": PropTypes.func.isRequired
427
- }), PropTypes.string]),
428
- "paddingX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
429
- "__@toStringTag": PropTypes.string.isRequired,
430
- "description": PropTypes.string,
431
- "toString": PropTypes.func.isRequired,
432
- "valueOf": PropTypes.func.isRequired
433
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
434
- "__@toStringTag": PropTypes.string.isRequired,
435
- "description": PropTypes.string,
436
- "toString": PropTypes.func.isRequired,
437
- "valueOf": PropTypes.func.isRequired
438
- }), PropTypes.string]),
439
- "paddingY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
440
- "__@toStringTag": PropTypes.string.isRequired,
441
- "description": PropTypes.string,
442
- "toString": PropTypes.func.isRequired,
443
- "valueOf": PropTypes.func.isRequired
444
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
445
- "__@toStringTag": PropTypes.string.isRequired,
446
- "description": PropTypes.string,
447
- "toString": PropTypes.func.isRequired,
448
- "valueOf": PropTypes.func.isRequired
449
- }), PropTypes.string]),
450
- "pb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
451
- "__@toStringTag": PropTypes.string.isRequired,
452
- "description": PropTypes.string,
453
- "toString": PropTypes.func.isRequired,
454
- "valueOf": PropTypes.func.isRequired
455
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
456
- "__@toStringTag": PropTypes.string.isRequired,
457
- "description": PropTypes.string,
458
- "toString": PropTypes.func.isRequired,
459
- "valueOf": PropTypes.func.isRequired
460
- }), PropTypes.string]),
461
- "pl": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
462
- "__@toStringTag": PropTypes.string.isRequired,
463
- "description": PropTypes.string,
464
- "toString": PropTypes.func.isRequired,
465
- "valueOf": PropTypes.func.isRequired
466
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
467
- "__@toStringTag": PropTypes.string.isRequired,
468
- "description": PropTypes.string,
469
- "toString": PropTypes.func.isRequired,
470
- "valueOf": PropTypes.func.isRequired
471
- }), PropTypes.string]),
472
- "pr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
473
- "__@toStringTag": PropTypes.string.isRequired,
474
- "description": PropTypes.string,
475
- "toString": PropTypes.func.isRequired,
476
- "valueOf": PropTypes.func.isRequired
477
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
478
- "__@toStringTag": PropTypes.string.isRequired,
479
- "description": PropTypes.string,
480
- "toString": PropTypes.func.isRequired,
481
- "valueOf": PropTypes.func.isRequired
482
- }), PropTypes.string]),
483
- "pt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
484
- "__@toStringTag": PropTypes.string.isRequired,
485
- "description": PropTypes.string,
486
- "toString": PropTypes.func.isRequired,
487
- "valueOf": PropTypes.func.isRequired
488
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
489
- "__@toStringTag": PropTypes.string.isRequired,
490
- "description": PropTypes.string,
491
- "toString": PropTypes.func.isRequired,
492
- "valueOf": PropTypes.func.isRequired
493
- }), PropTypes.string]),
494
- "px": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
495
- "__@toStringTag": PropTypes.string.isRequired,
496
- "description": PropTypes.string,
497
- "toString": PropTypes.func.isRequired,
498
- "valueOf": PropTypes.func.isRequired
499
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
500
- "__@toStringTag": PropTypes.string.isRequired,
501
- "description": PropTypes.string,
502
- "toString": PropTypes.func.isRequired,
503
- "valueOf": PropTypes.func.isRequired
504
- }), PropTypes.string]),
505
- "py": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
506
- "__@toStringTag": PropTypes.string.isRequired,
507
- "description": PropTypes.string,
508
- "toString": PropTypes.func.isRequired,
509
- "valueOf": PropTypes.func.isRequired
510
- }), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
511
- "__@toStringTag": PropTypes.string.isRequired,
512
- "description": PropTypes.string,
513
- "toString": PropTypes.func.isRequired,
514
- "valueOf": PropTypes.func.isRequired
515
- }), PropTypes.string]),
516
- "rel": PropTypes.string,
517
- "size": PropTypes.oneOf(["large", "medium", "small"]),
518
- "subtext": PropTypes.string,
519
- "target": PropTypes.string,
520
- "type": PropTypes.string
521
- };
522
- }
523
- let deprecatedButtonForwardRefWarnTriggered = false;
524
- const ButtonWithForwardRef = /*#__PURE__*/React.forwardRef((props, ref) => {
525
- if (!deprecatedButtonForwardRefWarnTriggered) {
526
- deprecatedButtonForwardRefWarnTriggered = true;
527
- Logger.deprecate("The `ButtonWithForwardRef` component is deprecated and will soon be removed. Please use a basic `Button` component with `ref` instead.");
528
- }
529
- return /*#__PURE__*/React.createElement(Button, _extends({
530
- ref: ref
531
- }, props));
532
- });
533
- if (process.env.NODE_ENV !== "production") {
534
- ButtonWithForwardRef.propTypes = {
535
- "aria-describedby": PropTypes.string,
536
- "aria-label": PropTypes.string,
537
- "aria-labelledby": PropTypes.string,
538
- "buttonType": PropTypes.oneOf(["darkBackground", "dashed", "gradient-grey", "gradient-white", "primary", "secondary", "tertiary"]),
171
+ "buttonType": PropTypes.oneOf(["darkBackground", "gradient-grey", "gradient-white", "primary", "secondary", "tertiary"]),
539
172
  "children": PropTypes.node,
540
173
  "data-component": PropTypes.string,
541
174
  "data-element": PropTypes.string,
542
175
  "data-role": PropTypes.string,
543
176
  "destructive": PropTypes.bool,
544
177
  "disabled": PropTypes.bool,
545
- "forwardRef": PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
546
- "current": PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired
547
- })]),
548
178
  "fullWidth": PropTypes.bool,
549
179
  "href": PropTypes.string,
550
180
  "iconPosition": PropTypes.oneOf(["after", "before"]),
@@ -874,7 +504,5 @@ if (process.env.NODE_ENV !== "production") {
874
504
  "type": PropTypes.string
875
505
  };
876
506
  }
877
- ButtonWithForwardRef.displayName = "Button";
878
507
  Button.displayName = "Button";
879
- export { ButtonWithForwardRef };
880
508
  export default Button;
@@ -1,3 +1,3 @@
1
- export const BUTTON_VARIANTS = ["primary", "secondary", "tertiary", "dashed", "darkBackground", "gradient-white", "gradient-grey"];
1
+ export const BUTTON_VARIANTS = ["primary", "secondary", "tertiary", "darkBackground", "gradient-white", "gradient-grey"];
2
2
  export const BUTTON_SIZES = ["small", "medium", "large"];
3
3
  export const BUTTON_ICON_POSITIONS = ["before", "after"];
@@ -1,2 +1,2 @@
1
- export { default, ButtonWithForwardRef } from "./button.component";
1
+ export { default } from "./button.component";
2
2
  export type { ButtonProps } from "./button.component";
@@ -1 +1 @@
1
- export { default, ButtonWithForwardRef } from "./button.component";
1
+ export { default } from "./button.component";
@@ -22,8 +22,6 @@ export interface CheckboxProps extends CommonCheckableInputProps, MarginProps {
22
22
  tooltipPosition?: "top" | "bottom" | "left" | "right";
23
23
  /** The value of the checkbox, passed on form submit */
24
24
  value?: string;
25
- /** A callback to retrieve the input reference (deprecated) */
26
- inputRef?: React.Ref<HTMLInputElement>;
27
25
  }
28
26
  export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
29
27
  export default Checkbox;
@@ -10,7 +10,6 @@ import { CheckboxGroupContext } from "./checkbox-group/checkbox-group.component"
10
10
  import Logger from "../../__internal__/utils/logger";
11
11
  import useFormSpacing from "../../hooks/__internal__/useFormSpacing";
12
12
  import { NewValidationContext } from "../carbon-provider/carbon-provider.component";
13
- let deprecateInputRefWarnTriggered = false;
14
13
  let deprecateUncontrolledWarnTriggered = false;
15
14
  const Checkbox = /*#__PURE__*/React.forwardRef(({
16
15
  "aria-labelledby": ariaLabelledBy,
@@ -45,7 +44,6 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
45
44
  "data-element": dataElement,
46
45
  "data-role": dataRole,
47
46
  helpAriaLabel,
48
- inputRef,
49
47
  ...rest
50
48
  }, ref) => {
51
49
  const {
@@ -59,10 +57,6 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
59
57
  warning: contextWarning,
60
58
  info: contextInfo
61
59
  } = checkboxGroupContext;
62
- if (!deprecateInputRefWarnTriggered && inputRef) {
63
- deprecateInputRefWarnTriggered = true;
64
- Logger.deprecate("The `inputRef` prop in `Checkbox` component is deprecated and will soon be removed. Please use `ref` instead.");
65
- }
66
60
  if (!deprecateUncontrolledWarnTriggered && !onChange) {
67
61
  deprecateUncontrolledWarnTriggered = true;
68
62
  Logger.deprecate("Uncontrolled behaviour in `Checkbox` is deprecated and support will soon be removed. Please make sure all your inputs are controlled.");
@@ -91,7 +85,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef(({
91
85
  disabled,
92
86
  inputWidth,
93
87
  labelWidth,
94
- ref: ref || inputRef,
88
+ ref,
95
89
  ...rest
96
90
  };
97
91
  const validationProps = {
@@ -222,9 +216,6 @@ if (process.env.NODE_ENV !== "production") {
222
216
  "info": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
223
217
  "inlist": PropTypes.any,
224
218
  "inputMode": PropTypes.oneOf(["decimal", "email", "none", "numeric", "search", "tel", "text", "url"]),
225
- "inputRef": PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
226
- "current": PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired
227
- })]),
228
219
  "inputWidth": PropTypes.number,
229
220
  "is": PropTypes.string,
230
221
  "isOptional": PropTypes.bool,