carbon-react 162.25.0 → 163.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 (498) hide show
  1. package/esm/__internal__/character-count/character-count.style.js +1 -1
  2. package/esm/__internal__/checkable-input/checkable-input.style.js +1 -1
  3. package/esm/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
  4. package/esm/__internal__/error-border/error-border.style.js +1 -1
  5. package/esm/__internal__/field-help/field-help.style.js +1 -1
  6. package/esm/__internal__/fieldset/__next__/fieldset.style.js +1 -1
  7. package/esm/__internal__/fieldset/fieldset.style.js +1 -1
  8. package/esm/__internal__/form-field/form-field.style.js +1 -1
  9. package/esm/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
  10. package/esm/__internal__/hint-text/hint-text.style.js +1 -1
  11. package/esm/__internal__/input/input.style.js +1 -1
  12. package/esm/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
  13. package/esm/__internal__/label/label.style.js +1 -1
  14. package/esm/__internal__/legacy-error-border/error-border.style.js +1 -1
  15. package/esm/__internal__/legacy-hint-text/hint-text.style.js +1 -1
  16. package/esm/__internal__/legacy-input/input-presentation.style.js +1 -1
  17. package/esm/__internal__/legacy-input/input.style.js +1 -1
  18. package/esm/__internal__/legacy-label/icon-wrapper.style.js +1 -1
  19. package/esm/__internal__/legacy-label/label.style.js +1 -1
  20. package/esm/__internal__/modal/modal.style.js +1 -1
  21. package/esm/__internal__/popover/popover.style.js +1 -1
  22. package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js +1 -1
  23. package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js +1 -1
  24. package/esm/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js +1 -1
  25. package/esm/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js +1 -1
  26. package/esm/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js +1 -1
  27. package/esm/__internal__/popover-menu/menu-item/menu-item.component.js +1 -1
  28. package/esm/__internal__/popover-menu/popover-menu.component.js +1 -1
  29. package/esm/__internal__/validation-message/__next__/validation-message.style.js +1 -1
  30. package/esm/__internal__/validation-message/validation-message.style.js +1 -1
  31. package/esm/__internal__/validations/validation-icon.style.js +1 -1
  32. package/esm/components/accordion/accordion.style.js +1 -1
  33. package/esm/components/action-popover/action-popover.style.js +1 -1
  34. package/esm/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
  35. package/esm/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
  36. package/esm/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
  37. package/esm/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  38. package/esm/components/anchor-navigation/anchor-navigation.style.js +1 -1
  39. package/esm/components/anchor-navigation/anchor-section-divider.component.js +1 -1
  40. package/esm/components/badge/badge.style.js +1 -1
  41. package/esm/components/batch-selection/batch-selection.style.js +1 -1
  42. package/esm/components/box/box.style.js +1 -1
  43. package/esm/components/breadcrumbs/breadcrumbs.style.js +1 -1
  44. package/esm/components/breadcrumbs/crumb/crumb.style.js +1 -1
  45. package/esm/components/button/__next__/button.style.js +1 -1
  46. package/esm/components/button/button.style.js +1 -1
  47. package/esm/components/button-bar/button-bar.style.js +1 -1
  48. package/esm/components/button-minor/button-minor.style.js +1 -1
  49. package/esm/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
  50. package/esm/components/button-toggle/button-toggle.style.js +1 -1
  51. package/esm/components/card/card-column/card-column.style.js +1 -1
  52. package/esm/components/card/card-footer/card-footer.style.js +1 -1
  53. package/esm/components/card/card-row/card-row.style.js +1 -1
  54. package/esm/components/card/card.style.js +1 -1
  55. package/esm/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
  56. package/esm/components/checkbox/checkbox.style.js +1 -1
  57. package/esm/components/confirm/confirm.style.js +1 -1
  58. package/esm/components/content/content.style.js +1 -1
  59. package/esm/components/date/__internal__/calendar/calendar-close-button.style.js +1 -1
  60. package/esm/components/date/__internal__/calendar/calendar-navigation.style.js +1 -1
  61. package/esm/components/date/__internal__/calendar/calendar-select/calendar-select.style.js +1 -1
  62. package/esm/components/date/__internal__/calendar/calendar-weekday.style.js +1 -1
  63. package/esm/components/date/__internal__/date-picker/date-picker.style.js +1 -1
  64. package/esm/components/date/__internal__/date-picker-trigger/date-picker-trigger.style.js +1 -1
  65. package/esm/components/date/date.style.js +1 -1
  66. package/esm/components/date-range/date-range.style.js +1 -1
  67. package/esm/components/decimal/__internal__/decimal-popover-button.style.js +1 -1
  68. package/esm/components/decimal/decimal.style.js +1 -1
  69. package/esm/components/definition-list/definition-list.style.js +1 -1
  70. package/esm/components/detail/detail.style.js +1 -1
  71. package/esm/components/dialog/__internal__/__next__/dialog.style.js +1 -1
  72. package/esm/components/dismissible-box/dismissible-box.style.js +1 -1
  73. package/esm/components/divider/divider.style.js +1 -1
  74. package/esm/components/draggable/draggable-item/draggable-item.style.js +1 -1
  75. package/esm/components/drawer/drawer.style.js +1 -1
  76. package/esm/components/duelling-picklist/duelling-picklist.style.js +1 -1
  77. package/esm/components/duelling-picklist/picklist/picklist.style.js +1 -1
  78. package/esm/components/duelling-picklist/picklist-divider/picklist-divider.style.js +1 -1
  79. package/esm/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
  80. package/esm/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
  81. package/esm/components/fieldset/fieldset.style.js +1 -1
  82. package/esm/components/file-input/__internal__/file-input-validation/file-input-validation.component.d.ts +8 -0
  83. package/esm/components/file-input/__internal__/file-input-validation/file-input-validation.component.js +1 -0
  84. package/esm/components/file-input/__internal__/file-input-validation/index.d.ts +1 -0
  85. package/esm/components/file-input/__internal__/file-input-validation/index.js +1 -0
  86. package/esm/components/file-input/__internal__/file-input.types.d.ts +5 -0
  87. package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.component.d.ts +110 -28
  88. package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.component.js +1 -1
  89. package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.style.d.ts +30 -11
  90. package/esm/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  91. package/esm/components/file-input/__internal__/file-upload-status/thumbnail-content.component.d.ts +24 -0
  92. package/esm/components/file-input/__internal__/file-upload-status/thumbnail-content.component.js +1 -0
  93. package/esm/components/file-input/__internal__/file-upload-status-list/file-upload-status-list.component.d.ts +17 -0
  94. package/esm/components/file-input/__internal__/file-upload-status-list/file-upload-status-list.component.js +1 -0
  95. package/esm/components/file-input/__internal__/file-upload-status-list/index.d.ts +1 -0
  96. package/esm/components/file-input/__internal__/file-upload-status-list/index.js +1 -0
  97. package/esm/components/file-input/__internal__/hooks/useFileDropZone.d.ts +20 -0
  98. package/esm/components/file-input/__internal__/hooks/useFileDropZone.js +1 -0
  99. package/esm/components/file-input/__internal__/hooks/useMoveFocusAfterFileRemoval.d.ts +19 -0
  100. package/esm/components/file-input/__internal__/hooks/useMoveFocusAfterFileRemoval.js +1 -0
  101. package/esm/components/file-input/__internal__/hooks/useMoveFocusAfterFileSelection.d.ts +19 -0
  102. package/esm/components/file-input/__internal__/hooks/useMoveFocusAfterFileSelection.js +1 -0
  103. package/esm/components/file-input/__internal__/hooks/useStatusAnnouncement.d.ts +11 -0
  104. package/esm/components/file-input/__internal__/hooks/useStatusAnnouncement.js +1 -0
  105. package/esm/components/file-input/__internal__/hooks/useUploadCompletionAnnouncement.d.ts +11 -0
  106. package/esm/components/file-input/__internal__/hooks/useUploadCompletionAnnouncement.js +1 -0
  107. package/esm/components/file-input/__internal__/utils/focus-next-action.d.ts +18 -0
  108. package/esm/components/file-input/__internal__/utils/focus-next-action.js +1 -0
  109. package/esm/components/file-input/__internal__/utils/split-statuses.d.ts +12 -0
  110. package/esm/components/file-input/__internal__/utils/split-statuses.js +1 -0
  111. package/esm/components/file-input/file-input.component.d.ts +83 -22
  112. package/esm/components/file-input/file-input.component.js +1 -1
  113. package/esm/components/file-input/file-input.style.d.ts +47 -15
  114. package/esm/components/file-input/file-input.style.js +1 -1
  115. package/esm/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
  116. package/esm/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
  117. package/esm/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  118. package/esm/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
  119. package/esm/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  120. package/esm/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  121. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
  122. package/esm/components/flat-table/flat-table.style.js +1 -1
  123. package/esm/components/flat-table/sort/sort.style.js +1 -1
  124. package/esm/components/form/__internal__/form-summary.style.js +1 -1
  125. package/esm/components/form/form.style.js +1 -1
  126. package/esm/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
  127. package/esm/components/global-header/global-header.component.js +1 -1
  128. package/esm/components/grid/grid-container/grid-container.style.js +1 -1
  129. package/esm/components/grid/grid-item/grid-item.style.js +1 -1
  130. package/esm/components/heading/heading.style.js +1 -1
  131. package/esm/components/help/help.style.js +1 -1
  132. package/esm/components/hr/hr.style.js +1 -1
  133. package/esm/components/icon/icon.style.js +1 -1
  134. package/esm/components/icon-button/icon-button.style.js +1 -1
  135. package/esm/components/image/image.style.js +1 -1
  136. package/esm/components/inline-inputs/inline-inputs.style.js +1 -1
  137. package/esm/components/link/link.style.js +1 -1
  138. package/esm/components/link-preview/__internal__/placeholder.component.js +1 -1
  139. package/esm/components/link-preview/link-preview.style.js +1 -1
  140. package/esm/components/loader/__next__/internal/star.style.js +1 -1
  141. package/esm/components/loader/__next__/loader.style.js +1 -1
  142. package/esm/components/loader/loader-square.style.js +1 -1
  143. package/esm/components/loader/loader.style.js +1 -1
  144. package/esm/components/loader-bar/loader-bar.style.js +1 -1
  145. package/esm/components/loader-spinner/loader-spinner.style.js +1 -1
  146. package/esm/components/loader-star/internal/star.style.js +1 -1
  147. package/esm/components/loader-star/loader-star.style.js +1 -1
  148. package/esm/components/menu/__internal__/submenu/submenu.style.js +1 -1
  149. package/esm/components/menu/menu-divider/menu-divider.style.js +1 -1
  150. package/esm/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
  151. package/esm/components/menu/menu-item/menu-item.style.js +1 -1
  152. package/esm/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  153. package/esm/components/menu/menu.style.js +1 -1
  154. package/esm/components/menu/scrollable-block/scrollable-block.style.js +1 -1
  155. package/esm/components/message/message.style.js +1 -1
  156. package/esm/components/multi-action-button/multi-action-button.style.js +1 -1
  157. package/esm/components/navigation-bar/navigation-bar.style.js +1 -1
  158. package/esm/components/note/note.style.js +1 -1
  159. package/esm/components/numeral-date/numeral-date.style.js +1 -1
  160. package/esm/components/option-tile/option-tile.style.js +1 -1
  161. package/esm/components/pager/__internal__/pagination-navigation.style.js +1 -1
  162. package/esm/components/pager/pager.style.js +1 -1
  163. package/esm/components/pages/page/page.style.js +1 -1
  164. package/esm/components/pages/pages.style.js +1 -1
  165. package/esm/components/password/password.style.js +1 -1
  166. package/esm/components/pill/pill.style.js +1 -1
  167. package/esm/components/pod/pod.style.js +1 -1
  168. package/esm/components/popover-container/popover-container.style.js +1 -1
  169. package/esm/components/portal/portal.js +1 -1
  170. package/esm/components/portal/portal.style.js +1 -1
  171. package/esm/components/portrait/portrait.style.js +1 -1
  172. package/esm/components/preview/preview.style.js +1 -1
  173. package/esm/components/profile/profile.style.js +1 -1
  174. package/esm/components/progress-tracker/progress-tracker.style.js +1 -1
  175. package/esm/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
  176. package/esm/components/radio-button/radio-button.style.js +1 -1
  177. package/esm/components/search/__internal__/results-announcement.component.js +1 -1
  178. package/esm/components/search/search.component.js +1 -1
  179. package/esm/components/select/__internal__/list-action-button/list-action-button.style.js +1 -1
  180. package/esm/components/select/__internal__/select-list/select-list.style.js +1 -1
  181. package/esm/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
  182. package/esm/components/select/__internal__/utils/matching-text.style.js +1 -1
  183. package/esm/components/select/multi-select/multi-select.style.js +1 -1
  184. package/esm/components/select/option/option.style.js +1 -1
  185. package/esm/components/select/option-group-header/option-group-header.style.js +1 -1
  186. package/esm/components/select/option-row/option-row.style.js +1 -1
  187. package/esm/components/select/select.style.js +1 -1
  188. package/esm/components/settings-row/settings-row.style.js +1 -1
  189. package/esm/components/sidebar/__internal__/sidebar-content/sidebar-content.style.js +1 -1
  190. package/esm/components/sidebar/__internal__/sidebar-footer/sidebar-footer.style.js +1 -1
  191. package/esm/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
  192. package/esm/components/sidebar/sidebar.style.js +1 -1
  193. package/esm/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
  194. package/esm/components/simple-color-picker/simple-color-picker.style.js +1 -1
  195. package/esm/components/split-button/split-button-toggle.style.js +1 -1
  196. package/esm/components/split-button/split-button.style.js +1 -1
  197. package/esm/components/step-flow/step-flow.style.js +1 -1
  198. package/esm/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
  199. package/esm/components/step-sequence/step-sequence.style.js +1 -1
  200. package/esm/components/switch/switch.style.js +1 -1
  201. package/esm/components/table/table-body/table-body.component.js +1 -1
  202. package/esm/components/table/table-cell/table-cell.style.js +1 -1
  203. package/esm/components/table/table-foot/table-foot.component.js +1 -1
  204. package/esm/components/table/table-head/table-head.component.js +1 -1
  205. package/esm/components/table/table-header/__internal__/sort/sort.style.js +1 -1
  206. package/esm/components/table/table-header/table-header.style.js +1 -1
  207. package/esm/components/table/table-row/table-row.style.js +1 -1
  208. package/esm/components/table/table.style.js +1 -1
  209. package/esm/components/tabs/__next__/tabs.style.js +1 -1
  210. package/esm/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -1
  211. package/esm/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -1
  212. package/esm/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -1
  213. package/esm/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -1
  214. package/esm/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -1
  215. package/esm/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -1
  216. package/esm/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -1
  217. package/esm/components/text-editor/text-editor.style.js +1 -1
  218. package/esm/components/textarea/textarea.style.js +1 -1
  219. package/esm/components/textbox/__internal__/__next__/text-input.style.js +1 -1
  220. package/esm/components/tile/tile-footer/tile-footer.style.js +1 -1
  221. package/esm/components/tile/tile.style.js +1 -1
  222. package/esm/components/tile-select/__internal__/accordion/accordion.style.js +1 -1
  223. package/esm/components/tile-select/tile-select.style.js +1 -1
  224. package/esm/components/time/time.style.js +1 -1
  225. package/esm/components/toast/toast.style.js +1 -1
  226. package/esm/components/tokens-wrapper/tokens-wrapper.component.js +1 -1
  227. package/esm/components/tooltip/tooltip-pointer.style.js +1 -1
  228. package/esm/components/tooltip/tooltip.style.js +1 -1
  229. package/esm/components/typography/__internal__/__next__/typography.style.js +1 -1
  230. package/esm/components/typography/typography.style.js +1 -1
  231. package/esm/components/vertical-divider/vertical-divider.style.js +1 -1
  232. package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js +1 -1
  233. package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js +1 -1
  234. package/esm/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js +1 -1
  235. package/esm/components/vertical-menu/vertical-menu.style.js +1 -1
  236. package/esm/hooks/__internal__/useIsFileDraggedOverDocument/index.d.ts +1 -0
  237. package/esm/hooks/__internal__/useIsFileDraggedOverDocument/index.js +1 -0
  238. package/esm/hooks/__internal__/useIsFileDraggedOverDocument/useIsFileDraggedOverDocument.d.ts +10 -0
  239. package/esm/hooks/__internal__/useIsFileDraggedOverDocument/useIsFileDraggedOverDocument.js +1 -0
  240. package/esm/locales/de-de.js +1 -1
  241. package/esm/locales/en-gb.js +1 -1
  242. package/esm/locales/es-es.js +1 -1
  243. package/esm/locales/fr-ca.js +1 -1
  244. package/esm/locales/fr-fr.js +1 -1
  245. package/esm/locales/locale.d.ts +38 -4
  246. package/esm/locales/pt-pt.js +1 -1
  247. package/esm/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
  248. package/lib/__internal__/character-count/character-count.style.js +1 -1
  249. package/lib/__internal__/checkable-input/checkable-input.style.js +1 -1
  250. package/lib/__internal__/checkable-input/hidden-checkable-input.style.js +1 -1
  251. package/lib/__internal__/error-border/error-border.style.js +1 -1
  252. package/lib/__internal__/field-help/field-help.style.js +1 -1
  253. package/lib/__internal__/fieldset/__next__/fieldset.style.js +1 -1
  254. package/lib/__internal__/fieldset/fieldset.style.js +1 -1
  255. package/lib/__internal__/form-field/form-field.style.js +1 -1
  256. package/lib/__internal__/full-screen-heading/full-screen-heading.style.js +1 -1
  257. package/lib/__internal__/hint-text/hint-text.style.js +1 -1
  258. package/lib/__internal__/input/input.style.js +1 -1
  259. package/lib/__internal__/input-icon-toggle/input-icon-toggle.style.js +1 -1
  260. package/lib/__internal__/label/label.style.js +1 -1
  261. package/lib/__internal__/legacy-error-border/error-border.style.js +1 -1
  262. package/lib/__internal__/legacy-hint-text/hint-text.style.js +1 -1
  263. package/lib/__internal__/legacy-input/input-presentation.style.js +1 -1
  264. package/lib/__internal__/legacy-input/input.style.js +1 -1
  265. package/lib/__internal__/legacy-label/icon-wrapper.style.js +1 -1
  266. package/lib/__internal__/legacy-label/label.style.js +1 -1
  267. package/lib/__internal__/modal/modal.style.js +1 -1
  268. package/lib/__internal__/popover/popover.style.js +1 -1
  269. package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-label.component.js +1 -1
  270. package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-leading.component.js +1 -1
  271. package/lib/__internal__/popover-menu/menu-item/menu-item-content/menu-item-subtext.component.js +1 -1
  272. package/lib/__internal__/popover-menu/menu-item/menu-item-divider/menu-item-divider.component.js +1 -1
  273. package/lib/__internal__/popover-menu/menu-item/menu-item-heading/menu-item-heading.component.js +1 -1
  274. package/lib/__internal__/popover-menu/menu-item/menu-item.component.js +1 -1
  275. package/lib/__internal__/popover-menu/popover-menu.component.js +1 -1
  276. package/lib/__internal__/validation-message/__next__/validation-message.style.js +1 -1
  277. package/lib/__internal__/validation-message/validation-message.style.js +1 -1
  278. package/lib/__internal__/validations/validation-icon.style.js +1 -1
  279. package/lib/components/accordion/accordion.style.js +1 -1
  280. package/lib/components/action-popover/action-popover.style.js +1 -1
  281. package/lib/components/adaptive-sidebar/adaptive-sidebar.style.js +1 -1
  282. package/lib/components/advanced-color-picker/advanced-color-picker-cell.style.js +1 -1
  283. package/lib/components/advanced-color-picker/advanced-color-picker.style.js +1 -1
  284. package/lib/components/anchor-navigation/anchor-navigation-item/anchor-navigation-item.style.js +1 -1
  285. package/lib/components/anchor-navigation/anchor-navigation.style.js +1 -1
  286. package/lib/components/anchor-navigation/anchor-section-divider.component.js +1 -1
  287. package/lib/components/badge/badge.style.js +1 -1
  288. package/lib/components/batch-selection/batch-selection.style.js +1 -1
  289. package/lib/components/box/box.style.js +1 -1
  290. package/lib/components/breadcrumbs/breadcrumbs.style.js +1 -1
  291. package/lib/components/breadcrumbs/crumb/crumb.style.js +1 -1
  292. package/lib/components/button/__next__/button.style.js +1 -1
  293. package/lib/components/button/button.style.js +1 -1
  294. package/lib/components/button-bar/button-bar.style.js +1 -1
  295. package/lib/components/button-minor/button-minor.style.js +1 -1
  296. package/lib/components/button-toggle/button-toggle-group/button-toggle-group.style.js +1 -1
  297. package/lib/components/button-toggle/button-toggle.style.js +1 -1
  298. package/lib/components/card/card-column/card-column.style.js +1 -1
  299. package/lib/components/card/card-footer/card-footer.style.js +1 -1
  300. package/lib/components/card/card-row/card-row.style.js +1 -1
  301. package/lib/components/card/card.style.js +1 -1
  302. package/lib/components/checkbox/checkbox-group/checkbox-group.style.js +1 -1
  303. package/lib/components/checkbox/checkbox.style.js +1 -1
  304. package/lib/components/confirm/confirm.style.js +1 -1
  305. package/lib/components/content/content.style.js +1 -1
  306. package/lib/components/date/__internal__/calendar/calendar-close-button.style.js +1 -1
  307. package/lib/components/date/__internal__/calendar/calendar-navigation.style.js +1 -1
  308. package/lib/components/date/__internal__/calendar/calendar-select/calendar-select.style.js +1 -1
  309. package/lib/components/date/__internal__/calendar/calendar-weekday.style.js +1 -1
  310. package/lib/components/date/__internal__/date-picker/date-picker.style.js +1 -1
  311. package/lib/components/date/__internal__/date-picker-trigger/date-picker-trigger.style.js +1 -1
  312. package/lib/components/date/date.style.js +1 -1
  313. package/lib/components/date-range/date-range.style.js +1 -1
  314. package/lib/components/decimal/__internal__/decimal-popover-button.style.js +1 -1
  315. package/lib/components/decimal/decimal.style.js +1 -1
  316. package/lib/components/definition-list/definition-list.style.js +1 -1
  317. package/lib/components/detail/detail.style.js +1 -1
  318. package/lib/components/dialog/__internal__/__next__/dialog.style.js +1 -1
  319. package/lib/components/dismissible-box/dismissible-box.style.js +1 -1
  320. package/lib/components/divider/divider.style.js +1 -1
  321. package/lib/components/draggable/draggable-item/draggable-item.style.js +1 -1
  322. package/lib/components/drawer/drawer.style.js +1 -1
  323. package/lib/components/duelling-picklist/duelling-picklist.style.js +1 -1
  324. package/lib/components/duelling-picklist/picklist/picklist.style.js +1 -1
  325. package/lib/components/duelling-picklist/picklist-divider/picklist-divider.style.js +1 -1
  326. package/lib/components/duelling-picklist/picklist-group/picklist-group.style.js +1 -1
  327. package/lib/components/duelling-picklist/picklist-item/picklist-item.style.js +1 -1
  328. package/lib/components/fieldset/fieldset.style.js +1 -1
  329. package/lib/components/file-input/__internal__/file-input-validation/file-input-validation.component.d.ts +8 -0
  330. package/lib/components/file-input/__internal__/file-input-validation/file-input-validation.component.js +1 -0
  331. package/lib/components/file-input/__internal__/file-input-validation/index.d.ts +1 -0
  332. package/lib/components/file-input/__internal__/file-input-validation/index.js +1 -0
  333. package/lib/components/file-input/__internal__/file-input-validation/package.json +5 -0
  334. package/lib/components/file-input/__internal__/file-input.types.d.ts +5 -0
  335. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.component.d.ts +110 -28
  336. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.component.js +1 -1
  337. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.d.ts +30 -11
  338. package/lib/components/file-input/__internal__/file-upload-status/file-upload-status.style.js +1 -1
  339. package/lib/components/file-input/__internal__/file-upload-status/thumbnail-content.component.d.ts +24 -0
  340. package/lib/components/file-input/__internal__/file-upload-status/thumbnail-content.component.js +1 -0
  341. package/lib/components/file-input/__internal__/file-upload-status-list/file-upload-status-list.component.d.ts +17 -0
  342. package/lib/components/file-input/__internal__/file-upload-status-list/file-upload-status-list.component.js +1 -0
  343. package/lib/components/file-input/__internal__/file-upload-status-list/index.d.ts +1 -0
  344. package/lib/components/file-input/__internal__/file-upload-status-list/index.js +1 -0
  345. package/lib/components/file-input/__internal__/file-upload-status-list/package.json +5 -0
  346. package/lib/components/file-input/__internal__/hooks/useFileDropZone.d.ts +20 -0
  347. package/lib/components/file-input/__internal__/hooks/useFileDropZone.js +1 -0
  348. package/lib/components/file-input/__internal__/hooks/useMoveFocusAfterFileRemoval.d.ts +19 -0
  349. package/lib/components/file-input/__internal__/hooks/useMoveFocusAfterFileRemoval.js +1 -0
  350. package/lib/components/file-input/__internal__/hooks/useMoveFocusAfterFileSelection.d.ts +19 -0
  351. package/lib/components/file-input/__internal__/hooks/useMoveFocusAfterFileSelection.js +1 -0
  352. package/lib/components/file-input/__internal__/hooks/useStatusAnnouncement.d.ts +11 -0
  353. package/lib/components/file-input/__internal__/hooks/useStatusAnnouncement.js +1 -0
  354. package/lib/components/file-input/__internal__/hooks/useUploadCompletionAnnouncement.d.ts +11 -0
  355. package/lib/components/file-input/__internal__/hooks/useUploadCompletionAnnouncement.js +1 -0
  356. package/lib/components/file-input/__internal__/utils/focus-next-action.d.ts +18 -0
  357. package/lib/components/file-input/__internal__/utils/focus-next-action.js +1 -0
  358. package/lib/components/file-input/__internal__/utils/split-statuses.d.ts +12 -0
  359. package/lib/components/file-input/__internal__/utils/split-statuses.js +1 -0
  360. package/lib/components/file-input/file-input.component.d.ts +83 -22
  361. package/lib/components/file-input/file-input.component.js +1 -1
  362. package/lib/components/file-input/file-input.style.d.ts +47 -15
  363. package/lib/components/file-input/file-input.style.js +1 -1
  364. package/lib/components/flat-table/flat-table-body-draggable/flat-table-body-draggable.style.js +1 -1
  365. package/lib/components/flat-table/flat-table-cell/flat-table-cell.style.js +1 -1
  366. package/lib/components/flat-table/flat-table-checkbox/flat-table-checkbox.style.js +1 -1
  367. package/lib/components/flat-table/flat-table-head/flat-table-head.style.js +1 -1
  368. package/lib/components/flat-table/flat-table-header/flat-table-header.style.js +1 -1
  369. package/lib/components/flat-table/flat-table-row/flat-table-row.style.js +1 -1
  370. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.style.js +1 -1
  371. package/lib/components/flat-table/flat-table.style.js +1 -1
  372. package/lib/components/flat-table/sort/sort.style.js +1 -1
  373. package/lib/components/form/__internal__/form-summary.style.js +1 -1
  374. package/lib/components/form/form.style.js +1 -1
  375. package/lib/components/form/required-fields-indicator/required-fields-indicator.component.js +1 -1
  376. package/lib/components/global-header/global-header.component.js +1 -1
  377. package/lib/components/grid/grid-container/grid-container.style.js +1 -1
  378. package/lib/components/grid/grid-item/grid-item.style.js +1 -1
  379. package/lib/components/heading/heading.style.js +1 -1
  380. package/lib/components/help/help.style.js +1 -1
  381. package/lib/components/hr/hr.style.js +1 -1
  382. package/lib/components/icon/icon.style.js +1 -1
  383. package/lib/components/icon-button/icon-button.style.js +1 -1
  384. package/lib/components/image/image.style.js +1 -1
  385. package/lib/components/inline-inputs/inline-inputs.style.js +1 -1
  386. package/lib/components/link/link.style.js +1 -1
  387. package/lib/components/link-preview/__internal__/placeholder.component.js +1 -1
  388. package/lib/components/link-preview/link-preview.style.js +1 -1
  389. package/lib/components/loader/__next__/internal/star.style.js +1 -1
  390. package/lib/components/loader/__next__/loader.style.js +1 -1
  391. package/lib/components/loader/loader-square.style.js +1 -1
  392. package/lib/components/loader/loader.style.js +1 -1
  393. package/lib/components/loader-bar/loader-bar.style.js +1 -1
  394. package/lib/components/loader-spinner/loader-spinner.style.js +1 -1
  395. package/lib/components/loader-star/internal/star.style.js +1 -1
  396. package/lib/components/loader-star/loader-star.style.js +1 -1
  397. package/lib/components/menu/__internal__/submenu/submenu.style.js +1 -1
  398. package/lib/components/menu/menu-divider/menu-divider.style.js +1 -1
  399. package/lib/components/menu/menu-full-screen/menu-full-screen.style.js +1 -1
  400. package/lib/components/menu/menu-item/menu-item.style.js +1 -1
  401. package/lib/components/menu/menu-segment-title/menu-segment-title.style.js +1 -1
  402. package/lib/components/menu/menu.style.js +1 -1
  403. package/lib/components/menu/scrollable-block/scrollable-block.style.js +1 -1
  404. package/lib/components/message/message.style.js +1 -1
  405. package/lib/components/multi-action-button/multi-action-button.style.js +1 -1
  406. package/lib/components/navigation-bar/navigation-bar.style.js +1 -1
  407. package/lib/components/note/note.style.js +1 -1
  408. package/lib/components/numeral-date/numeral-date.style.js +1 -1
  409. package/lib/components/option-tile/option-tile.style.js +1 -1
  410. package/lib/components/pager/__internal__/pagination-navigation.style.js +1 -1
  411. package/lib/components/pager/pager.style.js +1 -1
  412. package/lib/components/pages/page/page.style.js +1 -1
  413. package/lib/components/pages/pages.style.js +1 -1
  414. package/lib/components/password/password.style.js +1 -1
  415. package/lib/components/pill/pill.style.js +1 -1
  416. package/lib/components/pod/pod.style.js +1 -1
  417. package/lib/components/popover-container/popover-container.style.js +1 -1
  418. package/lib/components/portal/portal.js +1 -1
  419. package/lib/components/portal/portal.style.js +1 -1
  420. package/lib/components/portrait/portrait.style.js +1 -1
  421. package/lib/components/preview/preview.style.js +1 -1
  422. package/lib/components/profile/profile.style.js +1 -1
  423. package/lib/components/progress-tracker/progress-tracker.style.js +1 -1
  424. package/lib/components/radio-button/radio-button-group/radio-button-group.style.js +1 -1
  425. package/lib/components/radio-button/radio-button.style.js +1 -1
  426. package/lib/components/search/__internal__/results-announcement.component.js +1 -1
  427. package/lib/components/search/search.component.js +1 -1
  428. package/lib/components/select/__internal__/list-action-button/list-action-button.style.js +1 -1
  429. package/lib/components/select/__internal__/select-list/select-list.style.js +1 -1
  430. package/lib/components/select/__internal__/select-textbox/select-textbox.style.js +1 -1
  431. package/lib/components/select/__internal__/utils/matching-text.style.js +1 -1
  432. package/lib/components/select/multi-select/multi-select.style.js +1 -1
  433. package/lib/components/select/option/option.style.js +1 -1
  434. package/lib/components/select/option-group-header/option-group-header.style.js +1 -1
  435. package/lib/components/select/option-row/option-row.style.js +1 -1
  436. package/lib/components/select/select.style.js +1 -1
  437. package/lib/components/settings-row/settings-row.style.js +1 -1
  438. package/lib/components/sidebar/__internal__/sidebar-content/sidebar-content.style.js +1 -1
  439. package/lib/components/sidebar/__internal__/sidebar-footer/sidebar-footer.style.js +1 -1
  440. package/lib/components/sidebar/__internal__/sidebar-header/sidebar-header.style.js +1 -1
  441. package/lib/components/sidebar/sidebar.style.js +1 -1
  442. package/lib/components/simple-color-picker/simple-color/simple-color.style.js +1 -1
  443. package/lib/components/simple-color-picker/simple-color-picker.style.js +1 -1
  444. package/lib/components/split-button/split-button-toggle.style.js +1 -1
  445. package/lib/components/split-button/split-button.style.js +1 -1
  446. package/lib/components/step-flow/step-flow.style.js +1 -1
  447. package/lib/components/step-sequence/step-sequence-item/step-sequence-item.style.js +1 -1
  448. package/lib/components/step-sequence/step-sequence.style.js +1 -1
  449. package/lib/components/switch/switch.style.js +1 -1
  450. package/lib/components/table/table-body/table-body.component.js +1 -1
  451. package/lib/components/table/table-cell/table-cell.style.js +1 -1
  452. package/lib/components/table/table-foot/table-foot.component.js +1 -1
  453. package/lib/components/table/table-head/table-head.component.js +1 -1
  454. package/lib/components/table/table-header/__internal__/sort/sort.style.js +1 -1
  455. package/lib/components/table/table-header/table-header.style.js +1 -1
  456. package/lib/components/table/table-row/table-row.style.js +1 -1
  457. package/lib/components/table/table.style.js +1 -1
  458. package/lib/components/tabs/__next__/tabs.style.js +1 -1
  459. package/lib/components/text-editor/__internal__/__ui__/CharacterCounter/character-counter.style.js +1 -1
  460. package/lib/components/text-editor/__internal__/__ui__/ContentEditor/content-editor.style.js +1 -1
  461. package/lib/components/text-editor/__internal__/__ui__/Mentions/mentions.style.js +1 -1
  462. package/lib/components/text-editor/__internal__/__ui__/Placeholder/placeholder.style.js +1 -1
  463. package/lib/components/text-editor/__internal__/__ui__/Toolbar/button-group/button-group.style.js +1 -1
  464. package/lib/components/text-editor/__internal__/__ui__/Toolbar/buttons/typography-dropdown/dropdown.style.js +1 -1
  465. package/lib/components/text-editor/__internal__/__ui__/Toolbar/toolbar.style.js +1 -1
  466. package/lib/components/text-editor/text-editor.style.js +1 -1
  467. package/lib/components/textarea/textarea.style.js +1 -1
  468. package/lib/components/textbox/__internal__/__next__/text-input.style.js +1 -1
  469. package/lib/components/tile/tile-footer/tile-footer.style.js +1 -1
  470. package/lib/components/tile/tile.style.js +1 -1
  471. package/lib/components/tile-select/__internal__/accordion/accordion.style.js +1 -1
  472. package/lib/components/tile-select/tile-select.style.js +1 -1
  473. package/lib/components/time/time.style.js +1 -1
  474. package/lib/components/toast/toast.style.js +1 -1
  475. package/lib/components/tokens-wrapper/tokens-wrapper.component.js +1 -1
  476. package/lib/components/tooltip/tooltip-pointer.style.js +1 -1
  477. package/lib/components/tooltip/tooltip.style.js +1 -1
  478. package/lib/components/typography/__internal__/__next__/typography.style.js +1 -1
  479. package/lib/components/typography/typography.style.js +1 -1
  480. package/lib/components/vertical-divider/vertical-divider.style.js +1 -1
  481. package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-divider/responsive-vertical-menu-divider.style.js +1 -1
  482. package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu-item/responsive-vertical-menu-item.style.js +1 -1
  483. package/lib/components/vertical-menu/responsive-vertical-menu/responsive-vertical-menu.style.js +1 -1
  484. package/lib/components/vertical-menu/vertical-menu.style.js +1 -1
  485. package/lib/hooks/__internal__/useIsFileDraggedOverDocument/index.d.ts +1 -0
  486. package/lib/hooks/__internal__/useIsFileDraggedOverDocument/index.js +1 -0
  487. package/lib/hooks/__internal__/useIsFileDraggedOverDocument/package.json +5 -0
  488. package/lib/hooks/__internal__/useIsFileDraggedOverDocument/useIsFileDraggedOverDocument.d.ts +10 -0
  489. package/lib/hooks/__internal__/useIsFileDraggedOverDocument/useIsFileDraggedOverDocument.js +1 -0
  490. package/lib/locales/de-de.js +1 -1
  491. package/lib/locales/en-gb.js +1 -1
  492. package/lib/locales/es-es.js +1 -1
  493. package/lib/locales/fr-ca.js +1 -1
  494. package/lib/locales/fr-fr.js +1 -1
  495. package/lib/locales/locale.d.ts +38 -4
  496. package/lib/locales/pt-pt.js +1 -1
  497. package/lib/style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component.js +1 -1
  498. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { type FileUploadStatusProps } from "../file-upload-status";
3
+ export interface FileUploadStatusListProps {
4
+ items: FileUploadStatusProps[];
5
+ label: string;
6
+ statusSummary?: string;
7
+ errorSummary?: string;
8
+ moveFocusAfterAction: (element: HTMLElement, removalAnnouncement?: string) => void;
9
+ maxHeight?: string;
10
+ minHeight?: string;
11
+ multiple?: boolean;
12
+ removalAnnouncementId?: string;
13
+ onPreviewActivate?: () => void;
14
+ announceInitialErrors?: boolean;
15
+ }
16
+ declare const FileUploadStatusList: ({ items, label, statusSummary, errorSummary, moveFocusAfterAction, maxHeight, minHeight, multiple, removalAnnouncementId, onPreviewActivate, announceInitialErrors, }: FileUploadStatusListProps) => React.JSX.Element;
17
+ export default FileUploadStatusList;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("../../../../__internal__/utils/helpers/guid/index.js"),i=require("../file-upload-status/file-upload-status.component.js"),n=require("../../file-input.style.js");function l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},i=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),i.forEach((function(t){l(e,t,r[t])}))}return e}exports.default=({items:l,label:u,statusSummary:o,errorSummary:s,moveFocusAfterAction:c,maxHeight:d,minHeight:p,multiple:f,removalAnnouncementId:m,onPreviewActivate:y,announceInitialErrors:b})=>{const j=t.useRef(r.default()),v=t.useRef(r.default()),O=t.useRef(r.default());return e.jsxs(n.StyledFileUploadStatusListContainer,{$multiple:f,children:[e.jsxs(n.StyledFileUploadStatusListLabelSet,{children:[e.jsx(n.StyledFileUploadStatusListLabel,{variant:"p",id:j.current,$visuallyHidden:!f,children:u}),o&&e.jsx(n.StyledFileUploadStatusListLabel,{variant:"p",id:v.current,$visuallyHidden:!f,children:o}),s&&e.jsx(n.StyledFileUploadStatusListErrorSummary,{variant:"p",id:O.current,children:s})]}),e.jsx(n.StyledFileUploadStatusList,{"data-role":"file-upload-status-list",tabIndex:-1,"aria-labelledby":[j.current,o?v.current:void 0,s?O.current:void 0].filter(Boolean).join(" "),"aria-describedby":m,$hasMultipleItems:l.length>1,children:l.map(((t,r)=>{var n,u,o;return e.jsx("li",{children:e.jsx(i.FileUploadStatus,(u=a({},t),o={isInMultiItemList:l.length>1,moveFocusAfterAction:c,maxHeight:d,minHeight:p,multiple:f,removalAnnouncementId:m,onPreviewActivate:y,announceInitialError:b},o=null!=o?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(o)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(o)).forEach((function(e){Object.defineProperty(u,e,Object.getOwnPropertyDescriptor(o,e))})),u))},null!==(n=t.id)&&void 0!==n?n:`${t.filename}-${l.slice(0,r).filter((({filename:e})=>e===t.filename)).length}`)}))})]})};
@@ -0,0 +1 @@
1
+ export { default } from "./file-upload-status-list.component";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./file-upload-status-list.component.js");exports.default=e.default;
@@ -0,0 +1,5 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "../../../../../esm/components/file-input/__internal__/file-upload-status-list/index.js",
4
+ "types": "./index.d.ts"
5
+ }
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ interface UseFileDropZoneArgs {
3
+ disabled?: boolean;
4
+ onFilesDropped: (files: FileList) => void;
5
+ onDropComplete?: () => void;
6
+ }
7
+ interface UseFileDropZoneResult {
8
+ isDraggedOver: boolean;
9
+ onDragOver: (event: React.DragEvent<HTMLDivElement>) => void;
10
+ onDragLeave: (event: React.DragEvent<HTMLDivElement>) => void;
11
+ onDrop: (event: React.DragEvent<HTMLDivElement>) => void;
12
+ }
13
+ /**
14
+ * Drop-zone handlers for FileInput. `isDraggedOver` is true while files are
15
+ * dragged over the zone. A drop passes the files to `onFilesDropped`, then
16
+ * calls `onDropComplete`. Nothing happens while `disabled` or when no files
17
+ * were dropped.
18
+ */
19
+ export default function useFileDropZone({ disabled, onFilesDropped, onDropComplete, }: UseFileDropZoneArgs): UseFileDropZoneResult;
20
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.default=function({disabled:r,onFilesDropped:t,onDropComplete:a}){const[n,s]=e.useState(!1);return{isDraggedOver:n,onDragOver:e=>{e.preventDefault(),!r&&e.dataTransfer.types.includes("Files")&&s(!0)},onDragLeave:e=>{e.preventDefault();const{currentTarget:r,relatedTarget:t}=e;t instanceof Node&&r.contains(t)||s(!1)},onDrop:e=>{e.preventDefault(),s(!1),!r&&e.dataTransfer.files.length&&(t(e.dataTransfer.files),null==a||a())}}};
@@ -0,0 +1,19 @@
1
+ import { type RefObject } from "react";
2
+ interface UseMoveFocusAfterFileRemovalProps {
3
+ statusListRef: RefObject<HTMLElement>;
4
+ fallbackRef: RefObject<HTMLElement | null>;
5
+ /** Runs just before the removal announcement is shown, e.g. to clear the live region. */
6
+ onRemovalAnnouncement: () => void;
7
+ }
8
+ /**
9
+ * Keeps focus in the field when a status action (such as Delete) removes its
10
+ * card. Call `moveFocusAfterAction` from the action. When it is given an
11
+ * announcement, that text is exposed as `removalAnnouncement` for the caller
12
+ * to add to the newly focused element's accessible description.
13
+ */
14
+ export default function useMoveFocusAfterFileRemoval({ statusListRef, fallbackRef, onRemovalAnnouncement, }: UseMoveFocusAfterFileRemovalProps): {
15
+ removalAnnouncement: string;
16
+ clearRemovalAnnouncement: () => void;
17
+ moveFocusAfterAction: (element: HTMLElement, announcement?: string) => void;
18
+ };
19
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("react-dom"),n=require("../utils/focus-next-action.js");exports.default=function({statusListRef:r,fallbackRef:u,onRemovalAnnouncement:o}){const[c,a]=e.useState("");return{removalAnnouncement:c,clearRemovalAnnouncement:e.useCallback((()=>a("")),[]),moveFocusAfterAction:(e,c)=>n.default(e,(()=>n.getStatusFocusTarget(r.current,u.current)),c?(e=>n=>{n&&t.flushSync((()=>{o(),a(e)}))})(c):void 0)}};
@@ -0,0 +1,19 @@
1
+ import { type RefObject } from "react";
2
+ interface UseMoveFocusAfterFileSelectionProps {
3
+ multiple?: boolean;
4
+ hasFiles: boolean;
5
+ fallbackRef: RefObject<HTMLButtonElement | null>;
6
+ }
7
+ /**
8
+ * In single-file mode, moves focus to the file's status card after a file is
9
+ * selected: its first action, else the status list. Until the consumer
10
+ * renders the status, focus is kept on the Select file button, and the move
11
+ * is canceled if focus leaves that button. Does nothing in multiple-file
12
+ * mode.
13
+ */
14
+ export default function useMoveFocusAfterFileSelection({ multiple, hasFiles, fallbackRef, }: UseMoveFocusAfterFileSelectionProps): {
15
+ statusListRef: RefObject<HTMLDivElement>;
16
+ requestFileStatusFocus: () => void;
17
+ cancelFileStatusFocus: () => void;
18
+ };
19
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../utils/focus-next-action.js");exports.default=function({multiple:r,hasFiles:u,fallbackRef:s}){const c=e.useRef(null),n=e.useRef(!1),[a,i]=e.useState(0);return e.useEffect((()=>{r?n.current=!1:n.current&&(u?(n.current=!1,requestAnimationFrame((()=>{var e;null===(e=t.getStatusFocusTarget(c.current,s.current))||void 0===e||e.focus()}))):requestAnimationFrame((()=>{var e;return null===(e=s.current)||void 0===e?void 0:e.focus()})))}),[s,a,u,r]),{statusListRef:c,cancelFileStatusFocus:()=>{n.current=!1},requestFileStatusFocus:()=>{n.current=!0,i((e=>e+1))}}};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Drives the file input's polite live region. Announcing the same message
3
+ * twice in a row clears the region first and refills it two frames later,
4
+ * so screen readers treat the repeat as a new announcement. A message stays
5
+ * until the next announcement or `clearStatusAnnouncement`.
6
+ */
7
+ export default function useStatusAnnouncement(): {
8
+ statusAnnouncement: string;
9
+ announceStatus: (message: string) => void;
10
+ clearStatusAnnouncement: () => void;
11
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.default=function(){const[r,t]=e.useState(""),n=e.useRef(""),u=e.useRef(),c=e.useCallback((()=>{void 0!==u.current&&(cancelAnimationFrame(u.current),u.current=void 0)}),[]),a=e.useCallback((()=>{c(),n.current="",t("")}),[c]),s=e.useCallback((e=>{if(c(),n.current!==e)return n.current=e,void t(e);t(""),u.current=requestAnimationFrame((()=>{u.current=requestAnimationFrame((()=>{t(e),u.current=void 0}))}))}),[c]);return e.useEffect((()=>c),[c]),{statusAnnouncement:r,announceStatus:s,clearStatusAnnouncement:a}};
@@ -0,0 +1,11 @@
1
+ import { type FileUploadStatusProps } from "../file-upload-status";
2
+ /**
3
+ * Calls `onFilesCompleted` with the filenames that have newly transitioned
4
+ * to `"completed"` since the last render, so the caller can announce them
5
+ * through one persistent live region.
6
+ *
7
+ * Statuses that are already `"completed"` on the first render are treated as a
8
+ * starting snapshot, so mounting a `FileInput` with existing statuses never
9
+ * fires an announcement.
10
+ */
11
+ export default function useUploadCompletionAnnouncement(currentStatuses: FileUploadStatusProps[], onFilesCompleted: (filenames: string[]) => void): void;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.default=function(t,r){const n=e.useRef(!0),u=e.useRef([]);e.useEffect((()=>{const e=t.filter((({status:e})=>"completed"===e)),s=new Set(u.current.flatMap((({id:e})=>e?[e]:[]))),a=new Map;u.current.forEach((({id:e,filename:t})=>{var r;e||a.set(t,(null!==(r=a.get(t))&&void 0!==r?r:0)+1)}));const c=e.flatMap((({id:e,filename:t})=>{if(e)return s.has(e)?[]:[t];var r;const n=null!==(r=a.get(t))&&void 0!==r?r:0;return 0===n?[t]:(a.set(t,n-1),[])}));!n.current&&c.length&&r(c),u.current=e,n.current=!1}),[t,r])};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Picks where focus should land inside the status lists: the first status
3
+ * action, else the first status list, else `fallback` (the Select file
4
+ * button).
5
+ */
6
+ export declare const getStatusFocusTarget: (container: HTMLElement | null, fallback: HTMLElement | null) => HTMLElement | null;
7
+ /**
8
+ * Keeps focus in the field when a status action removes its own card.
9
+ *
10
+ * Call it from the action's click handler. On the next frame, if `element`
11
+ * has been removed, focus moves to the nearest action still in the same
12
+ * list: the next one, else the previous one, else whatever `getFallback`
13
+ * returns. If `element` is still in the DOM, nothing happens.
14
+ *
15
+ * `onRemoved` receives the target before focus moves, so the caller can add
16
+ * the removal announcement to the target's description first.
17
+ */
18
+ export default function focusNextAction(element: HTMLElement, getFallback: () => HTMLElement | null, onRemoved?: (focusTarget: HTMLElement | null) => void): void;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e="button, a[href]";exports.default=function(t,o,n){var r;const l=Array.from((null===(r=t.closest('[role="list"], ul'))||void 0===r?void 0:r.querySelectorAll(e))||[]),u=l.indexOf(t),i=e=>{n?(n(e),requestAnimationFrame((()=>null==e?void 0:e.focus()))):null==e||e.focus()};requestAnimationFrame((()=>{if(document.contains(t))return;const e=l.slice(u+1).find((e=>document.contains(e))),n=l.slice(0,u).reverse().find((e=>document.contains(e)));e?i(e):n?i(n):requestAnimationFrame((()=>i(o())))}))},exports.getStatusFocusTarget=(t,o)=>{var n,r;return null!==(r=null!==(n=null==t?void 0:t.querySelector(e))&&void 0!==n?n:null==t?void 0:t.querySelector('[data-role="file-upload-status-list"]'))&&void 0!==r?r:o};
@@ -0,0 +1,12 @@
1
+ import { type CurrentFileStatusCounts } from "../../../../locales/locale";
2
+ import { type FileUploadStatusProps } from "../file-upload-status";
3
+ /**
4
+ * Normalizes the `uploadStatus` prop to an array and splits it into current
5
+ * and previously uploaded statuses, each in their original order.
6
+ */
7
+ export default function splitStatuses(uploadStatus: FileUploadStatusProps | FileUploadStatusProps[] | undefined): {
8
+ currentStatuses: FileUploadStatusProps[];
9
+ previouslyUploadedStatuses: FileUploadStatusProps[];
10
+ };
11
+ /** Counts statuses by state, for the current files error summary. */
12
+ export declare function countStatuses(statuses: FileUploadStatusProps[]): CurrentFileStatusCounts;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.countStatuses=function(t){const e=e=>t.filter((({status:t})=>t===e)).length;return{totalCount:t.length,uploadingCount:e("uploading"),completedCount:e("completed"),errorCount:e("error")}},exports.default=function(t){const e=(Array.isArray(t)?t:[t]).filter(Boolean);return{currentStatuses:e.filter((({status:t})=>"previously"!==t)),previouslyUploadedStatuses:e.filter((({status:t})=>"previously"===t))}};
@@ -1,39 +1,100 @@
1
1
  import React from "react";
2
- import { MarginProps } from "styled-system";
3
- import { ValidationProps } from "../../__internal__/validations";
4
- import { InputProps } from "../../__internal__/legacy-input";
5
- import { TagProps } from "../../__internal__/utils/helpers/tags";
6
- import { FileUploadStatusProps } from "./__internal__/file-upload-status";
7
- export interface FileInputProps extends Pick<ValidationProps, "error">, Pick<InputProps, "id" | "name" | "required">, TagProps, MarginProps {
8
- /** Which file format(s) to accept. Will be passed to the underlying HTML input.
9
- * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept */
2
+ import { type MarginProps } from "styled-system";
3
+ import { type ValidationProps } from "../../__internal__/validations";
4
+ import { type TagProps } from "../../__internal__/utils/helpers/tags";
5
+ import { type FileUploadStatusProps } from "./__internal__/file-upload-status";
6
+ export interface FileInputProps extends Pick<React.InputHTMLAttributes<HTMLInputElement>, "id" | "name">, TagProps, MarginProps {
7
+ /**
8
+ * File type(s) used by the native file picker through the HTML input's
9
+ * `accept` attribute. Consumers must validate dropped files.
10
+ */
10
11
  accept?: string;
11
- /** Text to appear on the main button. Defaults to "Select file" */
12
+ /**
13
+ * Text displayed on the Select file button, which opens the native file
14
+ * picker. Defaults to the localized "Select file", or "Select files" when
15
+ * `multiple` is `true`. The default drag-and-drop instruction reuses this
16
+ * text.
17
+ */
12
18
  buttonText?: string;
13
- /** Explanatory text to appear inside the input area. Defaults to "or drag and drop your file" */
19
+ /**
20
+ * Indicates an error. A string is displayed as a validation message above the
21
+ * drop zone; `true` shows the error border without a message. Either marks
22
+ * the Select file button as invalid.
23
+ */
24
+ error?: ValidationProps["error"];
25
+ /**
26
+ * Supporting text displayed in the drop zone. Defaults to the localized
27
+ * instruction to drag and drop files.
28
+ */
14
29
  dragAndDropText?: string;
15
- /** A hint string rendered before the input but after the label. Intended to describe the purpose or content of the input. */
30
+ /**
31
+ * Help content displayed beneath the label and announced with the Select
32
+ * file button.
33
+ */
16
34
  inputHint?: React.ReactNode;
17
- /** Sets the default layout to vertical - with the button below the explanatory text rather than next to it.
18
- * This is the equivalent of removing the maxHeight prop - it will be over-ridden if this prop is set explicitly. */
35
+ /**
36
+ * Controls the drop-zone layout. Defaults to `true`, which stacks its
37
+ * contents vertically; set to `false` for a horizontal layout.
38
+ */
19
39
  isVertical?: boolean;
20
- /** Label content */
40
+ /**
41
+ * Visible label for the field. It also forms the Select file button's
42
+ * accessible name.
43
+ */
21
44
  label?: string;
22
- /** A valid CSS string for the max-height CSS property. */
45
+ /**
46
+ * Maximum height of the drop zone, as a valid CSS value. In single-file mode,
47
+ * it also applies to the status card that replaces the drop zone. In
48
+ * multiple-file mode, status cards size to their content.
49
+ */
23
50
  maxHeight?: string;
24
- /** A valid CSS string for the max-width CSS property. Defaults to the same as the minWidth. */
51
+ /**
52
+ * Maximum width of the drop zone and status cards, as a valid CSS value.
53
+ * When omitted, the component fills the available width of its container.
54
+ */
25
55
  maxWidth?: string;
26
- /** A valid CSS string for the min-height CSS property. */
56
+ /**
57
+ * Minimum height of the drop zone, as a valid CSS value. In single-file mode,
58
+ * it also applies to the status card that replaces the drop zone. In
59
+ * multiple-file mode, status cards size to their content.
60
+ */
27
61
  minHeight?: string;
28
- /** A valid CSS string for the min-width CSS property. */
62
+ /**
63
+ * Minimum width of the drop zone and status cards, as a valid CSS value,
64
+ * capped at the width of the container. When omitted, the component may
65
+ * shrink to fit its container.
66
+ */
29
67
  minWidth?: string;
30
- /** onChange event handler. Accepts a list of all files currently entered to the input. */
68
+ /**
69
+ * Controls whether multiple files can be selected. Defaults to `false`,
70
+ * which hides the drop zone while a status card is present; set to `true`
71
+ * to keep the drop zone available alongside status cards.
72
+ */
73
+ multiple?: boolean;
74
+ /** Disables file selection and dropping files onto the drop zone. */
75
+ disabled?: boolean;
76
+ /** Called when files are selected or dropped, with all received files. */
31
77
  onChange: (files: FileList) => void;
32
- /** used to control how to display the progress of uploaded file(s) within the component */
78
+ /**
79
+ * Status card data for files that are uploading, completed, previously
80
+ * uploaded, or in error. Each item renders a card showing the filename, its
81
+ * state, and its actions. In single-file mode, a status card replaces the
82
+ * drop zone; in multiple-file mode, status cards are displayed alongside it.
83
+ */
33
84
  uploadStatus?: FileUploadStatusProps | FileUploadStatusProps[];
34
- /** Flag to configure component as mandatory. */
85
+ /**
86
+ * Marks the field as required with a visual indicator and an accessible
87
+ * description on the Select file button. The hidden native input is not
88
+ * marked `required`, so browser validation never blocks form submission;
89
+ * validate on submit and supply `error` instead.
90
+ */
35
91
  required?: boolean;
36
- /** Render the ValidationMessage above the FileInput */
92
+ /**
93
+ * @deprecated No replacement: validation is shown above the drop zone by
94
+ * default, so omit this prop. `false`, which renders validation below the
95
+ * drop zone, is retained for existing consumers and will be removed in a
96
+ * future major release.
97
+ */
37
98
  validationMessagePositionTop?: boolean;
38
99
  }
39
100
  export declare const FileInput: React.ForwardRefExoticComponent<FileInputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");require("../../style/utils/filter-styled-system-padding-props.js");var r=require("../../style/utils/filter-styled-system-margin-props.js"),n=require("../../__internal__/input-behaviour/input-behaviour.component.js"),i=require("../../__internal__/form-field/form-field.component.js"),a=require("../../hooks/__internal__/useUniqueId/index.js"),o=require("../../hooks/__internal__/useInputAccessibility/useInputAccessibility.js"),l=require("../../__internal__/validation-message/validation-message.component.js"),s=require("./file-input.style.js"),u=require("../../__internal__/legacy-error-border/error-border.style.js"),d=require("../button-minor/button-minor.component.js"),p=require("../typography/typography.component.js"),c=require("./__internal__/file-upload-status/file-upload-status.component.js"),f=require("../box/box.component.js"),m=require("../../hooks/__internal__/useLocale/useLocale.js"),g=require("../../__internal__/legacy-hint-text/hint-text.component.js");function v(e){return e&&e.__esModule?e:{default:e}}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){y(e,t,r[t])}))}return e}function b(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const h=v(t).default.forwardRef(((v,y)=>{var{accept:h,buttonText:x,"data-element":_,"data-role":O,dragAndDropText:q,error:P,label:I,id:D,inputHint:S,isVertical:w,maxHeight:T,maxWidth:F,minHeight:E,minWidth:H="280px",name:k,onChange:L,required:A,uploadStatus:M=[],validationMessagePositionTop:W=!0}=v,R=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(v,["accept","buttonText","data-element","data-role","dragAndDropText","error","label","id","inputHint","isVertical","maxHeight","maxWidth","minHeight","minWidth","name","onChange","required","uploadStatus","validationMessagePositionTop"]);const C=m.default(),B=x||C.fileInput.selectFile(),U=q||C.fileInput.dragAndDrop(),V={maxHeight:T||void 0,maxWidth:F||H,minHeight:E,minWidth:H},[N,z]=a.default(D,k),[G,J]=t.useState(!1),[K,Q]=t.useState(!1),X=t.useRef(null),Y=e=>{var t;e.preventDefault(),(null===(t=e.dataTransfer)||void 0===t?void 0:t.types.includes("Files"))&&Q(!0)},Z=e=>{e.preventDefault(),Q(!1)};t.useEffect((()=>(document.addEventListener("dragover",Y),document.addEventListener("drop",Z),document.addEventListener("dragleave",Z),()=>{document.removeEventListener("dragover",Y),document.removeEventListener("drop",Z),document.removeEventListener("dragleave",Z)})),[]);const $=e=>{null==L||L(e)},{labelId:ee,validationId:te}=o.default({id:N,validationRedesignOptIn:!0,error:P,label:I}),re=Array.isArray(M)?M:[M],ne=e.jsxs(e.Fragment,{children:[S&&e.jsx(g.HintText,{children:S}),e.jsxs(f.Box,{position:"relative",children:[W&&e.jsxs(e.Fragment,{children:[e.jsx(l.default,{error:P,validationId:te,validationMessagePositionTop:W,"data-role":"validation-message-top"}),P&&e.jsx(u.default,{warning:!1})]}),e.jsx(s.StyledHiddenFileInput,j(b(j({},A&&{required:A}),{accept:h,"aria-invalid":!!P,id:N,ref:e=>{X.current=e,"function"==typeof y?y(e):y&&(y.current=e)},name:z,onChange:e=>{$(e.target.files)},type:"file"}),R)),e.jsxs(s.StyledFileInputPresentation,b(j({"data-role":"file-input-presentation",isDraggedOver:G,isDraggingFile:K,error:P,onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),J(!1)},onDragOver:e=>{var t;e.preventDefault(),(null===(t=e.dataTransfer)||void 0===t?void 0:t.types.includes("Files"))&&J(!0)},onDrop:e=>{e.preventDefault(),J(!1),$(e.dataTransfer.files)},isVertical:w},V),{children:[e.jsx(d.ButtonMinor,{buttonType:"primary",onClick:()=>{var e;null===(e=X.current)||void 0===e||e.click()},children:B}),e.jsx(p.Typography,{m:0,children:U})]})),!W&&e.jsxs(e.Fragment,{children:[e.jsx(l.default,{error:P,validationId:te,validationMessagePositionTop:W,"data-role":"validation-message-bottom"}),P&&e.jsx(u.default,{warning:!1})]})]})]});return e.jsx(n.InputBehaviour,{children:e.jsx(i.default,b(j({error:P,label:I,labelId:ee,id:N,isRequired:A,"data-component":"file-input","data-role":O,"data-element":_,validationRedesignOptIn:!0},r.default(R)),{children:0===re.length?ne:re.map((r=>t.createElement(s.StyledFileInputPresentation,b(j({hasUploadStatus:!0},V),{key:r.filename}),e.jsx(c.FileUploadStatus,j({},r)))))}))})}));h.displayName="FileInput",exports.FileInput=h,exports.default=h;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react");require("../../style/utils/filter-styled-system-padding-props.js");var r=require("../../style/utils/filter-styled-system-margin-props.js"),n=require("../../__internal__/input-behaviour/input-behaviour.component.js"),i=require("../../__internal__/form-field/form-field.component.js"),l=require("../../__internal__/utils/helpers/combine-refs/index.js"),o=require("../../hooks/__internal__/useUniqueId/index.js"),a=require("../../hooks/__internal__/useInputAccessibility/useInputAccessibility.js"),u=require("../../hooks/__internal__/useIsFileDraggedOverDocument/useIsFileDraggedOverDocument.js"),s=require("./__internal__/hooks/useFileDropZone.js"),d=require("./file-input.style.js"),c=require("./__internal__/file-upload-status-list/file-upload-status-list.component.js"),p=require("./__internal__/file-input-validation/file-input-validation.component.js"),m=require("./__internal__/hooks/useUploadCompletionAnnouncement.js"),f=require("./__internal__/hooks/useMoveFocusAfterFileSelection.js"),_=require("./__internal__/hooks/useStatusAnnouncement.js"),v=require("./__internal__/hooks/useMoveFocusAfterFileRemoval.js"),h=require("./__internal__/utils/split-statuses.js"),g=require("../button/__next__/button.component.js"),b=require("../typography/typography.component.js"),y=require("../../__internal__/label/label.component.js"),j=require("../../__internal__/hint-text/hint-text.component.js"),x=require("../box/box.component.js"),O=require("../../hooks/__internal__/useLocale/useLocale.js");function S(e){return e&&e.__esModule?e:{default:e}}function q(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){q(e,t,r[t])}))}return e}function F(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e}const A=S(t).default.forwardRef(((S,q)=>{var{accept:A,buttonText:$,"data-element":I,"data-role":P,disabled:k,dragAndDropText:C,error:R,label:H,id:w,inputHint:T,isVertical:W=!0,maxHeight:B,maxWidth:L,minHeight:M,minWidth:E,multiple:U=!1,name:z,onChange:V,required:Z,uploadStatus:N,validationMessagePositionTop:G=!0}=S,J=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(S,["accept","buttonText","data-element","data-role","disabled","dragAndDropText","error","label","id","inputHint","isVertical","maxHeight","maxWidth","minHeight","minWidth","multiple","name","onChange","required","uploadStatus","validationMessagePositionTop"]);const K=O.default(),{dragAndDrop:Q,announcements:X,currentFiles:Y,currentFilesProgressSummary:ee,currentFilesErrorSummary:te,previouslyUploadedFiles:re,requiredDescription:ne,selectFile:ie}=K.fileInput,{filesAdded:le,uploadComplete:oe}=X,[ae,ue]=o.default(w,z),se=`${ae}-button`,de=`${ae}-status-announcement`,ce=`${ae}-removal-announcement`,pe=Z?`${ae}-required`:void 0,me=t.useRef(null),fe=t.useRef(null),_e=u.default(),{currentStatuses:ve,previouslyUploadedStatuses:he}=t.useMemo((()=>h.default(N)),[N]),ge=h.countStatuses(ve),be=ve.length>0||he.length>0,ye=U||!be,[je,xe]=t.useState(!1);t.useEffect((()=>xe(!0)),[]),t.useEffect((()=>{var e;be&&(null===(e=me.current)||void 0===e?void 0:e.value)&&(me.current.value="")}),[be,N]);const{statusAnnouncement:Oe,announceStatus:Se,clearStatusAnnouncement:qe}=_.default(),[De,Fe]=t.useState(!1);m.default(ve,t.useCallback((e=>{Fe(!1),Se(oe(e))}),[Se,oe]));const{statusListRef:Ae,requestFileStatusFocus:$e,cancelFileStatusFocus:Ie}=f.default({multiple:U,hasFiles:be,fallbackRef:fe}),{removalAnnouncement:Pe,clearRemovalAnnouncement:ke,moveFocusAfterAction:Ce}=v.default({statusListRef:Ae,fallbackRef:fe,onRemovalAnnouncement:qe}),Re=e=>{!k&&e.length&&ye&&(U||1!==e.length||$e(),V(e),!U&&e.length>1?qe():(Fe(!0),Se(le(Array.from(e,(({name:e})=>e))))))},{isDraggedOver:He,onDragOver:we,onDragLeave:Te,onDrop:We}=s.default({disabled:k,onFilesDropped:Re,onDropComplete:()=>{var e;return null===(e=fe.current)||void 0===e?void 0:e.focus()}}),{labelId:Be,validationId:Le,fieldHelpId:Me,ariaDescribedBy:Ee}=a.default({id:ae,validationRedesignOptIn:!0,error:R,label:H,fieldHelp:T}),Ue=[Pe?ce:void 0,De&&Oe?de:void 0,pe,Ee].filter(Boolean).join(" "),ze=$||ie(U),Ve=e.jsx(p.default,{error:R,validationId:Le,validationMessagePositionTop:G}),Ze={maxHeight:B,minHeight:M,multiple:U,moveFocusAfterAction:Ce,removalAnnouncementId:Pe?ce:void 0,onPreviewActivate:ke,announceInitialErrors:je};return e.jsx(n.InputBehaviour,{children:e.jsx(d.StyledFileInputContainer,{role:H?"group":void 0,"aria-labelledby":Be,onBlurCapture:ke,children:e.jsxs(i.default,F(D({error:R,id:ae,"data-component":"file-input","data-role":P,"data-element":I,validationRedesignOptIn:!0},r.default(J)),{children:[(H||T)&&e.jsxs(d.StyledFileInputLabelSet,{children:[H&&e.jsx(y.default,{size:"medium",htmlFor:ye?ae:void 0,id:Be,isRequired:Z,disabled:k,children:H}),T&&e.jsx(j.HintText,{size:"medium",id:Me,disabled:k,children:T})]}),pe&&e.jsx(d.StyledRequiredDescription,{id:pe,children:ne()}),e.jsxs(x.Box,{position:"relative",minWidth:E,maxWidth:L,children:[G&&Ve,e.jsx(d.StyledHiddenFileInput,{ref:l.default(q,me),id:ae,name:ue,type:"file",multiple:U,disabled:k,accept:A,onClick:qe,onChange:e=>{Re(e.currentTarget.files)}}),ye&&e.jsxs(d.StyledFileInputDropZone,{"data-role":"file-input-presentation",$minWidth:E,$minHeight:M,$maxWidth:L,$maxHeight:B,$isVertical:W,$multiple:U,$isDraggedOver:He,$isDraggingFile:_e,$error:R,$disabled:k,onDragOver:we,onDragLeave:Te,onDrop:We,children:[e.jsx(d.StyledDashedBorder,{"aria-hidden":"true",$error:R,$isDraggedOver:He,$isDraggingFile:_e,$disabled:k,children:e.jsx("rect",{})}),e.jsx(g.Button,{ref:fe,id:se,"aria-labelledby":Be?`${Be} ${se}`:void 0,"aria-describedby":Ue||void 0,"aria-invalid":!!R,variant:"default",variantType:"secondary",size:"medium",disabled:k,onClick:()=>{var e;return!k&&(null===(e=me.current)||void 0===e?void 0:e.click())},onBlur:()=>{Ie(),Fe(!1)},children:ze}),e.jsx(b.Typography,{m:0,children:C||Q(ze,U)})]}),!G&&Ve]}),be&&e.jsxs(d.StyledFileStatusLists,{ref:Ae,"data-role":"file-status-lists",$minWidth:E,$maxWidth:L,$multiple:U,children:[ve.length>0&&e.jsx(c.default,F(D({},Ze),{items:ve,label:Y(ve.length),statusSummary:U?ee({totalCount:ge.totalCount,uploadingCount:ge.uploadingCount,completedCount:ge.completedCount}):void 0,errorSummary:U&&ge.errorCount>0?te(ge):void 0})),he.length>0&&e.jsx(c.default,F(D({},Ze),{items:he,label:re(he.length)}))]}),e.jsx(d.StyledStatusAnnouncement,{id:de,"aria-live":"polite","aria-atomic":"true",children:Oe}),e.jsx(d.StyledRemovalAnnouncement,{id:ce,children:Pe})]}))})})}));A.displayName="FileInput",exports.FileInput=A,exports.default=A;
@@ -1,18 +1,50 @@
1
- import type { InputProps } from "../../__internal__/legacy-input";
2
1
  import type { ValidationProps } from "../../__internal__/validations";
3
- type CustomFileInputProps = Omit<InputProps, "value"> & {
4
- value?: string;
5
- };
6
- export declare const StyledHiddenFileInput: import("styled-components").StyledComponent<"input", any, CustomFileInputProps, never>;
7
- interface StyledFileInputPresentationProps extends Pick<ValidationProps, "error"> {
8
- isDraggedOver?: boolean;
9
- isDraggingFile?: boolean;
10
- hasUploadStatus?: boolean;
11
- maxHeight?: string;
12
- maxWidth?: string;
13
- minHeight?: string;
14
- minWidth?: string;
15
- isVertical?: boolean;
2
+ export declare const DEFAULT_FILE_INPUT_MIN_HEIGHT = "102px";
3
+ export declare const StyledFileInputContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
4
+ export declare const StyledHiddenFileInput: import("styled-components").StyledComponent<"input", any, {}, never>;
5
+ export declare const StyledFileInputLabelSet: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ export declare const StyledSupportingText: import("styled-components").StyledComponent<{
7
+ ({ variant, as, id, fluid, inverse, size, color, tint, weight, truncate, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
8
+ displayName: string;
9
+ }, any, {}, never>;
10
+ interface FileInputDropZoneProps {
11
+ $error?: ValidationProps["error"];
12
+ $isDraggedOver?: boolean;
13
+ $isDraggingFile?: boolean;
14
+ $maxHeight?: string;
15
+ $maxWidth?: string;
16
+ $minHeight?: string;
17
+ $minWidth?: string;
18
+ $isVertical?: boolean;
19
+ $multiple?: boolean;
20
+ $disabled?: boolean;
16
21
  }
17
- export declare const StyledFileInputPresentation: import("styled-components").StyledComponent<"div", any, StyledFileInputPresentationProps, never>;
22
+ export declare const StyledFileInputDropZone: import("styled-components").StyledComponent<"div", any, FileInputDropZoneProps, never>;
23
+ export declare const StyledDashedBorder: import("styled-components").StyledComponent<"svg", any, Pick<FileInputDropZoneProps, "$disabled" | "$error" | "$isDraggedOver" | "$isDraggingFile">, never>;
24
+ interface FileStatusListsProps {
25
+ $multiple?: boolean;
26
+ $minWidth?: string;
27
+ $maxWidth?: string;
28
+ }
29
+ export declare const StyledFileStatusLists: import("styled-components").StyledComponent<"div", any, FileStatusListsProps, never>;
30
+ export declare const StyledFileUploadStatusListContainer: import("styled-components").StyledComponent<"div", any, {
31
+ $multiple?: boolean;
32
+ }, never>;
33
+ export declare const StyledFileUploadStatusListLabel: import("styled-components").StyledComponent<{
34
+ ({ variant, as, id, fluid, inverse, size, color, tint, weight, truncate, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
35
+ displayName: string;
36
+ }, any, {
37
+ $visuallyHidden?: boolean;
38
+ }, never>;
39
+ export declare const StyledFileUploadStatusListLabelSet: import("styled-components").StyledComponent<"div", any, {}, never>;
40
+ export declare const StyledFileUploadStatusListErrorSummary: import("styled-components").StyledComponent<{
41
+ ({ variant, as, id, fluid, inverse, size, color, tint, weight, truncate, children, screenReaderOnly, "aria-live": ariaLive, "aria-hidden": ariaHidden, ...rest }: import("../typography").TypographyProps): import("react").JSX.Element;
42
+ displayName: string;
43
+ }, any, {}, never>;
44
+ export declare const StyledFileUploadStatusList: import("styled-components").StyledComponent<"ul", any, {
45
+ $hasMultipleItems: boolean;
46
+ }, never>;
47
+ export declare const StyledStatusAnnouncement: import("styled-components").StyledComponent<"div", any, {}, never>;
48
+ export declare const StyledRequiredDescription: import("styled-components").StyledComponent<"span", any, {}, never>;
49
+ export declare const StyledRemovalAnnouncement: import("styled-components").StyledComponent<"span", any, {}, never>;
18
50
  export {};
@@ -1 +1 @@
1
- "use strict";var t=require("styled-components"),e=require("../typography/typography.style.js");function i(t){return t&&t.__esModule?t:{default:t}}var r=i(t);const a=r.default.input.withConfig({displayName:"file-input.style__StyledHiddenFileInput",componentId:"carbon_v162_24_3__sc-f1cdfaa4-0"})(["display:none;"]),o=r.default.div.withConfig({displayName:"file-input.style__StyledFileInputPresentation",componentId:"carbon_v162_24_3__sc-f1cdfaa4-1"})([""," ",""],(({hasUploadStatus:e,minWidth:i,minHeight:r,maxWidth:a,maxHeight:o})=>t.css(["min-width:",";min-height:",";max-width:",";",""],i,r,a,!e&&t.css(["padding:11px;max-height:",";box-sizing:border-box;"],o))),(({hasUploadStatus:i,isDraggedOver:r,isDraggingFile:a,error:o,isVertical:n})=>{const l=o||a?"borderWidth200":"borderWidth100";let s="colorsUtilityMajor300",d="colorsUtilityYang100";return r?(s="colorsUtilityMajor400",d="colorsUtilityMajor100"):a&&(s="colorsUtilityMajor400"),o&&(s="colorsSemanticNegative"+(a?600:500)),!i&&t.css(["display:flex;"," flex-wrap:wrap;justify-content:center;align-content:center;align-items:center;text-align:center;gap:var(--spacing100);border-radius:var(--borderRadius050);border:var(--",") dashed var(--",");background:var(--",");","{color:var(--colorsUtilityYin055);}"],n&&"flex-direction: column;",l,s,d,e.default)}));exports.StyledFileInputPresentation=o,exports.StyledHiddenFileInput=a;
1
+ "use strict";var e=require("styled-components"),t=require("../typography/typography.component.js");require("react/jsx-runtime"),require("react");var a=require("../typography/typography.style.js"),i=require("../../style/utils/visually-hidden.js"),l=require("../../style/utils/add-focus-styling.js");function o(e){return e&&e.__esModule?e:{default:e}}var d=o(e);const n="102px",r=d.default.div.withConfig({displayName:"file-input.style__StyledFileInputContainer",componentId:"carbon_v162_25_0__sc-67abeb4f-0"})(['min-height:0;> [data-component="file-input"]{display:flex;flex-direction:column;height:100%;min-height:0;}> [data-component="file-input"] > [data-role="field-line"]{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;}']),s=d.default.input.withConfig({displayName:"file-input.style__StyledHiddenFileInput",componentId:"carbon_v162_25_0__sc-67abeb4f-1"})(["display:none;"]),p=d.default.div.withConfig({displayName:"file-input.style__StyledFileInputLabelSet",componentId:"carbon_v162_25_0__sc-67abeb4f-2"})(["display:flex;flex-direction:column;align-items:flex-start;min-width:0;overflow-wrap:anywhere;width:100%;margin-bottom:var(--global-space-comp-s);"]),c=d.default(t.Typography).withConfig({displayName:"file-input.style__StyledSupportingText",componentId:"carbon_v162_25_0__sc-67abeb4f-3"})(["min-width:0;max-width:100%;overflow-wrap:anywhere;margin:var(--global-space-none);font:var(--global-font-static-comp-regular-m);"]),u=d.default.div.withConfig({displayName:"file-input.style__StyledFileInputDropZone",componentId:"carbon_v162_25_0__sc-67abeb4f-4"})([""," position:relative;z-index:0;box-sizing:border-box;width:100%;padding:var(--global-space-comp-m) var(--global-space-comp-xl);display:flex;flex-wrap:wrap;justify-content:center;align-content:center;align-items:center;flex-direction:",";text-align:center;gap:var(--global-space-comp-m);border-radius:var(--global-radius-container-m);background-color:",";","{font:var(--global-font-static-comp-regular-m);color:",";}> ","{min-width:0;max-width:100%;overflow-wrap:anywhere;}"],(({$minWidth:t,$minHeight:a,$maxWidth:i,$maxHeight:l})=>e.css(["min-width:",";min-height:",";max-width:",";max-height:",";"],t?`min(100%, ${t})`:"0",a||n,i,l)),(({$isVertical:e})=>e?"column":"row"),(({$disabled:e,$isDraggedOver:t})=>e?"var(--input-typical-bg-disabled)":t?"var(--input-typical-bg-hover)":"var(--input-typical-bg-default)"),a.default,(({$disabled:e})=>e?"var(--input-typical-txt-disabled)":"var(--input-typical-txt-default)"),a.default),b=d.default.svg.withConfig({displayName:"file-input.style__StyledDashedBorder",componentId:"carbon_v162_25_0__sc-67abeb4f-5"})(["position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible;z-index:-1;rect{fill:none;stroke-dasharray:8 4;--dashed-border-width:",";x:calc(var(--dashed-border-width) / 2);y:calc(var(--dashed-border-width) / 2);width:calc(100% - var(--dashed-border-width));height:calc(100% - var(--dashed-border-width));rx:calc(var(--global-radius-container-m) - var(--dashed-border-width) / 2);stroke-width:var(--dashed-border-width);stroke:",";}"],(({$error:e,$isDraggedOver:t,$isDraggingFile:a})=>e||t||a?"var(--global-borderwidth-s)":"var(--global-borderwidth-xs)"),(({$error:e,$disabled:t,$isDraggedOver:a})=>e?"var(--input-validation-border-error)":t?"var(--input-typical-border-disabled)":a?"var(--input-typical-border-hover)":"var(--input-typical-border-default)")),f=d.default.div.withConfig({displayName:"file-input.style__StyledFileStatusLists",componentId:"carbon_v162_25_0__sc-67abeb4f-6"})(["display:flex;flex:1 1 auto;flex-direction:column;gap:var(--global-space-comp-s);padding-top:",";min-height:0;min-width:",";max-width:",";width:100%;"],(({$multiple:e})=>e?"var(--global-space-comp-s)":"var(--global-space-none)"),(({$minWidth:e})=>e?`min(100%, ${e})`:"0"),(({$maxWidth:e})=>e)),_=d.default.div.withConfig({displayName:"file-input.style__StyledFileUploadStatusListContainer",componentId:"carbon_v162_25_0__sc-67abeb4f-7"})(["display:flex;flex:1 1 auto;flex-direction:column;gap:",";padding-top:",";min-height:0;min-width:0;"],(({$multiple:e})=>e?"var(--global-space-comp-s)":"var(--global-space-none)"),(({$multiple:e})=>e?"var(--global-space-comp-s)":"var(--global-space-none)")),m=d.default(c).withConfig({displayName:"file-input.style__StyledFileUploadStatusListLabel",componentId:"carbon_v162_25_0__sc-67abeb4f-8"})(["color:var(--input-typical-txt-alt);",""],(({$visuallyHidden:e})=>e&&i.default)),y=d.default.div.withConfig({displayName:"file-input.style__StyledFileUploadStatusListLabelSet",componentId:"carbon_v162_25_0__sc-67abeb4f-9"})(["display:flex;flex-direction:column;min-width:0;width:100%;"]),h=d.default(c).withConfig({displayName:"file-input.style__StyledFileUploadStatusListErrorSummary",componentId:"carbon_v162_25_0__sc-67abeb4f-10"})(["font:var(--global-font-static-comp-medium-m);color:var(--input-validation-label-error);"]),g=d.default.ul.withConfig({displayName:"file-input.style__StyledFileUploadStatusList",componentId:"carbon_v162_25_0__sc-67abeb4f-11"})(["margin:var(--global-space-none);padding:var(--global-space-none);list-style:none;&:focus-visible{","}",""],l.default(!0),(({$hasMultipleItems:t})=>t&&e.css(["overflow:hidden;border:var(--global-borderwidth-xs) solid var(--input-typical-border-default);border-radius:var(--global-radius-container-m);> li + li{border-top:var(--global-borderwidth-xs) solid var(--input-typical-border-default);}"]))),v=d.default.div.withConfig({displayName:"file-input.style__StyledStatusAnnouncement",componentId:"carbon_v162_25_0__sc-67abeb4f-12"})(["",""],i.default),x=d.default.span.withConfig({displayName:"file-input.style__StyledRequiredDescription",componentId:"carbon_v162_25_0__sc-67abeb4f-13"})(["",""],i.default),w=d.default.span.withConfig({displayName:"file-input.style__StyledRemovalAnnouncement",componentId:"carbon_v162_25_0__sc-67abeb4f-14"})(["",""],i.default);exports.DEFAULT_FILE_INPUT_MIN_HEIGHT=n,exports.StyledDashedBorder=b,exports.StyledFileInputContainer=r,exports.StyledFileInputDropZone=u,exports.StyledFileInputLabelSet=p,exports.StyledFileStatusLists=f,exports.StyledFileUploadStatusList=g,exports.StyledFileUploadStatusListContainer=_,exports.StyledFileUploadStatusListErrorSummary=h,exports.StyledFileUploadStatusListLabel=m,exports.StyledFileUploadStatusListLabelSet=y,exports.StyledHiddenFileInput=s,exports.StyledRemovalAnnouncement=w,exports.StyledRequiredDescription=x,exports.StyledStatusAnnouncement=v,exports.StyledSupportingText=c;
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});const t=e(require("styled-components")).default.tbody.withConfig({displayName:"flat-table-body-draggable.style__StyledFlatTableBodyDraggable",componentId:"carbon_v162_24_3__sc-afbd7e57-0"})(["cursor:grab;"]);exports.default=t;
1
+ "use strict";function e(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});const t=e(require("styled-components")).default.tbody.withConfig({displayName:"flat-table-body-draggable.style__StyledFlatTableBodyDraggable",componentId:"carbon_v162_25_0__sc-afbd7e57-0"})(["cursor:grab;"]);exports.default=t;
@@ -1 +1 @@
1
- "use strict";var o=require("styled-components"),t=require("styled-system"),e=require("../../../style/themes/apply-base-theme.js"),l=require("../../../style/utils/color.js");function r(o){return o&&o.__esModule?o:{default:o}}var i=r(o);const a={small:"1px",medium:"2px",large:"4px"},s=i.default.td.attrs(e.default).withConfig({displayName:"flat-table-cell.style__StyledFlatTableCell",componentId:"carbon_v162_24_3__sc-b4130bcd-0"})(["",""],(({align:e,theme:r,rowSpan:i,leftPosition:s,rightPosition:d,makeCellSticky:c,colWidth:n,isTruncated:p,expandable:b,verticalBorder:y,verticalBorderColor:f})=>o.css(["background-color:var(--colorsUtilityYang100);border-width:0;border-bottom:1px solid var(--colorsUtilityMajor100);text-align:",";vertical-align:middle;padding:0;"," &&&&{> div{box-sizing:border-box;"," "," ","}"," ",' [data-component="icon"]:not([data-color]){color:var(--colorsActionMinor500);}[data-component="button"] [data-component="icon"]:not([data-color]){color:currentColor;}button [data-component="icon"]:not([data-color]){color:currentColor;}}&:first-of-type{border-left:1px solid var(--colorsUtilityMajor100);}&:last-of-type{border-right:1px solid var(--colorsUtilityMajor100);}'," "," ",""],e,n&&o.css(["width:","px;"],n),p&&o.css(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"]),n&&o.css(["width:","px;"],n),t.padding,y&&o.css(["border-right:"," solid var(--colorsUtilityMajor300);"],a[y]),f&&o.css(["border-right-color:",";"],l.toColor(r,f)),i&&o.css(["&:first-of-type + &{border-left:1px solid var(--colorsUtilityMajor100);}"]),c&&o.css([""," "," position:sticky;"],void 0!==s&&`left: ${s}px;`,void 0!==d&&`right: ${d}px;`),b&&o.css(["white-space:nowrap;"])))),d=i.default.div.withConfig({displayName:"flat-table-cell.style__StyledCellContent",componentId:"carbon_v162_24_3__sc-b4130bcd-1"})(["",""],(({expandable:t})=>t&&o.css(["display:flex;align-items:center;line-height:1em;"])));exports.StyledCellContent=d,exports.StyledFlatTableCell=s;
1
+ "use strict";var o=require("styled-components"),t=require("styled-system"),e=require("../../../style/themes/apply-base-theme.js"),l=require("../../../style/utils/color.js");function r(o){return o&&o.__esModule?o:{default:o}}var i=r(o);const a={small:"1px",medium:"2px",large:"4px"},s=i.default.td.attrs(e.default).withConfig({displayName:"flat-table-cell.style__StyledFlatTableCell",componentId:"carbon_v162_25_0__sc-b4130bcd-0"})(["",""],(({align:e,theme:r,rowSpan:i,leftPosition:s,rightPosition:d,makeCellSticky:c,colWidth:n,isTruncated:p,expandable:b,verticalBorder:y,verticalBorderColor:f})=>o.css(["background-color:var(--colorsUtilityYang100);border-width:0;border-bottom:1px solid var(--colorsUtilityMajor100);text-align:",";vertical-align:middle;padding:0;"," &&&&{> div{box-sizing:border-box;"," "," ","}"," ",' [data-component="icon"]:not([data-color]){color:var(--colorsActionMinor500);}[data-component="button"] [data-component="icon"]:not([data-color]){color:currentColor;}button [data-component="icon"]:not([data-color]){color:currentColor;}}&:first-of-type{border-left:1px solid var(--colorsUtilityMajor100);}&:last-of-type{border-right:1px solid var(--colorsUtilityMajor100);}'," "," ",""],e,n&&o.css(["width:","px;"],n),p&&o.css(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"]),n&&o.css(["width:","px;"],n),t.padding,y&&o.css(["border-right:"," solid var(--colorsUtilityMajor300);"],a[y]),f&&o.css(["border-right-color:",";"],l.toColor(r,f)),i&&o.css(["&:first-of-type + &{border-left:1px solid var(--colorsUtilityMajor100);}"]),c&&o.css([""," "," position:sticky;"],void 0!==s&&`left: ${s}px;`,void 0!==d&&`right: ${d}px;`),b&&o.css(["white-space:nowrap;"])))),d=i.default.div.withConfig({displayName:"flat-table-cell.style__StyledCellContent",componentId:"carbon_v162_25_0__sc-b4130bcd-1"})(["",""],(({expandable:t})=>t&&o.css(["display:flex;align-items:center;line-height:1em;"])));exports.StyledCellContent=d,exports.StyledFlatTableCell=s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components");function o(t){return t&&t.__esModule?t:{default:t}}const e=o(t).default.td.withConfig({displayName:"flat-table-checkbox.style__StyledFlatTableCheckbox",componentId:"carbon_v162_24_3__sc-9f54b645-0"})([""," width:18px;"],(({as:o,leftPosition:e,rightPosition:i,makeCellSticky:r})=>t.css([""," "," ",""],"td"===o&&t.css(["background-color:var(--colorsUtilityYang100);border-width:0;border-bottom:1px solid var(--colorsUtilityMajor100);overflow:visible;padding:0;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;&:first-of-type{border-left:1px solid var(--colorsUtilityMajor100);}&:last-of-type{border-right:1px solid var(--colorsUtilityMajor100);}"]),"th"===o&&t.css(["background-color:transparent;border-width:0;border-bottom:1px solid var(--colorsUtilityMajor100);box-sizing:border-box;font-weight:500;left:auto;padding:0;text-align:left;user-select:none;vertical-align:middle;white-space:nowrap;"]),r&&t.css(["top:auto;"," "," position:sticky;"],void 0!==e&&`left: ${e}px;`,void 0!==i&&`right: ${i}px;`))));exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components");function o(t){return t&&t.__esModule?t:{default:t}}const e=o(t).default.td.withConfig({displayName:"flat-table-checkbox.style__StyledFlatTableCheckbox",componentId:"carbon_v162_25_0__sc-9f54b645-0"})([""," width:18px;"],(({as:o,leftPosition:e,rightPosition:i,makeCellSticky:r})=>t.css([""," "," ",""],"td"===o&&t.css(["background-color:var(--colorsUtilityYang100);border-width:0;border-bottom:1px solid var(--colorsUtilityMajor100);overflow:visible;padding:0;text-align:left;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;&:first-of-type{border-left:1px solid var(--colorsUtilityMajor100);}&:last-of-type{border-right:1px solid var(--colorsUtilityMajor100);}"]),"th"===o&&t.css(["background-color:transparent;border-width:0;border-bottom:1px solid var(--colorsUtilityMajor100);box-sizing:border-box;font-weight:500;left:auto;padding:0;text-align:left;user-select:none;vertical-align:middle;white-space:nowrap;"]),r&&t.css(["top:auto;"," "," position:sticky;"],void 0!==e&&`left: ${e}px;`,void 0!==i&&`right: ${i}px;`))));exports.default=e;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../../style/themes/apply-base-theme.js"),a=require("../flat-table-row-header/flat-table-row-header.style.js"),l=require("../flat-table-checkbox/flat-table-checkbox.style.js");function r(e){return e&&e.__esModule?e:{default:e}}const o=r(e).default.thead.attrs(t.default).withConfig({displayName:"flat-table-head.style__StyledFlatTableHead",componentId:"carbon_v162_24_3__sc-27155f22-0"})(["&&&{","{border-left:none;border-right:none;}",",","{font-weight:500;}}"],l.default,a.StyledFlatTableRowHeader,l.default);exports.default=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../../style/themes/apply-base-theme.js"),a=require("../flat-table-row-header/flat-table-row-header.style.js"),l=require("../flat-table-checkbox/flat-table-checkbox.style.js");function r(e){return e&&e.__esModule?e:{default:e}}const o=r(e).default.thead.attrs(t.default).withConfig({displayName:"flat-table-head.style__StyledFlatTableHead",componentId:"carbon_v162_25_0__sc-27155f22-0"})(["&&&{","{border-left:none;border-right:none;}",",","{font-weight:500;}}"],l.default,a.StyledFlatTableRowHeader,l.default);exports.default=o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),r=require("./flat-table-header-utils.js"),i=require("../../../style/themes/apply-base-theme.js"),o=require("../../../style/utils/color.js");function l(e){return e&&e.__esModule?e:{default:e}}const d={small:"1px",medium:"2px",large:"4px"},s=l(e).default.th.attrs(i.default).withConfig({displayName:"flat-table-header.style__StyledFlatTableHeader",componentId:"carbon_v162_24_3__sc-16315b2b-0"})(["",""],(({align:i,alternativeBgColor:l,colWidth:s,leftPosition:a,rightPosition:n,makeCellSticky:c,verticalBorder:p,verticalBorderColor:u,colorTheme:g,theme:h})=>e.css(["background-color:transparent;border-width:0;box-sizing:border-box;font-weight:500;left:auto;text-align:",";user-select:none;vertical-align:middle;word-break:keep-all;padding:0;"," &:first-child{padding-left:1px;}&&&{> div{box-sizing:border-box;"," ","}}",";"," &&&{"," ","}}"],i,s&&e.css(["width:","px;"],s),t.padding,s&&e.css(["width:","px;"],s),l&&e.css(["&&&{background-color:",";}&&&:first-child{border-left:unset;}"],r.default(g)),c&&e.css([""," "," position:sticky;&:first-child{padding-right:0.395em;@-moz-document url-prefix(){padding-right:2px;}@media not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){padding-right:0.9em;}}"],void 0!==a&&`left: ${a}px;`,void 0!==n&&`right: ${n}px;`),p&&e.css(["border-right-width:",";"],d[p]),u&&e.css(["border-right-color:",";"],o.toColor(h,u)))));exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("styled-system"),r=require("./flat-table-header-utils.js"),i=require("../../../style/themes/apply-base-theme.js"),o=require("../../../style/utils/color.js");function l(e){return e&&e.__esModule?e:{default:e}}const d={small:"1px",medium:"2px",large:"4px"},s=l(e).default.th.attrs(i.default).withConfig({displayName:"flat-table-header.style__StyledFlatTableHeader",componentId:"carbon_v162_25_0__sc-16315b2b-0"})(["",""],(({align:i,alternativeBgColor:l,colWidth:s,leftPosition:a,rightPosition:n,makeCellSticky:c,verticalBorder:p,verticalBorderColor:u,colorTheme:g,theme:h})=>e.css(["background-color:transparent;border-width:0;box-sizing:border-box;font-weight:500;left:auto;text-align:",";user-select:none;vertical-align:middle;word-break:keep-all;padding:0;"," &:first-child{padding-left:1px;}&&&{> div{box-sizing:border-box;"," ","}}",";"," &&&{"," ","}}"],i,s&&e.css(["width:","px;"],s),t.padding,s&&e.css(["width:","px;"],s),l&&e.css(["&&&{background-color:",";}&&&:first-child{border-left:unset;}"],r.default(g)),c&&e.css([""," "," position:sticky;&:first-child{padding-right:0.395em;@-moz-document url-prefix(){padding-right:2px;}@media not all and (min-resolution:.001dpcm){@supports (-webkit-appearance:none) and (stroke-color:transparent){padding-right:0.9em;}}"],void 0!==a&&`left: ${a}px;`,void 0!==n&&`right: ${n}px;`),p&&e.css(["border-right-width:",";"],d[p]),u&&e.css(["border-right-color:",";"],o.toColor(h,u)))));exports.default=s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../../../style/themes/apply-base-theme.js"),o=require("../flat-table-cell/flat-table-cell.style.js"),r=require("../flat-table-row-header/flat-table-row-header.style.js"),l=require("../flat-table-checkbox/flat-table-checkbox.style.js"),a=require("../flat-table-header/flat-table-header.style.js"),s=require("../../icon/icon.style.js"),i=require("../../../style/utils/color.js"),d=require("../../../style/utils/add-focus-styling.js"),n=require("../../../__internal__/dom/globals.js"),c=require("../../../__internal__/utils/helpers/browser-type-check/index.js");function b(t){return t&&t.__esModule?t:{default:t}}const u={medium:"2px",large:"4px"},f=t=>`\n ${d.default(!0)}\n z-index: ${t.zIndex.overlay+5};\n `,h=t=>`\n width: calc(100% + 1px);\n z-index: ${t.zIndex.overlay};\n :before {\n content: "";\n border-top: 2px solid var(--colorsSemanticFocus500);\n border-bottom: 2px solid var(--colorsSemanticFocus500);\n display: block;\n left: -2px;\n top: 0px;\n height: calc(100% - 3px);\n width: 103%;\n position: absolute;\n z-index: ${t.zIndex.overlay};\n }\n }\n `,y=t=>{switch(t){case"light":return"var(--colorsUtilityMajor100)";case"transparent-base":return"var(--colorsUtilityMajor025)";case"transparent-white":return"var(--colorsUtilityYang100)";default:return"var(--colorsUtilityMajor400)"}},p=t=>{switch(t){case"transparent-base":return"var(--colorsUtilityMajor025)";case"transparent-white":return"var(--colorsUtilityYang100)";default:return"var(--colorsUtilityMajor100)"}},v=b(t).default.tr.attrs(e.default).withConfig({displayName:"flat-table-row.style__StyledFlatTableRow",componentId:"carbon_v162_24_3__sc-4daf4fd4-0"})(["",""],(({bgColor:e,horizontalBorderColor:d,horizontalBorderSize:b,stickyOffset:v,isRowInteractive:x,isFirstColumnInteractive:g,lhsRowHeaderIndex:w,rhsRowHeaderIndex:j,totalChildren:m,firstCellIndex:S,colorTheme:F,expandable:M,selected:U,highlighted:_,isExpanded:k,isInSidebar:T,isSubRow:C,isFirstSubRow:R,size:z,theme:H,isDragging:q,draggable:$,rowHeight:I})=>{const A=n.getNavigator(),B=e?i.toColor(H,e):void 0,N=d?i.toColor(H,d):void 0,O=T?"var(--colorsUtilityMajor150)":"var(--colorsUtilityMajor075)",Y=T?"var(--colorsUtilityMajor100)":"var(--colorsUtilityMajor050)",D=`${r.StyledFlatTableRowHeader}, ${o.StyledFlatTableCell}, ${l.default}`;return t.css(["border-collapse:separate;border-radius:0px;border-spacing:0;min-width:100%;table-layout:fixed;width:auto;:focus-visible{outline:none;}","{"," "," ","}"," + td{border-left:none;}"," "," "," ","{border-bottom:1px solid ",";"," ","}"," "," "," "," "," "," "," "," "," "," ",""],D,B&&`background-color: ${B};`,"small"!==b&&t.css(["border-bottom:"," solid var(--colorsUtilityMajor100);"],u[b]),N&&t.css(["border-bottom-color:",";"],N),r.StyledFlatTableRowHeader,-1!==w&&t.css(["",":nth-child(","){border-right:2px solid ",";}"],r.StyledFlatTableRowHeader,w+1,p(F)),-1!==j&&t.css(["",":nth-child(","){border-left:2px solid ",";}",":nth-child(","){border-right:none;}"],r.StyledFlatTableRowHeader,j+1,p(F),a.default,j),j===m-1&&t.css(["td:last-of-type{border-right:none;}"]),a.default,y(F),"small"!==b&&t.css(["border-bottom:"," solid var(--colorsUtilityMajor100);"],u[b]),!T&&!(null==F?void 0:F.includes("transparent"))&&`\n :first-child {\n border-left: 1px solid ${y(F)};\n }\n `,void 0!==v&&t.css(["&& th{top:","px;}"],v),x&&t.css(['cursor:pointer;:focus{position:relative;:after{content:"";box-sizing:border-box;position:absolute;left:0px;right:0px;top:0;bottom:0px;'," pointer-events:none;}:last-child{:after{border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);}}:first-child{:after{top:0px;}}"," ","{"," "," ","}","}:hover{","{background-color:",";}}"],f(H),A&&c.isSafari(A)&&t.css(['position:-webkit-sticky;:after{border:none;content:"";height:',"px;","}"],I,f(H)),r.StyledFlatTableRowHeader,0===w&&H&&t.css(["&:first-of-type::before{border-left:3px solid var(--colorsSemanticFocus500);}"]),((e,o,r)=>e===o-1&&r&&t.css(["&:last-of-type{border-right:2px solid var(--colorsSemanticFocus500);}"]))(j,m,H),h(H),![-1,0].includes(w)&&t.css(["",""],Array.from({length:w}).map(((t,e)=>`\n td:nth-of-type(${e+1}) {\n ${h(H)}\n }\n `))),D,B||"var(--colorsUtilityMajor025)"),g&&t.css(["td:nth-child(","),th:nth-child(","){cursor:pointer;:focus{","}:hover{background-color:",";}}"],S+1,S+1,f(H),B||"var(colorsUtilityMajor025)"),T&&t.css(["","{background-color:",";};}","{background-color:var(--colorsUtilityMajor040);border-bottom-color:var(--colorsUtilityMajor100);}td:first-of-type,th:first-of-type{border-left:none;}td:last-of-type{border-right:none;}","{border-right:1px solid ",";}",""],D,e||"var(--colorsUtilityMajor040)",a.default,l.default,Y,x&&t.css([":hover{",",",":not(th){background-color:",";}}"],o.StyledFlatTableCell,l.default,B||"var(--colorsUtilityMajor075)")),M&&t.css(["",":first-child > div,",":first-child > div,"," + "," > div{",'[type="chevron_down_thick"]:first-of-type{transition:transform 0.3s;',"}}"],o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,o.StyledFlatTableCell,s.default,!k&&t.css(["transform:rotate(-90deg);"])),C&&t.css(["","{background-color:",";}",":first-child > div,",":first-child > div,"," + "," > div{padding-left:",";}"],D,B||"var(--colorsActionMinor025)",o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,o.StyledFlatTableCell,"compact"===z?"32px":"40px"),q&&t.css(["border:"," 2px solid;","{background-color:",";}"],T?"var(--colorsUtilityMajor300)":"var(--colorsUtilityMajor200)",D,T?"var(--colorsUtilityMajor200)":"var(--colorsUtilityMajor150)"),$&&t.css(["",":first-of-type{font-size:20px;color:var(--colorsActionMinor500);}"],s.default),R&&t.css(["","{box-shadow:var(--boxShadow075);}"],D),_&&t.css(["","{background-color:",";}:hover{",",",",",":not(th){background-color:",";}}"],D,B||Y,o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,B||Y),U&&t.css(["",",","{background-color:",";}:hover{",",",",",":not(th){background-color:",";}}"],o.StyledFlatTableCell,l.default,B||O,o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,B||O))}));exports.default=v;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../../../style/themes/apply-base-theme.js"),o=require("../flat-table-cell/flat-table-cell.style.js"),r=require("../flat-table-row-header/flat-table-row-header.style.js"),l=require("../flat-table-checkbox/flat-table-checkbox.style.js"),a=require("../flat-table-header/flat-table-header.style.js"),s=require("../../icon/icon.style.js"),i=require("../../../style/utils/color.js"),d=require("../../../style/utils/add-focus-styling.js"),n=require("../../../__internal__/dom/globals.js"),c=require("../../../__internal__/utils/helpers/browser-type-check/index.js");function b(t){return t&&t.__esModule?t:{default:t}}const u={medium:"2px",large:"4px"},f=t=>`\n ${d.default(!0)}\n z-index: ${t.zIndex.overlay+5};\n `,h=t=>`\n width: calc(100% + 1px);\n z-index: ${t.zIndex.overlay};\n :before {\n content: "";\n border-top: 2px solid var(--colorsSemanticFocus500);\n border-bottom: 2px solid var(--colorsSemanticFocus500);\n display: block;\n left: -2px;\n top: 0px;\n height: calc(100% - 3px);\n width: 103%;\n position: absolute;\n z-index: ${t.zIndex.overlay};\n }\n }\n `,y=t=>{switch(t){case"light":return"var(--colorsUtilityMajor100)";case"transparent-base":return"var(--colorsUtilityMajor025)";case"transparent-white":return"var(--colorsUtilityYang100)";default:return"var(--colorsUtilityMajor400)"}},p=t=>{switch(t){case"transparent-base":return"var(--colorsUtilityMajor025)";case"transparent-white":return"var(--colorsUtilityYang100)";default:return"var(--colorsUtilityMajor100)"}},v=b(t).default.tr.attrs(e.default).withConfig({displayName:"flat-table-row.style__StyledFlatTableRow",componentId:"carbon_v162_25_0__sc-4daf4fd4-0"})(["",""],(({bgColor:e,horizontalBorderColor:d,horizontalBorderSize:b,stickyOffset:v,isRowInteractive:x,isFirstColumnInteractive:g,lhsRowHeaderIndex:w,rhsRowHeaderIndex:j,totalChildren:m,firstCellIndex:S,colorTheme:F,expandable:M,selected:U,highlighted:_,isExpanded:k,isInSidebar:T,isSubRow:C,isFirstSubRow:R,size:z,theme:H,isDragging:q,draggable:$,rowHeight:I})=>{const A=n.getNavigator(),B=e?i.toColor(H,e):void 0,N=d?i.toColor(H,d):void 0,O=T?"var(--colorsUtilityMajor150)":"var(--colorsUtilityMajor075)",Y=T?"var(--colorsUtilityMajor100)":"var(--colorsUtilityMajor050)",D=`${r.StyledFlatTableRowHeader}, ${o.StyledFlatTableCell}, ${l.default}`;return t.css(["border-collapse:separate;border-radius:0px;border-spacing:0;min-width:100%;table-layout:fixed;width:auto;:focus-visible{outline:none;}","{"," "," ","}"," + td{border-left:none;}"," "," "," ","{border-bottom:1px solid ",";"," ","}"," "," "," "," "," "," "," "," "," "," ",""],D,B&&`background-color: ${B};`,"small"!==b&&t.css(["border-bottom:"," solid var(--colorsUtilityMajor100);"],u[b]),N&&t.css(["border-bottom-color:",";"],N),r.StyledFlatTableRowHeader,-1!==w&&t.css(["",":nth-child(","){border-right:2px solid ",";}"],r.StyledFlatTableRowHeader,w+1,p(F)),-1!==j&&t.css(["",":nth-child(","){border-left:2px solid ",";}",":nth-child(","){border-right:none;}"],r.StyledFlatTableRowHeader,j+1,p(F),a.default,j),j===m-1&&t.css(["td:last-of-type{border-right:none;}"]),a.default,y(F),"small"!==b&&t.css(["border-bottom:"," solid var(--colorsUtilityMajor100);"],u[b]),!T&&!(null==F?void 0:F.includes("transparent"))&&`\n :first-child {\n border-left: 1px solid ${y(F)};\n }\n `,void 0!==v&&t.css(["&& th{top:","px;}"],v),x&&t.css(['cursor:pointer;:focus{position:relative;:after{content:"";box-sizing:border-box;position:absolute;left:0px;right:0px;top:0;bottom:0px;'," pointer-events:none;}:last-child{:after{border-bottom-left-radius:var(--borderRadius100);border-bottom-right-radius:var(--borderRadius100);}}:first-child{:after{top:0px;}}"," ","{"," "," ","}","}:hover{","{background-color:",";}}"],f(H),A&&c.isSafari(A)&&t.css(['position:-webkit-sticky;:after{border:none;content:"";height:',"px;","}"],I,f(H)),r.StyledFlatTableRowHeader,0===w&&H&&t.css(["&:first-of-type::before{border-left:3px solid var(--colorsSemanticFocus500);}"]),((e,o,r)=>e===o-1&&r&&t.css(["&:last-of-type{border-right:2px solid var(--colorsSemanticFocus500);}"]))(j,m,H),h(H),![-1,0].includes(w)&&t.css(["",""],Array.from({length:w}).map(((t,e)=>`\n td:nth-of-type(${e+1}) {\n ${h(H)}\n }\n `))),D,B||"var(--colorsUtilityMajor025)"),g&&t.css(["td:nth-child(","),th:nth-child(","){cursor:pointer;:focus{","}:hover{background-color:",";}}"],S+1,S+1,f(H),B||"var(colorsUtilityMajor025)"),T&&t.css(["","{background-color:",";};}","{background-color:var(--colorsUtilityMajor040);border-bottom-color:var(--colorsUtilityMajor100);}td:first-of-type,th:first-of-type{border-left:none;}td:last-of-type{border-right:none;}","{border-right:1px solid ",";}",""],D,e||"var(--colorsUtilityMajor040)",a.default,l.default,Y,x&&t.css([":hover{",",",":not(th){background-color:",";}}"],o.StyledFlatTableCell,l.default,B||"var(--colorsUtilityMajor075)")),M&&t.css(["",":first-child > div,",":first-child > div,"," + "," > div{",'[type="chevron_down_thick"]:first-of-type{transition:transform 0.3s;',"}}"],o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,o.StyledFlatTableCell,s.default,!k&&t.css(["transform:rotate(-90deg);"])),C&&t.css(["","{background-color:",";}",":first-child > div,",":first-child > div,"," + "," > div{padding-left:",";}"],D,B||"var(--colorsActionMinor025)",o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,o.StyledFlatTableCell,"compact"===z?"32px":"40px"),q&&t.css(["border:"," 2px solid;","{background-color:",";}"],T?"var(--colorsUtilityMajor300)":"var(--colorsUtilityMajor200)",D,T?"var(--colorsUtilityMajor200)":"var(--colorsUtilityMajor150)"),$&&t.css(["",":first-of-type{font-size:20px;color:var(--colorsActionMinor500);}"],s.default),R&&t.css(["","{box-shadow:var(--boxShadow075);}"],D),_&&t.css(["","{background-color:",";}:hover{",",",",",":not(th){background-color:",";}}"],D,B||Y,o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,B||Y),U&&t.css(["",",","{background-color:",";}:hover{",",",",",":not(th){background-color:",";}}"],o.StyledFlatTableCell,l.default,B||O,o.StyledFlatTableCell,r.StyledFlatTableRowHeader,l.default,B||O))}));exports.default=v;
@@ -1 +1 @@
1
- "use strict";var e=require("styled-components"),t=require("styled-system"),o=require("../../../style/themes/apply-base-theme.js"),r=require("../../../style/utils/color.js"),a=require("../../icon/icon.style.js");function l(e){return e&&e.__esModule?e:{default:e}}var i=l(e);const n={small:"1px",medium:"2px",large:"4px"},s=i.default.th.attrs(o.default).attrs((({stickyAlignment:e})=>({"data-sticky-align":e}))).withConfig({displayName:"flat-table-row-header.style__StyledFlatTableRowHeader",componentId:"carbon_v162_24_3__sc-34b8ebf1-0"})(["",""],(({align:o,theme:a,width:l,leftPosition:i,rightPosition:s,truncate:d,expandable:c,verticalBorder:p,verticalBorderColor:b,stickyAlignment:h})=>e.css(["background-color:var(--colorsUtilityYang100);border:1px solid var(--colorsUtilityMajor100);border-top:none;box-sizing:border-box;left:0;font-weight:normal;position:sticky;text-align:",";top:auto;vertical-align:middle;padding:0;z-index:",";"," &&&&{> div{box-sizing:border-box;"," "," ","}"," "," "," ",' [data-component="icon"]:not([data-color]){color:var(--colorsActionMinor500);}[data-component="button"] [data-component="icon"]:not([data-color]){color:currentColor;}button [data-component="icon"]:not([data-color]){color:currentColor;}}',""],o,a.zIndex.overlay,l&&e.css(["width:","px;"],l),d&&e.css(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"]),l&&e.css(["width:","px;"],l),t.padding,void 0!==i&&e.css(["left:","px;"],i),void 0!==s&&e.css(["right:","px;"],s),p&&e.css(["border-","-width:",";"],"right"===h?"left":"right",n[p]),b&&e.css(["border-","-color:",";"],"right"===h?"left":"right",r.toColor(a,b)),c&&e.css(["white-space:nowrap;"])))),d=i.default.div.withConfig({displayName:"flat-table-row-header.style__StyledFlatTableRowHeaderContent",componentId:"carbon_v162_24_3__sc-34b8ebf1-1"})(["",""],(({expandable:t})=>t&&e.css(["display:flex;align-items:center;line-height:1em;","{width:20px;height:20px;}"],a.default)));exports.StyledFlatTableRowHeader=s,exports.StyledFlatTableRowHeaderContent=d;
1
+ "use strict";var e=require("styled-components"),t=require("styled-system"),o=require("../../../style/themes/apply-base-theme.js"),r=require("../../../style/utils/color.js"),a=require("../../icon/icon.style.js");function l(e){return e&&e.__esModule?e:{default:e}}var i=l(e);const n={small:"1px",medium:"2px",large:"4px"},s=i.default.th.attrs(o.default).attrs((({stickyAlignment:e})=>({"data-sticky-align":e}))).withConfig({displayName:"flat-table-row-header.style__StyledFlatTableRowHeader",componentId:"carbon_v162_25_0__sc-34b8ebf1-0"})(["",""],(({align:o,theme:a,width:l,leftPosition:i,rightPosition:s,truncate:d,expandable:c,verticalBorder:p,verticalBorderColor:b,stickyAlignment:h})=>e.css(["background-color:var(--colorsUtilityYang100);border:1px solid var(--colorsUtilityMajor100);border-top:none;box-sizing:border-box;left:0;font-weight:normal;position:sticky;text-align:",";top:auto;vertical-align:middle;padding:0;z-index:",";"," &&&&{> div{box-sizing:border-box;"," "," ","}"," "," "," ",' [data-component="icon"]:not([data-color]){color:var(--colorsActionMinor500);}[data-component="button"] [data-component="icon"]:not([data-color]){color:currentColor;}button [data-component="icon"]:not([data-color]){color:currentColor;}}',""],o,a.zIndex.overlay,l&&e.css(["width:","px;"],l),d&&e.css(["text-overflow:ellipsis;overflow:hidden;white-space:nowrap;"]),l&&e.css(["width:","px;"],l),t.padding,void 0!==i&&e.css(["left:","px;"],i),void 0!==s&&e.css(["right:","px;"],s),p&&e.css(["border-","-width:",";"],"right"===h?"left":"right",n[p]),b&&e.css(["border-","-color:",";"],"right"===h?"left":"right",r.toColor(a,b)),c&&e.css(["white-space:nowrap;"])))),d=i.default.div.withConfig({displayName:"flat-table-row-header.style__StyledFlatTableRowHeaderContent",componentId:"carbon_v162_25_0__sc-34b8ebf1-1"})(["",""],(({expandable:t})=>t&&e.css(["display:flex;align-items:center;line-height:1em;","{width:20px;height:20px;}"],a.default)));exports.StyledFlatTableRowHeader=s,exports.StyledFlatTableRowHeaderContent=d;