@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,2 +1,2 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),S=require("react"),B=require("../../context/PropsContext.cjs"),q=require("../../hooks/styleProps.cjs"),g=require("../../utils/mergeStyleProps.cjs"),b=require("../Spinner/Spinner.cjs"),x=require("./useButtonProps.cjs"),h=require("./useButtonStyleProps.cjs"),n={color:"primary",isBlock:!1,isDisabled:!1,isLoading:!1,isSymmetrical:!1,size:"medium",type:"button",elementType:"button"},C=(u,p)=>{const i=B.useContextProps(),l={...n,...u,...i},{elementType:c=n.elementType,children:a,...e}=l,s=c,{buttonProps:P}=x.useButtonProps(e),{classProps:y,props:d}=h.useButtonStyleProps(e),{styleProps:m,props:o}=q.useStyleProps(d),f=g.mergeStyleProps(s,{classProps:y,styleProps:m,otherProps:o});return r.jsxs(s,{...o,...P,ref:p,...f,children:[a,e.isLoading&&r.jsx(b.default,{})]})},t=S.forwardRef(C);t.spiritComponent="Button";t.displayName="Button";exports.default=t;
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),q=require("react"),x=require("../../context/PropsContext.cjs"),g=require("../../hooks/styleProps.cjs"),b=require("../../utils/mergeStyleProps.cjs"),C=require("../Spinner/Spinner.cjs"),h=require("./useButtonProps.cjs"),j=require("./useButtonStyleProps.cjs"),p={color:"primary",isBlock:!1,isDisabled:!1,isLoading:!1,isSymmetrical:!1,size:"medium",type:"button",elementType:"button"},_=(s,l)=>{const{elementType:u}=s,i=x.useContextProps(s),{elementType:c,children:m,...y}=i,P=u??c??p.elementType,a={...p,...y},{elementType:R,...e}=a,o=P,{buttonProps:d}=h.useButtonProps(e),{classProps:f,props:S}=j.useButtonStyleProps(e),{styleProps:T,props:r}=g.useStyleProps(S),B=b.mergeStyleProps(o,{classProps:f,styleProps:T,otherProps:r});return n.jsxs(o,{...r,...d,ref:l,...B,children:[m,e.isLoading&&n.jsx(C.default,{})]})},t=q.forwardRef(_);t.spiritComponent="Button";t.displayName="Button";exports.default=t;
2
2
  //# sourceMappingURL=Button.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.cjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useContextProps } from '../../context';\nimport { useStyleProps } from '../../hooks';\nimport { type ButtonProps, type PolymorphicComponent, type PolymorphicRef, type SpiritButtonProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonProps } from './useButtonProps';\nimport { useButtonStyleProps } from './useButtonStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium',\n type: 'button',\n elementType: 'button',\n};\n\nconst _Button = <E extends ElementType = 'button', C = void, S = void>(\n props: SpiritButtonProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const propsWithContext = useContextProps();\n const propsWithDefaults = { ...defaultProps, ...props, ...propsWithContext };\n const { elementType = defaultProps.elementType, children, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { buttonProps } = useButtonProps(restProps);\n const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...buttonProps} ref={ref} {...mergedStyleProps}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst Button = forwardRef<HTMLButtonElement, SpiritButtonProps<'button', void, void>>(\n _Button,\n) as unknown as PolymorphicComponent<'button', ButtonProps<void, void>>;\n\nButton.spiritComponent = 'Button';\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["defaultProps","_Button","props","ref","propsWithContext","useContextProps","propsWithDefaults","elementType","children","restProps","Component","buttonProps","useButtonProps","classProps","modifiedProps","useButtonStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsxs","jsx","Spinner","Button","forwardRef"],"mappings":"+ZAWMA,EAAe,CACnB,MAAO,UAKP,QAAS,GACT,WAAY,GACZ,UAAW,GACX,cAAe,GACf,KAAM,SACN,KAAM,SACN,YAAa,QACf,EAEMC,EAAU,CACdC,EACAC,IACG,CACH,MAAMC,EAAmBC,EAAAA,gBAAA,EACnBC,EAAoB,CAAE,GAAGN,EAAc,GAAGE,EAAO,GAAGE,CAAA,EACpD,CAAE,YAAAG,EAAcP,EAAa,YAAa,SAAAQ,EAAU,GAAGC,GAAcH,EAErEI,EAAYH,EAEZ,CAAE,YAAAI,CAAA,EAAgBC,EAAAA,eAAeH,CAAS,EAC1C,CAAE,WAAAI,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,oBAAoBN,CAAS,EACpE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBV,EAAW,CAAE,WAAAG,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAE1F,OACEI,EAAAA,KAACX,GAAW,GAAGO,EAAa,GAAGN,EAAa,IAAAR,EAAW,GAAGgB,EACvD,SAAA,CAAAX,EACAC,EAAU,WAAaa,MAACC,EAAAA,QAAA,CAAA,CAAQ,CAAA,EACnC,CAEJ,EAEMC,EAASC,EAAAA,WACbxB,CACF,EAEAuB,EAAO,gBAAkB,SACzBA,EAAO,YAAc"}
1
+ {"version":3,"file":"Button.cjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useContextProps } from '../../context';\nimport { useStyleProps } from '../../hooks';\nimport { type ButtonProps, type PolymorphicComponent, type PolymorphicRef, type SpiritButtonProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonProps } from './useButtonProps';\nimport { useButtonStyleProps } from './useButtonStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium',\n type: 'button',\n elementType: 'button',\n};\n\nconst _Button = <E extends ElementType = 'button', C = void, S = void>(\n props: SpiritButtonProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const { elementType: propsElementType } = props;\n const contextProps = useContextProps(props);\n const { elementType: contextElementType, children, ...restFromContext } = contextProps;\n const elementType = (propsElementType ?? contextElementType ?? defaultProps.elementType) as ElementType;\n const propsWithDefaults = { ...defaultProps, ...restFromContext };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- `elementType` must be omitted from `restProps`: the root tag is chosen by the polymorphic `elementType` resolved above (explicit prop, then Stack context, then default). The duplicate key from `defaultProps` inside `propsWithDefaults` is only peeled off so it is not passed to hooks or the DOM.\n const { elementType: _elementType, ...restProps } = propsWithDefaults;\n const Component = elementType as ElementType;\n\n const { buttonProps } = useButtonProps(restProps);\n const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...buttonProps} ref={ref} {...mergedStyleProps}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst Button = forwardRef<HTMLButtonElement, SpiritButtonProps<'button', void, void>>(\n _Button,\n) as unknown as PolymorphicComponent<'button', ButtonProps<void, void>>;\n\nButton.spiritComponent = 'Button';\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["defaultProps","_Button","props","ref","propsElementType","contextProps","useContextProps","contextElementType","children","restFromContext","elementType","propsWithDefaults","_elementType","restProps","Component","buttonProps","useButtonProps","classProps","modifiedProps","useButtonStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsxs","jsx","Spinner","Button","forwardRef"],"mappings":"+ZAWMA,EAAe,CACnB,MAAO,UAKP,QAAS,GACT,WAAY,GACZ,UAAW,GACX,cAAe,GACf,KAAM,SACN,KAAM,SACN,YAAa,QACf,EAEMC,EAAU,CACdC,EACAC,IACG,CACH,KAAM,CAAE,YAAaC,CAAA,EAAqBF,EACpCG,EAAeC,EAAAA,gBAAgBJ,CAAK,EACpC,CAAE,YAAaK,EAAoB,SAAAC,EAAU,GAAGC,GAAoBJ,EACpEK,EAAeN,GAAoBG,GAAsBP,EAAa,YACtEW,EAAoB,CAAE,GAAGX,EAAc,GAAGS,CAAA,EAE1C,CAAE,YAAaG,EAAc,GAAGC,GAAcF,EAC9CG,EAAYJ,EAEZ,CAAE,YAAAK,CAAA,EAAgBC,EAAAA,eAAeH,CAAS,EAC1C,CAAE,WAAAI,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,oBAAoBN,CAAS,EACpE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBV,EAAW,CAAE,WAAAG,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAE1F,OACEI,EAAAA,KAACX,GAAW,GAAGO,EAAa,GAAGN,EAAa,IAAAZ,EAAW,GAAGoB,EACvD,SAAA,CAAAf,EACAK,EAAU,WAAaa,MAACC,EAAAA,QAAA,CAAA,CAAQ,CAAA,EACnC,CAEJ,EAEMC,EAASC,EAAAA,WACb5B,CACF,EAEA2B,EAAO,gBAAkB,SACzBA,EAAO,YAAc"}
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { jsxs as y, jsx as B } from "react/jsx-runtime";
3
- import { forwardRef as S } from "react";
4
- import { useContextProps as h } from "../../context/PropsContext.js";
5
- import { useStyleProps as x } from "../../hooks/styleProps.js";
6
- import { mergeStyleProps as b } from "../../utils/mergeStyleProps.js";
7
- import g from "../Spinner/Spinner.js";
8
- import { useButtonProps as C } from "./useButtonProps.js";
9
- import { useButtonStyleProps as T } from "./useButtonStyleProps.js";
10
- const e = {
2
+ import { jsxs as B, jsx as S } from "react/jsx-runtime";
3
+ import { forwardRef as b } from "react";
4
+ import { useContextProps as g } from "../../context/PropsContext.js";
5
+ import { useStyleProps as h } from "../../hooks/styleProps.js";
6
+ import { mergeStyleProps as C } from "../../utils/mergeStyleProps.js";
7
+ import j from "../Spinner/Spinner.js";
8
+ import { useButtonProps as D } from "./useButtonProps.js";
9
+ import { useButtonStyleProps as E } from "./useButtonStyleProps.js";
10
+ const r = {
11
11
  color: "primary",
12
12
  /**
13
13
  * @deprecated "isBlock" property will be removed in the next major version. Please read component's README for more information.
@@ -20,18 +20,18 @@ const e = {
20
20
  size: "medium",
21
21
  type: "button",
22
22
  elementType: "button"
23
- }, j = (p, n) => {
24
- const i = h(), m = { ...e, ...p, ...i }, { elementType: l = e.elementType, children: u, ...o } = m, t = l, { buttonProps: c } = C(o), { classProps: f, props: a } = T(o), { styleProps: d, props: s } = x(a), P = b(t, { classProps: f, styleProps: d, otherProps: s });
25
- return /* @__PURE__ */ y(t, { ...s, ...c, ref: n, ...P, children: [
26
- u,
27
- o.isLoading && /* @__PURE__ */ B(g, {})
23
+ }, L = (t, p) => {
24
+ const { elementType: m } = t, i = g(t), { elementType: l, children: c, ...u } = i, f = m ?? l ?? r.elementType, y = { ...r, ...u }, { elementType: _, ...e } = y, o = f, { buttonProps: a } = D(e), { classProps: P, props: d } = E(e), { styleProps: T, props: s } = h(d), x = C(o, { classProps: P, styleProps: T, otherProps: s });
25
+ return /* @__PURE__ */ B(o, { ...s, ...a, ref: p, ...x, children: [
26
+ c,
27
+ e.isLoading && /* @__PURE__ */ S(j, {})
28
28
  ] });
29
- }, r = S(
30
- j
29
+ }, n = b(
30
+ L
31
31
  );
32
- r.spiritComponent = "Button";
33
- r.displayName = "Button";
32
+ n.spiritComponent = "Button";
33
+ n.displayName = "Button";
34
34
  export {
35
- r as default
35
+ n as default
36
36
  };
37
37
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useContextProps } from '../../context';\nimport { useStyleProps } from '../../hooks';\nimport { type ButtonProps, type PolymorphicComponent, type PolymorphicRef, type SpiritButtonProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonProps } from './useButtonProps';\nimport { useButtonStyleProps } from './useButtonStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium',\n type: 'button',\n elementType: 'button',\n};\n\nconst _Button = <E extends ElementType = 'button', C = void, S = void>(\n props: SpiritButtonProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const propsWithContext = useContextProps();\n const propsWithDefaults = { ...defaultProps, ...props, ...propsWithContext };\n const { elementType = defaultProps.elementType, children, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { buttonProps } = useButtonProps(restProps);\n const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...buttonProps} ref={ref} {...mergedStyleProps}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst Button = forwardRef<HTMLButtonElement, SpiritButtonProps<'button', void, void>>(\n _Button,\n) as unknown as PolymorphicComponent<'button', ButtonProps<void, void>>;\n\nButton.spiritComponent = 'Button';\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["defaultProps","_Button","props","ref","propsWithContext","useContextProps","propsWithDefaults","elementType","children","restProps","Component","buttonProps","useButtonProps","classProps","modifiedProps","useButtonStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsxs","jsx","Spinner","Button","forwardRef"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAe;AAAA,EACnB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKP,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AACf,GAEMC,IAAU,CACdC,GACAC,MACG;AACH,QAAMC,IAAmBC,EAAA,GACnBC,IAAoB,EAAE,GAAGN,GAAc,GAAGE,GAAO,GAAGE,EAAA,GACpD,EAAE,aAAAG,IAAcP,EAAa,aAAa,UAAAQ,GAAU,GAAGC,MAAcH,GAErEI,IAAYH,GAEZ,EAAE,aAAAI,EAAA,IAAgBC,EAAeH,CAAS,GAC1C,EAAE,YAAAI,GAAY,OAAOC,EAAA,IAAkBC,EAAoBN,CAAS,GACpE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcJ,CAAa,GAC/DK,IAAmBC,EAAgBV,GAAW,EAAE,YAAAG,GAAY,YAAAG,GAAY,YAAAC,GAAY;AAE1F,SACE,gBAAAI,EAACX,KAAW,GAAGO,GAAa,GAAGN,GAAa,KAAAR,GAAW,GAAGgB,GACvD,UAAA;AAAA,IAAAX;AAAA,IACAC,EAAU,aAAa,gBAAAa,EAACC,GAAA,CAAA,CAAQ;AAAA,EAAA,GACnC;AAEJ,GAEMC,IAASC;AAAA,EACbxB;AACF;AAEAuB,EAAO,kBAAkB;AACzBA,EAAO,cAAc;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useContextProps } from '../../context';\nimport { useStyleProps } from '../../hooks';\nimport { type ButtonProps, type PolymorphicComponent, type PolymorphicRef, type SpiritButtonProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonProps } from './useButtonProps';\nimport { useButtonStyleProps } from './useButtonStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium',\n type: 'button',\n elementType: 'button',\n};\n\nconst _Button = <E extends ElementType = 'button', C = void, S = void>(\n props: SpiritButtonProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const { elementType: propsElementType } = props;\n const contextProps = useContextProps(props);\n const { elementType: contextElementType, children, ...restFromContext } = contextProps;\n const elementType = (propsElementType ?? contextElementType ?? defaultProps.elementType) as ElementType;\n const propsWithDefaults = { ...defaultProps, ...restFromContext };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars -- `elementType` must be omitted from `restProps`: the root tag is chosen by the polymorphic `elementType` resolved above (explicit prop, then Stack context, then default). The duplicate key from `defaultProps` inside `propsWithDefaults` is only peeled off so it is not passed to hooks or the DOM.\n const { elementType: _elementType, ...restProps } = propsWithDefaults;\n const Component = elementType as ElementType;\n\n const { buttonProps } = useButtonProps(restProps);\n const { classProps, props: modifiedProps } = useButtonStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...buttonProps} ref={ref} {...mergedStyleProps}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst Button = forwardRef<HTMLButtonElement, SpiritButtonProps<'button', void, void>>(\n _Button,\n) as unknown as PolymorphicComponent<'button', ButtonProps<void, void>>;\n\nButton.spiritComponent = 'Button';\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["defaultProps","_Button","props","ref","propsElementType","contextProps","useContextProps","contextElementType","children","restFromContext","elementType","propsWithDefaults","_elementType","restProps","Component","buttonProps","useButtonProps","classProps","modifiedProps","useButtonStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsxs","jsx","Spinner","Button","forwardRef"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAe;AAAA,EACnB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKP,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AACf,GAEMC,IAAU,CACdC,GACAC,MACG;AACH,QAAM,EAAE,aAAaC,EAAA,IAAqBF,GACpCG,IAAeC,EAAgBJ,CAAK,GACpC,EAAE,aAAaK,GAAoB,UAAAC,GAAU,GAAGC,MAAoBJ,GACpEK,IAAeN,KAAoBG,KAAsBP,EAAa,aACtEW,IAAoB,EAAE,GAAGX,GAAc,GAAGS,EAAA,GAE1C,EAAE,aAAaG,GAAc,GAAGC,MAAcF,GAC9CG,IAAYJ,GAEZ,EAAE,aAAAK,EAAA,IAAgBC,EAAeH,CAAS,GAC1C,EAAE,YAAAI,GAAY,OAAOC,EAAA,IAAkBC,EAAoBN,CAAS,GACpE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcJ,CAAa,GAC/DK,IAAmBC,EAAgBV,GAAW,EAAE,YAAAG,GAAY,YAAAG,GAAY,YAAAC,GAAY;AAE1F,SACE,gBAAAI,EAACX,KAAW,GAAGO,GAAa,GAAGN,GAAa,KAAAZ,GAAW,GAAGoB,GACvD,UAAA;AAAA,IAAAf;AAAA,IACAK,EAAU,aAAa,gBAAAa,EAACC,GAAA,CAAA,CAAQ;AAAA,EAAA,GACnC;AAEJ,GAEMC,IAASC;AAAA,EACb5B;AACF;AAEA2B,EAAO,kBAAkB;AACzBA,EAAO,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),f=require("react"),L=require("../../hooks/styleProps.cjs"),k=require("../../utils/mergeStyleProps.cjs"),S=require("../Spinner/Spinner.cjs"),B=require("./useButtonLinkProps.cjs"),g=require("./useButtonLinkStyleProps.cjs"),i={color:"primary",elementType:"a",isBlock:!1,isDisabled:!1,isLoading:!1,isSymmetrical:!1,size:"medium"},q=(u,l)=>{const s={...i,...u},{elementType:p=i.elementType,children:c,...t}=s,o=p,{buttonLinkProps:a}=B.useButtonLinkProps(s),{classProps:P,props:d}=g.useButtonLinkStyleProps(t),{styleProps:m,props:r}=L.useStyleProps(d),y=k.mergeStyleProps(o,{classProps:P,styleProps:m,otherProps:r});return n.jsxs(o,{...r,...a,...y,ref:l,children:[c,t.isLoading&&n.jsx(S.default,{})]})},e=f.forwardRef(q);e.spiritComponent="ButtonLink";e.displayName="ButtonLink";exports.default=e;
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),f=require("react"),S=require("../../hooks/styleProps.cjs"),B=require("../../hooks/useLinkClick.cjs"),q=require("../../utils/mergeStyleProps.cjs"),C=require("../Spinner/Spinner.cjs"),g=require("./useButtonLinkProps.cjs"),h=require("./useButtonLinkStyleProps.cjs"),l={color:"primary",elementType:"a",isBlock:!1,isDisabled:!1,isLoading:!1,isSymmetrical:!1,size:"medium"},b=(u,c)=>{const t={...l,...u},{elementType:p=l.elementType,children:a,routerOptions:P,...e}=t,o=p,{buttonLinkProps:n}=g.useButtonLinkProps(t),{classProps:d,props:k}=h.useButtonLinkStyleProps(e),{styleProps:m,props:r}=S.useStyleProps(k),y=q.mergeStyleProps(o,{classProps:d,styleProps:m,otherProps:r}),L=B.useLinkClick({...e,routerOptions:P,onClick:n.onClick});return i.jsxs(o,{...r,...n,...y,onClick:L,ref:c,children:[a,e.isLoading&&i.jsx(C.default,{})]})},s=f.forwardRef(b);s.spiritComponent="ButtonLink";s.displayName="ButtonLink";exports.default=s;
2
2
  //# sourceMappingURL=ButtonLink.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonLink.cjs","sources":["../../../src/components/ButtonLink/ButtonLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type ButtonProps,\n type ButtonSizesType,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritButtonLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonLinkProps } from './useButtonLinkProps';\nimport { useButtonLinkStyleProps } from './useButtonLinkStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n elementType: 'a',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium' as ButtonSizesType,\n};\n\nconst _ButtonLink = <E extends ElementType = 'a', C = void, S = void>(\n props: SpiritButtonLinkProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);\n const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...buttonLinkProps} {...mergedStyleProps} ref={ref}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst ButtonLink = forwardRef<HTMLAnchorElement, SpiritButtonLinkProps<'a', void, void>>(\n _ButtonLink,\n) as unknown as PolymorphicComponent<'a', Omit<ButtonProps<void, void>, 'type'>>;\n\nButtonLink.spiritComponent = 'ButtonLink';\nButtonLink.displayName = 'ButtonLink';\n\nexport default ButtonLink;\n"],"names":["defaultProps","_ButtonLink","props","ref","propsWithDefaults","elementType","children","restProps","Component","buttonLinkProps","useButtonLinkProps","classProps","modifiedProps","useButtonLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsxs","jsx","Spinner","ButtonLink","forwardRef"],"mappings":"2XAgBMA,EAAe,CACnB,MAAO,UACP,YAAa,IAKb,QAAS,GACT,WAAY,GACZ,UAAW,GACX,cAAe,GACf,KAAM,QACR,EAEMC,EAAc,CAClBC,EACAC,IACG,CACH,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CAAE,YAAAG,EAAcL,EAAa,YAAa,SAAAM,EAAU,GAAGC,GAAcH,EAErEI,EAAYH,EAEZ,CAAE,gBAAAI,CAAA,EAAoBC,EAAAA,mBAAmBN,CAAiB,EAC1D,CAAE,WAAAO,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,wBAAwBN,CAAS,EACxE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBV,EAAW,CAAE,WAAAG,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAE1F,OACEI,EAAAA,KAACX,GAAW,GAAGO,EAAa,GAAGN,EAAkB,GAAGQ,EAAkB,IAAAd,EACnE,SAAA,CAAAG,EACAC,EAAU,WAAaa,MAACC,EAAAA,QAAA,CAAA,CAAQ,CAAA,EACnC,CAEJ,EAEMC,EAAaC,EAAAA,WACjBtB,CACF,EAEAqB,EAAW,gBAAkB,aAC7BA,EAAW,YAAc"}
1
+ {"version":3,"file":"ButtonLink.cjs","sources":["../../../src/components/ButtonLink/ButtonLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type ButtonProps,\n type ButtonSizesType,\n type PolymorphicComponent,\n type PolymorphicRef,\n type RouterLinkProps,\n type SpiritButtonLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonLinkProps } from './useButtonLinkProps';\nimport { useButtonLinkStyleProps } from './useButtonLinkStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n elementType: 'a',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium' as ButtonSizesType,\n};\n\nconst _ButtonLink = <E extends ElementType = 'a', C = void, S = void>(\n props: SpiritButtonLinkProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, routerOptions, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);\n const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n const handleClick = useLinkClick({\n ...restProps,\n routerOptions,\n onClick: buttonLinkProps.onClick,\n });\n\n return (\n <Component {...otherProps} {...buttonLinkProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst ButtonLink = forwardRef<HTMLAnchorElement, SpiritButtonLinkProps<'a', void, void>>(\n _ButtonLink,\n) as unknown as PolymorphicComponent<'a', Omit<ButtonProps<void, void>, 'type'> & RouterLinkProps>;\n\nButtonLink.spiritComponent = 'ButtonLink';\nButtonLink.displayName = 'ButtonLink';\n\nexport default ButtonLink;\n"],"names":["defaultProps","_ButtonLink","props","ref","propsWithDefaults","elementType","children","routerOptions","restProps","Component","buttonLinkProps","useButtonLinkProps","classProps","modifiedProps","useButtonLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsxs","jsx","Spinner","ButtonLink","forwardRef"],"mappings":"qaAiBMA,EAAe,CACnB,MAAO,UACP,YAAa,IAKb,QAAS,GACT,WAAY,GACZ,UAAW,GACX,cAAe,GACf,KAAM,QACR,EAEMC,EAAc,CAClBC,EACAC,IACG,CACH,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CAAE,YAAAG,EAAcL,EAAa,YAAa,SAAAM,EAAU,cAAAC,EAAe,GAAGC,GAAcJ,EAEpFK,EAAYJ,EAEZ,CAAE,gBAAAK,CAAA,EAAoBC,EAAAA,mBAAmBP,CAAiB,EAC1D,CAAE,WAAAQ,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,wBAAwBN,CAAS,EACxE,CAAA,WAAEO,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcJ,CAAa,EAC/DK,EAAmBC,EAAAA,gBAAgBV,EAAW,CAAE,WAAAG,EAAA,WAAYG,EAAY,WAAAC,EAAY,EAEpFI,EAAcC,EAAAA,aAAa,CAC/B,GAAGb,EACH,cAAAD,EACA,QAASG,EAAgB,OAAA,CAC1B,EAED,OACEY,OAACb,EAAA,CAAW,GAAGO,EAAa,GAAGN,EAAkB,GAAGQ,EAAkB,QAASE,EAAa,IAAAjB,EACzF,SAAA,CAAAG,EACAE,EAAU,WAAae,MAACC,EAAAA,QAAA,CAAA,CAAQ,CAAA,EACnC,CAEJ,EAEMC,EAAaC,EAAAA,WACjBzB,CACF,EAEAwB,EAAW,gBAAkB,aAC7BA,EAAW,YAAc"}
@@ -1,3 +1,3 @@
1
- import { ButtonProps, PolymorphicComponent } from '../../types';
2
- declare const ButtonLink: PolymorphicComponent<"a", Omit<ButtonProps<void, void>, "type">>;
1
+ import { ButtonProps, PolymorphicComponent, RouterLinkProps } from '../../types';
2
+ declare const ButtonLink: PolymorphicComponent<"a", Omit<ButtonProps<void, void>, "type"> & RouterLinkProps>;
3
3
  export default ButtonLink;
@@ -1,12 +1,13 @@
1
1
  "use client";
2
- import { jsxs as P, jsx as y } from "react/jsx-runtime";
3
- import { forwardRef as L } from "react";
4
- import { useStyleProps as k } from "../../hooks/styleProps.js";
5
- import { mergeStyleProps as B } from "../../utils/mergeStyleProps.js";
6
- import S from "../Spinner/Spinner.js";
7
- import { useButtonLinkProps as g } from "./useButtonLinkProps.js";
8
- import { useButtonLinkStyleProps as h } from "./useButtonLinkStyleProps.js";
9
- const r = {
2
+ import { jsxs as y, jsx as L } from "react/jsx-runtime";
3
+ import { forwardRef as B } from "react";
4
+ import { useStyleProps as C } from "../../hooks/styleProps.js";
5
+ import { useLinkClick as S } from "../../hooks/useLinkClick.js";
6
+ import { mergeStyleProps as h } from "../../utils/mergeStyleProps.js";
7
+ import g from "../Spinner/Spinner.js";
8
+ import { useButtonLinkProps as x } from "./useButtonLinkProps.js";
9
+ import { useButtonLinkStyleProps as T } from "./useButtonLinkStyleProps.js";
10
+ const n = {
10
11
  color: "primary",
11
12
  elementType: "a",
12
13
  /**
@@ -18,18 +19,22 @@ const r = {
18
19
  isLoading: !1,
19
20
  isSymmetrical: !1,
20
21
  size: "medium"
21
- }, x = (i, p) => {
22
- const o = { ...r, ...i }, { elementType: m = r.elementType, children: l, ...t } = o, s = m, { buttonLinkProps: a } = g(o), { classProps: c, props: f } = h(t), { styleProps: u, props: e } = k(f), d = B(s, { classProps: c, styleProps: u, otherProps: e });
23
- return /* @__PURE__ */ P(s, { ...e, ...a, ...d, ref: p, children: [
24
- l,
25
- t.isLoading && /* @__PURE__ */ y(S, {})
22
+ }, b = (p, l) => {
23
+ const t = { ...n, ...p }, { elementType: m = n.elementType, children: c, routerOptions: a, ...o } = t, s = m, { buttonLinkProps: e } = x(t), { classProps: u, props: f } = T(o), { styleProps: d, props: r } = C(f), k = h(s, { classProps: u, styleProps: d, otherProps: r }), P = S({
24
+ ...o,
25
+ routerOptions: a,
26
+ onClick: e.onClick
27
+ });
28
+ return /* @__PURE__ */ y(s, { ...r, ...e, ...k, onClick: P, ref: l, children: [
29
+ c,
30
+ o.isLoading && /* @__PURE__ */ L(g, {})
26
31
  ] });
27
- }, n = L(
28
- x
32
+ }, i = B(
33
+ b
29
34
  );
30
- n.spiritComponent = "ButtonLink";
31
- n.displayName = "ButtonLink";
35
+ i.spiritComponent = "ButtonLink";
36
+ i.displayName = "ButtonLink";
32
37
  export {
33
- n as default
38
+ i as default
34
39
  };
35
40
  //# sourceMappingURL=ButtonLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonLink.js","sources":["../../../src/components/ButtonLink/ButtonLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type ButtonProps,\n type ButtonSizesType,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritButtonLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonLinkProps } from './useButtonLinkProps';\nimport { useButtonLinkStyleProps } from './useButtonLinkStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n elementType: 'a',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium' as ButtonSizesType,\n};\n\nconst _ButtonLink = <E extends ElementType = 'a', C = void, S = void>(\n props: SpiritButtonLinkProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);\n const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...buttonLinkProps} {...mergedStyleProps} ref={ref}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst ButtonLink = forwardRef<HTMLAnchorElement, SpiritButtonLinkProps<'a', void, void>>(\n _ButtonLink,\n) as unknown as PolymorphicComponent<'a', Omit<ButtonProps<void, void>, 'type'>>;\n\nButtonLink.spiritComponent = 'ButtonLink';\nButtonLink.displayName = 'ButtonLink';\n\nexport default ButtonLink;\n"],"names":["defaultProps","_ButtonLink","props","ref","propsWithDefaults","elementType","children","restProps","Component","buttonLinkProps","useButtonLinkProps","classProps","modifiedProps","useButtonLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsxs","jsx","Spinner","ButtonLink","forwardRef"],"mappings":";;;;;;;;AAgBA,MAAMA,IAAe;AAAA,EACnB,OAAO;AAAA,EACP,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAKb,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,MAAM;AACR,GAEMC,IAAc,CAClBC,GACAC,MACG;AACH,QAAMC,IAAoB,EAAE,GAAGJ,GAAc,GAAGE,EAAA,GAC1C,EAAE,aAAAG,IAAcL,EAAa,aAAa,UAAAM,GAAU,GAAGC,MAAcH,GAErEI,IAAYH,GAEZ,EAAE,iBAAAI,EAAA,IAAoBC,EAAmBN,CAAiB,GAC1D,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAkBC,EAAwBN,CAAS,GACxE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcJ,CAAa,GAC/DK,IAAmBC,EAAgBV,GAAW,EAAE,YAAAG,GAAY,YAAAG,GAAY,YAAAC,GAAY;AAE1F,SACE,gBAAAI,EAACX,KAAW,GAAGO,GAAa,GAAGN,GAAkB,GAAGQ,GAAkB,KAAAd,GACnE,UAAA;AAAA,IAAAG;AAAA,IACAC,EAAU,aAAa,gBAAAa,EAACC,GAAA,CAAA,CAAQ;AAAA,EAAA,GACnC;AAEJ,GAEMC,IAAaC;AAAA,EACjBtB;AACF;AAEAqB,EAAW,kBAAkB;AAC7BA,EAAW,cAAc;"}
1
+ {"version":3,"file":"ButtonLink.js","sources":["../../../src/components/ButtonLink/ButtonLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useLinkClick, useStyleProps } from '../../hooks';\nimport {\n type ButtonProps,\n type ButtonSizesType,\n type PolymorphicComponent,\n type PolymorphicRef,\n type RouterLinkProps,\n type SpiritButtonLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { Spinner } from '../Spinner';\nimport { useButtonLinkProps } from './useButtonLinkProps';\nimport { useButtonLinkStyleProps } from './useButtonLinkStyleProps';\n\nconst defaultProps = {\n color: 'primary',\n elementType: 'a',\n /**\n * @deprecated \"isBlock\" property will be removed in the next major version. Please read component's README for more information.\n * @see https://jira.almacareer.tech/browse/DS-1897\n */\n isBlock: false,\n isDisabled: false,\n isLoading: false,\n isSymmetrical: false,\n size: 'medium' as ButtonSizesType,\n};\n\nconst _ButtonLink = <E extends ElementType = 'a', C = void, S = void>(\n props: SpiritButtonLinkProps<E, C, S>,\n ref: PolymorphicRef<E>,\n) => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType = defaultProps.elementType, children, routerOptions, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { buttonLinkProps } = useButtonLinkProps(propsWithDefaults);\n const { classProps, props: modifiedProps } = useButtonLinkStyleProps(restProps);\n const { styleProps, props: otherProps } = useStyleProps(modifiedProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps, styleProps, otherProps });\n\n const handleClick = useLinkClick({\n ...restProps,\n routerOptions,\n onClick: buttonLinkProps.onClick,\n });\n\n return (\n <Component {...otherProps} {...buttonLinkProps} {...mergedStyleProps} onClick={handleClick} ref={ref}>\n {children}\n {restProps.isLoading && <Spinner />}\n </Component>\n );\n};\n\nconst ButtonLink = forwardRef<HTMLAnchorElement, SpiritButtonLinkProps<'a', void, void>>(\n _ButtonLink,\n) as unknown as PolymorphicComponent<'a', Omit<ButtonProps<void, void>, 'type'> & RouterLinkProps>;\n\nButtonLink.spiritComponent = 'ButtonLink';\nButtonLink.displayName = 'ButtonLink';\n\nexport default ButtonLink;\n"],"names":["defaultProps","_ButtonLink","props","ref","propsWithDefaults","elementType","children","routerOptions","restProps","Component","buttonLinkProps","useButtonLinkProps","classProps","modifiedProps","useButtonLinkStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","handleClick","useLinkClick","jsxs","jsx","Spinner","ButtonLink","forwardRef"],"mappings":";;;;;;;;;AAiBA,MAAMA,IAAe;AAAA,EACnB,OAAO;AAAA,EACP,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAKb,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,MAAM;AACR,GAEMC,IAAc,CAClBC,GACAC,MACG;AACH,QAAMC,IAAoB,EAAE,GAAGJ,GAAc,GAAGE,EAAA,GAC1C,EAAE,aAAAG,IAAcL,EAAa,aAAa,UAAAM,GAAU,eAAAC,GAAe,GAAGC,MAAcJ,GAEpFK,IAAYJ,GAEZ,EAAE,iBAAAK,EAAA,IAAoBC,EAAmBP,CAAiB,GAC1D,EAAE,YAAAQ,GAAY,OAAOC,EAAA,IAAkBC,EAAwBN,CAAS,GACxE,EAAE,YAAAO,GAAY,OAAOC,EAAA,IAAeC,EAAcJ,CAAa,GAC/DK,IAAmBC,EAAgBV,GAAW,EAAE,YAAAG,GAAY,YAAAG,GAAY,YAAAC,GAAY,GAEpFI,IAAcC,EAAa;AAAA,IAC/B,GAAGb;AAAA,IACH,eAAAD;AAAA,IACA,SAASG,EAAgB;AAAA,EAAA,CAC1B;AAED,SACE,gBAAAY,EAACb,GAAA,EAAW,GAAGO,GAAa,GAAGN,GAAkB,GAAGQ,GAAkB,SAASE,GAAa,KAAAjB,GACzF,UAAA;AAAA,IAAAG;AAAA,IACAE,EAAU,aAAa,gBAAAe,EAACC,GAAA,CAAA,CAAQ;AAAA,EAAA,GACnC;AAEJ,GAEMC,IAAaC;AAAA,EACjBzB;AACF;AAEAwB,EAAW,kBAAkB;AAC7BA,EAAW,cAAc;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useButtonLinkStyleProps.cjs","sources":["../../../src/components/ButtonLink/useButtonLinkStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { warning } from '../../common/utilities';\nimport { useClassNamePrefix, useDeprecationMessage, useSymmetry } from '../../hooks';\nimport { type ButtonColor, type ButtonSize, type ButtonStyleProps } from '../../types';\nimport { applyColor, applySize } from '../../utils/classname';\nimport { compose } from '../../utils/compose';\n\n// `${componentClassName}--${color}`;\nconst getButtonLinkColorClassname = <C = void>(className: string, color: ButtonColor<C>): string =>\n compose(applyColor<ButtonColor<C>>(color))(className);\n\nconst getButtonLinkSizeClassname = <S = void>(className: string, size: ButtonSize<S>): string =>\n compose(applySize<ButtonSize<S>>(size))(className);\n\nexport function useButtonLinkStyleProps<C = void, S = void>(props: ButtonStyleProps<C, S>) {\n const { color, isBlock, isDisabled, isLoading, isSymmetrical, size, ...restProps } = props;\n\n // @see https://jira.almacareer.tech/browse/DS-1897\n useDeprecationMessage({\n method: 'custom',\n trigger: !!isBlock,\n componentName: 'ButtonLink',\n customText:\n \"The `isBlock` property will be deleted in the next major release. Please read component's documentation for more information.\",\n });\n\n const buttonClass = useClassNamePrefix('Button');\n const buttonBlockClass = `${buttonClass}--block`;\n const buttonDisabledClass = `${buttonClass}--disabled`;\n const buttonLoadingClass = `${buttonClass}--loading`;\n\n const { isSymmetricalActive, symmetricalClassName } = useSymmetry(buttonClass, isSymmetrical);\n\n if (isBlock && isSymmetricalActive) {\n warning(false, 'isBlock and isSymmetrical props are mutually exclusive');\n }\n\n // @deprecated \"isBlock\" will be removed in the next major version. Please read component's documentation for more information.\n const shouldApplyBlock = () => isBlock && !isSymmetricalActive;\n\n const classProps = classNames(\n buttonClass,\n getButtonLinkColorClassname(buttonClass, color as ButtonColor<C>),\n getButtonLinkSizeClassname(buttonClass, size as ButtonSize<S>),\n {\n [buttonBlockClass]: shouldApplyBlock(),\n [buttonDisabledClass]: isDisabled || isLoading,\n [buttonLoadingClass]: isLoading,\n },\n symmetricalClassName,\n );\n\n return {\n classProps,\n props: restProps,\n };\n}\n"],"names":["getButtonLinkColorClassname","className","color","compose","applyColor","getButtonLinkSizeClassname","size","applySize","useButtonLinkStyleProps","props","isBlock","isDisabled","isLoading","isSymmetrical","restProps","useDeprecationMessage","buttonClass","useClassNamePrefix","buttonBlockClass","buttonDisabledClass","buttonLoadingClass","isSymmetricalActive","symmetricalClassName","useSymmetry","warning","shouldApplyBlock","classNames"],"mappings":"sXAQMA,EAA8B,CAAWC,EAAmBC,IAChEC,EAAAA,QAAQC,EAAAA,WAA2BF,CAAK,CAAC,EAAED,CAAS,EAEhDI,EAA6B,CAAWJ,EAAmBK,IAC/DH,EAAAA,QAAQI,EAAAA,UAAyBD,CAAI,CAAC,EAAEL,CAAS,EAE5C,SAASO,EAA4CC,EAA+B,CACzF,KAAM,CAAE,MAAAP,EAAO,QAAAQ,EAAS,WAAAC,EAAY,UAAAC,EAAW,cAAAC,EAAe,KAAAP,EAAM,GAAGQ,CAAA,EAAcL,EAGrFM,wBAAsB,CACpB,OAAQ,SACR,QAAS,CAAC,CAACL,EACX,cAAe,aACf,WACE,+HAAA,CACH,EAED,MAAMM,EAAcC,EAAAA,mBAAmB,QAAQ,EACzCC,EAAmB,GAAGF,CAAW,UACjCG,EAAsB,GAAGH,CAAW,aACpCI,EAAqB,GAAGJ,CAAW,YAEnC,CAAE,oBAAAK,EAAqB,qBAAAC,CAAA,EAAyBC,EAAAA,YAAYP,EAAaH,CAAa,EAExFH,GAAWW,GACbG,EAAAA,QAAQ,GAAO,wDAAwD,EAIzE,MAAMC,EAAmB,IAAMf,GAAW,CAACW,EAc3C,MAAO,CACL,WAbiBK,EACjBV,EACAhB,EAA4BgB,EAAad,CAAuB,EAChEG,EAA2BW,EAAaV,CAAqB,EAC7D,CACE,CAACY,CAAgB,EAAGO,EAAA,EACpB,CAACN,CAAmB,EAAGR,GAAcC,EACrC,CAACQ,CAAkB,EAAGR,CAAA,EAExBU,CAAA,EAKA,MAAOR,CAAA,CAEX"}
1
+ {"version":3,"file":"useButtonLinkStyleProps.cjs","sources":["../../../src/components/ButtonLink/useButtonLinkStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { warning } from '../../common/utilities';\nimport { useClassNamePrefix, useDeprecationMessage, useSymmetry } from '../../hooks';\nimport { type ButtonColor, type ButtonLinkStyleProps, type ButtonSize } from '../../types';\nimport { applyColor, applySize } from '../../utils/classname';\nimport { compose } from '../../utils/compose';\n\n// `${componentClassName}--${color}`;\nconst getButtonLinkColorClassname = <C = void>(className: string, color: ButtonColor<C>): string =>\n compose(applyColor<ButtonColor<C>>(color))(className);\n\nconst getButtonLinkSizeClassname = <S = void>(className: string, size: ButtonSize<S>): string =>\n compose(applySize<ButtonSize<S>>(size))(className);\n\nexport function useButtonLinkStyleProps<C = void, S = void>(props: Omit<ButtonLinkStyleProps<C, S>, 'routerOptions'>) {\n const { color, isBlock, isDisabled, isLoading, isSymmetrical, size, ...restProps } = props;\n\n // @see https://jira.almacareer.tech/browse/DS-1897\n useDeprecationMessage({\n method: 'custom',\n trigger: !!isBlock,\n componentName: 'ButtonLink',\n customText:\n \"The `isBlock` property will be deleted in the next major release. Please read component's documentation for more information.\",\n });\n\n const buttonClass = useClassNamePrefix('Button');\n const buttonBlockClass = `${buttonClass}--block`;\n const buttonDisabledClass = `${buttonClass}--disabled`;\n const buttonLoadingClass = `${buttonClass}--loading`;\n\n const { isSymmetricalActive, symmetricalClassName } = useSymmetry(buttonClass, isSymmetrical);\n\n if (isBlock && isSymmetricalActive) {\n warning(false, 'isBlock and isSymmetrical props are mutually exclusive');\n }\n\n // @deprecated \"isBlock\" will be removed in the next major version. Please read component's documentation for more information.\n const shouldApplyBlock = () => isBlock && !isSymmetricalActive;\n\n const classProps = classNames(\n buttonClass,\n getButtonLinkColorClassname(buttonClass, color as ButtonColor<C>),\n getButtonLinkSizeClassname(buttonClass, size as ButtonSize<S>),\n {\n [buttonBlockClass]: shouldApplyBlock(),\n [buttonDisabledClass]: isDisabled || isLoading,\n [buttonLoadingClass]: isLoading,\n },\n symmetricalClassName,\n );\n\n return {\n classProps,\n props: restProps,\n };\n}\n"],"names":["getButtonLinkColorClassname","className","color","compose","applyColor","getButtonLinkSizeClassname","size","applySize","useButtonLinkStyleProps","props","isBlock","isDisabled","isLoading","isSymmetrical","restProps","useDeprecationMessage","buttonClass","useClassNamePrefix","buttonBlockClass","buttonDisabledClass","buttonLoadingClass","isSymmetricalActive","symmetricalClassName","useSymmetry","warning","shouldApplyBlock","classNames"],"mappings":"sXAQMA,EAA8B,CAAWC,EAAmBC,IAChEC,EAAAA,QAAQC,EAAAA,WAA2BF,CAAK,CAAC,EAAED,CAAS,EAEhDI,EAA6B,CAAWJ,EAAmBK,IAC/DH,EAAAA,QAAQI,EAAAA,UAAyBD,CAAI,CAAC,EAAEL,CAAS,EAE5C,SAASO,EAA4CC,EAA0D,CACpH,KAAM,CAAE,MAAAP,EAAO,QAAAQ,EAAS,WAAAC,EAAY,UAAAC,EAAW,cAAAC,EAAe,KAAAP,EAAM,GAAGQ,CAAA,EAAcL,EAGrFM,wBAAsB,CACpB,OAAQ,SACR,QAAS,CAAC,CAACL,EACX,cAAe,aACf,WACE,+HAAA,CACH,EAED,MAAMM,EAAcC,EAAAA,mBAAmB,QAAQ,EACzCC,EAAmB,GAAGF,CAAW,UACjCG,EAAsB,GAAGH,CAAW,aACpCI,EAAqB,GAAGJ,CAAW,YAEnC,CAAE,oBAAAK,EAAqB,qBAAAC,CAAA,EAAyBC,EAAAA,YAAYP,EAAaH,CAAa,EAExFH,GAAWW,GACbG,EAAAA,QAAQ,GAAO,wDAAwD,EAIzE,MAAMC,EAAmB,IAAMf,GAAW,CAACW,EAc3C,MAAO,CACL,WAbiBK,EACjBV,EACAhB,EAA4BgB,EAAad,CAAuB,EAChEG,EAA2BW,EAAaV,CAAqB,EAC7D,CACE,CAACY,CAAgB,EAAGO,EAAA,EACpB,CAACN,CAAmB,EAAGR,GAAcC,EACrC,CAACQ,CAAkB,EAAGR,CAAA,EAExBU,CAAA,EAKA,MAAOR,CAAA,CAEX"}
@@ -1,11 +1,9 @@
1
- import { ButtonStyleProps } from '../../types';
2
- export declare function useButtonLinkStyleProps<C = void, S = void>(props: ButtonStyleProps<C, S>): {
1
+ import { ButtonLinkStyleProps } from '../../types';
2
+ export declare function useButtonLinkStyleProps<C = void, S = void>(props: Omit<ButtonLinkStyleProps<C, S>, 'routerOptions'>): {
3
3
  classProps: string;
4
4
  props: {
5
- children?: React.ReactNode | string;
6
- theme?: import('../..').ThemeNameType;
7
- UNSAFE_className?: string;
8
- UNSAFE_style?: React.CSSProperties;
5
+ children?: React.ReactNode;
6
+ onClick?: ((event: import('../..').ClickEvent) => void) | undefined;
9
7
  margin?: import('../..').SingleOrResponsive<"auto" | `space-${number}`> | undefined;
10
8
  marginTop?: import('../..').SingleOrResponsive<"auto" | `space-${number}`> | undefined;
11
9
  marginRight?: import('../..').SingleOrResponsive<"auto" | `space-${number}`> | undefined;
@@ -13,8 +11,10 @@ export declare function useButtonLinkStyleProps<C = void, S = void>(props: Butto
13
11
  marginLeft?: import('../..').SingleOrResponsive<"auto" | `space-${number}`> | undefined;
14
12
  marginX?: import('../..').SingleOrResponsive<"auto" | `space-${number}`> | undefined;
15
13
  marginY?: import('../..').SingleOrResponsive<"auto" | `space-${number}`> | undefined;
16
- hideOn?: import('../..').BreakpointToken | import('../..').BreakpointToken[];
17
- hideFrom?: import('../..').BreakpointToken;
18
- onClick?: (event: import('../..').ClickEvent) => void;
14
+ theme?: import('../..').ThemeNameType | undefined;
15
+ UNSAFE_className?: string | undefined;
16
+ UNSAFE_style?: React.CSSProperties | undefined;
17
+ hideOn?: (import('../..').BreakpointToken | import('../..').BreakpointToken[]) | undefined;
18
+ hideFrom?: import('../..').BreakpointToken | undefined;
19
19
  };
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useButtonLinkStyleProps.js","sources":["../../../src/components/ButtonLink/useButtonLinkStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { warning } from '../../common/utilities';\nimport { useClassNamePrefix, useDeprecationMessage, useSymmetry } from '../../hooks';\nimport { type ButtonColor, type ButtonSize, type ButtonStyleProps } from '../../types';\nimport { applyColor, applySize } from '../../utils/classname';\nimport { compose } from '../../utils/compose';\n\n// `${componentClassName}--${color}`;\nconst getButtonLinkColorClassname = <C = void>(className: string, color: ButtonColor<C>): string =>\n compose(applyColor<ButtonColor<C>>(color))(className);\n\nconst getButtonLinkSizeClassname = <S = void>(className: string, size: ButtonSize<S>): string =>\n compose(applySize<ButtonSize<S>>(size))(className);\n\nexport function useButtonLinkStyleProps<C = void, S = void>(props: ButtonStyleProps<C, S>) {\n const { color, isBlock, isDisabled, isLoading, isSymmetrical, size, ...restProps } = props;\n\n // @see https://jira.almacareer.tech/browse/DS-1897\n useDeprecationMessage({\n method: 'custom',\n trigger: !!isBlock,\n componentName: 'ButtonLink',\n customText:\n \"The `isBlock` property will be deleted in the next major release. Please read component's documentation for more information.\",\n });\n\n const buttonClass = useClassNamePrefix('Button');\n const buttonBlockClass = `${buttonClass}--block`;\n const buttonDisabledClass = `${buttonClass}--disabled`;\n const buttonLoadingClass = `${buttonClass}--loading`;\n\n const { isSymmetricalActive, symmetricalClassName } = useSymmetry(buttonClass, isSymmetrical);\n\n if (isBlock && isSymmetricalActive) {\n warning(false, 'isBlock and isSymmetrical props are mutually exclusive');\n }\n\n // @deprecated \"isBlock\" will be removed in the next major version. Please read component's documentation for more information.\n const shouldApplyBlock = () => isBlock && !isSymmetricalActive;\n\n const classProps = classNames(\n buttonClass,\n getButtonLinkColorClassname(buttonClass, color as ButtonColor<C>),\n getButtonLinkSizeClassname(buttonClass, size as ButtonSize<S>),\n {\n [buttonBlockClass]: shouldApplyBlock(),\n [buttonDisabledClass]: isDisabled || isLoading,\n [buttonLoadingClass]: isLoading,\n },\n symmetricalClassName,\n );\n\n return {\n classProps,\n props: restProps,\n };\n}\n"],"names":["getButtonLinkColorClassname","className","color","compose","applyColor","getButtonLinkSizeClassname","size","applySize","useButtonLinkStyleProps","props","isBlock","isDisabled","isLoading","isSymmetrical","restProps","useDeprecationMessage","buttonClass","useClassNamePrefix","buttonBlockClass","buttonDisabledClass","buttonLoadingClass","isSymmetricalActive","symmetricalClassName","useSymmetry","warning","shouldApplyBlock","classNames"],"mappings":";;;;;;;AAQA,MAAMA,IAA8B,CAAWC,GAAmBC,MAChEC,EAAQC,EAA2BF,CAAK,CAAC,EAAED,CAAS,GAEhDI,IAA6B,CAAWJ,GAAmBK,MAC/DH,EAAQI,EAAyBD,CAAI,CAAC,EAAEL,CAAS;AAE5C,SAASO,EAA4CC,GAA+B;AACzF,QAAM,EAAE,OAAAP,GAAO,SAAAQ,GAAS,YAAAC,GAAY,WAAAC,GAAW,eAAAC,GAAe,MAAAP,GAAM,GAAGQ,EAAA,IAAcL;AAGrF,EAAAM,EAAsB;AAAA,IACpB,QAAQ;AAAA,IACR,SAAS,CAAC,CAACL;AAAA,IACX,eAAe;AAAA,IACf,YACE;AAAA,EAAA,CACH;AAED,QAAMM,IAAcC,EAAmB,QAAQ,GACzCC,IAAmB,GAAGF,CAAW,WACjCG,IAAsB,GAAGH,CAAW,cACpCI,IAAqB,GAAGJ,CAAW,aAEnC,EAAE,qBAAAK,GAAqB,sBAAAC,EAAA,IAAyBC,EAAYP,GAAaH,CAAa;AAE5F,EAAIH,KAAWW,KACbG,EAAQ,IAAO,wDAAwD;AAIzE,QAAMC,IAAmB,MAAMf,KAAW,CAACW;AAc3C,SAAO;AAAA,IACL,YAbiBK;AAAA,MACjBV;AAAA,MACAhB,EAA4BgB,GAAad,CAAuB;AAAA,MAChEG,EAA2BW,GAAaV,CAAqB;AAAA,MAC7D;AAAA,QACE,CAACY,CAAgB,GAAGO,EAAA;AAAA,QACpB,CAACN,CAAmB,GAAGR,KAAcC;AAAA,QACrC,CAACQ,CAAkB,GAAGR;AAAA,MAAA;AAAA,MAExBU;AAAA,IAAA;AAAA,IAKA,OAAOR;AAAA,EAAA;AAEX;"}
1
+ {"version":3,"file":"useButtonLinkStyleProps.js","sources":["../../../src/components/ButtonLink/useButtonLinkStyleProps.ts"],"sourcesContent":["import classNames from 'classnames';\nimport { warning } from '../../common/utilities';\nimport { useClassNamePrefix, useDeprecationMessage, useSymmetry } from '../../hooks';\nimport { type ButtonColor, type ButtonLinkStyleProps, type ButtonSize } from '../../types';\nimport { applyColor, applySize } from '../../utils/classname';\nimport { compose } from '../../utils/compose';\n\n// `${componentClassName}--${color}`;\nconst getButtonLinkColorClassname = <C = void>(className: string, color: ButtonColor<C>): string =>\n compose(applyColor<ButtonColor<C>>(color))(className);\n\nconst getButtonLinkSizeClassname = <S = void>(className: string, size: ButtonSize<S>): string =>\n compose(applySize<ButtonSize<S>>(size))(className);\n\nexport function useButtonLinkStyleProps<C = void, S = void>(props: Omit<ButtonLinkStyleProps<C, S>, 'routerOptions'>) {\n const { color, isBlock, isDisabled, isLoading, isSymmetrical, size, ...restProps } = props;\n\n // @see https://jira.almacareer.tech/browse/DS-1897\n useDeprecationMessage({\n method: 'custom',\n trigger: !!isBlock,\n componentName: 'ButtonLink',\n customText:\n \"The `isBlock` property will be deleted in the next major release. Please read component's documentation for more information.\",\n });\n\n const buttonClass = useClassNamePrefix('Button');\n const buttonBlockClass = `${buttonClass}--block`;\n const buttonDisabledClass = `${buttonClass}--disabled`;\n const buttonLoadingClass = `${buttonClass}--loading`;\n\n const { isSymmetricalActive, symmetricalClassName } = useSymmetry(buttonClass, isSymmetrical);\n\n if (isBlock && isSymmetricalActive) {\n warning(false, 'isBlock and isSymmetrical props are mutually exclusive');\n }\n\n // @deprecated \"isBlock\" will be removed in the next major version. Please read component's documentation for more information.\n const shouldApplyBlock = () => isBlock && !isSymmetricalActive;\n\n const classProps = classNames(\n buttonClass,\n getButtonLinkColorClassname(buttonClass, color as ButtonColor<C>),\n getButtonLinkSizeClassname(buttonClass, size as ButtonSize<S>),\n {\n [buttonBlockClass]: shouldApplyBlock(),\n [buttonDisabledClass]: isDisabled || isLoading,\n [buttonLoadingClass]: isLoading,\n },\n symmetricalClassName,\n );\n\n return {\n classProps,\n props: restProps,\n };\n}\n"],"names":["getButtonLinkColorClassname","className","color","compose","applyColor","getButtonLinkSizeClassname","size","applySize","useButtonLinkStyleProps","props","isBlock","isDisabled","isLoading","isSymmetrical","restProps","useDeprecationMessage","buttonClass","useClassNamePrefix","buttonBlockClass","buttonDisabledClass","buttonLoadingClass","isSymmetricalActive","symmetricalClassName","useSymmetry","warning","shouldApplyBlock","classNames"],"mappings":";;;;;;;AAQA,MAAMA,IAA8B,CAAWC,GAAmBC,MAChEC,EAAQC,EAA2BF,CAAK,CAAC,EAAED,CAAS,GAEhDI,IAA6B,CAAWJ,GAAmBK,MAC/DH,EAAQI,EAAyBD,CAAI,CAAC,EAAEL,CAAS;AAE5C,SAASO,EAA4CC,GAA0D;AACpH,QAAM,EAAE,OAAAP,GAAO,SAAAQ,GAAS,YAAAC,GAAY,WAAAC,GAAW,eAAAC,GAAe,MAAAP,GAAM,GAAGQ,EAAA,IAAcL;AAGrF,EAAAM,EAAsB;AAAA,IACpB,QAAQ;AAAA,IACR,SAAS,CAAC,CAACL;AAAA,IACX,eAAe;AAAA,IACf,YACE;AAAA,EAAA,CACH;AAED,QAAMM,IAAcC,EAAmB,QAAQ,GACzCC,IAAmB,GAAGF,CAAW,WACjCG,IAAsB,GAAGH,CAAW,cACpCI,IAAqB,GAAGJ,CAAW,aAEnC,EAAE,qBAAAK,GAAqB,sBAAAC,EAAA,IAAyBC,EAAYP,GAAaH,CAAa;AAE5F,EAAIH,KAAWW,KACbG,EAAQ,IAAO,wDAAwD;AAIzE,QAAMC,IAAmB,MAAMf,KAAW,CAACW;AAc3C,SAAO;AAAA,IACL,YAbiBK;AAAA,MACjBV;AAAA,MACAhB,EAA4BgB,GAAad,CAAuB;AAAA,MAChEG,EAA2BW,GAAaV,CAAqB;AAAA,MAC7D;AAAA,QACE,CAACY,CAAgB,GAAGO,EAAA;AAAA,QACpB,CAACN,CAAmB,GAAGR,KAAcC;AAAA,QACrC,CAACQ,CAAkB,GAAGR;AAAA,MAAA;AAAA,MAExBU;AAAA,IAAA;AAAA,IAKA,OAAOR;AAAA,EAAA;AAEX;"}
@@ -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"),y=require("react"),m=require("../../hooks/styleProps.cjs"),S=require("../../utils/mergeStyleProps.cjs"),f=require("./useCardStyleProps.cjs"),o={elementType:"a"},C=(n,l)=>{const p={...o,...n},{elementType:s=o.elementType,children:i,href:c,...u}=p,{classProps:a}=f.useCardStyleProps(),{styleProps:r,props:t}=m.useStyleProps(u),P=S.mergeStyleProps(s,{classProps:a.link,styleProps:r,otherProps:t});return d.jsx(s,{...t,...r,...P,href:c,ref:l,children:i})},e=y.forwardRef(C);e.spiritComponent="CardLink";e.displayName="CardLink";exports.default=e;
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),y=require("react"),m=require("../../hooks/styleProps.cjs"),C=require("../../utils/mergeStyleProps.cjs"),S=require("./useCardStyleProps.cjs"),f={elementType:"a"},g=(o,n)=>{const l={...f,...o},{elementType:p,children:c,href:i,...u}=l,s=p,{classProps:a}=S.useCardStyleProps(),{styleProps:r,props:t}=m.useStyleProps(u),P=C.mergeStyleProps(s,{classProps:a.link,styleProps:r,otherProps:t});return d.jsx(s,{...t,...r,...P,href:i,ref:n,children:c})},e=y.forwardRef(g);e.spiritComponent="CardLink";e.displayName="CardLink";exports.default=e;
2
2
  //# sourceMappingURL=CardLink.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardLink.cjs","sources":["../../../src/components/Card/CardLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type PolymorphicComponent, type PolymorphicRef, type SpiritCardLinkProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useCardStyleProps } from './useCardStyleProps';\n\nconst defaultProps: Partial<SpiritCardLinkProps> = {\n elementType: 'a',\n};\n\nconst _CardLink = <E extends ElementType = 'a'>(props: SpiritCardLinkProps<E>, ref: PolymorphicRef<E>): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const {\n elementType: ElementTag = defaultProps.elementType as ElementType,\n children,\n href,\n ...restProps\n } = propsWithDefaults;\n const { classProps } = useCardStyleProps();\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.link, styleProps, otherProps });\n\n return (\n <ElementTag {...otherProps} {...styleProps} {...mergedStyleProps} href={href} ref={ref}>\n {children}\n </ElementTag>\n );\n};\n\nconst CardLink = forwardRef<HTMLAnchorElement, SpiritCardLinkProps<'a'>>(_CardLink) as unknown as PolymorphicComponent<\n 'a',\n SpiritCardLinkProps<'a'>\n>;\n\nCardLink.spiritComponent = 'CardLink';\nCardLink.displayName = 'CardLink';\n\nexport default CardLink;\n"],"names":["defaultProps","_CardLink","props","ref","propsWithDefaults","ElementTag","children","href","restProps","classProps","useCardStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsx","CardLink","forwardRef"],"mappings":"2SAQMA,EAA6C,CACjD,YAAa,GACf,EAEMC,EAAY,CAA8BC,EAA+BC,IAAwC,CACrH,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CACJ,YAAaG,EAAaL,EAAa,YACvC,SAAAM,EACA,KAAAC,EACA,GAAGC,CAAA,EACDJ,EACE,CAAE,WAAAK,CAAA,EAAeC,oBAAA,EACjB,CAAA,WAAEC,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcL,CAAS,EAC3DM,EAAmBC,kBAAgBV,EAAY,CAAE,WAAYI,EAAW,KAAA,WAAME,EAAY,WAAAC,EAAY,EAE5G,OACEI,MAACX,EAAA,CAAY,GAAGO,EAAa,GAAGD,EAAa,GAAGG,EAAkB,KAAAP,EAAY,IAAAJ,EAC3E,SAAAG,CAAA,CACH,CAEJ,EAEMW,EAAWC,EAAAA,WAAwDjB,CAAS,EAKlFgB,EAAS,gBAAkB,WAC3BA,EAAS,YAAc"}
1
+ {"version":3,"file":"CardLink.cjs","sources":["../../../src/components/Card/CardLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type CardLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritCardLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useCardStyleProps } from './useCardStyleProps';\n\nconst defaultProps = {\n elementType: 'a',\n};\n\nconst _CardLink = <E extends ElementType = 'a'>(props: SpiritCardLinkProps<E>, ref: PolymorphicRef<E>): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType, children, href, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useCardStyleProps();\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...styleProps} {...mergedStyleProps} href={href} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst CardLink = forwardRef<HTMLAnchorElement, SpiritCardLinkProps<'a'>>(_CardLink) as unknown as PolymorphicComponent<\n 'a',\n CardLinkProps\n>;\n\nCardLink.spiritComponent = 'CardLink';\nCardLink.displayName = 'CardLink';\n\nexport default CardLink;\n"],"names":["defaultProps","_CardLink","props","ref","propsWithDefaults","elementType","children","href","restProps","Component","classProps","useCardStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsx","CardLink","forwardRef"],"mappings":"2SAaMA,EAAe,CACnB,YAAa,GACf,EAEMC,EAAY,CAA8BC,EAA+BC,IAAwC,CACrH,MAAMC,EAAoB,CAAE,GAAGJ,EAAc,GAAGE,CAAA,EAC1C,CAAE,YAAAG,EAAa,SAAAC,EAAU,KAAAC,EAAM,GAAGC,GAAcJ,EAEhDK,EAAYJ,EAEZ,CAAE,WAAAK,CAAA,EAAeC,oBAAA,EACjB,CAAA,WAAEC,EAAY,MAAOC,CAAA,EAAeC,EAAAA,cAAcN,CAAS,EAC3DO,EAAmBC,kBAAgBP,EAAW,CAAE,WAAYC,EAAW,KAAA,WAAME,EAAY,WAAAC,EAAY,EAE3G,OACEI,MAACR,EAAA,CAAW,GAAGI,EAAa,GAAGD,EAAa,GAAGG,EAAkB,KAAAR,EAAY,IAAAJ,EAC1E,SAAAG,CAAA,CACH,CAEJ,EAEMY,EAAWC,EAAAA,WAAwDlB,CAAS,EAKlFiB,EAAS,gBAAkB,WAC3BA,EAAS,YAAc"}
@@ -1,3 +1,3 @@
1
- import { PolymorphicComponent, SpiritCardLinkProps } from '../../types';
2
- declare const CardLink: PolymorphicComponent<"a", SpiritCardLinkProps<"a">>;
1
+ import { CardLinkProps, PolymorphicComponent } from '../../types';
2
+ declare const CardLink: PolymorphicComponent<"a", CardLinkProps>;
3
3
  export default CardLink;
@@ -1,23 +1,18 @@
1
1
  "use client";
2
2
  import { jsx as f } from "react/jsx-runtime";
3
3
  import { forwardRef as P } from "react";
4
- import { useStyleProps as y } from "../../hooks/styleProps.js";
5
- import { mergeStyleProps as u } from "../../utils/mergeStyleProps.js";
4
+ import { useStyleProps as u } from "../../hooks/styleProps.js";
5
+ import { mergeStyleProps as y } from "../../utils/mergeStyleProps.js";
6
6
  import { useCardStyleProps as C } from "./useCardStyleProps.js";
7
- const o = {
7
+ const k = {
8
8
  elementType: "a"
9
- }, k = (p, n) => {
10
- const l = { ...o, ...p }, {
11
- elementType: e = o.elementType,
12
- children: m,
13
- href: i,
14
- ...a
15
- } = l, { classProps: c } = C(), { styleProps: r, props: s } = y(a), d = u(e, { classProps: c.link, styleProps: r, otherProps: s });
16
- return /* @__PURE__ */ f(e, { ...s, ...r, ...d, href: i, ref: n, children: m });
17
- }, t = P(k);
18
- t.spiritComponent = "CardLink";
19
- t.displayName = "CardLink";
9
+ }, h = (t, p) => {
10
+ const n = { ...k, ...t }, { elementType: i, children: m, href: l, ...a } = n, r = i, { classProps: c } = C(), { styleProps: o, props: s } = u(a), d = y(r, { classProps: c.link, styleProps: o, otherProps: s });
11
+ return /* @__PURE__ */ f(r, { ...s, ...o, ...d, href: l, ref: p, children: m });
12
+ }, e = P(h);
13
+ e.spiritComponent = "CardLink";
14
+ e.displayName = "CardLink";
20
15
  export {
21
- t as default
16
+ e as default
22
17
  };
23
18
  //# sourceMappingURL=CardLink.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardLink.js","sources":["../../../src/components/Card/CardLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport { type PolymorphicComponent, type PolymorphicRef, type SpiritCardLinkProps } from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useCardStyleProps } from './useCardStyleProps';\n\nconst defaultProps: Partial<SpiritCardLinkProps> = {\n elementType: 'a',\n};\n\nconst _CardLink = <E extends ElementType = 'a'>(props: SpiritCardLinkProps<E>, ref: PolymorphicRef<E>): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const {\n elementType: ElementTag = defaultProps.elementType as ElementType,\n children,\n href,\n ...restProps\n } = propsWithDefaults;\n const { classProps } = useCardStyleProps();\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(ElementTag, { classProps: classProps.link, styleProps, otherProps });\n\n return (\n <ElementTag {...otherProps} {...styleProps} {...mergedStyleProps} href={href} ref={ref}>\n {children}\n </ElementTag>\n );\n};\n\nconst CardLink = forwardRef<HTMLAnchorElement, SpiritCardLinkProps<'a'>>(_CardLink) as unknown as PolymorphicComponent<\n 'a',\n SpiritCardLinkProps<'a'>\n>;\n\nCardLink.spiritComponent = 'CardLink';\nCardLink.displayName = 'CardLink';\n\nexport default CardLink;\n"],"names":["defaultProps","_CardLink","props","ref","propsWithDefaults","ElementTag","children","href","restProps","classProps","useCardStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsx","CardLink","forwardRef"],"mappings":";;;;;;AAQA,MAAMA,IAA6C;AAAA,EACjD,aAAa;AACf,GAEMC,IAAY,CAA8BC,GAA+BC,MAAwC;AACrH,QAAMC,IAAoB,EAAE,GAAGJ,GAAc,GAAGE,EAAA,GAC1C;AAAA,IACJ,aAAaG,IAAaL,EAAa;AAAA,IACvC,UAAAM;AAAA,IACA,MAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDJ,GACE,EAAE,YAAAK,EAAA,IAAeC,EAAA,GACjB,EAAE,YAAAC,GAAY,OAAOC,EAAA,IAAeC,EAAcL,CAAS,GAC3DM,IAAmBC,EAAgBV,GAAY,EAAE,YAAYI,EAAW,MAAM,YAAAE,GAAY,YAAAC,GAAY;AAE5G,SACE,gBAAAI,EAACX,GAAA,EAAY,GAAGO,GAAa,GAAGD,GAAa,GAAGG,GAAkB,MAAAP,GAAY,KAAAJ,GAC3E,UAAAG,EAAA,CACH;AAEJ,GAEMW,IAAWC,EAAwDjB,CAAS;AAKlFgB,EAAS,kBAAkB;AAC3BA,EAAS,cAAc;"}
1
+ {"version":3,"file":"CardLink.js","sources":["../../../src/components/Card/CardLink.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ElementType, forwardRef } from 'react';\nimport { useStyleProps } from '../../hooks';\nimport {\n type CardLinkProps,\n type PolymorphicComponent,\n type PolymorphicRef,\n type SpiritCardLinkProps,\n} from '../../types';\nimport { mergeStyleProps } from '../../utils';\nimport { useCardStyleProps } from './useCardStyleProps';\n\nconst defaultProps = {\n elementType: 'a',\n};\n\nconst _CardLink = <E extends ElementType = 'a'>(props: SpiritCardLinkProps<E>, ref: PolymorphicRef<E>): JSX.Element => {\n const propsWithDefaults = { ...defaultProps, ...props };\n const { elementType, children, href, ...restProps } = propsWithDefaults;\n\n const Component = elementType as ElementType;\n\n const { classProps } = useCardStyleProps();\n const { styleProps, props: otherProps } = useStyleProps(restProps);\n const mergedStyleProps = mergeStyleProps(Component, { classProps: classProps.link, styleProps, otherProps });\n\n return (\n <Component {...otherProps} {...styleProps} {...mergedStyleProps} href={href} ref={ref}>\n {children}\n </Component>\n );\n};\n\nconst CardLink = forwardRef<HTMLAnchorElement, SpiritCardLinkProps<'a'>>(_CardLink) as unknown as PolymorphicComponent<\n 'a',\n CardLinkProps\n>;\n\nCardLink.spiritComponent = 'CardLink';\nCardLink.displayName = 'CardLink';\n\nexport default CardLink;\n"],"names":["defaultProps","_CardLink","props","ref","propsWithDefaults","elementType","children","href","restProps","Component","classProps","useCardStyleProps","styleProps","otherProps","useStyleProps","mergedStyleProps","mergeStyleProps","jsx","CardLink","forwardRef"],"mappings":";;;;;;AAaA,MAAMA,IAAe;AAAA,EACnB,aAAa;AACf,GAEMC,IAAY,CAA8BC,GAA+BC,MAAwC;AACrH,QAAMC,IAAoB,EAAE,GAAGJ,GAAc,GAAGE,EAAA,GAC1C,EAAE,aAAAG,GAAa,UAAAC,GAAU,MAAAC,GAAM,GAAGC,MAAcJ,GAEhDK,IAAYJ,GAEZ,EAAE,YAAAK,EAAA,IAAeC,EAAA,GACjB,EAAE,YAAAC,GAAY,OAAOC,EAAA,IAAeC,EAAcN,CAAS,GAC3DO,IAAmBC,EAAgBP,GAAW,EAAE,YAAYC,EAAW,MAAM,YAAAE,GAAY,YAAAC,GAAY;AAE3G,SACE,gBAAAI,EAACR,GAAA,EAAW,GAAGI,GAAa,GAAGD,GAAa,GAAGG,GAAkB,MAAAR,GAAY,KAAAJ,GAC1E,UAAAG,EAAA,CACH;AAEJ,GAEMY,IAAWC,EAAwDlB,CAAS;AAKlFiB,EAAS,kBAAkB;AAC3BA,EAAS,cAAc;"}
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("../VisuallyHidden/VisuallyHidden.cjs"),l=require("./useCharacterCounterState.cjs"),r=t=>{const{debouncedScreenReaderMessage:s,isVisible:i,screenReaderMessageId:a,styleProps:n,transferProps:u,visibleCounterText:o}=l.useCharacterCounter(t);return i?e.jsxs(e.Fragment,{children:[e.jsx("div",{...u,...n,"aria-hidden":"true",children:o}),e.jsx(c.default,{id:a,"aria-live":"polite","aria-atomic":"true",children:s})]}):null};r.spiritComponent="CharacterCounter";exports.default=r;
2
+ //# sourceMappingURL=CharacterCounter.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterCounter.cjs","sources":["../../../src/components/CharacterCounter/CharacterCounter.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { VisuallyHidden } from '../VisuallyHidden';\nimport { type CharacterCounterProps } from './types';\nimport { useCharacterCounter } from './useCharacterCounterState';\n\nconst CharacterCounter = (props: CharacterCounterProps) => {\n const {\n debouncedScreenReaderMessage,\n isVisible,\n screenReaderMessageId,\n styleProps,\n transferProps,\n visibleCounterText,\n } = useCharacterCounter(props);\n\n return isVisible ? (\n <>\n <div {...transferProps} {...styleProps} aria-hidden=\"true\">\n {visibleCounterText}\n </div>\n <VisuallyHidden id={screenReaderMessageId} aria-live=\"polite\" aria-atomic=\"true\">\n {debouncedScreenReaderMessage}\n </VisuallyHidden>\n </>\n ) : null;\n};\n\nCharacterCounter.spiritComponent = 'CharacterCounter';\n\nexport default CharacterCounter;\n"],"names":["CharacterCounter","props","debouncedScreenReaderMessage","isVisible","screenReaderMessageId","styleProps","transferProps","visibleCounterText","useCharacterCounter","jsxs","Fragment","jsx","VisuallyHidden"],"mappings":"4PAOMA,EAAoBC,GAAiC,CACzD,KAAM,CACJ,6BAAAC,EACA,UAAAC,EACA,sBAAAC,EACA,WAAAC,EACA,cAAAC,EACA,mBAAAC,CAAA,EACEC,EAAAA,oBAAoBP,CAAK,EAE7B,OAAOE,EACLM,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAC,MAAC,OAAK,GAAGL,EAAgB,GAAGD,EAAY,cAAY,OACjD,SAAAE,EACH,EACAI,EAAAA,IAACC,EAAAA,SAAe,GAAIR,EAAuB,YAAU,SAAS,cAAY,OACvE,SAAAF,CAAA,CACH,CAAA,CAAA,CACF,EACE,IACN,EAEAF,EAAiB,gBAAkB"}
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { CharacterCounterProps } from './types';
3
+ declare const CharacterCounter: {
4
+ (props: CharacterCounterProps): React.JSX.Element | null;
5
+ spiritComponent: string;
6
+ };
7
+ export default CharacterCounter;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { jsxs as d, Fragment as c, jsx as e } from "react/jsx-runtime";
3
+ import l from "../VisuallyHidden/VisuallyHidden.js";
4
+ import { useCharacterCounter as u } from "./useCharacterCounterState.js";
5
+ const m = (r) => {
6
+ const {
7
+ debouncedScreenReaderMessage: t,
8
+ isVisible: i,
9
+ screenReaderMessageId: s,
10
+ styleProps: a,
11
+ transferProps: n,
12
+ visibleCounterText: o
13
+ } = u(r);
14
+ return i ? /* @__PURE__ */ d(c, { children: [
15
+ /* @__PURE__ */ e("div", { ...n, ...a, "aria-hidden": "true", children: o }),
16
+ /* @__PURE__ */ e(l, { id: s, "aria-live": "polite", "aria-atomic": "true", children: t })
17
+ ] }) : null;
18
+ };
19
+ m.spiritComponent = "CharacterCounter";
20
+ export {
21
+ m as default
22
+ };
23
+ //# sourceMappingURL=CharacterCounter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CharacterCounter.js","sources":["../../../src/components/CharacterCounter/CharacterCounter.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { VisuallyHidden } from '../VisuallyHidden';\nimport { type CharacterCounterProps } from './types';\nimport { useCharacterCounter } from './useCharacterCounterState';\n\nconst CharacterCounter = (props: CharacterCounterProps) => {\n const {\n debouncedScreenReaderMessage,\n isVisible,\n screenReaderMessageId,\n styleProps,\n transferProps,\n visibleCounterText,\n } = useCharacterCounter(props);\n\n return isVisible ? (\n <>\n <div {...transferProps} {...styleProps} aria-hidden=\"true\">\n {visibleCounterText}\n </div>\n <VisuallyHidden id={screenReaderMessageId} aria-live=\"polite\" aria-atomic=\"true\">\n {debouncedScreenReaderMessage}\n </VisuallyHidden>\n </>\n ) : null;\n};\n\nCharacterCounter.spiritComponent = 'CharacterCounter';\n\nexport default CharacterCounter;\n"],"names":["CharacterCounter","props","debouncedScreenReaderMessage","isVisible","screenReaderMessageId","styleProps","transferProps","visibleCounterText","useCharacterCounter","jsxs","Fragment","jsx","VisuallyHidden"],"mappings":";;;;AAOA,MAAMA,IAAmB,CAACC,MAAiC;AACzD,QAAM;AAAA,IACJ,8BAAAC;AAAA,IACA,WAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,IACEC,EAAoBP,CAAK;AAE7B,SAAOE,IACL,gBAAAM,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAK,GAAGL,GAAgB,GAAGD,GAAY,eAAY,QACjD,UAAAE,GACH;AAAA,IACA,gBAAAI,EAACC,KAAe,IAAIR,GAAuB,aAAU,UAAS,eAAY,QACvE,UAAAF,EAAA,CACH;AAAA,EAAA,EAAA,CACF,IACE;AACN;AAEAF,EAAiB,kBAAkB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=500;exports.CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS=E;
2
+ //# sourceMappingURL=constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.cjs","sources":["../../../src/components/CharacterCounter/constants.ts"],"sourcesContent":["/** Debounce delay (ms) for screen reader message updates in the character counter */\nexport const CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS = 500;\n"],"names":["CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS"],"mappings":"gFACO,MAAMA,EAA8C"}
@@ -0,0 +1 @@
1
+ export declare const CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS = 500;
@@ -0,0 +1,5 @@
1
+ const E = 500;
2
+ export {
3
+ E as CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS
4
+ };
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../src/components/CharacterCounter/constants.ts"],"sourcesContent":["/** Debounce delay (ms) for screen reader message updates in the character counter */\nexport const CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS = 500;\n"],"names":["CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS"],"mappings":"AACO,MAAMA,IAA8C;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CharacterCounter.cjs"),t=require("./useCharacterCounterState.cjs");exports.CharacterCounter=e.default;exports.useCharacterCounterState=t.useCharacterCounterState;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,3 @@
1
+ export { default as CharacterCounter } from './CharacterCounter';
2
+ export type { CharacterCounterProps } from './types';
3
+ export { useCharacterCounterState, type CharacterCounterState, type UseCharacterCounterStateProps, } from './useCharacterCounterState';
@@ -0,0 +1,7 @@
1
+ import { default as e } from "./CharacterCounter.js";
2
+ import { useCharacterCounterState as o } from "./useCharacterCounterState.js";
3
+ export {
4
+ e as CharacterCounter,
5
+ o as useCharacterCounterState
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,6 @@
1
+ import { RegisterType } from '../../hooks/useAriaIdRefs';
2
+ import { TextAreaCounterRenderProps } from '../../types/textArea';
3
+ export interface CharacterCounterProps extends TextAreaCounterRenderProps {
4
+ id: string;
5
+ registerAria: RegisterType;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),P=require("../../hooks/styleProps.cjs"),R=require("../../hooks/useControlledModeGuard.cjs"),v=require("../../hooks/useDebouncedValue.cjs"),S=require("../../translations/defaults.cjs"),d=require("../../translations/replaceTranslationParams.cjs"),E=require("./constants.cjs"),u=S.defaultLabels.textArea.counter,f=(t,e)=>e!==void 0?`${t}/${e}`:String(t),b=(t,e)=>{if(e===void 0)return d.replaceTranslationParams(u.charactersEntered,{count:t});if(t===0)return d.replaceTranslationParams(u.canEnterUpTo,{maxLength:e});if(t>e){const a=t-e,n=a===1?u.characterOverLimit:u.charactersOverLimit;return d.replaceTranslationParams(n,{count:a})}const r=e-t,o=r===1?u.characterRemaining:u.charactersRemaining;return d.replaceTranslationParams(o,{count:r})},M=t=>{const{value:e,defaultValue:r,counterThreshold:o,hasCounter:a,onChange:n}=t,c=e!==void 0;R.useControlledModeGuard({componentName:"useCharacterCounterState",value:e,defaultValue:r});const[C,g]=m.useState(()=>c?e.length:r?.length??0),i=c?e.length:C,s=a===!0||o!==void 0,p=m.useCallback(l=>{!c&&s&&g(l.target.value.length),n?.(l)},[c,s,n]);return{counterProps:s?{counterThreshold:o,currentLength:i,hasCounter:a}:void 0,handleChange:p}},T=t=>{const{counterThreshold:e,currentLength:r,hasCounter:o,id:a,registerAria:n,...c}=t,{styleProps:C,props:g}=P.useStyleProps(c),i=o===!0||e!==void 0,s=`${a}__counterScreenReaderMessage`,p=f(r,e),h=b(r,e),l=v.useDebouncedValue(h,E.CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS);return m.useEffect(()=>{if(i)return n({add:s}),()=>{n({remove:s})}},[i,s,n]),{debouncedScreenReaderMessage:l,isVisible:i,screenReaderMessageId:s,styleProps:C,transferProps:g,visibleCounterText:p}};exports.useCharacterCounter=T;exports.useCharacterCounterState=M;
2
+ //# sourceMappingURL=useCharacterCounterState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCharacterCounterState.cjs","sources":["../../../src/components/CharacterCounter/useCharacterCounterState.ts"],"sourcesContent":["'use client';\n\nimport { type ChangeEvent, useCallback, useEffect, useState } from 'react';\nimport { type StylePropsResult, useControlledModeGuard, useDebouncedValue, useStyleProps } from '../../hooks';\nimport { defaultLabels, replaceTranslationParams } from '../../translations';\nimport { type TextAreaCounterRenderProps } from '../../types';\nimport { CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS } from './constants';\nimport { type CharacterCounterProps } from './types';\n\n/** Return value of the useCharacterCounterState hook */\nexport interface CharacterCounterState {\n /** Props to pass to CharacterCounter, or undefined when counter is hidden */\n counterProps: TextAreaCounterRenderProps | undefined;\n /** Change handler that updates internal length and calls the provided onChange */\n handleChange: (event: ChangeEvent<HTMLTextAreaElement>) => void;\n}\n\n/** Props for the useCharacterCounterState hook */\nexport interface UseCharacterCounterStateProps {\n /** Character threshold shown after the slash in the counter (e.g. `5/200`); implicitly enables the counter */\n counterThreshold?: number;\n /** Initial value when uncontrolled */\n defaultValue?: string;\n /** Whether to show the character counter; automatically true when `counterThreshold` is set */\n hasCounter?: boolean;\n /** Called when the textarea value changes */\n onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;\n /** Controlled value (takes precedence over defaultValue) */\n value?: string;\n}\n\n/** Return value of the `useCharacterCounter` hook (visible + screen reader presentation for `CharacterCounter`). */\nexport interface UseCharacterCounterResult {\n debouncedScreenReaderMessage: string;\n isVisible: boolean;\n screenReaderMessageId: string;\n styleProps: StylePropsResult['styleProps'];\n transferProps: StylePropsResult['props'];\n visibleCounterText: string;\n}\n\nconst COUNTER_LABELS = defaultLabels.textArea.counter;\n\n/**\n * Builds the visible counter label (`current/max` or count only).\n *\n * @param currentLength - Current number of characters.\n * @param counterThreshold - When set, label includes a slash and this max; when omitted, only the count is shown.\n * @returns {string} Formatted string for the aria-hidden counter element.\n */\nconst getCharacterCounterVisibleText = (currentLength: number, counterThreshold: number | undefined): string =>\n counterThreshold !== undefined ? `${currentLength}/${counterThreshold}` : String(currentLength);\n\n/**\n * Builds the polite live-region message for assistive technologies (remaining, over limit, count-only, etc.).\n *\n * @param currentLength - Current number of characters.\n * @param counterThreshold - When set, messages relate to this max; when omitted, only “characters entered” copy is used.\n * @returns {string} Localized screen reader string (not debounced).\n */\nconst getCharacterCounterScreenReaderMessage = (\n currentLength: number,\n counterThreshold: number | undefined,\n): string => {\n if (counterThreshold === undefined) {\n return replaceTranslationParams(COUNTER_LABELS.charactersEntered, { count: currentLength });\n }\n\n if (currentLength === 0) {\n return replaceTranslationParams(COUNTER_LABELS.canEnterUpTo, { maxLength: counterThreshold });\n }\n\n if (currentLength > counterThreshold) {\n const overCount = currentLength - counterThreshold;\n const template = overCount === 1 ? COUNTER_LABELS.characterOverLimit : COUNTER_LABELS.charactersOverLimit;\n\n return replaceTranslationParams(template, { count: overCount });\n }\n\n const remaining = counterThreshold - currentLength;\n const template = remaining === 1 ? COUNTER_LABELS.characterRemaining : COUNTER_LABELS.charactersRemaining;\n\n return replaceTranslationParams(template, { count: remaining });\n};\n\n/**\n * Tracks textarea length for `TextArea` and exposes `counterProps` plus a change handler when the counter is active.\n *\n * @param props - Controlled/uncontrolled value and counter flags; see {@link UseCharacterCounterStateProps}.\n * @returns {CharacterCounterState} Counter props for `CharacterCounter` (if visible) and textarea `onChange` handler.\n */\nexport const useCharacterCounterState = (props: UseCharacterCounterStateProps): CharacterCounterState => {\n const { value, defaultValue, counterThreshold, hasCounter, onChange } = props;\n const isControlled = value !== undefined;\n\n useControlledModeGuard({\n componentName: 'useCharacterCounterState',\n value,\n defaultValue,\n });\n\n const [internalLength, setInternalLength] = useState(() =>\n isControlled ? value.length : (defaultValue?.length ?? 0),\n );\n\n const currentLength = isControlled ? value.length : internalLength;\n const isCounterVisible = hasCounter === true || counterThreshold !== undefined;\n\n const handleChange = useCallback(\n (event: ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled && isCounterVisible) {\n setInternalLength(event.target.value.length);\n }\n onChange?.(event);\n },\n [isControlled, isCounterVisible, onChange],\n );\n\n const counterProps: TextAreaCounterRenderProps | undefined = isCounterVisible\n ? {\n counterThreshold,\n currentLength,\n hasCounter,\n }\n : undefined;\n\n return {\n counterProps,\n handleChange,\n };\n};\n\n/**\n * Presentation hook for `CharacterCounter`: style props, visible text, debounced screen reader text, and ARIA id registration.\n *\n * @param props - Full `CharacterCounterProps` including `id` and `registerAria`.\n * @returns {UseCharacterCounterResult} Values to render the visible counter and `VisuallyHidden` live region.\n */\nexport const useCharacterCounter = (props: CharacterCounterProps): UseCharacterCounterResult => {\n const { counterThreshold, currentLength, hasCounter, id, registerAria, ...restProps } = props;\n const { styleProps, props: transferProps } = useStyleProps(restProps);\n const isVisible = hasCounter === true || counterThreshold !== undefined;\n const screenReaderMessageId = `${id}__counterScreenReaderMessage`;\n const visibleCounterText = getCharacterCounterVisibleText(currentLength, counterThreshold);\n const screenReaderMessage = getCharacterCounterScreenReaderMessage(currentLength, counterThreshold);\n const debouncedScreenReaderMessage = useDebouncedValue(\n screenReaderMessage,\n CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS,\n );\n\n useEffect(() => {\n if (isVisible) {\n registerAria({ add: screenReaderMessageId });\n\n return () => {\n registerAria({ remove: screenReaderMessageId });\n };\n }\n\n return undefined;\n }, [isVisible, screenReaderMessageId, registerAria]);\n\n return {\n debouncedScreenReaderMessage,\n isVisible,\n screenReaderMessageId,\n styleProps,\n transferProps,\n visibleCounterText,\n };\n};\n"],"names":["COUNTER_LABELS","defaultLabels","getCharacterCounterVisibleText","currentLength","counterThreshold","getCharacterCounterScreenReaderMessage","replaceTranslationParams","overCount","template","remaining","useCharacterCounterState","props","value","defaultValue","hasCounter","onChange","isControlled","useControlledModeGuard","internalLength","setInternalLength","useState","isCounterVisible","handleChange","useCallback","event","useCharacterCounter","id","registerAria","restProps","styleProps","transferProps","useStyleProps","isVisible","screenReaderMessageId","visibleCounterText","screenReaderMessage","debouncedScreenReaderMessage","useDebouncedValue","CHARACTER_COUNTER_SCREEN_READER_DEBOUNCE_MS","useEffect"],"mappings":"wYAyCMA,EAAiBC,EAAAA,cAAc,SAAS,QASxCC,EAAiC,CAACC,EAAuBC,IAC7DA,IAAqB,OAAY,GAAGD,CAAa,IAAIC,CAAgB,GAAK,OAAOD,CAAa,EAS1FE,EAAyC,CAC7CF,EACAC,IACW,CACX,GAAIA,IAAqB,OACvB,OAAOE,EAAAA,yBAAyBN,EAAe,kBAAmB,CAAE,MAAOG,EAAe,EAG5F,GAAIA,IAAkB,EACpB,OAAOG,EAAAA,yBAAyBN,EAAe,aAAc,CAAE,UAAWI,EAAkB,EAG9F,GAAID,EAAgBC,EAAkB,CACpC,MAAMG,EAAYJ,EAAgBC,EAC5BI,EAAWD,IAAc,EAAIP,EAAe,mBAAqBA,EAAe,oBAEtF,OAAOM,EAAAA,yBAAyBE,EAAU,CAAE,MAAOD,EAAW,CAChE,CAEA,MAAME,EAAYL,EAAmBD,EAC/BK,EAAWC,IAAc,EAAIT,EAAe,mBAAqBA,EAAe,oBAEtF,OAAOM,EAAAA,yBAAyBE,EAAU,CAAE,MAAOC,EAAW,CAChE,EAQaC,EAA4BC,GAAgE,CACvG,KAAM,CAAE,MAAAC,EAAO,aAAAC,EAAc,iBAAAT,EAAkB,WAAAU,EAAY,SAAAC,GAAaJ,EAClEK,EAAeJ,IAAU,OAE/BK,yBAAuB,CACrB,cAAe,2BACf,MAAAL,EACA,aAAAC,CAAA,CACD,EAED,KAAM,CAACK,EAAgBC,CAAiB,EAAIC,EAAAA,SAAS,IACnDJ,EAAeJ,EAAM,OAAUC,GAAc,QAAU,CAAA,EAGnDV,EAAgBa,EAAeJ,EAAM,OAASM,EAC9CG,EAAmBP,IAAe,IAAQV,IAAqB,OAE/DkB,EAAeC,EAAAA,YAClBC,GAA4C,CACvC,CAACR,GAAgBK,GACnBF,EAAkBK,EAAM,OAAO,MAAM,MAAM,EAE7CT,IAAWS,CAAK,CAClB,EACA,CAACR,EAAcK,EAAkBN,CAAQ,CAAA,EAW3C,MAAO,CACL,aAT2DM,EACzD,CACE,iBAAAjB,EACA,cAAAD,EACA,WAAAW,CAAA,EAEF,OAIF,aAAAQ,CAAA,CAEJ,EAQaG,EAAuBd,GAA4D,CAC9F,KAAM,CAAE,iBAAAP,EAAkB,cAAAD,EAAe,WAAAW,EAAY,GAAAY,EAAI,aAAAC,EAAc,GAAGC,GAAcjB,EAClF,CAAA,WAAEkB,EAAY,MAAOC,CAAA,EAAkBC,EAAAA,cAAcH,CAAS,EAC9DI,EAAYlB,IAAe,IAAQV,IAAqB,OACxD6B,EAAwB,GAAGP,CAAE,+BAC7BQ,EAAqBhC,EAA+BC,EAAeC,CAAgB,EACnF+B,EAAsB9B,EAAuCF,EAAeC,CAAgB,EAC5FgC,EAA+BC,EAAAA,kBACnCF,EACAG,EAAAA,2CAAA,EAGFC,OAAAA,EAAAA,UAAU,IAAM,CACd,GAAIP,EACF,OAAAL,EAAa,CAAE,IAAKM,EAAuB,EAEpC,IAAM,CACXN,EAAa,CAAE,OAAQM,EAAuB,CAChD,CAIJ,EAAG,CAACD,EAAWC,EAAuBN,CAAY,CAAC,EAE5C,CACL,6BAAAS,EACA,UAAAJ,EACA,sBAAAC,EAAA,WACAJ,EACA,cAAAC,EACA,mBAAAI,CAAA,CAEJ"}
@@ -0,0 +1,25 @@
1
+ import { ChangeEvent } from 'react';
2
+ import { StylePropsResult } from '../../hooks';
3
+ import { TextAreaCounterRenderProps } from '../../types';
4
+ import { CharacterCounterProps } from './types';
5
+ export interface CharacterCounterState {
6
+ counterProps: TextAreaCounterRenderProps | undefined;
7
+ handleChange: (event: ChangeEvent<HTMLTextAreaElement>) => void;
8
+ }
9
+ export interface UseCharacterCounterStateProps {
10
+ counterThreshold?: number;
11
+ defaultValue?: string;
12
+ hasCounter?: boolean;
13
+ onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
14
+ value?: string;
15
+ }
16
+ export interface UseCharacterCounterResult {
17
+ debouncedScreenReaderMessage: string;
18
+ isVisible: boolean;
19
+ screenReaderMessageId: string;
20
+ styleProps: StylePropsResult['styleProps'];
21
+ transferProps: StylePropsResult['props'];
22
+ visibleCounterText: string;
23
+ }
24
+ export declare const useCharacterCounterState: (props: UseCharacterCounterStateProps) => CharacterCounterState;
25
+ export declare const useCharacterCounter: (props: CharacterCounterProps) => UseCharacterCounterResult;