@alma-oss/spirit-web-react 4.4.2 → 4.5.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 (417) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/DEPRECATIONS.md +2 -2
  3. package/README.md +135 -6
  4. package/dist/bundles/web-react.umd.js +1731 -624
  5. package/dist/bundles/web-react.umd.js.map +1 -1
  6. package/dist/bundles/web-react.umd.min.js +1 -1
  7. package/dist/bundles/web-react.umd.min.js.map +1 -1
  8. package/dist/components/Button/Button.cjs +1 -1
  9. package/dist/components/Button/Button.cjs.map +1 -1
  10. package/dist/components/Button/Button.js +19 -19
  11. package/dist/components/Button/Button.js.map +1 -1
  12. package/dist/components/ButtonLink/ButtonLink.cjs +1 -1
  13. package/dist/components/ButtonLink/ButtonLink.cjs.map +1 -1
  14. package/dist/components/ButtonLink/ButtonLink.d.ts +2 -2
  15. package/dist/components/ButtonLink/ButtonLink.js +23 -18
  16. package/dist/components/ButtonLink/ButtonLink.js.map +1 -1
  17. package/dist/components/ButtonLink/useButtonLinkStyleProps.cjs.map +1 -1
  18. package/dist/components/ButtonLink/useButtonLinkStyleProps.d.ts +9 -9
  19. package/dist/components/ButtonLink/useButtonLinkStyleProps.js.map +1 -1
  20. package/dist/components/Card/CardLink.cjs +1 -1
  21. package/dist/components/Card/CardLink.cjs.map +1 -1
  22. package/dist/components/Card/CardLink.d.ts +2 -2
  23. package/dist/components/Card/CardLink.js +10 -15
  24. package/dist/components/Card/CardLink.js.map +1 -1
  25. package/dist/components/CharacterCounter/CharacterCounter.cjs +2 -0
  26. package/dist/components/CharacterCounter/CharacterCounter.cjs.map +1 -0
  27. package/dist/components/CharacterCounter/CharacterCounter.d.ts +7 -0
  28. package/dist/components/CharacterCounter/CharacterCounter.js +23 -0
  29. package/dist/components/CharacterCounter/CharacterCounter.js.map +1 -0
  30. package/dist/components/CharacterCounter/constants.cjs +2 -0
  31. package/dist/components/CharacterCounter/constants.cjs.map +1 -0
  32. package/dist/components/CharacterCounter/constants.d.ts +1 -0
  33. package/dist/components/CharacterCounter/constants.js +5 -0
  34. package/dist/components/CharacterCounter/constants.js.map +1 -0
  35. package/dist/components/CharacterCounter/index.cjs +2 -0
  36. package/dist/components/CharacterCounter/index.d.ts +3 -0
  37. package/dist/components/CharacterCounter/index.js +7 -0
  38. package/dist/components/{UNSTABLE_Attachment → CharacterCounter}/index.js.map +1 -1
  39. package/dist/components/CharacterCounter/types.d.ts +6 -0
  40. package/dist/components/CharacterCounter/useCharacterCounterState.cjs +2 -0
  41. package/dist/components/CharacterCounter/useCharacterCounterState.cjs.map +1 -0
  42. package/dist/components/CharacterCounter/useCharacterCounterState.d.ts +25 -0
  43. package/dist/components/CharacterCounter/useCharacterCounterState.js +66 -0
  44. package/dist/components/CharacterCounter/useCharacterCounterState.js.map +1 -0
  45. package/dist/components/CharacterCounter.d.ts +2 -0
  46. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  47. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  48. package/dist/components/Checkbox/Checkbox.js +58 -54
  49. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  50. package/dist/components/ControlButton/useControlButtonStyleProps.cjs.map +1 -1
  51. package/dist/components/ControlButton/useControlButtonStyleProps.js.map +1 -1
  52. package/dist/components/Dropdown/DropdownPopover.cjs.map +1 -1
  53. package/dist/components/Dropdown/DropdownPopover.d.ts +2 -2
  54. package/dist/components/Dropdown/DropdownPopover.js.map +1 -1
  55. package/dist/components/Field/index.cjs +1 -1
  56. package/dist/components/Field/index.d.ts +0 -2
  57. package/dist/components/Field/index.js +2 -4
  58. package/dist/components/Field/index.js.map +1 -1
  59. package/dist/components/Field/types.d.ts +1 -1
  60. package/dist/components/FieldGroup/FieldGroup.cjs +1 -1
  61. package/dist/components/FieldGroup/FieldGroup.cjs.map +1 -1
  62. package/dist/components/FieldGroup/FieldGroup.js +15 -16
  63. package/dist/components/FieldGroup/FieldGroup.js.map +1 -1
  64. package/dist/components/FileUploader/FileUploaderInput.cjs +1 -1
  65. package/dist/components/FileUploader/FileUploaderInput.cjs.map +1 -1
  66. package/dist/components/FileUploader/FileUploaderInput.js +36 -35
  67. package/dist/components/FileUploader/FileUploaderInput.js.map +1 -1
  68. package/dist/components/Header/HeaderDialogLink.cjs +1 -1
  69. package/dist/components/Header/HeaderDialogLink.cjs.map +1 -1
  70. package/dist/components/Header/HeaderDialogLink.js +18 -17
  71. package/dist/components/Header/HeaderDialogLink.js.map +1 -1
  72. package/dist/components/Header/HeaderLink.cjs +1 -1
  73. package/dist/components/Header/HeaderLink.cjs.map +1 -1
  74. package/dist/components/Header/HeaderLink.js +16 -15
  75. package/dist/components/Header/HeaderLink.js.map +1 -1
  76. package/dist/components/InputDetails/InputDetails.cjs +2 -0
  77. package/dist/components/InputDetails/InputDetails.cjs.map +1 -0
  78. package/dist/components/InputDetails/InputDetails.d.ts +7 -0
  79. package/dist/components/InputDetails/InputDetails.js +21 -0
  80. package/dist/components/InputDetails/InputDetails.js.map +1 -0
  81. package/dist/components/InputDetails/index.cjs +2 -0
  82. package/dist/components/InputDetails/index.cjs.map +1 -0
  83. package/dist/components/InputDetails/index.d.ts +2 -0
  84. package/dist/components/InputDetails/index.js +7 -0
  85. package/dist/components/InputDetails/index.js.map +1 -0
  86. package/dist/components/InputDetails/useInputDetailsStyleProps.cjs +2 -0
  87. package/dist/components/InputDetails/useInputDetailsStyleProps.cjs.map +1 -0
  88. package/dist/components/InputDetails/useInputDetailsStyleProps.d.ts +7 -0
  89. package/dist/components/InputDetails/useInputDetailsStyleProps.js +11 -0
  90. package/dist/components/InputDetails/useInputDetailsStyleProps.js.map +1 -0
  91. package/dist/components/InputDetails.d.ts +2 -0
  92. package/dist/components/Link/Link.cjs +1 -1
  93. package/dist/components/Link/Link.cjs.map +1 -1
  94. package/dist/components/Link/Link.js +10 -9
  95. package/dist/components/Link/Link.js.map +1 -1
  96. package/dist/components/Link/useLinkStyleProps.cjs.map +1 -1
  97. package/dist/components/Link/useLinkStyleProps.d.ts +1 -1
  98. package/dist/components/Link/useLinkStyleProps.js.map +1 -1
  99. package/dist/components/Pagination/PaginationLink.cjs +1 -1
  100. package/dist/components/Pagination/PaginationLink.cjs.map +1 -1
  101. package/dist/components/Pagination/PaginationLink.js +29 -18
  102. package/dist/components/Pagination/PaginationLink.js.map +1 -1
  103. package/dist/components/Radio/Radio.cjs +1 -1
  104. package/dist/components/Radio/Radio.cjs.map +1 -1
  105. package/dist/components/Radio/Radio.js +24 -25
  106. package/dist/components/Radio/Radio.js.map +1 -1
  107. package/dist/components/ScrollView/useScrollPosition.js +4 -4
  108. package/dist/components/Select/Select.cjs +1 -1
  109. package/dist/components/Select/Select.cjs.map +1 -1
  110. package/dist/components/Select/Select.js +28 -29
  111. package/dist/components/Select/Select.js.map +1 -1
  112. package/dist/components/Slider/Slider.cjs +1 -1
  113. package/dist/components/Slider/Slider.cjs.map +1 -1
  114. package/dist/components/Slider/Slider.js +23 -24
  115. package/dist/components/Slider/Slider.js.map +1 -1
  116. package/dist/components/Tabs/TabLink.cjs +1 -1
  117. package/dist/components/Tabs/TabLink.cjs.map +1 -1
  118. package/dist/components/Tabs/TabLink.js +18 -17
  119. package/dist/components/Tabs/TabLink.js.map +1 -1
  120. package/dist/components/Tag/constants.cjs +1 -1
  121. package/dist/components/Tag/constants.cjs.map +1 -1
  122. package/dist/components/Tag/constants.d.ts +1 -0
  123. package/dist/components/Tag/constants.js +4 -3
  124. package/dist/components/Tag/constants.js.map +1 -1
  125. package/dist/components/Tag/useTagStyleProps.cjs +1 -1
  126. package/dist/components/Tag/useTagStyleProps.cjs.map +1 -1
  127. package/dist/components/Tag/useTagStyleProps.js +25 -10
  128. package/dist/components/Tag/useTagStyleProps.js.map +1 -1
  129. package/dist/components/TextArea/TextArea.cjs +1 -1
  130. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  131. package/dist/components/TextArea/TextArea.js +57 -21
  132. package/dist/components/TextArea/TextArea.js.map +1 -1
  133. package/dist/components/TextArea/constants.cjs +2 -0
  134. package/dist/components/TextArea/constants.cjs.map +1 -0
  135. package/dist/components/TextArea/constants.d.ts +1 -0
  136. package/dist/components/TextArea/constants.js +5 -0
  137. package/dist/components/TextArea/constants.js.map +1 -0
  138. package/dist/components/TextFieldBase/TextFieldBase.cjs +1 -1
  139. package/dist/components/TextFieldBase/TextFieldBase.cjs.map +1 -1
  140. package/dist/components/TextFieldBase/TextFieldBase.js +69 -59
  141. package/dist/components/TextFieldBase/TextFieldBase.js.map +1 -1
  142. package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.cjs +1 -1
  143. package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.cjs.map +1 -1
  144. package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.d.ts +1 -0
  145. package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.js +11 -10
  146. package/dist/components/TextFieldBase/useTextFieldBaseStyleProps.js.map +1 -1
  147. package/dist/components/Toggle/Toggle.cjs +1 -1
  148. package/dist/components/Toggle/Toggle.cjs.map +1 -1
  149. package/dist/components/Toggle/Toggle.js +59 -55
  150. package/dist/components/Toggle/Toggle.js.map +1 -1
  151. package/dist/components/UNSTABLE_File/UNSTABLE_File.cjs +2 -0
  152. package/dist/components/UNSTABLE_File/UNSTABLE_File.cjs.map +1 -0
  153. package/dist/components/UNSTABLE_File/UNSTABLE_File.d.ts +8 -0
  154. package/dist/components/UNSTABLE_File/UNSTABLE_File.js +88 -0
  155. package/dist/components/UNSTABLE_File/UNSTABLE_File.js.map +1 -0
  156. package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.cjs +2 -0
  157. package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.cjs.map +1 -0
  158. package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.d.ts +8 -0
  159. package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.js +29 -0
  160. package/dist/components/UNSTABLE_File/UNSTABLE_FileImagePreview.js.map +1 -0
  161. package/dist/components/UNSTABLE_File/constants.cjs +2 -0
  162. package/dist/components/UNSTABLE_File/constants.cjs.map +1 -0
  163. package/dist/components/UNSTABLE_File/constants.d.ts +9 -0
  164. package/dist/components/UNSTABLE_File/constants.js +13 -0
  165. package/dist/components/UNSTABLE_File/constants.js.map +1 -0
  166. package/dist/components/UNSTABLE_File/index.cjs +2 -0
  167. package/dist/components/UNSTABLE_File/index.cjs.map +1 -0
  168. package/dist/components/UNSTABLE_File/index.d.ts +6 -0
  169. package/dist/components/UNSTABLE_File/index.js +16 -0
  170. package/dist/components/UNSTABLE_File/index.js.map +1 -0
  171. package/dist/components/UNSTABLE_File/types.d.ts +48 -0
  172. package/dist/components/UNSTABLE_File/useFileImageStyles.cjs +2 -0
  173. package/dist/components/UNSTABLE_File/useFileImageStyles.cjs.map +1 -0
  174. package/dist/components/UNSTABLE_File/useFileImageStyles.d.ts +19 -0
  175. package/dist/components/UNSTABLE_File/useFileImageStyles.js +21 -0
  176. package/dist/components/UNSTABLE_File/useFileImageStyles.js.map +1 -0
  177. package/dist/components/UNSTABLE_File/useFileStyleProps.cjs +2 -0
  178. package/dist/components/UNSTABLE_File/useFileStyleProps.cjs.map +1 -0
  179. package/dist/components/UNSTABLE_File/useFileStyleProps.d.ts +20 -0
  180. package/dist/components/UNSTABLE_File/useFileStyleProps.js +29 -0
  181. package/dist/components/UNSTABLE_File/useFileStyleProps.js.map +1 -0
  182. package/dist/components/UNSTABLE_File.d.ts +2 -0
  183. package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.cjs +1 -1
  184. package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.cjs.map +1 -1
  185. package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.js +129 -112
  186. package/dist/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.js.map +1 -1
  187. package/dist/components/UNSTABLE_FileUpload/types.d.ts +6 -3
  188. package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.cjs +1 -1
  189. package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.cjs.map +1 -1
  190. package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.d.ts +2 -3
  191. package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.js +18 -16
  192. package/dist/components/UNSTABLE_FileUpload/useFileUploadStyleProps.js.map +1 -1
  193. package/dist/components/UNSTABLE_Picker/PickerContext.cjs +2 -0
  194. package/dist/components/UNSTABLE_Picker/PickerContext.cjs.map +1 -0
  195. package/dist/components/UNSTABLE_Picker/PickerContext.d.ts +3 -0
  196. package/dist/components/UNSTABLE_Picker/PickerContext.js +9 -0
  197. package/dist/components/UNSTABLE_Picker/PickerContext.js.map +1 -0
  198. package/dist/components/UNSTABLE_Picker/PickerPopoverContext.cjs +2 -0
  199. package/dist/components/UNSTABLE_Picker/PickerPopoverContext.cjs.map +1 -0
  200. package/dist/components/UNSTABLE_Picker/PickerPopoverContext.d.ts +3 -0
  201. package/dist/components/UNSTABLE_Picker/PickerPopoverContext.js +16 -0
  202. package/dist/components/UNSTABLE_Picker/PickerPopoverContext.js.map +1 -0
  203. package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.cjs +2 -0
  204. package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.cjs.map +1 -0
  205. package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.d.ts +4 -0
  206. package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.js +204 -0
  207. package/dist/components/UNSTABLE_Picker/UNSTABLE_Picker.js.map +1 -0
  208. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.cjs +2 -0
  209. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.cjs.map +1 -0
  210. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.d.ts +7 -0
  211. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.js +14 -0
  212. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerGroup.js.map +1 -0
  213. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.cjs +2 -0
  214. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.cjs.map +1 -0
  215. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.d.ts +7 -0
  216. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.js +32 -0
  217. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerItem.js.map +1 -0
  218. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.cjs +2 -0
  219. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.cjs.map +1 -0
  220. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.d.ts +7 -0
  221. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.js +64 -0
  222. package/dist/components/UNSTABLE_Picker/UNSTABLE_PickerTag.js.map +1 -0
  223. package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.cjs +2 -0
  224. package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.cjs.map +1 -0
  225. package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.d.ts +4 -0
  226. package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.js +40 -0
  227. package/dist/components/UNSTABLE_Picker/UNSTABLE_UncontrolledPicker.js.map +1 -0
  228. package/dist/components/UNSTABLE_Picker/constants.cjs +2 -0
  229. package/dist/components/UNSTABLE_Picker/constants.cjs.map +1 -0
  230. package/dist/components/UNSTABLE_Picker/constants.d.ts +6 -0
  231. package/dist/components/UNSTABLE_Picker/constants.js +11 -0
  232. package/dist/components/UNSTABLE_Picker/constants.js.map +1 -0
  233. package/dist/components/UNSTABLE_Picker/index.cjs +2 -0
  234. package/dist/components/UNSTABLE_Picker/index.cjs.map +1 -0
  235. package/dist/components/UNSTABLE_Picker/index.d.ts +11 -0
  236. package/dist/components/UNSTABLE_Picker/index.js +26 -0
  237. package/dist/components/UNSTABLE_Picker/index.js.map +1 -0
  238. package/dist/components/UNSTABLE_Picker/types.d.ts +91 -0
  239. package/dist/components/UNSTABLE_Picker/usePickerId.cjs +2 -0
  240. package/dist/components/UNSTABLE_Picker/usePickerId.cjs.map +1 -0
  241. package/dist/components/UNSTABLE_Picker/usePickerId.d.ts +8 -0
  242. package/dist/components/UNSTABLE_Picker/usePickerId.js +15 -0
  243. package/dist/components/UNSTABLE_Picker/usePickerId.js.map +1 -0
  244. package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.cjs +2 -0
  245. package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.cjs.map +1 -0
  246. package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.d.ts +11 -0
  247. package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.js +27 -0
  248. package/dist/components/UNSTABLE_Picker/usePickerPopoverTabOutToTrigger.js.map +1 -0
  249. package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.cjs +2 -0
  250. package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.cjs.map +1 -0
  251. package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.d.ts +13 -0
  252. package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.js +95 -0
  253. package/dist/components/UNSTABLE_Picker/usePickerSelectionGridKeyboard.js.map +1 -0
  254. package/dist/components/UNSTABLE_Picker/usePickerStyleProps.cjs +2 -0
  255. package/dist/components/UNSTABLE_Picker/usePickerStyleProps.cjs.map +1 -0
  256. package/dist/components/UNSTABLE_Picker/usePickerStyleProps.d.ts +21 -0
  257. package/dist/components/UNSTABLE_Picker/usePickerStyleProps.js +29 -0
  258. package/dist/components/UNSTABLE_Picker/usePickerStyleProps.js.map +1 -0
  259. package/dist/components/UNSTABLE_Picker/utils.cjs +2 -0
  260. package/dist/components/UNSTABLE_Picker/utils.cjs.map +1 -0
  261. package/dist/components/UNSTABLE_Picker/utils.d.ts +10 -0
  262. package/dist/components/UNSTABLE_Picker/utils.js +41 -0
  263. package/dist/components/UNSTABLE_Picker/utils.js.map +1 -0
  264. package/dist/components/UNSTABLE_Picker.d.ts +2 -0
  265. package/dist/components/index.cjs +1 -1
  266. package/dist/components/index.d.ts +4 -1
  267. package/dist/components/index.js +523 -498
  268. package/dist/components/index.js.map +1 -1
  269. package/dist/constants/index.cjs +1 -1
  270. package/dist/constants/index.d.ts +1 -0
  271. package/dist/constants/index.js +43 -40
  272. package/dist/constants/index.js.map +1 -1
  273. package/dist/constants/selection.cjs +2 -0
  274. package/dist/constants/selection.cjs.map +1 -0
  275. package/dist/constants/selection.d.ts +2 -0
  276. package/dist/constants/selection.js +6 -0
  277. package/dist/constants/selection.js.map +1 -0
  278. package/dist/context/RouterContext.cjs +2 -0
  279. package/dist/context/RouterContext.cjs.map +1 -0
  280. package/dist/context/RouterContext.d.ts +16 -0
  281. package/dist/context/RouterContext.js +12 -0
  282. package/dist/context/RouterContext.js.map +1 -0
  283. package/dist/context/index.cjs +1 -1
  284. package/dist/context/index.d.ts +1 -0
  285. package/dist/context/index.js +11 -7
  286. package/dist/context/index.js.map +1 -1
  287. package/dist/hooks/index.cjs +1 -1
  288. package/dist/hooks/index.d.ts +5 -1
  289. package/dist/hooks/index.js +54 -40
  290. package/dist/hooks/index.js.map +1 -1
  291. package/dist/hooks/useAriaIdRefs.cjs +2 -0
  292. package/dist/hooks/useAriaIdRefs.cjs.map +1 -0
  293. package/dist/hooks/useAriaIdRefs.d.ts +11 -0
  294. package/dist/hooks/useAriaIdRefs.js +23 -0
  295. package/dist/hooks/useAriaIdRefs.js.map +1 -0
  296. package/dist/hooks/useControlledModeGuard.cjs +2 -0
  297. package/dist/hooks/useControlledModeGuard.cjs.map +1 -0
  298. package/dist/hooks/useControlledModeGuard.d.ts +10 -0
  299. package/dist/hooks/useControlledModeGuard.js +33 -0
  300. package/dist/hooks/useControlledModeGuard.js.map +1 -0
  301. package/dist/hooks/useDebouncedValue.cjs +2 -0
  302. package/dist/hooks/useDebouncedValue.cjs.map +1 -0
  303. package/dist/hooks/useDebouncedValue.d.ts +1 -0
  304. package/dist/hooks/useDebouncedValue.js +17 -0
  305. package/dist/hooks/useDebouncedValue.js.map +1 -0
  306. package/dist/hooks/useLinkClick.cjs +2 -0
  307. package/dist/hooks/useLinkClick.cjs.map +1 -0
  308. package/dist/hooks/useLinkClick.d.ts +4 -0
  309. package/dist/hooks/useLinkClick.js +15 -0
  310. package/dist/hooks/useLinkClick.js.map +1 -0
  311. package/dist/hooks/useSelectionState.cjs +2 -0
  312. package/dist/hooks/useSelectionState.cjs.map +1 -0
  313. package/dist/hooks/useSelectionState.d.ts +17 -0
  314. package/dist/hooks/useSelectionState.js +41 -0
  315. package/dist/hooks/useSelectionState.js.map +1 -0
  316. package/dist/index.cjs +1 -1
  317. package/dist/index.js +722 -673
  318. package/dist/index.js.map +1 -1
  319. package/dist/translations/defaults.cjs +1 -1
  320. package/dist/translations/defaults.cjs.map +1 -1
  321. package/dist/translations/defaults.d.ts +17 -0
  322. package/dist/translations/defaults.js +17 -0
  323. package/dist/translations/defaults.js.map +1 -1
  324. package/dist/types/button.d.ts +3 -2
  325. package/dist/types/card.cjs.map +1 -1
  326. package/dist/types/card.d.ts +5 -7
  327. package/dist/types/card.js.map +1 -1
  328. package/dist/types/checkbox.d.ts +2 -2
  329. package/dist/types/controlButton.d.ts +2 -3
  330. package/dist/types/header.d.ts +3 -3
  331. package/dist/types/index.d.ts +1 -0
  332. package/dist/types/inputDetails.d.ts +9 -0
  333. package/dist/types/link.cjs.map +1 -1
  334. package/dist/types/link.d.ts +2 -2
  335. package/dist/types/link.js.map +1 -1
  336. package/dist/types/pagination.d.ts +4 -4
  337. package/dist/types/shared/index.cjs.map +1 -1
  338. package/dist/types/shared/index.d.ts +1 -0
  339. package/dist/types/shared/index.js.map +1 -1
  340. package/dist/types/shared/inputs.d.ts +3 -0
  341. package/dist/types/shared/router.d.ts +3 -0
  342. package/dist/types/tabs.d.ts +2 -2
  343. package/dist/types/tag.d.ts +1 -0
  344. package/dist/types/textArea.d.ts +26 -5
  345. package/dist/types/textFieldBase.d.ts +5 -2
  346. package/dist/types/toggle.d.ts +2 -2
  347. package/dist/utils/debounce.cjs +1 -1
  348. package/dist/utils/debounce.cjs.map +1 -1
  349. package/dist/utils/debounce.d.ts +4 -1
  350. package/dist/utils/debounce.js +11 -8
  351. package/dist/utils/debounce.js.map +1 -1
  352. package/dist/utils/index.cjs +1 -1
  353. package/dist/utils/index.d.ts +1 -0
  354. package/dist/utils/index.js +36 -33
  355. package/dist/utils/index.js.map +1 -1
  356. package/dist/utils/router.cjs +2 -0
  357. package/dist/utils/router.cjs.map +1 -0
  358. package/dist/utils/router.d.ts +12 -0
  359. package/dist/utils/router.js +10 -0
  360. package/dist/utils/router.js.map +1 -0
  361. package/dist/utils/string.cjs +1 -1
  362. package/dist/utils/string.cjs.map +1 -1
  363. package/dist/utils/string.d.ts +1 -0
  364. package/dist/utils/string.js +10 -9
  365. package/dist/utils/string.js.map +1 -1
  366. package/package.json +38 -23
  367. package/dist/components/Field/useAriaIds.cjs +0 -2
  368. package/dist/components/Field/useAriaIds.cjs.map +0 -1
  369. package/dist/components/Field/useAriaIds.d.ts +0 -8
  370. package/dist/components/Field/useAriaIds.js +0 -15
  371. package/dist/components/Field/useAriaIds.js.map +0 -1
  372. package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.cjs +0 -2
  373. package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.cjs.map +0 -1
  374. package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.d.ts +0 -8
  375. package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.js +0 -42
  376. package/dist/components/UNSTABLE_Attachment/UNSTABLE_Attachment.js.map +0 -1
  377. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.cjs +0 -2
  378. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.cjs.map +0 -1
  379. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.d.ts +0 -8
  380. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.js +0 -30
  381. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.js.map +0 -1
  382. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.cjs +0 -2
  383. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.cjs.map +0 -1
  384. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.d.ts +0 -8
  385. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.js +0 -29
  386. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.js.map +0 -1
  387. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.cjs +0 -2
  388. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.cjs.map +0 -1
  389. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.d.ts +0 -8
  390. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.js +0 -29
  391. package/dist/components/UNSTABLE_Attachment/UNSTABLE_AttachmentImagePreview.js.map +0 -1
  392. package/dist/components/UNSTABLE_Attachment/constants.cjs +0 -2
  393. package/dist/components/UNSTABLE_Attachment/constants.cjs.map +0 -1
  394. package/dist/components/UNSTABLE_Attachment/constants.d.ts +0 -9
  395. package/dist/components/UNSTABLE_Attachment/constants.js +0 -13
  396. package/dist/components/UNSTABLE_Attachment/constants.js.map +0 -1
  397. package/dist/components/UNSTABLE_Attachment/index.cjs +0 -2
  398. package/dist/components/UNSTABLE_Attachment/index.d.ts +0 -8
  399. package/dist/components/UNSTABLE_Attachment/index.js +0 -20
  400. package/dist/components/UNSTABLE_Attachment/types.d.ts +0 -42
  401. package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.cjs +0 -2
  402. package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.cjs.map +0 -1
  403. package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.d.ts +0 -18
  404. package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.js +0 -22
  405. package/dist/components/UNSTABLE_Attachment/useAttachmentImageStyles.js.map +0 -1
  406. package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.cjs +0 -2
  407. package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.cjs.map +0 -1
  408. package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.d.ts +0 -21
  409. package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.js +0 -24
  410. package/dist/components/UNSTABLE_Attachment/useAttachmentStyleProps.js.map +0 -1
  411. package/dist/components/UNSTABLE_Attachment.d.ts +0 -2
  412. package/dist/hooks/useAriaDescribedBy.cjs +0 -2
  413. package/dist/hooks/useAriaDescribedBy.cjs.map +0 -1
  414. package/dist/hooks/useAriaDescribedBy.d.ts +0 -5
  415. package/dist/hooks/useAriaDescribedBy.js +0 -7
  416. package/dist/hooks/useAriaDescribedBy.js.map +0 -1
  417. /package/dist/components/{UNSTABLE_Attachment → CharacterCounter}/index.cjs.map +0 -0
@@ -4,20 +4,20 @@
4
4
  "use strict";"use strict";
5
5
  "use client";
6
6
 
7
- function _interopNamespaceDefault(e2) {
7
+ function _interopNamespaceDefault(e) {
8
8
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
- if (e2) {
10
- for (const k in e2) {
9
+ if (e) {
10
+ for (const k in e) {
11
11
  if (k !== "default") {
12
- const d = Object.getOwnPropertyDescriptor(e2, k);
13
- Object.defineProperty(n, k, d.get ? d : {
12
+ const d2 = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d2.get ? d2 : {
14
14
  enumerable: true,
15
- get: () => e2[k]
15
+ get: () => e[k]
16
16
  });
17
17
  }
18
18
  }
19
19
  }
20
- n.default = e2;
20
+ n.default = e;
21
21
  return Object.freeze(n);
22
22
  }
23
23
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
@@ -153,135 +153,135 @@
153
153
  ACCENT: "accent",
154
154
  EMOTION: "emotion"
155
155
  };
156
- const t = "768px", e = "1280px", wf = {
156
+ const s = "768px", d = "1280px", yp = {
157
157
  mobile: 0,
158
- tablet: t,
159
- desktop: e
160
- }, g = "480px", p = "640px", b = "768px", v = "1024px", B = "1280px", Xf = "spirit-", H = "16px", F = "32px", C = "32px", D = "1280px", _f = {
158
+ tablet: s,
159
+ desktop: d
160
+ }, ht = "480px", kt = "640px", Ht = "768px", $t = "1024px", Ft = "1280px", $p = "spirit-", Pt = "32px", Tt = "16px", At = "32px", Wt = "1280px", Fp = {
161
161
  xsmall: {
162
- maxWidth: g
162
+ maxWidth: ht
163
163
  },
164
164
  small: {
165
- maxWidth: p
165
+ maxWidth: kt
166
166
  },
167
167
  medium: {
168
- maxWidth: b
168
+ maxWidth: Ht
169
169
  },
170
170
  large: {
171
- maxWidth: v
171
+ maxWidth: $t
172
172
  },
173
173
  xlarge: {
174
- maxWidth: B
174
+ maxWidth: Ft
175
175
  },
176
176
  padding: {
177
- mobile: H,
178
- tablet: F,
179
- desktop: C
177
+ desktop: Pt,
178
+ mobile: Tt,
179
+ tablet: At
180
180
  },
181
- maxWidth: D
182
- }, Oi = "var(--spirit-color-accent-01-background-basic)", Xi = "var(--spirit-color-accent-01-background-subtle)", _i = "var(--spirit-color-accent-01-border-basic)", Vi = "var(--spirit-color-accent-01-border-subtle)", ji = "var(--spirit-color-accent-01-content-basic)", qi = "var(--spirit-color-accent-01-content-subtle)", Ei = "var(--spirit-color-accent-01-state-active)", Gi = "var(--spirit-color-accent-01-state-default)", Ji = "var(--spirit-color-accent-01-state-hover)", Ki = "var(--spirit-color-accent-02-background-basic)", Ni = "var(--spirit-color-accent-02-background-subtle)", Qi = "var(--spirit-color-accent-02-border-basic)", Yi = "var(--spirit-color-accent-02-border-subtle)", Zi = "var(--spirit-color-accent-02-content-basic)", ts = "var(--spirit-color-accent-02-content-subtle)", es = "var(--spirit-color-accent-02-state-active)", os = "var(--spirit-color-accent-02-state-default)", ns = "var(--spirit-color-accent-02-state-hover)", bs = "var(--spirit-color-component-button-plain-border)", vs = "var(--spirit-color-component-button-plain-content)", Bs = "var(--spirit-color-component-button-plain-state-active)", ys = "var(--spirit-color-component-button-plain-state-default)", $s = "var(--spirit-color-component-button-plain-state-hover)", ks = "var(--spirit-color-component-button-primary-border)", hs = "var(--spirit-color-component-button-primary-content)", Hs = "var(--spirit-color-component-button-primary-state-active)", Fs = "var(--spirit-color-component-button-primary-state-default)", Cs = "var(--spirit-color-component-button-primary-state-hover)", Ds = "var(--spirit-color-component-button-secondary-border)", Is = "var(--spirit-color-component-button-secondary-content)", xs = "var(--spirit-color-component-button-secondary-state-active)", Ps = "var(--spirit-color-component-button-secondary-state-default)", As = "var(--spirit-color-component-button-secondary-state-hover)", Ws = "var(--spirit-color-component-button-tertiary-border)", Ts = "var(--spirit-color-component-button-tertiary-content)", zs = "var(--spirit-color-component-button-tertiary-state-active)", ws = "var(--spirit-color-component-button-tertiary-state-default)", Us = "var(--spirit-color-component-button-tertiary-state-hover)", kl = "var(--spirit-color-emotion-danger-background-basic)", hl = "var(--spirit-color-emotion-danger-background-subtle)", Hl = "var(--spirit-color-emotion-danger-border-basic)", Fl = "var(--spirit-color-emotion-danger-border-subtle)", Cl = "var(--spirit-color-emotion-danger-content-basic)", Dl = "var(--spirit-color-emotion-danger-content-subtle)", Il = "var(--spirit-color-emotion-danger-state-active)", xl = "var(--spirit-color-emotion-danger-state-default)", Pl = "var(--spirit-color-emotion-danger-state-hover)", Al = "var(--spirit-color-emotion-informative-background-basic)", Wl = "var(--spirit-color-emotion-informative-background-subtle)", Tl = "var(--spirit-color-emotion-informative-border-basic)", zl = "var(--spirit-color-emotion-informative-border-subtle)", wl = "var(--spirit-color-emotion-informative-content-basic)", Ul = "var(--spirit-color-emotion-informative-content-subtle)", Rl = "var(--spirit-color-emotion-informative-state-active)", Ml = "var(--spirit-color-emotion-informative-state-default)", Ll = "var(--spirit-color-emotion-informative-state-hover)", Ol = "var(--spirit-color-emotion-success-background-basic)", Xl = "var(--spirit-color-emotion-success-background-subtle)", _l = "var(--spirit-color-emotion-success-border-basic)", Vl = "var(--spirit-color-emotion-success-border-subtle)", jl = "var(--spirit-color-emotion-success-content-basic)", ql = "var(--spirit-color-emotion-success-content-subtle)", El = "var(--spirit-color-emotion-success-state-active)", Gl = "var(--spirit-color-emotion-success-state-default)", Jl = "var(--spirit-color-emotion-success-state-hover)", Kl = "var(--spirit-color-emotion-warning-background-basic)", Nl = "var(--spirit-color-emotion-warning-background-subtle)", Ql = "var(--spirit-color-emotion-warning-border-basic)", Yl = "var(--spirit-color-emotion-warning-border-subtle)", Zl = "var(--spirit-color-emotion-warning-content-basic)", td = "var(--spirit-color-emotion-warning-content-subtle)", ed = "var(--spirit-color-emotion-warning-state-active)", od = "var(--spirit-color-emotion-warning-state-default)", nd = "var(--spirit-color-emotion-warning-state-hover)", cf = "var(--spirit-color-text-primary)", sf = "var(--spirit-color-text-secondary)", lf = "var(--spirit-color-text-tertiary)", df = {
181
+ maxWidth: Wt
182
+ }, El = "var(--spirit-color-accent-01-background-basic)", Gl = "var(--spirit-color-accent-01-background-subtle)", Jl = "var(--spirit-color-accent-01-border-basic)", Kl = "var(--spirit-color-accent-01-border-subtle)", Nl = "var(--spirit-color-accent-01-content-basic)", Ql = "var(--spirit-color-accent-01-content-subtle)", Yl = "var(--spirit-color-accent-01-state-active)", Zl = "var(--spirit-color-accent-01-state-default)", ts = "var(--spirit-color-accent-01-state-hover)", es = "var(--spirit-color-accent-02-background-basic)", os = "var(--spirit-color-accent-02-background-subtle)", ns = "var(--spirit-color-accent-02-border-basic)", as = "var(--spirit-color-accent-02-border-subtle)", rs = "var(--spirit-color-accent-02-content-basic)", cs = "var(--spirit-color-accent-02-content-subtle)", is = "var(--spirit-color-accent-02-state-active)", ls = "var(--spirit-color-accent-02-state-default)", ss = "var(--spirit-color-accent-02-state-hover)", Hs = "var(--spirit-color-component-button-plain-border)", $s = "var(--spirit-color-component-button-plain-content)", Fs = "var(--spirit-color-component-button-plain-state-active)", Ds = "var(--spirit-color-component-button-plain-state-default)", xs = "var(--spirit-color-component-button-plain-state-hover)", Cs = "var(--spirit-color-component-button-primary-border)", Is = "var(--spirit-color-component-button-primary-content)", Ps = "var(--spirit-color-component-button-primary-state-active)", Ts = "var(--spirit-color-component-button-primary-state-default)", As = "var(--spirit-color-component-button-primary-state-hover)", Ws = "var(--spirit-color-component-button-secondary-border)", Ls = "var(--spirit-color-component-button-secondary-content)", zs = "var(--spirit-color-component-button-secondary-state-active)", Ms = "var(--spirit-color-component-button-secondary-state-default)", ws = "var(--spirit-color-component-button-secondary-state-hover)", Xs = "var(--spirit-color-component-button-tertiary-border)", Us = "var(--spirit-color-component-button-tertiary-content)", Rs = "var(--spirit-color-component-button-tertiary-state-active)", Os = "var(--spirit-color-component-button-tertiary-state-default)", _s = "var(--spirit-color-component-button-tertiary-state-hover)", Cd = "var(--spirit-color-emotion-danger-background-basic)", Id = "var(--spirit-color-emotion-danger-background-subtle)", Pd = "var(--spirit-color-emotion-danger-border-basic)", Td = "var(--spirit-color-emotion-danger-border-subtle)", Ad = "var(--spirit-color-emotion-danger-content-basic)", Wd = "var(--spirit-color-emotion-danger-content-subtle)", Ld = "var(--spirit-color-emotion-danger-state-active)", zd = "var(--spirit-color-emotion-danger-state-default)", Md = "var(--spirit-color-emotion-danger-state-hover)", wd = "var(--spirit-color-emotion-informative-background-basic)", Xd = "var(--spirit-color-emotion-informative-background-subtle)", Ud = "var(--spirit-color-emotion-informative-border-basic)", Rd = "var(--spirit-color-emotion-informative-border-subtle)", Od = "var(--spirit-color-emotion-informative-content-basic)", _d = "var(--spirit-color-emotion-informative-content-subtle)", Vd = "var(--spirit-color-emotion-informative-state-active)", jd = "var(--spirit-color-emotion-informative-state-default)", qd = "var(--spirit-color-emotion-informative-state-hover)", Ed = "var(--spirit-color-emotion-success-background-basic)", Gd = "var(--spirit-color-emotion-success-background-subtle)", Jd = "var(--spirit-color-emotion-success-border-basic)", Kd = "var(--spirit-color-emotion-success-border-subtle)", Nd = "var(--spirit-color-emotion-success-content-basic)", Qd = "var(--spirit-color-emotion-success-content-subtle)", Yd = "var(--spirit-color-emotion-success-state-active)", Zd = "var(--spirit-color-emotion-success-state-default)", tf = "var(--spirit-color-emotion-success-state-hover)", ef = "var(--spirit-color-emotion-warning-background-basic)", of = "var(--spirit-color-emotion-warning-background-subtle)", nf = "var(--spirit-color-emotion-warning-border-basic)", af = "var(--spirit-color-emotion-warning-border-subtle)", rf = "var(--spirit-color-emotion-warning-content-basic)", cf = "var(--spirit-color-emotion-warning-content-subtle)", lf = "var(--spirit-color-emotion-warning-state-active)", sf = "var(--spirit-color-emotion-warning-state-default)", df = "var(--spirit-color-emotion-warning-state-hover)", pg = "var(--spirit-color-text-primary)", mg = "var(--spirit-color-text-secondary)", Sg = "var(--spirit-color-text-tertiary)", ug = {
183
183
  "01": {
184
- backgroundBasic: Oi,
185
- backgroundSubtle: Xi,
186
- borderBasic: _i,
187
- borderSubtle: Vi,
188
- contentBasic: ji,
189
- contentSubtle: qi,
190
- stateActive: Ei,
191
- stateDefault: Gi,
192
- stateHover: Ji
184
+ backgroundBasic: El,
185
+ backgroundSubtle: Gl,
186
+ borderBasic: Jl,
187
+ borderSubtle: Kl,
188
+ contentBasic: Nl,
189
+ contentSubtle: Ql,
190
+ stateActive: Yl,
191
+ stateDefault: Zl,
192
+ stateHover: ts
193
193
  },
194
194
  "02": {
195
- backgroundBasic: Ki,
196
- backgroundSubtle: Ni,
197
- borderBasic: Qi,
198
- borderSubtle: Yi,
199
- contentBasic: Zi,
200
- contentSubtle: ts,
201
- stateActive: es,
202
- stateDefault: os,
203
- stateHover: ns
204
- }
205
- }, Sf = {
195
+ backgroundBasic: es,
196
+ backgroundSubtle: os,
197
+ borderBasic: ns,
198
+ borderSubtle: as,
199
+ contentBasic: rs,
200
+ contentSubtle: cs,
201
+ stateActive: is,
202
+ stateDefault: ls,
203
+ stateHover: ss
204
+ }
205
+ }, vg = {
206
206
  button: {
207
207
  plain: {
208
- border: bs,
209
- content: vs,
210
- stateActive: Bs,
211
- stateDefault: ys,
212
- stateHover: $s
208
+ border: Hs,
209
+ content: $s,
210
+ stateActive: Fs,
211
+ stateDefault: Ds,
212
+ stateHover: xs
213
213
  },
214
214
  primary: {
215
- border: ks,
216
- content: hs,
217
- stateActive: Hs,
218
- stateDefault: Fs,
219
- stateHover: Cs
220
- },
221
- secondary: {
222
- border: Ds,
215
+ border: Cs,
223
216
  content: Is,
224
- stateActive: xs,
225
- stateDefault: Ps,
217
+ stateActive: Ps,
218
+ stateDefault: Ts,
226
219
  stateHover: As
227
220
  },
228
- tertiary: {
221
+ secondary: {
229
222
  border: Ws,
230
- content: Ts,
223
+ content: Ls,
231
224
  stateActive: zs,
232
- stateDefault: ws,
233
- stateHover: Us
225
+ stateDefault: Ms,
226
+ stateHover: ws
227
+ },
228
+ tertiary: {
229
+ border: Xs,
230
+ content: Us,
231
+ stateActive: Rs,
232
+ stateDefault: Os,
233
+ stateHover: _s
234
234
  }
235
235
  }
236
- }, gf = {
236
+ }, hg = {
237
237
  danger: {
238
- backgroundBasic: kl,
239
- backgroundSubtle: hl,
240
- borderBasic: Hl,
241
- borderSubtle: Fl,
242
- contentBasic: Cl,
243
- contentSubtle: Dl,
244
- stateActive: Il,
245
- stateDefault: xl,
246
- stateHover: Pl
238
+ backgroundBasic: Cd,
239
+ backgroundSubtle: Id,
240
+ borderBasic: Pd,
241
+ borderSubtle: Td,
242
+ contentBasic: Ad,
243
+ contentSubtle: Wd,
244
+ stateActive: Ld,
245
+ stateDefault: zd,
246
+ stateHover: Md
247
247
  },
248
248
  informative: {
249
- backgroundBasic: Al,
250
- backgroundSubtle: Wl,
251
- borderBasic: Tl,
252
- borderSubtle: zl,
253
- contentBasic: wl,
254
- contentSubtle: Ul,
255
- stateActive: Rl,
256
- stateDefault: Ml,
257
- stateHover: Ll
249
+ backgroundBasic: wd,
250
+ backgroundSubtle: Xd,
251
+ borderBasic: Ud,
252
+ borderSubtle: Rd,
253
+ contentBasic: Od,
254
+ contentSubtle: _d,
255
+ stateActive: Vd,
256
+ stateDefault: jd,
257
+ stateHover: qd
258
258
  },
259
259
  success: {
260
- backgroundBasic: Ol,
261
- backgroundSubtle: Xl,
262
- borderBasic: _l,
263
- borderSubtle: Vl,
264
- contentBasic: jl,
265
- contentSubtle: ql,
266
- stateActive: El,
267
- stateDefault: Gl,
268
- stateHover: Jl
260
+ backgroundBasic: Ed,
261
+ backgroundSubtle: Gd,
262
+ borderBasic: Jd,
263
+ borderSubtle: Kd,
264
+ contentBasic: Nd,
265
+ contentSubtle: Qd,
266
+ stateActive: Yd,
267
+ stateDefault: Zd,
268
+ stateHover: tf
269
269
  },
270
270
  warning: {
271
- backgroundBasic: Kl,
272
- backgroundSubtle: Nl,
273
- borderBasic: Ql,
274
- borderSubtle: Yl,
275
- contentBasic: Zl,
276
- contentSubtle: td,
277
- stateActive: ed,
278
- stateDefault: od,
279
- stateHover: nd
280
- }
281
- }, hf = {
282
- primary: cf,
283
- secondary: sf,
284
- tertiary: lf
271
+ backgroundBasic: ef,
272
+ backgroundSubtle: of,
273
+ borderBasic: nf,
274
+ borderSubtle: af,
275
+ contentBasic: rf,
276
+ contentSubtle: cf,
277
+ stateActive: lf,
278
+ stateDefault: sf,
279
+ stateHover: df
280
+ }
281
+ }, Ig = {
282
+ primary: pg,
283
+ secondary: mg,
284
+ tertiary: Sg
285
285
  };
286
286
  function createUppercaseKeyDictionary(obj) {
287
287
  return Object.fromEntries(Object.keys(obj).map((key) => [key.toUpperCase(), key]));
@@ -338,14 +338,14 @@
338
338
  SECONDARY: "secondary",
339
339
  TERTIARY: "tertiary"
340
340
  };
341
- const ComponentButtonColors = createUppercaseKeyDictionary(Sf.button);
342
- const EmotionColors = createUppercaseKeyDictionary(gf);
341
+ const ComponentButtonColors = createUppercaseKeyDictionary(vg.button);
342
+ const EmotionColors = createUppercaseKeyDictionary(hg);
343
343
  const LinkColors = {
344
344
  PRIMARY: "primary",
345
345
  SECONDARY: "secondary",
346
346
  TERTIARY: "tertiary"
347
347
  };
348
- const TextColors = createUppercaseKeyDictionary(hf);
348
+ const TextColors = createUppercaseKeyDictionary(Ig);
349
349
  const Intensity = {
350
350
  BASIC: "basic",
351
351
  SUBTLE: "subtle"
@@ -384,7 +384,7 @@
384
384
  ...Sizes,
385
385
  XLARGE: "xlarge"
386
386
  };
387
- const { MAXWIDTH, PADDING, ...ContainerTokenSizes } = createUppercaseKeyDictionary(_f);
387
+ const { MAXWIDTH, PADDING, ...ContainerTokenSizes } = createUppercaseKeyDictionary(Fp);
388
388
  const ValidationStates = {
389
389
  SUCCESS: "success",
390
390
  WARNING: "warning",
@@ -426,6 +426,8 @@
426
426
  TOP: "top",
427
427
  BOTTOM: "bottom"
428
428
  };
429
+ const MULTIPLE_SELECTION_MODE = "multiple";
430
+ const SINGLE_SELECTION_MODE = "single";
429
431
  const BackgroundStyleProps = {
430
432
  backgroundGradient: "bg-gradient"
431
433
  };
@@ -476,8 +478,8 @@
476
478
  ANYWHERE: "anywhere",
477
479
  LONG_WORDS: "long-words"
478
480
  };
479
- const defaultContext$b = void 0;
480
- const ClassNamePrefixContext = React.createContext(defaultContext$b);
481
+ const defaultContext$d = void 0;
482
+ const ClassNamePrefixContext = React.createContext(defaultContext$d);
481
483
  const ClassNamePrefixProvider = ClassNamePrefixContext.Provider;
482
484
  const ClassNamePrefixConsumer = ClassNamePrefixContext.Consumer;
483
485
  const CardSizes = {
@@ -566,12 +568,12 @@
566
568
  }
567
569
  return result;
568
570
  };
569
- const getAccentTextColors = () => generateColorsObject(df, "content", "accent");
570
- const getEmotionTextColors = () => generateColorsObject(gf, "content", "emotion");
571
- const getAccentBackgroundColors = () => generateColorsObject(df, "background", "accent");
572
- const getEmotionBackgroundColors = () => generateColorsObject(gf, "background", "emotion");
573
- const getAccentBorderColors = () => generateColorsObject(df, "border", "accent");
574
- const getEmotionBorderColors = () => generateColorsObject(gf, "border", "emotion");
571
+ const getAccentTextColors = () => generateColorsObject(ug, "content", "accent");
572
+ const getEmotionTextColors = () => generateColorsObject(hg, "content", "emotion");
573
+ const getAccentBackgroundColors = () => generateColorsObject(ug, "background", "accent");
574
+ const getEmotionBackgroundColors = () => generateColorsObject(hg, "background", "emotion");
575
+ const getAccentBorderColors = () => generateColorsObject(ug, "border", "accent");
576
+ const getEmotionBorderColors = () => generateColorsObject(hg, "border", "emotion");
575
577
  const getNeutralTextColors = () => ({
576
578
  NEUTRAL_BASIC: "neutral-basic",
577
579
  NEUTRAL_SUBTLE: "neutral-subtle"
@@ -580,28 +582,31 @@
580
582
  NEUTRAL_BASIC: "neutral-basic",
581
583
  NEUTRAL_SUBTLE: "neutral-subtle"
582
584
  });
583
- const getAccentColorNames = () => Object.keys(df);
584
- const getEmotionColorNames = () => Object.keys(gf);
585
- const getTextColorNames = () => Object.keys(hf);
585
+ const getAccentColorNames = () => Object.keys(ug);
586
+ const getEmotionColorNames = () => Object.keys(hg);
587
+ const getTextColorNames = () => Object.keys(Ig);
586
588
  const compose = (...functions) => functions.reduceRight(
587
589
  (prevFunction, nextFunction) => (...args) => nextFunction(prevFunction(...args)),
588
590
  (value) => value
589
591
  );
590
592
  const debounce = (callback, delay) => {
591
593
  let timeout;
592
- let isThrottled = false;
593
- return (args) => {
594
- if (!isThrottled) {
595
- isThrottled = true;
596
- if (timeout) {
597
- clearTimeout(timeout);
598
- }
599
- timeout = setTimeout(() => {
600
- callback(args);
601
- isThrottled = false;
602
- }, delay);
594
+ const debounced = ((args) => {
595
+ if (timeout !== void 0) {
596
+ clearTimeout(timeout);
597
+ }
598
+ timeout = setTimeout(() => {
599
+ timeout = void 0;
600
+ callback(args);
601
+ }, delay);
602
+ });
603
+ debounced.cancel = () => {
604
+ if (timeout !== void 0) {
605
+ clearTimeout(timeout);
606
+ timeout = void 0;
603
607
  }
604
608
  };
609
+ return debounced;
605
610
  };
606
611
  const delayedCallback = (callback, interval) => {
607
612
  const timeoutId = setTimeout(() => {
@@ -655,32 +660,32 @@
655
660
  if (hasRequiredNode) return node;
656
661
  hasRequiredNode = 1;
657
662
  var __extends = node && node.__extends || /* @__PURE__ */ (function() {
658
- var extendStatics = function(d, b2) {
659
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b3) {
660
- d2.__proto__ = b3;
661
- } || function(d2, b3) {
662
- for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d2[p2] = b3[p2];
663
+ var extendStatics = function(d2, b) {
664
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b2) {
665
+ d3.__proto__ = b2;
666
+ } || function(d3, b2) {
667
+ for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d3[p] = b2[p];
663
668
  };
664
- return extendStatics(d, b2);
669
+ return extendStatics(d2, b);
665
670
  };
666
- return function(d, b2) {
667
- if (typeof b2 !== "function" && b2 !== null)
668
- throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
669
- extendStatics(d, b2);
671
+ return function(d2, b) {
672
+ if (typeof b !== "function" && b !== null)
673
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
674
+ extendStatics(d2, b);
670
675
  function __() {
671
- this.constructor = d;
676
+ this.constructor = d2;
672
677
  }
673
- d.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
678
+ d2.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
674
679
  };
675
680
  })();
676
681
  var __assign = node && node.__assign || function() {
677
- __assign = Object.assign || function(t2) {
678
- for (var s, i = 1, n = arguments.length; i < n; i++) {
679
- s = arguments[i];
680
- for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2))
681
- t2[p2] = s[p2];
682
+ __assign = Object.assign || function(t) {
683
+ for (var s2, i = 1, n = arguments.length; i < n; i++) {
684
+ s2 = arguments[i];
685
+ for (var p in s2) if (Object.prototype.hasOwnProperty.call(s2, p))
686
+ t[p] = s2[p];
682
687
  }
683
- return t2;
688
+ return t;
684
689
  };
685
690
  return __assign.apply(this, arguments);
686
691
  };
@@ -1102,7 +1107,7 @@
1102
1107
  o[k2] = m[k];
1103
1108
  }));
1104
1109
  var __exportStar = lib$2 && lib$2.__exportStar || function(m, exports$12) {
1105
- for (var p2 in m) if (p2 !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p2)) __createBinding(exports$12, m, p2);
1110
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$12, p)) __createBinding(exports$12, m, p);
1106
1111
  };
1107
1112
  Object.defineProperty(exports$1, "__esModule", { value: true });
1108
1113
  exports$1.DomHandler = void 0;
@@ -2970,6 +2975,33 @@
2970
2975
  const mergedStyles = Object.values(styleProps).filter(isNonNullableObject).reduce(extractCssStylesAndVariables, {});
2971
2976
  return isSpiritComponent ? { UNSAFE_className: mergedClasses, UNSAFE_style: mergedStyles } : { className: mergedClasses, style: mergedStyles };
2972
2977
  }
2978
+ const isProtocolRelativeUrl = (href) => href.trim().startsWith("//");
2979
+ const hasNonPathUrlScheme = (href) => /^[a-z][a-z0-9+.-]*:/i.test(href.trim());
2980
+ const isExternalOrNonPathHref = (href) => hasNonPathUrlScheme(href) || isProtocolRelativeUrl(href);
2981
+ const isHashOnlyHref = (href) => href.trim().startsWith("#");
2982
+ const shouldDeferToBrowserForTarget = (target) => typeof target === "string" && target.toLowerCase() !== "_self";
2983
+ const shouldDeferToBrowserForLinkClick = (event) => event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || typeof event.button === "number" && event.button !== 0;
2984
+ const handleLinkClick = (options) => {
2985
+ const { router, routerOptions, href, target, download, onClick: onNativeClick, isDisabled } = options;
2986
+ const isNonPathHref = typeof href === "string" && isExternalOrNonPathHref(href);
2987
+ const isHashHref = typeof href === "string" && isHashOnlyHref(href);
2988
+ const hasDownloadAttribute = download === true || typeof download === "string";
2989
+ const shouldUseRouter = Boolean(
2990
+ router && href && !isDisabled && !hasDownloadAttribute && !shouldDeferToBrowserForTarget(target) && !isNonPathHref && !isHashHref
2991
+ );
2992
+ const onRouterClick = (event) => {
2993
+ if (event.defaultPrevented) {
2994
+ return;
2995
+ }
2996
+ onNativeClick?.(event);
2997
+ if (shouldDeferToBrowserForLinkClick(event) || event.defaultPrevented) {
2998
+ return;
2999
+ }
3000
+ event.preventDefault();
3001
+ router?.navigate(String(href), routerOptions);
3002
+ };
3003
+ return shouldUseRouter ? onRouterClick : onNativeClick;
3004
+ };
2973
3005
  function isResponsive(value) {
2974
3006
  return typeof value === "object" && value !== null && !Array.isArray(value);
2975
3007
  }
@@ -2992,7 +3024,7 @@
2992
3024
  }
2993
3025
  const isSSR = typeof window === "undefined";
2994
3026
  const camelCaseToKebabCase = (input) => input.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2995
- const kebabCaseToCamelCase = (input) => input.replace(/-([a-z])/g, (g2) => g2[1].toUpperCase());
3027
+ const kebabCaseToCamelCase = (input) => input.replace(/-([a-z])/g, (g) => g[1].toUpperCase());
2996
3028
  const kebabCaseToCamelCaseValues = (input) => {
2997
3029
  if (typeof input === "object" && input !== null) {
2998
3030
  const result = {};
@@ -3003,6 +3035,12 @@
3003
3035
  }
3004
3036
  return input;
3005
3037
  };
3038
+ const normalizeStringValue = (value) => {
3039
+ if (typeof value === "string" || value == null) {
3040
+ return value ?? void 0;
3041
+ }
3042
+ return String(value);
3043
+ };
3006
3044
  const stringOrObjectKebabCaseToCamelCase = (input) => {
3007
3045
  if (typeof input === "string") {
3008
3046
  return kebabCaseToCamelCase(input);
@@ -3166,7 +3204,32 @@
3166
3204
  const responsiveProperty = property && typeof property === "object" ? { mobile: DEFAULT_MOBILE_ALIGNMENT, ...property } : property;
3167
3205
  return generateStylePropsClassNames(componentClass, responsiveProperty, type);
3168
3206
  }
3169
- const useAriaDescribedBy = (ids) => React.useMemo(() => ids.length ? { "aria-describedby": ids.join(" ") } : {}, [ids]);
3207
+ function useAriaIdRefs(ariaAttribute, initialIds) {
3208
+ const [ids, setIds] = React.useState(() => {
3209
+ if (!initialIds) {
3210
+ return [];
3211
+ }
3212
+ const parsed = initialIds.trim().split(/\s+/).filter(Boolean);
3213
+ return Array.from(new Set(parsed));
3214
+ });
3215
+ const register = React.useCallback(({ add, remove }) => {
3216
+ setIds((prevIds) => {
3217
+ const idsSet = new Set(prevIds);
3218
+ const initialSize2 = idsSet.size;
3219
+ if (remove) {
3220
+ idsSet.delete(remove);
3221
+ }
3222
+ if (add) {
3223
+ idsSet.add(add);
3224
+ }
3225
+ return idsSet.size !== initialSize2 ? Array.from(idsSet) : prevIds;
3226
+ });
3227
+ }, []);
3228
+ const ariaProps = React.useMemo(() => ids.length > 0 ? { [ariaAttribute]: ids.join(" ") } : {}, [ids, ariaAttribute]);
3229
+ return [ariaProps, register];
3230
+ }
3231
+ const useAriaDescribedBy = (initialIds) => useAriaIdRefs("aria-describedby", initialIds);
3232
+ const useAriaDetails = (initialIds) => useAriaIdRefs("aria-details", initialIds);
3170
3233
  const useIsomorphicLayoutEffect = !isSSR ? React.useLayoutEffect : React.useEffect;
3171
3234
  const EVENT_CANCEL = "cancel";
3172
3235
  const EVENT_KEYDOWN = "keydown";
@@ -3271,6 +3334,56 @@
3271
3334
  };
3272
3335
  }, [clickHandler]);
3273
3336
  };
3337
+ const useControlledModeGuard = (props) => {
3338
+ const {
3339
+ value,
3340
+ defaultValue,
3341
+ componentName,
3342
+ valuePropName = "value",
3343
+ defaultValuePropName = "defaultValue",
3344
+ bothDefinedMessage,
3345
+ modeSwitchMessage
3346
+ } = props;
3347
+ const isControlled = value !== void 0;
3348
+ const isControlledRef = React.useRef(void 0);
3349
+ const didWarnBothValueAndDefaultRef = React.useRef(false);
3350
+ React.useEffect(() => {
3351
+ if (value !== void 0 && defaultValue !== void 0 && !didWarnBothValueAndDefaultRef.current) {
3352
+ didWarnBothValueAndDefaultRef.current = true;
3353
+ warning(
3354
+ false,
3355
+ bothDefinedMessage ?? `${componentName}: \`${valuePropName}\` and \`${defaultValuePropName}\` cannot both be set. Use either controlled (\`${valuePropName}\`) or uncontrolled (\`${defaultValuePropName}\`) mode.`
3356
+ );
3357
+ }
3358
+ }, [bothDefinedMessage, componentName, defaultValue, defaultValuePropName, value, valuePropName]);
3359
+ React.useEffect(() => {
3360
+ if (isControlledRef.current === void 0) {
3361
+ isControlledRef.current = isControlled;
3362
+ return;
3363
+ }
3364
+ if (isControlledRef.current !== isControlled) {
3365
+ warning(
3366
+ false,
3367
+ modeSwitchMessage ?? `${componentName}: Do not switch between controlled (\`${valuePropName}\` defined) and uncontrolled (\`${valuePropName}\` undefined) modes across renders.`
3368
+ );
3369
+ }
3370
+ isControlledRef.current = isControlled;
3371
+ }, [componentName, isControlled, modeSwitchMessage, valuePropName]);
3372
+ };
3373
+ const useDebouncedValue = (inputValue, delay) => {
3374
+ const [debouncedValue, setDebouncedValue] = React.useState(inputValue);
3375
+ const isInitialMount = React.useRef(true);
3376
+ const debouncedSetValue = React.useMemo(() => debounce((value) => setDebouncedValue(value), delay), [delay]);
3377
+ React.useEffect(() => {
3378
+ if (isInitialMount.current) {
3379
+ isInitialMount.current = false;
3380
+ return void 0;
3381
+ }
3382
+ debouncedSetValue(inputValue);
3383
+ return () => debouncedSetValue.cancel();
3384
+ }, [inputValue, debouncedSetValue]);
3385
+ return debouncedValue;
3386
+ };
3274
3387
  const useDeprecationMessage = ({
3275
3388
  method = "component",
3276
3389
  trigger,
@@ -3386,6 +3499,23 @@
3386
3499
  previous: "Previous",
3387
3500
  goToPage: "Go to page"
3388
3501
  },
3502
+ picker: {
3503
+ add: "Add",
3504
+ removeAll: "Remove all",
3505
+ removeItemLabel: "Remove {itemLabel}",
3506
+ selectionAriaLabel: "Selected {label}",
3507
+ tagDescriptionText: "Press Delete or Backspace to remove"
3508
+ },
3509
+ textArea: {
3510
+ counter: {
3511
+ charactersEntered: "{count} characters entered",
3512
+ charactersRemaining: "{count} characters remaining",
3513
+ characterRemaining: "{count} character remaining",
3514
+ canEnterUpTo: "You can enter up to {maxLength} characters",
3515
+ charactersOverLimit: "{count} characters over limit",
3516
+ characterOverLimit: "{count} character over limit"
3517
+ }
3518
+ },
3389
3519
  textField: {
3390
3520
  password: {
3391
3521
  show: "Show password",
@@ -3413,14 +3543,14 @@
3413
3543
  return typeof current === "string" ? current : path;
3414
3544
  };
3415
3545
  const useI18n = () => {
3416
- const t2 = (key, params) => {
3546
+ const t = (key, params) => {
3417
3547
  const translation = resolveTranslationKey(defaultLabels, key);
3418
3548
  return !params ? translation : replaceTranslationParams(translation, params);
3419
3549
  };
3420
- return { t: t2 };
3550
+ return { t };
3421
3551
  };
3422
- const defaultContext$a = void 0;
3423
- const IconsContext = React.createContext(defaultContext$a);
3552
+ const defaultContext$c = void 0;
3553
+ const IconsContext = React.createContext(defaultContext$c);
3424
3554
  const IconsProvider = IconsContext.Provider;
3425
3555
  const IconsConsumer = IconsContext.Consumer;
3426
3556
  const useIcon = (name) => {
@@ -3453,6 +3583,23 @@
3453
3583
  }
3454
3584
  }, [isOpen]);
3455
3585
  };
3586
+ const defaultContext$b = null;
3587
+ const RouterContext = React.createContext(defaultContext$b);
3588
+ const RouterConsumer = RouterContext.Consumer;
3589
+ const RouterProvider = (props) => {
3590
+ const { navigate, children } = props;
3591
+ const value = React.useMemo(() => ({ navigate }), [navigate]);
3592
+ return React.createElement(RouterContext.Provider, { value }, children);
3593
+ };
3594
+ const useRouter = () => React.useContext(RouterContext);
3595
+ const useLinkClick = (options) => {
3596
+ const router = useRouter();
3597
+ const { routerOptions, href, target, download, onClick, isDisabled } = options;
3598
+ return React.useMemo(
3599
+ () => handleLinkClick({ router, routerOptions, href, target, download, onClick, isDisabled }),
3600
+ [router, routerOptions, href, target, download, onClick, isDisabled]
3601
+ );
3602
+ };
3456
3603
  function useIsMounted() {
3457
3604
  const isMounted = React.useRef(false);
3458
3605
  React.useEffect(() => {
@@ -3547,16 +3694,59 @@
3547
3694
  };
3548
3695
  }, [isOpen, ref]);
3549
3696
  };
3697
+ const isSingleSelectionMode = (selectionMode) => selectionMode === SINGLE_SELECTION_MODE;
3698
+ const getSelectedKeys = (keys, selectionMode) => isSingleSelectionMode(selectionMode) ? keys.slice(0, 1) : keys;
3699
+ const isKeySelected = (selectedKeys, key, selectionMode) => isSingleSelectionMode(selectionMode) ? selectedKeys[0] === key : selectedKeys.includes(key);
3700
+ const getToggledSelectedKeys = (previousKeys, key, selectionMode) => {
3701
+ const keyIsSelected = previousKeys.includes(key);
3702
+ if (isSingleSelectionMode(selectionMode)) {
3703
+ return keyIsSelected ? [] : [key];
3704
+ }
3705
+ return keyIsSelected ? previousKeys.filter((item) => item !== key) : [...previousKeys, key];
3706
+ };
3707
+ const useSelectionState = ({
3708
+ defaultSelectedKeys = [],
3709
+ onSelectionChange,
3710
+ selectionMode = MULTIPLE_SELECTION_MODE
3711
+ }) => {
3712
+ const [selectedKeys, updateSelectedKeys] = React.useState(
3713
+ () => getSelectedKeys(defaultSelectedKeys, selectionMode)
3714
+ );
3715
+ const onSelectionChangeRef = React.useRef(onSelectionChange);
3716
+ onSelectionChangeRef.current = onSelectionChange;
3717
+ const skipNotificationRef = React.useRef(true);
3718
+ React.useEffect(() => {
3719
+ updateSelectedKeys((previousKeys) => {
3720
+ const nextKeys = getSelectedKeys(previousKeys, selectionMode);
3721
+ const unchanged = previousKeys.length === nextKeys.length && previousKeys.every((key, index2) => key === nextKeys[index2]);
3722
+ return unchanged ? previousKeys : nextKeys;
3723
+ });
3724
+ }, [selectionMode]);
3725
+ React.useEffect(() => {
3726
+ if (skipNotificationRef.current) {
3727
+ skipNotificationRef.current = false;
3728
+ return;
3729
+ }
3730
+ onSelectionChangeRef.current?.(selectedKeys);
3731
+ }, [selectedKeys]);
3732
+ const toggleSelectedKey = (key) => {
3733
+ updateSelectedKeys((previousKeys) => getToggledSelectedKeys(previousKeys, key, selectionMode));
3734
+ };
3735
+ const setSelectedKeys = (keys) => {
3736
+ updateSelectedKeys(getSelectedKeys(keys, selectionMode));
3737
+ };
3738
+ return { selectedKeys, setSelectedKeys, toggleSelectedKey };
3739
+ };
3550
3740
  function useSpacingStyle(spacing, prefix, direction = void 0) {
3551
3741
  const style = {};
3552
3742
  const directionSuffix = direction ? `-${direction}` : "";
3553
3743
  if (typeof spacing === "object" && spacing !== null) {
3554
3744
  Object.keys(spacing).forEach((key) => {
3555
3745
  const breakpointSuffix = key === "mobile" ? "" : `-${key}`;
3556
- style[`--${prefix}-spacing${directionSuffix}${breakpointSuffix}`] = `var(--${Xf}${spacing[key]?.toString()})`;
3746
+ style[`--${prefix}-spacing${directionSuffix}${breakpointSuffix}`] = `var(--${$p}${spacing[key]?.toString()})`;
3557
3747
  });
3558
3748
  } else if (spacing) {
3559
- style[`--${prefix}-spacing${directionSuffix}`] = `var(--${Xf}${spacing})`;
3749
+ style[`--${prefix}-spacing${directionSuffix}`] = `var(--${$p}${spacing})`;
3560
3750
  }
3561
3751
  return style;
3562
3752
  }
@@ -3590,7 +3780,7 @@
3590
3780
  symmetricalClassName: isSymmetrical ? `${componentClass}${SYMMETRICAL_CLASS_SUFFIX}` : ""
3591
3781
  };
3592
3782
  }
3593
- const { classes } = Object.keys(wf).reduce(
3783
+ const { classes } = Object.keys(yp).reduce(
3594
3784
  getSymmetryClassNamesReducer(componentClass, isSymmetrical),
3595
3785
  { classes: [], wasSymmetrical: false }
3596
3786
  );
@@ -3637,11 +3827,11 @@
3637
3827
  }
3638
3828
  };
3639
3829
  };
3640
- const defaultContext$9 = {
3830
+ const defaultContext$a = {
3641
3831
  open: void 0,
3642
3832
  toggle: () => null
3643
3833
  };
3644
- const AccordionContext = React.createContext(defaultContext$9);
3834
+ const AccordionContext = React.createContext(defaultContext$a);
3645
3835
  const AccordionProvider = AccordionContext.Provider;
3646
3836
  AccordionContext.Consumer;
3647
3837
  const useAccordionContext = () => React.useContext(AccordionContext);
@@ -3744,7 +3934,7 @@
3744
3934
  try {
3745
3935
  testStringCoercion(value);
3746
3936
  var JSCompiler_inline_result = false;
3747
- } catch (e2) {
3937
+ } catch (e) {
3748
3938
  JSCompiler_inline_result = true;
3749
3939
  }
3750
3940
  if (JSCompiler_inline_result) {
@@ -4156,10 +4346,10 @@
4156
4346
  );
4157
4347
  Accordion.spiritComponent = "Accordion";
4158
4348
  Accordion.displayName = "Accordion";
4159
- const defaultContext$8 = {
4349
+ const defaultContext$9 = {
4160
4350
  id: ""
4161
4351
  };
4162
- const AccordionItemContext = React.createContext(defaultContext$8);
4352
+ const AccordionItemContext = React.createContext(defaultContext$9);
4163
4353
  const AccordionItemProvider = AccordionItemContext.Provider;
4164
4354
  AccordionItemContext.Consumer;
4165
4355
  const useAccordionItemContext = () => React.useContext(AccordionItemContext);
@@ -4191,7 +4381,7 @@
4191
4381
  };
4192
4382
  const useIconStyleProps = (props) => {
4193
4383
  const { boxSize, color, name, ...otherProps } = props;
4194
- const stylePrefix = `--${Xf}icon`;
4384
+ const stylePrefix = `--${$p}icon`;
4195
4385
  const isDualtoneIcon = String(name).includes("-dualtone");
4196
4386
  const dualtoneColorWithDefault = isDualtoneIcon && !color ? TextColors.PRIMARY : color;
4197
4387
  const iconClass = useClassNamePrefix("Icon");
@@ -4208,12 +4398,12 @@
4208
4398
  props: otherProps
4209
4399
  };
4210
4400
  };
4211
- const defaultProps$15 = {
4401
+ const defaultProps$16 = {
4212
4402
  ariaHidden: true,
4213
4403
  boxSize: DEFAULT_BOX_SIZE
4214
4404
  };
4215
4405
  const _Icon = (props, ref) => {
4216
- const propsWithDefaults = { ...defaultProps$15, ...props };
4406
+ const propsWithDefaults = { ...defaultProps$16, ...props };
4217
4407
  const { boxSize, name, title, ariaHidden, ...restProps } = propsWithDefaults;
4218
4408
  let icon = useIcon(name);
4219
4409
  const iconSize = useIconBoxSize(boxSize);
@@ -4248,11 +4438,11 @@
4248
4438
  const Icon = React.forwardRef(_Icon);
4249
4439
  Icon.spiritComponent = "Icon";
4250
4440
  Icon.displayName = "Icon";
4251
- const defaultProps$14 = {
4441
+ const defaultProps$15 = {
4252
4442
  elementType: "h3"
4253
4443
  };
4254
4444
  const _AccordionHeader = (props, ref) => {
4255
- const propsWithDefaults = { ...defaultProps$14, ...props };
4445
+ const propsWithDefaults = { ...defaultProps$15, ...props };
4256
4446
  const { elementType = "h3", children, slot, ...restProps } = propsWithDefaults;
4257
4447
  const Component = elementType;
4258
4448
  const { classProps } = useAccordionStyleProps();
@@ -4283,22 +4473,22 @@
4283
4473
  );
4284
4474
  AccordionHeader.spiritComponent = "AccordionHeader";
4285
4475
  AccordionHeader.displayName = "AccordionHeader";
4286
- function _objectWithoutPropertiesLoose(r, e2) {
4476
+ function _objectWithoutPropertiesLoose(r, e) {
4287
4477
  if (null == r) return {};
4288
- var t2 = {};
4478
+ var t = {};
4289
4479
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
4290
- if (-1 !== e2.indexOf(n)) continue;
4291
- t2[n] = r[n];
4480
+ if (-1 !== e.indexOf(n)) continue;
4481
+ t[n] = r[n];
4292
4482
  }
4293
- return t2;
4483
+ return t;
4294
4484
  }
4295
- function _setPrototypeOf(t2, e2) {
4296
- return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t3, e3) {
4297
- return t3.__proto__ = e3, t3;
4298
- }, _setPrototypeOf(t2, e2);
4485
+ function _setPrototypeOf(t, e) {
4486
+ return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
4487
+ return t2.__proto__ = e2, t2;
4488
+ }, _setPrototypeOf(t, e);
4299
4489
  }
4300
- function _inheritsLoose(t2, o) {
4301
- t2.prototype = Object.create(o.prototype), t2.prototype.constructor = t2, _setPrototypeOf(t2, o);
4490
+ function _inheritsLoose(t, o) {
4491
+ t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
4302
4492
  }
4303
4493
  var propTypes = { exports: {} };
4304
4494
  var reactIs = { exports: {} };
@@ -4307,7 +4497,7 @@
4307
4497
  function requireReactIs_production_min() {
4308
4498
  if (hasRequiredReactIs_production_min) return reactIs_production_min;
4309
4499
  hasRequiredReactIs_production_min = 1;
4310
- var b2 = "function" === typeof Symbol && Symbol.for, c = b2 ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d = b2 ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e2 = b2 ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b2 ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g2 = b2 ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b2 ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b2 ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b2 ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b2 ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b2 ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p2 = b2 ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b2 ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r = b2 ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t2 = b2 ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v2 = b2 ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b2 ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b2 ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b2 ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
4500
+ var b = "function" === typeof Symbol && Symbol.for, c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103, d2 = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110, l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121, w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
4311
4501
  function z(a) {
4312
4502
  if ("object" === typeof a && null !== a) {
4313
4503
  var u = a.$$typeof;
@@ -4316,16 +4506,16 @@
4316
4506
  switch (a = a.type, a) {
4317
4507
  case l:
4318
4508
  case m:
4319
- case e2:
4320
- case g2:
4509
+ case e:
4510
+ case g:
4321
4511
  case f:
4322
- case p2:
4512
+ case p:
4323
4513
  return a;
4324
4514
  default:
4325
4515
  switch (a = a && a.$$typeof, a) {
4326
4516
  case k:
4327
4517
  case n:
4328
- case t2:
4518
+ case t:
4329
4519
  case r:
4330
4520
  case h:
4331
4521
  return a;
@@ -4333,7 +4523,7 @@
4333
4523
  return u;
4334
4524
  }
4335
4525
  }
4336
- case d:
4526
+ case d2:
4337
4527
  return u;
4338
4528
  }
4339
4529
  }
@@ -4347,13 +4537,13 @@
4347
4537
  reactIs_production_min.ContextProvider = h;
4348
4538
  reactIs_production_min.Element = c;
4349
4539
  reactIs_production_min.ForwardRef = n;
4350
- reactIs_production_min.Fragment = e2;
4351
- reactIs_production_min.Lazy = t2;
4540
+ reactIs_production_min.Fragment = e;
4541
+ reactIs_production_min.Lazy = t;
4352
4542
  reactIs_production_min.Memo = r;
4353
- reactIs_production_min.Portal = d;
4354
- reactIs_production_min.Profiler = g2;
4543
+ reactIs_production_min.Portal = d2;
4544
+ reactIs_production_min.Profiler = g;
4355
4545
  reactIs_production_min.StrictMode = f;
4356
- reactIs_production_min.Suspense = p2;
4546
+ reactIs_production_min.Suspense = p;
4357
4547
  reactIs_production_min.isAsyncMode = function(a) {
4358
4548
  return A(a) || z(a) === l;
4359
4549
  };
@@ -4371,28 +4561,28 @@
4371
4561
  return z(a) === n;
4372
4562
  };
4373
4563
  reactIs_production_min.isFragment = function(a) {
4374
- return z(a) === e2;
4564
+ return z(a) === e;
4375
4565
  };
4376
4566
  reactIs_production_min.isLazy = function(a) {
4377
- return z(a) === t2;
4567
+ return z(a) === t;
4378
4568
  };
4379
4569
  reactIs_production_min.isMemo = function(a) {
4380
4570
  return z(a) === r;
4381
4571
  };
4382
4572
  reactIs_production_min.isPortal = function(a) {
4383
- return z(a) === d;
4573
+ return z(a) === d2;
4384
4574
  };
4385
4575
  reactIs_production_min.isProfiler = function(a) {
4386
- return z(a) === g2;
4576
+ return z(a) === g;
4387
4577
  };
4388
4578
  reactIs_production_min.isStrictMode = function(a) {
4389
4579
  return z(a) === f;
4390
4580
  };
4391
4581
  reactIs_production_min.isSuspense = function(a) {
4392
- return z(a) === p2;
4582
+ return z(a) === p;
4393
4583
  };
4394
4584
  reactIs_production_min.isValidElementType = function(a) {
4395
- return "string" === typeof a || "function" === typeof a || a === e2 || a === m || a === g2 || a === f || a === p2 || a === q || "object" === typeof a && null !== a && (a.$$typeof === t2 || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v2);
4585
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
4396
4586
  };
4397
4587
  reactIs_production_min.typeOf = z;
4398
4588
  return reactIs_production_min;
@@ -4612,8 +4802,8 @@
4612
4802
  var from;
4613
4803
  var to = toObject(target);
4614
4804
  var symbols;
4615
- for (var s = 1; s < arguments.length; s++) {
4616
- from = Object(arguments[s]);
4805
+ for (var s2 = 1; s2 < arguments.length; s2++) {
4806
+ from = Object(arguments[s2]);
4617
4807
  for (var key in from) {
4618
4808
  if (hasOwnProperty.call(from, key)) {
4619
4809
  to[key] = from[key];
@@ -4770,7 +4960,7 @@
4770
4960
  shape: createShapeTypeChecker,
4771
4961
  exact: createStrictShapeTypeChecker
4772
4962
  };
4773
- function is(x, y) {
4963
+ function is2(x, y) {
4774
4964
  if (x === y) {
4775
4965
  return x !== 0 || 1 / x === 1 / y;
4776
4966
  } else {
@@ -4913,7 +5103,7 @@
4913
5103
  function validate(props, propName, componentName, location, propFullName) {
4914
5104
  var propValue = props[propName];
4915
5105
  for (var i = 0; i < expectedValues.length; i++) {
4916
- if (is(propValue, expectedValues[i])) {
5106
+ if (is2(propValue, expectedValues[i])) {
4917
5107
  return null;
4918
5108
  }
4919
5109
  }
@@ -5725,16 +5915,16 @@
5725
5915
  exiting: "is-transitioning",
5726
5916
  exited: ""
5727
5917
  };
5728
- const defaultProps$13 = {
5918
+ const defaultProps$14 = {
5729
5919
  elementType: "div",
5730
5920
  isOpen: false,
5731
5921
  collapsibleToBreakpoint: void 0,
5732
5922
  transitionDuration: TRANSITION_DURATION$1
5733
5923
  };
5734
5924
  const Collapse = (props) => {
5735
- const propsWithDefaults = { ...defaultProps$13, ...props };
5925
+ const propsWithDefaults = { ...defaultProps$14, ...props };
5736
5926
  const {
5737
- elementType: ElementTag = defaultProps$13.elementType,
5927
+ elementType: ElementTag = defaultProps$14.elementType,
5738
5928
  children,
5739
5929
  transitionDuration = TRANSITION_DURATION$1,
5740
5930
  ...restProps
@@ -5786,11 +5976,11 @@
5786
5976
  isOpen
5787
5977
  };
5788
5978
  };
5789
- const defaultProps$12 = {
5979
+ const defaultProps$13 = {
5790
5980
  isOpen: false
5791
5981
  };
5792
5982
  const UncontrolledCollapse = (props) => {
5793
- const propsWithDefaults = { ...defaultProps$12, ...props };
5983
+ const propsWithDefaults = { ...defaultProps$13, ...props };
5794
5984
  const {
5795
5985
  children,
5796
5986
  /** @deprecated "hideOnCollapse" property will be replaced in the next major version. Please use "isDisposable" instead. */
@@ -5859,7 +6049,7 @@
5859
6049
  styleProps: flexStyle
5860
6050
  };
5861
6051
  }
5862
- const defaultProps$11 = {
6052
+ const defaultProps$12 = {
5863
6053
  alignmentX: AlignmentXExtended.STRETCH,
5864
6054
  alignmentY: AlignmentYExtended.STRETCH,
5865
6055
  direction: DirectionExtended.HORIZONTAL,
@@ -5867,9 +6057,9 @@
5867
6057
  isWrapping: false
5868
6058
  };
5869
6059
  const _Flex = (props, ref) => {
5870
- const propsWithDefaults = { ...defaultProps$11, ...props };
6060
+ const propsWithDefaults = { ...defaultProps$12, ...props };
5871
6061
  const {
5872
- elementType = defaultProps$11.elementType,
6062
+ elementType = defaultProps$12.elementType,
5873
6063
  /**
5874
6064
  * @deprecated "row" and "column" values will be removed in the next major version. Please use "horizontal" and "vertical" instead.
5875
6065
  * @see https://jira.almacareer.tech/browse/DS-1629
@@ -5887,7 +6077,7 @@
5887
6077
  const Flex = React.forwardRef(_Flex);
5888
6078
  Flex.spiritComponent = "Flex";
5889
6079
  Flex.displayName = "Flex";
5890
- const defaultProps$10 = {
6080
+ const defaultProps$11 = {
5891
6081
  alignmentX: {
5892
6082
  mobile: AlignmentXExtended.STRETCH,
5893
6083
  tablet: AlignmentXExtended.LEFT
@@ -5899,7 +6089,7 @@
5899
6089
  };
5900
6090
  const ActionGroup = (props) => {
5901
6091
  const { children, ...restProps } = props;
5902
- const propsWithDefaults = { ...defaultProps$10, ...restProps };
6092
+ const propsWithDefaults = { ...defaultProps$11, ...restProps };
5903
6093
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { ...propsWithDefaults, children });
5904
6094
  };
5905
6095
  ActionGroup.spiritComponent = "ActionGroup";
@@ -5927,13 +6117,13 @@
5927
6117
  });
5928
6118
  return iconName || iconNameValue;
5929
6119
  }
5930
- const defaultProps$$ = {
6120
+ const defaultProps$10 = {
5931
6121
  color: "success",
5932
6122
  isCentered: false,
5933
6123
  elementType: "div"
5934
6124
  };
5935
6125
  const _Alert = (props, ref) => {
5936
- const propsWithDefaults = { ...defaultProps$$, ...props };
6126
+ const propsWithDefaults = { ...defaultProps$10, ...props };
5937
6127
  const { elementType, children, color, iconName, ...restProps } = propsWithDefaults;
5938
6128
  const Component = elementType;
5939
6129
  const { classProps, props: modifiedProps } = useAlertStyleProps({ color, ...restProps });
@@ -5961,14 +6151,14 @@
5961
6151
  props: restProps
5962
6152
  };
5963
6153
  };
5964
- const defaultProps$_ = {
6154
+ const defaultProps$$ = {
5965
6155
  elementType: "div",
5966
6156
  isSquare: false,
5967
6157
  size: SizesExtended.MEDIUM
5968
6158
  };
5969
6159
  const _Avatar = (props, ref) => {
5970
- const propsWithDefaults = { ...defaultProps$_, ...props };
5971
- const { elementType = defaultProps$_.elementType, children, ...restProps } = propsWithDefaults;
6160
+ const propsWithDefaults = { ...defaultProps$$, ...props };
6161
+ const { elementType = defaultProps$$.elementType, children, ...restProps } = propsWithDefaults;
5972
6162
  const Component = elementType;
5973
6163
  const { classProps, props: modifiedProps } = useAvatarStyleProps(restProps);
5974
6164
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
@@ -6001,13 +6191,13 @@
6001
6191
  props: restProps
6002
6192
  };
6003
6193
  };
6004
- const defaultProps$Z = {
6194
+ const defaultProps$_ = {
6005
6195
  elementType: "div",
6006
6196
  borderStyle: BorderStyles.SOLID
6007
6197
  };
6008
6198
  const _Box = (props, ref) => {
6009
- const propsWithDefaults = { ...defaultProps$Z, ...props };
6010
- const { elementType = defaultProps$Z.elementType, children, ...restProps } = propsWithDefaults;
6199
+ const propsWithDefaults = { ...defaultProps$_, ...props };
6200
+ const { elementType = defaultProps$_.elementType, children, ...restProps } = propsWithDefaults;
6011
6201
  const Component = elementType;
6012
6202
  const { classProps, props: modifiedProps } = useBoxStyleProps(restProps);
6013
6203
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps, {
@@ -6040,20 +6230,21 @@
6040
6230
  props: restProps
6041
6231
  };
6042
6232
  }
6043
- const defaultProps$Y = {
6233
+ const defaultProps$Z = {
6044
6234
  elementType: "a",
6045
6235
  color: "primary",
6046
6236
  hasVisitedStyleAllowed: false,
6047
6237
  underlined: "hover"
6048
6238
  };
6049
6239
  const _Link = (props, ref) => {
6050
- const propsWithDefaults = { ...defaultProps$Y, ...props };
6051
- const { elementType = defaultProps$Y.elementType, children, ...restProps } = propsWithDefaults;
6240
+ const propsWithDefaults = { ...defaultProps$Z, ...props };
6241
+ const { elementType = defaultProps$Z.elementType, children, routerOptions, ...restProps } = propsWithDefaults;
6052
6242
  const Component = elementType;
6053
6243
  const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);
6054
6244
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
6055
6245
  const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
6056
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, href: restProps.href, ref, children });
6246
+ const handleClick = useLinkClick({ ...restProps, routerOptions });
6247
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, onClick: handleClick, ref, children });
6057
6248
  };
6058
6249
  const Link = React.forwardRef(_Link);
6059
6250
  Link.spiritComponent = "Link";
@@ -6079,14 +6270,14 @@
6079
6270
  props: restProps
6080
6271
  };
6081
6272
  }
6082
- const defaultProps$X = {
6273
+ const defaultProps$Y = {
6083
6274
  iconNameEnd: "chevron-right",
6084
6275
  iconNameStart: "chevron-left",
6085
6276
  isCurrent: false,
6086
6277
  isGoBackOnly: false
6087
6278
  };
6088
6279
  const BreadcrumbsItem = (props) => {
6089
- const propsWithDefaults = { ...defaultProps$X, ...props };
6280
+ const propsWithDefaults = { ...defaultProps$Y, ...props };
6090
6281
  const { children, href, isCurrent, iconNameStart, iconNameEnd, ...restProps } = propsWithDefaults;
6091
6282
  const { classProps, props: otherProps } = useBreadcrumbsStyleProps({ ...restProps });
6092
6283
  const { styleProps, props: transferProps } = useStyleProps(otherProps);
@@ -6106,12 +6297,12 @@
6106
6297
  ] });
6107
6298
  };
6108
6299
  BreadcrumbsItem.spiritComponent = "BreadcrumbsItem";
6109
- const defaultProps$W = {
6300
+ const defaultProps$X = {
6110
6301
  elementType: "nav",
6111
6302
  items: []
6112
6303
  };
6113
6304
  const Breadcrumbs = (props) => {
6114
- const propsWithDefaults = { ...defaultProps$W, ...props };
6305
+ const propsWithDefaults = { ...defaultProps$X, ...props };
6115
6306
  const { children, elementType: ElementTag = "nav", goBackTitle, items, ...restProps } = propsWithDefaults;
6116
6307
  const { classProps, props: modifiedProps } = useBreadcrumbsStyleProps({ ...restProps });
6117
6308
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
@@ -6211,7 +6402,7 @@
6211
6402
  );
6212
6403
  };
6213
6404
  Spinner.spiritComponent = "Spinner";
6214
- const defaultProps$V = {
6405
+ const defaultProps$W = {
6215
6406
  color: "primary",
6216
6407
  /**
6217
6408
  * @deprecated "isBlock" property will be removed in the next major version. Please read component's README for more information.
@@ -6226,9 +6417,12 @@
6226
6417
  elementType: "button"
6227
6418
  };
6228
6419
  const _Button = (props, ref) => {
6229
- const propsWithContext = useContextProps();
6230
- const propsWithDefaults = { ...defaultProps$V, ...props, ...propsWithContext };
6231
- const { elementType = defaultProps$V.elementType, children, ...restProps } = propsWithDefaults;
6420
+ const { elementType: propsElementType } = props;
6421
+ const contextProps = useContextProps(props);
6422
+ const { elementType: contextElementType, children, ...restFromContext } = contextProps;
6423
+ const elementType = propsElementType ?? contextElementType ?? defaultProps$W.elementType;
6424
+ const propsWithDefaults = { ...defaultProps$W, ...restFromContext };
6425
+ const { elementType: _elementType, ...restProps } = propsWithDefaults;
6232
6426
  const Component = elementType;
6233
6427
  const { buttonProps } = useButtonProps(restProps);
6234
6428
  const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);
@@ -6296,7 +6490,7 @@
6296
6490
  props: restProps
6297
6491
  };
6298
6492
  }
6299
- const defaultProps$U = {
6493
+ const defaultProps$V = {
6300
6494
  color: "primary",
6301
6495
  elementType: "a",
6302
6496
  /**
@@ -6310,14 +6504,19 @@
6310
6504
  size: "medium"
6311
6505
  };
6312
6506
  const _ButtonLink = (props, ref) => {
6313
- const propsWithDefaults = { ...defaultProps$U, ...props };
6314
- const { elementType = defaultProps$U.elementType, children, ...restProps } = propsWithDefaults;
6507
+ const propsWithDefaults = { ...defaultProps$V, ...props };
6508
+ const { elementType = defaultProps$V.elementType, children, routerOptions, ...restProps } = propsWithDefaults;
6315
6509
  const Component = elementType;
6316
6510
  const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);
6317
6511
  const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);
6318
6512
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
6319
6513
  const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
6320
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Component, { ...otherProps, ...buttonLinkProps, ...mergedStyleProps, ref, children: [
6514
+ const handleClick = useLinkClick({
6515
+ ...restProps,
6516
+ routerOptions,
6517
+ onClick: buttonLinkProps.onClick
6518
+ });
6519
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(Component, { ...otherProps, ...buttonLinkProps, ...mergedStyleProps, onClick: handleClick, ref, children: [
6321
6520
  children,
6322
6521
  restProps.isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, {})
6323
6522
  ] });
@@ -6393,13 +6592,13 @@
6393
6592
  }
6394
6593
  };
6395
6594
  }
6396
- const defaultProps$T = {
6595
+ const defaultProps$U = {
6397
6596
  direction: DirectionExtended.VERTICAL,
6398
6597
  elementType: "article",
6399
6598
  isBoxed: false
6400
6599
  };
6401
6600
  const Card = (props) => {
6402
- const propsWithDefaults = { ...defaultProps$T, ...props };
6601
+ const propsWithDefaults = { ...defaultProps$U, ...props };
6403
6602
  const {
6404
6603
  elementType: ElementTag = "article",
6405
6604
  alignmentY,
@@ -6414,22 +6613,22 @@
6414
6613
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...mergedStyleProps, children });
6415
6614
  };
6416
6615
  Card.spiritComponent = "Card";
6417
- const defaultProps$S = {
6616
+ const defaultProps$T = {
6418
6617
  alignmentX: AlignmentX.LEFT
6419
6618
  };
6420
6619
  const CardArtwork = (props) => {
6421
- const propsWithDefaults = { ...defaultProps$S, ...props };
6620
+ const propsWithDefaults = { ...defaultProps$T, ...props };
6422
6621
  const { children, alignmentX, ...restProps } = propsWithDefaults;
6423
6622
  const { classProps } = useCardStyleProps({ artworkAlignmentX: alignmentX });
6424
6623
  const { styleProps, props: otherProps } = useStyleProps(restProps);
6425
6624
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...otherProps, className: classNames(classProps.artwork, styleProps.className), style: styleProps.style, children });
6426
6625
  };
6427
6626
  CardArtwork.spiritComponent = "CardArtwork";
6428
- const defaultProps$R = {
6627
+ const defaultProps$S = {
6429
6628
  isSelectable: false
6430
6629
  };
6431
6630
  const CardBody = (props) => {
6432
- const propsWithDefaults = { ...defaultProps$R, ...props };
6631
+ const propsWithDefaults = { ...defaultProps$S, ...props };
6433
6632
  const { children, isSelectable, ...restProps } = propsWithDefaults;
6434
6633
  const { classProps } = useCardStyleProps({ isSelectable });
6435
6634
  const { styleProps, props: otherProps } = useStyleProps(restProps);
@@ -6443,32 +6642,28 @@
6443
6642
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...otherProps, className: classNames(classProps.eyebrow, styleProps.className), style: styleProps.style, children });
6444
6643
  };
6445
6644
  CardEyebrow.spiritComponent = "CardEyebrow";
6446
- const defaultProps$Q = {
6645
+ const defaultProps$R = {
6447
6646
  alignmentX: AlignmentX.LEFT
6448
6647
  };
6449
6648
  const CardFooter = (props) => {
6450
- const propsWithDefaults = { ...defaultProps$Q, ...props };
6649
+ const propsWithDefaults = { ...defaultProps$R, ...props };
6451
6650
  const { children, alignmentX, ...restProps } = propsWithDefaults;
6452
6651
  const { classProps } = useCardStyleProps({ footerAlignmentX: alignmentX });
6453
6652
  const { styleProps, props: otherProps } = useStyleProps(restProps);
6454
6653
  return /* @__PURE__ */ jsxRuntimeExports.jsx("footer", { ...otherProps, className: classNames(classProps.footer, styleProps.className), style: styleProps.style, children });
6455
6654
  };
6456
6655
  CardFooter.spiritComponent = "CardFooter";
6457
- const defaultProps$P = {
6656
+ const defaultProps$Q = {
6458
6657
  elementType: "a"
6459
6658
  };
6460
6659
  const _CardLink = (props, ref) => {
6461
- const propsWithDefaults = { ...defaultProps$P, ...props };
6462
- const {
6463
- elementType: ElementTag = defaultProps$P.elementType,
6464
- children,
6465
- href,
6466
- ...restProps
6467
- } = propsWithDefaults;
6660
+ const propsWithDefaults = { ...defaultProps$Q, ...props };
6661
+ const { elementType, children, href, ...restProps } = propsWithDefaults;
6662
+ const Component = elementType;
6468
6663
  const { classProps } = useCardStyleProps();
6469
6664
  const { styleProps, props: otherProps } = useStyleProps(restProps);
6470
- const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.link, styleProps, otherProps });
6471
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...styleProps, ...mergedStyleProps, href, ref, children });
6665
+ const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link, styleProps, otherProps });
6666
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...styleProps, ...mergedStyleProps, href, ref, children });
6472
6667
  };
6473
6668
  const CardLink = React.forwardRef(_CardLink);
6474
6669
  CardLink.spiritComponent = "CardLink";
@@ -6484,20 +6679,20 @@
6484
6679
  const { backgroundColor, fit } = props || {};
6485
6680
  const cardMediaBackgroundClassName = useClassNamePrefix(`bg-${backgroundColor}`);
6486
6681
  const cardMediaBackgroundColor = backgroundColor ? cardMediaBackgroundClassName : "";
6487
- const cardMediaStyle = fit ? { [`--${Xf}card-media-object-fit`]: fit } : {};
6682
+ const cardMediaStyle = fit ? { [`--${$p}card-media-object-fit`]: fit } : {};
6488
6683
  return {
6489
6684
  classProps: cardMediaBackgroundColor,
6490
6685
  styleProps: cardMediaStyle
6491
6686
  };
6492
6687
  };
6493
- const defaultProps$O = {
6688
+ const defaultProps$P = {
6494
6689
  fit: ObjectFit.COVER,
6495
6690
  hasFilledHeight: false,
6496
6691
  isExpanded: false,
6497
6692
  size: CardSizes.AUTO
6498
6693
  };
6499
6694
  const CardMedia = (props) => {
6500
- const propsWithDefaults = { ...defaultProps$O, ...props };
6695
+ const propsWithDefaults = { ...defaultProps$P, ...props };
6501
6696
  const { backgroundColor, children, fit, hasFilledHeight, isExpanded, size: size2, ...restProps } = propsWithDefaults;
6502
6697
  const { classProps } = useCardStyleProps({ size: size2, isExpanded, hasFilledHeight });
6503
6698
  const { classProps: cardMediaClassProps, styleProps: cardMediaStyleProps } = useCardMediaStyleProps({
@@ -6514,12 +6709,12 @@
6514
6709
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...otherProps, ...mergedStyleProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classProps.mediaCanvas, children }) });
6515
6710
  };
6516
6711
  CardMedia.spiritComponent = "CardMedia";
6517
- const defaultProps$N = {
6712
+ const defaultProps$O = {
6518
6713
  elementType: "h4",
6519
6714
  isHeading: true
6520
6715
  };
6521
6716
  const CardTitle = (props) => {
6522
- const propsWithDefaults = { ...defaultProps$N, ...props };
6717
+ const propsWithDefaults = { ...defaultProps$O, ...props };
6523
6718
  const { elementType: ElementTag = "h4", children, isHeading, ...restProps } = propsWithDefaults;
6524
6719
  const { classProps } = useCardStyleProps({ isHeading });
6525
6720
  const { styleProps, props: otherProps } = useStyleProps(restProps);
@@ -6527,16 +6722,127 @@
6527
6722
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...mergedStyleProps, children });
6528
6723
  };
6529
6724
  CardTitle.spiritComponent = "CardTitle";
6530
- const defaultProps$M = {
6725
+ function useVisuallyHiddenProps(props) {
6726
+ const { ...restProps } = props;
6727
+ const visuallyHiddenClass = useClassNamePrefix("accessibility-hidden");
6728
+ return {
6729
+ classProps: visuallyHiddenClass,
6730
+ props: restProps
6731
+ };
6732
+ }
6733
+ const VisuallyHidden = (props) => {
6734
+ const { children, elementType: ElementTag = "span", ...rest } = props;
6735
+ const { classProps, props: modifiedProps } = useVisuallyHiddenProps(rest);
6736
+ const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
6737
+ const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps });
6738
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...mergedStyleProps, children });
6739
+ };
6740
+ VisuallyHidden.spiritComponent = "VisuallyHidden";
6741
+ const CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS = 500;
6742
+ const COUNTER_LABELS = defaultLabels.textArea.counter;
6743
+ const getCharacterCounterVisibleText = (currentLength, counterThreshold) => counterThreshold !== void 0 ? `${currentLength}/${counterThreshold}` : String(currentLength);
6744
+ const getCharacterCounterScreenReaderMessage = (currentLength, counterThreshold) => {
6745
+ if (counterThreshold === void 0) {
6746
+ return replaceTranslationParams(COUNTER_LABELS.charactersEntered, { count: currentLength });
6747
+ }
6748
+ if (currentLength === 0) {
6749
+ return replaceTranslationParams(COUNTER_LABELS.canEnterUpTo, { maxLength: counterThreshold });
6750
+ }
6751
+ if (currentLength > counterThreshold) {
6752
+ const overCount = currentLength - counterThreshold;
6753
+ const template2 = overCount === 1 ? COUNTER_LABELS.characterOverLimit : COUNTER_LABELS.charactersOverLimit;
6754
+ return replaceTranslationParams(template2, { count: overCount });
6755
+ }
6756
+ const remaining = counterThreshold - currentLength;
6757
+ const template = remaining === 1 ? COUNTER_LABELS.characterRemaining : COUNTER_LABELS.charactersRemaining;
6758
+ return replaceTranslationParams(template, { count: remaining });
6759
+ };
6760
+ const useCharacterCounterState = (props) => {
6761
+ const { value, defaultValue, counterThreshold, hasCounter, onChange } = props;
6762
+ const isControlled = value !== void 0;
6763
+ useControlledModeGuard({
6764
+ componentName: "useCharacterCounterState",
6765
+ value,
6766
+ defaultValue
6767
+ });
6768
+ const [internalLength, setInternalLength] = React.useState(
6769
+ () => isControlled ? value.length : defaultValue?.length ?? 0
6770
+ );
6771
+ const currentLength = isControlled ? value.length : internalLength;
6772
+ const isCounterVisible = hasCounter === true || counterThreshold !== void 0;
6773
+ const handleChange = React.useCallback(
6774
+ (event) => {
6775
+ if (!isControlled && isCounterVisible) {
6776
+ setInternalLength(event.target.value.length);
6777
+ }
6778
+ onChange?.(event);
6779
+ },
6780
+ [isControlled, isCounterVisible, onChange]
6781
+ );
6782
+ const counterProps = isCounterVisible ? {
6783
+ counterThreshold,
6784
+ currentLength,
6785
+ hasCounter
6786
+ } : void 0;
6787
+ return {
6788
+ counterProps,
6789
+ handleChange
6790
+ };
6791
+ };
6792
+ const useCharacterCounter = (props) => {
6793
+ const { counterThreshold, currentLength, hasCounter, id, registerAria, ...restProps } = props;
6794
+ const { styleProps, props: transferProps } = useStyleProps(restProps);
6795
+ const isVisible = hasCounter === true || counterThreshold !== void 0;
6796
+ const screenReaderMessageId = `${id}__counterScreenReaderMessage`;
6797
+ const visibleCounterText = getCharacterCounterVisibleText(currentLength, counterThreshold);
6798
+ const screenReaderMessage = getCharacterCounterScreenReaderMessage(currentLength, counterThreshold);
6799
+ const debouncedScreenReaderMessage = useDebouncedValue(
6800
+ screenReaderMessage,
6801
+ CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS
6802
+ );
6803
+ React.useEffect(() => {
6804
+ if (isVisible) {
6805
+ registerAria({ add: screenReaderMessageId });
6806
+ return () => {
6807
+ registerAria({ remove: screenReaderMessageId });
6808
+ };
6809
+ }
6810
+ return void 0;
6811
+ }, [isVisible, screenReaderMessageId, registerAria]);
6812
+ return {
6813
+ debouncedScreenReaderMessage,
6814
+ isVisible,
6815
+ screenReaderMessageId,
6816
+ styleProps,
6817
+ transferProps,
6818
+ visibleCounterText
6819
+ };
6820
+ };
6821
+ const CharacterCounter = (props) => {
6822
+ const {
6823
+ debouncedScreenReaderMessage,
6824
+ isVisible,
6825
+ screenReaderMessageId,
6826
+ styleProps,
6827
+ transferProps,
6828
+ visibleCounterText
6829
+ } = useCharacterCounter(props);
6830
+ return isVisible ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
6831
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...transferProps, ...styleProps, "aria-hidden": "true", children: visibleCounterText }),
6832
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { id: screenReaderMessageId, "aria-live": "polite", "aria-atomic": "true", children: debouncedScreenReaderMessage })
6833
+ ] }) : null;
6834
+ };
6835
+ CharacterCounter.spiritComponent = "CharacterCounter";
6836
+ const defaultProps$N = {
6531
6837
  elementType: "div",
6532
6838
  id: void 0,
6533
6839
  registerAria: void 0
6534
6840
  };
6535
6841
  const HelperText = (props) => {
6536
- const propsWithDefaults = { ...defaultProps$M, ...props };
6842
+ const propsWithDefaults = { ...defaultProps$N, ...props };
6537
6843
  const {
6538
6844
  helperText,
6539
- elementType: ElementTag = defaultProps$M.elementType,
6845
+ elementType: ElementTag = defaultProps$N.elementType,
6540
6846
  id,
6541
6847
  registerAria,
6542
6848
  ...restProps
@@ -6570,22 +6876,6 @@
6570
6876
  );
6571
6877
  };
6572
6878
  Label.spiritComponent = "Label";
6573
- const useAriaIds = (otherAriaIds) => {
6574
- const [ids, setIds] = React.useState(otherAriaIds ? otherAriaIds.split(" ") : []);
6575
- const register = React.useCallback(({ add, remove }) => {
6576
- setIds((prevIds) => {
6577
- let newIds = [...prevIds];
6578
- if (remove) {
6579
- newIds = newIds.filter((item) => item !== remove);
6580
- }
6581
- if (add) {
6582
- newIds = [...newIds, add];
6583
- }
6584
- return newIds;
6585
- });
6586
- }, []);
6587
- return [ids, register];
6588
- };
6589
6879
  function useValidationIcon({ hasValidationStateIcon }) {
6590
6880
  const iconNameValue = useIconName(hasValidationStateIcon, {
6591
6881
  success: "check-plain",
@@ -6594,16 +6884,16 @@
6594
6884
  });
6595
6885
  return iconNameValue;
6596
6886
  }
6597
- const defaultProps$L = {
6887
+ const defaultProps$M = {
6598
6888
  elementType: "div",
6599
6889
  id: void 0,
6600
6890
  registerAria: void 0,
6601
6891
  role: void 0
6602
6892
  };
6603
6893
  const ValidationText = (props) => {
6604
- const propsWithDefaults = { ...defaultProps$L, ...props };
6894
+ const propsWithDefaults = { ...defaultProps$M, ...props };
6605
6895
  const {
6606
- elementType: ElementTag = defaultProps$L.elementType,
6896
+ elementType: ElementTag = defaultProps$M.elementType,
6607
6897
  id,
6608
6898
  hasValidationStateIcon,
6609
6899
  registerAria,
@@ -6647,6 +6937,38 @@
6647
6937
  }, [validationText, validationState]);
6648
6938
  return role;
6649
6939
  };
6940
+ function useInputDetailsStyleProps(props) {
6941
+ const inputDetailsClass = useClassNamePrefix("InputDetails");
6942
+ return {
6943
+ classProps: inputDetailsClass,
6944
+ props
6945
+ };
6946
+ }
6947
+ const defaultProps$L = {
6948
+ elementType: "div",
6949
+ id: void 0,
6950
+ registerAriaDetails: void 0
6951
+ };
6952
+ const InputDetails = (props) => {
6953
+ const propsWithDefaults = { ...defaultProps$L, ...props };
6954
+ const { classProps, props: modifiedProps } = useInputDetailsStyleProps(propsWithDefaults);
6955
+ const { children, elementType, id, registerAriaDetails, ...restProps } = modifiedProps;
6956
+ const { styleProps, props: otherProps } = useStyleProps(restProps);
6957
+ const Component = elementType || defaultProps$L.elementType;
6958
+ const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });
6959
+ React.useEffect(() => {
6960
+ if (id) {
6961
+ registerAriaDetails?.({ add: id });
6962
+ }
6963
+ return () => {
6964
+ if (id) {
6965
+ registerAriaDetails?.({ remove: id });
6966
+ }
6967
+ };
6968
+ }, [id, registerAriaDetails]);
6969
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, id, children });
6970
+ };
6971
+ InputDetails.spiritComponent = "InputDetails";
6650
6972
  function useCheckboxStyleProps(props) {
6651
6973
  const { inputPosition = InputPositions.START, isItem, isLabelHidden, validationState, ...restProps } = props;
6652
6974
  const { isDisabled, isRequired } = restProps;
@@ -6691,6 +7013,8 @@
6691
7013
  const { classProps, props: modifiedProps } = useCheckboxStyleProps(props);
6692
7014
  const {
6693
7015
  "aria-describedby": ariaDescribedBy = "",
7016
+ "aria-details": ariaDetailsAttr,
7017
+ details,
6694
7018
  hasValidationIcon,
6695
7019
  helperText,
6696
7020
  id,
@@ -6704,8 +7028,8 @@
6704
7028
  ...restProps
6705
7029
  } = modifiedProps;
6706
7030
  const { styleProps, props: otherProps } = useStyleProps(restProps);
6707
- const [ids, register] = useAriaIds(ariaDescribedBy);
6708
- const ariaDescribedByProp = useAriaDescribedBy(ids);
7031
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
7032
+ const [ariaDetailsProp, registerDetails] = useAriaDetails(ariaDetailsAttr);
6709
7033
  const validationTextRole = useValidationTextRole({
6710
7034
  validationState,
6711
7035
  validationText
@@ -6716,6 +7040,7 @@
6716
7040
  {
6717
7041
  ...otherProps,
6718
7042
  ...ariaDescribedByProp,
7043
+ ...ariaDetailsProp,
6719
7044
  type: "checkbox",
6720
7045
  id,
6721
7046
  className: classProps.input,
@@ -6728,6 +7053,7 @@
6728
7053
  ),
6729
7054
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classProps.text, children: [
6730
7055
  /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { UNSAFE_className: classProps.label, htmlFor: id, children: label }),
7056
+ details && /* @__PURE__ */ jsxRuntimeExports.jsx(InputDetails, { id: `${id}-details`, registerAriaDetails: registerDetails, children: details }),
6731
7057
  /* @__PURE__ */ jsxRuntimeExports.jsx(
6732
7058
  HelperText,
6733
7059
  {
@@ -6987,12 +7313,12 @@
6987
7313
  };
6988
7314
  Divider.spiritComponent = "Divider";
6989
7315
  const DRAWER_ALIGNMENT_DEFAULT = AlignmentX.RIGHT;
6990
- const defaultContext$7 = {
7316
+ const defaultContext$8 = {
6991
7317
  id: "",
6992
7318
  isOpen: false,
6993
7319
  onClose: () => null
6994
7320
  };
6995
- const DrawerContext = React.createContext(defaultContext$7);
7321
+ const DrawerContext = React.createContext(defaultContext$8);
6996
7322
  const DrawerProvider = DrawerContext.Provider;
6997
7323
  const DrawerConsumer = DrawerContext.Consumer;
6998
7324
  const useDrawerContext = () => React.useContext(DrawerContext);
@@ -7042,22 +7368,6 @@
7042
7368
  ) });
7043
7369
  };
7044
7370
  Drawer.spiritComponent = "Drawer";
7045
- function useVisuallyHiddenProps(props) {
7046
- const { ...restProps } = props;
7047
- const visuallyHiddenClass = useClassNamePrefix("accessibility-hidden");
7048
- return {
7049
- classProps: visuallyHiddenClass,
7050
- props: restProps
7051
- };
7052
- }
7053
- const VisuallyHidden = (props) => {
7054
- const { children, elementType: ElementTag = "span", ...rest } = props;
7055
- const { classProps, props: modifiedProps } = useVisuallyHiddenProps(rest);
7056
- const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
7057
- const mergedStyleProps = mergeStyleProps(ElementTag, { classProps, styleProps, otherProps });
7058
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...mergedStyleProps, children });
7059
- };
7060
- VisuallyHidden.spiritComponent = "VisuallyHidden";
7061
7371
  const defaultProps$I = {
7062
7372
  color: ComponentButtonColors.TERTIARY,
7063
7373
  iconBoxSize: DEFAULT_BOX_SIZE,
@@ -7066,8 +7376,8 @@
7066
7376
  const DrawerCloseButton = (props) => {
7067
7377
  const propsWithDefaults = { ...defaultProps$I, ...props };
7068
7378
  const { color, iconBoxSize, label, size: size2, ...restProps } = propsWithDefaults;
7069
- const { t: t2 } = useI18n();
7070
- const closeLabel = label ?? t2("common.close");
7379
+ const { t } = useI18n();
7380
+ const closeLabel = label ?? t("common.close");
7071
7381
  const { id, isOpen, onClose } = useDrawerContext();
7072
7382
  const { classProps } = useDrawerStyleProps();
7073
7383
  const { styleProps, props: otherProps } = useStyleProps(restProps);
@@ -7131,7 +7441,7 @@
7131
7441
  triggerProps
7132
7442
  };
7133
7443
  };
7134
- const defaultContext$6 = {
7444
+ const defaultContext$7 = {
7135
7445
  dropdownRef: { current: null },
7136
7446
  fullWidthMode: fullWidthModeKeys.off,
7137
7447
  id: "",
@@ -7141,7 +7451,7 @@
7141
7451
  placement: Placements.BOTTOM_START,
7142
7452
  triggerRef: { current: void 0 }
7143
7453
  };
7144
- const DropdownContext = React.createContext(defaultContext$6);
7454
+ const DropdownContext = React.createContext(defaultContext$7);
7145
7455
  const DropdownProvider = DropdownContext.Provider;
7146
7456
  DropdownContext.Consumer;
7147
7457
  const useDropdownContext = () => React.useContext(DropdownContext);
@@ -7446,8 +7756,7 @@
7446
7756
  } = props;
7447
7757
  const { classProps } = useFieldGroupStyleProps({ isFluid, isRequired, validationState });
7448
7758
  const { styleProps, props: transferProps } = useStyleProps(rest);
7449
- const [ids, register] = useAriaIds(ariaDescribedBy);
7450
- const ariaDescribedByProp = useAriaDescribedBy(ids);
7759
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
7451
7760
  const validationTextRole = useValidationTextRole({
7452
7761
  validationState,
7453
7762
  validationText
@@ -7504,7 +7813,7 @@
7504
7813
  WIDTH: "--file-uploader-attachment-image-width",
7505
7814
  HEIGHT: "--file-uploader-attachment-image-height"
7506
7815
  };
7507
- const defaultContext$5 = {
7816
+ const defaultContext$6 = {
7508
7817
  addToQueue: () => /* @__PURE__ */ new Map(),
7509
7818
  clearQueue: () => null,
7510
7819
  fileQueue: /* @__PURE__ */ new Map(),
@@ -7518,7 +7827,7 @@
7518
7827
  errorMaxUploadedFiles: ""
7519
7828
  }
7520
7829
  };
7521
- const FileUploaderContext = React.createContext(defaultContext$5);
7830
+ const FileUploaderContext = React.createContext(defaultContext$6);
7522
7831
  const FileUploaderProvider = FileUploaderContext.Provider;
7523
7832
  FileUploaderContext.Consumer;
7524
7833
  const useFileUploaderContext = () => React.useContext(FileUploaderContext);
@@ -7820,6 +8129,7 @@
7820
8129
  linkText,
7821
8130
  maxFileSize = DEFAULT_FILE_SIZE_LIMIT,
7822
8131
  maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,
8132
+ name,
7823
8133
  onError,
7824
8134
  queueLimitBehavior = "none",
7825
8135
  validationState,
@@ -7855,8 +8165,7 @@
7855
8165
  validationState
7856
8166
  });
7857
8167
  const { styleProps, props: transferProps } = useStyleProps(restProps);
7858
- const [ids, register] = useAriaIds(ariaDescribedBy);
7859
- const ariaDescribedByProp = useAriaDescribedBy(ids);
8168
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
7860
8169
  const validationTextRole = useValidationTextRole({
7861
8170
  validationState,
7862
8171
  validationText
@@ -7884,6 +8193,7 @@
7884
8193
  accept,
7885
8194
  id,
7886
8195
  ref: inputRef,
8196
+ name,
7887
8197
  className: classProps.input.input,
7888
8198
  onChange,
7889
8199
  multiple: isMultiple,
@@ -7926,9 +8236,9 @@
7926
8236
  };
7927
8237
  FileUploaderInput.spiritComponent = "FileUploaderInput";
7928
8238
  const FileUploaderList = (props) => {
7929
- const { t: t2 } = useI18n();
8239
+ const { t } = useI18n();
7930
8240
  const { label, id, attachmentComponent, inputName, hasImagePreview, ...restProps } = props;
7931
- const attachmentsLabel = label ?? t2("fileUploader.attachments");
8241
+ const attachmentsLabel = label ?? t("fileUploader.attachments");
7932
8242
  const { classProps } = useFileUploaderStyleProps();
7933
8243
  const { styleProps, props: transferProps } = useStyleProps(restProps);
7934
8244
  const { fileQueue, onDismiss } = useFileUploaderContext();
@@ -8096,7 +8406,7 @@
8096
8406
  }, [attachmentRef, file, name, meta, onError]);
8097
8407
  };
8098
8408
  const FileUploaderAttachment = (props) => {
8099
- const { t: t2 } = useI18n();
8409
+ const { t } = useI18n();
8100
8410
  const {
8101
8411
  editText,
8102
8412
  file,
@@ -8113,8 +8423,8 @@
8113
8423
  removeText,
8114
8424
  ...restProps
8115
8425
  } = props;
8116
- const resolvedEditText = editText ?? t2("fileUploader.edit");
8117
- const resolvedRemoveText = removeText ?? t2("fileUploader.remove");
8426
+ const resolvedEditText = editText ?? t("fileUploader.edit");
8427
+ const resolvedRemoveText = removeText ?? t("fileUploader.remove");
8118
8428
  const [imagePreview, setImagePreview] = React.useState("");
8119
8429
  const { classProps } = useFileUploaderStyleProps();
8120
8430
  const { styleProps, props: transferProps } = useStyleProps(restProps);
@@ -8521,12 +8831,12 @@
8521
8831
  );
8522
8832
  };
8523
8833
  HeaderDesktopActions.spiritComponent = "HeaderDesktopActions";
8524
- const defaultContext$4 = {
8834
+ const defaultContext$5 = {
8525
8835
  id: "",
8526
8836
  isOpen: false,
8527
8837
  onClose: () => null
8528
8838
  };
8529
- const HeaderDialogContext = React.createContext(defaultContext$4);
8839
+ const HeaderDialogContext = React.createContext(defaultContext$5);
8530
8840
  const HeaderDialogProvider = HeaderDialogContext.Provider;
8531
8841
  const HeaderDialogConsumer = HeaderDialogContext.Consumer;
8532
8842
  const useHeaderDialogContext = () => React.useContext(HeaderDialogContext);
@@ -8606,7 +8916,7 @@
8606
8916
  };
8607
8917
  HeaderDialogCloseButton.spiritComponent = "HeaderDialogCloseButton";
8608
8918
  const _HeaderDialogLink = (props, ref) => {
8609
- const { elementType = "a", children, isCurrent, ...restProps } = props;
8919
+ const { elementType = "a", children, isCurrent, routerOptions, ...restProps } = props;
8610
8920
  const Component = elementType;
8611
8921
  const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });
8612
8922
  const { styleProps, props: otherProps } = useStyleProps(restProps);
@@ -8615,7 +8925,8 @@
8615
8925
  styleProps,
8616
8926
  otherProps
8617
8927
  });
8618
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, ref, children });
8928
+ const handleClick = useLinkClick({ ...restProps, routerOptions });
8929
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, onClick: handleClick, ref, children });
8619
8930
  };
8620
8931
  const HeaderDialogLink = React.forwardRef(
8621
8932
  _HeaderDialogLink
@@ -8662,7 +8973,8 @@
8662
8973
  };
8663
8974
  HeaderDialogText.spiritComponent = "HeaderDialogText";
8664
8975
  const _HeaderLink = (props, ref) => {
8665
- const { elementType = "a", children, isCurrent, ...restProps } = props;
8976
+ const { elementType = "a", children, isCurrent, routerOptions, ...restProps } = props;
8977
+ const { href } = restProps;
8666
8978
  const Component = elementType;
8667
8979
  const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });
8668
8980
  const { styleProps, props: otherProps } = useStyleProps(restProps);
@@ -8671,7 +8983,8 @@
8671
8983
  styleProps,
8672
8984
  otherProps
8673
8985
  });
8674
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, ref, children });
8986
+ const handleClick = useLinkClick({ ...restProps, routerOptions });
8987
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...otherProps, ...mergedStyleProps, href, onClick: handleClick, ref, children });
8675
8988
  };
8676
8989
  const HeaderLink = React.forwardRef(
8677
8990
  _HeaderLink
@@ -8795,7 +9108,7 @@
8795
9108
  [IconBoxShapes.SQUARE]: BorderRadii["0"]
8796
9109
  };
8797
9110
  const setFullColorName = (prefix, base, intensity) => `${prefix}-${base}-${intensity}`;
8798
- const derivePrefix = (base) => Object.keys(gf).includes(base) ? ColorPrefixes.EMOTION : ColorPrefixes.ACCENT;
9111
+ const derivePrefix = (base) => Object.keys(hg).includes(base) ? ColorPrefixes.EMOTION : ColorPrefixes.ACCENT;
8799
9112
  const useIconBoxColors = (color, isSubtle = true) => {
8800
9113
  const intensity = isSubtle ? Intensity.SUBTLE : Intensity.BASIC;
8801
9114
  const complementaryIntensity = intensity === Intensity.BASIC ? Intensity.SUBTLE : Intensity.BASIC;
@@ -8816,7 +9129,7 @@
8816
9129
  const { shape = IconBoxShapes.ROUNDED, size: size2 = SizesExtended.MEDIUM, ...restProps } = props || {};
8817
9130
  const shapesProps = IconBoxShapesRadii[shape];
8818
9131
  const iconBoxStyles = {
8819
- padding: `calc(var(--${Xf}local-padding) - var(--${Xf}local-border-width, 0px)) !important`
9132
+ padding: `calc(var(--${$p}local-padding) - var(--${$p}local-border-width, 0px)) !important`
8820
9133
  };
8821
9134
  let sizeProps;
8822
9135
  if (isResponsive(size2)) {
@@ -8966,7 +9279,7 @@
8966
9279
  function useMatrixStyleProps(props) {
8967
9280
  const { cols, itemsCount, itemRows, rows, spacing, spacingX, spacingY, ...restProps } = props;
8968
9281
  const matrixClass = useClassNamePrefix("Matrix");
8969
- const matrixPrefix = `${Xf}matrix`;
9282
+ const matrixPrefix = `${$p}matrix`;
8970
9283
  const matrixCustomStyle = {
8971
9284
  ...useDimensionStyle(cols, `${matrixPrefix}-columns`),
8972
9285
  ...useDimensionStyle(rows, `${matrixPrefix}-rows`),
@@ -9008,12 +9321,12 @@
9008
9321
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...mergedStyleProps, children });
9009
9322
  };
9010
9323
  Matrix.spiritComponent = "Matrix";
9011
- const defaultContext$3 = {
9324
+ const defaultContext$4 = {
9012
9325
  id: "",
9013
9326
  isOpen: false,
9014
9327
  onClose: () => null
9015
9328
  };
9016
- const ModalContext = React.createContext(defaultContext$3);
9329
+ const ModalContext = React.createContext(defaultContext$4);
9017
9330
  const ModalProvider = ModalContext.Provider;
9018
9331
  const ModalConsumer = ModalContext.Consumer;
9019
9332
  const useModalContext = () => React.useContext(ModalContext);
@@ -9101,8 +9414,8 @@
9101
9414
  };
9102
9415
  ModalBody.spiritComponent = "ModalBody";
9103
9416
  const ModalCloseButton = ({ label, onClose, id, isOpen, ...restProps }) => {
9104
- const { t: t2 } = useI18n();
9105
- const closeLabel = label ?? t2("common.close");
9417
+ const { t } = useI18n();
9418
+ const closeLabel = label ?? t("common.close");
9106
9419
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { ...restProps, isSymmetrical: true, color: "tertiary", onClick: onClose, "aria-expanded": isOpen, "aria-controls": id, children: [
9107
9420
  /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: "close" }),
9108
9421
  /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children: closeLabel })
@@ -9170,8 +9483,8 @@
9170
9483
  const ModalHeader = (props) => {
9171
9484
  const propsWithDefaults = { ...defaultProps$v, ...props };
9172
9485
  const { children, closeLabel, hasCloseButton, ...restProps } = propsWithDefaults;
9173
- const { t: t2 } = useI18n();
9174
- const resolvedCloseLabel = closeLabel ?? t2("common.close");
9486
+ const { t } = useI18n();
9487
+ const resolvedCloseLabel = closeLabel ?? t("common.close");
9175
9488
  const { classProps } = useModalStyleProps();
9176
9489
  const { styleProps, props: otherProps } = useStyleProps(restProps);
9177
9490
  const { id, isOpen, onClose } = useModalContext();
@@ -9328,9 +9641,9 @@
9328
9641
  };
9329
9642
  Pagination.spiritComponent = "Pagination";
9330
9643
  const _PaginationButtonLink = (props, ref) => {
9331
- const { t: t2 } = useI18n();
9644
+ const { t } = useI18n();
9332
9645
  const { direction, accessibilityLabel, ...restProps } = props;
9333
- const directionLabel = accessibilityLabel ?? (direction === "previous" ? t2("pagination.previous") : t2("pagination.next"));
9646
+ const directionLabel = accessibilityLabel ?? (direction === "previous" ? t("pagination.previous") : t("pagination.next"));
9334
9647
  const iconType = {
9335
9648
  previous: "chevron-left",
9336
9649
  next: "chevron-right"
@@ -9353,17 +9666,28 @@
9353
9666
  };
9354
9667
  PaginationItem.spiritComponent = "PaginationItem";
9355
9668
  const _PaginationLink = (props, ref) => {
9356
- const { t: t2 } = useI18n();
9357
- const { elementType = "a", accessibilityLabel, isCurrent, pageNumber, ...restProps } = props;
9358
- const visuallyHiddenLabel = accessibilityLabel || `${t2("pagination.goToPage")} ${pageNumber}`;
9669
+ const { t } = useI18n();
9670
+ const { elementType = "a", accessibilityLabel, isCurrent, pageNumber, routerOptions, ...restProps } = props;
9671
+ const visuallyHiddenLabel = accessibilityLabel || `${t("pagination.goToPage")} ${pageNumber}`;
9359
9672
  const Component = elementType;
9360
9673
  const { classProps } = usePaginationStyleProps({ isCurrent });
9361
9674
  const { styleProps, props: otherProps } = useStyleProps(restProps);
9362
9675
  const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link, styleProps, otherProps });
9363
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Component, { ...isCurrent && { "aria-current": "page" }, ...otherProps, ...mergedStyleProps, ref, children: [
9364
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children: visuallyHiddenLabel }),
9365
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": "true", children: pageNumber })
9366
- ] });
9676
+ const handleClick = useLinkClick({ ...restProps, routerOptions });
9677
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
9678
+ Component,
9679
+ {
9680
+ ...isCurrent && { "aria-current": "page" },
9681
+ ...otherProps,
9682
+ ...mergedStyleProps,
9683
+ onClick: handleClick,
9684
+ ref,
9685
+ children: [
9686
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children: visuallyHiddenLabel }),
9687
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": "true", children: pageNumber })
9688
+ ]
9689
+ }
9690
+ );
9367
9691
  };
9368
9692
  const PaginationLink = React.forwardRef(
9369
9693
  _PaginationLink
@@ -9371,8 +9695,8 @@
9371
9695
  PaginationLink.spiritComponent = "PaginationLink";
9372
9696
  PaginationLink.displayName = "PaginationLink";
9373
9697
  const _PaginationLinkNext = ({ accessibilityLabel, ...restProps }, ref) => {
9374
- const { t: t2 } = useI18n();
9375
- const nextLabel = accessibilityLabel ?? t2("pagination.next");
9698
+ const { t } = useI18n();
9699
+ const nextLabel = accessibilityLabel ?? t("pagination.next");
9376
9700
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationButtonLink, { direction: "next", accessibilityLabel: nextLabel, ...restProps, ref });
9377
9701
  };
9378
9702
  const PaginationLinkNext = React.forwardRef(
@@ -9381,8 +9705,8 @@
9381
9705
  PaginationLinkNext.spiritComponent = "PaginationLinkNext";
9382
9706
  PaginationLinkNext.displayName = "PaginationLinkNext";
9383
9707
  const _PaginationLinkPrevious = ({ accessibilityLabel, ...restProps }, ref) => {
9384
- const { t: t2 } = useI18n();
9385
- const previousLabel = accessibilityLabel ?? t2("pagination.previous");
9708
+ const { t } = useI18n();
9709
+ const previousLabel = accessibilityLabel ?? t("pagination.previous");
9386
9710
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationButtonLink, { direction: "previous", accessibilityLabel: previousLabel, ...restProps, ref });
9387
9711
  };
9388
9712
  const PaginationLinkPrevious = React.forwardRef(
@@ -9426,7 +9750,7 @@
9426
9750
  };
9427
9751
  };
9428
9752
  const UncontrolledPagination = (props) => {
9429
- const { t: t2 } = useI18n();
9753
+ const { t } = useI18n();
9430
9754
  const {
9431
9755
  accessibilityLabel,
9432
9756
  accessibilityLabelPrevious,
@@ -9437,9 +9761,9 @@
9437
9761
  visiblePages = 5,
9438
9762
  ...rest
9439
9763
  } = props;
9440
- const resolvedAccessibilityLabel = accessibilityLabel ?? t2("pagination.goToPage");
9441
- const resolvedAccessibilityLabelPrevious = accessibilityLabelPrevious ?? t2("pagination.previous");
9442
- const resolvedAccessibilityLabelNext = accessibilityLabelNext ?? t2("pagination.next");
9764
+ const resolvedAccessibilityLabel = accessibilityLabel ?? t("pagination.goToPage");
9765
+ const resolvedAccessibilityLabelPrevious = accessibilityLabelPrevious ?? t("pagination.previous");
9766
+ const resolvedAccessibilityLabelNext = accessibilityLabelNext ?? t("pagination.next");
9443
9767
  const { currentPage, pages, handlePageChange } = usePagination({
9444
9768
  defaultPage,
9445
9769
  onChange,
@@ -9570,7 +9894,7 @@
9570
9894
  });
9571
9895
  const pricingPlanStyle = {};
9572
9896
  if (rows !== NUMBER_OF_PLAN_ROWS_DEFAULT) {
9573
- pricingPlanStyle[`--${Xf}pricing-plan-rows`] = rows?.toString();
9897
+ pricingPlanStyle[`--${$p}pricing-plan-rows`] = rows?.toString();
9574
9898
  }
9575
9899
  return {
9576
9900
  classProps: {
@@ -9648,7 +9972,7 @@
9648
9972
  ] });
9649
9973
  };
9650
9974
  PricingPlanHeader.spiritComponent = "PricingPlanHeader";
9651
- const defaultContext$2 = {
9975
+ const defaultContext$3 = {
9652
9976
  anchorRef: () => {
9653
9977
  },
9654
9978
  arrowRef: { current: null },
@@ -9679,7 +10003,7 @@
9679
10003
  y: 0,
9680
10004
  position: "absolute"
9681
10005
  };
9682
- const TooltipContext = React.createContext(defaultContext$2);
10006
+ const TooltipContext = React.createContext(defaultContext$3);
9683
10007
  const TooltipProvider = TooltipContext.Provider;
9684
10008
  TooltipContext.Consumer;
9685
10009
  const useTooltipContext = () => React.useContext(TooltipContext);
@@ -9740,7 +10064,7 @@
9740
10064
  return [":popover-open", ":modal"].some((selector) => {
9741
10065
  try {
9742
10066
  return element.matches(selector);
9743
- } catch (e2) {
10067
+ } catch (e) {
9744
10068
  return false;
9745
10069
  }
9746
10070
  });
@@ -9915,8 +10239,8 @@
9915
10239
  if ("composedPath" in event) {
9916
10240
  return event.composedPath().includes(node2);
9917
10241
  }
9918
- const e2 = event;
9919
- return e2.target != null && node2.contains(e2.target);
10242
+ const e = event;
10243
+ return e.target != null && node2.contains(e.target);
9920
10244
  }
9921
10245
  function getTarget(event) {
9922
10246
  if ("composedPath" in event) {
@@ -9932,9 +10256,9 @@
9932
10256
  const max = Math.max;
9933
10257
  const round = Math.round;
9934
10258
  const floor = Math.floor;
9935
- const createCoords = (v2) => ({
9936
- x: v2,
9937
- y: v2
10259
+ const createCoords = (v) => ({
10260
+ x: v,
10261
+ y: v
9938
10262
  });
9939
10263
  const oppositeSideMap = {
9940
10264
  left: "right",
@@ -10380,20 +10704,20 @@
10380
10704
  }
10381
10705
  };
10382
10706
  }
10383
- let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b2) => a.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
10707
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
10384
10708
  if (!resetPlacement) {
10385
10709
  switch (fallbackStrategy) {
10386
10710
  case "bestFit": {
10387
10711
  var _overflowsData$filter2;
10388
- const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
10712
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => {
10389
10713
  if (hasFallbackAxisSideDirection) {
10390
- const currentSideAxis = getSideAxis(d.placement);
10714
+ const currentSideAxis = getSideAxis(d2.placement);
10391
10715
  return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
10392
10716
  // reading directions favoring greater width.
10393
10717
  currentSideAxis === "y";
10394
10718
  }
10395
10719
  return true;
10396
- }).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b2) => a[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
10720
+ }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
10397
10721
  if (placement2) {
10398
10722
  resetPlacement = placement2;
10399
10723
  }
@@ -10429,7 +10753,7 @@
10429
10753
  };
10430
10754
  }
10431
10755
  function getRectsByLine(rects) {
10432
- const sortedRects = rects.slice().sort((a, b2) => a.y - b2.y);
10756
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
10433
10757
  const groups = [];
10434
10758
  let prevRect = null;
10435
10759
  for (let i = 0; i < sortedRects.length; i++) {
@@ -11243,8 +11567,8 @@
11243
11567
  isElement,
11244
11568
  isRTL
11245
11569
  };
11246
- function rectsAreEqual(a, b2) {
11247
- return a.x === b2.x && a.y === b2.y && a.width === b2.width && a.height === b2.height;
11570
+ function rectsAreEqual(a, b) {
11571
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
11248
11572
  }
11249
11573
  function observeMove(element, onMove) {
11250
11574
  let io = null;
@@ -11312,7 +11636,7 @@
11312
11636
  // Handle <iframe>s
11313
11637
  root: root.ownerDocument
11314
11638
  });
11315
- } catch (e2) {
11639
+ } catch (e) {
11316
11640
  io = new IntersectionObserver(handleObserve, options);
11317
11641
  }
11318
11642
  io.observe(element);
@@ -11411,25 +11735,25 @@
11411
11735
  });
11412
11736
  };
11413
11737
  var index$1 = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
11414
- function deepEqual(a, b2) {
11415
- if (a === b2) {
11738
+ function deepEqual(a, b) {
11739
+ if (a === b) {
11416
11740
  return true;
11417
11741
  }
11418
- if (typeof a !== typeof b2) {
11742
+ if (typeof a !== typeof b) {
11419
11743
  return false;
11420
11744
  }
11421
- if (typeof a === "function" && a.toString() === b2.toString()) {
11745
+ if (typeof a === "function" && a.toString() === b.toString()) {
11422
11746
  return true;
11423
11747
  }
11424
11748
  let length;
11425
11749
  let i;
11426
11750
  let keys;
11427
- if (a && b2 && typeof a === "object") {
11751
+ if (a && b && typeof a === "object") {
11428
11752
  if (Array.isArray(a)) {
11429
11753
  length = a.length;
11430
- if (length !== b2.length) return false;
11754
+ if (length !== b.length) return false;
11431
11755
  for (i = length; i-- !== 0; ) {
11432
- if (!deepEqual(a[i], b2[i])) {
11756
+ if (!deepEqual(a[i], b[i])) {
11433
11757
  return false;
11434
11758
  }
11435
11759
  }
@@ -11437,11 +11761,11 @@
11437
11761
  }
11438
11762
  keys = Object.keys(a);
11439
11763
  length = keys.length;
11440
- if (length !== Object.keys(b2).length) {
11764
+ if (length !== Object.keys(b).length) {
11441
11765
  return false;
11442
11766
  }
11443
11767
  for (i = length; i-- !== 0; ) {
11444
- if (!{}.hasOwnProperty.call(b2, keys[i])) {
11768
+ if (!{}.hasOwnProperty.call(b, keys[i])) {
11445
11769
  return false;
11446
11770
  }
11447
11771
  }
@@ -11450,13 +11774,13 @@
11450
11774
  if (key === "_owner" && a.$$typeof) {
11451
11775
  continue;
11452
11776
  }
11453
- if (!deepEqual(a[key], b2[key])) {
11777
+ if (!deepEqual(a[key], b[key])) {
11454
11778
  return false;
11455
11779
  }
11456
11780
  }
11457
11781
  return true;
11458
11782
  }
11459
- return a !== a && b2 !== b2;
11783
+ return a !== a && b !== b;
11460
11784
  }
11461
11785
  function getDPR(element) {
11462
11786
  if (typeof window === "undefined") {
@@ -13300,8 +13624,8 @@
13300
13624
  Tooltip.spiritComponent = "Tooltip";
13301
13625
  Tooltip.displayName = "Tooltip";
13302
13626
  const TooltipCloseButton = ({ label, onClick, ...restProps }) => {
13303
- const { t: t2 } = useI18n();
13304
- const closeLabel = label ?? t2("common.close");
13627
+ const { t } = useI18n();
13628
+ const closeLabel = label ?? t("common.close");
13305
13629
  const { classProps, props: modifiedProps } = useTooltipStyleProps(restProps);
13306
13630
  const { styleProps } = useStyleProps({ ...modifiedProps });
13307
13631
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
@@ -13586,8 +13910,7 @@
13586
13910
  ...restProps
13587
13911
  } = modifiedProps;
13588
13912
  const { styleProps, props: otherProps } = useStyleProps(restProps);
13589
- const [ids, register] = useAriaIds(ariaDescribedBy);
13590
- const ariaDescribedByProp = useAriaDescribedBy(ids);
13913
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
13591
13914
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styleProps.style, className: classNames(classProps.root, styleProps.className), children: [
13592
13915
  /* @__PURE__ */ jsxRuntimeExports.jsx(
13593
13916
  "input",
@@ -13890,7 +14213,7 @@
13890
14213
  );
13891
14214
  Section.spiritComponent = "Section";
13892
14215
  Section.displayName = "Section";
13893
- const defaultContext$1 = {
14216
+ const defaultContext$2 = {
13894
14217
  isMultiselect: false,
13895
14218
  name: "",
13896
14219
  selectedValue: [],
@@ -13899,7 +14222,7 @@
13899
14222
  onSelectionChange: () => {
13900
14223
  }
13901
14224
  };
13902
- const SegmentedControlContext = React.createContext(defaultContext$1);
14225
+ const SegmentedControlContext = React.createContext(defaultContext$2);
13903
14226
  const SegmentedControlProvider = SegmentedControlContext.Provider;
13904
14227
  const useSegmentedControlContext = () => React.useContext(SegmentedControlContext);
13905
14228
  const useSegmentedControlStyleProps = (props) => {
@@ -13952,14 +14275,14 @@
13952
14275
  restProps
13953
14276
  );
13954
14277
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
13955
- const handleSetSelectedValue = (v2) => {
14278
+ const handleSetSelectedValue = (v) => {
13956
14279
  if (isDisabled) return;
13957
14280
  let newValue;
13958
14281
  if (isMultiselect) {
13959
14282
  const prevArray = Array.isArray(selectedValue) ? selectedValue : [];
13960
- newValue = prevArray.includes(v2) ? prevArray.filter((item) => item !== v2) : [...prevArray, v2];
14283
+ newValue = prevArray.includes(v) ? prevArray.filter((item) => item !== v) : [...prevArray, v];
13961
14284
  } else {
13962
- newValue = v2;
14285
+ newValue = v;
13963
14286
  }
13964
14287
  setSelectedValue(newValue);
13965
14288
  if (onSelectionChange) {
@@ -14077,8 +14400,7 @@
14077
14400
  validationState
14078
14401
  });
14079
14402
  const { styleProps, props: transferProps } = useStyleProps(restProps);
14080
- const [ids, register] = useAriaIds(ariaDescribedBy);
14081
- const ariaDescribedByProp = useAriaDescribedBy(ids);
14403
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
14082
14404
  const validationTextRole = useValidationTextRole({
14083
14405
  validationState,
14084
14406
  validationText
@@ -14199,7 +14521,7 @@
14199
14521
  };
14200
14522
  const setCustomBorderRadius = (prefix, radius) => {
14201
14523
  const style = {};
14202
- const cssPrefix = `--${Xf}radius-`;
14524
+ const cssPrefix = `--${$p}radius-`;
14203
14525
  if (typeof radius === "object" && radius !== null) {
14204
14526
  Object.keys(radius).forEach((key) => {
14205
14527
  const breakpointSuffix = key === "mobile" ? "" : `-${key}`;
@@ -14216,7 +14538,7 @@
14216
14538
  const skeletonClass = useClassNamePrefix("Skeleton");
14217
14539
  const skeletonItemClass = `${skeletonClass}--shape`;
14218
14540
  const classProps = classNames(skeletonClass, skeletonItemClass);
14219
- const stylePrefix = `${Xf}skeleton-shape`;
14541
+ const stylePrefix = `${$p}skeleton-shape`;
14220
14542
  const customizedShapeStyle = {
14221
14543
  ...setCustomDimension(`${stylePrefix}-width`, width),
14222
14544
  ...setCustomDimension(`${stylePrefix}-height`, height),
@@ -14337,8 +14659,7 @@
14337
14659
  validationState
14338
14660
  });
14339
14661
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
14340
- const [ids, register] = useAriaIds(ariaDescribedBy);
14341
- const ariaDescribedByProp = useAriaDescribedBy(ids);
14662
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
14342
14663
  const validationTextRole = useValidationTextRole({
14343
14664
  validationState,
14344
14665
  validationText
@@ -14416,7 +14737,7 @@
14416
14737
  dropdownTriggerIconName: "chevron-down"
14417
14738
  };
14418
14739
  const UncontrolledSplitButton = (props) => {
14419
- const { t: t2 } = useI18n();
14740
+ const { t } = useI18n();
14420
14741
  const propsWithDefaults = { ...defaultProps$c, ...props };
14421
14742
  const {
14422
14743
  buttonIconName,
@@ -14432,7 +14753,7 @@
14432
14753
  isDropdownTriggerLabelHidden,
14433
14754
  ...restProps
14434
14755
  } = propsWithDefaults;
14435
- const resolvedDropdownTriggerLabel = dropdownTriggerLabel ?? t2("splitButton.dropdown");
14756
+ const resolvedDropdownTriggerLabel = dropdownTriggerLabel ?? t("splitButton.dropdown");
14436
14757
  const [openDropdownState, setOpenDropdownState] = React.useState(false);
14437
14758
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(SplitButton, { ...restProps, id, isDisabled, children: [
14438
14759
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Button, { onClick: buttonOnClick, children: [
@@ -14462,7 +14783,7 @@
14462
14783
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ...transferProps, ...styleProps, children });
14463
14784
  };
14464
14785
  TabContent.spiritComponent = "TabContent";
14465
- const defaultContext = {
14786
+ const defaultContext$1 = {
14466
14787
  selectedId: "",
14467
14788
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
14468
14789
  selectTab: (id) => {
@@ -14471,7 +14792,7 @@
14471
14792
  onSelectionChange: (previousId, currentId) => {
14472
14793
  }
14473
14794
  };
14474
- const TabsContext = React.createContext(defaultContext);
14795
+ const TabsContext = React.createContext(defaultContext$1);
14475
14796
  const TabsProvider = TabsContext.Provider;
14476
14797
  const TabsConsumer = TabsContext.Consumer;
14477
14798
  const useTabContext = () => React.useContext(TabsContext);
@@ -14534,11 +14855,13 @@
14534
14855
  };
14535
14856
  const _TabLink = (props, ref) => {
14536
14857
  const propsWithDefaults = { ...defaultProps$b, ...props };
14537
- const { elementType = "a", children, itemProps = {}, ...restProps } = propsWithDefaults;
14858
+ const { elementType = "a", children, itemProps = {}, routerOptions, ...restProps } = propsWithDefaults;
14859
+ const { href } = restProps;
14538
14860
  const Component = elementType;
14539
14861
  const { classProps } = useTabsStyleProps();
14540
14862
  const { styleProps: itemStyleProps, props: itemTransferProps } = useStyleProps(itemProps);
14541
14863
  const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link });
14864
+ const handleClick = useLinkClick({ ...restProps, routerOptions });
14542
14865
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
14543
14866
  "li",
14544
14867
  {
@@ -14546,7 +14869,7 @@
14546
14869
  ...itemTransferProps,
14547
14870
  className: classNames(classProps.item, itemStyleProps.className),
14548
14871
  role: "presentation",
14549
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...restProps, ...mergedStyleProps, ref, children })
14872
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Component, { ...restProps, ...mergedStyleProps, href, onClick: handleClick, ref, children })
14550
14873
  }
14551
14874
  );
14552
14875
  };
@@ -14613,18 +14936,37 @@
14613
14936
  };
14614
14937
  UncontrolledTabs.spiritComponent = "UncontrolledTabs";
14615
14938
  const TagColorsExtended = {
14616
- NEUTRAL: "neutral"
14939
+ NEUTRAL: "neutral",
14940
+ SELECTED: "selected"
14941
+ };
14942
+ const getColorClasses = (color, isSubtle) => {
14943
+ if (!color) {
14944
+ return {};
14945
+ }
14946
+ const isEmotionColor = Object.keys(hg).includes(color);
14947
+ const prefix = isEmotionColor ? `${ColorPrefixes.EMOTION}-` : "";
14948
+ const borderIntensity = isSubtle ? Intensity.SUBTLE : Intensity.BASIC;
14949
+ const backgroundIntensity = isSubtle ? Intensity.SUBTLE : Intensity.BASIC;
14950
+ const textIntensity = isSubtle ? Intensity.BASIC : Intensity.SUBTLE;
14951
+ return {
14952
+ [`border-${prefix}${color}-${borderIntensity}`]: true,
14953
+ [`bg-${prefix}${color}-${backgroundIntensity}`]: true,
14954
+ [`text-${prefix}${color}-${textIntensity}`]: true
14955
+ };
14617
14956
  };
14618
14957
  function useTagStyleProps(props) {
14619
- const { color, isSubtle, size: size2, ...modifiedProps } = props;
14958
+ const { color, isDisabled, isSubtle, size: size2, ...modifiedProps } = props;
14620
14959
  const TagClass = useClassNamePrefix("Tag");
14621
14960
  const TagColorClass = `${TagClass}--${color}`;
14961
+ const TagDisabledClass = `${TagClass}--disabled`;
14622
14962
  const TagSizeClass = `${TagClass}--${size2}`;
14623
14963
  const TagSubtleClass = `${TagClass}--subtle`;
14624
14964
  const classProps = classNames(TagClass, {
14625
14965
  [TagColorClass]: color,
14966
+ [TagDisabledClass]: isDisabled,
14626
14967
  [TagSizeClass]: size2,
14627
- [TagSubtleClass]: isSubtle
14968
+ [TagSubtleClass]: isSubtle,
14969
+ ...!isDisabled && getColorClasses(color, isSubtle)
14628
14970
  });
14629
14971
  return {
14630
14972
  classProps,
@@ -14747,6 +15089,7 @@
14747
15089
  [TextFieldBaseLabelRequiredClass]: isRequired,
14748
15090
  [TextFieldBaseLabelHiddenClass]: isLabelHidden
14749
15091
  });
15092
+ const counterStyles = `${TextFieldBaseClass}__counter`;
14750
15093
  return {
14751
15094
  classProps: {
14752
15095
  root: rootStyles,
@@ -14756,7 +15099,8 @@
14756
15099
  validationText: TextFieldBaseValidationTextClass,
14757
15100
  passwordToggle: TextFieldBasePasswordToggleClass,
14758
15101
  passwordToggleButton: TextFieldBasePasswordToggleButtonClass,
14759
- passwordToggleIcon: TextFieldBasePasswordToggleIconClass
15102
+ passwordToggleIcon: TextFieldBasePasswordToggleIconClass,
15103
+ counter: counterStyles
14760
15104
  },
14761
15105
  props: {
14762
15106
  ...restProps,
@@ -14778,10 +15122,10 @@
14778
15122
  };
14779
15123
  }
14780
15124
  const TextFieldBasePasswordToggle = (props) => {
14781
- const { t: t2 } = useI18n();
15125
+ const { t } = useI18n();
14782
15126
  const { children, isPasswordShown, onToggleClick, isDisabled, size: size2 } = props;
14783
15127
  const { classProps } = useTextFieldBasePasswordToggleStyleProps();
14784
- const ariaLabel = isPasswordShown ? t2("textField.password.hide") : t2("textField.password.show");
15128
+ const ariaLabel = isPasswordShown ? t("textField.password.hide") : t("textField.password.show");
14785
15129
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classProps.passwordToggle, children: [
14786
15130
  children,
14787
15131
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -14842,6 +15186,7 @@
14842
15186
  const _TextFieldBase = (props, ref) => {
14843
15187
  const {
14844
15188
  "aria-describedby": ariaDescribedBy = "",
15189
+ counterProps,
14845
15190
  hasValidationIcon,
14846
15191
  helperText,
14847
15192
  id,
@@ -14858,36 +15203,47 @@
14858
15203
  ...restProps
14859
15204
  });
14860
15205
  const { styleProps, props: otherProps } = useStyleProps(modifiedProps);
14861
- const [ids, register] = useAriaIds(ariaDescribedBy);
14862
- const ariaDescribedByProp = useAriaDescribedBy(ids);
15206
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
14863
15207
  const validationTextRole = useValidationTextRole({
14864
15208
  validationState,
14865
15209
  validationText
14866
15210
  });
15211
+ const hasTextContent = helperText || validationState && validationText;
15212
+ const helperTextElement = /* @__PURE__ */ jsxRuntimeExports.jsx(
15213
+ HelperText,
15214
+ {
15215
+ UNSAFE_className: classProps.helperText,
15216
+ id: `${id}__helper-text`,
15217
+ registerAria: register,
15218
+ helperText
15219
+ }
15220
+ );
15221
+ const validationTextElement = validationState ? /* @__PURE__ */ jsxRuntimeExports.jsx(
15222
+ ValidationText,
15223
+ {
15224
+ UNSAFE_className: classProps.validationText,
15225
+ elementType: "span",
15226
+ ...hasValidationIcon && { hasValidationStateIcon: validationState },
15227
+ id: `${id}__validation-text`,
15228
+ validationText,
15229
+ registerAria: register,
15230
+ role: validationTextRole
15231
+ }
15232
+ ) : null;
15233
+ const counterElement = counterProps ? /* @__PURE__ */ jsxRuntimeExports.jsx(CharacterCounter, { ...counterProps, id, registerAria: register, UNSAFE_className: classProps.counter }) : null;
14867
15234
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...styleProps, className: classNames(classProps.root, styleProps.className), children: [
14868
15235
  /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: id, UNSAFE_className: classProps.label, children: label }),
14869
15236
  /* @__PURE__ */ jsxRuntimeExports.jsx(TextFieldBaseInputWithPasswordToggle, { ...otherProps, ...ariaDescribedByProp, id, ref, size: size2 }),
14870
- /* @__PURE__ */ jsxRuntimeExports.jsx(
14871
- HelperText,
14872
- {
14873
- UNSAFE_className: classProps.helperText,
14874
- id: `${id}__helperText`,
14875
- registerAria: register,
14876
- helperText
14877
- }
14878
- ),
14879
- validationState && /* @__PURE__ */ jsxRuntimeExports.jsx(
14880
- ValidationText,
14881
- {
14882
- UNSAFE_className: classProps.validationText,
14883
- elementType: "span",
14884
- ...hasValidationIcon && { hasValidationStateIcon: validationState },
14885
- id: `${id}__validationText`,
14886
- validationText,
14887
- registerAria: register,
14888
- role: validationTextRole
14889
- }
14890
- )
15237
+ counterProps ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { direction: "horizontal", isWrapping: false, alignmentX: "space-between", alignmentY: "top", children: [
15238
+ hasTextContent ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
15239
+ validationTextElement,
15240
+ helperTextElement
15241
+ ] }) : null,
15242
+ counterElement
15243
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
15244
+ helperTextElement,
15245
+ validationTextElement
15246
+ ] })
14891
15247
  ] });
14892
15248
  };
14893
15249
  const TextFieldBase = React.forwardRef(
@@ -14895,6 +15251,7 @@
14895
15251
  );
14896
15252
  TextFieldBase.spiritComponent = "TextFieldBase";
14897
15253
  TextFieldBase.displayName = "TextFieldBase";
15254
+ const TEXTAREA_MAX_SAFE_LENGTH = 1e4;
14898
15255
  const useAdjustHeight = ({
14899
15256
  elementReference,
14900
15257
  maxHeight,
@@ -14934,8 +15291,23 @@
14934
15291
  onInput: inputHandler
14935
15292
  };
14936
15293
  };
15294
+ const isCounterActive = (hasCounter, counterThreshold) => hasCounter === true || counterThreshold !== void 0;
15295
+ const resolveCounterNativeMaxLength = (consumerMaxLength) => consumerMaxLength === void 0 ? TEXTAREA_MAX_SAFE_LENGTH : consumerMaxLength;
14937
15296
  const _TextArea = (props, ref) => {
14938
- const { onInput, isAutoResizing, autoResizingMaxHeight = 400, ...restProps } = props;
15297
+ const {
15298
+ onInput,
15299
+ isAutoResizing,
15300
+ autoResizingMaxHeight = 400,
15301
+ counterThreshold,
15302
+ hasCounter,
15303
+ onChange,
15304
+ value,
15305
+ defaultValue,
15306
+ helperText,
15307
+ isDisabled,
15308
+ id,
15309
+ ...restProps
15310
+ } = props;
14939
15311
  const elementReference = React.useRef(ref);
14940
15312
  const { adjustHeightOnAutoresize, onInput: onInputHandler } = useAdjustHeight({
14941
15313
  elementReference,
@@ -14943,14 +15315,44 @@
14943
15315
  isAutoResizing,
14944
15316
  maxHeight: autoResizingMaxHeight
14945
15317
  });
15318
+ const normalizedValue = normalizeStringValue(value);
15319
+ const normalizedDefaultValue = normalizeStringValue(defaultValue);
15320
+ const { counterProps, handleChange } = useCharacterCounterState({
15321
+ value: normalizedValue,
15322
+ defaultValue: normalizedDefaultValue,
15323
+ counterThreshold,
15324
+ hasCounter,
15325
+ onChange
15326
+ });
15327
+ const counterOn = isCounterActive(hasCounter, counterThreshold);
15328
+ const nativeMaxLength = counterOn ? resolveCounterNativeMaxLength(restProps.maxLength) : void 0;
15329
+ const changeHandler = counterOn ? handleChange : onChange;
15330
+ const didWarnMaxLengthLowerThanThresholdRef = React.useRef(false);
15331
+ React.useEffect(() => {
15332
+ if (counterThreshold !== void 0 && restProps.maxLength !== void 0 && restProps.maxLength < counterThreshold && !didWarnMaxLengthLowerThanThresholdRef.current) {
15333
+ didWarnMaxLengthLowerThanThresholdRef.current = true;
15334
+ warning(
15335
+ false,
15336
+ "TextArea: `maxLength` should be greater than or equal to `counterThreshold` to keep visible counter and hard input limit aligned."
15337
+ );
15338
+ }
15339
+ }, [counterThreshold, restProps.maxLength]);
14946
15340
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
14947
15341
  TextFieldBase,
14948
15342
  {
15343
+ id,
14949
15344
  isMultiline: true,
14950
15345
  ref: elementReference,
14951
15346
  onInput: onInputHandler,
14952
15347
  onFocus: adjustHeightOnAutoresize,
14953
- ...restProps
15348
+ onChange: changeHandler,
15349
+ value,
15350
+ defaultValue,
15351
+ helperText,
15352
+ isDisabled,
15353
+ counterProps,
15354
+ ...restProps,
15355
+ ...nativeMaxLength !== void 0 && { maxLength: nativeMaxLength }
14954
15356
  }
14955
15357
  );
14956
15358
  };
@@ -15184,7 +15586,7 @@
15184
15586
  return iconName || iconNameValue;
15185
15587
  }
15186
15588
  const ToastBar = (props) => {
15187
- const { t: t2 } = useI18n();
15589
+ const { t } = useI18n();
15188
15590
  const {
15189
15591
  id,
15190
15592
  children,
@@ -15198,7 +15600,7 @@
15198
15600
  },
15199
15601
  ...restProps
15200
15602
  } = props;
15201
- const resolvedCloseLabel = closeLabel ?? t2("common.close");
15603
+ const resolvedCloseLabel = closeLabel ?? t("common.close");
15202
15604
  const rootElementRef = React.useRef(null);
15203
15605
  const toastIconName = useToastIcon({ color, iconName });
15204
15606
  const { classProps, props: modifiedProps } = useToastBarStyleProps({
@@ -15284,9 +15686,9 @@
15284
15686
  return currentToastContext;
15285
15687
  };
15286
15688
  const UncontrolledToast = (props) => {
15287
- const { t: t2 } = useI18n();
15689
+ const { t } = useI18n();
15288
15690
  const { alignmentX, alignmentY, isCollapsible, closeLabel, ...restProps } = props;
15289
- const resolvedCloseLabel = closeLabel ?? t2("common.close");
15691
+ const resolvedCloseLabel = closeLabel ?? t("common.close");
15290
15692
  const { hide, queue } = useToast();
15291
15693
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Toast, { alignmentX, alignmentY, isCollapsible, children: queue.map((item) => {
15292
15694
  const { color, iconName, id, isOpen, content, hasIcon, isDismissible, linkProps } = item;
@@ -15363,6 +15765,8 @@
15363
15765
  const { classProps, props: modifiedProps } = useToggleStyleProps(props);
15364
15766
  const {
15365
15767
  "aria-describedby": ariaDescribedBy = "",
15768
+ "aria-details": ariaDetailsAttr,
15769
+ details,
15366
15770
  hasValidationIcon,
15367
15771
  id,
15368
15772
  isDisabled,
@@ -15377,8 +15781,8 @@
15377
15781
  ...restProps
15378
15782
  } = modifiedProps;
15379
15783
  const { styleProps, props: otherProps } = useStyleProps(restProps);
15380
- const [ids, register] = useAriaIds(ariaDescribedBy);
15381
- const ariaDescribedByProp = useAriaDescribedBy(ids);
15784
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
15785
+ const [ariaDetailsProp, registerDetails] = useAriaDetails(ariaDetailsAttr);
15382
15786
  const [checked, setChecked] = React.useState(isChecked);
15383
15787
  const validationTextRole = useValidationTextRole({
15384
15788
  validationState,
@@ -15391,6 +15795,7 @@
15391
15795
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styleProps.style, className: classNames(classProps.root, styleProps.className), children: [
15392
15796
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classProps.text, children: [
15393
15797
  /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { UNSAFE_className: classProps.label, htmlFor: id, children: label }),
15798
+ details && /* @__PURE__ */ jsxRuntimeExports.jsx(InputDetails, { id: `${id}-details`, registerAriaDetails: registerDetails, children: details }),
15394
15799
  /* @__PURE__ */ jsxRuntimeExports.jsx(
15395
15800
  HelperText,
15396
15801
  {
@@ -15417,6 +15822,7 @@
15417
15822
  {
15418
15823
  ...otherProps,
15419
15824
  ...ariaDescribedByProp,
15825
+ ...ariaDetailsProp,
15420
15826
  type: "checkbox",
15421
15827
  id,
15422
15828
  className: classProps.input,
@@ -15509,157 +15915,172 @@
15509
15915
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ElementTag, { ...otherProps, ...mergedStyleProps, children: truncatedText });
15510
15916
  };
15511
15917
  Truncate.spiritComponent = "Truncate";
15512
- const DEFAULT_ATTACHMENT_IMAGE_DIMENSION = 54;
15513
- const DEFAULT_ATTACHMENT_ICON_NAME = "file";
15514
- const DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME = "edit";
15515
- const AttachmentCropCSS = {
15516
- TOP: "--file-uploader-attachment-image-top",
15517
- LEFT: "--file-uploader-attachment-image-left",
15518
- WIDTH: "--file-uploader-attachment-image-width",
15519
- HEIGHT: "--file-uploader-attachment-image-height"
15918
+ const DEFAULT_FILE_IMAGE_DIMENSION = 48;
15919
+ const DEFAULT_FILE_ICON_NAME = "file";
15920
+ const DEFAULT_FILE_ACTION_BUTTON_ICON_NAME = "edit";
15921
+ const FileImageCropCSS = {
15922
+ TOP: "--spirit-file-image-top",
15923
+ LEFT: "--spirit-file-image-left",
15924
+ WIDTH: "--spirit-file-image-width",
15925
+ HEIGHT: "--spirit-file-image-height"
15520
15926
  };
15521
15927
  const CROP_META_KEYS = ["x", "y", "cropWidth", "cropHeight", "originalWidth", "originalHeight"];
15522
- function hasValidCropMeta(meta) {
15523
- return meta != null && CROP_META_KEYS.every((key) => meta[key] != null);
15524
- }
15525
- function computeCropCSS(meta) {
15928
+ const hasValidCropMeta = (meta) => meta != null && CROP_META_KEYS.every((key) => meta[key] != null);
15929
+ const computeCropCSS = (meta) => {
15526
15930
  const { x, y, cropWidth, cropHeight, originalWidth, originalHeight } = meta;
15527
- const scale = cropHeight > cropWidth ? DEFAULT_ATTACHMENT_IMAGE_DIMENSION / cropWidth : DEFAULT_ATTACHMENT_IMAGE_DIMENSION / cropHeight;
15931
+ const previewHeight = DEFAULT_FILE_IMAGE_DIMENSION;
15932
+ let scale;
15933
+ if (cropHeight > cropWidth) {
15934
+ scale = previewHeight / cropWidth;
15935
+ } else {
15936
+ scale = previewHeight / cropHeight;
15937
+ }
15938
+ const cropX = Math.round(x * scale);
15939
+ const cropY = Math.round(y * scale);
15940
+ const imageWidth = Math.round(originalWidth * scale);
15941
+ const imageHeight = Math.round(originalHeight * scale);
15528
15942
  return {
15529
- [AttachmentCropCSS.TOP]: `-${Math.round(y * scale)}px`,
15530
- [AttachmentCropCSS.LEFT]: `-${Math.round(x * scale)}px`,
15531
- [AttachmentCropCSS.WIDTH]: `${Math.round(originalWidth * scale)}px`,
15532
- [AttachmentCropCSS.HEIGHT]: `${Math.round(originalHeight * scale)}px`
15943
+ [FileImageCropCSS.TOP]: `-${cropY}px`,
15944
+ [FileImageCropCSS.LEFT]: `-${cropX}px`,
15945
+ [FileImageCropCSS.WIDTH]: `${imageWidth}px`,
15946
+ [FileImageCropCSS.HEIGHT]: `${imageHeight}px`
15533
15947
  };
15534
- }
15535
- function useAttachmentImageStyles(meta, imageObjectFit) {
15948
+ };
15949
+ function useFileImageStyles(meta, imageObjectFit) {
15536
15950
  const hasCoordsInMeta = hasValidCropMeta(meta);
15537
- const imageCropCSS = hasCoordsInMeta ? computeCropCSS(meta) : void 0;
15538
- const imageObjectFitCSS = imageObjectFit ? { "--file-uploader-attachment-image-object-fit": imageObjectFit } : void 0;
15539
- return { imageCropCSS, imageObjectFitCSS, hasCoordsInMeta };
15540
- }
15541
- const useAttachmentStyleProps = (props) => {
15542
- const AttachmentClass = useClassNamePrefix("Attachment");
15543
- const AttachmentFluidClass = `${AttachmentClass}--fluid`;
15544
- const AttachmentNameClass = `${AttachmentClass}__name`;
15545
- const AttachmentButtonClass = `${AttachmentClass}__action`;
15546
- const AttachmentImageClass = `${AttachmentClass}__image`;
15547
- const AttachmentSlotClass = `${AttachmentClass}__slot`;
15548
- const { imageCropCSS, imageObjectFitCSS, hasCoordsInMeta } = useAttachmentImageStyles(
15951
+ const imageCropStyles = hasCoordsInMeta ? computeCropCSS(meta) : void 0;
15952
+ const imageObjectFitStyles = imageObjectFit ? { "--spirit-file-image-object-fit": imageObjectFit } : void 0;
15953
+ return { hasCoordsInMeta, imageCropStyles, imageObjectFitStyles };
15954
+ }
15955
+ const useFileStyleProps = (props) => {
15956
+ const fileClass = useClassNamePrefix("UNSTABLE_File");
15957
+ const { imageCropStyles, imageObjectFitStyles, hasCoordsInMeta } = useFileImageStyles(
15549
15958
  props?.meta,
15550
15959
  props?.imageObjectFit
15551
15960
  );
15552
15961
  return {
15553
15962
  classProps: {
15554
- root: classNames(AttachmentClass, { [AttachmentFluidClass]: props?.isFluid }),
15555
- button: AttachmentButtonClass,
15556
- name: AttachmentNameClass,
15557
- image: AttachmentImageClass,
15558
- slot: AttachmentSlotClass,
15559
- ...hasCoordsInMeta && { imageCropStyles: imageCropCSS },
15560
- ...imageObjectFitCSS && { attachmentStyles: imageObjectFitCSS }
15963
+ root: classNames(fileClass, {
15964
+ [`${fileClass}--disabled`]: props?.isDisabled,
15965
+ [`has-${props?.validationState}`]: props?.validationState
15966
+ }),
15967
+ preview: `${fileClass}__preview`,
15968
+ content: `${fileClass}__content`,
15969
+ text: `${fileClass}__text`,
15970
+ name: `${fileClass}__name`,
15971
+ helperText: `${fileClass}__helperText`,
15972
+ validationText: `${fileClass}__validationText`,
15973
+ ...hasCoordsInMeta && { imageCropStyles },
15974
+ ...imageObjectFitStyles && { imageObjectFitStyles }
15561
15975
  }
15562
15976
  };
15563
15977
  };
15564
- const UNSTABLE_AttachmentActionButton = (props) => {
15565
- const { name = DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME, children, ...restProps } = props;
15566
- const { classProps } = useAttachmentStyleProps();
15567
- const { styleProps, props: transferProps } = useStyleProps(restProps);
15568
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
15569
- "button",
15570
- {
15571
- type: "button",
15572
- ...transferProps,
15573
- ...styleProps,
15574
- className: classNames(classProps.button, styleProps.className),
15575
- children: [
15576
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children }),
15577
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name, "aria-hidden": "true" })
15578
- ]
15579
- }
15580
- );
15581
- };
15582
- UNSTABLE_AttachmentActionButton.spiritComponent = "UNSTABLE_AttachmentActionButton";
15583
- UNSTABLE_AttachmentActionButton.displayName = "UNSTABLE_AttachmentActionButton";
15584
- const UNSTABLE_AttachmentDismissButton = (props) => {
15585
- const { children, ...restProps } = props;
15586
- const { classProps } = useAttachmentStyleProps();
15587
- const { styleProps, props: transferProps } = useStyleProps(restProps);
15588
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
15589
- "button",
15590
- {
15591
- type: "button",
15592
- ...transferProps,
15593
- ...styleProps,
15594
- className: classNames(classProps.button, styleProps.className),
15595
- children: [
15596
- /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children }),
15597
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: "close", "aria-hidden": "true" })
15598
- ]
15599
- }
15600
- );
15601
- };
15602
- UNSTABLE_AttachmentDismissButton.spiritComponent = "UNSTABLE_AttachmentDismissButton";
15603
- UNSTABLE_AttachmentDismissButton.displayName = "UNSTABLE_AttachmentDismissButton";
15604
15978
  const defaultProps$2 = {
15605
15979
  elementType: "li",
15606
- iconName: DEFAULT_ATTACHMENT_ICON_NAME,
15607
- isFluid: false
15980
+ iconName: DEFAULT_FILE_ICON_NAME
15608
15981
  };
15609
- const UNSTABLE_Attachment = (props) => {
15982
+ const UNSTABLE_File = (props) => {
15610
15983
  const propsWithDefaults = { ...defaultProps$2, ...props };
15611
- const { t: t2 } = useI18n();
15984
+ const { t } = useI18n();
15612
15985
  const {
15613
15986
  editText,
15614
15987
  elementType,
15988
+ hasValidationIcon,
15989
+ helperText,
15615
15990
  iconName,
15616
15991
  id,
15617
- isFluid,
15992
+ isDisabled,
15618
15993
  label,
15619
15994
  onDismiss,
15620
15995
  onChange,
15621
- removeText,
15622
15996
  previewSlot,
15997
+ removeText,
15998
+ validationState,
15999
+ validationText,
15623
16000
  ...restProps
15624
16001
  } = propsWithDefaults;
15625
- const resolvedEditText = editText ?? t2("attachment.edit");
15626
- const resolvedRemoveText = removeText ?? t2("attachment.remove");
15627
- const { classProps } = useAttachmentStyleProps({ isFluid });
16002
+ const resolvedEditText = editText ?? t("attachment.edit");
16003
+ const resolvedRemoveText = removeText ?? t("attachment.remove");
16004
+ const { classProps } = useFileStyleProps({ isDisabled, validationState });
15628
16005
  const { styleProps, props: transferProps } = useStyleProps(restProps);
16006
+ const validationTextRole = useValidationTextRole({
16007
+ validationState,
16008
+ validationText
16009
+ });
16010
+ const fileRowControlButtonProps = {
16011
+ size: "large",
16012
+ isSymmetrical: true,
16013
+ isDisabled
16014
+ };
16015
+ const editActionButton = onChange ? /* @__PURE__ */ jsxRuntimeExports.jsxs(ControlButton, { ...fileRowControlButtonProps, onClick: onChange, children: [
16016
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children: resolvedEditText }),
16017
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: DEFAULT_FILE_ACTION_BUTTON_ICON_NAME, boxSize: 16, "aria-hidden": "true" })
16018
+ ] }) : null;
16019
+ const dismissActionButton = onDismiss ? /* @__PURE__ */ jsxRuntimeExports.jsxs(ControlButton, { ...fileRowControlButtonProps, onClick: onDismiss, children: [
16020
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children: resolvedRemoveText }),
16021
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: "close", boxSize: 16, "aria-hidden": "true" })
16022
+ ] }) : null;
15629
16023
  const Component = elementType;
15630
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Component, { ...transferProps, ...styleProps, id, className: classNames(classProps.root, styleProps.className), children: [
15631
- previewSlot ?? /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: iconName, "aria-hidden": "true" }),
15632
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classProps.name, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: useClassNamePrefix("text-truncate"), children: label }) }),
15633
- onChange && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classProps.slot, children: /* @__PURE__ */ jsxRuntimeExports.jsx(UNSTABLE_AttachmentActionButton, { onClick: onChange, children: resolvedEditText }) }),
15634
- /* @__PURE__ */ jsxRuntimeExports.jsx(UNSTABLE_AttachmentDismissButton, { onClick: onDismiss, children: resolvedRemoveText })
15635
- ] });
16024
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
16025
+ Component,
16026
+ {
16027
+ ...transferProps,
16028
+ ...styleProps,
16029
+ ...id != null && id !== "" ? { id } : {},
16030
+ className: classNames(classProps.root, styleProps.className),
16031
+ children: [
16032
+ previewSlot ?? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classProps.preview, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: iconName, boxSize: 20, "aria-hidden": "true" }) }),
16033
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classProps.content, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classProps.text, children: [
16034
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classProps.name, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: useClassNamePrefix("text-truncate"), children: label }) }),
16035
+ helperText && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: classProps.helperText, children: helperText }),
16036
+ validationState && /* @__PURE__ */ jsxRuntimeExports.jsx(
16037
+ ValidationText,
16038
+ {
16039
+ UNSAFE_className: classProps.validationText,
16040
+ elementType: "div",
16041
+ ...hasValidationIcon && { hasValidationStateIcon: validationState },
16042
+ role: validationTextRole,
16043
+ validationText
16044
+ }
16045
+ )
16046
+ ] }) }),
16047
+ editActionButton && dismissActionButton ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { alignmentX: { mobile: "stretch", tablet: "left" }, alignmentY: "stretch", spacingX: "space-500", children: [
16048
+ editActionButton,
16049
+ dismissActionButton
16050
+ ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
16051
+ editActionButton,
16052
+ dismissActionButton
16053
+ ] })
16054
+ ]
16055
+ }
16056
+ );
15636
16057
  };
15637
- UNSTABLE_Attachment.spiritComponent = "UNSTABLE_Attachment";
15638
- UNSTABLE_Attachment.displayName = "UNSTABLE_Attachment";
16058
+ UNSTABLE_File.spiritComponent = "UNSTABLE_File";
16059
+ UNSTABLE_File.displayName = "UNSTABLE_File";
15639
16060
  const defaultProps$1 = {
15640
16061
  meta: void 0,
15641
16062
  imageObjectFit: ObjectFit.COVER
15642
16063
  };
15643
- const UNSTABLE_AttachmentImagePreview = (props) => {
16064
+ const UNSTABLE_FileImagePreview = (props) => {
15644
16065
  const propsWithDefaults = { ...defaultProps$1, ...props };
15645
16066
  const { label, imagePreview, meta, imageObjectFit, ...restProps } = propsWithDefaults;
15646
- const { classProps } = useAttachmentStyleProps({ meta, imageObjectFit });
16067
+ const { classProps } = useFileStyleProps({ meta, imageObjectFit });
15647
16068
  const imageCropStyles = classProps.imageCropStyles ?? {};
15648
- const attachmentStyles = classProps.attachmentStyles ?? {};
16069
+ const imageObjectFitStyles = classProps.imageObjectFitStyles ?? {};
15649
16070
  const { styleProps, props: transferProps } = useStyleProps(restProps);
15650
- return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { ...transferProps, ...styleProps, className: classNames(classProps.image, styleProps.className), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
16071
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { ...transferProps, ...styleProps, className: classNames(classProps.preview, styleProps.className), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
15651
16072
  "img",
15652
16073
  {
15653
16074
  src: imagePreview,
15654
- width: DEFAULT_ATTACHMENT_IMAGE_DIMENSION,
15655
- height: DEFAULT_ATTACHMENT_IMAGE_DIMENSION,
16075
+ width: DEFAULT_FILE_IMAGE_DIMENSION,
16076
+ height: DEFAULT_FILE_IMAGE_DIMENSION,
15656
16077
  alt: label,
15657
- style: { ...imageCropStyles, ...attachmentStyles }
16078
+ style: { ...imageCropStyles, ...imageObjectFitStyles }
15658
16079
  }
15659
16080
  ) });
15660
16081
  };
15661
- UNSTABLE_AttachmentImagePreview.spiritComponent = "UNSTABLE_AttachmentImagePreview";
15662
- UNSTABLE_AttachmentImagePreview.displayName = "UNSTABLE_AttachmentImagePreview";
16082
+ UNSTABLE_FileImagePreview.spiritComponent = "UNSTABLE_FileImagePreview";
16083
+ UNSTABLE_FileImagePreview.displayName = "UNSTABLE_FileImagePreview";
15663
16084
  const useFileUploadState = (props) => {
15664
16085
  const { onFilesSelected } = props;
15665
16086
  const onDropHandler = (event) => {
@@ -15700,28 +16121,27 @@
15700
16121
  };
15701
16122
  };
15702
16123
  const useFileUploadStyleProps = (props) => {
15703
- const fileUploadClass = useClassNamePrefix("FileUploader");
16124
+ const fileUploadClass = useClassNamePrefix("UNSTABLE_FileUpload");
15704
16125
  const fileUploadHasDragAndDropClass = "has-drag-and-drop";
15705
- const fileUploadFluidClass = `${fileUploadClass}--fluid`;
15706
16126
  const fileUploadInputClass = `${fileUploadClass}Input`;
15707
16127
  const fileUploadInputDisabledClass = `${fileUploadInputClass}--disabled`;
16128
+ const fileUploadDropZoneDisabledClass = `${fileUploadInputClass}__dropZone--disabled`;
16129
+ const fileUploadDropZoneCompactClass = `${fileUploadInputClass}__dropZone--compact`;
15708
16130
  const fileUploadInputValidationClass = `${fileUploadInputClass}--${props?.validationState}`;
15709
16131
  const fileUploadInputDraggingClass = "is-dragging";
15710
16132
  const fileUploadInputDropLabelClass = `${fileUploadInputClass}__dragAndDropLabel`;
15711
16133
  const fileUploadInputDropZoneClass = `${fileUploadInputClass}__dropZone`;
15712
- const fileUploadInputDropZoneLabelClass = `${fileUploadInputDropZoneClass}Label`;
16134
+ const fileUploadInputDropZoneContentClass = `${fileUploadInputClass}__dropZoneContent`;
16135
+ const fileUploadInputDropZoneLabelClass = `${fileUploadInputClass}__dropZoneLabel`;
15713
16136
  const fileUploadInputHelperClass = `${fileUploadInputClass}__helperText`;
15714
16137
  const fileUploadInputInputClass = `${fileUploadInputClass}__input`;
15715
16138
  const fileUploadInputLabelClass = `${fileUploadInputClass}__label`;
15716
16139
  const fileUploadInputLabelHiddenClass = `${fileUploadInputClass}__label--hidden`;
15717
16140
  const fileUploadInputLabelRequiredClass = `${fileUploadInputClass}__label--required`;
15718
- const fileUploadInputLinkClass = `${fileUploadInputClass}__link`;
15719
- const fileUploadInputLinkUtilityClasses = ["link-primary", "link-underlined"];
15720
16141
  const fileUploadInputValidationTextClass = `${fileUploadInputClass}__validationText`;
15721
- const fileUploadListClass = `${fileUploadClass}List`;
15722
16142
  return {
15723
16143
  classProps: {
15724
- root: classNames(fileUploadClass, { [fileUploadFluidClass]: props?.isFluid }),
16144
+ root: fileUploadClass,
15725
16145
  input: {
15726
16146
  root: classNames(fileUploadInputClass, {
15727
16147
  [fileUploadHasDragAndDropClass]: props?.isDragAndDropSupported,
@@ -15736,22 +16156,25 @@
15736
16156
  input: fileUploadInputInputClass,
15737
16157
  dropLabel: fileUploadInputDropLabelClass,
15738
16158
  helper: fileUploadInputHelperClass,
15739
- link: classNames(fileUploadInputLinkClass, ...fileUploadInputLinkUtilityClasses),
15740
16159
  validationText: fileUploadInputValidationTextClass,
15741
16160
  dropZone: {
15742
- root: fileUploadInputDropZoneClass,
16161
+ root: classNames(fileUploadInputDropZoneClass, {
16162
+ [fileUploadDropZoneDisabledClass]: props?.isDisabled,
16163
+ [fileUploadDropZoneCompactClass]: props?.isCompact
16164
+ }),
16165
+ content: fileUploadInputDropZoneContentClass,
15743
16166
  label: fileUploadInputDropZoneLabelClass
15744
16167
  }
15745
- },
15746
- list: fileUploadListClass
16168
+ }
15747
16169
  }
15748
16170
  };
15749
16171
  };
15750
16172
  const UNSTABLE_FileUpload = (props) => {
15751
- const [isDragAndDropSupported, setIsDragAndDropSupported] = React.useState(false);
16173
+ const [isDragAndDropDetected, setIsDragAndDropDetected] = React.useState(false);
15752
16174
  const {
15753
16175
  "aria-describedby": ariaDescribedBy = "",
15754
16176
  accept,
16177
+ buttonText = "Browse",
15755
16178
  children,
15756
16179
  dropZoneRef,
15757
16180
  hasValidationIcon,
@@ -15759,8 +16182,9 @@
15759
16182
  iconName = "upload",
15760
16183
  id,
15761
16184
  inputRef,
16185
+ isCompact,
15762
16186
  isDisabled,
15763
- isFluid,
16187
+ isDragAndDropSupported: isDragAndDropSupportedProp,
15764
16188
  isLabelHidden,
15765
16189
  isMultiple,
15766
16190
  isRequired,
@@ -15769,94 +16193,112 @@
15769
16193
  linkText,
15770
16194
  name,
15771
16195
  onFilesSelected,
16196
+ rootId,
15772
16197
  validationState,
15773
16198
  validationText,
15774
16199
  ...restProps
15775
16200
  } = props;
15776
16201
  const hasInput = name !== void 0;
16202
+ const isDragAndDropSupported = isDragAndDropSupportedProp ?? isDragAndDropDetected;
15777
16203
  const { isDragging, onChange, onDragEnter, onDragLeave, onDragOver, onDrop } = useFileUploadState({
15778
16204
  onFilesSelected: hasInput ? onFilesSelected : void 0
15779
16205
  });
15780
16206
  const { classProps } = useFileUploadStyleProps({
16207
+ isCompact,
15781
16208
  isDisabled,
15782
16209
  isDragAndDropSupported,
15783
16210
  isDragging,
15784
- isFluid,
15785
16211
  isLabelHidden,
15786
16212
  isRequired,
15787
16213
  validationState
15788
16214
  });
15789
16215
  const { styleProps, props: transferProps } = useStyleProps(restProps);
15790
- const [ids, register] = useAriaIds(ariaDescribedBy);
15791
- const ariaDescribedByProp = useAriaDescribedBy(ids);
16216
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
15792
16217
  const validationTextRole = useValidationTextRole({
15793
16218
  validationState,
15794
16219
  validationText
15795
16220
  });
15796
- const inputId = `${id}-input`;
16221
+ const inputId = id;
15797
16222
  React.useEffect(() => {
15798
- setIsDragAndDropSupported("draggable" in document.createElement("span"));
15799
- }, []);
15800
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id, ...transferProps, ...styleProps, className: classNames(classProps.root, styleProps.className), children: [
15801
- hasInput && /* @__PURE__ */ jsxRuntimeExports.jsxs(
15802
- "div",
15803
- {
15804
- onDragOver: !isDisabled && isDragAndDropSupported ? onDragOver : void 0,
15805
- onDragEnter: !isDisabled && isDragAndDropSupported ? onDragEnter : void 0,
15806
- onDragLeave: !isDisabled && isDragAndDropSupported ? onDragLeave : void 0,
15807
- onDrop: !isDisabled && isDragAndDropSupported ? onDrop : void 0,
15808
- className: classProps.input.root,
15809
- children: [
15810
- /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: inputId, UNSAFE_className: classProps.input.label, children: label }),
15811
- /* @__PURE__ */ jsxRuntimeExports.jsx(
15812
- "input",
15813
- {
15814
- ...ariaDescribedByProp,
15815
- type: "file",
15816
- accept,
15817
- id: inputId,
15818
- ref: inputRef,
15819
- name,
15820
- className: classProps.input.input,
15821
- onChange,
15822
- multiple: isMultiple,
15823
- disabled: isDisabled
15824
- }
15825
- ),
15826
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: dropZoneRef, className: classProps.input.dropZone.root, children: [
15827
- /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: iconName, "aria-hidden": "true" }),
15828
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { htmlFor: inputId, UNSAFE_className: classProps.input.dropZone.label, children: [
15829
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classProps.input.link, children: linkText }),
15830
- " ",
15831
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classProps.input.dropLabel, children: labelText })
15832
- ] }),
15833
- /* @__PURE__ */ jsxRuntimeExports.jsx(
15834
- HelperText,
15835
- {
15836
- UNSAFE_className: classProps.input.helper,
15837
- id: `${inputId}__helperText`,
15838
- registerAria: register,
15839
- helperText
15840
- }
15841
- )
15842
- ] }),
15843
- validationState && /* @__PURE__ */ jsxRuntimeExports.jsx(
15844
- ValidationText,
15845
- {
15846
- UNSAFE_className: classProps.input.validationText,
15847
- elementType: "span",
15848
- ...hasValidationIcon && { hasValidationStateIcon: validationState },
15849
- id: `${inputId}__validationText`,
15850
- validationText,
15851
- registerAria: register,
15852
- role: validationTextRole
15853
- }
15854
- )
15855
- ]
15856
- }
15857
- ),
15858
- children
15859
- ] });
16223
+ if (isDragAndDropSupportedProp !== void 0) {
16224
+ return;
16225
+ }
16226
+ setIsDragAndDropDetected("draggable" in document.createElement("span"));
16227
+ }, [isDragAndDropSupportedProp]);
16228
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
16229
+ "div",
16230
+ {
16231
+ ...transferProps,
16232
+ ...styleProps,
16233
+ ...rootId != null && rootId !== "" ? { id: rootId } : {},
16234
+ className: classNames(classProps.root, styleProps.className),
16235
+ children: [
16236
+ hasInput && /* @__PURE__ */ jsxRuntimeExports.jsxs(
16237
+ "div",
16238
+ {
16239
+ onDragOver: !isDisabled && isDragAndDropSupported ? onDragOver : void 0,
16240
+ onDragEnter: !isDisabled && isDragAndDropSupported ? onDragEnter : void 0,
16241
+ onDragLeave: !isDisabled && isDragAndDropSupported ? onDragLeave : void 0,
16242
+ onDrop: !isDisabled && isDragAndDropSupported ? onDrop : void 0,
16243
+ className: classProps.input.root,
16244
+ children: [
16245
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { htmlFor: inputId, UNSAFE_className: classProps.input.label, children: label }),
16246
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16247
+ "input",
16248
+ {
16249
+ ...ariaDescribedByProp,
16250
+ type: "file",
16251
+ accept,
16252
+ id: inputId,
16253
+ ref: inputRef,
16254
+ name,
16255
+ className: classProps.input.input,
16256
+ onChange,
16257
+ multiple: isMultiple,
16258
+ disabled: isDisabled
16259
+ }
16260
+ ),
16261
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: dropZoneRef, className: classProps.input.dropZone.root, children: [
16262
+ !isCompact && /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: iconName, boxSize: 28, "aria-hidden": "true" }),
16263
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: classProps.input.dropZone.content, children: [
16264
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Label, { htmlFor: inputId, UNSAFE_className: classProps.input.dropZone.label, children: [
16265
+ linkText,
16266
+ labelText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
16267
+ " ",
16268
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: classProps.input.dropLabel, children: labelText })
16269
+ ] })
16270
+ ] }),
16271
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16272
+ HelperText,
16273
+ {
16274
+ UNSAFE_className: classProps.input.helper,
16275
+ id: `${inputId}-helper`,
16276
+ registerAria: register,
16277
+ helperText
16278
+ }
16279
+ )
16280
+ ] }),
16281
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { "aria-hidden": "true", isDisabled, elementType: "div", type: null, children: buttonText })
16282
+ ] }),
16283
+ validationState && /* @__PURE__ */ jsxRuntimeExports.jsx(
16284
+ ValidationText,
16285
+ {
16286
+ UNSAFE_className: classProps.input.validationText,
16287
+ elementType: "div",
16288
+ ...hasValidationIcon && { hasValidationStateIcon: validationState },
16289
+ id: `${inputId}-validation`,
16290
+ validationText,
16291
+ registerAria: register,
16292
+ role: validationTextRole
16293
+ }
16294
+ )
16295
+ ]
16296
+ }
16297
+ ),
16298
+ children
16299
+ ]
16300
+ }
16301
+ );
15860
16302
  };
15861
16303
  UNSTABLE_FileUpload.spiritComponent = "UNSTABLE_FileUpload";
15862
16304
  UNSTABLE_FileUpload.displayName = "UNSTABLE_FileUpload";
@@ -15904,6 +16346,640 @@
15904
16346
  );
15905
16347
  UNSTABLE_HeaderLogo.spiritComponent = "UNSTABLE_HeaderLogo";
15906
16348
  UNSTABLE_HeaderLogo.displayName = "UNSTABLE_HeaderLogo";
16349
+ const DEFAULT_SIZE = Sizes.MEDIUM;
16350
+ const PICKER_NESTED_SIZE_MAP = {
16351
+ [Sizes.SMALL]: SizesExtended.XSMALL,
16352
+ [Sizes.MEDIUM]: SizesExtended.SMALL,
16353
+ [Sizes.LARGE]: SizesExtended.MEDIUM
16354
+ };
16355
+ const PickerContext = React.createContext({ size: Sizes.MEDIUM });
16356
+ const PickerContextProvider = PickerContext.Provider;
16357
+ const usePickerContext = () => React.useContext(PickerContext);
16358
+ const defaultContext = {
16359
+ id: "",
16360
+ isDisabled: false,
16361
+ onSelectionChange: () => {
16362
+ },
16363
+ selectedKeys: [],
16364
+ selectionMode: MULTIPLE_SELECTION_MODE
16365
+ };
16366
+ const PickerPopoverContext = React.createContext(defaultContext);
16367
+ const PickerPopoverContextProvider = PickerPopoverContext.Provider;
16368
+ const usePickerPopoverContext = () => React.useContext(PickerPopoverContext);
16369
+ const isPickerItem = (node2) => React.isValidElement(node2) && node2.type?.spiritComponent === "UNSTABLE_PickerItem";
16370
+ const normalizeWhitespace = (text) => text.replace(/\s+/g, " ").trim();
16371
+ const collectPickerItems = (children) => {
16372
+ const items = [];
16373
+ const traverse = (node2) => {
16374
+ React.Children.forEach(node2, (child) => {
16375
+ if (!React.isValidElement(child)) {
16376
+ return;
16377
+ }
16378
+ if (isPickerItem(child)) {
16379
+ items.push({
16380
+ label: child.props.children,
16381
+ value: child.props.value
16382
+ });
16383
+ return;
16384
+ }
16385
+ if (child.props?.children) {
16386
+ traverse(child.props.children);
16387
+ }
16388
+ });
16389
+ };
16390
+ traverse(children);
16391
+ return items;
16392
+ };
16393
+ const getPickerItemLabelMap = (items) => {
16394
+ const labelsMap = {};
16395
+ for (const item of items) {
16396
+ labelsMap[item.value] = item.label;
16397
+ }
16398
+ return labelsMap;
16399
+ };
16400
+ const getSelectedItems = (keys, labels) => keys.map((value) => ({
16401
+ label: labels[value] ?? value,
16402
+ value
16403
+ }));
16404
+ const getNodeText = (value) => {
16405
+ const collect = (node2) => {
16406
+ if (node2 == null || typeof node2 === "boolean") {
16407
+ return "";
16408
+ }
16409
+ if (typeof node2 === "string" || typeof node2 === "number") {
16410
+ return String(node2);
16411
+ }
16412
+ if (Array.isArray(node2)) {
16413
+ return node2.map(collect).filter(Boolean).join(" ");
16414
+ }
16415
+ if (React.isValidElement(node2)) {
16416
+ return collect(node2.props.children);
16417
+ }
16418
+ return "";
16419
+ };
16420
+ const text = collect(value);
16421
+ return normalizeWhitespace(text);
16422
+ };
16423
+ const getAggregatedTagLabel = (label, selectedItems) => {
16424
+ if (selectedItems.length > 1) {
16425
+ return `${label} (${selectedItems.length})`;
16426
+ }
16427
+ return selectedItems[0]?.label ?? label;
16428
+ };
16429
+ const getPickerSelectionGridKeyboardRowCount = (selectedItemCount, options) => {
16430
+ const { isAggregated } = options;
16431
+ if (selectedItemCount === 0) {
16432
+ return 0;
16433
+ }
16434
+ return isAggregated ? 1 : selectedItemCount;
16435
+ };
16436
+ const UNSTABLE_PickerTag = ({
16437
+ children,
16438
+ tagKeyboardProps,
16439
+ isDisabled,
16440
+ label,
16441
+ onRemove,
16442
+ removeLabel,
16443
+ ...restProps
16444
+ }) => {
16445
+ const { t } = useI18n();
16446
+ const { size: size2 = Sizes.MEDIUM, tagDescriptionId } = usePickerContext();
16447
+ const removeButtonAriaLabel = removeLabel ?? replaceTranslationParams(t("picker.removeItemLabel"), {
16448
+ itemLabel: getNodeText(label)
16449
+ });
16450
+ const tagKeyboardEventProps = React.useMemo(() => {
16451
+ if (isDisabled || !tagKeyboardProps) {
16452
+ return {};
16453
+ }
16454
+ return {
16455
+ onBlurCapture: tagKeyboardProps.onBlurCapture,
16456
+ onFocusCapture: tagKeyboardProps.onFocusCapture,
16457
+ onKeyDown: tagKeyboardProps.onKeyDown
16458
+ };
16459
+ }, [isDisabled, tagKeyboardProps]);
16460
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
16461
+ Tag,
16462
+ {
16463
+ ...restProps,
16464
+ color: "selected",
16465
+ elementType: "div",
16466
+ size: PICKER_NESTED_SIZE_MAP[size2],
16467
+ isDisabled,
16468
+ role: "row",
16469
+ tabIndex: isDisabled ? -1 : tagKeyboardProps?.tabIndex ?? 0,
16470
+ "aria-label": getNodeText(label),
16471
+ ...tagKeyboardEventProps,
16472
+ ...tagDescriptionId ? { "aria-describedby": tagDescriptionId } : {},
16473
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { role: "gridcell", "aria-colindex": 1, className: "d-contents", children: [
16474
+ children ?? /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: label }),
16475
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16476
+ ControlButton,
16477
+ {
16478
+ "aria-label": removeButtonAriaLabel,
16479
+ isDisabled,
16480
+ isSymmetrical: true,
16481
+ onClick: onRemove,
16482
+ size: PICKER_NESTED_SIZE_MAP[size2],
16483
+ ...tagKeyboardProps && { tabIndex: tagKeyboardProps.removeButtonTabIndex },
16484
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: "close" })
16485
+ }
16486
+ )
16487
+ ] })
16488
+ }
16489
+ );
16490
+ };
16491
+ UNSTABLE_PickerTag.spiritComponent = "UNSTABLE_PickerTag";
16492
+ const usePickerId = (id) => React.useMemo(() => {
16493
+ const pickerId = `picker-${id}`;
16494
+ return {
16495
+ pickerId,
16496
+ labelId: `${pickerId}-label`,
16497
+ popoverId: `${pickerId}-popover`,
16498
+ selectionId: `${pickerId}-selection`,
16499
+ tagDescriptionId: `${pickerId}-tag-description`
16500
+ };
16501
+ }, [id]);
16502
+ const PICKER_POPOVER_FOCUSABLE_SELECTOR = "input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href]";
16503
+ const getPickerPopoverFocusableElements = (container) => Array.from(container.querySelectorAll(PICKER_POPOVER_FOCUSABLE_SELECTOR));
16504
+ const usePickerPopoverTabOutToTrigger = ({
16505
+ isOpen,
16506
+ onClose,
16507
+ getLastPopoverFocusable
16508
+ }) => {
16509
+ const onPopoverKeyDownCapture = React.useCallback(
16510
+ (event) => {
16511
+ if (event.key !== "Tab" || event.shiftKey || !isOpen) {
16512
+ return;
16513
+ }
16514
+ const container = event.currentTarget;
16515
+ let lastFocusable = getLastPopoverFocusable?.() ?? null;
16516
+ if (!lastFocusable) {
16517
+ const focusables = getPickerPopoverFocusableElements(container);
16518
+ lastFocusable = focusables.length > 0 ? focusables[focusables.length - 1] : null;
16519
+ }
16520
+ const target = event.target instanceof Node ? event.target : null;
16521
+ const active = document.activeElement;
16522
+ if (!lastFocusable || target !== lastFocusable && active !== lastFocusable) {
16523
+ return;
16524
+ }
16525
+ event.preventDefault();
16526
+ onClose();
16527
+ },
16528
+ [getLastPopoverFocusable, isOpen, onClose]
16529
+ );
16530
+ return { onPopoverKeyDownCapture };
16531
+ };
16532
+ const focusTagRow = (selectionRef, rowIndex) => {
16533
+ if (!selectionRef?.current) {
16534
+ return;
16535
+ }
16536
+ const rows = selectionRef.current.querySelectorAll('[role="row"]');
16537
+ rows.item(rowIndex)?.focus();
16538
+ };
16539
+ const usePickerSelectionGridKeyboard = ({
16540
+ onRemoveAtIndex,
16541
+ selectionRef,
16542
+ tagCount,
16543
+ isPopoverOpen = false,
16544
+ isDisabled = false
16545
+ }) => {
16546
+ const [activeTagIndex, setActiveTagIndex] = React.useState(0);
16547
+ const [focusedRowIndex, setFocusedRowIndex] = React.useState(null);
16548
+ const prevTagCountRef = React.useRef(null);
16549
+ const pendingFocusRowRef = React.useRef(null);
16550
+ useIsomorphicLayoutEffect(() => {
16551
+ const previousCount = prevTagCountRef.current;
16552
+ if (previousCount === null) {
16553
+ prevTagCountRef.current = tagCount;
16554
+ if (tagCount > 0) {
16555
+ setActiveTagIndex(tagCount - 1);
16556
+ }
16557
+ return;
16558
+ }
16559
+ if (tagCount === 0) {
16560
+ prevTagCountRef.current = 0;
16561
+ return;
16562
+ }
16563
+ const lastRowIndex = tagCount - 1;
16564
+ const tagCountDifference = tagCount - previousCount;
16565
+ if (tagCountDifference > 0) {
16566
+ setActiveTagIndex(lastRowIndex);
16567
+ if (!isPopoverOpen) {
16568
+ pendingFocusRowRef.current = lastRowIndex;
16569
+ }
16570
+ } else if (tagCountDifference < 0) {
16571
+ setActiveTagIndex((current) => Math.min(current, lastRowIndex));
16572
+ }
16573
+ prevTagCountRef.current = tagCount;
16574
+ }, [isPopoverOpen, tagCount]);
16575
+ useIsomorphicLayoutEffect(() => {
16576
+ const rowIndex = pendingFocusRowRef.current;
16577
+ if (rowIndex === null || tagCount === 0 || isPopoverOpen) {
16578
+ return;
16579
+ }
16580
+ pendingFocusRowRef.current = null;
16581
+ focusTagRow(selectionRef, rowIndex);
16582
+ }, [activeTagIndex, isPopoverOpen, selectionRef, tagCount]);
16583
+ const removeAt = React.useCallback(
16584
+ (index2) => {
16585
+ const nextCount = tagCount - 1;
16586
+ if (nextCount > 0) {
16587
+ const nextActive = index2 < nextCount ? index2 : index2 - 1;
16588
+ setActiveTagIndex(nextActive);
16589
+ if (!isPopoverOpen) {
16590
+ pendingFocusRowRef.current = nextActive;
16591
+ }
16592
+ }
16593
+ setFocusedRowIndex(null);
16594
+ onRemoveAtIndex(index2);
16595
+ },
16596
+ [isPopoverOpen, onRemoveAtIndex, tagCount]
16597
+ );
16598
+ const getKeyboardGridRowProps = React.useCallback(
16599
+ (index2) => {
16600
+ if (isPopoverOpen || isDisabled) {
16601
+ return {
16602
+ tabIndex: -1,
16603
+ removeButtonTabIndex: -1,
16604
+ onFocusCapture: () => {
16605
+ },
16606
+ onBlurCapture: () => {
16607
+ },
16608
+ onKeyDown: () => {
16609
+ }
16610
+ };
16611
+ }
16612
+ return {
16613
+ tabIndex: index2 === activeTagIndex ? 0 : -1,
16614
+ removeButtonTabIndex: focusedRowIndex === index2 ? 0 : -1,
16615
+ onFocusCapture: () => {
16616
+ setActiveTagIndex(index2);
16617
+ setFocusedRowIndex(index2);
16618
+ },
16619
+ onBlurCapture: (event) => {
16620
+ if (!event.currentTarget.contains(event.relatedTarget)) {
16621
+ setFocusedRowIndex(null);
16622
+ }
16623
+ },
16624
+ onKeyDown: (event) => {
16625
+ if (tagCount === 0) {
16626
+ return;
16627
+ }
16628
+ if (event.key === "Delete" || event.key === "Backspace") {
16629
+ event.preventDefault();
16630
+ removeAt(index2);
16631
+ return;
16632
+ }
16633
+ let nextIndex = -1;
16634
+ switch (event.key) {
16635
+ case "ArrowRight":
16636
+ case "ArrowDown":
16637
+ nextIndex = (index2 + 1) % tagCount;
16638
+ break;
16639
+ case "ArrowLeft":
16640
+ case "ArrowUp":
16641
+ nextIndex = (index2 - 1 + tagCount) % tagCount;
16642
+ break;
16643
+ case "Home":
16644
+ nextIndex = 0;
16645
+ break;
16646
+ case "End":
16647
+ nextIndex = tagCount - 1;
16648
+ break;
16649
+ }
16650
+ if (nextIndex >= 0) {
16651
+ event.preventDefault();
16652
+ setActiveTagIndex(nextIndex);
16653
+ pendingFocusRowRef.current = nextIndex;
16654
+ }
16655
+ }
16656
+ };
16657
+ },
16658
+ [activeTagIndex, focusedRowIndex, isDisabled, isPopoverOpen, removeAt, tagCount]
16659
+ );
16660
+ return { getKeyboardGridRowProps, removeTagAtIndex: removeAt };
16661
+ };
16662
+ const usePickerStyleProps = (props) => {
16663
+ const { isDisabled, isFluid, isLabelHidden, isRequired, size: size2, validationState } = props;
16664
+ const pickerClass = useClassNamePrefix("UNSTABLE_Picker");
16665
+ const pickerDisabledClass = `${pickerClass}--disabled`;
16666
+ const pickerFluidClass = `${pickerClass}--fluid`;
16667
+ const pickerSizeClass = `${pickerClass}--${size2}`;
16668
+ const pickerValidationClass = `${pickerClass}--${validationState}`;
16669
+ const pickerLabelClass = `${pickerClass}__label`;
16670
+ const pickerLabelHiddenClass = `${pickerLabelClass}--hidden`;
16671
+ const pickerLabelRequiredClass = `${pickerLabelClass}--required`;
16672
+ const pickerInputContainerClass = `${pickerClass}__inputContainer`;
16673
+ const pickerSelectionClass = `${pickerClass}__selection`;
16674
+ const pickerSelectionEmptyClass = `${pickerClass}__selectionEmpty`;
16675
+ const pickerTriggerClass = `${pickerClass}__trigger`;
16676
+ const pickerHelperTextClass = `${pickerClass}__helperText`;
16677
+ const pickerValidationTextClass = `${pickerClass}__validationText`;
16678
+ return {
16679
+ classProps: {
16680
+ root: classNames(pickerClass, {
16681
+ [pickerDisabledClass]: isDisabled,
16682
+ [pickerFluidClass]: isFluid,
16683
+ [pickerSizeClass]: size2,
16684
+ [pickerValidationClass]: validationState
16685
+ }),
16686
+ label: classNames(pickerLabelClass, {
16687
+ [pickerLabelHiddenClass]: isLabelHidden,
16688
+ [pickerLabelRequiredClass]: isRequired
16689
+ }),
16690
+ inputContainer: pickerInputContainerClass,
16691
+ selection: pickerSelectionClass,
16692
+ selectionEmpty: pickerSelectionEmptyClass,
16693
+ trigger: pickerTriggerClass,
16694
+ helperText: pickerHelperTextClass,
16695
+ validationText: pickerValidationTextClass
16696
+ }
16697
+ };
16698
+ };
16699
+ const _UNSTABLE_Picker = (props, ref) => {
16700
+ const { t } = useI18n();
16701
+ const {
16702
+ "aria-describedby": ariaDescribedBy = "",
16703
+ addButtonLabel = t("picker.add"),
16704
+ children,
16705
+ closeButtonLabel = t("common.close"),
16706
+ emptySelectionLabel,
16707
+ helperText,
16708
+ id,
16709
+ isAggregated = false,
16710
+ isDisabled = false,
16711
+ isFluid = false,
16712
+ isLabelHidden = false,
16713
+ isOpen,
16714
+ isRequired = false,
16715
+ label,
16716
+ onSelectionChange,
16717
+ onToggle,
16718
+ removeAllLabel = t("picker.removeAll"),
16719
+ renderTags,
16720
+ selectedKeys,
16721
+ selectionAriaLabel = t("picker.selectionAriaLabel"),
16722
+ selectionMode = MULTIPLE_SELECTION_MODE,
16723
+ size: size2 = DEFAULT_SIZE,
16724
+ tagDescriptionText = t("picker.tagDescriptionText"),
16725
+ hasValidationIcon,
16726
+ validationState,
16727
+ validationText,
16728
+ ...restProps
16729
+ } = props;
16730
+ const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);
16731
+ const validationTextRole = useValidationTextRole({
16732
+ validationState,
16733
+ validationText
16734
+ });
16735
+ const { classProps } = usePickerStyleProps({
16736
+ isDisabled,
16737
+ isFluid,
16738
+ isLabelHidden,
16739
+ isRequired,
16740
+ size: size2,
16741
+ validationState
16742
+ });
16743
+ const { styleProps, props: transferProps } = useStyleProps(restProps);
16744
+ const { labelId, pickerId, popoverId, selectionId, tagDescriptionId } = usePickerId(id);
16745
+ const pickerItems = React.useMemo(() => collectPickerItems(children), [children]);
16746
+ const pickerItemLabels = React.useMemo(() => getPickerItemLabelMap(pickerItems), [pickerItems]);
16747
+ const selectedPickerKeys = React.useMemo(() => getSelectedKeys(selectedKeys, selectionMode), [selectedKeys, selectionMode]);
16748
+ const selectedPickerItems = React.useMemo(
16749
+ () => getSelectedItems(selectedPickerKeys, pickerItemLabels),
16750
+ [selectedPickerKeys, pickerItemLabels]
16751
+ );
16752
+ const removeItem = (key) => isSingleSelectionMode(selectionMode) ? onSelectionChange([]) : onSelectionChange(selectedKeys.filter((selectedKey) => selectedKey !== key));
16753
+ const removeAll = () => onSelectionChange([]);
16754
+ const selectionGridRef = React.useRef(null);
16755
+ const triggerRef = React.useRef(null);
16756
+ const close = React.useCallback(() => {
16757
+ if (!isOpen) {
16758
+ return;
16759
+ }
16760
+ onToggle();
16761
+ Promise.resolve().then(() => {
16762
+ triggerRef.current?.focus();
16763
+ });
16764
+ }, [isOpen, onToggle]);
16765
+ const { onPopoverKeyDownCapture } = usePickerPopoverTabOutToTrigger({
16766
+ isOpen,
16767
+ onClose: close
16768
+ });
16769
+ const selectionGridKeyboardRowCount = getPickerSelectionGridKeyboardRowCount(selectedPickerItems.length, {
16770
+ isAggregated
16771
+ });
16772
+ const { getKeyboardGridRowProps, removeTagAtIndex } = usePickerSelectionGridKeyboard({
16773
+ isDisabled,
16774
+ isPopoverOpen: isOpen,
16775
+ onRemoveAtIndex: (index2) => {
16776
+ if (isAggregated) {
16777
+ removeAll();
16778
+ } else {
16779
+ removeItem(selectedPickerItems[index2].value);
16780
+ }
16781
+ },
16782
+ selectionRef: selectionGridRef,
16783
+ tagCount: selectionGridKeyboardRowCount
16784
+ });
16785
+ const emptyLabel = emptySelectionLabel ? replaceTranslationParams(emptySelectionLabel, { label }) : label;
16786
+ const aggregatedTagLabel = getAggregatedTagLabel(label, selectedPickerItems);
16787
+ const selectionContent = (() => {
16788
+ if (!selectedPickerItems.length) {
16789
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": "true", className: classProps.selectionEmpty, children: emptyLabel });
16790
+ }
16791
+ if (renderTags) {
16792
+ return renderTags({
16793
+ getKeyboardGridRowProps,
16794
+ onRemove: removeItem,
16795
+ removeTagAtIndex
16796
+ });
16797
+ }
16798
+ if (isAggregated) {
16799
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
16800
+ UNSTABLE_PickerTag,
16801
+ {
16802
+ tagKeyboardProps: getKeyboardGridRowProps(0),
16803
+ isDisabled,
16804
+ label: aggregatedTagLabel,
16805
+ onRemove: () => removeTagAtIndex(0),
16806
+ removeLabel: removeAllLabel
16807
+ }
16808
+ );
16809
+ }
16810
+ return selectedPickerItems.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
16811
+ UNSTABLE_PickerTag,
16812
+ {
16813
+ tagKeyboardProps: getKeyboardGridRowProps(index2),
16814
+ isDisabled,
16815
+ label: item.label,
16816
+ onRemove: () => removeTagAtIndex(index2)
16817
+ },
16818
+ item.value
16819
+ ));
16820
+ })();
16821
+ const popoverContextValue = React.useMemo(
16822
+ () => ({
16823
+ id: pickerId,
16824
+ isDisabled,
16825
+ onSelectionChange,
16826
+ selectedKeys: selectedPickerKeys,
16827
+ selectionMode
16828
+ }),
16829
+ [selectedPickerKeys, isDisabled, onSelectionChange, pickerId, selectionMode]
16830
+ );
16831
+ React.useImperativeHandle(
16832
+ ref,
16833
+ () => ({
16834
+ close,
16835
+ selectedKeys
16836
+ }),
16837
+ [close, selectedKeys]
16838
+ );
16839
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(PickerContextProvider, { value: { size: size2, tagDescriptionId }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ...styleProps, className: classNames(classProps.root, styleProps.className), ...transferProps, children: [
16840
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { id: labelId, UNSAFE_className: classProps.label, elementType: "span", children: label }),
16841
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Dropdown, { id: popoverId, isOpen, onToggle, children: [
16842
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { role: "group", "aria-label": label, className: classProps.inputContainer, children: [
16843
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16844
+ "div",
16845
+ {
16846
+ ref: selectionGridRef,
16847
+ ...ariaDescribedByProp,
16848
+ id: selectionId,
16849
+ role: selectedPickerItems.length ? "grid" : "group",
16850
+ "aria-label": replaceTranslationParams(selectionAriaLabel, { label }),
16851
+ "aria-live": "off",
16852
+ "aria-atomic": false,
16853
+ "aria-relevant": "additions",
16854
+ className: classProps.selection,
16855
+ children: selectionContent
16856
+ }
16857
+ ),
16858
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(
16859
+ "button",
16860
+ {
16861
+ ref: triggerRef,
16862
+ type: "button",
16863
+ className: classProps.trigger,
16864
+ "aria-haspopup": "dialog",
16865
+ "aria-expanded": isOpen,
16866
+ "aria-controls": popoverId,
16867
+ onClick: onToggle,
16868
+ disabled: isDisabled,
16869
+ children: [
16870
+ /* @__PURE__ */ jsxRuntimeExports.jsx(VisuallyHidden, { children: isOpen ? closeButtonLabel : addButtonLabel }),
16871
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { name: `chevron-${isOpen ? "up" : "down"}`, boxSize: 20 })
16872
+ ]
16873
+ }
16874
+ )
16875
+ ] }),
16876
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16877
+ DropdownPopover,
16878
+ {
16879
+ "aria-labelledby": labelId,
16880
+ role: "dialog",
16881
+ "aria-modal": "true",
16882
+ onKeyDownCapture: onPopoverKeyDownCapture,
16883
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(PickerPopoverContextProvider, { value: popoverContextValue, children })
16884
+ }
16885
+ )
16886
+ ] }),
16887
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
16888
+ HelperText,
16889
+ {
16890
+ UNSAFE_className: classProps.helperText,
16891
+ id: `${pickerId}-helper-text`,
16892
+ registerAria: register,
16893
+ helperText
16894
+ }
16895
+ ),
16896
+ validationState && /* @__PURE__ */ jsxRuntimeExports.jsx(
16897
+ ValidationText,
16898
+ {
16899
+ UNSAFE_className: classProps.validationText,
16900
+ id: `${pickerId}-validation-text`,
16901
+ ...hasValidationIcon && { hasValidationStateIcon: validationState },
16902
+ validationText,
16903
+ registerAria: register,
16904
+ role: validationTextRole
16905
+ }
16906
+ ),
16907
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: tagDescriptionId, hidden: true, children: tagDescriptionText })
16908
+ ] }) });
16909
+ };
16910
+ const UNSTABLE_Picker = React.forwardRef(
16911
+ _UNSTABLE_Picker
16912
+ );
16913
+ UNSTABLE_Picker.spiritComponent = "UNSTABLE_Picker";
16914
+ UNSTABLE_Picker.displayName = "UNSTABLE_Picker";
16915
+ const UNSTABLE_PickerGroup = ({ children, label, ...restProps }) => {
16916
+ const pickerPopoverContext = usePickerPopoverContext();
16917
+ const generatedId = React.useId();
16918
+ const id = pickerPopoverContext.id ? `${pickerPopoverContext.id}-group-${generatedId}` : generatedId;
16919
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(FieldGroup, { ...restProps, id, isFluid: true, isLabelHidden: true, label, children });
16920
+ };
16921
+ UNSTABLE_PickerGroup.spiritComponent = "UNSTABLE_PickerGroup";
16922
+ const UNSTABLE_PickerItem = ({ children, value, ...restProps }) => {
16923
+ const { id, isDisabled, onSelectionChange, selectedKeys, selectionMode } = usePickerPopoverContext();
16924
+ const isChecked = isKeySelected(selectedKeys, value, selectionMode);
16925
+ const single = isSingleSelectionMode(selectionMode);
16926
+ const InputComponent = single ? Radio : Checkbox;
16927
+ const inputId = `${id}-${value}`;
16928
+ const handleChange = () => {
16929
+ onSelectionChange(single ? [value] : getToggledSelectedKeys(selectedKeys, value, selectionMode));
16930
+ };
16931
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
16932
+ InputComponent,
16933
+ {
16934
+ ...restProps,
16935
+ id: inputId,
16936
+ inputPosition: InputPositions.START,
16937
+ isChecked,
16938
+ isDisabled,
16939
+ isItem: true,
16940
+ label: children,
16941
+ value,
16942
+ onChange: handleChange,
16943
+ ...single ? { name: id } : {}
16944
+ }
16945
+ );
16946
+ };
16947
+ UNSTABLE_PickerItem.spiritComponent = "UNSTABLE_PickerItem";
16948
+ const _UNSTABLE_UncontrolledPicker = (props, ref) => {
16949
+ const { defaultIsOpen = false, defaultSelectedKeys = [], onSelectionChange, selectionMode, ...restProps } = props;
16950
+ const pickerRef = React.useRef(null);
16951
+ const [isOpen, onToggle] = useToggle(defaultIsOpen);
16952
+ const { selectedKeys, setSelectedKeys } = useSelectionState({
16953
+ defaultSelectedKeys,
16954
+ onSelectionChange,
16955
+ selectionMode
16956
+ });
16957
+ React.useImperativeHandle(
16958
+ ref,
16959
+ () => ({
16960
+ close: () => pickerRef.current?.close(),
16961
+ selectedKeys
16962
+ }),
16963
+ [selectedKeys]
16964
+ );
16965
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
16966
+ UNSTABLE_Picker,
16967
+ {
16968
+ ...restProps,
16969
+ ref: pickerRef,
16970
+ isOpen,
16971
+ onSelectionChange: setSelectedKeys,
16972
+ onToggle,
16973
+ selectedKeys,
16974
+ selectionMode
16975
+ }
16976
+ );
16977
+ };
16978
+ const UNSTABLE_UncontrolledPicker = React.forwardRef(
16979
+ _UNSTABLE_UncontrolledPicker
16980
+ );
16981
+ UNSTABLE_UncontrolledPicker.spiritComponent = "UNSTABLE_UncontrolledPicker";
16982
+ UNSTABLE_UncontrolledPicker.displayName = "UNSTABLE_UncontrolledPicker";
15907
16983
  exports2.Accordion = Accordion;
15908
16984
  exports2.AccordionContent = AccordionContent;
15909
16985
  exports2.AccordionContext = AccordionContext;
@@ -15917,7 +16993,6 @@
15917
16993
  exports2.AlignmentY = AlignmentY;
15918
16994
  exports2.AlignmentYExtended = AlignmentYExtended;
15919
16995
  exports2.AttachmentActionButton = AttachmentActionButton;
15920
- exports2.AttachmentCropCSS = AttachmentCropCSS;
15921
16996
  exports2.AttachmentDismissButton = AttachmentDismissButton;
15922
16997
  exports2.Avatar = Avatar;
15923
16998
  exports2.BREAKPOINT_MOBILE = BREAKPOINT_MOBILE;
@@ -15945,6 +17020,7 @@
15945
17020
  exports2.CardMedia = CardMedia;
15946
17021
  exports2.CardSizes = CardSizes;
15947
17022
  exports2.CardTitle = CardTitle;
17023
+ exports2.CharacterCounter = CharacterCounter;
15948
17024
  exports2.Checkbox = Checkbox;
15949
17025
  exports2.ClassNamePrefixConsumer = ClassNamePrefixConsumer;
15950
17026
  exports2.ClassNamePrefixProvider = ClassNamePrefixProvider;
@@ -15955,13 +17031,13 @@
15955
17031
  exports2.ContainerTokenSizes = ContainerTokenSizes;
15956
17032
  exports2.ControlButton = ControlButton;
15957
17033
  exports2.DEBOUNCE_DELAY = DEBOUNCE_DELAY;
15958
- exports2.DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME = DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME;
15959
- exports2.DEFAULT_ATTACHMENT_ICON_NAME = DEFAULT_ATTACHMENT_ICON_NAME;
15960
- exports2.DEFAULT_ATTACHMENT_IMAGE_DIMENSION = DEFAULT_ATTACHMENT_IMAGE_DIMENSION;
15961
17034
  exports2.DEFAULT_ERROR_MESSAGE_MAX_FILE_SIZE = DEFAULT_ERROR_MESSAGE_MAX_FILE_SIZE;
15962
17035
  exports2.DEFAULT_ERROR_MESSAGE_QUEUE_DUPLICITY = DEFAULT_ERROR_MESSAGE_QUEUE_DUPLICITY;
15963
17036
  exports2.DEFAULT_ERROR_MESSAGE_QUEUE_LIMIT = DEFAULT_ERROR_MESSAGE_QUEUE_LIMIT;
15964
17037
  exports2.DEFAULT_ERROR_MESSAGE_UNSUPPORTED_FILE = DEFAULT_ERROR_MESSAGE_UNSUPPORTED_FILE;
17038
+ exports2.DEFAULT_FILE_ACTION_BUTTON_ICON_NAME = DEFAULT_FILE_ACTION_BUTTON_ICON_NAME;
17039
+ exports2.DEFAULT_FILE_ICON_NAME = DEFAULT_FILE_ICON_NAME;
17040
+ exports2.DEFAULT_FILE_IMAGE_DIMENSION = DEFAULT_FILE_IMAGE_DIMENSION;
15965
17041
  exports2.DEFAULT_FILE_QUEUE_LIMIT = DEFAULT_FILE_QUEUE_LIMIT;
15966
17042
  exports2.DEFAULT_FILE_SIZE_LIMIT = DEFAULT_FILE_SIZE_LIMIT;
15967
17043
  exports2.DEFAULT_ICON_NAME = DEFAULT_ICON_NAME;
@@ -15989,6 +17065,7 @@
15989
17065
  exports2.EmptyState = EmptyState;
15990
17066
  exports2.EmptyStateSection = EmptyStateSection;
15991
17067
  exports2.FieldGroup = FieldGroup;
17068
+ exports2.FileImageCropCSS = FileImageCropCSS;
15992
17069
  exports2.FileUploader = FileUploader;
15993
17070
  exports2.FileUploaderAttachment = FileUploaderAttachment;
15994
17071
  exports2.FileUploaderCropCSS = FileUploaderCropCSS;
@@ -16034,6 +17111,7 @@
16034
17111
  exports2.IconBox = IconBox;
16035
17112
  exports2.IconsConsumer = IconsConsumer;
16036
17113
  exports2.IconsProvider = IconsProvider;
17114
+ exports2.InputDetails = InputDetails;
16037
17115
  exports2.InputPositions = InputPositions;
16038
17116
  exports2.Intensity = Intensity;
16039
17117
  exports2.Item = Item;
@@ -16041,6 +17119,7 @@
16041
17119
  exports2.Link = Link;
16042
17120
  exports2.LinkColors = LinkColors;
16043
17121
  exports2.LinkColorsExtended = LinkColorsExtended;
17122
+ exports2.MULTIPLE_SELECTION_MODE = MULTIPLE_SELECTION_MODE;
16044
17123
  exports2.Matrix = Matrix;
16045
17124
  exports2.Modal = Modal;
16046
17125
  exports2.ModalBody = ModalBody;
@@ -16056,6 +17135,7 @@
16056
17135
  exports2.NavigationItem = NavigationItem;
16057
17136
  exports2.NoSsr = NoSsr;
16058
17137
  exports2.ObjectFit = ObjectFit;
17138
+ exports2.PICKER_POPOVER_FOCUSABLE_SELECTOR = PICKER_POPOVER_FOCUSABLE_SELECTOR;
16059
17139
  exports2.PaddingStyleProps = PaddingStyleProps;
16060
17140
  exports2.Pagination = Pagination;
16061
17141
  exports2.PaginationButtonLink = PaginationButtonLink;
@@ -16064,6 +17144,7 @@
16064
17144
  exports2.PaginationLinkNext = PaginationLinkNext;
16065
17145
  exports2.PaginationLinkPrevious = PaginationLinkPrevious;
16066
17146
  exports2.PartnerLogo = PartnerLogo;
17147
+ exports2.PickerPopoverContextProvider = PickerPopoverContextProvider;
16067
17148
  exports2.Pill = Pill;
16068
17149
  exports2.PillColorsExtended = PillColorsExtended;
16069
17150
  exports2.Placements = Placements;
@@ -16076,6 +17157,8 @@
16076
17157
  exports2.PropsConsumer = PropsConsumer;
16077
17158
  exports2.PropsProvider = PropsProvider;
16078
17159
  exports2.Radio = Radio;
17160
+ exports2.RouterConsumer = RouterConsumer;
17161
+ exports2.RouterProvider = RouterProvider;
16079
17162
  exports2.SCROLL_CANCEL_DELAY = SCROLL_CANCEL_DELAY;
16080
17163
  exports2.SCROLL_VIEW_ARROWS_LABEL_HORIZONTAL_END = SCROLL_VIEW_ARROWS_LABEL_HORIZONTAL_END;
16081
17164
  exports2.SCROLL_VIEW_ARROWS_LABEL_HORIZONTAL_START = SCROLL_VIEW_ARROWS_LABEL_HORIZONTAL_START;
@@ -16083,6 +17166,7 @@
16083
17166
  exports2.SCROLL_VIEW_ARROWS_LABEL_VERTICAL_START = SCROLL_VIEW_ARROWS_LABEL_VERTICAL_START;
16084
17167
  exports2.SCROLL_VIEW_DEFAULT_DIRECTION = SCROLL_VIEW_DEFAULT_DIRECTION;
16085
17168
  exports2.SCROLL_VIEW_DEFAULT_OVERFLOW_DECORATOR = SCROLL_VIEW_DEFAULT_OVERFLOW_DECORATOR;
17169
+ exports2.SINGLE_SELECTION_MODE = SINGLE_SELECTION_MODE;
16086
17170
  exports2.STYLE_SPACING_AUTO = STYLE_SPACING_AUTO;
16087
17171
  exports2.ScrollView = ScrollView;
16088
17172
  exports2.ScrollViewArrows = ScrollViewArrows;
@@ -16147,13 +17231,16 @@
16147
17231
  exports2.Truncate = Truncate;
16148
17232
  exports2.TruncateModes = TruncateModes;
16149
17233
  exports2.UNDERLINED_OPTIONS = UNDERLINED_OPTIONS;
16150
- exports2.UNSTABLE_Attachment = UNSTABLE_Attachment;
16151
- exports2.UNSTABLE_AttachmentActionButton = UNSTABLE_AttachmentActionButton;
16152
- exports2.UNSTABLE_AttachmentDismissButton = UNSTABLE_AttachmentDismissButton;
16153
- exports2.UNSTABLE_AttachmentImagePreview = UNSTABLE_AttachmentImagePreview;
17234
+ exports2.UNSTABLE_File = UNSTABLE_File;
17235
+ exports2.UNSTABLE_FileImagePreview = UNSTABLE_FileImagePreview;
16154
17236
  exports2.UNSTABLE_FileUpload = UNSTABLE_FileUpload;
16155
17237
  exports2.UNSTABLE_Header = UNSTABLE_Header;
16156
17238
  exports2.UNSTABLE_HeaderLogo = UNSTABLE_HeaderLogo;
17239
+ exports2.UNSTABLE_Picker = UNSTABLE_Picker;
17240
+ exports2.UNSTABLE_PickerGroup = UNSTABLE_PickerGroup;
17241
+ exports2.UNSTABLE_PickerItem = UNSTABLE_PickerItem;
17242
+ exports2.UNSTABLE_PickerTag = UNSTABLE_PickerTag;
17243
+ exports2.UNSTABLE_UncontrolledPicker = UNSTABLE_UncontrolledPicker;
16157
17244
  exports2.UncontrolledAccordion = UncontrolledAccordion;
16158
17245
  exports2.UncontrolledCollapse = UncontrolledCollapse;
16159
17246
  exports2.UncontrolledDropdown = UncontrolledDropdown;
@@ -16194,7 +17281,11 @@
16194
17281
  exports2.getEmotionTextColors = getEmotionTextColors;
16195
17282
  exports2.getNeutralBackgroundColors = getNeutralBackgroundColors;
16196
17283
  exports2.getNeutralTextColors = getNeutralTextColors;
17284
+ exports2.getPickerPopoverFocusableElements = getPickerPopoverFocusableElements;
17285
+ exports2.getSelectedKeys = getSelectedKeys;
16197
17286
  exports2.getTextColorNames = getTextColorNames;
17287
+ exports2.getToggledSelectedKeys = getToggledSelectedKeys;
17288
+ exports2.handleLinkClick = handleLinkClick;
16198
17289
  exports2.htmlReactParser = htmlReactParser;
16199
17290
  exports2.image2Base64Preview = image2Base64Preview;
16200
17291
  exports2.isDirectionHorizontal = isDirectionHorizontal;
@@ -16203,12 +17294,15 @@
16203
17294
  exports2.isEmptyObject = isEmptyObject;
16204
17295
  exports2.isEmptyString = isEmptyString;
16205
17296
  exports2.isEnumerable = isEnumerable;
17297
+ exports2.isKeySelected = isKeySelected;
16206
17298
  exports2.isNullish = isNullish;
16207
17299
  exports2.isResponsive = isResponsive;
16208
17300
  exports2.isSSR = isSSR;
17301
+ exports2.isSingleSelectionMode = isSingleSelectionMode;
16209
17302
  exports2.kebabCaseToCamelCase = kebabCaseToCamelCase;
16210
17303
  exports2.kebabCaseToCamelCaseValues = kebabCaseToCamelCaseValues;
16211
17304
  exports2.mergeStyleProps = mergeStyleProps;
17305
+ exports2.normalizeStringValue = normalizeStringValue;
16212
17306
  exports2.replaceTranslationParams = replaceTranslationParams;
16213
17307
  exports2.resolveTranslationKey = resolveTranslationKey;
16214
17308
  exports2.stringOrObjectKebabCaseToCamelCase = stringOrObjectKebabCaseToCamelCase;
@@ -16222,9 +17316,8 @@
16222
17316
  exports2.useAlertStyleProps = useAlertStyleProps;
16223
17317
  exports2.useAlignmentClass = useAlignmentClass;
16224
17318
  exports2.useAriaDescribedBy = useAriaDescribedBy;
16225
- exports2.useAriaIds = useAriaIds;
16226
- exports2.useAttachmentImageStyles = useAttachmentImageStyles;
16227
- exports2.useAttachmentStyleProps = useAttachmentStyleProps;
17319
+ exports2.useAriaDetails = useAriaDetails;
17320
+ exports2.useAriaIdRefs = useAriaIdRefs;
16228
17321
  exports2.useAvatarStyleProps = useAvatarStyleProps;
16229
17322
  exports2.useBoxStyleProps = useBoxStyleProps;
16230
17323
  exports2.useBreadcrumbsStyleProps = useBreadcrumbsStyleProps;
@@ -16234,6 +17327,7 @@
16234
17327
  exports2.useButtonStyleProps = useButtonStyleProps;
16235
17328
  exports2.useCancelEvent = useCancelEvent;
16236
17329
  exports2.useCardStyleProps = useCardStyleProps;
17330
+ exports2.useCharacterCounterState = useCharacterCounterState;
16237
17331
  exports2.useCheckboxStyleProps = useCheckboxStyleProps;
16238
17332
  exports2.useClassNamePrefix = useClassNamePrefix;
16239
17333
  exports2.useClick = useClick$1;
@@ -16245,6 +17339,8 @@
16245
17339
  exports2.useContextProps = useContextProps;
16246
17340
  exports2.useControlButtonProps = useControlButtonProps;
16247
17341
  exports2.useControlButtonStyleProps = useControlButtonStyleProps;
17342
+ exports2.useControlledModeGuard = useControlledModeGuard;
17343
+ exports2.useDebouncedValue = useDebouncedValue;
16248
17344
  exports2.useDefaultResponsiveRowsStyle = useDefaultResponsiveRowsStyle;
16249
17345
  exports2.useDeprecationMessage = useDeprecationMessage;
16250
17346
  exports2.useDialog = useDialog;
@@ -16257,7 +17353,9 @@
16257
17353
  exports2.useDropdownAriaProps = useDropdownAriaProps;
16258
17354
  exports2.useDropdownStyleProps = useDropdownStyleProps;
16259
17355
  exports2.useEmptyStateStyleProps = useEmptyStateStyleProps;
17356
+ exports2.useFileImageStyles = useFileImageStyles;
16260
17357
  exports2.useFileQueue = useFileQueue;
17358
+ exports2.useFileStyleProps = useFileStyleProps;
16261
17359
  exports2.useFileUploadState = useFileUploadState;
16262
17360
  exports2.useFileUploadStyleProps = useFileUploadStyleProps;
16263
17361
  exports2.useFileUploaderAttachment = useFileUploaderAttachment;
@@ -16274,10 +17372,12 @@
16274
17372
  exports2.useIconBoxStyleProps = useIconBoxStyleProps;
16275
17373
  exports2.useIconName = useIconName;
16276
17374
  exports2.useIconStyleProps = useIconStyleProps;
17375
+ exports2.useInputDetailsStyleProps = useInputDetailsStyleProps;
16277
17376
  exports2.useInputPositionClass = useInputPositionClass;
16278
17377
  exports2.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
16279
17378
  exports2.useItemStyleProps = useItemStyleProps;
16280
17379
  exports2.useLastActiveFocus = useLastActiveFocus;
17380
+ exports2.useLinkClick = useLinkClick;
16281
17381
  exports2.useLinkStyleProps = useLinkStyleProps;
16282
17382
  exports2.useMatrixStyleProps = useMatrixStyleProps;
16283
17383
  exports2.useModalContext = useModalContext;
@@ -16287,10 +17387,16 @@
16287
17387
  exports2.useOpenItem = useOpenItem;
16288
17388
  exports2.usePaginationStyleProps = usePaginationStyleProps;
16289
17389
  exports2.usePartnerLogoStyleProps = usePartnerLogoStyleProps;
17390
+ exports2.usePickerId = usePickerId;
17391
+ exports2.usePickerPopoverContext = usePickerPopoverContext;
17392
+ exports2.usePickerPopoverTabOutToTrigger = usePickerPopoverTabOutToTrigger;
17393
+ exports2.usePickerSelectionGridKeyboard = usePickerSelectionGridKeyboard;
17394
+ exports2.usePickerStyleProps = usePickerStyleProps;
16290
17395
  exports2.usePillStyleProps = usePillStyleProps;
16291
17396
  exports2.usePricingPlanStyleProps = usePricingPlanStyleProps;
16292
17397
  exports2.useRadioStyleProps = useRadioStyleProps;
16293
17398
  exports2.useResizeObserver = useResizeObserver;
17399
+ exports2.useRouter = useRouter;
16294
17400
  exports2.useScrollCallback = useScrollCallback;
16295
17401
  exports2.useScrollControl = useScrollControl;
16296
17402
  exports2.useScrollPosition = useScrollPosition;
@@ -16301,6 +17407,7 @@
16301
17407
  exports2.useSegmentedControl = useSegmentedControl;
16302
17408
  exports2.useSegmentedControlStyleProps = useSegmentedControlStyleProps;
16303
17409
  exports2.useSelectStyleProps = useSelectStyleProps;
17410
+ exports2.useSelectionState = useSelectionState;
16304
17411
  exports2.useSkeletonStyleProps = useSkeletonStyleProps;
16305
17412
  exports2.useSkipLinkStyleProps = useSkipLinkStyleProps;
16306
17413
  exports2.useSliderStyleProps = useSliderStyleProps;