carbon-react 111.12.3 → 111.12.5

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 (913) hide show
  1. package/esm/__internal__/DeprecationWarning.js +2 -0
  2. package/esm/__internal__/character-count/character-count.component.js +2 -0
  3. package/esm/__internal__/checkable-input/checkable-input.component.js +5 -0
  4. package/esm/__internal__/checkable-input/hidden-checkable-input.component.js +11 -0
  5. package/esm/__internal__/field-help/field-help.component.js +2 -0
  6. package/esm/__internal__/fieldset/fieldset.component.js +3 -0
  7. package/esm/__internal__/focus-trap/focus-trap-utils.js +25 -6
  8. package/esm/__internal__/focus-trap/focus-trap.component.js +17 -7
  9. package/esm/__internal__/form-field/form-field.component.js +5 -0
  10. package/esm/__internal__/full-screen-heading/full-screen-heading.component.js +1 -0
  11. package/esm/__internal__/input/input-presentation.component.js +5 -0
  12. package/esm/__internal__/input/input-presentation.style.js +5 -0
  13. package/esm/__internal__/input/input.component.js +25 -2
  14. package/esm/__internal__/input-behaviour/input-behaviour.component.js +3 -2
  15. package/esm/__internal__/input-behaviour/input-group-behaviour.component.js +2 -0
  16. package/esm/__internal__/input-behaviour/useInputBehaviour.js +4 -2
  17. package/esm/__internal__/input-icon-toggle/input-icon-toggle.component.js +5 -0
  18. package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -0
  19. package/esm/__internal__/label/label.component.js +10 -0
  20. package/esm/__internal__/popover/popover.component.js +11 -0
  21. package/esm/__internal__/radio-button-mapper/index.d.ts +2 -2
  22. package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +29 -0
  23. package/esm/__internal__/radio-button-mapper/radio-button-mapper.component.js +25 -21
  24. package/esm/__internal__/sticky-footer/sticky-footer.component.js +5 -0
  25. package/esm/__internal__/utils/helpers/browser-type-check/index.js +1 -0
  26. package/esm/__internal__/utils/helpers/events/composedPath.js +4 -1
  27. package/esm/__internal__/utils/helpers/events/events.js +16 -1
  28. package/esm/__internal__/utils/helpers/guid/index.js +1 -0
  29. package/esm/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +3 -2
  30. package/esm/__internal__/utils/helpers/tags/tags.js +4 -0
  31. package/esm/__internal__/utils/logger/index.js +1 -1
  32. package/esm/__internal__/validation-message/validation-message.component.js +2 -0
  33. package/esm/__internal__/validations/validation-icon.component.js +8 -0
  34. package/esm/__spec_helper__/enzyme-snapshot-helper.js +5 -0
  35. package/esm/__spec_helper__/expect.js +5 -2
  36. package/esm/__spec_helper__/mock-match-media.js +3 -0
  37. package/esm/__spec_helper__/mock-resize-observer.js +2 -0
  38. package/esm/__spec_helper__/test-utils.js +62 -27
  39. package/esm/components/accordion/accordion-group/accordion-group.component.js +9 -0
  40. package/esm/components/accordion/accordion.component.js +7 -0
  41. package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +21 -2
  42. package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +7 -2
  43. package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +3 -0
  44. package/esm/components/action-popover/action-popover.component.js +19 -4
  45. package/esm/components/advanced-color-picker/advanced-color-picker.component.js +19 -0
  46. package/esm/components/alert/alert.component.js +3 -0
  47. package/esm/components/anchor-navigation/anchor-navigation.component.js +14 -5
  48. package/esm/components/badge/badge.component.js +2 -0
  49. package/esm/components/batch-selection/batch-selection.component.js +6 -0
  50. package/esm/components/box/box.config.js +1 -0
  51. package/esm/components/button/button-types.style.js +2 -0
  52. package/esm/components/button/button.component.js +12 -0
  53. package/esm/components/button/button.style.js +8 -0
  54. package/esm/components/button-bar/button-bar.component.js +8 -2
  55. package/esm/components/button-toggle/button-toggle-icon.component.js +2 -0
  56. package/esm/components/button-toggle/button-toggle-input.component.js +6 -0
  57. package/esm/components/button-toggle/button-toggle.component.js +6 -0
  58. package/esm/components/button-toggle-group/button-toggle-group.component.js +3 -0
  59. package/esm/components/carbon-provider/carbon-provider.component.js +2 -0
  60. package/esm/components/carbon-provider/top-modal-context.js +7 -3
  61. package/esm/components/card/card-column/card-column.component.js +2 -0
  62. package/esm/components/card/card-footer/card-footer.component.js +3 -0
  63. package/esm/components/card/card-row/card-row.component.js +3 -0
  64. package/esm/components/card/card.component.js +8 -0
  65. package/esm/components/carousel/carousel.component.js +15 -0
  66. package/esm/components/carousel/slide/slide.component.js +3 -0
  67. package/esm/components/carousel/slide/slide.style.js +1 -2
  68. package/esm/components/checkbox/checkbox-group.component.js +3 -0
  69. package/esm/components/checkbox/checkbox-svg.component.js +2 -0
  70. package/esm/components/checkbox/checkbox.component.js +7 -0
  71. package/esm/components/checkbox/checkbox.style.d.ts +1 -1
  72. package/esm/components/confirm/confirm.component.js +38 -0
  73. package/esm/components/content/content.component.js +3 -0
  74. package/esm/components/date/__internal__/date-formats/index.js +19 -6
  75. package/esm/components/date/__internal__/date-picker/date-picker.component.js +15 -2
  76. package/esm/components/date/__internal__/date-picker/day-picker.style.js +7 -3
  77. package/esm/components/date/__internal__/navbar/navbar.component.js +2 -0
  78. package/esm/components/date/__internal__/utils.js +31 -1
  79. package/esm/components/date/__internal__/weekday/weekday.component.js +3 -0
  80. package/esm/components/date/date.component.js +54 -10
  81. package/esm/components/date-range/date-range.component.js +46 -14
  82. package/esm/components/decimal/decimal.component.js +29 -4
  83. package/esm/components/definition-list/dd.component.js +3 -0
  84. package/esm/components/definition-list/dl.component.js +8 -0
  85. package/esm/components/definition-list/dt.component.js +3 -0
  86. package/esm/components/detail/detail.component.js +8 -2
  87. package/esm/components/dialog/dialog.component.js +14 -0
  88. package/esm/components/dialog/dialog.style.js +2 -0
  89. package/esm/components/dialog-full-screen/dialog-full-screen.component.js +25 -0
  90. package/esm/components/dismissible-box/dismissible-box.component.js +3 -0
  91. package/esm/components/draggable/draggable-container.component.js +16 -4
  92. package/esm/components/draggable/draggable-item.component.js +11 -2
  93. package/esm/components/drawer/drawer.component.js +16 -0
  94. package/esm/components/drawer/drawer.style.js +7 -0
  95. package/esm/components/duelling-picklist/duelling-picklist.component.js +14 -2
  96. package/esm/components/duelling-picklist/picklist/picklist.component.js +7 -0
  97. package/esm/components/duelling-picklist/picklist-divider/picklist-divider.component.js +3 -0
  98. package/esm/components/duelling-picklist/picklist-group/picklist-group.component.js +7 -0
  99. package/esm/components/duelling-picklist/picklist-item/picklist-item.component.js +14 -0
  100. package/esm/components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js +2 -0
  101. package/esm/components/fieldset/fieldset.component.js +4 -0
  102. package/esm/components/flat-table/flat-table-body/flat-table-body.component.js +1 -0
  103. package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js +13 -0
  104. package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.js +18 -0
  105. package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +15 -0
  106. package/esm/components/flat-table/flat-table-head/flat-table-head.component.js +8 -4
  107. package/esm/components/flat-table/flat-table-header/flat-table-header-utils.js +4 -1
  108. package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +13 -0
  109. package/esm/components/flat-table/flat-table-row/__internal__/flat-table-row-draggable.component.js +9 -0
  110. package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +35 -0
  111. package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +11 -2
  112. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +15 -0
  113. package/esm/components/flat-table/flat-table.component.js +20 -2
  114. package/esm/components/flat-table/flat-table.style.js +3 -0
  115. package/esm/components/flat-table/sort/sort.component.js +7 -0
  116. package/esm/components/form/__internal__/form-summary.component.js +7 -0
  117. package/esm/components/form/form.component.js +3 -0
  118. package/esm/components/form/form.style.js +3 -2
  119. package/esm/components/global-header/global-header.component.js +6 -1
  120. package/esm/components/grid/grid-container/grid-container.component.js +6 -0
  121. package/esm/components/grid/grid-item/grid-item.component.js +6 -0
  122. package/esm/components/grid/grid-item/grid-item.style.js +14 -0
  123. package/esm/components/grouped-character/grouped-character.component.js +21 -3
  124. package/esm/components/heading/heading.component.js +9 -2
  125. package/esm/components/help/help.component.js +8 -0
  126. package/esm/components/hr/hr.component.js +5 -0
  127. package/esm/components/i18n-provider/i18n-provider.component.js +2 -0
  128. package/esm/components/icon/icon-unicodes.js +1 -2
  129. package/esm/components/icon/icon.component.js +12 -1
  130. package/esm/components/icon/icon.style.js +6 -0
  131. package/esm/components/icon-button/icon-button.component.js +4 -0
  132. package/esm/components/image/image.component.js +3 -0
  133. package/esm/components/image/image.style.js +1 -2
  134. package/esm/components/inline-inputs/inline-inputs.component.js +6 -0
  135. package/esm/components/link/link.component.js +12 -3
  136. package/esm/components/link/link.style.js +4 -0
  137. package/esm/components/link-preview/__internal__/placeholder.component.js +2 -0
  138. package/esm/components/link-preview/link-preview.component.js +7 -0
  139. package/esm/components/loader/loader-square.style.js +6 -0
  140. package/esm/components/loader/loader.component.js +3 -0
  141. package/esm/components/loader-bar/loader-bar.component.js +3 -0
  142. package/esm/components/loader-bar/loader-bar.style.js +4 -0
  143. package/esm/components/menu/__internal__/keyboard-navigation/index.js +9 -0
  144. package/esm/components/menu/__internal__/spec-helper/index.js +2 -0
  145. package/esm/components/menu/__internal__/submenu/submenu.component.js +59 -7
  146. package/esm/components/menu/menu-full-screen/menu-full-screen.component.js +8 -0
  147. package/esm/components/menu/menu-item/menu-item.component.js +35 -0
  148. package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +1 -0
  149. package/esm/components/menu/menu.component.js +8 -0
  150. package/esm/components/menu/menu.context.js +3 -1
  151. package/esm/components/menu/scrollable-block/scrollable-block.component.js +9 -0
  152. package/esm/components/message/message-content/message-content.component.js +2 -0
  153. package/esm/components/message/message.component.js +5 -0
  154. package/esm/components/message/type-icon/type-icon.component.js +2 -0
  155. package/esm/components/modal/__internal__/modal-manager.js +24 -0
  156. package/esm/components/modal/modal.component.js +6 -0
  157. package/esm/components/multi-action-button/multi-action-button.component.js +20 -3
  158. package/esm/components/navigation-bar/navigation-bar.component.js +3 -0
  159. package/esm/components/note/note.component.js +10 -1
  160. package/esm/components/number/number.component.js +9 -2
  161. package/esm/components/numeral-date/numeral-date.component.js +22 -9
  162. package/esm/components/pager/__internal__/pager-navigation-link.component.js +11 -0
  163. package/esm/components/pager/__internal__/pager-navigation.component.js +22 -0
  164. package/esm/components/pager/pager.component.js +29 -0
  165. package/esm/components/pages/page/page.component.js +3 -0
  166. package/esm/components/pages/pages.component.js +14 -4
  167. package/esm/components/pill/pill.component.js +3 -0
  168. package/esm/components/pill/pill.style.js +4 -0
  169. package/esm/components/pod/pod.component.js +40 -4
  170. package/esm/components/pod/pod.style.js +8 -6
  171. package/esm/components/popover-container/popover-container.component.js +14 -2
  172. package/esm/components/popover-container/popover-container.style.js +3 -0
  173. package/esm/components/portal/portal.js +14 -2
  174. package/esm/components/portrait/portrait-gravatar.component.js +4 -0
  175. package/esm/components/portrait/portrait-initials.component.js +12 -10
  176. package/esm/components/portrait/portrait.component.js +10 -0
  177. package/esm/components/portrait/portrait.style.js +10 -3
  178. package/esm/components/preview/__internal__/preview-placeholder.component.js +3 -0
  179. package/esm/components/preview/preview.component.js +7 -0
  180. package/esm/components/preview/preview.style.js +1 -2
  181. package/esm/components/profile/profile.component.js +8 -0
  182. package/esm/components/progress-tracker/progress-tracker.component.js +24 -2
  183. package/esm/components/progress-tracker/progress-tracker.style.js +5 -0
  184. package/esm/components/radio-button/index.d.ts +4 -6
  185. package/esm/components/radio-button/index.js +2 -2
  186. package/esm/components/radio-button/radio-button-group.component.d.ts +42 -0
  187. package/esm/components/radio-button/radio-button-group.component.js +187 -48
  188. package/esm/components/radio-button/radio-button-group.style.d.ts +5 -0
  189. package/esm/components/radio-button/radio-button-svg.component.d.ts +3 -0
  190. package/esm/components/radio-button/radio-button-svg.component.js +3 -0
  191. package/esm/components/radio-button/radio-button.component.d.ts +28 -0
  192. package/esm/components/radio-button/radio-button.component.js +532 -84
  193. package/esm/components/radio-button/radio-button.style.d.ts +5 -0
  194. package/esm/components/search/search.component.js +21 -2
  195. package/esm/components/select/__internal__/select-text/select-text.component.js +13 -0
  196. package/esm/components/select/filterable-select/filterable-select.component.js +73 -8
  197. package/esm/components/select/list-action-button/list-action-button.component.js +4 -0
  198. package/esm/components/select/multi-select/multi-select.component.js +81 -15
  199. package/esm/components/select/option/option.component.js +12 -0
  200. package/esm/components/select/option-group-header/option-group-header.component.js +3 -0
  201. package/esm/components/select/option-row/option-row.component.js +9 -0
  202. package/esm/components/select/select-list/select-list.component.js +45 -2
  203. package/esm/components/select/select-list/select-list.style.js +1 -2
  204. package/esm/components/select/select-list/update-list-scroll.js +3 -0
  205. package/esm/components/select/select-textbox/select-textbox.component.js +41 -2
  206. package/esm/components/select/simple-select/simple-select.component.js +60 -2
  207. package/esm/components/select/utils/get-next-child-by-text.js +8 -0
  208. package/esm/components/select/utils/get-next-index-by-key.js +13 -0
  209. package/esm/components/select/utils/highlight-part-of-text.js +7 -0
  210. package/esm/components/select/utils/is-expected-option.js +4 -0
  211. package/esm/components/select/utils/is-expected-value.js +1 -0
  212. package/esm/components/select/utils/with-filter.hoc.js +29 -3
  213. package/esm/components/settings-row/settings-row.component.js +10 -2
  214. package/esm/components/show-edit-pod/show-edit-pod.component.js +43 -6
  215. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +2 -0
  216. package/esm/components/sidebar/sidebar.component.js +4 -3
  217. package/esm/components/simple-color-picker/color-sample-box/color-sample-box.component.js +5 -1
  218. package/esm/components/simple-color-picker/simple-color/simple-color.component.js +7 -0
  219. package/esm/components/simple-color-picker/simple-color-picker.component.js +41 -8
  220. package/esm/components/simple-color-picker/simple-color-picker.style.js +2 -0
  221. package/esm/components/simple-color-picker/tick-icon/tick-icon.style.js +6 -4
  222. package/esm/components/split-button/split-button.component.js +20 -1
  223. package/esm/components/step-sequence/step-sequence-item/step-sequence-item.component.js +9 -0
  224. package/esm/components/step-sequence/step-sequence.component.js +3 -0
  225. package/esm/components/switch/__internal__/switch-slider.component.js +2 -0
  226. package/esm/components/switch/switch.component.js +7 -0
  227. package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +19 -8
  228. package/esm/components/tabs/__internal__/tabs-header/tabs-header.component.js +2 -0
  229. package/esm/components/tabs/__internal__/tabs-header/tabs-header.style.js +3 -0
  230. package/esm/components/tabs/tab/tab.component.js +24 -8
  231. package/esm/components/tabs/tabs.component.js +54 -24
  232. package/esm/components/text-editor/__internal__/decorators/link-decorator.js +10 -10
  233. package/esm/components/text-editor/__internal__/editor-counter/editor-counter.component.js +6 -0
  234. package/esm/components/text-editor/__internal__/editor-link/editor-link.component.js +7 -2
  235. package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +3 -0
  236. package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +6 -0
  237. package/esm/components/text-editor/__internal__/toolbar/toolbar.component.js +10 -0
  238. package/esm/components/text-editor/__internal__/utils/utils.js +21 -9
  239. package/esm/components/text-editor/text-editor.component.js +53 -22
  240. package/esm/components/textarea/textarea.component.js +50 -6
  241. package/esm/components/textbox/textbox.component.js +9 -2
  242. package/esm/components/tile/tile-footer/tile-footer.component.js +5 -2
  243. package/esm/components/tile/tile.component.js +10 -0
  244. package/esm/components/tile-select/__internal__/accordion/accordion.component.js +2 -0
  245. package/esm/components/tile-select/tile-select-group.component.js +16 -2
  246. package/esm/components/tile-select/tile-select.component.js +33 -4
  247. package/esm/components/toast/toast.component.js +18 -0
  248. package/esm/components/tooltip/tooltip-pointer.style.js +2 -0
  249. package/esm/components/tooltip/tooltip.component.js +3 -0
  250. package/esm/components/tooltip/tooltip.style.js +6 -0
  251. package/esm/components/typography/list.component.js +7 -0
  252. package/esm/components/typography/typography.component.js +28 -0
  253. package/esm/components/vertical-divider/vertical-divider.component.js +3 -0
  254. package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.js +4 -0
  255. package/esm/hooks/__internal__/useClickAwayListener/useClickAwayListener.js +2 -3
  256. package/esm/hooks/__internal__/useFloating/useFloating.js +6 -0
  257. package/esm/hooks/__internal__/useIsStickyFooterForm/useIsStickyFooterForm.js +1 -0
  258. package/esm/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +16 -2
  259. package/esm/hooks/__internal__/useModalManager/useModalManager.js +4 -0
  260. package/esm/hooks/__internal__/useResizeObserver/useResizeObserver.js +8 -3
  261. package/esm/hooks/__internal__/useScrollBlock/scroll-block-manager.js +16 -6
  262. package/esm/hooks/__internal__/useScrollBlock/useScrollBlock.js +15 -11
  263. package/esm/hooks/useMediaQuery/useMediaQuery.js +2 -0
  264. package/esm/locales/en-gb.js +8 -1
  265. package/esm/locales/pl-pl.js +8 -1
  266. package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +0 -1
  267. package/esm/style/design-tokens/debug-theme.util.js +9 -5
  268. package/esm/style/design-tokens/generate-css-variables.util.js +0 -1
  269. package/esm/style/palette/index.js +6 -2
  270. package/esm/style/themes/aegean/aegean-theme.config.js +3 -0
  271. package/esm/style/themes/base/base-theme.config.js +4 -2
  272. package/esm/style/themes/base/index.js +2 -4
  273. package/esm/style/themes/mint/mint-theme.config.js +3 -0
  274. package/esm/style/themes/sage/index.js +2 -4
  275. package/esm/style/themes/test-utils.js +4 -4
  276. package/esm/style/utils/add-hex-symbols.js +1 -0
  277. package/esm/style/utils/at-opacity.js +1 -0
  278. package/esm/style/utils/color.js +8 -3
  279. package/esm/style/utils/filter-out-styled-system-spacing-props.js +2 -0
  280. package/esm/style/utils/filter-styled-system-padding-props.js +1 -2
  281. package/esm/style/utils/form-style-utils.js +12 -0
  282. package/esm/style/utils/get-color-value.js +1 -0
  283. package/esm/style/utils/get-rgb-values.js +1 -1
  284. package/esm/style/utils/merge-deep.js +6 -1
  285. package/esm/style/utils/mix.js +7 -1
  286. package/esm/style/utils/width.js +0 -1
  287. package/lib/__internal__/DeprecationWarning.js +5 -0
  288. package/lib/__internal__/character-count/character-count.component.js +6 -0
  289. package/lib/__internal__/character-count/character-count.style.js +6 -0
  290. package/lib/__internal__/character-count/index.js +2 -0
  291. package/lib/__internal__/checkable-input/checkable-input-svg-wrapper.style.js +3 -0
  292. package/lib/__internal__/checkable-input/checkable-input.component.js +16 -0
  293. package/lib/__internal__/checkable-input/checkable-input.style.js +11 -0
  294. package/lib/__internal__/checkable-input/hidden-checkable-input.component.js +20 -0
  295. package/lib/__internal__/checkable-input/hidden-checkable-input.style.js +3 -0
  296. package/lib/__internal__/checkable-input/index.js +2 -0
  297. package/lib/__internal__/field-help/field-help.component.js +6 -0
  298. package/lib/__internal__/field-help/field-help.style.js +4 -0
  299. package/lib/__internal__/field-help/index.js +2 -0
  300. package/lib/__internal__/fieldset/fieldset.component.js +9 -0
  301. package/lib/__internal__/fieldset/fieldset.style.js +7 -0
  302. package/lib/__internal__/fieldset/index.js +2 -0
  303. package/lib/__internal__/filter-object-properties/filter-object-properties.js +1 -0
  304. package/lib/__internal__/filter-object-properties/index.js +2 -0
  305. package/lib/__internal__/focus-trap/focus-trap-utils.js +26 -6
  306. package/lib/__internal__/focus-trap/focus-trap.component.js +26 -4
  307. package/lib/__internal__/focus-trap/index.js +2 -0
  308. package/lib/__internal__/form-field/form-field.component.js +18 -0
  309. package/lib/__internal__/form-field/form-field.style.js +6 -0
  310. package/lib/__internal__/form-field/index.js +2 -0
  311. package/lib/__internal__/full-screen-heading/full-screen-heading.component.js +10 -0
  312. package/lib/__internal__/full-screen-heading/full-screen-heading.style.js +5 -0
  313. package/lib/__internal__/full-screen-heading/index.js +2 -0
  314. package/lib/__internal__/i18n-context/index.js +5 -0
  315. package/lib/__internal__/input/index.js +4 -0
  316. package/lib/__internal__/input/input-presentation.component.js +13 -0
  317. package/lib/__internal__/input/input-presentation.style.js +12 -0
  318. package/lib/__internal__/input/input.component.js +33 -2
  319. package/lib/__internal__/input/input.style.js +4 -0
  320. package/lib/__internal__/input-behaviour/index.js +2 -0
  321. package/lib/__internal__/input-behaviour/input-behaviour.component.js +12 -2
  322. package/lib/__internal__/input-behaviour/input-group-behaviour.component.js +8 -0
  323. package/lib/__internal__/input-behaviour/useInputBehaviour.js +5 -2
  324. package/lib/__internal__/input-icon-toggle/index.js +2 -0
  325. package/lib/__internal__/input-icon-toggle/input-icon-toggle.component.js +11 -0
  326. package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +7 -0
  327. package/lib/__internal__/label/icon-wrapper.style.js +5 -0
  328. package/lib/__internal__/label/index.js +2 -0
  329. package/lib/__internal__/label/label.component.js +22 -0
  330. package/lib/__internal__/label/label.style.js +4 -0
  331. package/lib/__internal__/popover/index.js +2 -0
  332. package/lib/__internal__/popover/popover.component.js +24 -0
  333. package/lib/__internal__/popover/popover.style.js +4 -0
  334. package/lib/__internal__/radio-button-mapper/index.d.ts +2 -2
  335. package/lib/__internal__/radio-button-mapper/index.js +2 -0
  336. package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.d.ts +29 -0
  337. package/lib/__internal__/radio-button-mapper/radio-button-mapper.component.js +30 -21
  338. package/lib/__internal__/sticky-footer/index.js +2 -0
  339. package/lib/__internal__/sticky-footer/sticky-footer.component.js +13 -0
  340. package/lib/__internal__/sticky-footer/sticky-footer.style.js +4 -0
  341. package/lib/__internal__/tooltip-provider/index.js +9 -0
  342. package/lib/__internal__/utils/helpers/browser-type-check/index.js +3 -0
  343. package/lib/__internal__/utils/helpers/events/composedPath.js +6 -0
  344. package/lib/__internal__/utils/helpers/events/events.js +18 -0
  345. package/lib/__internal__/utils/helpers/events/index.js +2 -0
  346. package/lib/__internal__/utils/helpers/guid/index.js +3 -0
  347. package/lib/__internal__/utils/helpers/tags/index.js +2 -0
  348. package/lib/__internal__/utils/helpers/tags/tags-specs/index.js +1 -0
  349. package/lib/__internal__/utils/helpers/tags/tags-specs/tags-specs.js +5 -2
  350. package/lib/__internal__/utils/helpers/tags/tags.js +5 -0
  351. package/lib/__internal__/utils/helpers/useUniqueId/index.js +5 -0
  352. package/lib/__internal__/utils/logger/index.js +2 -1
  353. package/lib/__internal__/validation-message/index.js +2 -0
  354. package/lib/__internal__/validation-message/validation-message.component.js +6 -0
  355. package/lib/__internal__/validation-message/validation-message.style.js +4 -0
  356. package/lib/__internal__/validations/index.js +2 -0
  357. package/lib/__internal__/validations/validation-icon.component.js +18 -0
  358. package/lib/__internal__/validations/validation-icon.style.js +8 -0
  359. package/lib/__spec_helper__/enzyme-snapshot-helper.js +6 -0
  360. package/lib/__spec_helper__/expect.js +8 -2
  361. package/lib/__spec_helper__/index.js +4 -0
  362. package/lib/__spec_helper__/mock-match-media.js +7 -0
  363. package/lib/__spec_helper__/mock-resize-observer.js +3 -0
  364. package/lib/__spec_helper__/test-utils.js +87 -28
  365. package/lib/components/accordion/accordion-group/accordion-group.component.js +20 -0
  366. package/lib/components/accordion/accordion.component.js +19 -0
  367. package/lib/components/accordion/accordion.style.js +9 -0
  368. package/lib/components/accordion/index.js +3 -0
  369. package/lib/components/action-popover/action-popover-context.js +4 -0
  370. package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.js +2 -0
  371. package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +34 -2
  372. package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +22 -2
  373. package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +8 -0
  374. package/lib/components/action-popover/action-popover.component.js +35 -4
  375. package/lib/components/action-popover/action-popover.style.js +10 -0
  376. package/lib/components/action-popover/index.js +6 -0
  377. package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +4 -0
  378. package/lib/components/advanced-color-picker/advanced-color-picker.component.js +30 -0
  379. package/lib/components/advanced-color-picker/advanced-color-picker.style.js +14 -0
  380. package/lib/components/advanced-color-picker/index.js +2 -0
  381. package/lib/components/alert/alert.component.js +7 -0
  382. package/lib/components/alert/index.js +2 -0
  383. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.component.js +6 -0
  384. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +4 -0
  385. package/lib/components/anchor-navigation/anchor-navigation.component.js +27 -5
  386. package/lib/components/anchor-navigation/anchor-navigation.style.js +3 -0
  387. package/lib/components/anchor-navigation/anchor-section-divider.component.js +3 -0
  388. package/lib/components/anchor-navigation/index.js +4 -0
  389. package/lib/components/badge/badge.component.js +6 -0
  390. package/lib/components/badge/badge.style.js +6 -0
  391. package/lib/components/badge/index.js +2 -0
  392. package/lib/components/batch-selection/batch-selection.component.js +11 -0
  393. package/lib/components/batch-selection/batch-selection.style.js +7 -0
  394. package/lib/components/batch-selection/index.js +2 -0
  395. package/lib/components/box/box.component.js +9 -0
  396. package/lib/components/box/box.config.js +3 -0
  397. package/lib/components/box/index.js +2 -0
  398. package/lib/components/button/button-types.style.js +6 -0
  399. package/lib/components/button/button.component.js +29 -0
  400. package/lib/components/button/button.style.js +16 -0
  401. package/lib/components/button/index.js +3 -0
  402. package/lib/components/button-bar/button-bar.component.js +18 -2
  403. package/lib/components/button-bar/button-bar.style.js +8 -0
  404. package/lib/components/button-bar/index.js +2 -0
  405. package/lib/components/button-toggle/button-toggle-icon.component.js +7 -0
  406. package/lib/components/button-toggle/button-toggle-input.component.js +15 -0
  407. package/lib/components/button-toggle/button-toggle.component.js +17 -0
  408. package/lib/components/button-toggle/button-toggle.style.js +6 -0
  409. package/lib/components/button-toggle/index.js +2 -0
  410. package/lib/components/button-toggle-group/button-toggle-group.component.js +18 -0
  411. package/lib/components/button-toggle-group/button-toggle-group.style.js +7 -0
  412. package/lib/components/button-toggle-group/index.js +2 -0
  413. package/lib/components/carbon-provider/carbon-provider.component.js +12 -0
  414. package/lib/components/carbon-provider/index.js +2 -0
  415. package/lib/components/carbon-provider/top-modal-context.js +13 -3
  416. package/lib/components/card/card-column/card-column.component.js +6 -0
  417. package/lib/components/card/card-column/card-column.style.js +3 -0
  418. package/lib/components/card/card-column/index.js +2 -0
  419. package/lib/components/card/card-footer/card-footer.component.js +8 -0
  420. package/lib/components/card/card-footer/card-footer.style.js +7 -0
  421. package/lib/components/card/card-footer/index.js +2 -0
  422. package/lib/components/card/card-row/card-row.component.js +8 -0
  423. package/lib/components/card/card-row/card-row.style.js +7 -0
  424. package/lib/components/card/card-row/index.js +2 -0
  425. package/lib/components/card/card.component.js +19 -0
  426. package/lib/components/card/card.style.js +7 -0
  427. package/lib/components/card/index.js +5 -0
  428. package/lib/components/carousel/carousel.component.js +24 -0
  429. package/lib/components/carousel/carousel.style.js +8 -0
  430. package/lib/components/carousel/index.js +3 -0
  431. package/lib/components/carousel/slide/index.js +2 -0
  432. package/lib/components/carousel/slide/slide.component.js +8 -0
  433. package/lib/components/carousel/slide/slide.style.js +5 -2
  434. package/lib/components/carousel/slide.config.js +2 -0
  435. package/lib/components/checkbox/checkbox-group.component.js +13 -0
  436. package/lib/components/checkbox/checkbox-group.style.js +10 -0
  437. package/lib/components/checkbox/checkbox-svg.component.js +6 -0
  438. package/lib/components/checkbox/checkbox.component.js +19 -0
  439. package/lib/components/checkbox/checkbox.style.d.ts +1 -1
  440. package/lib/components/checkbox/checkbox.style.js +13 -0
  441. package/lib/components/checkbox/index.js +3 -0
  442. package/lib/components/confirm/confirm.component.js +51 -0
  443. package/lib/components/confirm/confirm.style.js +8 -0
  444. package/lib/components/confirm/index.js +2 -0
  445. package/lib/components/content/content.component.js +7 -0
  446. package/lib/components/content/content.style.js +6 -0
  447. package/lib/components/content/index.js +2 -0
  448. package/lib/components/date/__internal__/date-formats/index.js +19 -6
  449. package/lib/components/date/__internal__/date-picker/date-picker.component.js +31 -2
  450. package/lib/components/date/__internal__/date-picker/day-picker.style.js +10 -1
  451. package/lib/components/date/__internal__/date-picker/index.js +2 -0
  452. package/lib/components/date/__internal__/navbar/button.style.js +3 -0
  453. package/lib/components/date/__internal__/navbar/index.js +2 -0
  454. package/lib/components/date/__internal__/navbar/navbar.component.js +8 -0
  455. package/lib/components/date/__internal__/navbar/navbar.style.js +3 -0
  456. package/lib/components/date/__internal__/utils.js +42 -1
  457. package/lib/components/date/__internal__/weekday/abbr.style.js +3 -0
  458. package/lib/components/date/__internal__/weekday/index.js +2 -0
  459. package/lib/components/date/__internal__/weekday/weekday.component.js +8 -0
  460. package/lib/components/date/__internal__/weekday/weekday.style.js +3 -0
  461. package/lib/components/date/date.component.js +71 -10
  462. package/lib/components/date/date.style.js +8 -0
  463. package/lib/components/date/index.js +2 -0
  464. package/lib/components/date-range/date-range.component.js +63 -14
  465. package/lib/components/date-range/date-range.context.js +4 -0
  466. package/lib/components/date-range/date-range.style.js +8 -0
  467. package/lib/components/date-range/index.js +2 -0
  468. package/lib/components/decimal/decimal.component.js +38 -4
  469. package/lib/components/decimal/index.js +2 -0
  470. package/lib/components/definition-list/__internal__/dl.context.js +4 -0
  471. package/lib/components/definition-list/dd.component.js +7 -0
  472. package/lib/components/definition-list/definition-list.style.js +8 -0
  473. package/lib/components/definition-list/dl.component.js +20 -0
  474. package/lib/components/definition-list/dt.component.js +10 -0
  475. package/lib/components/definition-list/index.js +4 -0
  476. package/lib/components/detail/detail.component.js +17 -2
  477. package/lib/components/detail/detail.style.js +8 -0
  478. package/lib/components/detail/index.js +2 -0
  479. package/lib/components/dialog/dialog.component.js +32 -0
  480. package/lib/components/dialog/dialog.style.js +14 -0
  481. package/lib/components/dialog/index.js +2 -0
  482. package/lib/components/dialog-full-screen/content.style.js +5 -0
  483. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +42 -0
  484. package/lib/components/dialog-full-screen/dialog-full-screen.style.js +11 -0
  485. package/lib/components/dialog-full-screen/index.js +2 -0
  486. package/lib/components/dismissible-box/dismissible-box.component.js +9 -0
  487. package/lib/components/dismissible-box/dismissible-box.style.js +7 -0
  488. package/lib/components/dismissible-box/index.js +2 -0
  489. package/lib/components/draggable/draggable-container.component.js +30 -4
  490. package/lib/components/draggable/draggable-item.component.js +19 -2
  491. package/lib/components/draggable/draggable-item.style.js +6 -0
  492. package/lib/components/draggable/index.js +3 -0
  493. package/lib/components/drawer/drawer.component.js +29 -0
  494. package/lib/components/drawer/drawer.style.js +15 -0
  495. package/lib/components/drawer/index.js +3 -0
  496. package/lib/components/duelling-picklist/duelling-picklist.component.js +26 -2
  497. package/lib/components/duelling-picklist/duelling-picklist.context.js +4 -0
  498. package/lib/components/duelling-picklist/duelling-picklist.style.js +6 -0
  499. package/lib/components/duelling-picklist/index.js +7 -0
  500. package/lib/components/duelling-picklist/picklist/picklist.component.js +25 -0
  501. package/lib/components/duelling-picklist/picklist/picklist.style.js +4 -0
  502. package/lib/components/duelling-picklist/picklist-divider/picklist-divider.component.js +6 -0
  503. package/lib/components/duelling-picklist/picklist-divider/picklist-divider.style.js +3 -0
  504. package/lib/components/duelling-picklist/picklist-group/picklist-group.component.js +22 -0
  505. package/lib/components/duelling-picklist/picklist-group/picklist-group.style.js +7 -0
  506. package/lib/components/duelling-picklist/picklist-item/picklist-item.component.js +25 -0
  507. package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +8 -0
  508. package/lib/components/duelling-picklist/picklist-placeholder/picklist-placeholder.component.js +6 -0
  509. package/lib/components/fieldset/fieldset.component.js +11 -0
  510. package/lib/components/fieldset/fieldset.style.js +9 -0
  511. package/lib/components/fieldset/index.js +2 -0
  512. package/lib/components/flat-table/flat-table-body/flat-table-body.component.js +6 -0
  513. package/lib/components/flat-table/flat-table-body/index.js +2 -0
  514. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.js +23 -0
  515. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +4 -0
  516. package/lib/components/flat-table/flat-table-body-draggable/index.js +2 -0
  517. package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.js +28 -0
  518. package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +8 -0
  519. package/lib/components/flat-table/flat-table-cell/index.js +2 -0
  520. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.component.js +22 -0
  521. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +6 -0
  522. package/lib/components/flat-table/flat-table-checkbox/index.js +2 -0
  523. package/lib/components/flat-table/flat-table-head/flat-table-head.component.js +15 -4
  524. package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +6 -0
  525. package/lib/components/flat-table/flat-table-head/index.js +2 -0
  526. package/lib/components/flat-table/flat-table-header/flat-table-header-utils.js +5 -1
  527. package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +23 -0
  528. package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +9 -0
  529. package/lib/components/flat-table/flat-table-header/index.js +2 -0
  530. package/lib/components/flat-table/flat-table-row/__internal__/flat-table-row-draggable.component.js +13 -0
  531. package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +50 -0
  532. package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +23 -2
  533. package/lib/components/flat-table/flat-table-row/index.js +2 -0
  534. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +25 -0
  535. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +8 -0
  536. package/lib/components/flat-table/flat-table-row-header/index.js +2 -0
  537. package/lib/components/flat-table/flat-table.component.js +29 -2
  538. package/lib/components/flat-table/flat-table.style.js +17 -0
  539. package/lib/components/flat-table/index.js +11 -0
  540. package/lib/components/flat-table/sort/index.js +2 -0
  541. package/lib/components/flat-table/sort/sort.component.js +16 -0
  542. package/lib/components/flat-table/sort/sort.style.js +4 -0
  543. package/lib/components/form/__internal__/form-summary.component.js +15 -0
  544. package/lib/components/form/__internal__/form-summary.style.js +7 -0
  545. package/lib/components/form/form.component.js +12 -0
  546. package/lib/components/form/form.style.js +17 -2
  547. package/lib/components/form/index.js +2 -0
  548. package/lib/components/global-header/global-header.component.js +16 -1
  549. package/lib/components/global-header/index.js +2 -0
  550. package/lib/components/grid/grid-container/grid-container.component.js +10 -0
  551. package/lib/components/grid/grid-container/grid-container.style.js +4 -0
  552. package/lib/components/grid/grid-container/index.js +2 -0
  553. package/lib/components/grid/grid-item/grid-item.component.js +10 -0
  554. package/lib/components/grid/grid-item/grid-item.style.js +19 -0
  555. package/lib/components/grid/grid-item/index.js +2 -0
  556. package/lib/components/grid/index.js +3 -0
  557. package/lib/components/grouped-character/grouped-character.component.js +28 -3
  558. package/lib/components/grouped-character/grouped-character.utils.js +4 -0
  559. package/lib/components/grouped-character/index.js +2 -0
  560. package/lib/components/heading/heading.component.js +16 -2
  561. package/lib/components/heading/heading.style.js +13 -0
  562. package/lib/components/heading/index.js +2 -0
  563. package/lib/components/help/help.component.js +20 -0
  564. package/lib/components/help/help.style.js +8 -0
  565. package/lib/components/help/index.js +2 -0
  566. package/lib/components/hr/hr.component.js +10 -0
  567. package/lib/components/hr/hr.style.js +5 -0
  568. package/lib/components/hr/index.js +2 -0
  569. package/lib/components/i18n-provider/i18n-provider.component.js +8 -0
  570. package/lib/components/i18n-provider/index.js +2 -0
  571. package/lib/components/icon/icon-unicodes.js +1 -2
  572. package/lib/components/icon/icon.component.js +27 -1
  573. package/lib/components/icon/icon.style.js +18 -0
  574. package/lib/components/icon/index.js +2 -0
  575. package/lib/components/icon-button/icon-button.component.js +15 -0
  576. package/lib/components/icon-button/icon-button.style.js +8 -0
  577. package/lib/components/icon-button/index.js +2 -0
  578. package/lib/components/image/image.component.js +8 -0
  579. package/lib/components/image/image.style.js +7 -2
  580. package/lib/components/image/index.js +2 -0
  581. package/lib/components/inline-inputs/index.js +3 -0
  582. package/lib/components/inline-inputs/inline-inputs.component.js +17 -0
  583. package/lib/components/inline-inputs/inline-inputs.style.js +8 -0
  584. package/lib/components/link/index.js +2 -0
  585. package/lib/components/link/link.component.js +24 -3
  586. package/lib/components/link/link.style.js +11 -0
  587. package/lib/components/link-preview/__internal__/placeholder.component.js +6 -0
  588. package/lib/components/link-preview/index.js +2 -0
  589. package/lib/components/link-preview/link-preview.component.js +17 -0
  590. package/lib/components/link-preview/link-preview.style.js +6 -0
  591. package/lib/components/loader/index.js +2 -0
  592. package/lib/components/loader/loader-square.style.js +10 -0
  593. package/lib/components/loader/loader.component.js +9 -0
  594. package/lib/components/loader/loader.style.js +5 -0
  595. package/lib/components/loader-bar/index.js +2 -0
  596. package/lib/components/loader-bar/loader-bar.component.js +10 -0
  597. package/lib/components/loader-bar/loader-bar.style.js +10 -0
  598. package/lib/components/menu/__internal__/keyboard-navigation/index.js +11 -0
  599. package/lib/components/menu/__internal__/spec-helper/index.js +7 -0
  600. package/lib/components/menu/__internal__/submenu/submenu.component.js +80 -7
  601. package/lib/components/menu/__internal__/submenu/submenu.context.js +4 -0
  602. package/lib/components/menu/__internal__/submenu/submenu.style.js +12 -0
  603. package/lib/components/menu/index.js +7 -0
  604. package/lib/components/menu/menu-divider/menu-divider.component.js +10 -0
  605. package/lib/components/menu/menu-divider/menu-divider.style.js +6 -0
  606. package/lib/components/menu/menu-full-screen/index.js +2 -0
  607. package/lib/components/menu/menu-full-screen/menu-full-screen.component.js +23 -0
  608. package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +12 -0
  609. package/lib/components/menu/menu-item/index.js +2 -0
  610. package/lib/components/menu/menu-item/menu-item.component.js +52 -0
  611. package/lib/components/menu/menu-item/menu-item.style.js +8 -0
  612. package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +11 -0
  613. package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +6 -0
  614. package/lib/components/menu/menu.component.js +18 -0
  615. package/lib/components/menu/menu.context.js +7 -1
  616. package/lib/components/menu/menu.style.js +9 -0
  617. package/lib/components/menu/scrollable-block/index.js +2 -0
  618. package/lib/components/menu/scrollable-block/scrollable-block.component.js +19 -0
  619. package/lib/components/menu/scrollable-block/scrollable-block.style.js +7 -0
  620. package/lib/components/message/index.js +2 -0
  621. package/lib/components/message/message-content/message-content.component.js +7 -0
  622. package/lib/components/message/message-content/message-content.style.js +3 -0
  623. package/lib/components/message/message.component.js +16 -0
  624. package/lib/components/message/message.style.js +8 -0
  625. package/lib/components/message/type-icon/type-icon.component.js +7 -0
  626. package/lib/components/message/type-icon/type-icon.style.js +4 -0
  627. package/lib/components/modal/__internal__/modal-manager.js +25 -0
  628. package/lib/components/modal/index.js +3 -0
  629. package/lib/components/modal/modal.component.js +19 -0
  630. package/lib/components/modal/modal.style.js +6 -0
  631. package/lib/components/multi-action-button/index.js +2 -0
  632. package/lib/components/multi-action-button/multi-action-button.component.js +32 -3
  633. package/lib/components/multi-action-button/multi-action-button.style.js +9 -0
  634. package/lib/components/navigation-bar/index.js +2 -0
  635. package/lib/components/navigation-bar/navigation-bar.component.js +7 -0
  636. package/lib/components/navigation-bar/navigation-bar.style.js +6 -0
  637. package/lib/components/note/__internal__/status-icon/index.js +2 -0
  638. package/lib/components/note/__internal__/status-icon/status-icon.component.js +7 -0
  639. package/lib/components/note/__internal__/status-icon/status-icon.style.js +3 -0
  640. package/lib/components/note/index.js +2 -0
  641. package/lib/components/note/note.component.js +21 -1
  642. package/lib/components/note/note.style.js +8 -0
  643. package/lib/components/number/index.js +3 -0
  644. package/lib/components/number/number.component.js +14 -2
  645. package/lib/components/numeral-date/index.js +2 -0
  646. package/lib/components/numeral-date/numeral-date-context.js +4 -0
  647. package/lib/components/numeral-date/numeral-date.component.js +42 -9
  648. package/lib/components/numeral-date/numeral-date.style.js +9 -0
  649. package/lib/components/pager/__internal__/pager-navigation-link.component.js +18 -0
  650. package/lib/components/pager/__internal__/pager-navigation.component.js +34 -0
  651. package/lib/components/pager/index.js +2 -0
  652. package/lib/components/pager/pager.component.js +40 -0
  653. package/lib/components/pager/pager.style.js +10 -0
  654. package/lib/components/pages/index.js +3 -0
  655. package/lib/components/pages/page/index.js +2 -0
  656. package/lib/components/pages/page/page.component.js +14 -0
  657. package/lib/components/pages/page/page.style.js +5 -0
  658. package/lib/components/pages/pages.component.js +26 -4
  659. package/lib/components/pages/pages.config.js +2 -0
  660. package/lib/components/pages/pages.style.js +6 -0
  661. package/lib/components/pill/index.js +2 -0
  662. package/lib/components/pill/pill.component.js +10 -0
  663. package/lib/components/pill/pill.style.config.js +2 -0
  664. package/lib/components/pill/pill.style.js +15 -0
  665. package/lib/components/pod/index.js +2 -0
  666. package/lib/components/pod/pod.component.js +53 -4
  667. package/lib/components/pod/pod.style.js +19 -6
  668. package/lib/components/popover-container/index.js +2 -0
  669. package/lib/components/popover-container/popover-container.component.js +27 -2
  670. package/lib/components/popover-container/popover-container.style.js +10 -0
  671. package/lib/components/portal/index.js +2 -0
  672. package/lib/components/portal/portal.js +23 -2
  673. package/lib/components/portrait/index.js +2 -0
  674. package/lib/components/portrait/portrait-gravatar.component.js +10 -0
  675. package/lib/components/portrait/portrait-initials.component.js +20 -10
  676. package/lib/components/portrait/portrait.component.js +21 -0
  677. package/lib/components/portrait/portrait.style.js +19 -3
  678. package/lib/components/preview/__internal__/preview-placeholder.component.js +8 -0
  679. package/lib/components/preview/__internal__/preview-placeholder.style.js +4 -0
  680. package/lib/components/preview/index.js +2 -0
  681. package/lib/components/preview/preview.component.js +13 -0
  682. package/lib/components/preview/preview.style.js +6 -3
  683. package/lib/components/profile/index.js +2 -0
  684. package/lib/components/profile/profile.component.js +14 -0
  685. package/lib/components/profile/profile.style.js +7 -0
  686. package/lib/components/progress-tracker/index.js +2 -0
  687. package/lib/components/progress-tracker/progress-tracker.component.js +35 -2
  688. package/lib/components/progress-tracker/progress-tracker.config.js +1 -0
  689. package/lib/components/progress-tracker/progress-tracker.style.js +14 -0
  690. package/lib/components/radio-button/index.d.ts +4 -6
  691. package/lib/components/radio-button/index.js +5 -9
  692. package/lib/components/radio-button/radio-button-group.component.d.ts +42 -0
  693. package/lib/components/radio-button/radio-button-group.component.js +198 -49
  694. package/lib/components/radio-button/radio-button-group.style.d.ts +5 -0
  695. package/lib/components/radio-button/radio-button-group.style.js +4 -0
  696. package/lib/components/radio-button/radio-button-svg.component.d.ts +3 -0
  697. package/lib/components/radio-button/radio-button-svg.component.js +8 -0
  698. package/lib/components/radio-button/radio-button.component.d.ts +28 -0
  699. package/lib/components/radio-button/radio-button.component.js +548 -85
  700. package/lib/components/radio-button/radio-button.style.d.ts +5 -0
  701. package/lib/components/radio-button/radio-button.style.js +14 -0
  702. package/lib/components/search/index.js +2 -0
  703. package/lib/components/search/search-button.style.js +6 -0
  704. package/lib/components/search/search.component.js +34 -2
  705. package/lib/components/search/search.style.js +12 -0
  706. package/lib/components/select/__internal__/select-list-context.js +4 -0
  707. package/lib/components/select/__internal__/select-text/select-text.component.js +17 -0
  708. package/lib/components/select/__internal__/select-text/select-text.style.js +6 -0
  709. package/lib/components/select/filterable-select/filterable-select.component.js +91 -8
  710. package/lib/components/select/index.js +7 -0
  711. package/lib/components/select/list-action-button/list-action-button.component.js +12 -0
  712. package/lib/components/select/list-action-button/list-action-button.style.js +4 -0
  713. package/lib/components/select/multi-select/multi-select.component.js +102 -15
  714. package/lib/components/select/multi-select/multi-select.style.js +10 -0
  715. package/lib/components/select/option/option.component.js +21 -0
  716. package/lib/components/select/option/option.style.js +6 -0
  717. package/lib/components/select/option-group-header/option-group-header.component.js +8 -0
  718. package/lib/components/select/option-group-header/option-group-header.style.js +4 -0
  719. package/lib/components/select/option-row/option-row.component.js +18 -0
  720. package/lib/components/select/option-row/option-row.style.js +4 -0
  721. package/lib/components/select/select-list/select-list-container.style.js +4 -0
  722. package/lib/components/select/select-list/select-list.component.js +67 -2
  723. package/lib/components/select/select-list/select-list.style.js +5 -2
  724. package/lib/components/select/select-list/update-list-scroll.js +4 -0
  725. package/lib/components/select/select-textbox/select-textbox.component.js +53 -2
  726. package/lib/components/select/select.style.js +10 -0
  727. package/lib/components/select/simple-select/simple-select.component.js +78 -2
  728. package/lib/components/select/utils/get-next-child-by-text.js +9 -0
  729. package/lib/components/select/utils/get-next-index-by-key.js +14 -0
  730. package/lib/components/select/utils/highlight-part-of-text.js +11 -0
  731. package/lib/components/select/utils/is-expected-option.js +9 -0
  732. package/lib/components/select/utils/is-expected-value.js +2 -0
  733. package/lib/components/select/utils/is-navigation-key.js +1 -0
  734. package/lib/components/select/utils/matching-text.style.js +3 -0
  735. package/lib/components/select/utils/with-filter.hoc.js +43 -3
  736. package/lib/components/settings-row/index.js +2 -0
  737. package/lib/components/settings-row/settings-row.component.js +19 -2
  738. package/lib/components/settings-row/settings-row.style.js +8 -0
  739. package/lib/components/show-edit-pod/index.js +2 -0
  740. package/lib/components/show-edit-pod/show-edit-pod.component.js +58 -6
  741. package/lib/components/show-edit-pod/show-edit-pod.style.js +6 -0
  742. package/lib/components/sidebar/__internal__/sidebar-header/index.js +2 -0
  743. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.component.js +6 -0
  744. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +3 -0
  745. package/lib/components/sidebar/index.js +3 -0
  746. package/lib/components/sidebar/sidebar.component.js +26 -0
  747. package/lib/components/sidebar/sidebar.style.js +11 -0
  748. package/lib/components/simple-color-picker/color-sample-box/color-sample-box.component.js +11 -1
  749. package/lib/components/simple-color-picker/color-sample-box/color-sample-box.style.js +7 -0
  750. package/lib/components/simple-color-picker/color-sample-box/index.js +2 -0
  751. package/lib/components/simple-color-picker/index.js +3 -0
  752. package/lib/components/simple-color-picker/simple-color/index.js +2 -0
  753. package/lib/components/simple-color-picker/simple-color/simple-color.component.js +16 -0
  754. package/lib/components/simple-color-picker/simple-color/simple-color.style.js +3 -0
  755. package/lib/components/simple-color-picker/simple-color-input/simple-color-input.style.js +5 -0
  756. package/lib/components/simple-color-picker/simple-color-picker.component.js +59 -8
  757. package/lib/components/simple-color-picker/simple-color-picker.style.js +8 -0
  758. package/lib/components/simple-color-picker/tick-icon/tick-icon.style.js +12 -4
  759. package/lib/components/split-button/index.js +2 -0
  760. package/lib/components/split-button/split-button-children.style.js +7 -0
  761. package/lib/components/split-button/split-button-toggle.style.js +7 -0
  762. package/lib/components/split-button/split-button.component.js +40 -1
  763. package/lib/components/split-button/split-button.style.js +6 -0
  764. package/lib/components/step-sequence/index.js +3 -0
  765. package/lib/components/step-sequence/step-sequence-item/index.js +2 -0
  766. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +17 -0
  767. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +6 -0
  768. package/lib/components/step-sequence/step-sequence.component.js +9 -0
  769. package/lib/components/step-sequence/step-sequence.style.js +6 -0
  770. package/lib/components/switch/__internal__/switch-slider-panel.style.js +7 -0
  771. package/lib/components/switch/__internal__/switch-slider.component.js +12 -0
  772. package/lib/components/switch/__internal__/switch-slider.style.js +7 -0
  773. package/lib/components/switch/index.js +2 -0
  774. package/lib/components/switch/switch.component.js +18 -0
  775. package/lib/components/switch/switch.style.js +14 -0
  776. package/lib/components/tabs/__internal__/tab-title/index.js +2 -0
  777. package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +37 -8
  778. package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +8 -0
  779. package/lib/components/tabs/__internal__/tabs-header/index.js +2 -0
  780. package/lib/components/tabs/__internal__/tabs-header/tabs-header.component.js +6 -0
  781. package/lib/components/tabs/__internal__/tabs-header/tabs-header.style.js +8 -0
  782. package/lib/components/tabs/index.js +1 -0
  783. package/lib/components/tabs/tab/index.js +3 -0
  784. package/lib/components/tabs/tab/tab.component.js +35 -8
  785. package/lib/components/tabs/tab/tab.style.js +8 -0
  786. package/lib/components/tabs/tabs.component.js +75 -24
  787. package/lib/components/tabs/tabs.style.js +10 -0
  788. package/lib/components/text-editor/__internal__/decorators/index.js +5 -0
  789. package/lib/components/text-editor/__internal__/decorators/link-decorator.js +12 -10
  790. package/lib/components/text-editor/__internal__/editor-counter/editor-counter.component.js +11 -0
  791. package/lib/components/text-editor/__internal__/editor-counter/editor-counter.style.js +3 -0
  792. package/lib/components/text-editor/__internal__/editor-counter/index.js +2 -0
  793. package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +14 -2
  794. package/lib/components/text-editor/__internal__/editor-link/editor-link.style.js +4 -0
  795. package/lib/components/text-editor/__internal__/editor-link/index.js +2 -0
  796. package/lib/components/text-editor/__internal__/label-wrapper/index.js +2 -0
  797. package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +6 -0
  798. package/lib/components/text-editor/__internal__/toolbar/index.js +2 -0
  799. package/lib/components/text-editor/__internal__/toolbar/toolbar-button/index.js +2 -0
  800. package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +12 -0
  801. package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.js +6 -0
  802. package/lib/components/text-editor/__internal__/toolbar/toolbar.component.js +22 -0
  803. package/lib/components/text-editor/__internal__/toolbar/toolbar.style.js +4 -0
  804. package/lib/components/text-editor/__internal__/utils/index.js +1 -0
  805. package/lib/components/text-editor/__internal__/utils/utils.js +49 -9
  806. package/lib/components/text-editor/index.js +3 -0
  807. package/lib/components/text-editor/text-editor.component.js +76 -22
  808. package/lib/components/text-editor/text-editor.style.js +8 -0
  809. package/lib/components/textarea/index.js +2 -0
  810. package/lib/components/textarea/textarea.component.js +71 -6
  811. package/lib/components/textarea/textarea.style.js +10 -0
  812. package/lib/components/textbox/__internal__/prefix.style.js +3 -0
  813. package/lib/components/textbox/index.js +2 -0
  814. package/lib/components/textbox/textbox.component.js +28 -2
  815. package/lib/components/textbox/textbox.style.js +4 -0
  816. package/lib/components/tile/index.js +2 -0
  817. package/lib/components/tile/tile-footer/index.js +2 -0
  818. package/lib/components/tile/tile-footer/tile-footer.component.js +12 -2
  819. package/lib/components/tile/tile-footer/tile-footer.style.js +6 -0
  820. package/lib/components/tile/tile.component.js +16 -0
  821. package/lib/components/tile/tile.style.js +9 -0
  822. package/lib/components/tile-select/__internal__/accordion/accordion.component.js +9 -0
  823. package/lib/components/tile-select/__internal__/accordion/accordion.style.js +4 -0
  824. package/lib/components/tile-select/__internal__/accordion/index.js +2 -0
  825. package/lib/components/tile-select/index.js +3 -0
  826. package/lib/components/tile-select/tile-select-group.component.js +28 -2
  827. package/lib/components/tile-select/tile-select.component.js +48 -4
  828. package/lib/components/tile-select/tile-select.style.js +11 -0
  829. package/lib/components/toast/index.js +2 -0
  830. package/lib/components/toast/toast.component.js +34 -0
  831. package/lib/components/toast/toast.style.js +12 -0
  832. package/lib/components/tooltip/index.js +2 -0
  833. package/lib/components/tooltip/tooltip-pointer.style.js +8 -0
  834. package/lib/components/tooltip/tooltip.component.js +17 -0
  835. package/lib/components/tooltip/tooltip.style.js +13 -0
  836. package/lib/components/typography/index.js +3 -0
  837. package/lib/components/typography/list.component.js +11 -0
  838. package/lib/components/typography/typography.component.js +36 -0
  839. package/lib/components/vertical-divider/index.js +2 -0
  840. package/lib/components/vertical-divider/vertical-divider.component.js +10 -0
  841. package/lib/components/vertical-divider/vertical-divider.style.js +6 -0
  842. package/lib/hooks/__internal__/useCharacterCount/index.js +2 -0
  843. package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.js +10 -0
  844. package/lib/hooks/__internal__/useClickAwayListener/index.js +2 -0
  845. package/lib/hooks/__internal__/useClickAwayListener/useClickAwayListener.js +4 -0
  846. package/lib/hooks/__internal__/useFloating/index.js +2 -0
  847. package/lib/hooks/__internal__/useFloating/useFloating.js +8 -0
  848. package/lib/hooks/__internal__/useInputAccessibility/index.js +2 -0
  849. package/lib/hooks/__internal__/useInputAccessibility/useInputAccessibility.js +1 -0
  850. package/lib/hooks/__internal__/useIsAboveBreakpoint/index.js +2 -0
  851. package/lib/hooks/__internal__/useIsAboveBreakpoint/useIsAboveBreakpoint.js +3 -0
  852. package/lib/hooks/__internal__/useIsStickyFooterForm/index.js +2 -0
  853. package/lib/hooks/__internal__/useIsStickyFooterForm/useIsStickyFooterForm.js +8 -0
  854. package/lib/hooks/__internal__/useLocale/index.js +2 -0
  855. package/lib/hooks/__internal__/useLocale/useLocale.js +4 -0
  856. package/lib/hooks/__internal__/useMenuKeyboardNavigation/index.js +2 -0
  857. package/lib/hooks/__internal__/useMenuKeyboardNavigation/useMenuKeyboardNavigation.js +23 -2
  858. package/lib/hooks/__internal__/useModalManager/index.js +2 -0
  859. package/lib/hooks/__internal__/useModalManager/useModalManager.js +9 -0
  860. package/lib/hooks/__internal__/usePrevious/index.js +2 -0
  861. package/lib/hooks/__internal__/useResizeObserver/index.js +2 -0
  862. package/lib/hooks/__internal__/useResizeObserver/useResizeObserver.js +10 -3
  863. package/lib/hooks/__internal__/useScrollBlock/index.js +2 -0
  864. package/lib/hooks/__internal__/useScrollBlock/scroll-block-manager.js +17 -6
  865. package/lib/hooks/__internal__/useScrollBlock/useScrollBlock.js +18 -8
  866. package/lib/hooks/useMediaQuery/index.js +2 -0
  867. package/lib/hooks/useMediaQuery/useMediaQuery.js +8 -0
  868. package/lib/locales/date-fns-locales/index.js +2 -0
  869. package/lib/locales/en-gb.js +9 -1
  870. package/lib/locales/index.js +3 -0
  871. package/lib/locales/pl-pl.js +9 -1
  872. package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +5 -1
  873. package/lib/style/design-tokens/carbon-scoped-tokens-provider/index.js +2 -0
  874. package/lib/style/design-tokens/debug-theme.util.js +12 -5
  875. package/lib/style/design-tokens/generate-css-variables.util.js +2 -0
  876. package/lib/style/global-style.js +2 -0
  877. package/lib/style/palette/index.js +9 -2
  878. package/lib/style/themes/aegean/aegean-theme.config.js +5 -0
  879. package/lib/style/themes/aegean/index.js +5 -0
  880. package/lib/style/themes/base/base-theme.config.js +9 -2
  881. package/lib/style/themes/base/index.js +12 -4
  882. package/lib/style/themes/index.js +7 -0
  883. package/lib/style/themes/medium/index.js +3 -0
  884. package/lib/style/themes/mint/index.js +5 -0
  885. package/lib/style/themes/mint/mint-theme.config.js +5 -0
  886. package/lib/style/themes/none/index.js +5 -0
  887. package/lib/style/themes/none/none-theme.config.js +2 -0
  888. package/lib/style/themes/sage/index.js +6 -4
  889. package/lib/style/themes/small/index.js +3 -0
  890. package/lib/style/themes/test-utils.js +6 -4
  891. package/lib/style/utils/add-hex-symbols.js +3 -0
  892. package/lib/style/utils/at-opacity.js +3 -0
  893. package/lib/style/utils/color.js +14 -3
  894. package/lib/style/utils/filter-out-position-props.js +4 -0
  895. package/lib/style/utils/filter-out-styled-system-spacing-props.js +4 -0
  896. package/lib/style/utils/filter-styled-system-margin-props.js +4 -0
  897. package/lib/style/utils/filter-styled-system-padding-props.js +5 -2
  898. package/lib/style/utils/form-style-utils.js +18 -0
  899. package/lib/style/utils/get-color-value.js +5 -0
  900. package/lib/style/utils/get-rgb-values.js +2 -1
  901. package/lib/style/utils/index.js +4 -0
  902. package/lib/style/utils/merge-deep.js +7 -1
  903. package/lib/style/utils/mix.js +9 -1
  904. package/lib/style/utils/shade.js +4 -0
  905. package/lib/style/utils/tint.js +4 -0
  906. package/lib/style/utils/width.js +4 -0
  907. package/package.json +1 -1
  908. package/esm/__internal__/radio-button-mapper/radio-button-mapper.d.ts +0 -20
  909. package/esm/components/radio-button/radio-button-group.d.ts +0 -42
  910. package/esm/components/radio-button/radio-button.d.ts +0 -30
  911. package/lib/__internal__/radio-button-mapper/radio-button-mapper.d.ts +0 -20
  912. package/lib/components/radio-button/radio-button-group.d.ts +0 -42
  913. package/lib/components/radio-button/radio-button.d.ts +0 -30
@@ -1,6 +1,4 @@
1
- export {
2
- default,
3
- default as RadioButton,
4
- PrivateRadioButton,
5
- } from "./radio-button";
6
- export { default as RadioButtonGroup } from "./radio-button-group";
1
+ import RadioButton from "./radio-button.component";
2
+ import RadioButtonGroup from "./radio-button-group.component";
3
+ export { RadioButton, RadioButtonGroup };
4
+ export default RadioButton;
@@ -9,12 +9,6 @@ Object.defineProperty(exports, "RadioButton", {
9
9
  return _radioButton.default;
10
10
  }
11
11
  });
12
- Object.defineProperty(exports, "PrivateRadioButton", {
13
- enumerable: true,
14
- get: function () {
15
- return _radioButton.PrivateRadioButton;
16
- }
17
- });
18
12
  Object.defineProperty(exports, "RadioButtonGroup", {
19
13
  enumerable: true,
20
14
  get: function () {
@@ -22,10 +16,12 @@ Object.defineProperty(exports, "RadioButtonGroup", {
22
16
  }
23
17
  });
24
18
  exports.default = void 0;
25
- var _radioButton = _interopRequireWildcard(require("./radio-button.component"));
19
+
20
+ var _radioButton = _interopRequireDefault(require("./radio-button.component"));
21
+
26
22
  var _radioButtonGroup = _interopRequireDefault(require("./radio-button-group.component"));
23
+
27
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
28
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
29
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
+
30
26
  var _default = _radioButton.default;
31
27
  exports.default = _default;
@@ -0,0 +1,42 @@
1
+ import React from "react";
2
+ import { MarginProps } from "styled-system";
3
+ import { ValidationProps } from "../../__internal__/validations";
4
+ export interface RadioButtonGroupProps extends ValidationProps, MarginProps {
5
+ /** Breakpoint for adaptive legend (inline labels change to top aligned). Enables the adaptive behaviour when set */
6
+ adaptiveLegendBreakpoint?: number;
7
+ /** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
8
+ adaptiveSpacingBreakpoint?: number;
9
+ /** The RadioButton objects to be rendered in the group */
10
+ children: React.ReactNode;
11
+ /** When true, RadioButtons are in line */
12
+ inline?: boolean;
13
+ /** Spacing between labels and radio buttons, given number will be multiplied by base spacing unit (8) */
14
+ labelSpacing?: 1 | 2;
15
+ /** The content for the RadioGroup Legend */
16
+ legend?: string;
17
+ /** Text alignment of legend when inline */
18
+ legendAlign?: "left" | "right";
19
+ /** When true, legend is placed in line with the radiobuttons */
20
+ legendInline?: boolean;
21
+ /** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
22
+ legendSpacing?: 1 | 2;
23
+ /** Percentage width of legend (only when legend is inline) */
24
+ legendWidth?: number;
25
+ /** Specifies the name prop to be applied to each button in the group */
26
+ name: string;
27
+ /** Callback fired when each RadioButton is blurred */
28
+ onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
29
+ /** Callback fired when the user selects a RadioButton */
30
+ onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
31
+ /** Flag to configure component as mandatory */
32
+ required?: boolean;
33
+ /** value of the selected RadioButton */
34
+ value?: string;
35
+ /** Overrides the default tooltip position */
36
+ tooltipPosition?: "top" | "bottom" | "left" | "right";
37
+ }
38
+ export declare const RadioButtonGroup: {
39
+ (props: RadioButtonGroupProps): JSX.Element;
40
+ displayName: string;
41
+ };
42
+ export default RadioButtonGroup;
@@ -3,20 +3,30 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = exports.RadioButtonGroup = void 0;
7
+
7
8
  var _react = _interopRequireDefault(require("react"));
9
+
8
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _propTypes2 = _interopRequireDefault(require("@styled-system/prop-types"));
11
+
10
12
  var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tags/tags"));
13
+
11
14
  var _fieldset = _interopRequireDefault(require("../../__internal__/fieldset"));
15
+
12
16
  var _radioButtonGroup = _interopRequireDefault(require("./radio-button-group.style"));
17
+
13
18
  var _radioButtonMapper = _interopRequireDefault(require("../../__internal__/radio-button-mapper/radio-button-mapper.component"));
19
+
14
20
  var _useIsAboveBreakpoint = _interopRequireDefault(require("../../hooks/__internal__/useIsAboveBreakpoint"));
21
+
15
22
  var _utils = require("../../style/utils");
23
+
16
24
  var _tooltipProvider = require("../../__internal__/tooltip-provider");
25
+
17
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+
18
28
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
- const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
29
+
20
30
  const RadioButtonGroup = props => {
21
31
  const {
22
32
  children,
@@ -43,13 +53,17 @@ const RadioButtonGroup = props => {
43
53
  const isAboveLegendBreakpoint = (0, _useIsAboveBreakpoint.default)(adaptiveLegendBreakpoint);
44
54
  const isAboveSpacingBreakpoint = (0, _useIsAboveBreakpoint.default)(adaptiveSpacingBreakpoint);
45
55
  let inlineLegend = legendInline;
56
+
46
57
  if (adaptiveLegendBreakpoint) {
47
- inlineLegend = isAboveLegendBreakpoint;
58
+ inlineLegend = !!isAboveLegendBreakpoint;
48
59
  }
60
+
49
61
  let marginLeft = marginProps.ml;
62
+
50
63
  if (adaptiveSpacingBreakpoint && !isAboveSpacingBreakpoint) {
51
64
  marginLeft = undefined;
52
65
  }
66
+
53
67
  return /*#__PURE__*/_react.default.createElement(_tooltipProvider.TooltipProvider, {
54
68
  tooltipPosition: tooltipPosition
55
69
  }, /*#__PURE__*/_react.default.createElement(_fieldset.default, _extends({
@@ -76,6 +90,10 @@ const RadioButtonGroup = props => {
76
90
  onChange: onChange,
77
91
  value: value
78
92
  }, _react.default.Children.map(children, child => {
93
+ if (! /*#__PURE__*/_react.default.isValidElement(child)) {
94
+ return child;
95
+ }
96
+
79
97
  return /*#__PURE__*/_react.default.cloneElement(child, {
80
98
  inline,
81
99
  labelSpacing,
@@ -87,52 +105,183 @@ const RadioButtonGroup = props => {
87
105
  });
88
106
  })))));
89
107
  };
108
+
109
+ exports.RadioButtonGroup = RadioButtonGroup;
90
110
  RadioButtonGroup.propTypes = {
91
- ...marginPropTypes,
92
- /** The RadioButton objects to be rendered in the group */
93
- children: _propTypes.default.node.isRequired,
94
- /** Specifies the name prop to be applied to each button in the group */
95
- name: _propTypes.default.string.isRequired,
96
- /** The content for the RadioGroup Legend */
97
- legend: _propTypes.default.string,
98
- /** Indicate that error has occurred
99
- Pass string to display icon, tooltip and red border
100
- Pass true boolean to only display red border */
101
- error: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
102
- /** Indicate that warning has occurred
103
- Pass string to display icon, tooltip and orange border
104
- Pass true boolean to only display orange border */
105
- warning: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
106
- /** Indicate additional information
107
- Pass string to display icon, tooltip and blue border
108
- Pass true boolean to only display blue border */
109
- info: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
110
- /** Callback fired when each RadioButton is blurred */
111
- onBlur: _propTypes.default.func,
112
- /** Callback fired when the user selects a RadioButton */
113
- onChange: _propTypes.default.func,
114
- /** value of the selected RadioButton */
115
- value: _propTypes.default.string,
116
- /** When true, RadioButtons are in line */
117
- inline: _propTypes.default.bool,
118
- /** When true, legend is placed in line with the radiobuttons */
119
- legendInline: _propTypes.default.bool,
120
- /** Percentage width of legend (only when legend is inline) */
121
- legendWidth: _propTypes.default.number,
122
- /** Text alignment of legend when inline */
123
- legendAlign: _propTypes.default.oneOf(["left", "right"]),
124
- /** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
125
- legendSpacing: _propTypes.default.oneOf([1, 2]),
126
- /** Spacing between labels and radio buttons, given number will be multiplied by base spacing unit (8) */
127
- labelSpacing: _propTypes.default.oneOf([1, 2]),
128
- /** Breakpoint for adaptive legend (inline labels change to top aligned). Enables the adaptive behaviour when set */
129
- adaptiveLegendBreakpoint: _propTypes.default.number,
130
- /** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */
131
- adaptiveSpacingBreakpoint: _propTypes.default.number,
132
- /** Flag to configure component as mandatory */
133
- required: _propTypes.default.bool,
134
- /** Overrides the default tooltip position */
135
- tooltipPosition: _propTypes.default.oneOf(["top", "bottom", "left", "right"])
111
+ "adaptiveLegendBreakpoint": _propTypes.default.number,
112
+ "adaptiveSpacingBreakpoint": _propTypes.default.number,
113
+ "children": _propTypes.default.node,
114
+ "error": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
115
+ "info": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool]),
116
+ "inline": _propTypes.default.bool,
117
+ "labelSpacing": _propTypes.default.oneOf([1, 2]),
118
+ "legend": _propTypes.default.string,
119
+ "legendAlign": _propTypes.default.oneOf(["left", "right"]),
120
+ "legendInline": _propTypes.default.bool,
121
+ "legendSpacing": _propTypes.default.oneOf([1, 2]),
122
+ "legendWidth": _propTypes.default.number,
123
+ "m": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
124
+ "__@toStringTag": _propTypes.default.string.isRequired,
125
+ "description": _propTypes.default.string,
126
+ "toString": _propTypes.default.func.isRequired,
127
+ "valueOf": _propTypes.default.func.isRequired
128
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
129
+ "__@toStringTag": _propTypes.default.string.isRequired,
130
+ "description": _propTypes.default.string,
131
+ "toString": _propTypes.default.func.isRequired,
132
+ "valueOf": _propTypes.default.func.isRequired
133
+ }), _propTypes.default.string]),
134
+ "margin": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
135
+ "__@toStringTag": _propTypes.default.string.isRequired,
136
+ "description": _propTypes.default.string,
137
+ "toString": _propTypes.default.func.isRequired,
138
+ "valueOf": _propTypes.default.func.isRequired
139
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
140
+ "__@toStringTag": _propTypes.default.string.isRequired,
141
+ "description": _propTypes.default.string,
142
+ "toString": _propTypes.default.func.isRequired,
143
+ "valueOf": _propTypes.default.func.isRequired
144
+ }), _propTypes.default.string]),
145
+ "marginBottom": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
146
+ "__@toStringTag": _propTypes.default.string.isRequired,
147
+ "description": _propTypes.default.string,
148
+ "toString": _propTypes.default.func.isRequired,
149
+ "valueOf": _propTypes.default.func.isRequired
150
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
151
+ "__@toStringTag": _propTypes.default.string.isRequired,
152
+ "description": _propTypes.default.string,
153
+ "toString": _propTypes.default.func.isRequired,
154
+ "valueOf": _propTypes.default.func.isRequired
155
+ }), _propTypes.default.string]),
156
+ "marginLeft": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
157
+ "__@toStringTag": _propTypes.default.string.isRequired,
158
+ "description": _propTypes.default.string,
159
+ "toString": _propTypes.default.func.isRequired,
160
+ "valueOf": _propTypes.default.func.isRequired
161
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
162
+ "__@toStringTag": _propTypes.default.string.isRequired,
163
+ "description": _propTypes.default.string,
164
+ "toString": _propTypes.default.func.isRequired,
165
+ "valueOf": _propTypes.default.func.isRequired
166
+ }), _propTypes.default.string]),
167
+ "marginRight": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
168
+ "__@toStringTag": _propTypes.default.string.isRequired,
169
+ "description": _propTypes.default.string,
170
+ "toString": _propTypes.default.func.isRequired,
171
+ "valueOf": _propTypes.default.func.isRequired
172
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
173
+ "__@toStringTag": _propTypes.default.string.isRequired,
174
+ "description": _propTypes.default.string,
175
+ "toString": _propTypes.default.func.isRequired,
176
+ "valueOf": _propTypes.default.func.isRequired
177
+ }), _propTypes.default.string]),
178
+ "marginTop": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
179
+ "__@toStringTag": _propTypes.default.string.isRequired,
180
+ "description": _propTypes.default.string,
181
+ "toString": _propTypes.default.func.isRequired,
182
+ "valueOf": _propTypes.default.func.isRequired
183
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
184
+ "__@toStringTag": _propTypes.default.string.isRequired,
185
+ "description": _propTypes.default.string,
186
+ "toString": _propTypes.default.func.isRequired,
187
+ "valueOf": _propTypes.default.func.isRequired
188
+ }), _propTypes.default.string]),
189
+ "marginX": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
190
+ "__@toStringTag": _propTypes.default.string.isRequired,
191
+ "description": _propTypes.default.string,
192
+ "toString": _propTypes.default.func.isRequired,
193
+ "valueOf": _propTypes.default.func.isRequired
194
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
195
+ "__@toStringTag": _propTypes.default.string.isRequired,
196
+ "description": _propTypes.default.string,
197
+ "toString": _propTypes.default.func.isRequired,
198
+ "valueOf": _propTypes.default.func.isRequired
199
+ }), _propTypes.default.string]),
200
+ "marginY": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
201
+ "__@toStringTag": _propTypes.default.string.isRequired,
202
+ "description": _propTypes.default.string,
203
+ "toString": _propTypes.default.func.isRequired,
204
+ "valueOf": _propTypes.default.func.isRequired
205
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
206
+ "__@toStringTag": _propTypes.default.string.isRequired,
207
+ "description": _propTypes.default.string,
208
+ "toString": _propTypes.default.func.isRequired,
209
+ "valueOf": _propTypes.default.func.isRequired
210
+ }), _propTypes.default.string]),
211
+ "mb": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
212
+ "__@toStringTag": _propTypes.default.string.isRequired,
213
+ "description": _propTypes.default.string,
214
+ "toString": _propTypes.default.func.isRequired,
215
+ "valueOf": _propTypes.default.func.isRequired
216
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
217
+ "__@toStringTag": _propTypes.default.string.isRequired,
218
+ "description": _propTypes.default.string,
219
+ "toString": _propTypes.default.func.isRequired,
220
+ "valueOf": _propTypes.default.func.isRequired
221
+ }), _propTypes.default.string]),
222
+ "ml": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
223
+ "__@toStringTag": _propTypes.default.string.isRequired,
224
+ "description": _propTypes.default.string,
225
+ "toString": _propTypes.default.func.isRequired,
226
+ "valueOf": _propTypes.default.func.isRequired
227
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
228
+ "__@toStringTag": _propTypes.default.string.isRequired,
229
+ "description": _propTypes.default.string,
230
+ "toString": _propTypes.default.func.isRequired,
231
+ "valueOf": _propTypes.default.func.isRequired
232
+ }), _propTypes.default.string]),
233
+ "mr": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
234
+ "__@toStringTag": _propTypes.default.string.isRequired,
235
+ "description": _propTypes.default.string,
236
+ "toString": _propTypes.default.func.isRequired,
237
+ "valueOf": _propTypes.default.func.isRequired
238
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
239
+ "__@toStringTag": _propTypes.default.string.isRequired,
240
+ "description": _propTypes.default.string,
241
+ "toString": _propTypes.default.func.isRequired,
242
+ "valueOf": _propTypes.default.func.isRequired
243
+ }), _propTypes.default.string]),
244
+ "mt": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
245
+ "__@toStringTag": _propTypes.default.string.isRequired,
246
+ "description": _propTypes.default.string,
247
+ "toString": _propTypes.default.func.isRequired,
248
+ "valueOf": _propTypes.default.func.isRequired
249
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
250
+ "__@toStringTag": _propTypes.default.string.isRequired,
251
+ "description": _propTypes.default.string,
252
+ "toString": _propTypes.default.func.isRequired,
253
+ "valueOf": _propTypes.default.func.isRequired
254
+ }), _propTypes.default.string]),
255
+ "mx": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
256
+ "__@toStringTag": _propTypes.default.string.isRequired,
257
+ "description": _propTypes.default.string,
258
+ "toString": _propTypes.default.func.isRequired,
259
+ "valueOf": _propTypes.default.func.isRequired
260
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
261
+ "__@toStringTag": _propTypes.default.string.isRequired,
262
+ "description": _propTypes.default.string,
263
+ "toString": _propTypes.default.func.isRequired,
264
+ "valueOf": _propTypes.default.func.isRequired
265
+ }), _propTypes.default.string]),
266
+ "my": _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.number, _propTypes.default.shape({
267
+ "__@toStringTag": _propTypes.default.string.isRequired,
268
+ "description": _propTypes.default.string,
269
+ "toString": _propTypes.default.func.isRequired,
270
+ "valueOf": _propTypes.default.func.isRequired
271
+ }), _propTypes.default.string])), _propTypes.default.number, _propTypes.default.object, _propTypes.default.shape({
272
+ "__@toStringTag": _propTypes.default.string.isRequired,
273
+ "description": _propTypes.default.string,
274
+ "toString": _propTypes.default.func.isRequired,
275
+ "valueOf": _propTypes.default.func.isRequired
276
+ }), _propTypes.default.string]),
277
+ "name": _propTypes.default.string.isRequired,
278
+ "onBlur": _propTypes.default.func,
279
+ "onChange": _propTypes.default.func,
280
+ "required": _propTypes.default.bool,
281
+ "tooltipPosition": _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
282
+ "value": _propTypes.default.string,
283
+ "warning": _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.bool])
136
284
  };
285
+ RadioButtonGroup.displayName = "RadioButtonGroup";
137
286
  var _default = RadioButtonGroup;
138
287
  exports.default = _default;
@@ -0,0 +1,5 @@
1
+ declare const RadioButtonGroupStyle: import("styled-components").StyledComponent<"div", any, {
2
+ inline?: boolean | undefined;
3
+ legendInline?: boolean | undefined;
4
+ }, never>;
5
+ export default RadioButtonGroupStyle;
@@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
7
8
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
9
+
8
10
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
11
+
9
12
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+
10
14
  const RadioButtonGroupStyle = _styledComponents.default.div`
11
15
  ${({
12
16
  inline,
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const _default: React.MemoExoticComponent<() => JSX.Element>;
3
+ export default _default;
@@ -4,9 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
7
8
  var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
8
12
  var _checkableInputSvgWrapper = _interopRequireDefault(require("../../__internal__/checkable-input/checkable-input-svg-wrapper.style"));
13
+
9
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+
10
16
  const RadioButtonSvg = () => {
11
17
  return /*#__PURE__*/_react.default.createElement(_checkableInputSvgWrapper.default, null, /*#__PURE__*/_react.default.createElement("svg", {
12
18
  focusable: "false",
@@ -24,5 +30,7 @@ const RadioButtonSvg = () => {
24
30
  r: "5"
25
31
  }))));
26
32
  };
33
+
27
34
  var _default = /*#__PURE__*/_react.default.memo(RadioButtonSvg, () => true);
35
+
28
36
  exports.default = _default;
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+ import { MarginProps } from "styled-system";
3
+ import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
4
+ interface InternalRadioButtonProps {
5
+ inline?: boolean;
6
+ required?: boolean;
7
+ }
8
+ export interface RadioButtonProps extends CommonCheckableInputProps, MarginProps {
9
+ /** Identifier used for testing purposes, applied to the root element of the component. */
10
+ "data-component"?: string;
11
+ /** Identifier used for testing purposes, applied to the root element of the component. */
12
+ "data-element"?: string;
13
+ /** Identifier used for testing purposes, applied to the root element of the component. */
14
+ "data-role"?: string;
15
+ /** Text alignment of the label */
16
+ labelAlign?: "left" | "right";
17
+ /** Accepts a callback function which is triggered on click event */
18
+ onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
19
+ /** the value of the Radio Button, passed on form submit */
20
+ value: string;
21
+ /** Overrides the default tooltip position */
22
+ tooltipPosition?: "top" | "bottom" | "left" | "right";
23
+ /** Aria label for rendered help component */
24
+ helpAriaLabel?: string;
25
+ }
26
+ export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>;
27
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>>;
28
+ export default _default;