@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 +1 @@
1
- {"version":3,"file":"FileUploaderInput.cjs","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText, useAriaIds } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { DEFAULT_FILE_QUEUE_LIMIT, DEFAULT_FILE_SIZE_LIMIT } from './constants';\nimport { useFileUploaderInput } from './useFileUploaderInput';\nimport { useFileUploaderStyleProps } from './useFileUploaderStyleProps';\n\nconst FileUploaderInput = (props: SpiritFileUploaderInputProps) => {\n const [isDragAndDropSupported, setIsDragAndDropSupported] = useState(false);\n const {\n accept,\n 'aria-describedby': ariaDescribedBy = '',\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isDisabled,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n maxFileSize = DEFAULT_FILE_SIZE_LIMIT,\n maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,\n onError,\n queueLimitBehavior = 'none',\n validationState,\n validationText,\n ...restProps\n } = props;\n const {\n isDisabledByQueueLimitBehavior,\n isDragging,\n isDropZoneHidden,\n onChange,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n } = useFileUploaderInput({\n accept,\n isMultiple,\n maxFileSize,\n maxUploadedFiles,\n onError,\n queueLimitBehavior,\n });\n const { classProps } = useFileUploaderStyleProps({\n hasValidationIcon,\n isDisabled,\n isDisabledByQueueLimitBehavior,\n isDragAndDropSupported,\n isDragging,\n isDropZoneHidden,\n isLabelHidden,\n isRequired,\n queueLimitBehavior,\n validationState,\n });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const [ids, register] = useAriaIds(ariaDescribedBy);\n const ariaDescribedByProp = useAriaDescribedBy(ids);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n\n useEffect(() => {\n setIsDragAndDropSupported('draggable' in document.createElement('span'));\n }, []);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n onDragOver={!isDisabled && isDragAndDropSupported ? onDragOver : undefined}\n onDragEnter={!isDisabled && isDragAndDropSupported ? onDragEnter : undefined}\n onDragLeave={!isDisabled && isDragAndDropSupported ? onDragLeave : undefined}\n onDrop={!isDisabled && isDragAndDropSupported ? onDrop : undefined}\n className={classNames(classProps.input.root, styleProps.className)}\n >\n <Label htmlFor={id} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={id}\n ref={inputRef}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled || isDisabledByQueueLimitBehavior}\n {...restProps}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n <Icon name={iconName} aria-hidden=\"true\" />\n <Label htmlFor={id} UNSAFE_className={classProps.input.dropZone.label}>\n <span className={classProps.input.link}>{linkText}</span>\n &nbsp;\n <span className={classProps.input.dropLabel}>{labelText}</span>\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${id}__helperText`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"span\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${id}__validationText`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n );\n};\n\nFileUploaderInput.spiritComponent = 'FileUploaderInput';\n\nexport default FileUploaderInput;\n"],"names":["FileUploaderInput","props","isDragAndDropSupported","setIsDragAndDropSupported","useState","accept","ariaDescribedBy","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isDisabled","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","maxFileSize","DEFAULT_FILE_SIZE_LIMIT","maxUploadedFiles","DEFAULT_FILE_QUEUE_LIMIT","onError","queueLimitBehavior","validationState","validationText","restProps","isDisabledByQueueLimitBehavior","isDragging","isDropZoneHidden","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploaderInput","classProps","useFileUploaderStyleProps","styleProps","transferProps","useStyleProps","ids","register","useAriaIds","ariaDescribedByProp","useAriaDescribedBy","validationTextRole","useValidationTextRole","useEffect","jsxs","classNames","jsx","Label","Icon","HelperText","ValidationText"],"mappings":"qnBAaMA,EAAqBC,GAAwC,CACjE,KAAM,CAACC,EAAwBC,CAAyB,EAAIC,EAAAA,SAAS,EAAK,EACpE,CACJ,OAAAC,EACA,mBAAoBC,EAAkB,GACtC,YA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X,EAAyBkC,EAAS,OACzD,UAAWgB,EAAWd,EAAW,MAAM,KAAME,EAAW,SAAS,EAEjE,SAAA,CAAAa,EAAAA,IAACC,EAAAA,SAAM,QAAS3C,EAAI,iBAAkB2B,EAAW,MAAM,MACpD,SAAArB,CAAA,CACH,EACAoC,EAAAA,IAAC,QAAA,CACE,GAAGP,EACJ,KAAK,OACL,OAAAzC,EACA,GAAAM,EACA,IAAKC,EACL,UAAW0B,EAAW,MAAM,MAC5B,SAAAN,EACA,SAAUjB,EACV,SAAUF,GAAcgB,EACvB,GAAGD,CAAA,CAAA,EAENuB,EAAAA,KAAC,OAAI,IAAK5C,EAAa,UAAW+B,EAAW,MAAM,SAAS,KAC1D,SAAA,CAAAe,EAAAA,IAACE,EAAAA,QAAA,CAAK,KAAM7C,EAAU,cAAY,OAAO,EACzCyC,EAAAA,KAACG,EAAAA,SAAM,QAAS3C,EAAI,iBAAkB2B,EAAW,MAAM,SAAS,MAC9D,SAAA,CAAAe,MAAC,OAAA,CAAK,UAAWf,EAAW,MAAM,KAAO,SAAAnB,EAAS,EAAO,UAExD,OAAA,CAAK,UAAWmB,EAAW,MAAM,UAAY,SAAApB,CAAA,CAAU,CAAA,EAC1D,EACAmC,EAAAA,IAACG,EAAAA,QAAA,CACC,iBAAkBlB,EAAW,MAAM,OACnC,GAAI,GAAG3B,CAAE,eACT,aAAciC,EACd,WAAAnC,CAAA,CAAA,CACF,EACF,EACCiB,GACC2B,EAAAA,IAACI,EAAAA,QAAA,CACC,iBAAkBnB,EAAW,MAAM,eACnC,YAAY,OACX,GAAI9B,GAAqB,CAAE,uBAAwBkB,CAAA,EACpD,GAAI,GAAGf,CAAE,mBACT,eAAAgB,EACA,aAAciB,EACd,KAAMI,CAAA,CAAA,CACR,CAAA,CAAA,CAIR,EAEAhD,EAAkB,gBAAkB"}
1
+ {"version":3,"file":"FileUploaderInput.cjs","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { DEFAULT_FILE_QUEUE_LIMIT, DEFAULT_FILE_SIZE_LIMIT } from './constants';\nimport { useFileUploaderInput } from './useFileUploaderInput';\nimport { useFileUploaderStyleProps } from './useFileUploaderStyleProps';\n\nconst FileUploaderInput = (props: SpiritFileUploaderInputProps) => {\n const [isDragAndDropSupported, setIsDragAndDropSupported] = useState(false);\n const {\n accept,\n 'aria-describedby': ariaDescribedBy = '',\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isDisabled,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n maxFileSize = DEFAULT_FILE_SIZE_LIMIT,\n maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,\n name,\n onError,\n queueLimitBehavior = 'none',\n validationState,\n validationText,\n ...restProps\n } = props;\n const {\n isDisabledByQueueLimitBehavior,\n isDragging,\n isDropZoneHidden,\n onChange,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n } = useFileUploaderInput({\n accept,\n isMultiple,\n maxFileSize,\n maxUploadedFiles,\n onError,\n queueLimitBehavior,\n });\n const { classProps } = useFileUploaderStyleProps({\n hasValidationIcon,\n isDisabled,\n isDisabledByQueueLimitBehavior,\n isDragAndDropSupported,\n isDragging,\n isDropZoneHidden,\n isLabelHidden,\n isRequired,\n queueLimitBehavior,\n validationState,\n });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n\n useEffect(() => {\n setIsDragAndDropSupported('draggable' in document.createElement('span'));\n }, []);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n onDragOver={!isDisabled && isDragAndDropSupported ? onDragOver : undefined}\n onDragEnter={!isDisabled && isDragAndDropSupported ? onDragEnter : undefined}\n onDragLeave={!isDisabled && isDragAndDropSupported ? onDragLeave : undefined}\n onDrop={!isDisabled && isDragAndDropSupported ? onDrop : undefined}\n className={classNames(classProps.input.root, styleProps.className)}\n >\n <Label htmlFor={id} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={id}\n ref={inputRef}\n name={name}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled || isDisabledByQueueLimitBehavior}\n {...restProps}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n <Icon name={iconName} aria-hidden=\"true\" />\n <Label htmlFor={id} UNSAFE_className={classProps.input.dropZone.label}>\n <span className={classProps.input.link}>{linkText}</span>\n &nbsp;\n <span className={classProps.input.dropLabel}>{labelText}</span>\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${id}__helperText`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"span\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${id}__validationText`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n );\n};\n\nFileUploaderInput.spiritComponent = 'FileUploaderInput';\n\nexport default FileUploaderInput;\n"],"names":["FileUploaderInput","props","isDragAndDropSupported","setIsDragAndDropSupported","useState","accept","ariaDescribedBy","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isDisabled","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","maxFileSize","DEFAULT_FILE_SIZE_LIMIT","maxUploadedFiles","DEFAULT_FILE_QUEUE_LIMIT","name","onError","queueLimitBehavior","validationState","validationText","restProps","isDisabledByQueueLimitBehavior","isDragging","isDropZoneHidden","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploaderInput","classProps","useFileUploaderStyleProps","styleProps","transferProps","useStyleProps","ariaDescribedByProp","register","useAriaDescribedBy","validationTextRole","useValidationTextRole","useEffect","jsxs","classNames","jsx","Label","Icon","HelperText","ValidationText"],"mappings":"0kBAaMA,EAAqBC,GAAwC,CACjE,KAAM,CAACC,EAAwBC,CAAyB,EAAIC,EAAAA,SAAS,EAAK,EACpE,CACJ,OAAAC,EACA,mBAAoBC,EAAkB,GACtC,YAAAC,EACA,kBAAAC,EACA,WAAAC,EACA,SAAAC,EAAW,SACX,GAAAC,EACA,SAAAC,EACA,WAAAC,EACA,cAAAC,EACA,WAAAC,EACA,WAAAC,EACA,MAAAC,EACA,UAAAC,EACA,SAAAC,EACA,YAAAC,EAAcC,EAAAA,wBACd,iBAAAC,EAAmBC,EAAAA,yBACnB,KAAAC,EACA,QAAAC,EACA,mBAAAC,EAAqB,OACrB,gBAAAC,EACA,eAAAC,EACA,GAAGC,CAAA,EACD5B,EACE,CACJ,+BAAA6B,EACA,WAAAC,EACA,iBAAAC,EACA,SAAAC,EACA,YAAAC,EACA,YAAAC,EACA,WAAAC,EACA,OAAAC,CAAA,EACEC,uBAAqB,CACvB,OAAAjC,EACA,WAAAU,EACA,YAAAK,EACA,iBAAAE,EACA,QAAAG,EACA,mBAAAC,CAAA,CACD,EACK,CAAE,WAAAa,CAAA,EAAeC,4BAA0B,CAE/C,WAAA3B,EACA,+BAAAiB,EACA,uBAAA5B,EACA,WAAA6B,EACA,iBAAAC,EACA,cAAAlB,EACA,WAAAE,EACA,mBAAAU,EACA,gBAAAC,CAAA,CACD,EACK,CAAA,WAAEc,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,cAAcd,CAAS,EAC9D,CAACe,EAAqBC,CAAQ,EAAIC,EAAAA,mBAAmBxC,CAAe,EACpEyC,EAAqBC,EAAAA,sBAAsB,CAC/C,gBAAArB,EACA,eAAAC,CAAA,CACD,EAEDqB,OAA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ACC,iBAAkBjB,EAAW,MAAM,eACnC,YAAY,OACX,GAAI/B,GAAqB,CAAE,uBAAwBmB,CAAA,EACpD,GAAI,GAAGhB,CAAE,mBACT,eAAAiB,EACA,aAAciB,EACd,KAAME,CAAA,CAAA,CACR,CAAA,CAAA,CAIR,EAEA/C,EAAkB,gBAAkB"}
@@ -3,17 +3,16 @@ import { jsxs as s, jsx as r } from "react/jsx-runtime";
3
3
  import O from "classnames";
4
4
  import { useState as Q, useEffect as $ } from "react";
5
5
  import { useStyleProps as z } from "../../hooks/styleProps.js";
6
- import { useAriaDescribedBy as w } from "../../hooks/useAriaDescribedBy.js";
6
+ import { useAriaDescribedBy as w } from "../../hooks/useAriaIdRefs.js";
7
7
  import G from "../Field/HelperText.js";
8
8
  import D from "../Field/Label.js";
9
- import J from "../Field/useAriaIds.js";
10
- import K from "../Field/ValidationText.js";
11
- import { useValidationTextRole as W } from "../Field/useValidationTextRole.js";
12
- import X from "../Icon/Icon.js";
13
- import { DEFAULT_FILE_SIZE_LIMIT as Y, DEFAULT_FILE_QUEUE_LIMIT as ee } from "./constants.js";
14
- import { useFileUploaderInput as re } from "./useFileUploaderInput.js";
15
- import { useFileUploaderStyleProps as ie } from "./useFileUploaderStyleProps.js";
16
- const oe = (g) => {
9
+ import J from "../Field/ValidationText.js";
10
+ import { useValidationTextRole as K } from "../Field/useValidationTextRole.js";
11
+ import W from "../Icon/Icon.js";
12
+ import { DEFAULT_FILE_SIZE_LIMIT as X, DEFAULT_FILE_QUEUE_LIMIT as Y } from "./constants.js";
13
+ import { useFileUploaderInput as ee } from "./useFileUploaderInput.js";
14
+ import { useFileUploaderStyleProps as re } from "./useFileUploaderStyleProps.js";
15
+ const ie = (g) => {
17
16
  const [o, h] = Q(!1), {
18
17
  accept: n,
19
18
  "aria-describedby": v = "",
@@ -30,40 +29,41 @@ const oe = (g) => {
30
29
  label: _,
31
30
  labelText: L,
32
31
  linkText: S,
33
- maxFileSize: U = Y,
34
- maxUploadedFiles: A = ee,
35
- onError: y,
32
+ maxFileSize: U = X,
33
+ maxUploadedFiles: A = Y,
34
+ name: y,
35
+ onError: P,
36
36
  queueLimitBehavior: p = "none",
37
37
  validationState: t,
38
38
  validationText: d,
39
39
  ...m
40
40
  } = g, {
41
41
  isDisabledByQueueLimitBehavior: c,
42
- isDragging: P,
43
- isDropZoneHidden: B,
44
- onChange: R,
45
- onDragEnter: Z,
46
- onDragLeave: V,
47
- onDragOver: H,
48
- onDrop: M
49
- } = re({
42
+ isDragging: B,
43
+ isDropZoneHidden: R,
44
+ onChange: Z,
45
+ onDragEnter: V,
46
+ onDragLeave: H,
47
+ onDragOver: M,
48
+ onDrop: j
49
+ } = ee({
50
50
  accept: n,
51
51
  isMultiple: l,
52
52
  maxFileSize: U,
53
53
  maxUploadedFiles: A,
54
- onError: y,
54
+ onError: P,
55
55
  queueLimitBehavior: p
56
- }), { classProps: e } = ie({
56
+ }), { classProps: e } = re({
57
57
  isDisabled: i,
58
58
  isDisabledByQueueLimitBehavior: c,
59
59
  isDragAndDropSupported: o,
60
- isDragging: P,
61
- isDropZoneHidden: B,
60
+ isDragging: B,
61
+ isDropZoneHidden: R,
62
62
  isLabelHidden: T,
63
63
  isRequired: I,
64
64
  queueLimitBehavior: p,
65
65
  validationState: t
66
- }), { styleProps: u, props: j } = z(m), [k, f] = J(v), q = w(k), C = W({
66
+ }), { styleProps: u, props: k } = z(m), [q, f] = w(v), C = K({
67
67
  validationState: t,
68
68
  validationText: d
69
69
  });
@@ -72,12 +72,12 @@ const oe = (g) => {
72
72
  }, []), /* @__PURE__ */ s(
73
73
  "div",
74
74
  {
75
- ...j,
75
+ ...k,
76
76
  ...u,
77
- onDragOver: !i && o ? H : void 0,
78
- onDragEnter: !i && o ? Z : void 0,
79
- onDragLeave: !i && o ? V : void 0,
80
- onDrop: !i && o ? M : void 0,
77
+ onDragOver: !i && o ? M : void 0,
78
+ onDragEnter: !i && o ? V : void 0,
79
+ onDragLeave: !i && o ? H : void 0,
80
+ onDrop: !i && o ? j : void 0,
81
81
  className: O(e.input.root, u.className),
82
82
  children: [
83
83
  /* @__PURE__ */ r(D, { htmlFor: a, UNSAFE_className: e.input.label, children: _ }),
@@ -89,15 +89,16 @@ const oe = (g) => {
89
89
  accept: n,
90
90
  id: a,
91
91
  ref: N,
92
+ name: y,
92
93
  className: e.input.input,
93
- onChange: R,
94
+ onChange: Z,
94
95
  multiple: l,
95
96
  disabled: i || c,
96
97
  ...m
97
98
  }
98
99
  ),
99
100
  /* @__PURE__ */ s("div", { ref: b, className: e.input.dropZone.root, children: [
100
- /* @__PURE__ */ r(X, { name: F, "aria-hidden": "true" }),
101
+ /* @__PURE__ */ r(W, { name: F, "aria-hidden": "true" }),
101
102
  /* @__PURE__ */ s(D, { htmlFor: a, UNSAFE_className: e.input.dropZone.label, children: [
102
103
  /* @__PURE__ */ r("span", { className: e.input.link, children: S }),
103
104
  " ",
@@ -114,7 +115,7 @@ const oe = (g) => {
114
115
  )
115
116
  ] }),
116
117
  t && /* @__PURE__ */ r(
117
- K,
118
+ J,
118
119
  {
119
120
  UNSAFE_className: e.input.validationText,
120
121
  elementType: "span",
@@ -129,8 +130,8 @@ const oe = (g) => {
129
130
  }
130
131
  );
131
132
  };
132
- oe.spiritComponent = "FileUploaderInput";
133
+ ie.spiritComponent = "FileUploaderInput";
133
134
  export {
134
- oe as default
135
+ ie as default
135
136
  };
136
137
  //# sourceMappingURL=FileUploaderInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploaderInput.js","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText, useAriaIds } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { DEFAULT_FILE_QUEUE_LIMIT, DEFAULT_FILE_SIZE_LIMIT } from './constants';\nimport { useFileUploaderInput } from './useFileUploaderInput';\nimport { useFileUploaderStyleProps } from './useFileUploaderStyleProps';\n\nconst FileUploaderInput = (props: SpiritFileUploaderInputProps) => {\n const [isDragAndDropSupported, setIsDragAndDropSupported] = useState(false);\n const {\n accept,\n 'aria-describedby': ariaDescribedBy = '',\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isDisabled,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n maxFileSize = DEFAULT_FILE_SIZE_LIMIT,\n maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,\n onError,\n queueLimitBehavior = 'none',\n validationState,\n validationText,\n ...restProps\n } = props;\n const {\n isDisabledByQueueLimitBehavior,\n isDragging,\n isDropZoneHidden,\n onChange,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n } = useFileUploaderInput({\n accept,\n isMultiple,\n maxFileSize,\n maxUploadedFiles,\n onError,\n queueLimitBehavior,\n });\n const { classProps } = useFileUploaderStyleProps({\n hasValidationIcon,\n isDisabled,\n isDisabledByQueueLimitBehavior,\n isDragAndDropSupported,\n isDragging,\n isDropZoneHidden,\n isLabelHidden,\n isRequired,\n queueLimitBehavior,\n validationState,\n });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const [ids, register] = useAriaIds(ariaDescribedBy);\n const ariaDescribedByProp = useAriaDescribedBy(ids);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n\n useEffect(() => {\n setIsDragAndDropSupported('draggable' in document.createElement('span'));\n }, []);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n onDragOver={!isDisabled && isDragAndDropSupported ? onDragOver : undefined}\n onDragEnter={!isDisabled && isDragAndDropSupported ? onDragEnter : undefined}\n onDragLeave={!isDisabled && isDragAndDropSupported ? onDragLeave : undefined}\n onDrop={!isDisabled && isDragAndDropSupported ? onDrop : undefined}\n className={classNames(classProps.input.root, styleProps.className)}\n >\n <Label htmlFor={id} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={id}\n ref={inputRef}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled || isDisabledByQueueLimitBehavior}\n {...restProps}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n <Icon name={iconName} aria-hidden=\"true\" />\n <Label htmlFor={id} UNSAFE_className={classProps.input.dropZone.label}>\n <span className={classProps.input.link}>{linkText}</span>\n &nbsp;\n <span className={classProps.input.dropLabel}>{labelText}</span>\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${id}__helperText`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"span\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${id}__validationText`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n );\n};\n\nFileUploaderInput.spiritComponent = 'FileUploaderInput';\n\nexport default FileUploaderInput;\n"],"names":["FileUploaderInput","props","isDragAndDropSupported","setIsDragAndDropSupported","useState","accept","ariaDescribedBy","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isDisabled","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","maxFileSize","DEFAULT_FILE_SIZE_LIMIT","maxUploadedFiles","DEFAULT_FILE_QUEUE_LIMIT","onError","queueLimitBehavior","validationState","validationText","restProps","isDisabledByQueueLimitBehavior","isDragging","isDropZoneHidden","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploaderInput","classProps","useFileUploaderStyleProps","styleProps","transferProps","useStyleProps","ids","register","useAriaIds","ariaDescribedByProp","useAriaDescribedBy","validationTextRole","useValidationTextRole","useEffect","jsxs","classNames","jsx","Label","Icon","HelperText","ValidationText"],"mappings":";;;;;;;;;;;;;;;A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AAS;AAAA,YAAO;AAAA,8BAExD,QAAA,EAAK,WAAWmB,EAAW,MAAM,WAAY,UAAApB,EAAA,CAAU;AAAA,UAAA,GAC1D;AAAA,UACA,gBAAAmC;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,kBAAkBlB,EAAW,MAAM;AAAA,cACnC,IAAI,GAAG3B,CAAE;AAAA,cACT,cAAciC;AAAA,cACd,YAAAnC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,GACF;AAAA,QACCiB,KACC,gBAAA2B;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,kBAAkBnB,EAAW,MAAM;AAAA,YACnC,aAAY;AAAA,YACX,GAAI9B,KAAqB,EAAE,wBAAwBkB,EAAA;AAAA,YACpD,IAAI,GAAGf,CAAE;AAAA,YACT,gBAAAgB;AAAA,YACA,cAAciB;AAAA,YACd,MAAMI;AAAA,UAAA;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,EAAA;AAIR;AAEAhD,GAAkB,kBAAkB;"}
1
+ {"version":3,"file":"FileUploaderInput.js","sources":["../../../src/components/FileUploader/FileUploaderInput.tsx"],"sourcesContent":["'use client';\n\nimport classNames from 'classnames';\nimport React, { useEffect, useState } from 'react';\nimport { useAriaDescribedBy, useStyleProps } from '../../hooks';\nimport { type SpiritFileUploaderInputProps } from '../../types';\nimport { HelperText, Label, ValidationText } from '../Field';\nimport { useValidationTextRole } from '../Field/useValidationTextRole';\nimport { Icon } from '../Icon';\nimport { DEFAULT_FILE_QUEUE_LIMIT, DEFAULT_FILE_SIZE_LIMIT } from './constants';\nimport { useFileUploaderInput } from './useFileUploaderInput';\nimport { useFileUploaderStyleProps } from './useFileUploaderStyleProps';\n\nconst FileUploaderInput = (props: SpiritFileUploaderInputProps) => {\n const [isDragAndDropSupported, setIsDragAndDropSupported] = useState(false);\n const {\n accept,\n 'aria-describedby': ariaDescribedBy = '',\n dropZoneRef,\n hasValidationIcon,\n helperText,\n iconName = 'upload',\n id,\n inputRef,\n isDisabled,\n isLabelHidden,\n isMultiple,\n isRequired,\n label,\n labelText,\n linkText,\n maxFileSize = DEFAULT_FILE_SIZE_LIMIT,\n maxUploadedFiles = DEFAULT_FILE_QUEUE_LIMIT,\n name,\n onError,\n queueLimitBehavior = 'none',\n validationState,\n validationText,\n ...restProps\n } = props;\n const {\n isDisabledByQueueLimitBehavior,\n isDragging,\n isDropZoneHidden,\n onChange,\n onDragEnter,\n onDragLeave,\n onDragOver,\n onDrop,\n } = useFileUploaderInput({\n accept,\n isMultiple,\n maxFileSize,\n maxUploadedFiles,\n onError,\n queueLimitBehavior,\n });\n const { classProps } = useFileUploaderStyleProps({\n hasValidationIcon,\n isDisabled,\n isDisabledByQueueLimitBehavior,\n isDragAndDropSupported,\n isDragging,\n isDropZoneHidden,\n isLabelHidden,\n isRequired,\n queueLimitBehavior,\n validationState,\n });\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const [ariaDescribedByProp, register] = useAriaDescribedBy(ariaDescribedBy);\n const validationTextRole = useValidationTextRole({\n validationState,\n validationText,\n });\n\n useEffect(() => {\n setIsDragAndDropSupported('draggable' in document.createElement('span'));\n }, []);\n\n return (\n <div\n {...transferProps}\n {...styleProps}\n onDragOver={!isDisabled && isDragAndDropSupported ? onDragOver : undefined}\n onDragEnter={!isDisabled && isDragAndDropSupported ? onDragEnter : undefined}\n onDragLeave={!isDisabled && isDragAndDropSupported ? onDragLeave : undefined}\n onDrop={!isDisabled && isDragAndDropSupported ? onDrop : undefined}\n className={classNames(classProps.input.root, styleProps.className)}\n >\n <Label htmlFor={id} UNSAFE_className={classProps.input.label}>\n {label}\n </Label>\n <input\n {...ariaDescribedByProp}\n type=\"file\"\n accept={accept}\n id={id}\n ref={inputRef}\n name={name}\n className={classProps.input.input}\n onChange={onChange}\n multiple={isMultiple}\n disabled={isDisabled || isDisabledByQueueLimitBehavior}\n {...restProps}\n />\n <div ref={dropZoneRef} className={classProps.input.dropZone.root}>\n <Icon name={iconName} aria-hidden=\"true\" />\n <Label htmlFor={id} UNSAFE_className={classProps.input.dropZone.label}>\n <span className={classProps.input.link}>{linkText}</span>\n &nbsp;\n <span className={classProps.input.dropLabel}>{labelText}</span>\n </Label>\n <HelperText\n UNSAFE_className={classProps.input.helper}\n id={`${id}__helperText`}\n registerAria={register}\n helperText={helperText}\n />\n </div>\n {validationState && (\n <ValidationText\n UNSAFE_className={classProps.input.validationText}\n elementType=\"span\"\n {...(hasValidationIcon && { hasValidationStateIcon: validationState })}\n id={`${id}__validationText`}\n validationText={validationText}\n registerAria={register}\n role={validationTextRole}\n />\n )}\n </div>\n );\n};\n\nFileUploaderInput.spiritComponent = 'FileUploaderInput';\n\nexport default FileUploaderInput;\n"],"names":["FileUploaderInput","props","isDragAndDropSupported","setIsDragAndDropSupported","useState","accept","ariaDescribedBy","dropZoneRef","hasValidationIcon","helperText","iconName","id","inputRef","isDisabled","isLabelHidden","isMultiple","isRequired","label","labelText","linkText","maxFileSize","DEFAULT_FILE_SIZE_LIMIT","maxUploadedFiles","DEFAULT_FILE_QUEUE_LIMIT","name","onError","queueLimitBehavior","validationState","validationText","restProps","isDisabledByQueueLimitBehavior","isDragging","isDropZoneHidden","onChange","onDragEnter","onDragLeave","onDragOver","onDrop","useFileUploaderInput","classProps","useFileUploaderStyleProps","styleProps","transferProps","useStyleProps","ariaDescribedByProp","register","useAriaDescribedBy","validationTextRole","useValidationTextRole","useEffect","jsxs","classNames","jsx","Label","Icon","HelperText","ValidationText"],"mappings":";;;;;;;;;;;;;;AAaA,MAAMA,KAAoB,CAACC,MAAwC;AACjE,QAAM,CAACC,GAAwBC,CAAyB,IAAIC,EAAS,EAAK,GACpE;AAAA,IACJ,QAAAC;AAAA,IACA,oBAAoBC,IAAkB;AAAA,IACtC,aAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,IAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,Y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CkB,KACC,gBAAAyB;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,kBAAkBjB,EAAW,MAAM;AAAA,YACnC,aAAY;AAAA,YACX,GAAI/B,KAAqB,EAAE,wBAAwBmB,EAAA;AAAA,YACpD,IAAI,GAAGhB,CAAE;AAAA,YACT,gBAAAiB;AAAA,YACA,cAAciB;AAAA,YACd,MAAME;AAAA,UAAA;AAAA,QAAA;AAAA,MACR;AAAA,IAAA;AAAA,EAAA;AAIR;AAEA/C,GAAkB,kBAAkB;"}
@@ -1,2 +1,2 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),P=require("react"),y=require("../../hooks/styleProps.cjs"),g=require("../../utils/mergeStyleProps.cjs"),m=require("./useHeaderStyleProps.cjs"),S=(t,o)=>{const{elementType:n="a",children:i,isCurrent:l,...a}=t,r=n,{classProps:p}=m.useHeaderStyleProps({isCurrentLink:l}),{styleProps:u,props:s}=y.useStyleProps(a),c=g.mergeStyleProps(r,{classProps:p.headerDialogLink,styleProps:u,otherProps:s});return d.jsx(r,{...s,...c,ref:o,children:i})},e=P.forwardRef(S);e.spiritComponent="HeaderDialogLink";e.displayName="HeaderDialogLink";exports.default=e;
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react/jsx-runtime"),k=require("react"),g=require("../../hooks/styleProps.cjs"),m=require("../../hooks/useLinkClick.cjs"),C=require("../../utils/mergeStyleProps.cjs"),L=require("./useHeaderStyleProps.cjs"),S=(t,n)=>{const{elementType:i="a",children:l,isCurrent:c,routerOptions:u,...r}=t,s=i,{classProps:a}=L.useHeaderStyleProps({isCurrentLink:c}),{styleProps:p,props:o}=g.useStyleProps(r),d=C.mergeStyleProps(s,{classProps:a.headerDialogLink,styleProps:p,otherProps:o}),P=m.useLinkClick({...r,routerOptions:u});return y.jsx(s,{...o,...d,onClick:P,ref:n,children:l})},e=k.forwardRef(S);e.spiritComponent="HeaderDialogLink";e.displayName="HeaderDialogLink";exports.default=e;
2
2
  //# sourceMappingURL=HeaderDialogLink.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderDialogLink.cjs","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderDialogLink","forwardRef"],"mappings":"6SAaMA,EAAoB,CACxBC,EACAC,IACgB,CAChB,KAAM,CAAE,YAAAC,EAAc,IAAK,SAAAC,EAAU,UAAAC,EAAW,GAAGC,GAAcL,EAE3DM,EAAYJ,EAEZ,CAAE,WAAAK,CAAA,EAAeC,EAAAA,oBAAoB,CAAE,cAAeJ,EAAW,EACjE,CAAA,WAAEK,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcN,CAAS,EAC3DO,EAAmBC,EAAAA,gBAAgBP,EAAW,CAClD,WAAYC,EAAW,iBAAA,WACvBE,EACA,WAAAC,CAAA,CACD,EAED,aACGJ,EAAA,CAAW,GAAGI,EAAa,GAAGE,EAAkB,IAAAX,EAC9C,SAAAE,EACH,CAEJ,EAEMW,EAAmBC,EAAAA,WACvBhB,CACF,EAEAe,EAAiB,gBAAkB,mBACnCA,EAAiB,YAAc"}
1
+ {"version":3,"file":"HeaderDialogLink.cjs","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderDialogLink","forwardRef"],"mappings":"uVAaMA,EAAoB,CACxBC,EACAC,IACgB,CAChB,KAAM,CAAE,YAAAC,EAAc,IAAK,SAAAC,EAAU,UAAAC,EAAW,cAAAC,EAAe,GAAGC,GAAcN,EAE1EO,EAAYL,EAEZ,CAAE,WAAAM,CAAA,EAAeC,EAAAA,oBAAoB,CAAE,cAAeL,EAAW,EACjE,CAAA,WAAEM,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcN,CAAS,EAC3DO,EAAmBC,EAAAA,gBAAgBP,EAAW,CAClD,WAAYC,EAAW,iBAAA,WACvBE,EACA,WAAAC,CAAA,CACD,EAEKI,EAAcC,EAAAA,aAAa,CAAE,GAAGV,EAAW,cAAAD,EAAe,EAEhE,OACEY,MAACV,GAAW,GAAGI,EAAa,GAAGE,EAAkB,QAASE,EAAa,IAAAd,EACpE,SAAAE,EACH,CAEJ,EAEMe,EAAmBC,EAAAA,WACvBpB,CACF,EAEAmB,EAAiB,gBAAkB,mBACnCA,EAAiB,YAAc"}
@@ -1,22 +1,23 @@
1
1
  "use client";
2
- import { jsx as d } from "react/jsx-runtime";
3
- import { forwardRef as P } from "react";
4
- import { useStyleProps as f } from "../../hooks/styleProps.js";
5
- import { mergeStyleProps as u } from "../../utils/mergeStyleProps.js";
6
- import { useHeaderStyleProps as g } from "./useHeaderStyleProps.js";
7
- const y = (s, t) => {
8
- const { elementType: i = "a", children: n, isCurrent: p, ...a } = s, e = i, { classProps: l } = g({ isCurrentLink: p }), { styleProps: m, props: r } = f(a), c = u(e, {
9
- classProps: l.headerDialogLink,
10
- styleProps: m,
11
- otherProps: r
12
- });
13
- return /* @__PURE__ */ d(e, { ...r, ...c, ref: t, children: n });
14
- }, o = P(
15
- y
2
+ import { jsx as u } from "react/jsx-runtime";
3
+ import { forwardRef as f } from "react";
4
+ import { useStyleProps as P } from "../../hooks/styleProps.js";
5
+ import { useLinkClick as g } from "../../hooks/useLinkClick.js";
6
+ import { mergeStyleProps as y } from "../../utils/mergeStyleProps.js";
7
+ import { useHeaderStyleProps as C } from "./useHeaderStyleProps.js";
8
+ const L = (t, i) => {
9
+ const { elementType: n = "a", children: p, isCurrent: l, routerOptions: a, ...r } = t, e = n, { classProps: m } = C({ isCurrentLink: l }), { styleProps: c, props: o } = P(r), d = y(e, {
10
+ classProps: m.headerDialogLink,
11
+ styleProps: c,
12
+ otherProps: o
13
+ }), k = g({ ...r, routerOptions: a });
14
+ return /* @__PURE__ */ u(e, { ...o, ...d, onClick: k, ref: i, children: p });
15
+ }, s = f(
16
+ L
16
17
  );
17
- o.spiritComponent = "HeaderDialogLink";
18
- o.displayName = "HeaderDialogLink";
18
+ s.spiritComponent = "HeaderDialogLink";
19
+ s.displayName = "HeaderDialogLink";
19
20
  export {
20
- o as default
21
+ s as default
21
22
  };
22
23
  //# sourceMappingURL=HeaderDialogLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderDialogLink.js","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderDialogLink","forwardRef"],"mappings":";;;;;;AAaA,MAAMA,IAAoB,CACxBC,GACAC,MACgB;AAChB,QAAM,EAAE,aAAAC,IAAc,KAAK,UAAAC,GAAU,WAAAC,GAAW,GAAGC,MAAcL,GAE3DM,IAAYJ,GAEZ,EAAE,YAAAK,EAAA,IAAeC,EAAoB,EAAE,eAAeJ,GAAW,GACjE,EAAE,YAAAK,GAAY,OAAOC,EAAA,IAAeC,EAAcN,CAAS,GAC3DO,IAAmBC,EAAgBP,GAAW;AAAA,IAClD,YAAYC,EAAW;AAAA,IACvB,YAAAE;AAAA,IACA,YAAAC;AAAA,EAAA,CACD;AAED,2BACGJ,GAAA,EAAW,GAAGI,GAAa,GAAGE,GAAkB,KAAAX,GAC9C,UAAAE,GACH;AAEJ,GAEMW,IAAmBC;AAAA,EACvBhB;AACF;AAEAe,EAAiB,kBAAkB;AACnCA,EAAiB,cAAc;"}
1
+ {"version":3,"file":"HeaderDialogLink.js","sources":["../../../src/components/Header/HeaderDialogLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderDialogLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritDialogHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderDialogLink = <E extends ElementType = 'a'>(\n props: SpiritDialogHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerDialogLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderDialogLink = forwardRef<HTMLAnchorElement, SpiritDialogHeaderLinkProps<'a'>>(\n _HeaderDialogLink,\n) as unknown as PolymorphicComponent<'a', HeaderDialogLinkProps>;\n\nHeaderDialogLink.spiritComponent = 'HeaderDialogLink';\nHeaderDialogLink.displayName = 'HeaderDialogLink';\n\nexport default HeaderDialogLink;\n"],"names":["_HeaderDialogLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderDialogLink","forwardRef"],"mappings":";;;;;;;AAaA,MAAMA,IAAoB,CACxBC,GACAC,MACgB;AAChB,QAAM,EAAE,aAAAC,IAAc,KAAK,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,GAAGC,MAAcN,GAE1EO,IAAYL,GAEZ,EAAE,YAAAM,EAAA,IAAeC,EAAoB,EAAE,eAAeL,GAAW,GACjE,EAAE,YAAAM,GAAY,OAAOC,EAAA,IAAeC,EAAcN,CAAS,GAC3DO,IAAmBC,EAAgBP,GAAW;AAAA,IAClD,YAAYC,EAAW;AAAA,IACvB,YAAAE;AAAA,IACA,YAAAC;AAAA,EAAA,CACD,GAEKI,IAAcC,EAAa,EAAE,GAAGV,GAAW,eAAAD,GAAe;AAEhE,SACE,gBAAAY,EAACV,KAAW,GAAGI,GAAa,GAAGE,GAAkB,SAASE,GAAa,KAAAd,GACpE,UAAAE,GACH;AAEJ,GAEMe,IAAmBC;AAAA,EACvBpB;AACF;AAEAmB,EAAiB,kBAAkB;AACnCA,EAAiB,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),P=require("react"),y=require("../../hooks/styleProps.cjs"),m=require("../../utils/mergeStyleProps.cjs"),S=require("./useHeaderStyleProps.cjs"),k=(t,o)=>{const{elementType:n="a",children:i,isCurrent:l,...p}=t,r=n,{classProps:u}=S.useHeaderStyleProps({isCurrentLink:l}),{styleProps:c,props:s}=y.useStyleProps(p),a=m.mergeStyleProps(r,{classProps:u.headerLink,styleProps:c,otherProps:s});return d.jsx(r,{...s,...a,ref:o,children:i})},e=P.forwardRef(k);e.spiritComponent="HeaderLink";e.displayName="HeaderLink";exports.default=e;
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react/jsx-runtime"),m=require("react"),C=require("../../hooks/styleProps.cjs"),L=require("../../hooks/useLinkClick.cjs"),S=require("../../utils/mergeStyleProps.cjs"),q=require("./useHeaderStyleProps.cjs"),H=(o,n)=>{const{elementType:i="a",children:c,isCurrent:l,routerOptions:u,...e}=o,{href:p}=e,s=i,{classProps:a}=q.useHeaderStyleProps({isCurrentLink:l}),{styleProps:d,props:t}=C.useStyleProps(e),P=S.mergeStyleProps(s,{classProps:a.headerLink,styleProps:d,otherProps:t}),y=L.useLinkClick({...e,routerOptions:u});return k.jsx(s,{...t,...P,href:p,onClick:y,ref:n,children:c})},r=m.forwardRef(H);r.spiritComponent="HeaderLink";r.displayName="HeaderLink";exports.default=r;
2
2
  //# sourceMappingURL=HeaderLink.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderLink.cjs","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderLink","forwardRef"],"mappings":"6SAaMA,EAAc,CAClBC,EACAC,IACgB,CAChB,KAAM,CAAE,YAAAC,EAAc,IAAK,SAAAC,EAAU,UAAAC,EAAW,GAAGC,GAAcL,EAE3DM,EAAYJ,EAEZ,CAAE,WAAAK,CAAA,EAAeC,EAAAA,oBAAoB,CAAE,cAAeJ,EAAW,EACjE,CAAA,WAAEK,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcN,CAAS,EAC3DO,EAAmBC,EAAAA,gBAAgBP,EAAW,CAClD,WAAYC,EAAW,WAAA,WACvBE,EACA,WAAAC,CAAA,CACD,EAED,aACGJ,EAAA,CAAW,GAAGI,EAAa,GAAGE,EAAkB,IAAAX,EAC9C,SAAAE,EACH,CAEJ,EAEMW,EAAaC,EAAAA,WACjBhB,CACF,EAEAe,EAAW,gBAAkB,aAC7BA,EAAW,YAAc"}
1
+ {"version":3,"file":"HeaderLink.cjs","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n const { href } = restProps;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} href={href} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","href","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderLink","forwardRef"],"mappings":"uVAaMA,EAAc,CAClBC,EACAC,IACgB,CAChB,KAAM,CAAE,YAAAC,EAAc,IAAK,SAAAC,EAAU,UAAAC,EAAW,cAAAC,EAAe,GAAGC,GAAcN,EAC1E,CAAE,KAAAO,GAASD,EAEXE,EAAYN,EAEZ,CAAE,WAAAO,CAAA,EAAeC,EAAAA,oBAAoB,CAAE,cAAeN,EAAW,EACjE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcP,CAAS,EAC3DQ,EAAmBC,EAAAA,gBAAgBP,EAAW,CAClD,WAAYC,EAAW,WAAA,WACvBE,EACA,WAAAC,CAAA,CACD,EAEKI,EAAcC,EAAAA,aAAa,CAAE,GAAGX,EAAW,cAAAD,EAAe,EAEhE,OACEa,MAACV,EAAA,CAAW,GAAGI,EAAa,GAAGE,EAAkB,KAAAP,EAAY,QAASS,EAAa,IAAAf,EAChF,SAAAE,CAAA,CACH,CAEJ,EAEMgB,EAAaC,EAAAA,WACjBrB,CACF,EAEAoB,EAAW,gBAAkB,aAC7BA,EAAW,YAAc"}
@@ -1,22 +1,23 @@
1
1
  "use client";
2
- import { jsx as d } from "react/jsx-runtime";
2
+ import { jsx as u } from "react/jsx-runtime";
3
3
  import { forwardRef as P } from "react";
4
- import { useStyleProps as f } from "../../hooks/styleProps.js";
5
- import { mergeStyleProps as u } from "../../utils/mergeStyleProps.js";
6
- import { useHeaderStyleProps as y } from "./useHeaderStyleProps.js";
7
- const k = (s, t) => {
8
- const { elementType: n = "a", children: p, isCurrent: i, ...m } = s, e = n, { classProps: a } = y({ isCurrentLink: i }), { styleProps: c, props: r } = f(m), l = u(e, {
4
+ import { useStyleProps as y } from "../../hooks/styleProps.js";
5
+ import { useLinkClick as C } from "../../hooks/useLinkClick.js";
6
+ import { mergeStyleProps as L } from "../../utils/mergeStyleProps.js";
7
+ import { useHeaderStyleProps as h } from "./useHeaderStyleProps.js";
8
+ const H = (t, n) => {
9
+ const { elementType: i = "a", children: p, isCurrent: m, routerOptions: c, ...r } = t, { href: l } = r, e = i, { classProps: a } = h({ isCurrentLink: m }), { styleProps: d, props: o } = y(r), f = L(e, {
9
10
  classProps: a.headerLink,
10
- styleProps: c,
11
- otherProps: r
12
- });
13
- return /* @__PURE__ */ d(e, { ...r, ...l, ref: t, children: p });
14
- }, o = P(
15
- k
11
+ styleProps: d,
12
+ otherProps: o
13
+ }), k = C({ ...r, routerOptions: c });
14
+ return /* @__PURE__ */ u(e, { ...o, ...f, href: l, onClick: k, ref: n, children: p });
15
+ }, s = P(
16
+ H
16
17
  );
17
- o.spiritComponent = "HeaderLink";
18
- o.displayName = "HeaderLink";
18
+ s.spiritComponent = "HeaderLink";
19
+ s.displayName = "HeaderLink";
19
20
  export {
20
- o as default
21
+ s as default
21
22
  };
22
23
  //# sourceMappingURL=HeaderLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderLink.js","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, ...restProps } = props;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","restProps","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","HeaderLink","forwardRef"],"mappings":";;;;;;AAaA,MAAMA,IAAc,CAClBC,GACAC,MACgB;AAChB,QAAM,EAAE,aAAAC,IAAc,KAAK,UAAAC,GAAU,WAAAC,GAAW,GAAGC,MAAcL,GAE3DM,IAAYJ,GAEZ,EAAE,YAAAK,EAAA,IAAeC,EAAoB,EAAE,eAAeJ,GAAW,GACjE,EAAE,YAAAK,GAAY,OAAOC,EAAA,IAAeC,EAAcN,CAAS,GAC3DO,IAAmBC,EAAgBP,GAAW;AAAA,IAClD,YAAYC,EAAW;AAAA,IACvB,YAAAE;AAAA,IACA,YAAAC;AAAA,EAAA,CACD;AAED,2BACGJ,GAAA,EAAW,GAAGI,GAAa,GAAGE,GAAkB,KAAAX,GAC9C,UAAAE,GACH;AAEJ,GAEMW,IAAaC;AAAA,EACjBhB;AACF;AAEAe,EAAW,kBAAkB;AAC7BA,EAAW,cAAc;"}
1
+ {"version":3,"file":"HeaderLink.js","sources":["../../../src/components/Header/HeaderLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type HeaderLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritHeaderLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useHeaderStyleProps } from './useHeaderStyleProps';\n\nconst _HeaderLink = <E extends ElementType = 'a'>(\n props: SpiritHeaderLinkProps<E>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const { elementType = 'a', children, isCurrent, routerOptions, ...restProps } = props;\n const { href } = restProps;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useHeaderStyleProps({ isCurrentLink: isCurrent });\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, {\n classProps: classProps.headerLink,\n styleProps,\n otherProps,\n });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} href={href} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst HeaderLink = forwardRef<HTMLAnchorElement, SpiritHeaderLinkProps<'a'>>(\n _HeaderLink,\n) as unknown as PolymorphicComponent<'a', HeaderLinkProps>;\n\nHeaderLink.spiritComponent = 'HeaderLink';\nHeaderLink.displayName = 'HeaderLink';\n\nexport default HeaderLink;\n"],"names":["_HeaderLink","props","ref","elementType","children","isCurrent","routerOptions","restProps","href","Component","classProps","useHeaderStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","HeaderLink","forwardRef"],"mappings":";;;;;;;AAaA,MAAMA,IAAc,CAClBC,GACAC,MACgB;AAChB,QAAM,EAAE,aAAAC,IAAc,KAAK,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,GAAGC,MAAcN,GAC1E,EAAE,MAAAO,MAASD,GAEXE,IAAYN,GAEZ,EAAE,YAAAO,EAAA,IAAeC,EAAoB,EAAE,eAAeN,GAAW,GACjE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcP,CAAS,GAC3DQ,IAAmBC,EAAgBP,GAAW;AAAA,IAClD,YAAYC,EAAW;AAAA,IACvB,YAAAE;AAAA,IACA,YAAAC;AAAA,EAAA,CACD,GAEKI,IAAcC,EAAa,EAAE,GAAGX,GAAW,eAAAD,GAAe;AAEhE,SACE,gBAAAa,EAACV,GAAA,EAAW,GAAGI,GAAa,GAAGE,GAAkB,MAAAP,GAAY,SAASS,GAAa,KAAAf,GAChF,UAAAE,EAAA,CACH;AAEJ,GAEMgB,IAAaC;AAAA,EACjBrB;AACF;AAEAoB,EAAW,kBAAkB;AAC7BA,EAAW,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("react/jsx-runtime"),f=require("react"),S=require("../../hooks/styleProps.cjs"),g=require("../../utils/mergeStyleProps.cjs"),D=require("./useInputDetailsStyleProps.cjs"),o={elementType:"div",id:void 0,registerAriaDetails:void 0},i=p=>{const n={...o,...p},{classProps:l,props:u}=D.useInputDetailsStyleProps(n),{children:c,elementType:a,id:e,registerAriaDetails:t,...d}=u,{styleProps:P,props:s}=S.useStyleProps(d),r=a||o.elementType,y=g.mergeStyleProps(r,{classProps:l,styleProps:P,otherProps:s});return f.useEffect(()=>(e&&t?.({add:e}),()=>{e&&t?.({remove:e})}),[e,t]),m.jsx(r,{...s,...y,id:e,children:c})};i.spiritComponent="InputDetails";exports.default=i;
2
+ //# sourceMappingURL=InputDetails.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputDetails.cjs","sources":["../../../src/components/InputDetails/InputDetails.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, useEffect } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useInputDetailsStyleProps } from './useInputDetailsStyleProps';\n\nconst defaultProps: Partial<InputDetailsProps> = {\n elementType: 'div',\n id: undefined,\n registerAriaDetails: undefined,\n};\n\nconst InputDetails = <E extends ElementType = 'div'>(props: InputDetailsProps<E>) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { classProps, props: modifiedProps } = useInputDetailsStyleProps(propsWithDefaults);\n const { children, elementType, id, registerAriaDetails, ...restProps } = modifiedProps;\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const Component = (elementType || defaultProps.elementType) as ElementType;\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n useEffect(() => {\n if (id) {\n registerAriaDetails?.({ add: id });\n }\n\n return () => {\n if (id) {\n registerAriaDetails?.({ remove: id });\n }\n };\n }, [id, registerAriaDetails]);\n\n return (\n <Component {...otherProps} {...mergedStyleProps} id={id}>\n {children}\n </Component>\n );\n};\n\nInputDetails.spiritComponent = 'InputDetails';\n\nexport default InputDetails;\n"],"names":["defaultProps","InputDetails","props","propsWithDefaults","classProps","modifiedProps","useInputDetailsStyleProps","children","elementType","id","registerAriaDetails","restProps","styleProps","otherProps","useStyleProps","Component","mergedStyleProps","mergeStyleProps","useEffect"],"mappings":"mTAQMA,EAA2C,CAC/C,YAAa,MACb,GAAI,OACJ,oBAAqB,MACvB,EAEMC,EAA+CC,GAAgC,CACnF,MAAMC,EAAoB,CAAE,GAAGH,EAAc,GAAGE,CAAA,EAC1C,CAAE,WAAAE,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,0BAA0BH,CAAiB,EAClF,CAAE,SAAAI,EAAU,YAAAC,EAAa,GAAAC,EAAI,oBAAAC,EAAqB,GAAGC,GAAcN,EACnE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcH,CAAS,EAC3DI,EAAaP,GAAeR,EAAa,YACzCgB,EAAmBC,EAAAA,gBAAgBF,EAAW,CAAE,WAAAX,EAAA,WAAYQ,EAAY,WAAAC,EAAY,EAE1FK,OAAAA,EAAAA,UAAU,KACJT,GACFC,IAAsB,CAAE,IAAKD,EAAI,EAG5B,IAAM,CACPA,GACFC,IAAsB,CAAE,OAAQD,EAAI,CAExC,GACC,CAACA,EAAIC,CAAmB,CAAC,QAGzBK,EAAA,CAAW,GAAGF,EAAa,GAAGG,EAAkB,GAAAP,EAC9C,SAAAF,EACH,CAEJ,EAEAN,EAAa,gBAAkB"}
@@ -0,0 +1,7 @@
1
+ import { default as React, ElementType } from 'react';
2
+ import { InputDetailsProps } from '../../types';
3
+ declare const InputDetails: {
4
+ <E extends ElementType = "div">(props: InputDetailsProps<E>): React.JSX.Element;
5
+ spiritComponent: string;
6
+ };
7
+ export default InputDetails;
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx as u } from "react/jsx-runtime";
3
+ import { useEffect as P } from "react";
4
+ import { useStyleProps as y } from "../../hooks/styleProps.js";
5
+ import { mergeStyleProps as D } from "../../utils/mergeStyleProps.js";
6
+ import { useInputDetailsStyleProps as g } from "./useInputDetailsStyleProps.js";
7
+ const o = {
8
+ elementType: "div",
9
+ id: void 0,
10
+ registerAriaDetails: void 0
11
+ }, v = (p) => {
12
+ const i = { ...o, ...p }, { classProps: n, props: l } = g(i), { children: m, elementType: a, id: e, registerAriaDetails: t, ...c } = l, { styleProps: d, props: r } = y(c), s = a || o.elementType, f = D(s, { classProps: n, styleProps: d, otherProps: r });
13
+ return P(() => (e && t?.({ add: e }), () => {
14
+ e && t?.({ remove: e });
15
+ }), [e, t]), /* @__PURE__ */ u(s, { ...r, ...f, id: e, children: m });
16
+ };
17
+ v.spiritComponent = "InputDetails";
18
+ export {
19
+ v as default
20
+ };
21
+ //# sourceMappingURL=InputDetails.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputDetails.js","sources":["../../../src/components/InputDetails/InputDetails.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, useEffect } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useInputDetailsStyleProps } from './useInputDetailsStyleProps';\n\nconst defaultProps: Partial<InputDetailsProps> = {\n elementType: 'div',\n id: undefined,\n registerAriaDetails: undefined,\n};\n\nconst InputDetails = <E extends ElementType = 'div'>(props: InputDetailsProps<E>) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { classProps, props: modifiedProps } = useInputDetailsStyleProps(propsWithDefaults);\n const { children, elementType, id, registerAriaDetails, ...restProps } = modifiedProps;\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const Component = (elementType || defaultProps.elementType) as ElementType;\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n useEffect(() => {\n if (id) {\n registerAriaDetails?.({ add: id });\n }\n\n return () => {\n if (id) {\n registerAriaDetails?.({ remove: id });\n }\n };\n }, [id, registerAriaDetails]);\n\n return (\n <Component {...otherProps} {...mergedStyleProps} id={id}>\n {children}\n </Component>\n );\n};\n\nInputDetails.spiritComponent = 'InputDetails';\n\nexport default InputDetails;\n"],"names":["defaultProps","InputDetails","props","propsWithDefaults","classProps","modifiedProps","useInputDetailsStyleProps","children","elementType","id","registerAriaDetails","restProps","styleProps","otherProps","useStyleProps","Component","mergedStyleProps","mergeStyleProps","useEffect"],"mappings":";;;;;;AAQA,MAAMA,IAA2C;AAAA,EAC/C,aAAa;AAAA,EACb,IAAI;AAAA,EACJ,qBAAqB;AACvB,GAEMC,IAAe,CAAgCC,MAAgC;AACnF,QAAMC,IAAoB,EAAE,GAAGH,GAAc,GAAGE,EAAA,GAC1C,EAAE,YAAAE,GAAY,OAAOC,EAAA,IAAkBC,EAA0BH,CAAiB,GAClF,EAAE,UAAAI,GAAU,aAAAC,GAAa,IAAAC,GAAI,qBAAAC,GAAqB,GAAGC,MAAcN,GACnE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcH,CAAS,GAC3DI,IAAaP,KAAeR,EAAa,aACzCgB,IAAmBC,EAAgBF,GAAW,EAAE,YAAAX,GAAY,YAAAQ,GAAY,YAAAC,GAAY;AAE1F,SAAAK,EAAU,OACJT,KACFC,IAAsB,EAAE,KAAKD,GAAI,GAG5B,MAAM;AACX,IAAIA,KACFC,IAAsB,EAAE,QAAQD,GAAI;AAAA,EAExC,IACC,CAACA,GAAIC,CAAmB,CAAC,qBAGzBK,GAAA,EAAW,GAAGF,GAAa,GAAGG,GAAkB,IAAAP,GAC9C,UAAAF,GACH;AAEJ;AAEAN,EAAa,kBAAkB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./InputDetails.cjs"),t=require("./useInputDetailsStyleProps.cjs");exports.InputDetails=e.default;exports.useInputDetailsStyleProps=t.useInputDetailsStyleProps;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { default as InputDetails } from './InputDetails';
2
+ export * from './useInputDetailsStyleProps';
@@ -0,0 +1,7 @@
1
+ import { default as s } from "./InputDetails.js";
2
+ import { useInputDetailsStyleProps as o } from "./useInputDetailsStyleProps.js";
3
+ export {
4
+ s as InputDetails,
5
+ o as useInputDetailsStyleProps
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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 e=require("../../hooks/useClassNamePrefix.cjs");function t(s){return{classProps:e.useClassNamePrefix("InputDetails"),props:s}}exports.useInputDetailsStyleProps=t;
2
+ //# sourceMappingURL=useInputDetailsStyleProps.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInputDetailsStyleProps.cjs","sources":["../../../src/components/InputDetails/useInputDetailsStyleProps.ts"],"sourcesContent":["import type { ElementType } from 'react';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\n\nexport interface InputDetailsStyles<T> {\n classProps: string;\n props: T;\n}\n\nexport function useInputDetailsStyleProps<E extends ElementType = 'div'>(\n props: InputDetailsProps<E>,\n): InputDetailsStyles<InputDetailsProps<E>> {\n const inputDetailsClass = useClassNamePrefix('InputDetails');\n\n return {\n classProps: inputDetailsClass,\n props,\n };\n}\n"],"names":["useInputDetailsStyleProps","props","useClassNamePrefix"],"mappings":"sIASO,SAASA,EACdC,EAC0C,CAG1C,MAAO,CACL,WAHwBC,EAAAA,mBAAmB,cAAc,EAIzD,MAAAD,CAAA,CAEJ"}
@@ -0,0 +1,7 @@
1
+ import { ElementType } from 'react';
2
+ import { InputDetailsProps } from '../../types';
3
+ export interface InputDetailsStyles<T> {
4
+ classProps: string;
5
+ props: T;
6
+ }
7
+ export declare function useInputDetailsStyleProps<E extends ElementType = 'div'>(props: InputDetailsProps<E>): InputDetailsStyles<InputDetailsProps<E>>;
@@ -0,0 +1,11 @@
1
+ import { useClassNamePrefix as t } from "../../hooks/useClassNamePrefix.js";
2
+ function a(s) {
3
+ return {
4
+ classProps: t("InputDetails"),
5
+ props: s
6
+ };
7
+ }
8
+ export {
9
+ a as useInputDetailsStyleProps
10
+ };
11
+ //# sourceMappingURL=useInputDetailsStyleProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInputDetailsStyleProps.js","sources":["../../../src/components/InputDetails/useInputDetailsStyleProps.ts"],"sourcesContent":["import type { ElementType } from 'react';\nimport { useClassNamePrefix } from '../../hooks';\nimport { type InputDetailsProps } from '../../types';\n\nexport interface InputDetailsStyles<T> {\n classProps: string;\n props: T;\n}\n\nexport function useInputDetailsStyleProps<E extends ElementType = 'div'>(\n props: InputDetailsProps<E>,\n): InputDetailsStyles<InputDetailsProps<E>> {\n const inputDetailsClass = useClassNamePrefix('InputDetails');\n\n return {\n classProps: inputDetailsClass,\n props,\n };\n}\n"],"names":["useInputDetailsStyleProps","props","useClassNamePrefix"],"mappings":";AASO,SAASA,EACdC,GAC0C;AAG1C,SAAO;AAAA,IACL,YAHwBC,EAAmB,cAAc;AAAA,IAIzD,OAAAD;AAAA,EAAA;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ export * from './InputDetails/index'
2
+ export {}
@@ -1,2 +1,2 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),m=require("react"),f=require("../../hooks/styleProps.cjs"),S=require("../../utils/mergeStyleProps.cjs"),h=require("./useLinkStyleProps.cjs"),o={elementType:"a",color:"primary",hasVisitedStyleAllowed:!1,underlined:"hover"},k=(n,l)=>{const p={...o,...n},{elementType:i=o.elementType,children:c,...s}=p,r=i,{classProps:u,props:y}=h.useLinkStyleProps(s),{styleProps:P,props:t}=f.useStyleProps(y),a=S.mergeStyleProps(r,{classProps:u,styleProps:P,otherProps:t});return d.jsx(r,{...t,...a,href:s.href,ref:l,children:c})},e=m.forwardRef(k);e.spiritComponent="Link";e.displayName="Link";exports.default=e;
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("react/jsx-runtime"),S=require("react"),f=require("../../hooks/styleProps.cjs"),L=require("../../hooks/useLinkClick.cjs"),h=require("../../utils/mergeStyleProps.cjs"),q=require("./useLinkStyleProps.cjs"),o={elementType:"a",color:"primary",hasVisitedStyleAllowed:!1,underlined:"hover"},C=(n,i)=>{const l={...o,...n},{elementType:p=o.elementType,children:c,routerOptions:u,...s}=l,t=p,{classProps:y,props:a}=q.useLinkStyleProps(s),{styleProps:d,props:r}=f.useStyleProps(a),P=h.mergeStyleProps(t,{classProps:y,styleProps:d,otherProps:r}),m=L.useLinkClick({...s,routerOptions:u});return k.jsx(t,{...r,...P,onClick:m,ref:i,children:c})},e=S.forwardRef(C);e.spiritComponent="Link";e.displayName="Link";exports.default=e;
2
2
  //# sourceMappingURL=Link.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Link.cjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type LinkProps, type PolymorphicComponent, type PolymorphicRef, type SpiritLinkProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useLinkStyleProps } from './useLinkStyleProps';\n\nconst defaultProps = {\n elementType: 'a',\n color: 'primary',\n hasVisitedStyleAllowed: false,\n underlined: 'hover',\n};\n\nconst _Link = <E extends ElementType = 'a', C = void>(\n props: SpiritLinkProps<E, C>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} href={restProps.href} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst Link = forwardRef<HTMLAnchorElement, SpiritLinkProps<'a', void>>(_Link) as unknown as PolymorphicComponent<\n 'a',\n LinkProps<void>\n>;\n\nLink.spiritComponent = 'Link';\nLink.displayName = 'Link';\n\nexport default Link;\n"],"names":["defaultProps","_Link","props","ref","propsWithDefaults","elementType","children","restProps","Component","classProps","modifiedProps","useLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsx","Link","forwardRef"],"mappings":"2SAQMA,EAAe,CACnB,YAAa,IACb,MAAO,UACP,uBAAwB,GACxB,WAAY,OACd,EAEMC,EAAQ,CACZC,EACAC,IACgB,CAChB,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CAAE,YAAAG,EAAcL,EAAa,YAAa,SAAAM,EAAU,GAAGC,GAAcH,EAErEI,EAAYH,EAEZ,CAAE,WAAAI,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,kBAAkBJ,CAAS,EAClE,CAAA,WAAEK,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBR,EAAW,CAAE,WAAAC,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAE1F,OACEI,MAACT,EAAA,CAAW,GAAGK,EAAa,GAAGE,EAAkB,KAAMR,EAAU,KAAM,IAAAJ,EACpE,SAAAG,CAAA,CACH,CAEJ,EAEMY,EAAOC,EAAAA,WAA0DlB,CAAK,EAK5EiB,EAAK,gBAAkB,OACvBA,EAAK,YAAc"}
1
+ {"version":3,"file":"Link.cjs","sources":["../../../src/components/Link/Link.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport { type LinkProps, type PolymorphicComponent, type PolymorphicRef, type SpiritLinkProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useLinkStyleProps } from './useLinkStyleProps';\n\nconst defaultProps = {\n elementType: 'a',\n color: 'primary',\n hasVisitedStyleAllowed: false,\n underlined: 'hover',\n};\n\nconst _Link = <E extends ElementType = 'a', C = void>(\n props: SpiritLinkProps<E, C>,\n ref: PolymorphicRef<E>,\n): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, routerOptions, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { classProps, props: modifiedProps } = useLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n const handleClick = useLinkClick({ ...restProps, routerOptions });\n\n return (\n <Component {...otherProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst Link = forwardRef<HTMLAnchorElement, SpiritLinkProps<'a', void>>(_Link) as unknown as PolymorphicComponent<\n 'a',\n LinkProps<void>\n>;\n\nLink.spiritComponent = 'Link';\nLink.displayName = 'Link';\n\nexport default Link;\n"],"names":["defaultProps","_Link","props","ref","propsWithDefaults","elementType","children","routerOptions","restProps","Component","classProps","modifiedProps","useLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsx","Link","forwardRef"],"mappings":"qVAQMA,EAAe,CACnB,YAAa,IACb,MAAO,UACP,uBAAwB,GACxB,WAAY,OACd,EAEMC,EAAQ,CACZC,EACAC,IACgB,CAChB,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CAAE,YAAAG,EAAcL,EAAa,YAAa,SAAAM,EAAU,cAAAC,EAAe,GAAGC,GAAcJ,EAEpFK,EAAYJ,EAEZ,CAAE,WAAAK,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,kBAAkBJ,CAAS,EAClE,CAAA,WAAEK,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBR,EAAW,CAAE,WAAAC,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAEpFI,EAAcC,EAAAA,aAAa,CAAE,GAAGX,EAAW,cAAAD,EAAe,EAEhE,OACEa,MAACX,GAAW,GAAGK,EAAa,GAAGE,EAAkB,QAASE,EAAa,IAAAf,EACpE,SAAAG,EACH,CAEJ,EAEMe,EAAOC,EAAAA,WAA0DrB,CAAK,EAK5EoB,EAAK,gBAAkB,OACvBA,EAAK,YAAc"}
@@ -1,18 +1,19 @@
1
1
  "use client";
2
- import { jsx as y } from "react/jsx-runtime";
3
- import { forwardRef as P } from "react";
4
- import { useStyleProps as u } from "../../hooks/styleProps.js";
5
- import { mergeStyleProps as h } from "../../utils/mergeStyleProps.js";
6
- import { useLinkStyleProps as k } from "./useLinkStyleProps.js";
2
+ import { jsx as P } from "react/jsx-runtime";
3
+ import { forwardRef as k } from "react";
4
+ import { useStyleProps as h } from "../../hooks/styleProps.js";
5
+ import { useLinkClick as L } from "../../hooks/useLinkClick.js";
6
+ import { mergeStyleProps as C } from "../../utils/mergeStyleProps.js";
7
+ import { useLinkStyleProps as S } from "./useLinkStyleProps.js";
7
8
  const s = {
8
9
  elementType: "a",
9
10
  color: "primary",
10
11
  hasVisitedStyleAllowed: !1,
11
12
  underlined: "hover"
12
- }, L = (p, n) => {
13
- const i = { ...s, ...p }, { elementType: l = s.elementType, children: m, ...e } = i, o = l, { classProps: c, props: f } = k(e), { styleProps: a, props: r } = u(f), d = h(o, { classProps: c, styleProps: a, otherProps: r });
14
- return /* @__PURE__ */ y(o, { ...r, ...d, href: e.href, ref: n, children: m });
15
- }, t = P(L);
13
+ }, T = (p, n) => {
14
+ const i = { ...s, ...p }, { elementType: l = s.elementType, children: m, routerOptions: c, ...o } = i, e = l, { classProps: a, props: d } = S(o), { styleProps: f, props: r } = h(d), u = C(e, { classProps: a, styleProps: f, otherProps: r }), y = L({ ...o, routerOptions: c });
15
+ return /* @__PURE__ */ P(e, { ...r, ...u, onClick: y, ref: n, children: m });
16
+ }, t = k(T);
16
17
  t.spiritComponent = "Link";
17
18
  t.displayName = "Link";
18
19
  export {