carbon-react 150.1.0 → 151.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/esm/__internal__/form-field/form-field.component.d.ts +2 -0
  2. package/esm/__internal__/utils/helpers/tags/tags.d.ts +11 -3
  3. package/esm/components/accordion/accordion-group/accordion-group.component.d.ts +1 -1
  4. package/esm/components/accordion/accordion-group/accordion-group.component.js +2 -3
  5. package/esm/components/accordion/accordion.component.d.ts +2 -1
  6. package/esm/components/accordion/accordion.component.js +4 -3
  7. package/esm/components/action-popover/action-popover.component.d.ts +2 -1
  8. package/esm/components/action-popover/action-popover.component.js +4 -3
  9. package/esm/components/advanced-color-picker/advanced-color-picker.component.d.ts +3 -2
  10. package/esm/components/advanced-color-picker/advanced-color-picker.component.js +2 -3
  11. package/esm/components/alert/alert.component.d.ts +1 -1
  12. package/esm/components/alert/alert.component.js +3 -2
  13. package/esm/components/anchor-navigation/anchor-navigation.component.d.ts +1 -1
  14. package/esm/components/badge/badge.component.d.ts +3 -2
  15. package/esm/components/badge/badge.component.js +5 -2
  16. package/esm/components/batch-selection/batch-selection.component.d.ts +3 -2
  17. package/esm/components/batch-selection/batch-selection.component.js +5 -2
  18. package/esm/components/box/box.component.d.ts +2 -0
  19. package/esm/components/breadcrumbs/breadcrumbs.component.js +2 -4
  20. package/esm/components/breadcrumbs/crumb/crumb.component.js +1 -2
  21. package/esm/components/button/button.component.js +0 -1
  22. package/esm/components/button-bar/button-bar.component.d.ts +2 -1
  23. package/esm/components/button-bar/button-bar.component.js +2 -1
  24. package/esm/components/button-minor/button-minor.component.js +0 -1
  25. package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +3 -1
  26. package/esm/components/button-toggle/button-toggle-group/button-toggle-group.component.js +2 -10
  27. package/esm/components/button-toggle/button-toggle.component.d.ts +4 -7
  28. package/esm/components/checkbox/checkbox-group/checkbox-group.component.d.ts +2 -1
  29. package/esm/components/checkbox/checkbox-group/checkbox-group.component.js +1 -1
  30. package/esm/components/checkbox/checkbox.component.d.ts +2 -7
  31. package/esm/components/checkbox/checkbox.component.js +7 -7
  32. package/esm/components/confirm/confirm.component.d.ts +1 -1
  33. package/esm/components/confirm/confirm.component.js +3 -2
  34. package/esm/components/content/content.component.d.ts +2 -1
  35. package/esm/components/content/content.component.js +2 -3
  36. package/esm/components/date/date.component.d.ts +1 -1
  37. package/esm/components/date/date.component.js +7 -7
  38. package/esm/components/decimal/decimal.component.d.ts +1 -1
  39. package/esm/components/decimal/decimal.component.js +2 -2
  40. package/esm/components/definition-list/dd/dd.component.d.ts +2 -1
  41. package/esm/components/definition-list/dd/dd.component.js +2 -1
  42. package/esm/components/definition-list/dl.component.d.ts +2 -1
  43. package/esm/components/definition-list/dl.component.js +2 -3
  44. package/esm/components/definition-list/dt/dt.component.d.ts +2 -1
  45. package/esm/components/definition-list/dt/dt.component.js +2 -1
  46. package/esm/components/dialog/dialog.component.d.ts +2 -0
  47. package/esm/components/dialog-full-screen/dialog-full-screen.component.js +1 -6
  48. package/esm/components/dismissible-box/dismissible-box.component.d.ts +1 -1
  49. package/esm/components/dismissible-box/dismissible-box.component.js +1 -2
  50. package/esm/components/draggable/__internal__/drop-target.component.d.ts +1 -1
  51. package/esm/components/draggable/__internal__/drop-target.component.js +3 -7
  52. package/esm/components/draggable/draggable-container.component.d.ts +1 -1
  53. package/esm/components/draggable/draggable-item/draggable-item.component.d.ts +3 -2
  54. package/esm/components/draggable/draggable-item/draggable-item.component.js +9 -3
  55. package/esm/components/drawer/drawer.component.d.ts +1 -1
  56. package/esm/components/duelling-picklist/duelling-picklist.component.d.ts +2 -1
  57. package/esm/components/duelling-picklist/duelling-picklist.component.js +3 -4
  58. package/esm/components/fieldset/fieldset.component.d.ts +2 -1
  59. package/esm/components/fieldset/fieldset.component.js +2 -2
  60. package/esm/components/file-input/file-input.component.d.ts +1 -1
  61. package/esm/components/flat-table/flat-table-body/flat-table-body.component.d.ts +1 -1
  62. package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.d.ts +1 -1
  63. package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.d.ts +1 -1
  64. package/esm/components/flat-table/flat-table-head/flat-table-head.component.d.ts +1 -1
  65. package/esm/components/flat-table/flat-table-header/flat-table-header.component.d.ts +1 -1
  66. package/esm/components/flat-table/flat-table-row/flat-table-row.component.d.ts +1 -1
  67. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts +1 -1
  68. package/esm/components/flat-table/flat-table.component.d.ts +1 -1
  69. package/esm/components/flat-table/sort/sort.component.d.ts +1 -1
  70. package/esm/components/form/form.component.d.ts +2 -1
  71. package/esm/components/form/form.component.js +2 -1
  72. package/esm/components/global-header/global-header.component.d.ts +2 -1
  73. package/esm/components/grid/grid-container/grid-container.component.d.ts +2 -1
  74. package/esm/components/grid/grid-container/grid-container.component.js +2 -3
  75. package/esm/components/grid/grid-item/grid-item.component.d.ts +2 -1
  76. package/esm/components/grid/grid-item/grid-item.component.js +2 -1
  77. package/esm/components/grouped-character/grouped-character.component.d.ts +1 -1
  78. package/esm/components/grouped-character/grouped-character.component.js +2 -2
  79. package/esm/components/heading/heading.component.js +1 -5
  80. package/esm/components/help/help.component.d.ts +2 -1
  81. package/esm/components/help/help.component.js +5 -4
  82. package/esm/components/hr/hr.component.d.ts +2 -1
  83. package/esm/components/hr/hr.component.js +4 -3
  84. package/esm/components/icon/icon.component.d.ts +1 -1
  85. package/esm/components/icon-button/icon-button.component.d.ts +4 -1
  86. package/esm/components/icon-button/icon-button.component.js +5 -1
  87. package/esm/components/image/image.component.js +2 -1
  88. package/esm/components/image/image.style.d.ts +2 -1
  89. package/esm/components/inline-inputs/inline-inputs.component.d.ts +2 -1
  90. package/esm/components/inline-inputs/inline-inputs.component.js +2 -3
  91. package/esm/components/link/link.component.d.ts +2 -1
  92. package/esm/components/link/link.component.js +2 -0
  93. package/esm/components/link-preview/link-preview.component.d.ts +2 -1
  94. package/esm/components/link-preview/link-preview.component.js +2 -2
  95. package/esm/components/loader-star/loader-star.component.d.ts +1 -1
  96. package/esm/components/menu/menu-divider/menu-divider.component.js +0 -1
  97. package/esm/components/menu/menu-full-screen/menu-full-screen.component.d.ts +1 -1
  98. package/esm/components/menu/menu-item/menu-item.component.d.ts +1 -1
  99. package/esm/components/menu/menu-segment-title/menu-segment-title.component.js +0 -1
  100. package/esm/components/menu/scrollable-block/scrollable-block.component.js +2 -2
  101. package/esm/components/message/message.component.d.ts +2 -1
  102. package/esm/components/message/message.component.js +2 -0
  103. package/esm/components/modal/modal.component.d.ts +1 -1
  104. package/esm/components/navigation-bar/navigation-bar.component.d.ts +2 -1
  105. package/esm/components/navigation-bar/navigation-bar.component.js +4 -2
  106. package/esm/components/note/note.component.d.ts +2 -1
  107. package/esm/components/note/note.component.js +2 -3
  108. package/esm/components/number/number.component.js +2 -1
  109. package/esm/components/numeral-date/numeral-date.component.d.ts +3 -8
  110. package/esm/components/numeral-date/numeral-date.component.js +3 -11
  111. package/esm/components/pager/pager.component.d.ts +2 -1
  112. package/esm/components/pager/pager.component.js +2 -3
  113. package/esm/components/pages/page/page.component.d.ts +2 -1
  114. package/esm/components/pages/pages.component.d.ts +2 -1
  115. package/esm/components/pages/pages.component.js +1 -1
  116. package/esm/components/password/password.component.d.ts +1 -2
  117. package/esm/components/password/password.component.js +2 -2
  118. package/esm/components/pill/pill.component.d.ts +2 -5
  119. package/esm/components/pill/pill.component.js +2 -3
  120. package/esm/components/pod/pod.component.d.ts +2 -5
  121. package/esm/components/pod/pod.component.js +3 -7
  122. package/esm/components/popover-container/popover-container.component.d.ts +1 -1
  123. package/esm/components/popover-container/popover-container.component.js +4 -4
  124. package/esm/components/portrait/portrait.component.d.ts +1 -1
  125. package/esm/components/preview/preview.component.d.ts +2 -1
  126. package/esm/components/preview/preview.component.js +2 -2
  127. package/esm/components/profile/profile.component.d.ts +2 -1
  128. package/esm/components/progress-tracker/progress-tracker.component.d.ts +2 -1
  129. package/esm/components/radio-button/radio-button-group/radio-button-group.component.d.ts +2 -1
  130. package/esm/components/radio-button/radio-button.component.d.ts +2 -7
  131. package/esm/components/radio-button/radio-button.component.js +7 -7
  132. package/esm/components/search/search.component.d.ts +2 -1
  133. package/esm/components/search/search.component.js +4 -3
  134. package/esm/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -1
  135. package/esm/components/select/__internal__/select-textbox/select-textbox.component.js +0 -1
  136. package/esm/components/select/filterable-select/filterable-select.component.d.ts +0 -6
  137. package/esm/components/select/filterable-select/filterable-select.component.js +3 -4
  138. package/esm/components/select/multi-select/multi-select.component.d.ts +0 -6
  139. package/esm/components/select/multi-select/multi-select.component.js +3 -4
  140. package/esm/components/select/option/option.component.d.ts +1 -1
  141. package/esm/components/select/option-group-header/option-group-header.component.d.ts +1 -1
  142. package/esm/components/select/option-row/option-row.component.d.ts +1 -1
  143. package/esm/components/select/simple-select/simple-select.component.d.ts +0 -6
  144. package/esm/components/select/simple-select/simple-select.component.js +3 -4
  145. package/esm/components/settings-row/settings-row.component.d.ts +2 -1
  146. package/esm/components/sidebar/sidebar.component.d.ts +2 -2
  147. package/esm/components/simple-color-picker/simple-color-picker.component.d.ts +2 -1
  148. package/esm/components/simple-color-picker/simple-color-picker.component.js +2 -0
  149. package/esm/components/split-button/split-button.component.d.ts +2 -5
  150. package/esm/components/step-flow/step-flow.component.js +0 -1
  151. package/esm/components/step-sequence/step-sequence-item/step-sequence-item.component.d.ts +2 -1
  152. package/esm/components/step-sequence/step-sequence-item/step-sequence-item.component.js +2 -2
  153. package/esm/components/step-sequence/step-sequence.component.d.ts +2 -1
  154. package/esm/components/step-sequence/step-sequence.component.js +2 -2
  155. package/esm/components/switch/switch.component.d.ts +2 -7
  156. package/esm/components/switch/switch.component.js +4 -5
  157. package/esm/components/tabs/tab/tab.component.d.ts +2 -1
  158. package/esm/components/tabs/tab/tab.component.js +1 -1
  159. package/esm/components/tabs/tabs.component.d.ts +2 -1
  160. package/esm/components/tabs/tabs.component.js +2 -3
  161. package/esm/components/textarea/textarea.component.d.ts +2 -7
  162. package/esm/components/textarea/textarea.component.js +5 -6
  163. package/esm/components/textbox/textbox.component.d.ts +4 -7
  164. package/esm/components/tile/flex-tile-divider/flex-tile-divider.component.js +1 -0
  165. package/esm/components/tile-select/tile-select-group/tile-select-group.component.d.ts +2 -1
  166. package/esm/components/tile-select/tile-select.component.d.ts +2 -1
  167. package/esm/components/tile-select/tile-select.component.js +8 -1
  168. package/esm/components/time/__internal__/time-toggle/time-toggle.component.d.ts +4 -4
  169. package/esm/components/time/time.component.d.ts +2 -2
  170. package/esm/components/toast/toast.component.d.ts +1 -3
  171. package/esm/components/toast/toast.component.js +3 -2
  172. package/esm/components/tooltip/tooltip.component.d.ts +2 -1
  173. package/esm/components/tooltip/tooltip.component.js +2 -0
  174. package/esm/components/typography/typography.component.d.ts +2 -0
  175. package/esm/components/vertical-divider/vertical-divider.component.d.ts +2 -1
  176. package/esm/components/vertical-divider/vertical-divider.component.js +4 -2
  177. package/lib/__internal__/form-field/form-field.component.d.ts +2 -0
  178. package/lib/__internal__/utils/helpers/tags/tags.d.ts +11 -3
  179. package/lib/components/accordion/accordion-group/accordion-group.component.d.ts +1 -1
  180. package/lib/components/accordion/accordion-group/accordion-group.component.js +2 -3
  181. package/lib/components/accordion/accordion.component.d.ts +2 -1
  182. package/lib/components/accordion/accordion.component.js +4 -3
  183. package/lib/components/action-popover/action-popover.component.d.ts +2 -1
  184. package/lib/components/action-popover/action-popover.component.js +4 -3
  185. package/lib/components/advanced-color-picker/advanced-color-picker.component.d.ts +3 -2
  186. package/lib/components/advanced-color-picker/advanced-color-picker.component.js +2 -3
  187. package/lib/components/alert/alert.component.d.ts +1 -1
  188. package/lib/components/alert/alert.component.js +3 -2
  189. package/lib/components/anchor-navigation/anchor-navigation.component.d.ts +1 -1
  190. package/lib/components/badge/badge.component.d.ts +3 -2
  191. package/lib/components/badge/badge.component.js +5 -2
  192. package/lib/components/batch-selection/batch-selection.component.d.ts +3 -2
  193. package/lib/components/batch-selection/batch-selection.component.js +5 -2
  194. package/lib/components/box/box.component.d.ts +2 -0
  195. package/lib/components/breadcrumbs/breadcrumbs.component.js +2 -4
  196. package/lib/components/breadcrumbs/crumb/crumb.component.js +1 -2
  197. package/lib/components/button/button.component.js +0 -1
  198. package/lib/components/button-bar/button-bar.component.d.ts +2 -1
  199. package/lib/components/button-bar/button-bar.component.js +2 -1
  200. package/lib/components/button-minor/button-minor.component.js +0 -1
  201. package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.d.ts +3 -1
  202. package/lib/components/button-toggle/button-toggle-group/button-toggle-group.component.js +2 -10
  203. package/lib/components/button-toggle/button-toggle.component.d.ts +4 -7
  204. package/lib/components/checkbox/checkbox-group/checkbox-group.component.d.ts +2 -1
  205. package/lib/components/checkbox/checkbox-group/checkbox-group.component.js +1 -1
  206. package/lib/components/checkbox/checkbox.component.d.ts +2 -7
  207. package/lib/components/checkbox/checkbox.component.js +7 -7
  208. package/lib/components/confirm/confirm.component.d.ts +1 -1
  209. package/lib/components/confirm/confirm.component.js +3 -2
  210. package/lib/components/content/content.component.d.ts +2 -1
  211. package/lib/components/content/content.component.js +2 -3
  212. package/lib/components/date/date.component.d.ts +1 -1
  213. package/lib/components/date/date.component.js +7 -7
  214. package/lib/components/decimal/decimal.component.d.ts +1 -1
  215. package/lib/components/decimal/decimal.component.js +2 -2
  216. package/lib/components/definition-list/dd/dd.component.d.ts +2 -1
  217. package/lib/components/definition-list/dd/dd.component.js +2 -1
  218. package/lib/components/definition-list/dl.component.d.ts +2 -1
  219. package/lib/components/definition-list/dl.component.js +2 -3
  220. package/lib/components/definition-list/dt/dt.component.d.ts +2 -1
  221. package/lib/components/definition-list/dt/dt.component.js +2 -1
  222. package/lib/components/dialog/dialog.component.d.ts +2 -0
  223. package/lib/components/dialog-full-screen/dialog-full-screen.component.js +1 -6
  224. package/lib/components/dismissible-box/dismissible-box.component.d.ts +1 -1
  225. package/lib/components/dismissible-box/dismissible-box.component.js +1 -2
  226. package/lib/components/draggable/__internal__/drop-target.component.d.ts +1 -1
  227. package/lib/components/draggable/__internal__/drop-target.component.js +3 -7
  228. package/lib/components/draggable/draggable-container.component.d.ts +1 -1
  229. package/lib/components/draggable/draggable-item/draggable-item.component.d.ts +3 -2
  230. package/lib/components/draggable/draggable-item/draggable-item.component.js +9 -3
  231. package/lib/components/drawer/drawer.component.d.ts +1 -1
  232. package/lib/components/duelling-picklist/duelling-picklist.component.d.ts +2 -1
  233. package/lib/components/duelling-picklist/duelling-picklist.component.js +3 -4
  234. package/lib/components/fieldset/fieldset.component.d.ts +2 -1
  235. package/lib/components/fieldset/fieldset.component.js +2 -2
  236. package/lib/components/file-input/file-input.component.d.ts +1 -1
  237. package/lib/components/flat-table/flat-table-body/flat-table-body.component.d.ts +1 -1
  238. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.component.d.ts +1 -1
  239. package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.d.ts +1 -1
  240. package/lib/components/flat-table/flat-table-head/flat-table-head.component.d.ts +1 -1
  241. package/lib/components/flat-table/flat-table-header/flat-table-header.component.d.ts +1 -1
  242. package/lib/components/flat-table/flat-table-row/flat-table-row.component.d.ts +1 -1
  243. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts +1 -1
  244. package/lib/components/flat-table/flat-table.component.d.ts +1 -1
  245. package/lib/components/flat-table/sort/sort.component.d.ts +1 -1
  246. package/lib/components/form/form.component.d.ts +2 -1
  247. package/lib/components/form/form.component.js +2 -1
  248. package/lib/components/global-header/global-header.component.d.ts +2 -1
  249. package/lib/components/grid/grid-container/grid-container.component.d.ts +2 -1
  250. package/lib/components/grid/grid-container/grid-container.component.js +2 -3
  251. package/lib/components/grid/grid-item/grid-item.component.d.ts +2 -1
  252. package/lib/components/grid/grid-item/grid-item.component.js +2 -1
  253. package/lib/components/grouped-character/grouped-character.component.d.ts +1 -1
  254. package/lib/components/grouped-character/grouped-character.component.js +2 -2
  255. package/lib/components/heading/heading.component.js +1 -5
  256. package/lib/components/help/help.component.d.ts +2 -1
  257. package/lib/components/help/help.component.js +5 -4
  258. package/lib/components/hr/hr.component.d.ts +2 -1
  259. package/lib/components/hr/hr.component.js +4 -3
  260. package/lib/components/icon/icon.component.d.ts +1 -1
  261. package/lib/components/icon-button/icon-button.component.d.ts +4 -1
  262. package/lib/components/icon-button/icon-button.component.js +5 -1
  263. package/lib/components/image/image.component.js +2 -1
  264. package/lib/components/image/image.style.d.ts +2 -1
  265. package/lib/components/inline-inputs/inline-inputs.component.d.ts +2 -1
  266. package/lib/components/inline-inputs/inline-inputs.component.js +2 -3
  267. package/lib/components/link/link.component.d.ts +2 -1
  268. package/lib/components/link/link.component.js +2 -0
  269. package/lib/components/link-preview/link-preview.component.d.ts +2 -1
  270. package/lib/components/link-preview/link-preview.component.js +2 -2
  271. package/lib/components/loader-star/loader-star.component.d.ts +1 -1
  272. package/lib/components/menu/menu-divider/menu-divider.component.js +0 -1
  273. package/lib/components/menu/menu-full-screen/menu-full-screen.component.d.ts +1 -1
  274. package/lib/components/menu/menu-item/menu-item.component.d.ts +1 -1
  275. package/lib/components/menu/menu-segment-title/menu-segment-title.component.js +0 -1
  276. package/lib/components/menu/scrollable-block/scrollable-block.component.js +2 -2
  277. package/lib/components/message/message.component.d.ts +2 -1
  278. package/lib/components/message/message.component.js +2 -0
  279. package/lib/components/modal/modal.component.d.ts +1 -1
  280. package/lib/components/navigation-bar/navigation-bar.component.d.ts +2 -1
  281. package/lib/components/navigation-bar/navigation-bar.component.js +4 -2
  282. package/lib/components/note/note.component.d.ts +2 -1
  283. package/lib/components/note/note.component.js +2 -3
  284. package/lib/components/number/number.component.js +2 -1
  285. package/lib/components/numeral-date/numeral-date.component.d.ts +3 -8
  286. package/lib/components/numeral-date/numeral-date.component.js +3 -11
  287. package/lib/components/pager/pager.component.d.ts +2 -1
  288. package/lib/components/pager/pager.component.js +2 -3
  289. package/lib/components/pages/page/page.component.d.ts +2 -1
  290. package/lib/components/pages/pages.component.d.ts +2 -1
  291. package/lib/components/pages/pages.component.js +1 -1
  292. package/lib/components/password/password.component.d.ts +1 -2
  293. package/lib/components/password/password.component.js +2 -2
  294. package/lib/components/pill/pill.component.d.ts +2 -5
  295. package/lib/components/pill/pill.component.js +2 -3
  296. package/lib/components/pod/pod.component.d.ts +2 -5
  297. package/lib/components/pod/pod.component.js +3 -7
  298. package/lib/components/popover-container/popover-container.component.d.ts +1 -1
  299. package/lib/components/popover-container/popover-container.component.js +4 -4
  300. package/lib/components/portrait/portrait.component.d.ts +1 -1
  301. package/lib/components/preview/preview.component.d.ts +2 -1
  302. package/lib/components/preview/preview.component.js +2 -2
  303. package/lib/components/profile/profile.component.d.ts +2 -1
  304. package/lib/components/progress-tracker/progress-tracker.component.d.ts +2 -1
  305. package/lib/components/radio-button/radio-button-group/radio-button-group.component.d.ts +2 -1
  306. package/lib/components/radio-button/radio-button.component.d.ts +2 -7
  307. package/lib/components/radio-button/radio-button.component.js +7 -7
  308. package/lib/components/search/search.component.d.ts +2 -1
  309. package/lib/components/search/search.component.js +4 -3
  310. package/lib/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -1
  311. package/lib/components/select/__internal__/select-textbox/select-textbox.component.js +0 -1
  312. package/lib/components/select/filterable-select/filterable-select.component.d.ts +0 -6
  313. package/lib/components/select/filterable-select/filterable-select.component.js +3 -4
  314. package/lib/components/select/multi-select/multi-select.component.d.ts +0 -6
  315. package/lib/components/select/multi-select/multi-select.component.js +3 -4
  316. package/lib/components/select/option/option.component.d.ts +1 -1
  317. package/lib/components/select/option-group-header/option-group-header.component.d.ts +1 -1
  318. package/lib/components/select/option-row/option-row.component.d.ts +1 -1
  319. package/lib/components/select/simple-select/simple-select.component.d.ts +0 -6
  320. package/lib/components/select/simple-select/simple-select.component.js +3 -4
  321. package/lib/components/settings-row/settings-row.component.d.ts +2 -1
  322. package/lib/components/sidebar/sidebar.component.d.ts +2 -2
  323. package/lib/components/simple-color-picker/simple-color-picker.component.d.ts +2 -1
  324. package/lib/components/simple-color-picker/simple-color-picker.component.js +2 -0
  325. package/lib/components/split-button/split-button.component.d.ts +2 -5
  326. package/lib/components/step-flow/step-flow.component.js +0 -1
  327. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.d.ts +2 -1
  328. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +2 -2
  329. package/lib/components/step-sequence/step-sequence.component.d.ts +2 -1
  330. package/lib/components/step-sequence/step-sequence.component.js +2 -2
  331. package/lib/components/switch/switch.component.d.ts +2 -7
  332. package/lib/components/switch/switch.component.js +4 -5
  333. package/lib/components/tabs/tab/tab.component.d.ts +2 -1
  334. package/lib/components/tabs/tab/tab.component.js +1 -1
  335. package/lib/components/tabs/tabs.component.d.ts +2 -1
  336. package/lib/components/tabs/tabs.component.js +2 -3
  337. package/lib/components/textarea/textarea.component.d.ts +2 -7
  338. package/lib/components/textarea/textarea.component.js +5 -6
  339. package/lib/components/textbox/textbox.component.d.ts +4 -7
  340. package/lib/components/tile/flex-tile-divider/flex-tile-divider.component.js +1 -0
  341. package/lib/components/tile-select/tile-select-group/tile-select-group.component.d.ts +2 -1
  342. package/lib/components/tile-select/tile-select.component.d.ts +2 -1
  343. package/lib/components/tile-select/tile-select.component.js +8 -1
  344. package/lib/components/time/__internal__/time-toggle/time-toggle.component.d.ts +4 -4
  345. package/lib/components/time/time.component.d.ts +2 -2
  346. package/lib/components/toast/toast.component.d.ts +1 -3
  347. package/lib/components/toast/toast.component.js +3 -2
  348. package/lib/components/tooltip/tooltip.component.d.ts +2 -1
  349. package/lib/components/tooltip/tooltip.component.js +2 -0
  350. package/lib/components/typography/typography.component.d.ts +2 -0
  351. package/lib/components/vertical-divider/vertical-divider.component.d.ts +2 -1
  352. package/lib/components/vertical-divider/vertical-divider.component.js +4 -2
  353. package/package.json +1 -1
@@ -187,6 +187,8 @@ if (process.env.NODE_ENV !== "production") {
187
187
  SimpleColorPicker.propTypes = {
188
188
  "children": PropTypes.node,
189
189
  "childWidth": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
190
+ "data-element": PropTypes.string,
191
+ "data-role": PropTypes.string,
190
192
  "error": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
191
193
  "info": PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
192
194
  "legend": PropTypes.string.isRequired,
@@ -1,17 +1,14 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { IconType } from "../icon";
4
- export interface SplitButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, MarginProps {
4
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
5
+ export interface SplitButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, MarginProps, TagProps {
5
6
  /** Set align of the rendered content */
6
7
  align?: "left" | "right";
7
8
  /** Button type: "primary" | "secondary" */
8
9
  buttonType?: "primary" | "secondary";
9
10
  /** The additional button to display. */
10
11
  children: React.ReactNode;
11
- /** A custom value for the data-element attribute */
12
- "data-element"?: string;
13
- /** A custom value for the data-role attribute */
14
- "data-role"?: string;
15
12
  /** Prop to specify an aria-label for the component */
16
13
  "aria-label"?: string;
17
14
  /** Gives the button a disabled state. */
@@ -116,7 +116,6 @@ if (process.env.NODE_ENV !== "production") {
116
116
  "aria-labelledby": PropTypes.string,
117
117
  "category": PropTypes.string,
118
118
  "currentStep": PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7, 8]).isRequired,
119
- "data-component": PropTypes.string,
120
119
  "data-element": PropTypes.string,
121
120
  "data-role": PropTypes.string,
122
121
  "m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
- export interface StepSequenceItemProps {
2
+ import { TagProps } from "../../../__internal__/utils/helpers/tags";
3
+ export interface StepSequenceItemProps extends TagProps {
3
4
  /** Aria label */
4
5
  ariaLabel?: string;
5
6
  /** Hidden label to be displayed if item is complete */
@@ -4,6 +4,7 @@ import PropTypes from "prop-types";
4
4
  import { StyledStepSequenceItem, StyledStepSequenceItemContent, StyledStepSequenceItemIndicator, StyledStepSequenceItemHiddenLabel } from "./step-sequence-item.style";
5
5
  import Icon from "../../icon";
6
6
  import { StepSequenceContext } from "../step-sequence.component";
7
+ import tagComponent from "../../../__internal__/utils/helpers/tags";
7
8
  export const StepSequenceItem = ({
8
9
  hideIndicator = false,
9
10
  indicator,
@@ -33,11 +34,10 @@ export const StepSequenceItem = ({
33
34
  return null;
34
35
  };
35
36
  return /*#__PURE__*/React.createElement(StyledStepSequenceItem, _extends({
36
- "data-component": "step-sequence-item",
37
37
  orientation: orientation,
38
38
  status: status,
39
39
  key: `step-seq-item-${indicator}`,
40
40
  "aria-label": ariaLabel
41
- }, rest), hiddenLabel(), /*#__PURE__*/React.createElement(StyledStepSequenceItemContent, null, icon(), /*#__PURE__*/React.createElement("span", null, children)));
41
+ }, rest, tagComponent("step-sequence-item", rest)), hiddenLabel(), /*#__PURE__*/React.createElement(StyledStepSequenceItemContent, null, icon(), /*#__PURE__*/React.createElement("span", null, children)));
42
42
  };
43
43
  export default StepSequenceItem;
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
3
4
  export declare const StepSequenceContext: React.Context<{
4
5
  orientation: "horizontal" | "vertical";
5
6
  }>;
6
- export interface StepSequenceProps extends SpaceProps {
7
+ export interface StepSequenceProps extends SpaceProps, TagProps {
7
8
  /** Step sequence items to be rendered */
8
9
  children: React.ReactNode;
9
10
  /** The direction that step sequence items should be rendered */
@@ -1,6 +1,7 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
+ import tagComponent from "../../__internal__/utils/helpers/tags";
4
5
  import StyledStepSequence from "./step-sequence.style";
5
6
  export const StepSequenceContext = /*#__PURE__*/React.createContext({
6
7
  orientation: "horizontal"
@@ -11,10 +12,9 @@ export const StepSequence = ({
11
12
  ...props
12
13
  }) => {
13
14
  return /*#__PURE__*/React.createElement(StyledStepSequence, _extends({
14
- "data-component": "step-sequence",
15
15
  orientation: orientation,
16
16
  p: 0
17
- }, props), /*#__PURE__*/React.createElement(StepSequenceContext.Provider, {
17
+ }, props, tagComponent("step-sequence", props)), /*#__PURE__*/React.createElement(StepSequenceContext.Provider, {
18
18
  value: {
19
19
  orientation
20
20
  }
@@ -1,13 +1,8 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
4
- export interface SwitchProps extends CommonCheckableInputProps, MarginProps {
5
- /** Identifier used for testing purposes, applied to the root element of the component. */
6
- "data-component"?: string;
7
- /** Identifier used for testing purposes, applied to the root element of the component. */
8
- "data-element"?: string;
9
- /** Identifier used for testing purposes, applied to the root element of the component. */
10
- "data-role"?: string;
4
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
5
+ export interface SwitchProps extends CommonCheckableInputProps, MarginProps, TagProps {
11
6
  /** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
12
7
  adaptiveLabelBreakpoint?: number;
13
8
  /** Set the default value of the Switch if component is meant to be used as uncontrolled */
@@ -42,7 +42,6 @@ const Switch = /*#__PURE__*/React.forwardRef(({
42
42
  error,
43
43
  warning,
44
44
  info,
45
- "data-component": dataComponent = "switch",
46
45
  "data-element": dataElement,
47
46
  "data-role": dataRole,
48
47
  helpAriaLabel,
@@ -75,7 +74,7 @@ const Switch = /*#__PURE__*/React.forwardRef(({
75
74
  const shouldValidationBeOnLabel = labelInline && !reverse ? true : validationOnLabel;
76
75
  const marginProps = useFormSpacing(rest);
77
76
  const switchStyleProps = {
78
- "data-component": dataComponent,
77
+ "data-component": "switch",
79
78
  "data-role": dataRole,
80
79
  "data-element": dataElement,
81
80
  checked: isControlled ? checked : checkedInternal,
@@ -127,13 +126,14 @@ const Switch = /*#__PURE__*/React.forwardRef(({
127
126
  ref,
128
127
  required,
129
128
  isOptional,
130
- ...rest
129
+ ...rest,
130
+ "data-component": undefined
131
131
  };
132
132
 
133
133
  // Created separate const declarations to help when removing the old validation.
134
134
  // Not all props utilised by the old validation work or will be needed with the new validation.
135
135
  const switchStylePropsForNewValidation = {
136
- "data-component": dataComponent,
136
+ "data-component": "switch",
137
137
  "data-role": dataRole,
138
138
  "data-element": dataElement,
139
139
  checked: isControlled ? checked : checkedInternal,
@@ -368,7 +368,6 @@ if (process.env.NODE_ENV !== "production") {
368
368
  "dangerouslySetInnerHTML": PropTypes.shape({
369
369
  "__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
370
370
  }),
371
- "data-component": PropTypes.string,
372
371
  "data-element": PropTypes.string,
373
372
  "data-role": PropTypes.string,
374
373
  "datatype": PropTypes.string,
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import { PaddingProps } from "styled-system";
3
- export interface TabProps extends PaddingProps {
3
+ import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
4
+ export interface TabProps extends PaddingProps, TagProps {
4
5
  title?: string;
5
6
  /** A unique ID to identify this specific tab. */
6
7
  tabId: string;
@@ -70,6 +70,6 @@ export const Tab = ({
70
70
  isTabSelected: isTabSelected,
71
71
  "aria-labelledby": ariaLabelledby,
72
72
  position: position
73
- }, tagComponent("tab", rest), rest), !href && children));
73
+ }, rest, tagComponent("tab", rest)), !href && children));
74
74
  };
75
75
  export default Tab;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import Tab from "./tab";
4
- export interface TabsProps extends MarginProps {
4
+ import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
5
+ export interface TabsProps extends MarginProps, TagProps {
5
6
  /** Prevent rendering of hidden tabs, by default this is set to true and therefore all tabs will be rendered */
6
7
  renderHiddenTabs?: boolean;
7
8
  /** Allows manual control over the currently selected tab. */
@@ -262,10 +262,9 @@ const Tabs = ({
262
262
  };
263
263
  return /*#__PURE__*/React.createElement(StyledTabs, _extends({
264
264
  position: isInSidebar ? "left" : position,
265
- "data-role": "tabs"
266
- }, tagComponent("tabs", rest), {
265
+ "data-role": "tabs",
267
266
  isInSidebar: isInSidebar,
268
267
  headerWidth: headerWidth
269
- }, rest), renderTabHeaders(), renderTabs());
268
+ }, rest, tagComponent("tabs", rest)), renderTabHeaders(), renderTabs());
270
269
  };
271
270
  export { Tabs, Tab };
@@ -2,17 +2,12 @@ import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
3
  import { IconType } from "../icon";
4
4
  import { ValidationProps } from "../../__internal__/validations";
5
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
5
6
  import { CommonInputProps } from "../../__internal__/input";
6
7
  import { BorderRadiusType } from "../box/box.component";
7
- export interface TextareaProps extends ValidationProps, MarginProps, Omit<CommonInputProps, "size"> {
8
+ export interface TextareaProps extends ValidationProps, MarginProps, Omit<CommonInputProps, "size">, TagProps {
8
9
  /** Prop to specify the aria-labelledby property of the component */
9
10
  "aria-labelledby"?: string;
10
- /** Identifier used for testing purposes, applied to the root element of the component. */
11
- "data-component"?: string;
12
- /** Identifier used for testing purposes, applied to the root element of the component. */
13
- "data-element"?: string;
14
- /** Identifier used for testing purposes, applied to the root element of the component. */
15
- "data-role"?: string;
16
11
  /** id of the input */
17
12
  id?: string;
18
13
  /** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
@@ -1,6 +1,7 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useRef, useEffect, useContext, useCallback, useState } from "react";
3
3
  import PropTypes from "prop-types";
4
+ import tagComponent from "../../__internal__/utils/helpers/tags";
4
5
  import { InputPresentation } from "../../__internal__/input";
5
6
  import FormField from "../../__internal__/form-field";
6
7
  import useCharacterCount from "../../hooks/__internal__/useCharacterCount";
@@ -53,7 +54,6 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
53
54
  labelWidth = 30,
54
55
  tooltipPosition,
55
56
  value,
56
- "data-component": dataComponent,
57
57
  "data-element": dataElement,
58
58
  "data-role": dataRole,
59
59
  helpAriaLabel,
@@ -220,12 +220,12 @@ const Textarea = /*#__PURE__*/React.forwardRef(({
220
220
  helpAriaLabel: helpAriaLabel
221
221
  }, /*#__PURE__*/React.createElement(InputBehaviour, null, /*#__PURE__*/React.createElement(StyledTextarea, _extends({
222
222
  labelInline: labelInlineWithNewValidation,
223
- "data-component": dataComponent,
224
- "data-role": dataRole,
225
- "data-element": dataElement,
226
223
  hasIcon: hasIconInside,
227
224
  minHeight: textareaMinHeight
228
- }, marginProps), /*#__PURE__*/React.createElement(FormField, {
225
+ }, marginProps, tagComponent("textarea", {
226
+ "data-element": dataElement,
227
+ "data-role": dataRole
228
+ })), /*#__PURE__*/React.createElement(FormField, {
229
229
  fieldHelp: computeLabelPropValues(fieldHelp),
230
230
  fieldHelpId: fieldHelpId,
231
231
  error: error,
@@ -390,7 +390,6 @@ if (process.env.NODE_ENV !== "production") {
390
390
  "dangerouslySetInnerHTML": PropTypes.shape({
391
391
  "__html": PropTypes.oneOfType([PropTypes.object, PropTypes.string]).isRequired
392
392
  }),
393
- "data-component": PropTypes.string,
394
393
  "data-element": PropTypes.string,
395
394
  "data-role": PropTypes.string,
396
395
  "datatype": PropTypes.string,
@@ -3,19 +3,14 @@ import { MarginProps } from "styled-system";
3
3
  import { IconType } from "../icon";
4
4
  import { CommonInputProps } from "../../__internal__/input";
5
5
  import { ValidationProps } from "../../__internal__/validations";
6
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
6
7
  export declare const ALIGN_DEFAULT = "left";
7
8
  export declare const SIZE_DEFAULT = "medium";
8
9
  export declare const LABEL_WIDTH_DEFAULT = 30;
9
10
  export declare const LABEL_VALIDATION_DEFAULT = false;
10
- export interface CommonTextboxProps extends ValidationProps, MarginProps, Omit<CommonInputProps, "size" | "inputBorderRadius"> {
11
+ export interface CommonTextboxProps extends ValidationProps, MarginProps, Omit<CommonInputProps, "size" | "inputBorderRadius">, TagProps {
11
12
  /** Prop to specify the aria-labelledby property of the component */
12
13
  "aria-labelledby"?: string;
13
- /** Identifier used for testing purposes, applied to the root element of the component. */
14
- "data-component"?: string;
15
- /** Identifier used for testing purposes, applied to the root element of the component. */
16
- "data-element"?: string;
17
- /** Identifier used for testing purposes, applied to the root element of the component. */
18
- "data-role"?: string;
19
14
  /** Breakpoint for adaptive label (inline labels change to top aligned). Enables the adaptive behaviour when set */
20
15
  adaptiveLabelBreakpoint?: number;
21
16
  /** Integer to determine a timeout for the deferred callback */
@@ -96,6 +91,8 @@ export interface CommonTextboxProps extends ValidationProps, MarginProps, Omit<C
96
91
  isOptional?: boolean;
97
92
  /** The id attribute for the validation tooltip */
98
93
  tooltipId?: string;
94
+ /** @private @internal @ignore */
95
+ "data-component"?: string;
99
96
  }
100
97
  export interface TextboxProps extends CommonTextboxProps {
101
98
  /** Content to be rendered next to the input */
@@ -12,6 +12,7 @@ export const FlexTileDivider = () => {
12
12
  m: "0px 0px -1px 0px"
13
13
  }, /*#__PURE__*/React.createElement(Hr, {
14
14
  "aria-hidden": "true",
15
+ "data-role": "hr",
15
16
  m: 0
16
17
  }));
17
18
  };
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
+ import { TagProps } from "../../../__internal__/utils/helpers/tags/tags";
3
4
  import { TileSelectDeselectEvent } from "../tile-select.component";
4
- export interface TileSelectGroupProps extends MarginProps {
5
+ export interface TileSelectGroupProps extends MarginProps, TagProps {
5
6
  /** The TileSelect components to be rendered in the group */
6
7
  children: React.ReactNode;
7
8
  /** The content for the TileSelectGroup Legend */
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { MarginProps } from "styled-system";
3
+ import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
3
4
  export interface TileSelectDeselectEvent {
4
5
  target: {
5
6
  name?: string;
@@ -8,7 +9,7 @@ export interface TileSelectDeselectEvent {
8
9
  checked: false;
9
10
  };
10
11
  }
11
- export interface TileSelectProps extends MarginProps {
12
+ export interface TileSelectProps extends MarginProps, TagProps {
12
13
  /** title of the TileSelect */
13
14
  title?: React.ReactNode;
14
15
  /** adornment to be rendered next to the title */
@@ -32,6 +32,8 @@ const TileSelect = /*#__PURE__*/React.forwardRef(({
32
32
  accordionContent,
33
33
  accordionControl,
34
34
  accordionExpanded,
35
+ "data-element": dataElement,
36
+ "data-role": dataRole,
35
37
  ...rest
36
38
  }, ref) => {
37
39
  const l = useLocale();
@@ -68,7 +70,10 @@ const TileSelect = /*#__PURE__*/React.forwardRef(({
68
70
  return /*#__PURE__*/React.createElement(StyledTileSelectContainer, _extends({
69
71
  checked: checked,
70
72
  disabled: disabled
71
- }, tagComponent("tile-select", rest), filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(StyledFocusWrapper, {
73
+ }, tagComponent("tile-select", {
74
+ "data-element": dataElement,
75
+ "data-role": dataRole
76
+ }), filterStyledSystemMarginProps(rest)), /*#__PURE__*/React.createElement(StyledFocusWrapper, {
72
77
  "data-role": "focus-wrapper",
73
78
  hasFocus: hasFocus,
74
79
  checked: checked
@@ -132,6 +137,8 @@ if (process.env.NODE_ENV !== "production") {
132
137
  "additionalInformation": PropTypes.node,
133
138
  "checked": PropTypes.bool,
134
139
  "customActionButton": PropTypes.func,
140
+ "data-element": PropTypes.string,
141
+ "data-role": PropTypes.string,
135
142
  "description": PropTypes.node,
136
143
  "disabled": PropTypes.bool,
137
144
  "footer": PropTypes.node,
@@ -2,11 +2,11 @@ import React from "react";
2
2
  import { TagProps } from "../../../../__internal__/utils/helpers/tags";
3
3
  import { ToggleValue } from "../../time.component";
4
4
  export interface ToggleDataProps {
5
- wrapperProps?: Omit<TagProps, "data-component">;
6
- amToggleProps?: Omit<TagProps, "data-component">;
7
- pmToggleProps?: Omit<TagProps, "data-component">;
5
+ wrapperProps?: TagProps;
6
+ amToggleProps?: TagProps;
7
+ pmToggleProps?: TagProps;
8
8
  }
9
- export interface ToggleProps extends Omit<TagProps, "data-component"> {
9
+ export interface ToggleProps extends TagProps {
10
10
  size?: "small" | "medium" | "large";
11
11
  onChange: (pressedValue: ToggleValue) => void;
12
12
  toggleValue: ToggleValue;
@@ -19,7 +19,7 @@ export interface TimeInputEvent {
19
19
  value: TimeValue;
20
20
  };
21
21
  }
22
- interface TimeInputProps extends Omit<TagProps, "data-component">, Omit<ValidationProps, "info"> {
22
+ interface TimeInputProps extends TagProps, Omit<ValidationProps, "info"> {
23
23
  /** Set an id value on the input */
24
24
  id?: string;
25
25
  /** Override the default label text */
@@ -27,7 +27,7 @@ interface TimeInputProps extends Omit<TagProps, "data-component">, Omit<Validati
27
27
  /** Override the default aria-label text */
28
28
  "aria-label"?: string;
29
29
  }
30
- export interface TimeProps extends Omit<TagProps, "data-component">, MarginProps {
30
+ export interface TimeProps extends TagProps, MarginProps {
31
31
  /** Label text for the component */
32
32
  label?: string;
33
33
  /** Label alignment */
@@ -3,7 +3,7 @@ import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
3
3
  declare type ToastVariants = "error" | "info" | "success" | "warning" | "notice" | "neutral" | "notification";
4
4
  declare type AlignOptions = "left" | "center" | "right";
5
5
  declare type AlignYOptions = "top" | "center" | "bottom";
6
- export interface ToastProps {
6
+ export interface ToastProps extends TagProps {
7
7
  /** Sets the horizontal alignment of the component. */
8
8
  align?: AlignOptions;
9
9
  /** Sets the vertical alignment of the component */
@@ -14,8 +14,6 @@ export interface ToastProps {
14
14
  variant?: ToastVariants;
15
15
  /** Custom id */
16
16
  id?: string;
17
- /** Component name */
18
- "data-component"?: string;
19
17
  /** Determines if the Toast is open. */
20
18
  open?: boolean;
21
19
  /** Callback for when dismissed. */
@@ -125,7 +125,7 @@ const Toast = /*#__PURE__*/React.forwardRef(({
125
125
  alignY: alignY,
126
126
  isNotice: isNotice,
127
127
  isNotification: isNotification
128
- }, tagComponent(restProps["data-component"] || "toast", restProps), {
128
+ }, tagComponent("toast", restProps), {
129
129
  variant: toastVariant,
130
130
  id: id,
131
131
  maxWidth: maxWidth,
@@ -172,7 +172,8 @@ if (process.env.NODE_ENV !== "production") {
172
172
  "data-element": PropTypes.string,
173
173
  "data-role": PropTypes.string
174
174
  }),
175
- "data-component": PropTypes.string,
175
+ "data-element": PropTypes.string,
176
+ "data-role": PropTypes.string,
176
177
  "disableAutoFocus": PropTypes.bool,
177
178
  "id": PropTypes.string,
178
179
  "maxWidth": PropTypes.string,
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { TooltipPositions } from "./tooltip.config";
3
+ import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
3
4
  export declare type InputSizes = "small" | "medium" | "large";
4
- export interface TooltipProps {
5
+ export interface TooltipProps extends TagProps {
5
6
  /** The message to be displayed within the tooltip */
6
7
  message: React.ReactNode;
7
8
  /** The id attribute to use for the tooltip */
@@ -186,6 +186,8 @@ if (process.env.NODE_ENV !== "production") {
186
186
  Tooltip.propTypes = {
187
187
  "bgColor": PropTypes.string,
188
188
  "children": PropTypes.element.isRequired,
189
+ "data-element": PropTypes.string,
190
+ "data-role": PropTypes.string,
189
191
  "flipOverrides": PropTypes.arrayOf(PropTypes.oneOf(["bottom", "left", "right", "top"])),
190
192
  "fontColor": PropTypes.string,
191
193
  "id": PropTypes.string,
@@ -63,6 +63,8 @@ export interface TypographyProps extends SpaceProps, TagProps {
63
63
  * @ignore
64
64
  * Sets className for component. INTERNAL USE ONLY. */
65
65
  className?: string;
66
+ /** @private @internal @ignore */
67
+ "data-component"?: string;
66
68
  }
67
69
  export declare const Typography: {
68
70
  ({ "data-component": dataComponent, variant, as, id, fontSize, fontWeight, textTransform, lineHeight, textDecoration, display, listStyleType, whiteSpace, wordBreak, wordWrap, textAlign, textOverflow, truncate, color, backgroundColor, bg, opacity, children, screenReaderOnly, isDisabled, "aria-hidden": ariaHidden, className, ...rest }: TypographyProps): React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { SpaceProps } from "styled-system";
2
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
2
3
  declare type TintRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100;
3
- export interface VerticalDividerProps extends SpaceProps {
4
+ export interface VerticalDividerProps extends SpaceProps, TagProps {
4
5
  /** Shorthand for the height attribute */
5
6
  h?: number | string;
6
7
  /** Height attribute of the component */
@@ -3,6 +3,7 @@ import React, { useContext } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import MenuContext from "../menu/__internal__/menu.context";
5
5
  import { StyledVerticalWrapper, StyledDivider } from "./vertical-divider.style";
6
+ import tagComponent from "../../__internal__/utils/helpers/tags";
6
7
  const VerticalDivider = ({
7
8
  h,
8
9
  height,
@@ -15,7 +16,6 @@ const VerticalDivider = ({
15
16
  inMenu
16
17
  } = useContext(MenuContext);
17
18
  return /*#__PURE__*/React.createElement(StyledVerticalWrapper, _extends({
18
- "data-component": "vertical-divider",
19
19
  "data-role": "vertical-divider",
20
20
  p: props.p || 3,
21
21
  height: h || height,
@@ -23,7 +23,7 @@ const VerticalDivider = ({
23
23
  }, props, {
24
24
  as: inMenu ? "li" : "div",
25
25
  "aria-hidden": inMenu ?? ariaHidden
26
- }), /*#__PURE__*/React.createElement(StyledDivider, {
26
+ }, tagComponent("vertical-divider", props)), /*#__PURE__*/React.createElement(StyledDivider, {
27
27
  "data-role": "divider",
28
28
  tint: tint
29
29
  }));
@@ -31,6 +31,8 @@ const VerticalDivider = ({
31
31
  if (process.env.NODE_ENV !== "production") {
32
32
  VerticalDivider.propTypes = {
33
33
  "aria-hidden": PropTypes.bool,
34
+ "data-element": PropTypes.string,
35
+ "data-role": PropTypes.string,
34
36
  "displayInline": PropTypes.bool,
35
37
  "h": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
36
38
  "height": PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
@@ -61,6 +61,8 @@ export interface FormFieldProps extends CommonFormFieldProps, TagProps {
61
61
  useValidationIcon?: boolean;
62
62
  /** String value for max-width of `field-line` element */
63
63
  maxWidth?: string;
64
+ /** @private @internal @ignore */
65
+ "data-component"?: string;
64
66
  }
65
67
  declare const FormField: {
66
68
  ({ maxWidth, children, "data-component": dataComponent, disabled, loading, fieldHelp: fieldHelpContent, fieldHelpInline, error, warning, info, tooltipId, fieldHelpId, label, labelId, labelAlign, labelHelp, labelHelpIcon, labelInline, labelSpacing, labelWidth, labelAs, id, reverse, isOptional, useValidationIcon, adaptiveLabelBreakpoint, isRequired, validationIconId, validationRedesignOptIn, ...rest }: FormFieldProps): React.JSX.Element;
@@ -2,15 +2,23 @@ interface RestProps {
2
2
  [restKeys: string]: any;
3
3
  }
4
4
  export interface TagProps {
5
- /** @private @ignore Identifier used for testing purposes, applied to the root element of the component. */
6
- "data-component"?: string;
7
5
  /** Identifier used for testing purposes, applied to the root element of the component. */
8
6
  "data-element"?: string;
9
7
  /** Identifier used for testing purposes, applied to the root element of the component. */
10
8
  "data-role"?: string;
11
9
  }
10
+ interface InternalTagProps extends TagProps {
11
+ /**
12
+ * @private
13
+ * @internal
14
+ * @ignore
15
+ * Identifier used for testing purposes, applied to the root element of the component.
16
+ * INTERNAL USE ONLY.
17
+ */
18
+ "data-component"?: string;
19
+ }
12
20
  /**
13
21
  * Builds props object containing top level data tags
14
22
  */
15
- declare function tagComponent(componentName: string | undefined, props: TagProps & RestProps): TagProps;
23
+ declare function tagComponent(componentName: string | undefined, props: TagProps & RestProps): InternalTagProps;
16
24
  export default tagComponent;
@@ -4,7 +4,7 @@ import { TagProps } from "../../../__internal__/utils/helpers/tags";
4
4
  declare type AccordionGroupChild = React.ReactElement | boolean | null | undefined | AccordionGroupChildArray;
5
5
  interface AccordionGroupChildArray extends Array<AccordionGroupChild> {
6
6
  }
7
- export interface AccordionGroupProps extends MarginProps, Omit<TagProps, "data-component"> {
7
+ export interface AccordionGroupProps extends MarginProps, TagProps {
8
8
  /** An Accordion or list of Accordion components to be rendered inside the AccordionGroup */
9
9
  children?: AccordionGroupChild;
10
10
  }
@@ -10,6 +10,7 @@ var _invariant = _interopRequireDefault(require("invariant"));
10
10
  var _events = _interopRequireDefault(require("../../../__internal__/utils/helpers/events"));
11
11
  var _accordion = _interopRequireDefault(require("../accordion.component"));
12
12
  var _accordion2 = require("../accordion.style");
13
+ var _tags = _interopRequireDefault(require("../../../__internal__/utils/helpers/tags"));
13
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
16
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -59,9 +60,7 @@ const AccordionGroup = ({
59
60
  focusAccordion(ev, refs.length - 1);
60
61
  }
61
62
  }, [focusAccordion, refs]);
62
- return /*#__PURE__*/_react.default.createElement(_accordion2.StyledAccordionGroup, _extends({}, rest, {
63
- "data-component": "accordion-group"
64
- }), filteredChildren.map((child, index) =>
63
+ return /*#__PURE__*/_react.default.createElement(_accordion2.StyledAccordionGroup, _extends({}, rest, (0, _tags.default)("accordion-group", rest)), filteredChildren.map((child, index) =>
65
64
  /*#__PURE__*/
66
65
  // casted to ReactElement as there is no overload for an FunctionComponentElement in cloneElement
67
66
  _react.default.cloneElement(child, {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
+ import { TagProps } from "../../__internal__/utils/helpers/tags";
3
4
  import { StyledAccordionContainerProps } from "./accordion.style";
4
- export interface AccordionProps extends StyledAccordionContainerProps, SpaceProps {
5
+ export interface AccordionProps extends StyledAccordionContainerProps, SpaceProps, TagProps {
5
6
  /** Content of the Accordion component */
6
7
  children?: React.ReactNode;
7
8
  /** Set the default state of expansion of the Accordion if component is meant to be used as uncontrolled */