@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
@@ -1,54 +1,57 @@
1
1
  import { isEmpty as r, isEmptyArray as t, isEmptyObject as s, isEmptyString as a, isEnumerable as l, isNullish as m } from "./assert.js";
2
- import { applyClassNamePrefix as C, applyColor as n, applySize as c, applyTheme as g } from "./classname.js";
3
- import { generateColorsObject as x, getAccentBackgroundColors as b, getAccentBorderColors as f, getAccentColorNames as y, getAccentTextColors as u, getEmotionBackgroundColors as E, getEmotionBorderColors as N, getEmotionColorNames as S, getEmotionTextColors as T, getNeutralBackgroundColors as d, getNeutralTextColors as P, getTextColorNames as k } from "./colorObjectGenerators.js";
2
+ import { applyClassNamePrefix as C, applyColor as n, applySize as i, applyTheme as c } from "./classname.js";
3
+ import { generateColorsObject as x, getAccentBackgroundColors as f, getAccentBorderColors as b, getAccentColorNames as y, getAccentTextColors as u, getEmotionBackgroundColors as S, getEmotionBorderColors as d, getEmotionColorNames as E, getEmotionTextColors as N, getNeutralBackgroundColors as T, getNeutralTextColors as k, getTextColorNames as P } from "./colorObjectGenerators.js";
4
4
  import { compose as B } from "./compose.js";
5
- import { debounce as O } from "./debounce.js";
5
+ import { debounce as h } from "./debounce.js";
6
6
  import { delayedCallback as j } from "./delayedCallback.js";
7
- import { htmlReactParser as K } from "./htmlReactParser.js";
7
+ import { htmlReactParser as z } from "./htmlReactParser.js";
8
8
  import { mergeStyleProps as V } from "./mergeStyleProps.js";
9
- import { generateResponsiveClassNames as w, isResponsive as D } from "./responsive.js";
10
- import { isSSR as G } from "./ssr.js";
11
- import { camelCaseToKebabCase as I, kebabCaseToCamelCase as J, kebabCaseToCamelCaseValues as L, stringOrObjectKebabCaseToCamelCase as M } from "./string.js";
12
- import { generateResponsiveStylePropsClasses as U, generateStaticStylePropsClasses as W, generateStylePropsClassNames as X } from "./stylePropsClassesGenerator.js";
13
- import { toPascalCase as Z } from "./toPascalCase.js";
9
+ import { handleLinkClick as q } from "./router.js";
10
+ import { generateResponsiveClassNames as D, isResponsive as F } from "./responsive.js";
11
+ import { isSSR as H } from "./ssr.js";
12
+ import { camelCaseToKebabCase as J, kebabCaseToCamelCase as M, kebabCaseToCamelCaseValues as Q, normalizeStringValue as U, stringOrObjectKebabCaseToCamelCase as W } from "./string.js";
13
+ import { generateResponsiveStylePropsClasses as Y, generateStaticStylePropsClasses as Z, generateStylePropsClassNames as _ } from "./stylePropsClassesGenerator.js";
14
+ import { toPascalCase as ee } from "./toPascalCase.js";
14
15
  export {
15
16
  C as applyClassNamePrefix,
16
17
  n as applyColor,
17
- c as applySize,
18
- g as applyTheme,
19
- I as camelCaseToKebabCase,
18
+ i as applySize,
19
+ c as applyTheme,
20
+ J as camelCaseToKebabCase,
20
21
  B as compose,
21
- O as debounce,
22
+ h as debounce,
22
23
  j as delayedCallback,
23
24
  x as generateColorsObject,
24
- w as generateResponsiveClassNames,
25
- U as generateResponsiveStylePropsClasses,
26
- W as generateStaticStylePropsClasses,
27
- X as generateStylePropsClassNames,
28
- b as getAccentBackgroundColors,
29
- f as getAccentBorderColors,
25
+ D as generateResponsiveClassNames,
26
+ Y as generateResponsiveStylePropsClasses,
27
+ Z as generateStaticStylePropsClasses,
28
+ _ as generateStylePropsClassNames,
29
+ f as getAccentBackgroundColors,
30
+ b as getAccentBorderColors,
30
31
  y as getAccentColorNames,
31
32
  u as getAccentTextColors,
32
- E as getEmotionBackgroundColors,
33
- N as getEmotionBorderColors,
34
- S as getEmotionColorNames,
35
- T as getEmotionTextColors,
36
- d as getNeutralBackgroundColors,
37
- P as getNeutralTextColors,
38
- k as getTextColorNames,
39
- K as htmlReactParser,
33
+ S as getEmotionBackgroundColors,
34
+ d as getEmotionBorderColors,
35
+ E as getEmotionColorNames,
36
+ N as getEmotionTextColors,
37
+ T as getNeutralBackgroundColors,
38
+ k as getNeutralTextColors,
39
+ P as getTextColorNames,
40
+ q as handleLinkClick,
41
+ z as htmlReactParser,
40
42
  r as isEmpty,
41
43
  t as isEmptyArray,
42
44
  s as isEmptyObject,
43
45
  a as isEmptyString,
44
46
  l as isEnumerable,
45
47
  m as isNullish,
46
- D as isResponsive,
47
- G as isSSR,
48
- J as kebabCaseToCamelCase,
49
- L as kebabCaseToCamelCaseValues,
48
+ F as isResponsive,
49
+ H as isSSR,
50
+ M as kebabCaseToCamelCase,
51
+ Q as kebabCaseToCamelCaseValues,
50
52
  V as mergeStyleProps,
51
- M as stringOrObjectKebabCaseToCamelCase,
52
- Z as toPascalCase
53
+ U as normalizeStringValue,
54
+ W as stringOrObjectKebabCaseToCamelCase,
55
+ ee as toPascalCase
53
56
  };
54
57
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=t=>t.trim().startsWith("//"),h=t=>/^[a-z][a-z0-9+.-]*:/i.test(t.trim()),d=t=>h(t)||f(t),y=t=>t.trim().startsWith("#"),k=t=>typeof t=="string"&&t.toLowerCase()!=="_self",g=t=>t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||typeof t.button=="number"&&t.button!==0,b=t=>{const{router:e,routerOptions:n,href:o,target:a,download:s,onClick:i,isDisabled:l}=t,c=typeof o=="string"&&d(o),u=typeof o=="string"&&y(o);return!!(e&&o&&!l&&!(s===!0||typeof s=="string")&&!k(a)&&!c&&!u)?r=>{r.defaultPrevented||(i?.(r),!(g(r)||r.defaultPrevented)&&(r.preventDefault(),e?.navigate(String(o),n)))}:i};exports.handleLinkClick=b;
2
+ //# sourceMappingURL=router.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.cjs","sources":["../../src/utils/router.ts"],"sourcesContent":["import { type MouseEvent, type MouseEventHandler } from 'react';\nimport { type RouterContextType } from '../context/RouterContext';\n\nconst isProtocolRelativeUrl = (href: string): boolean => href.trim().startsWith('//');\nconst hasNonPathUrlScheme = (href: string): boolean => /^[a-z][a-z0-9+.-]*:/i.test(href.trim());\nconst isExternalOrNonPathHref = (href: string): boolean => hasNonPathUrlScheme(href) || isProtocolRelativeUrl(href);\nconst isHashOnlyHref = (href: string): boolean => href.trim().startsWith('#');\nconst shouldDeferToBrowserForTarget = (target?: string): boolean =>\n typeof target === 'string' && target.toLowerCase() !== '_self';\n\nconst shouldDeferToBrowserForLinkClick = (\n event: Pick<MouseEvent, 'metaKey' | 'ctrlKey' | 'shiftKey' | 'altKey' | 'button'>,\n): boolean =>\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey ||\n (typeof event.button === 'number' && event.button !== 0);\n\nexport type HandleLinkClickOptions = {\n router: RouterContextType;\n routerOptions?: Record<string, unknown>;\n href?: string;\n target?: string;\n download?: string | boolean;\n onClick?: MouseEventHandler;\n isDisabled?: boolean;\n};\n\n/**\n * Creates click handler for link-like components integrated with RouterProvider.\n * Returns original `onClick` when router navigation should not be used\n * (e.g. missing router/href, disabled state, URL with a dedicated scheme such as\n * `https:` or `mailto:`, protocol-relative URL, hash-only URL, non-`_self`\n * target, `download` links, or modified / non-primary clicks).\n * If router navigation is applicable, the returned handler invokes `onClick` and\n * only navigates when the event is not prevented. If another handler already set\n * `event.defaultPrevented` before this handler runs, it exits early without\n * invoking `onClick` or navigating.\n *\n * @param {HandleLinkClickOptions} options Handler options object.\n * @param {RouterContextType} options.router Router context used for navigation.\n * @param {Record<string, unknown>} [options.routerOptions] Extra options for router navigation.\n * @param {string} [options.href] Link target URL.\n * @param {string} [options.target] HTML link target.\n * @param {string | boolean} [options.download] HTML link download attribute.\n * @param {MouseEventHandler} [options.onClick] Original click handler.\n * @param {boolean} [options.isDisabled] Whether the link is disabled.\n */\nexport const handleLinkClick = (options: HandleLinkClickOptions): MouseEventHandler | undefined => {\n const { router, routerOptions, href, target, download, onClick: onNativeClick, isDisabled } = options;\n const isNonPathHref = typeof href === 'string' && isExternalOrNonPathHref(href);\n const isHashHref = typeof href === 'string' && isHashOnlyHref(href);\n const hasDownloadAttribute = download === true || typeof download === 'string';\n const shouldUseRouter = Boolean(\n router &&\n href &&\n !isDisabled &&\n !hasDownloadAttribute &&\n !shouldDeferToBrowserForTarget(target) &&\n !isNonPathHref &&\n !isHashHref,\n );\n\n const onRouterClick: MouseEventHandler = (event) => {\n if (event.defaultPrevented) {\n return;\n }\n\n onNativeClick?.(event);\n\n if (shouldDeferToBrowserForLinkClick(event) || event.defaultPrevented) {\n return;\n }\n\n event.preventDefault();\n router?.navigate(String(href), routerOptions);\n };\n\n return shouldUseRouter ? onRouterClick : onNativeClick;\n};\n"],"names":["isProtocolRelativeUrl","href","hasNonPathUrlScheme","isExternalOrNonPathHref","isHashOnlyHref","shouldDeferToBrowserForTarget","target","shouldDeferToBrowserForLinkClick","event","handleLinkClick","options","router","routerOptions","download","onNativeClick","isDisabled","isNonPathHref","isHashHref"],"mappings":"gFAGA,MAAMA,EAAyBC,GAA0BA,EAAK,KAAA,EAAO,WAAW,IAAI,EAC9EC,EAAuBD,GAA0B,uBAAuB,KAAKA,EAAK,MAAM,EACxFE,EAA2BF,GAA0BC,EAAoBD,CAAI,GAAKD,EAAsBC,CAAI,EAC5GG,EAAkBH,GAA0BA,EAAK,KAAA,EAAO,WAAW,GAAG,EACtEI,EAAiCC,GACrC,OAAOA,GAAW,UAAYA,EAAO,gBAAkB,QAEnDC,EACJC,GAEAA,EAAM,SACNA,EAAM,SACNA,EAAM,UACNA,EAAM,QACL,OAAOA,EAAM,QAAW,UAAYA,EAAM,SAAW,EAgC3CC,EAAmBC,GAAmE,CACjG,KAAM,CAAE,OAAAC,EAAQ,cAAAC,EAAe,KAAAX,EAAM,OAAAK,EAAQ,SAAAO,EAAU,QAASC,EAAe,WAAAC,CAAA,EAAeL,EACxFM,EAAgB,OAAOf,GAAS,UAAYE,EAAwBF,CAAI,EACxEgB,EAAa,OAAOhB,GAAS,UAAYG,EAAeH,CAAI,EA2BlE,MAzBwB,GACtBU,GACAV,GACA,CAACc,GACD,EAL2BF,IAAa,IAAQ,OAAOA,GAAa,WAMpE,CAACR,EAA8BC,CAAM,GACrC,CAACU,GACD,CAACC,GAGuCT,GAAU,CAC9CA,EAAM,mBAIVM,IAAgBN,CAAK,EAEjB,EAAAD,EAAiCC,CAAK,GAAKA,EAAM,oBAIrDA,EAAM,eAAA,EACNG,GAAQ,SAAS,OAAOV,CAAI,EAAGW,CAAa,GAC9C,EAEyCE,CAC3C"}
@@ -0,0 +1,12 @@
1
+ import { MouseEventHandler } from 'react';
2
+ import { RouterContextType } from '../context/RouterContext';
3
+ export type HandleLinkClickOptions = {
4
+ router: RouterContextType;
5
+ routerOptions?: Record<string, unknown>;
6
+ href?: string;
7
+ target?: string;
8
+ download?: string | boolean;
9
+ onClick?: MouseEventHandler;
10
+ isDisabled?: boolean;
11
+ };
12
+ export declare const handleLinkClick: (options: HandleLinkClickOptions) => MouseEventHandler | undefined;
@@ -0,0 +1,10 @@
1
+ const f = (t) => t.trim().startsWith("//"), h = (t) => /^[a-z][a-z0-9+.-]*:/i.test(t.trim()), d = (t) => h(t) || f(t), y = (t) => t.trim().startsWith("#"), k = (t) => typeof t == "string" && t.toLowerCase() !== "_self", p = (t) => t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || typeof t.button == "number" && t.button !== 0, m = (t) => {
2
+ const { router: s, routerOptions: n, href: o, target: a, download: e, onClick: i, isDisabled: l } = t, c = typeof o == "string" && d(o), u = typeof o == "string" && y(o);
3
+ return !!(s && o && !l && !(e === !0 || typeof e == "string") && !k(a) && !c && !u) ? (r) => {
4
+ r.defaultPrevented || (i?.(r), !(p(r) || r.defaultPrevented) && (r.preventDefault(), s?.navigate(String(o), n)));
5
+ } : i;
6
+ };
7
+ export {
8
+ m as handleLinkClick
9
+ };
10
+ //# sourceMappingURL=router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.js","sources":["../../src/utils/router.ts"],"sourcesContent":["import { type MouseEvent, type MouseEventHandler } from 'react';\nimport { type RouterContextType } from '../context/RouterContext';\n\nconst isProtocolRelativeUrl = (href: string): boolean => href.trim().startsWith('//');\nconst hasNonPathUrlScheme = (href: string): boolean => /^[a-z][a-z0-9+.-]*:/i.test(href.trim());\nconst isExternalOrNonPathHref = (href: string): boolean => hasNonPathUrlScheme(href) || isProtocolRelativeUrl(href);\nconst isHashOnlyHref = (href: string): boolean => href.trim().startsWith('#');\nconst shouldDeferToBrowserForTarget = (target?: string): boolean =>\n typeof target === 'string' && target.toLowerCase() !== '_self';\n\nconst shouldDeferToBrowserForLinkClick = (\n event: Pick<MouseEvent, 'metaKey' | 'ctrlKey' | 'shiftKey' | 'altKey' | 'button'>,\n): boolean =>\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey ||\n (typeof event.button === 'number' && event.button !== 0);\n\nexport type HandleLinkClickOptions = {\n router: RouterContextType;\n routerOptions?: Record<string, unknown>;\n href?: string;\n target?: string;\n download?: string | boolean;\n onClick?: MouseEventHandler;\n isDisabled?: boolean;\n};\n\n/**\n * Creates click handler for link-like components integrated with RouterProvider.\n * Returns original `onClick` when router navigation should not be used\n * (e.g. missing router/href, disabled state, URL with a dedicated scheme such as\n * `https:` or `mailto:`, protocol-relative URL, hash-only URL, non-`_self`\n * target, `download` links, or modified / non-primary clicks).\n * If router navigation is applicable, the returned handler invokes `onClick` and\n * only navigates when the event is not prevented. If another handler already set\n * `event.defaultPrevented` before this handler runs, it exits early without\n * invoking `onClick` or navigating.\n *\n * @param {HandleLinkClickOptions} options Handler options object.\n * @param {RouterContextType} options.router Router context used for navigation.\n * @param {Record<string, unknown>} [options.routerOptions] Extra options for router navigation.\n * @param {string} [options.href] Link target URL.\n * @param {string} [options.target] HTML link target.\n * @param {string | boolean} [options.download] HTML link download attribute.\n * @param {MouseEventHandler} [options.onClick] Original click handler.\n * @param {boolean} [options.isDisabled] Whether the link is disabled.\n */\nexport const handleLinkClick = (options: HandleLinkClickOptions): MouseEventHandler | undefined => {\n const { router, routerOptions, href, target, download, onClick: onNativeClick, isDisabled } = options;\n const isNonPathHref = typeof href === 'string' && isExternalOrNonPathHref(href);\n const isHashHref = typeof href === 'string' && isHashOnlyHref(href);\n const hasDownloadAttribute = download === true || typeof download === 'string';\n const shouldUseRouter = Boolean(\n router &&\n href &&\n !isDisabled &&\n !hasDownloadAttribute &&\n !shouldDeferToBrowserForTarget(target) &&\n !isNonPathHref &&\n !isHashHref,\n );\n\n const onRouterClick: MouseEventHandler = (event) => {\n if (event.defaultPrevented) {\n return;\n }\n\n onNativeClick?.(event);\n\n if (shouldDeferToBrowserForLinkClick(event) || event.defaultPrevented) {\n return;\n }\n\n event.preventDefault();\n router?.navigate(String(href), routerOptions);\n };\n\n return shouldUseRouter ? onRouterClick : onNativeClick;\n};\n"],"names":["isProtocolRelativeUrl","href","hasNonPathUrlScheme","isExternalOrNonPathHref","isHashOnlyHref","shouldDeferToBrowserForTarget","target","shouldDeferToBrowserForLinkClick","event","handleLinkClick","options","router","routerOptions","download","onNativeClick","isDisabled","isNonPathHref","isHashHref"],"mappings":"AAGA,MAAMA,IAAwB,CAACC,MAA0BA,EAAK,KAAA,EAAO,WAAW,IAAI,GAC9EC,IAAsB,CAACD,MAA0B,uBAAuB,KAAKA,EAAK,MAAM,GACxFE,IAA0B,CAACF,MAA0BC,EAAoBD,CAAI,KAAKD,EAAsBC,CAAI,GAC5GG,IAAiB,CAACH,MAA0BA,EAAK,KAAA,EAAO,WAAW,GAAG,GACtEI,IAAgC,CAACC,MACrC,OAAOA,KAAW,YAAYA,EAAO,kBAAkB,SAEnDC,IAAmC,CACvCC,MAEAA,EAAM,WACNA,EAAM,WACNA,EAAM,YACNA,EAAM,UACL,OAAOA,EAAM,UAAW,YAAYA,EAAM,WAAW,GAgC3CC,IAAkB,CAACC,MAAmE;AACjG,QAAM,EAAE,QAAAC,GAAQ,eAAAC,GAAe,MAAAX,GAAM,QAAAK,GAAQ,UAAAO,GAAU,SAASC,GAAe,YAAAC,EAAA,IAAeL,GACxFM,IAAgB,OAAOf,KAAS,YAAYE,EAAwBF,CAAI,GACxEgB,IAAa,OAAOhB,KAAS,YAAYG,EAAeH,CAAI;AA2BlE,SAzBwB,GACtBU,KACAV,KACA,CAACc,KACD,EAL2BF,MAAa,MAAQ,OAAOA,KAAa,aAMpE,CAACR,EAA8BC,CAAM,KACrC,CAACU,KACD,CAACC,KAGsC,CAACT,MAAU;AAClD,IAAIA,EAAM,qBAIVM,IAAgBN,CAAK,GAEjB,EAAAD,EAAiCC,CAAK,KAAKA,EAAM,sBAIrDA,EAAM,eAAA,GACNG,GAAQ,SAAS,OAAOV,CAAI,GAAGW,CAAa;AAAA,EAC9C,IAEyCE;AAC3C;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/-([a-z])/g,a=>a[1].toUpperCase()),r=e=>{if(typeof e=="object"&&e!==null){const a={};for(const[t,s]of Object.entries(e))a[t]=typeof s=="string"?o(s):s;return a}return e},b=e=>typeof e=="string"?o(e):typeof e=="object"&&e!==null?r(e):e;exports.camelCaseToKebabCase=C;exports.kebabCaseToCamelCase=o;exports.kebabCaseToCamelCaseValues=r;exports.stringOrObjectKebabCaseToCamelCase=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),s=e=>e.replace(/-([a-z])/g,a=>a[1].toUpperCase()),t=e=>{if(typeof e=="object"&&e!==null){const a={};for(const[o,r]of Object.entries(e))a[o]=typeof r=="string"?s(r):r;return a}return e},C=e=>typeof e=="string"||e==null?e??void 0:String(e),b=e=>typeof e=="string"?s(e):typeof e=="object"&&e!==null?t(e):e;exports.camelCaseToKebabCase=l;exports.kebabCaseToCamelCase=s;exports.kebabCaseToCamelCaseValues=t;exports.normalizeStringValue=C;exports.stringOrObjectKebabCaseToCamelCase=b;
2
2
  //# sourceMappingURL=string.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.cjs","sources":["../../src/utils/string.ts"],"sourcesContent":["/**\n * Converts a camelCase or PascalCase string to kebab-case.\n *\n * @param {string} input - The camelCase string to be converted.\n * @returns {string} The kebab-case version of the input string.\n */\nexport const camelCaseToKebabCase = (input: string): string =>\n input.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts a kebab-case string to camelCase.\n *\n * @param {string} input - The kebab-case string to be converted.\n * @returns {string} The camelCase version of the input string.\n */\nexport const kebabCaseToCamelCase = (input: string): string => input.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n\n/**\n * Converts an object with kebab-case string values to camelCase.\n *\n * @param {Record<string, string>} input - The input to be converted.\n * @returns {Record<string, string>} The converted input.\n */\nexport const kebabCaseToCamelCaseValues = (input: Record<string, string>): Record<string, string> => {\n if (typeof input === 'object' && input !== null) {\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(input)) {\n result[key] = typeof value === 'string' ? kebabCaseToCamelCase(value) : value;\n }\n\n return result;\n }\n\n return input;\n};\n\n/**\n * Converts a kebab-case string or an object with kebab-case values to camelCase.\n *\n * @param {string | Record<string, string>} input - The input to be converted.\n * @returns {string | Record<string, string>} The converted input.\n */\nexport const stringOrObjectKebabCaseToCamelCase = (\n input: string | Record<string, string>,\n): string | Record<string, string> => {\n if (typeof input === 'string') {\n return kebabCaseToCamelCase(input);\n }\n if (typeof input === 'object' && input !== null) {\n return kebabCaseToCamelCaseValues(input);\n }\n\n return input;\n};\n"],"names":["camelCaseToKebabCase","input","kebabCaseToCamelCase","g","kebabCaseToCamelCaseValues","result","key","value","stringOrObjectKebabCaseToCamelCase"],"mappings":"gFAMO,MAAMA,EAAwBC,GACnCA,EAAM,QAAQ,qBAAsB,OAAO,EAAE,YAAA,EAQlCC,EAAwBD,GAA0BA,EAAM,QAAQ,YAAcE,GAAMA,EAAE,CAAC,EAAE,YAAA,CAAa,EAQtGC,EAA8BH,GAA0D,CACnG,GAAI,OAAOA,GAAU,UAAYA,IAAU,KAAM,CAC/C,MAAMI,EAAiC,CAAA,EACvC,SAAW,CAACC,EAAKC,CAAK,IAAK,OAAO,QAAQN,CAAK,EAC7CI,EAAOC,CAAG,EAAI,OAAOC,GAAU,SAAWL,EAAqBK,CAAK,EAAIA,EAG1E,OAAOF,CACT,CAEA,OAAOJ,CACT,EAQaO,EACXP,GAEI,OAAOA,GAAU,SACZC,EAAqBD,CAAK,EAE/B,OAAOA,GAAU,UAAYA,IAAU,KAClCG,EAA2BH,CAAK,EAGlCA"}
1
+ {"version":3,"file":"string.cjs","sources":["../../src/utils/string.ts"],"sourcesContent":["/**\n * Converts a camelCase or PascalCase string to kebab-case.\n *\n * @param {string} input - The camelCase string to be converted.\n * @returns {string} The kebab-case version of the input string.\n */\nexport const camelCaseToKebabCase = (input: string): string =>\n input.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts a kebab-case string to camelCase.\n *\n * @param {string} input - The kebab-case string to be converted.\n * @returns {string} The camelCase version of the input string.\n */\nexport const kebabCaseToCamelCase = (input: string): string => input.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n\n/**\n * Converts an object with kebab-case string values to camelCase.\n *\n * @param {Record<string, string>} input - The input to be converted.\n * @returns {Record<string, string>} The converted input.\n */\nexport const kebabCaseToCamelCaseValues = (input: Record<string, string>): Record<string, string> => {\n if (typeof input === 'object' && input !== null) {\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(input)) {\n result[key] = typeof value === 'string' ? kebabCaseToCamelCase(value) : value;\n }\n\n return result;\n }\n\n return input;\n};\n\n/**\n * Normalizes a value to `string | undefined`.\n *\n * Returns the original value if it is already a string,\n * `undefined` for nullish inputs, or `String(value)` for anything else.\n *\n * @param {unknown} value - The value to normalize.\n * @returns {string | undefined} The normalized string value.\n */\nexport const normalizeStringValue = (value: unknown): string | undefined => {\n if (typeof value === 'string' || value == null) {\n return value ?? undefined;\n }\n\n return String(value);\n};\n\n/**\n * Converts a kebab-case string or an object with kebab-case values to camelCase.\n *\n * @param {string | Record<string, string>} input - The input to be converted.\n * @returns {string | Record<string, string>} The converted input.\n */\nexport const stringOrObjectKebabCaseToCamelCase = (\n input: string | Record<string, string>,\n): string | Record<string, string> => {\n if (typeof input === 'string') {\n return kebabCaseToCamelCase(input);\n }\n if (typeof input === 'object' && input !== null) {\n return kebabCaseToCamelCaseValues(input);\n }\n\n return input;\n};\n"],"names":["camelCaseToKebabCase","input","kebabCaseToCamelCase","g","kebabCaseToCamelCaseValues","result","key","value","normalizeStringValue","stringOrObjectKebabCaseToCamelCase"],"mappings":"gFAMO,MAAMA,EAAwBC,GACnCA,EAAM,QAAQ,qBAAsB,OAAO,EAAE,YAAA,EAQlCC,EAAwBD,GAA0BA,EAAM,QAAQ,YAAcE,GAAMA,EAAE,CAAC,EAAE,YAAA,CAAa,EAQtGC,EAA8BH,GAA0D,CACnG,GAAI,OAAOA,GAAU,UAAYA,IAAU,KAAM,CAC/C,MAAMI,EAAiC,CAAA,EACvC,SAAW,CAACC,EAAKC,CAAK,IAAK,OAAO,QAAQN,CAAK,EAC7CI,EAAOC,CAAG,EAAI,OAAOC,GAAU,SAAWL,EAAqBK,CAAK,EAAIA,EAG1E,OAAOF,CACT,CAEA,OAAOJ,CACT,EAWaO,EAAwBD,GAC/B,OAAOA,GAAU,UAAYA,GAAS,KACjCA,GAAS,OAGX,OAAOA,CAAK,EASRE,EACXR,GAEI,OAAOA,GAAU,SACZC,EAAqBD,CAAK,EAE/B,OAAOA,GAAU,UAAYA,IAAU,KAClCG,EAA2BH,CAAK,EAGlCA"}
@@ -1,4 +1,5 @@
1
1
  export declare const camelCaseToKebabCase: (input: string) => string;
2
2
  export declare const kebabCaseToCamelCase: (input: string) => string;
3
3
  export declare const kebabCaseToCamelCaseValues: (input: Record<string, string>) => Record<string, string>;
4
+ export declare const normalizeStringValue: (value: unknown) => string | undefined;
4
5
  export declare const stringOrObjectKebabCaseToCamelCase: (input: string | Record<string, string>) => string | Record<string, string>;
@@ -1,16 +1,17 @@
1
- const c = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), r = (e) => e.replace(/-([a-z])/g, (a) => a[1].toUpperCase()), t = (e) => {
1
+ const n = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), o = (e) => e.replace(/-([a-z])/g, (r) => r[1].toUpperCase()), a = (e) => {
2
2
  if (typeof e == "object" && e !== null) {
3
- const a = {};
4
- for (const [o, s] of Object.entries(e))
5
- a[o] = typeof s == "string" ? r(s) : s;
6
- return a;
3
+ const r = {};
4
+ for (const [s, t] of Object.entries(e))
5
+ r[s] = typeof t == "string" ? o(t) : t;
6
+ return r;
7
7
  }
8
8
  return e;
9
- }, l = (e) => typeof e == "string" ? r(e) : typeof e == "object" && e !== null ? t(e) : e;
9
+ }, c = (e) => typeof e == "string" || e == null ? e ?? void 0 : String(e), l = (e) => typeof e == "string" ? o(e) : typeof e == "object" && e !== null ? a(e) : e;
10
10
  export {
11
- c as camelCaseToKebabCase,
12
- r as kebabCaseToCamelCase,
13
- t as kebabCaseToCamelCaseValues,
11
+ n as camelCaseToKebabCase,
12
+ o as kebabCaseToCamelCase,
13
+ a as kebabCaseToCamelCaseValues,
14
+ c as normalizeStringValue,
14
15
  l as stringOrObjectKebabCaseToCamelCase
15
16
  };
16
17
  //# sourceMappingURL=string.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"string.js","sources":["../../src/utils/string.ts"],"sourcesContent":["/**\n * Converts a camelCase or PascalCase string to kebab-case.\n *\n * @param {string} input - The camelCase string to be converted.\n * @returns {string} The kebab-case version of the input string.\n */\nexport const camelCaseToKebabCase = (input: string): string =>\n input.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts a kebab-case string to camelCase.\n *\n * @param {string} input - The kebab-case string to be converted.\n * @returns {string} The camelCase version of the input string.\n */\nexport const kebabCaseToCamelCase = (input: string): string => input.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n\n/**\n * Converts an object with kebab-case string values to camelCase.\n *\n * @param {Record<string, string>} input - The input to be converted.\n * @returns {Record<string, string>} The converted input.\n */\nexport const kebabCaseToCamelCaseValues = (input: Record<string, string>): Record<string, string> => {\n if (typeof input === 'object' && input !== null) {\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(input)) {\n result[key] = typeof value === 'string' ? kebabCaseToCamelCase(value) : value;\n }\n\n return result;\n }\n\n return input;\n};\n\n/**\n * Converts a kebab-case string or an object with kebab-case values to camelCase.\n *\n * @param {string | Record<string, string>} input - The input to be converted.\n * @returns {string | Record<string, string>} The converted input.\n */\nexport const stringOrObjectKebabCaseToCamelCase = (\n input: string | Record<string, string>,\n): string | Record<string, string> => {\n if (typeof input === 'string') {\n return kebabCaseToCamelCase(input);\n }\n if (typeof input === 'object' && input !== null) {\n return kebabCaseToCamelCaseValues(input);\n }\n\n return input;\n};\n"],"names":["camelCaseToKebabCase","input","kebabCaseToCamelCase","g","kebabCaseToCamelCaseValues","result","key","value","stringOrObjectKebabCaseToCamelCase"],"mappings":"AAMO,MAAMA,IAAuB,CAACC,MACnCA,EAAM,QAAQ,sBAAsB,OAAO,EAAE,YAAA,GAQlCC,IAAuB,CAACD,MAA0BA,EAAM,QAAQ,aAAa,CAACE,MAAMA,EAAE,CAAC,EAAE,YAAA,CAAa,GAQtGC,IAA6B,CAACH,MAA0D;AACnG,MAAI,OAAOA,KAAU,YAAYA,MAAU,MAAM;AAC/C,UAAMI,IAAiC,CAAA;AACvC,eAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQN,CAAK;AAC7C,MAAAI,EAAOC,CAAG,IAAI,OAAOC,KAAU,WAAWL,EAAqBK,CAAK,IAAIA;AAG1E,WAAOF;AAAA,EACT;AAEA,SAAOJ;AACT,GAQaO,IAAqC,CAChDP,MAEI,OAAOA,KAAU,WACZC,EAAqBD,CAAK,IAE/B,OAAOA,KAAU,YAAYA,MAAU,OAClCG,EAA2BH,CAAK,IAGlCA;"}
1
+ {"version":3,"file":"string.js","sources":["../../src/utils/string.ts"],"sourcesContent":["/**\n * Converts a camelCase or PascalCase string to kebab-case.\n *\n * @param {string} input - The camelCase string to be converted.\n * @returns {string} The kebab-case version of the input string.\n */\nexport const camelCaseToKebabCase = (input: string): string =>\n input.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts a kebab-case string to camelCase.\n *\n * @param {string} input - The kebab-case string to be converted.\n * @returns {string} The camelCase version of the input string.\n */\nexport const kebabCaseToCamelCase = (input: string): string => input.replace(/-([a-z])/g, (g) => g[1].toUpperCase());\n\n/**\n * Converts an object with kebab-case string values to camelCase.\n *\n * @param {Record<string, string>} input - The input to be converted.\n * @returns {Record<string, string>} The converted input.\n */\nexport const kebabCaseToCamelCaseValues = (input: Record<string, string>): Record<string, string> => {\n if (typeof input === 'object' && input !== null) {\n const result: Record<string, string> = {};\n for (const [key, value] of Object.entries(input)) {\n result[key] = typeof value === 'string' ? kebabCaseToCamelCase(value) : value;\n }\n\n return result;\n }\n\n return input;\n};\n\n/**\n * Normalizes a value to `string | undefined`.\n *\n * Returns the original value if it is already a string,\n * `undefined` for nullish inputs, or `String(value)` for anything else.\n *\n * @param {unknown} value - The value to normalize.\n * @returns {string | undefined} The normalized string value.\n */\nexport const normalizeStringValue = (value: unknown): string | undefined => {\n if (typeof value === 'string' || value == null) {\n return value ?? undefined;\n }\n\n return String(value);\n};\n\n/**\n * Converts a kebab-case string or an object with kebab-case values to camelCase.\n *\n * @param {string | Record<string, string>} input - The input to be converted.\n * @returns {string | Record<string, string>} The converted input.\n */\nexport const stringOrObjectKebabCaseToCamelCase = (\n input: string | Record<string, string>,\n): string | Record<string, string> => {\n if (typeof input === 'string') {\n return kebabCaseToCamelCase(input);\n }\n if (typeof input === 'object' && input !== null) {\n return kebabCaseToCamelCaseValues(input);\n }\n\n return input;\n};\n"],"names":["camelCaseToKebabCase","input","kebabCaseToCamelCase","g","kebabCaseToCamelCaseValues","result","key","value","normalizeStringValue","stringOrObjectKebabCaseToCamelCase"],"mappings":"AAMO,MAAMA,IAAuB,CAACC,MACnCA,EAAM,QAAQ,sBAAsB,OAAO,EAAE,YAAA,GAQlCC,IAAuB,CAACD,MAA0BA,EAAM,QAAQ,aAAa,CAACE,MAAMA,EAAE,CAAC,EAAE,YAAA,CAAa,GAQtGC,IAA6B,CAACH,MAA0D;AACnG,MAAI,OAAOA,KAAU,YAAYA,MAAU,MAAM;AAC/C,UAAMI,IAAiC,CAAA;AACvC,eAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQN,CAAK;AAC7C,MAAAI,EAAOC,CAAG,IAAI,OAAOC,KAAU,WAAWL,EAAqBK,CAAK,IAAIA;AAG1E,WAAOF;AAAA,EACT;AAEA,SAAOJ;AACT,GAWaO,IAAuB,CAACD,MAC/B,OAAOA,KAAU,YAAYA,KAAS,OACjCA,KAAS,SAGX,OAAOA,CAAK,GASRE,IAAqC,CAChDR,MAEI,OAAOA,KAAU,WACZC,EAAqBD,CAAK,IAE/B,OAAOA,KAAU,YAAYA,MAAU,OAClCG,EAA2BH,CAAK,IAGlCA;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alma-oss/spirit-web-react",
3
- "version": "4.4.2",
3
+ "version": "4.5.0",
4
4
  "description": "React implementation of Spirit Design System components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -34,23 +34,23 @@
34
34
  "react-transition-group": "^4.4.5"
35
35
  },
36
36
  "devDependencies": {
37
- "@alma-oss/spirit-common": "^0.5.4",
38
- "@alma-oss/spirit-web": "^4.3.1",
37
+ "@alma-oss/spirit-common": "^0.5.5",
38
+ "@alma-oss/spirit-web": "^4.4.0",
39
39
  "@babel/core": "7.29.0",
40
40
  "@babel/preset-env": "7.29.0",
41
41
  "@babel/preset-react": "7.28.5",
42
42
  "@babel/preset-typescript": "7.28.5",
43
43
  "@eslint/compat": "1.4.1",
44
- "@eslint/eslintrc": "3.3.3",
45
- "@figma/code-connect": "1.4.0",
44
+ "@eslint/eslintrc": "3.3.5",
45
+ "@figma/code-connect": "1.4.2",
46
46
  "@juggle/resize-observer": "3.4.0",
47
47
  "@lmc-eu/eslint-config-base": "3.1.3",
48
48
  "@lmc-eu/eslint-config-jest": "3.0.6",
49
49
  "@lmc-eu/eslint-config-react": "2.0.6",
50
50
  "@lmc-eu/eslint-config-typescript": "2.1.5",
51
51
  "@rollup/plugin-terser": "0.4.4",
52
- "@storybook/addon-docs": "10.2.10",
53
- "@storybook/react": "10.2.10",
52
+ "@storybook/addon-docs": "10.2.14",
53
+ "@storybook/react": "10.2.14",
54
54
  "@testing-library/dom": "10.4.1",
55
55
  "@testing-library/jest-dom": "6.9.1",
56
56
  "@testing-library/react": "16.3.2",
@@ -58,7 +58,7 @@
58
58
  "@types/babel__core": "7.20.5",
59
59
  "@types/jest": "30.0.0",
60
60
  "@types/jest-axe": "3.5.9",
61
- "@types/node": "20.19.33",
61
+ "@types/node": "20.19.35",
62
62
  "@types/react": "18.3.28",
63
63
  "@types/react-dom": "18.3.7",
64
64
  "@types/react-transition-group": "4.4.12",
@@ -66,27 +66,28 @@
66
66
  "@typescript-eslint/parser": "6.21.0",
67
67
  "@vitejs/plugin-react": "4.7.0",
68
68
  "cross-env": "10.1.0",
69
- "eslint": "9.39.2",
69
+ "eslint": "9.39.3",
70
70
  "eslint-config-airbnb": "19.0.4",
71
- "eslint-config-spirit": "^0.1.7",
71
+ "eslint-config-spirit": "^0.2.0",
72
72
  "eslint-import-resolver-typescript": "3.10.1",
73
73
  "eslint-plugin-import": "2.32.0",
74
74
  "eslint-plugin-jsx-a11y": "6.10.2",
75
75
  "eslint-plugin-promise": "6.6.0",
76
76
  "eslint-plugin-react": "7.37.5",
77
77
  "eslint-plugin-react-hooks": "4.6.2",
78
- "eslint-plugin-react-refresh": "0.5.0",
78
+ "eslint-plugin-react-refresh": "0.5.2",
79
79
  "eslint-plugin-standard": "5.0.0",
80
80
  "html-element-attributes": "3.5.0",
81
- "jest": "30.2.0",
81
+ "jest": "30.3.0",
82
82
  "jest-axe": "10.0.0",
83
83
  "npm-run-all2": "8.0.4",
84
+ "nx": "22.5.3",
84
85
  "react": "19.0.0",
85
86
  "react-dom": "19.0.0",
86
87
  "rollup-preserve-directives": "1.1.3",
87
- "sass-embedded": "1.97.3",
88
+ "sass-embedded": "1.98.0",
88
89
  "shx": "0.4.0",
89
- "storybook": "10.2.10",
90
+ "storybook": "10.2.14",
90
91
  "ts-node": "10.9.2",
91
92
  "tsx": "4.21.0",
92
93
  "typescript": "5.8.3",
@@ -120,8 +121,8 @@
120
121
  "build:verify": "tsx ./scripts/verifyBuild.ts",
121
122
  "dev": "vite build --watch",
122
123
  "types": "tsc --noEmit",
123
- "lint": "eslint ./",
124
- "lint:fix": "yarn lint --fix",
124
+ "lint": "nx lint",
125
+ "lint:fix": "nx lint-fix",
125
126
  "test": "npm-run-all --serial lint types test:unit:coverage",
126
127
  "test:unit": "TS_NODE_PROJECT=./config/tsconfig.test.json jest",
127
128
  "test:unit:watch": "yarn test:unit --watchAll",
@@ -372,6 +373,13 @@
372
373
  "require": "./dist/components/IconBox/index.cjs",
373
374
  "default": "./dist/components/IconBox/index.js"
374
375
  },
376
+ "./components/InputDetails": {
377
+ "types": "./dist/components/InputDetails/index.d.ts",
378
+ "production": "./dist/components/InputDetails/index.js",
379
+ "import": "./dist/components/InputDetails/index.js",
380
+ "require": "./dist/components/InputDetails/index.cjs",
381
+ "default": "./dist/components/InputDetails/index.js"
382
+ },
375
383
  "./components/Item": {
376
384
  "types": "./dist/components/Item/index.d.ts",
377
385
  "production": "./dist/components/Item/index.js",
@@ -603,12 +611,12 @@
603
611
  "require": "./dist/components/Truncate/index.cjs",
604
612
  "default": "./dist/components/Truncate/index.js"
605
613
  },
606
- "./components/UNSTABLE_Attachment": {
607
- "types": "./dist/components/UNSTABLE_Attachment/index.d.ts",
608
- "production": "./dist/components/UNSTABLE_Attachment/index.js",
609
- "import": "./dist/components/UNSTABLE_Attachment/index.js",
610
- "require": "./dist/components/UNSTABLE_Attachment/index.cjs",
611
- "default": "./dist/components/UNSTABLE_Attachment/index.js"
614
+ "./components/UNSTABLE_File": {
615
+ "types": "./dist/components/UNSTABLE_File/index.d.ts",
616
+ "production": "./dist/components/UNSTABLE_File/index.js",
617
+ "import": "./dist/components/UNSTABLE_File/index.js",
618
+ "require": "./dist/components/UNSTABLE_File/index.cjs",
619
+ "default": "./dist/components/UNSTABLE_File/index.js"
612
620
  },
613
621
  "./components/UNSTABLE_FileUpload": {
614
622
  "types": "./dist/components/UNSTABLE_FileUpload/index.d.ts",
@@ -624,6 +632,13 @@
624
632
  "require": "./dist/components/UNSTABLE_Header/index.cjs",
625
633
  "default": "./dist/components/UNSTABLE_Header/index.js"
626
634
  },
635
+ "./components/UNSTABLE_Picker": {
636
+ "types": "./dist/components/UNSTABLE_Picker/index.d.ts",
637
+ "production": "./dist/components/UNSTABLE_Picker/index.js",
638
+ "import": "./dist/components/UNSTABLE_Picker/index.js",
639
+ "require": "./dist/components/UNSTABLE_Picker/index.cjs",
640
+ "default": "./dist/components/UNSTABLE_Picker/index.js"
641
+ },
627
642
  "./components/VisuallyHidden": {
628
643
  "types": "./dist/components/VisuallyHidden/index.d.ts",
629
644
  "production": "./dist/components/VisuallyHidden/index.js",
@@ -681,5 +696,5 @@
681
696
  "default": "./dist/utils/index.js"
682
697
  }
683
698
  },
684
- "gitHead": "249ebc071fd54227d415560abaa071df963a35ab"
699
+ "gitHead": "ac2fd0912687ac83bbf50145ade99d7136b7cd94"
685
700
  }
@@ -1,2 +0,0 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react"),o=t=>{const[r,l]=i.useState(t?t.split(" "):[]),c=i.useCallback(({add:s,remove:u})=>{l(n=>{let e=[...n];return u&&(e=e.filter(a=>a!==u)),s&&(e=[...e,s]),e})},[]);return[r,c]};exports.default=o;
2
- //# sourceMappingURL=useAriaIds.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAriaIds.cjs","sources":["../../../src/components/Field/useAriaIds.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useState } from 'react';\n\nexport type RegisterParams = { add?: string; remove?: string };\nexport type RegisterType = (params: RegisterParams) => void;\nexport type UseAriaIdsHook = (otherAriaIds?: string) => [string[], RegisterType];\n\nconst useAriaIds: UseAriaIdsHook = (otherAriaIds) => {\n const [ids, setIds] = useState<string[]>(otherAriaIds ? otherAriaIds.split(' ') : []);\n\n const register = useCallback(({ add, remove }: RegisterParams) => {\n setIds((prevIds) => {\n let newIds = [...prevIds];\n\n if (remove) {\n newIds = newIds.filter((item) => item !== remove);\n }\n\n if (add) {\n newIds = [...newIds, add];\n }\n\n return newIds;\n });\n }, []);\n\n return [ids, register];\n};\n\nexport default useAriaIds;\n"],"names":["useAriaIds","otherAriaIds","ids","setIds","useState","register","useCallback","add","remove","prevIds","newIds","item"],"mappings":"kJAQMA,EAA8BC,GAAiB,CACnD,KAAM,CAACC,EAAKC,CAAM,EAAIC,EAAAA,SAAmBH,EAAeA,EAAa,MAAM,GAAG,EAAI,EAAE,EAE9EI,EAAWC,EAAAA,YAAY,CAAC,CAAE,IAAAC,EAAK,OAAAC,KAA6B,CAChEL,EAAQM,GAAY,CAClB,IAAIC,EAAS,CAAC,GAAGD,CAAO,EAExB,OAAID,IACFE,EAASA,EAAO,OAAQC,GAASA,IAASH,CAAM,GAG9CD,IACFG,EAAS,CAAC,GAAGA,EAAQH,CAAG,GAGnBG,CACT,CAAC,CACH,EAAG,CAAA,CAAE,EAEL,MAAO,CAACR,EAAKG,CAAQ,CACvB"}
@@ -1,8 +0,0 @@
1
- export type RegisterParams = {
2
- add?: string;
3
- remove?: string;
4
- };
5
- export type RegisterType = (params: RegisterParams) => void;
6
- export type UseAriaIdsHook = (otherAriaIds?: string) => [string[], RegisterType];
7
- declare const useAriaIds: UseAriaIdsHook;
8
- export default useAriaIds;
@@ -1,15 +0,0 @@
1
- "use client";
2
- import { useState as f, useCallback as a } from "react";
3
- const p = (s) => {
4
- const [r, u] = f(s ? s.split(" ") : []), l = a(({ add: e, remove: i }) => {
5
- u((n) => {
6
- let t = [...n];
7
- return i && (t = t.filter((c) => c !== i)), e && (t = [...t, e]), t;
8
- });
9
- }, []);
10
- return [r, l];
11
- };
12
- export {
13
- p as default
14
- };
15
- //# sourceMappingURL=useAriaIds.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useAriaIds.js","sources":["../../../src/components/Field/useAriaIds.tsx"],"sourcesContent":["'use client';\n\nimport { useCallback, useState } from 'react';\n\nexport type RegisterParams = { add?: string; remove?: string };\nexport type RegisterType = (params: RegisterParams) => void;\nexport type UseAriaIdsHook = (otherAriaIds?: string) => [string[], RegisterType];\n\nconst useAriaIds: UseAriaIdsHook = (otherAriaIds) => {\n const [ids, setIds] = useState<string[]>(otherAriaIds ? otherAriaIds.split(' ') : []);\n\n const register = useCallback(({ add, remove }: RegisterParams) => {\n setIds((prevIds) => {\n let newIds = [...prevIds];\n\n if (remove) {\n newIds = newIds.filter((item) => item !== remove);\n }\n\n if (add) {\n newIds = [...newIds, add];\n }\n\n return newIds;\n });\n }, []);\n\n return [ids, register];\n};\n\nexport default useAriaIds;\n"],"names":["useAriaIds","otherAriaIds","ids","setIds","useState","register","useCallback","add","remove","prevIds","newIds","item"],"mappings":";;AAQA,MAAMA,IAA6B,CAACC,MAAiB;AACnD,QAAM,CAACC,GAAKC,CAAM,IAAIC,EAAmBH,IAAeA,EAAa,MAAM,GAAG,IAAI,EAAE,GAE9EI,IAAWC,EAAY,CAAC,EAAE,KAAAC,GAAK,QAAAC,QAA6B;AAChE,IAAAL,EAAO,CAACM,MAAY;AAClB,UAAIC,IAAS,CAAC,GAAGD,CAAO;AAExB,aAAID,MACFE,IAASA,EAAO,OAAO,CAACC,MAASA,MAASH,CAAM,IAG9CD,MACFG,IAAS,CAAC,GAAGA,GAAQH,CAAG,IAGnBG;AAAA,IACT,CAAC;AAAA,EACH,GAAG,CAAA,CAAE;AAEL,SAAO,CAACR,GAAKG,CAAQ;AACvB;"}
@@ -1,2 +0,0 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),q=require("classnames"),y=require("../../hooks/styleProps.cjs"),_=require("../../hooks/useClassNamePrefix.cjs"),j=require("../../hooks/useI18n.cjs"),C=require("../Icon/Icon.cjs"),E=require("./constants.cjs"),v=require("./UNSTABLE_AttachmentActionButton.cjs"),B=require("./UNSTABLE_AttachmentDismissButton.cjs"),L=require("./useAttachmentStyleProps.cjs"),U={elementType:"li",iconName:E.DEFAULT_ATTACHMENT_ICON_NAME,isFluid:!1},s=a=>{const c={...U,...a},{t:n}=j.useI18n(),{editText:i,elementType:l,iconName:u,id:m,isFluid:d,label:p,onDismiss:N,onChange:o,removeText:h,previewSlot:A,...T}=c,x=i??n("attachment.edit"),P=h??n("attachment.remove"),{classProps:t}=L.useAttachmentStyleProps({isFluid:d}),{styleProps:r,props:f}=y.useStyleProps(T),S=l;return e.jsxs(S,{...f,...r,id:m,className:q(t.root,r.className),children:[A??e.jsx(C.default,{name:u,"aria-hidden":"true"}),e.jsx("span",{className:t.name,children:e.jsx("span",{className:_.useClassNamePrefix("text-truncate"),children:p})}),o&&e.jsx("span",{className:t.slot,children:e.jsx(v.default,{onClick:o,children:x})}),e.jsx(B.default,{onClick:N,children:P})]})};s.spiritComponent="UNSTABLE_Attachment";s.displayName="UNSTABLE_Attachment";exports.default=s;
2
- //# sourceMappingURL=UNSTABLE_Attachment.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UNSTABLE_Attachment.cjs","sources":["../../../src/components/UNSTABLE_Attachment/UNSTABLE_Attachment.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { type ElementType } from 'react';\nimport { useClassNamePrefix, useI18n, useStyleProps } from '../../hooks';\nimport { Icon } from '../Icon';\nimport { DEFAULT_ATTACHMENT_ICON_NAME } from './constants';\nimport { type SpiritUnstableAttachmentProps } from './types';\nimport UNSTABLE_AttachmentActionButton from './UNSTABLE_AttachmentActionButton';\nimport UNSTABLE_AttachmentDismissButton from './UNSTABLE_AttachmentDismissButton';\nimport { useAttachmentStyleProps } from './useAttachmentStyleProps';\n\nconst defaultProps = {\n elementType: 'li' as const,\n iconName: DEFAULT_ATTACHMENT_ICON_NAME,\n isFluid: false,\n};\n\nconst UNSTABLE_Attachment = <E extends ElementType = 'li'>(props: SpiritUnstableAttachmentProps<E>): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { t } = useI18n();\n const {\n editText,\n elementType,\n iconName,\n id,\n isFluid,\n label,\n onDismiss,\n onChange,\n removeText,\n previewSlot,\n ...restProps\n } = propsWithDefaults;\n const resolvedEditText = editText ?? t('attachment.edit');\n const resolvedRemoveText = removeText ?? t('attachment.remove');\n const { classProps } = useAttachmentStyleProps({ isFluid });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n\n const Component = elementType as ElementType;\n\n return (\n <Component {...transferProps} {...styleProps} id={id} className={classNames(classProps.root, styleProps.className)}>\n {previewSlot ?? <Icon name={iconName} aria-hidden=\"true\" />}\n <span className={classProps.name}>\n <span className={useClassNamePrefix('text-truncate')}>{label}</span>\n </span>\n {onChange && (\n <span className={classProps.slot}>\n <UNSTABLE_AttachmentActionButton onClick={onChange}>{resolvedEditText}</UNSTABLE_AttachmentActionButton>\n </span>\n )}\n <UNSTABLE_AttachmentDismissButton onClick={onDismiss}>{resolvedRemoveText}</UNSTABLE_AttachmentDismissButton>\n </Component>\n );\n};\n\nUNSTABLE_Attachment.spiritComponent = 'UNSTABLE_Attachment';\nUNSTABLE_Attachment.displayName = 'UNSTABLE_Attachment';\n\nexport default UNSTABLE_Attachment;\n"],"names":["defaultProps","DEFAULT_ATTACHMENT_ICON_NAME","UNSTABLE_Attachment","props","propsWithDefaults","t","useI18n","editText","elementType","iconName","id","isFluid","label","onDismiss","onChange","removeText","previewSlot","restProps","resolvedEditText","resolvedRemoveText","classProps","useAttachmentStyleProps","styleProps","transferProps","useStyleProps","Component","jsxs","classNames","jsx","Icon","useClassNamePrefix","UNSTABLE_AttachmentActionButton","UNSTABLE_AttachmentDismissButton"],"mappings":"ggBAYMA,EAAe,CACnB,YAAa,KACb,SAAUC,EAAAA,6BACV,QAAS,EACX,EAEMC,EAAqDC,GAAyD,CAClH,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGG,CAAA,EAC1C,CAAE,EAAAE,CAAA,EAAMC,UAAA,EACR,CACJ,SAAAC,EACA,YAAAC,EACA,SAAAC,EACA,GAAAC,EACA,QAAAC,EACA,MAAAC,EACA,UAAAC,EACA,SAAAC,EACA,WAAAC,EACA,YAAAC,EACA,GAAGC,CAAA,EACDb,EACEc,EAAmBX,GAAYF,EAAE,iBAAiB,EAClDc,EAAqBJ,GAAcV,EAAE,mBAAmB,EACxD,CAAE,WAAAe,CAAA,EAAeC,0BAAwB,CAAE,QAAAV,EAAS,EACpD,CAAA,WAAEW,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,cAAcP,CAAS,EAE9DQ,EAAYjB,EAElB,OACEkB,EAAAA,KAACD,EAAA,CAAW,GAAGF,EAAgB,GAAGD,EAAY,GAAAZ,EAAQ,UAAWiB,EAAWP,EAAW,KAAME,EAAW,SAAS,EAC9G,SAAA,CAAAN,GAAeY,EAAAA,IAACC,UAAA,CAAK,KAAMpB,EAAU,cAAY,OAAO,EACzDmB,EAAAA,IAAC,OAAA,CAAK,UAAWR,EAAW,KAC1B,SAAAQ,EAAAA,IAAC,OAAA,CAAK,UAAWE,EAAAA,mBAAmB,eAAe,EAAI,SAAAlB,CAAA,CAAM,EAC/D,EACCE,GACCc,EAAAA,IAAC,OAAA,CAAK,UAAWR,EAAW,KAC1B,SAAAQ,EAAAA,IAACG,EAAAA,QAAA,CAAgC,QAASjB,EAAW,SAAAI,CAAA,CAAiB,EACxE,EAEFU,EAAAA,IAACI,EAAAA,QAAA,CAAiC,QAASnB,EAAY,SAAAM,CAAA,CAAmB,CAAA,EAC5E,CAEJ,EAEAjB,EAAoB,gBAAkB,sBACtCA,EAAoB,YAAc"}
@@ -1,8 +0,0 @@
1
- import { ElementType } from 'react';
2
- import { SpiritUnstableAttachmentProps } from './types';
3
- declare const UNSTABLE_Attachment: {
4
- <E extends ElementType = "li">(props: SpiritUnstableAttachmentProps<E>): JSX.Element;
5
- spiritComponent: string;
6
- displayName: string;
7
- };
8
- export default UNSTABLE_Attachment;
@@ -1,42 +0,0 @@
1
- "use client";
2
- import { jsxs as E, jsx as t } from "react/jsx-runtime";
3
- import P from "classnames";
4
- import { useStyleProps as S } from "../../hooks/styleProps.js";
5
- import { useClassNamePrefix as _ } from "../../hooks/useClassNamePrefix.js";
6
- import { useI18n as B } from "../../hooks/useI18n.js";
7
- import v from "../Icon/Icon.js";
8
- import { DEFAULT_ATTACHMENT_ICON_NAME as y } from "./constants.js";
9
- import L from "./UNSTABLE_AttachmentActionButton.js";
10
- import U from "./UNSTABLE_AttachmentDismissButton.js";
11
- import { useAttachmentStyleProps as D } from "./useAttachmentStyleProps.js";
12
- const F = {
13
- elementType: "li",
14
- iconName: y,
15
- isFluid: !1
16
- }, r = (m) => {
17
- const a = { ...F, ...m }, { t: s } = B(), {
18
- editText: i,
19
- elementType: c,
20
- iconName: l,
21
- id: p,
22
- isFluid: d,
23
- label: N,
24
- onDismiss: h,
25
- onChange: o,
26
- removeText: f,
27
- previewSlot: u,
28
- ...A
29
- } = a, T = i ?? s("attachment.edit"), x = f ?? s("attachment.remove"), { classProps: e } = D({ isFluid: d }), { styleProps: n, props: C } = S(A);
30
- return /* @__PURE__ */ E(c, { ...C, ...n, id: p, className: P(e.root, n.className), children: [
31
- u ?? /* @__PURE__ */ t(v, { name: l, "aria-hidden": "true" }),
32
- /* @__PURE__ */ t("span", { className: e.name, children: /* @__PURE__ */ t("span", { className: _("text-truncate"), children: N }) }),
33
- o && /* @__PURE__ */ t("span", { className: e.slot, children: /* @__PURE__ */ t(L, { onClick: o, children: T }) }),
34
- /* @__PURE__ */ t(U, { onClick: h, children: x })
35
- ] });
36
- };
37
- r.spiritComponent = "UNSTABLE_Attachment";
38
- r.displayName = "UNSTABLE_Attachment";
39
- export {
40
- r as default
41
- };
42
- //# sourceMappingURL=UNSTABLE_Attachment.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UNSTABLE_Attachment.js","sources":["../../../src/components/UNSTABLE_Attachment/UNSTABLE_Attachment.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { type ElementType } from 'react';\nimport { useClassNamePrefix, useI18n, useStyleProps } from '../../hooks';\nimport { Icon } from '../Icon';\nimport { DEFAULT_ATTACHMENT_ICON_NAME } from './constants';\nimport { type SpiritUnstableAttachmentProps } from './types';\nimport UNSTABLE_AttachmentActionButton from './UNSTABLE_AttachmentActionButton';\nimport UNSTABLE_AttachmentDismissButton from './UNSTABLE_AttachmentDismissButton';\nimport { useAttachmentStyleProps } from './useAttachmentStyleProps';\n\nconst defaultProps = {\n elementType: 'li' as const,\n iconName: DEFAULT_ATTACHMENT_ICON_NAME,\n isFluid: false,\n};\n\nconst UNSTABLE_Attachment = <E extends ElementType = 'li'>(props: SpiritUnstableAttachmentProps<E>): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { t } = useI18n();\n const {\n editText,\n elementType,\n iconName,\n id,\n isFluid,\n label,\n onDismiss,\n onChange,\n removeText,\n previewSlot,\n ...restProps\n } = propsWithDefaults;\n const resolvedEditText = editText ?? t('attachment.edit');\n const resolvedRemoveText = removeText ?? t('attachment.remove');\n const { classProps } = useAttachmentStyleProps({ isFluid });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n\n const Component = elementType as ElementType;\n\n return (\n <Component {...transferProps} {...styleProps} id={id} className={classNames(classProps.root, styleProps.className)}>\n {previewSlot ?? <Icon name={iconName} aria-hidden=\"true\" />}\n <span className={classProps.name}>\n <span className={useClassNamePrefix('text-truncate')}>{label}</span>\n </span>\n {onChange && (\n <span className={classProps.slot}>\n <UNSTABLE_AttachmentActionButton onClick={onChange}>{resolvedEditText}</UNSTABLE_AttachmentActionButton>\n </span>\n )}\n <UNSTABLE_AttachmentDismissButton onClick={onDismiss}>{resolvedRemoveText}</UNSTABLE_AttachmentDismissButton>\n </Component>\n );\n};\n\nUNSTABLE_Attachment.spiritComponent = 'UNSTABLE_Attachment';\nUNSTABLE_Attachment.displayName = 'UNSTABLE_Attachment';\n\nexport default UNSTABLE_Attachment;\n"],"names":["defaultProps","DEFAULT_ATTACHMENT_ICON_NAME","UNSTABLE_Attachment","props","propsWithDefaults","t","useI18n","editText","elementType","iconName","id","isFluid","label","onDismiss","onChange","removeText","previewSlot","restProps","resolvedEditText","resolvedRemoveText","classProps","useAttachmentStyleProps","styleProps","transferProps","useStyleProps","jsxs","classNames","jsx","Icon","useClassNamePrefix","UNSTABLE_AttachmentActionButton","UNSTABLE_AttachmentDismissButton"],"mappings":";;;;;;;;;;;AAYA,MAAMA,IAAe;AAAA,EACnB,aAAa;AAAA,EACb,UAAUC;AAAA,EACV,SAAS;AACX,GAEMC,IAAsB,CAA+BC,MAAyD;AAClH,QAAMC,IAAoB,EAAE,GAAGJ,GAAc,GAAGG,EAAA,GAC1C,EAAE,GAAAE,EAAA,IAAMC,EAAA,GACR;AAAA,IACJ,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,IAAAC;AAAA,IACA,SAAAC;AAAA,IACA,OAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDb,GACEc,IAAmBX,KAAYF,EAAE,iBAAiB,GAClDc,IAAqBJ,KAAcV,EAAE,mBAAmB,GACxD,EAAE,YAAAe,EAAA,IAAeC,EAAwB,EAAE,SAAAV,GAAS,GACpD,EAAE,YAAAW,GAAY,OAAOC,EAAA,IAAkBC,EAAcP,CAAS;AAIpE,SACE,gBAAAQ,EAHgBjB,GAGf,EAAW,GAAGe,GAAgB,GAAGD,GAAY,IAAAZ,GAAQ,WAAWgB,EAAWN,EAAW,MAAME,EAAW,SAAS,GAC9G,UAAA;AAAA,IAAAN,KAAe,gBAAAW,EAACC,GAAA,EAAK,MAAMnB,GAAU,eAAY,QAAO;AAAA,IACzD,gBAAAkB,EAAC,QAAA,EAAK,WAAWP,EAAW,MAC1B,UAAA,gBAAAO,EAAC,QAAA,EAAK,WAAWE,EAAmB,eAAe,GAAI,UAAAjB,EAAA,CAAM,GAC/D;AAAA,IACCE,KACC,gBAAAa,EAAC,QAAA,EAAK,WAAWP,EAAW,MAC1B,UAAA,gBAAAO,EAACG,GAAA,EAAgC,SAAShB,GAAW,UAAAI,EAAA,CAAiB,GACxE;AAAA,IAEF,gBAAAS,EAACI,GAAA,EAAiC,SAASlB,GAAY,UAAAM,EAAA,CAAmB;AAAA,EAAA,GAC5E;AAEJ;AAEAjB,EAAoB,kBAAkB;AACtCA,EAAoB,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),i=require("classnames"),l=require("../../hooks/styleProps.cjs"),p=require("../Icon/Icon.cjs"),A=require("../VisuallyHidden/VisuallyHidden.cjs"),d=require("./constants.cjs"),m=require("./useAttachmentStyleProps.cjs"),e=n=>{const{name:r=d.DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME,children:o,...c}=n,{classProps:u}=m.useAttachmentStyleProps(),{styleProps:s,props:a}=l.useStyleProps(c);return t.jsxs("button",{type:"button",...a,...s,className:i(u.button,s.className),children:[t.jsx(A.default,{children:o}),t.jsx(p.default,{name:r,"aria-hidden":"true"})]})};e.spiritComponent="UNSTABLE_AttachmentActionButton";e.displayName="UNSTABLE_AttachmentActionButton";exports.default=e;
2
- //# sourceMappingURL=UNSTABLE_AttachmentActionButton.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UNSTABLE_AttachmentActionButton.cjs","sources":["../../../src/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { Icon } from '../Icon';\nimport { VisuallyHidden } from '../VisuallyHidden';\nimport { DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME } from './constants';\nimport { type SpiritUnstableAttachmentActionButtonProps } from './types';\nimport { useAttachmentStyleProps } from './useAttachmentStyleProps';\n\nconst UNSTABLE_AttachmentActionButton = (props: SpiritUnstableAttachmentActionButtonProps) => {\n const { name = DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME, children, ...restProps } = props;\n const { classProps } = useAttachmentStyleProps();\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n\n return (\n <button\n type=\"button\"\n {...transferProps}\n {...styleProps}\n className={classNames(classProps.button, styleProps.className)}\n >\n <VisuallyHidden>{children}</VisuallyHidden>\n <Icon name={name} aria-hidden=\"true\" />\n </button>\n );\n};\n\nUNSTABLE_AttachmentActionButton.spiritComponent = 'UNSTABLE_AttachmentActionButton';\nUNSTABLE_AttachmentActionButton.displayName = 'UNSTABLE_AttachmentActionButton';\n\nexport default UNSTABLE_AttachmentActionButton;\n"],"names":["UNSTABLE_AttachmentActionButton","props","name","DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME","children","restProps","classProps","useAttachmentStyleProps","styleProps","transferProps","useStyleProps","jsxs","classNames","jsx","VisuallyHidden","Icon"],"mappings":"sXAWMA,EAAmCC,GAAqD,CAC5F,KAAM,CAAE,KAAAC,EAAOC,EAAAA,2CAA4C,SAAAC,EAAU,GAAGC,GAAcJ,EAChF,CAAE,WAAAK,CAAA,EAAeC,0BAAA,EACjB,CAAA,WAAEC,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,cAAcL,CAAS,EAEpE,OACEM,EAAAA,KAAC,SAAA,CACC,KAAK,SACJ,GAAGF,EACH,GAAGD,EACJ,UAAWI,EAAWN,EAAW,OAAQE,EAAW,SAAS,EAE7D,SAAA,CAAAK,MAACC,EAAAA,SAAgB,SAAAV,EAAS,EAC1BS,EAAAA,IAACE,EAAAA,QAAA,CAAK,KAAAb,EAAY,cAAY,MAAA,CAAO,CAAA,CAAA,CAAA,CAG3C,EAEAF,EAAgC,gBAAkB,kCAClDA,EAAgC,YAAc"}
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SpiritUnstableAttachmentActionButtonProps } from './types';
3
- declare const UNSTABLE_AttachmentActionButton: {
4
- (props: SpiritUnstableAttachmentActionButtonProps): React.JSX.Element;
5
- spiritComponent: string;
6
- displayName: string;
7
- };
8
- export default UNSTABLE_AttachmentActionButton;
@@ -1,30 +0,0 @@
1
- "use client";
2
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
3
- import p from "classnames";
4
- import { useStyleProps as A } from "../../hooks/styleProps.js";
5
- import l from "../Icon/Icon.js";
6
- import u from "../VisuallyHidden/VisuallyHidden.js";
7
- import { DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME as N } from "./constants.js";
8
- import { useAttachmentStyleProps as T } from "./useAttachmentStyleProps.js";
9
- const s = (r) => {
10
- const { name: e = N, children: n, ...m } = r, { classProps: i } = T(), { styleProps: t, props: a } = A(m);
11
- return /* @__PURE__ */ c(
12
- "button",
13
- {
14
- type: "button",
15
- ...a,
16
- ...t,
17
- className: p(i.button, t.className),
18
- children: [
19
- /* @__PURE__ */ o(u, { children: n }),
20
- /* @__PURE__ */ o(l, { name: e, "aria-hidden": "true" })
21
- ]
22
- }
23
- );
24
- };
25
- s.spiritComponent = "UNSTABLE_AttachmentActionButton";
26
- s.displayName = "UNSTABLE_AttachmentActionButton";
27
- export {
28
- s as default
29
- };
30
- //# sourceMappingURL=UNSTABLE_AttachmentActionButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UNSTABLE_AttachmentActionButton.js","sources":["../../../src/components/UNSTABLE_Attachment/UNSTABLE_AttachmentActionButton.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { Icon } from '../Icon';\nimport { VisuallyHidden } from '../VisuallyHidden';\nimport { DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME } from './constants';\nimport { type SpiritUnstableAttachmentActionButtonProps } from './types';\nimport { useAttachmentStyleProps } from './useAttachmentStyleProps';\n\nconst UNSTABLE_AttachmentActionButton = (props: SpiritUnstableAttachmentActionButtonProps) => {\n const { name = DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME, children, ...restProps } = props;\n const { classProps } = useAttachmentStyleProps();\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n\n return (\n <button\n type=\"button\"\n {...transferProps}\n {...styleProps}\n className={classNames(classProps.button, styleProps.className)}\n >\n <VisuallyHidden>{children}</VisuallyHidden>\n <Icon name={name} aria-hidden=\"true\" />\n </button>\n );\n};\n\nUNSTABLE_AttachmentActionButton.spiritComponent = 'UNSTABLE_AttachmentActionButton';\nUNSTABLE_AttachmentActionButton.displayName = 'UNSTABLE_AttachmentActionButton';\n\nexport default UNSTABLE_AttachmentActionButton;\n"],"names":["UNSTABLE_AttachmentActionButton","props","name","DEFAULT_ATTACHMENT_ACTION_BUTTON_ICON_NAME","children","restProps","classProps","useAttachmentStyleProps","styleProps","transferProps","useStyleProps","jsxs","classNames","jsx","VisuallyHidden","Icon"],"mappings":";;;;;;;;AAWA,MAAMA,IAAkC,CAACC,MAAqD;AAC5F,QAAM,EAAE,MAAAC,IAAOC,GAA4C,UAAAC,GAAU,GAAGC,MAAcJ,GAChF,EAAE,YAAAK,EAAA,IAAeC,EAAA,GACjB,EAAE,YAAAC,GAAY,OAAOC,EAAA,IAAkBC,EAAcL,CAAS;AAEpE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACJ,GAAGF;AAAA,MACH,GAAGD;AAAA,MACJ,WAAWI,EAAWN,EAAW,QAAQE,EAAW,SAAS;AAAA,MAE7D,UAAA;AAAA,QAAA,gBAAAK,EAACC,KAAgB,UAAAV,GAAS;AAAA,QAC1B,gBAAAS,EAACE,GAAA,EAAK,MAAAb,GAAY,eAAY,OAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG3C;AAEAF,EAAgC,kBAAkB;AAClDA,EAAgC,cAAc;"}
@@ -1,2 +0,0 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),c=require("classnames"),a=require("../../hooks/styleProps.cjs"),l=require("../Icon/Icon.cjs"),m=require("../VisuallyHidden/VisuallyHidden.cjs"),p=require("./useAttachmentStyleProps.cjs"),s=r=>{const{children:n,...o}=r,{classProps:u}=p.useAttachmentStyleProps(),{styleProps:e,props:i}=a.useStyleProps(o);return t.jsxs("button",{type:"button",...i,...e,className:c(u.button,e.className),children:[t.jsx(m.default,{children:n}),t.jsx(l.default,{name:"close","aria-hidden":"true"})]})};s.spiritComponent="UNSTABLE_AttachmentDismissButton";s.displayName="UNSTABLE_AttachmentDismissButton";exports.default=s;
2
- //# sourceMappingURL=UNSTABLE_AttachmentDismissButton.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UNSTABLE_AttachmentDismissButton.cjs","sources":["../../../src/components/UNSTABLE_Attachment/UNSTABLE_AttachmentDismissButton.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { Icon } from '../Icon';\nimport { VisuallyHidden } from '../VisuallyHidden';\nimport { type SpiritUnstableAttachmentDismissButtonProps } from './types';\nimport { useAttachmentStyleProps } from './useAttachmentStyleProps';\n\nconst UNSTABLE_AttachmentDismissButton = (props: SpiritUnstableAttachmentDismissButtonProps) => {\n const { children, ...restProps } = props;\n const { classProps } = useAttachmentStyleProps();\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n\n return (\n <button\n type=\"button\"\n {...transferProps}\n {...styleProps}\n className={classNames(classProps.button, styleProps.className)}\n >\n <VisuallyHidden>{children}</VisuallyHidden>\n <Icon name=\"close\" aria-hidden=\"true\" />\n </button>\n );\n};\n\nUNSTABLE_AttachmentDismissButton.spiritComponent = 'UNSTABLE_AttachmentDismissButton';\nUNSTABLE_AttachmentDismissButton.displayName = 'UNSTABLE_AttachmentDismissButton';\n\nexport default UNSTABLE_AttachmentDismissButton;\n"],"names":["UNSTABLE_AttachmentDismissButton","props","children","restProps","classProps","useAttachmentStyleProps","styleProps","transferProps","useStyleProps","jsxs","classNames","jsx","VisuallyHidden","Icon"],"mappings":"yVAUMA,EAAoCC,GAAsD,CAC9F,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAA,EAAcF,EAC7B,CAAE,WAAAG,CAAA,EAAeC,0BAAA,EACjB,CAAA,WAAEC,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,cAAcL,CAAS,EAEpE,OACEM,EAAAA,KAAC,SAAA,CACC,KAAK,SACJ,GAAGF,EACH,GAAGD,EACJ,UAAWI,EAAWN,EAAW,OAAQE,EAAW,SAAS,EAE7D,SAAA,CAAAK,MAACC,EAAAA,SAAgB,SAAAV,EAAS,EAC1BS,EAAAA,IAACE,EAAAA,QAAA,CAAK,KAAK,QAAQ,cAAY,MAAA,CAAO,CAAA,CAAA,CAAA,CAG5C,EAEAb,EAAiC,gBAAkB,mCACnDA,EAAiC,YAAc"}
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SpiritUnstableAttachmentDismissButtonProps } from './types';
3
- declare const UNSTABLE_AttachmentDismissButton: {
4
- (props: SpiritUnstableAttachmentDismissButtonProps): React.JSX.Element;
5
- spiritComponent: string;
6
- displayName: string;
7
- };
8
- export default UNSTABLE_AttachmentDismissButton;