@alma-oss/spirit-web-react 4.2.1 → 4.3.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 (506) hide show
  1. package/README.md +10 -11
  2. package/bundles/web-react.umd.js +33496 -33281
  3. package/bundles/web-react.umd.js.map +1 -1
  4. package/bundles/web-react.umd.min.js +3 -3
  5. package/bundles/web-react.umd.min.js.map +1 -1
  6. package/common/common.cjs.map +1 -1
  7. package/common/utilities/utilities.cjs.map +1 -1
  8. package/components/Accordion/Accordion.cjs +31 -23
  9. package/components/Accordion/Accordion.cjs.map +1 -1
  10. package/components/Accordion/Accordion.d.ts +2 -8
  11. package/components/Accordion/Accordion.js +8 -7
  12. package/components/Accordion/Accordion.js.map +1 -1
  13. package/components/Accordion/AccordionContext.d.ts +5 -5
  14. package/components/Accordion/AccordionContext.js.map +1 -1
  15. package/components/Accordion/AccordionHeader.d.ts +2 -8
  16. package/components/Accordion/AccordionHeader.js +8 -7
  17. package/components/Accordion/AccordionHeader.js.map +1 -1
  18. package/components/Accordion/AccordionItem.d.ts +2 -8
  19. package/components/Accordion/AccordionItem.js +8 -7
  20. package/components/Accordion/AccordionItem.js.map +1 -1
  21. package/components/Accordion/UncontrolledAccordion.d.ts +2 -3
  22. package/components/Accordion/UncontrolledAccordion.js +1 -2
  23. package/components/Accordion/UncontrolledAccordion.js.map +1 -1
  24. package/components/Accordion/useAccordion.d.ts +2 -2
  25. package/components/Accordion/useAccordion.js.map +1 -1
  26. package/components/Accordion/useAccordionStyleProps.d.ts +2 -3
  27. package/components/Accordion/useAccordionStyleProps.js.map +1 -1
  28. package/components/ActionGroup/ActionGroup.cjs +15 -9
  29. package/components/ActionGroup/ActionGroup.cjs.map +1 -1
  30. package/components/Alert/Alert.cjs +17 -7
  31. package/components/Alert/Alert.cjs.map +1 -1
  32. package/components/Alert/Alert.d.ts +2 -6
  33. package/components/Alert/Alert.js +9 -5
  34. package/components/Alert/Alert.js.map +1 -1
  35. package/components/Alert/useAlertIcon.d.ts +1 -1
  36. package/components/Alert/useAlertStyleProps.d.ts +4 -5
  37. package/components/Alert/useAlertStyleProps.js.map +1 -1
  38. package/components/Avatar/Avatar.cjs +41 -16
  39. package/components/Avatar/Avatar.cjs.map +1 -1
  40. package/components/Avatar/Avatar.d.ts +2 -5
  41. package/components/Avatar/Avatar.js +6 -6
  42. package/components/Avatar/Avatar.js.map +1 -1
  43. package/components/Avatar/useAvatarStyleProps.d.ts +4 -4
  44. package/components/Avatar/useAvatarStyleProps.js +5 -5
  45. package/components/Avatar/useAvatarStyleProps.js.map +1 -1
  46. package/components/Box/Box.cjs +15 -9
  47. package/components/Box/Box.cjs.map +1 -1
  48. package/components/Box/Box.d.ts +3 -8
  49. package/components/Box/Box.js +8 -7
  50. package/components/Box/Box.js.map +1 -1
  51. package/components/Box/useBoxStyleProps.d.ts +2 -2
  52. package/components/Breadcrumbs/Breadcrumbs.cjs +14 -6
  53. package/components/Breadcrumbs/Breadcrumbs.cjs.map +1 -1
  54. package/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  55. package/components/Button/Button.cjs +19 -9
  56. package/components/Button/Button.cjs.map +1 -1
  57. package/components/Button/Button.d.ts +2 -2
  58. package/components/Button/Button.js +5 -3
  59. package/components/Button/Button.js.map +1 -1
  60. package/components/Button/useButtonStyleProps.d.ts +19 -6
  61. package/components/Button/useButtonStyleProps.js.map +1 -1
  62. package/components/ButtonLink/ButtonLink.d.ts +2 -2
  63. package/components/ButtonLink/ButtonLink.js +5 -3
  64. package/components/ButtonLink/ButtonLink.js.map +1 -1
  65. package/components/ButtonLink/useButtonLinkProps.d.ts +10 -4
  66. package/components/ButtonLink/useButtonLinkProps.js.map +1 -1
  67. package/components/ButtonLink/useButtonLinkStyleProps.d.ts +19 -6
  68. package/components/ButtonLink/useButtonLinkStyleProps.js.map +1 -1
  69. package/components/Card/Card.cjs +13 -6
  70. package/components/Card/Card.cjs.map +1 -1
  71. package/components/Card/Card.d.ts +1 -1
  72. package/components/Card/Card.js +2 -2
  73. package/components/Card/Card.js.map +1 -1
  74. package/components/Card/CardLink.d.ts +2 -4
  75. package/components/Card/CardLink.js +1 -0
  76. package/components/Card/CardLink.js.map +1 -1
  77. package/components/Card/CardTitle.d.ts +1 -1
  78. package/components/Card/useCardStyleProps.d.ts +2 -1
  79. package/components/Card/useCardStyleProps.js +2 -1
  80. package/components/Card/useCardStyleProps.js.map +1 -1
  81. package/components/Checkbox/Checkbox.cjs +11 -4
  82. package/components/Checkbox/Checkbox.cjs.map +1 -1
  83. package/components/Checkbox/Checkbox.d.ts +2 -3
  84. package/components/Checkbox/Checkbox.js +1 -0
  85. package/components/Checkbox/Checkbox.js.map +1 -1
  86. package/components/Collapse/Collapse.cjs +8 -3
  87. package/components/Collapse/Collapse.cjs.map +1 -1
  88. package/components/Container/Container.cjs +4 -2
  89. package/components/Container/Container.cjs.map +1 -1
  90. package/components/ControlButton/ControlButton.d.ts +2 -2
  91. package/components/ControlButton/ControlButton.js +5 -3
  92. package/components/ControlButton/ControlButton.js.map +1 -1
  93. package/components/ControlButton/useControlButtonStyleProps.d.ts +19 -6
  94. package/components/ControlButton/useControlButtonStyleProps.js.map +1 -1
  95. package/components/Dialog/Dialog.cjs +42 -11
  96. package/components/Dialog/Dialog.cjs.map +1 -1
  97. package/components/Dialog/Dialog.d.ts +3 -4
  98. package/components/Dialog/Dialog.js +4 -2
  99. package/components/Dialog/Dialog.js.map +1 -1
  100. package/components/Dialog/constants.d.ts +1 -0
  101. package/components/Dialog/constants.js +2 -0
  102. package/components/Dialog/constants.js.map +1 -0
  103. package/components/Dialog/useDialog.js +38 -9
  104. package/components/Dialog/useDialog.js.map +1 -1
  105. package/components/Divider/Divider.cjs +4 -2
  106. package/components/Divider/Divider.cjs.map +1 -1
  107. package/components/Drawer/Drawer.cjs +126 -26
  108. package/components/Drawer/Drawer.cjs.map +1 -1
  109. package/components/Drawer/DrawerCloseButton.js +4 -4
  110. package/components/Drawer/DrawerCloseButton.js.map +1 -1
  111. package/components/Drawer/DrawerPanel.d.ts +3 -3
  112. package/components/Drawer/DrawerPanel.js +5 -3
  113. package/components/Drawer/DrawerPanel.js.map +1 -1
  114. package/components/Drawer/constants.d.ts +0 -1
  115. package/components/Drawer/constants.js +0 -1
  116. package/components/Drawer/constants.js.map +1 -1
  117. package/components/Dropdown/Dropdown.cjs +8 -3
  118. package/components/Dropdown/Dropdown.cjs.map +1 -1
  119. package/components/Dropdown/DropdownTrigger.d.ts +1 -1
  120. package/components/EmptyState/EmptyState.cjs +43 -17
  121. package/components/EmptyState/EmptyState.cjs.map +1 -1
  122. package/components/Field/Field.cjs +10 -4
  123. package/components/Field/Field.cjs.map +1 -1
  124. package/components/Field/HelperText.d.ts +1 -1
  125. package/components/Field/Label.d.ts +1 -1
  126. package/components/Field/ValidationText.d.ts +1 -1
  127. package/components/Field/ValidationText.js +1 -1
  128. package/components/Field/ValidationText.js.map +1 -1
  129. package/components/Field/types.d.ts +3 -3
  130. package/components/FieldGroup/FieldGroup.cjs +10 -4
  131. package/components/FieldGroup/FieldGroup.cjs.map +1 -1
  132. package/components/FileUploader/FileUploader.cjs +77 -15
  133. package/components/FileUploader/FileUploader.cjs.map +1 -1
  134. package/components/FileUploader/FileUploaderAttachment.js +8 -5
  135. package/components/FileUploader/FileUploaderAttachment.js.map +1 -1
  136. package/components/FileUploader/FileUploaderList.js +5 -4
  137. package/components/FileUploader/FileUploaderList.js.map +1 -1
  138. package/components/FileUploader/constants.d.ts +0 -3
  139. package/components/FileUploader/constants.js +0 -3
  140. package/components/FileUploader/constants.js.map +1 -1
  141. package/components/Flex/Flex.cjs +15 -9
  142. package/components/Flex/Flex.cjs.map +1 -1
  143. package/components/Flex/Flex.d.ts +2 -8
  144. package/components/Flex/Flex.js +8 -7
  145. package/components/Flex/Flex.js.map +1 -1
  146. package/components/Flex/useFlexStyleProps.d.ts +3 -3
  147. package/components/Flex/useFlexStyleProps.js.map +1 -1
  148. package/components/Footer/Footer.cjs +17 -9
  149. package/components/Footer/Footer.cjs.map +1 -1
  150. package/components/Footer/Footer.d.ts +2 -6
  151. package/components/Footer/Footer.js +10 -7
  152. package/components/Footer/Footer.js.map +1 -1
  153. package/components/Grid/Grid.cjs +34 -23
  154. package/components/Grid/Grid.cjs.map +1 -1
  155. package/components/Grid/Grid.d.ts +2 -8
  156. package/components/Grid/Grid.js +8 -7
  157. package/components/Grid/Grid.js.map +1 -1
  158. package/components/Grid/GridItem.d.ts +2 -8
  159. package/components/Grid/GridItem.js +11 -7
  160. package/components/Grid/GridItem.js.map +1 -1
  161. package/components/Grid/useGridItemStyleProps.js +7 -6
  162. package/components/Grid/useGridItemStyleProps.js.map +1 -1
  163. package/components/Header/Header.cjs +71 -26
  164. package/components/Header/Header.cjs.map +1 -1
  165. package/components/Header/HeaderDialogContext.d.ts +2 -2
  166. package/components/Header/HeaderDialogContext.js.map +1 -1
  167. package/components/Header/HeaderDialogLink.d.ts +2 -3
  168. package/components/Header/HeaderDialogLink.js +5 -3
  169. package/components/Header/HeaderDialogLink.js.map +1 -1
  170. package/components/Header/HeaderLink.d.ts +2 -3
  171. package/components/Header/HeaderLink.js +5 -3
  172. package/components/Header/HeaderLink.js.map +1 -1
  173. package/components/Heading/Heading.cjs +8 -3
  174. package/components/Heading/Heading.cjs.map +1 -1
  175. package/components/Heading/Heading.d.ts +1 -1
  176. package/components/Heading/Heading.js.map +1 -1
  177. package/components/Heading/useHeadingStyleProps.d.ts +3 -3
  178. package/components/Heading/useHeadingStyleProps.js.map +1 -1
  179. package/components/Hidden/Hidden.d.ts +2 -8
  180. package/components/Hidden/Hidden.js +8 -7
  181. package/components/Hidden/Hidden.js.map +1 -1
  182. package/components/Icon/Icon.cjs +5 -2
  183. package/components/Icon/Icon.cjs.map +1 -1
  184. package/components/Icon/Icon.d.ts +2 -3
  185. package/components/Icon/Icon.js +1 -0
  186. package/components/Icon/Icon.js.map +1 -1
  187. package/components/Icon/useIconStyleProps.d.ts +6 -1322
  188. package/components/Icon/useIconStyleProps.js.map +1 -1
  189. package/components/IconBox/IconBox.cjs +21 -11
  190. package/components/IconBox/IconBox.cjs.map +1 -1
  191. package/components/IconBox/IconBox.d.ts +2 -6
  192. package/components/IconBox/IconBox.js +6 -3
  193. package/components/IconBox/IconBox.js.map +1 -1
  194. package/components/IconBox/useIconBoxStyleProps.d.ts +2 -2
  195. package/components/Item/Item.cjs +9 -3
  196. package/components/Item/Item.cjs.map +1 -1
  197. package/components/Item/Item.d.ts +1 -1
  198. package/components/Link/Link.cjs +13 -6
  199. package/components/Link/Link.cjs.map +1 -1
  200. package/components/Link/Link.d.ts +2 -3
  201. package/components/Link/Link.js +5 -3
  202. package/components/Link/Link.js.map +1 -1
  203. package/components/Link/useLinkStyleProps.d.ts +5 -7
  204. package/components/Link/useLinkStyleProps.js.map +1 -1
  205. package/components/Matrix/Matrix.cjs +8 -3
  206. package/components/Matrix/Matrix.cjs.map +1 -1
  207. package/components/Matrix/Matrix.d.ts +1 -1
  208. package/components/Matrix/Matrix.js +1 -1
  209. package/components/Matrix/Matrix.js.map +1 -1
  210. package/components/Matrix/{constant.js → constants.js} +1 -1
  211. package/components/Matrix/constants.js.map +1 -0
  212. package/components/Matrix/useMatrixStyleProps.js +1 -1
  213. package/components/Matrix/useMatrixStyleProps.js.map +1 -1
  214. package/components/Modal/Modal.cjs +134 -32
  215. package/components/Modal/Modal.cjs.map +1 -1
  216. package/components/Modal/ModalCloseButton.js +5 -3
  217. package/components/Modal/ModalCloseButton.js.map +1 -1
  218. package/components/Modal/ModalDialog.d.ts +4 -3
  219. package/components/Modal/ModalDialog.js +8 -5
  220. package/components/Modal/ModalDialog.js.map +1 -1
  221. package/components/Modal/ModalHeader.js +5 -4
  222. package/components/Modal/ModalHeader.js.map +1 -1
  223. package/components/Modal/useModalDialogStyleProps.d.ts +11 -833
  224. package/components/Modal/useModalDialogStyleProps.js.map +1 -1
  225. package/components/Navigation/Navigation.cjs +47 -19
  226. package/components/Navigation/Navigation.cjs.map +1 -1
  227. package/components/Navigation/NavigationAction.d.ts +3 -3
  228. package/components/Navigation/NavigationAction.js +1 -0
  229. package/components/Navigation/NavigationAction.js.map +1 -1
  230. package/components/Navigation/NavigationAvatar.d.ts +3 -3
  231. package/components/Navigation/NavigationAvatar.js +5 -3
  232. package/components/Navigation/NavigationAvatar.js.map +1 -1
  233. package/components/NoSsr/NoSsr.cjs.map +1 -1
  234. package/components/Pagination/Pagination.cjs +106 -32
  235. package/components/Pagination/Pagination.cjs.map +1 -1
  236. package/components/Pagination/PaginationButtonLink.d.ts +2 -3
  237. package/components/Pagination/PaginationButtonLink.js +6 -5
  238. package/components/Pagination/PaginationButtonLink.js.map +1 -1
  239. package/components/Pagination/PaginationLink.d.ts +3 -3
  240. package/components/Pagination/PaginationLink.js +8 -6
  241. package/components/Pagination/PaginationLink.js.map +1 -1
  242. package/components/Pagination/PaginationLinkNext.d.ts +2 -3
  243. package/components/Pagination/PaginationLinkNext.js +6 -3
  244. package/components/Pagination/PaginationLinkNext.js.map +1 -1
  245. package/components/Pagination/PaginationLinkPrevious.d.ts +2 -3
  246. package/components/Pagination/PaginationLinkPrevious.js +6 -3
  247. package/components/Pagination/PaginationLinkPrevious.js.map +1 -1
  248. package/components/Pagination/UncontrolledPagination.js +9 -5
  249. package/components/Pagination/UncontrolledPagination.js.map +1 -1
  250. package/components/Pagination/index.d.ts +0 -1
  251. package/components/Pagination/index.js +0 -1
  252. package/components/Pagination/index.js.map +1 -1
  253. package/components/PartnerLogo/PartnerLogo.cjs +4 -2
  254. package/components/PartnerLogo/PartnerLogo.cjs.map +1 -1
  255. package/components/Pill/Pill.cjs +8 -3
  256. package/components/Pill/Pill.cjs.map +1 -1
  257. package/components/Pill/Pill.d.ts +1 -1
  258. package/components/Pill/usePillStyleProps.d.ts +1 -1
  259. package/components/PricingPlan/PricingPlan.cjs +146 -39
  260. package/components/PricingPlan/PricingPlan.cjs.map +1 -1
  261. package/components/PricingPlan/PricingPlan.d.ts +1 -1
  262. package/components/PricingPlan/PricingPlanBody.d.ts +1 -1
  263. package/components/PricingPlan/PricingPlanFooter.d.ts +1 -1
  264. package/components/PricingPlan/PricingPlanHeader.d.ts +1 -1
  265. package/components/ProductLogo/ProductLogo.cjs +4 -2
  266. package/components/ProductLogo/ProductLogo.cjs.map +1 -1
  267. package/components/Radio/Radio.cjs +10 -3
  268. package/components/Radio/Radio.cjs.map +1 -1
  269. package/components/Radio/Radio.d.ts +2 -3
  270. package/components/Radio/Radio.js +1 -0
  271. package/components/Radio/Radio.js.map +1 -1
  272. package/components/ScrollView/ScrollView.cjs +14 -6
  273. package/components/ScrollView/ScrollView.cjs.map +1 -1
  274. package/components/Section/Section.cjs +16 -9
  275. package/components/Section/Section.cjs.map +1 -1
  276. package/components/Section/Section.d.ts +2 -6
  277. package/components/Section/Section.js +8 -6
  278. package/components/Section/Section.js.map +1 -1
  279. package/components/Section/useSectionSizeProps.d.ts +4 -6
  280. package/components/Section/useSectionSizeProps.js +1 -1
  281. package/components/Section/useSectionSizeProps.js.map +1 -1
  282. package/components/Section/useSectionStyleProps.d.ts +3 -5
  283. package/components/Section/useSectionStyleProps.js.map +1 -1
  284. package/components/SegmentedControl/SegmentedControl.cjs +13 -6
  285. package/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  286. package/components/SegmentedControl/SegmentedControlItem.d.ts +2 -3
  287. package/components/SegmentedControl/SegmentedControlItem.js +5 -3
  288. package/components/SegmentedControl/SegmentedControlItem.js.map +1 -1
  289. package/components/Select/Select.cjs +11 -4
  290. package/components/Select/Select.cjs.map +1 -1
  291. package/components/Select/Select.d.ts +2 -3
  292. package/components/Select/Select.js +1 -0
  293. package/components/Select/Select.js.map +1 -1
  294. package/components/Skeleton/Skeleton.cjs +8 -3
  295. package/components/Skeleton/Skeleton.cjs.map +1 -1
  296. package/components/Skeleton/SkeletonHeading.d.ts +1 -1
  297. package/components/Skeleton/SkeletonShape.d.ts +1 -1
  298. package/components/Skeleton/SkeletonText.d.ts +1 -1
  299. package/components/Skeleton/useSkeletonShapeStyleProps.d.ts +10 -848
  300. package/components/Skeleton/useSkeletonShapeStyleProps.js.map +1 -1
  301. package/components/Skeleton/useSkeletonStyleProps.d.ts +1 -1
  302. package/components/SkipLink/SkipLink.cjs +5 -2
  303. package/components/SkipLink/SkipLink.cjs.map +1 -1
  304. package/components/SkipLink/SkipLink.d.ts +3 -3
  305. package/components/SkipLink/SkipLink.js +1 -0
  306. package/components/SkipLink/SkipLink.js.map +1 -1
  307. package/components/Slider/Slider.cjs +11 -4
  308. package/components/Slider/Slider.cjs.map +1 -1
  309. package/components/Slider/Slider.d.ts +2 -3
  310. package/components/Slider/Slider.js +1 -0
  311. package/components/Slider/Slider.js.map +1 -1
  312. package/components/Spinner/Spinner.cjs +5 -2
  313. package/components/Spinner/Spinner.cjs.map +1 -1
  314. package/components/SplitButton/SplitButton.cjs +81 -15
  315. package/components/SplitButton/SplitButton.cjs.map +1 -1
  316. package/components/SplitButton/UncontrolledSplitButton.js +6 -5
  317. package/components/SplitButton/UncontrolledSplitButton.js.map +1 -1
  318. package/components/Stack/Stack.cjs +27 -13
  319. package/components/Stack/Stack.cjs.map +1 -1
  320. package/components/Stack/Stack.d.ts +2 -6
  321. package/components/Stack/Stack.js +8 -5
  322. package/components/Stack/Stack.js.map +1 -1
  323. package/components/Stack/StackItem.d.ts +2 -6
  324. package/components/Stack/StackItem.js +11 -5
  325. package/components/Stack/StackItem.js.map +1 -1
  326. package/components/Stack/useStackStyleProps.d.ts +19 -10
  327. package/components/Stack/useStackStyleProps.js.map +1 -1
  328. package/components/Tabs/TabLink.d.ts +2 -3
  329. package/components/Tabs/TabLink.js +5 -3
  330. package/components/Tabs/TabLink.js.map +1 -1
  331. package/components/Tabs/Tabs.cjs +13 -6
  332. package/components/Tabs/Tabs.cjs.map +1 -1
  333. package/components/Tag/Tag.cjs +13 -6
  334. package/components/Tag/Tag.cjs.map +1 -1
  335. package/components/Tag/Tag.d.ts +3 -3
  336. package/components/Tag/Tag.js +5 -3
  337. package/components/Tag/Tag.js.map +1 -1
  338. package/components/Tag/useTagStyleProps.d.ts +1 -1
  339. package/components/Text/Text.cjs +8 -3
  340. package/components/Text/Text.cjs.map +1 -1
  341. package/components/Text/Text.d.ts +1 -1
  342. package/components/Text/Text.js.map +1 -1
  343. package/components/Text/useTextStyleProps.d.ts +3 -3
  344. package/components/Text/useTextStyleProps.js.map +1 -1
  345. package/components/TextArea/TextArea.cjs +74 -12
  346. package/components/TextArea/TextArea.cjs.map +1 -1
  347. package/components/TextArea/TextArea.d.ts +2 -3
  348. package/components/TextArea/TextArea.js +1 -0
  349. package/components/TextArea/TextArea.js.map +1 -1
  350. package/components/TextField/TextField.cjs +74 -12
  351. package/components/TextField/TextField.cjs.map +1 -1
  352. package/components/TextField/TextField.d.ts +2 -3
  353. package/components/TextField/TextField.js +1 -0
  354. package/components/TextField/TextField.js.map +1 -1
  355. package/components/TextFieldBase/TextFieldBase.cjs +73 -12
  356. package/components/TextFieldBase/TextFieldBase.cjs.map +1 -1
  357. package/components/TextFieldBase/TextFieldBase.d.ts +2 -6
  358. package/components/TextFieldBase/TextFieldBase.js +1 -0
  359. package/components/TextFieldBase/TextFieldBase.js.map +1 -1
  360. package/components/TextFieldBase/TextFieldBaseInput.d.ts +2 -3
  361. package/components/TextFieldBase/TextFieldBaseInput.js +3 -2
  362. package/components/TextFieldBase/TextFieldBaseInput.js.map +1 -1
  363. package/components/TextFieldBase/TextFieldBasePasswordToggle.js +3 -4
  364. package/components/TextFieldBase/TextFieldBasePasswordToggle.js.map +1 -1
  365. package/components/Timeline/Timeline.cjs +8 -3
  366. package/components/Timeline/Timeline.cjs.map +1 -1
  367. package/components/Timeline/Timeline.d.ts +1 -1
  368. package/components/Timeline/TimelineStep.d.ts +1 -1
  369. package/components/Toast/Toast.cjs +79 -12
  370. package/components/Toast/Toast.cjs.map +1 -1
  371. package/components/Toast/ToastBar.js +6 -4
  372. package/components/Toast/ToastBar.js.map +1 -1
  373. package/components/Toast/ToastBarLink.d.ts +2 -3
  374. package/components/Toast/ToastBarLink.js +5 -3
  375. package/components/Toast/ToastBarLink.js.map +1 -1
  376. package/components/Toast/UncontrolledToast.js +5 -3
  377. package/components/Toast/UncontrolledToast.js.map +1 -1
  378. package/components/Toast/constants.d.ts +0 -1
  379. package/components/Toast/constants.js +0 -1
  380. package/components/Toast/constants.js.map +1 -1
  381. package/components/Toggle/Toggle.cjs +11 -4
  382. package/components/Toggle/Toggle.cjs.map +1 -1
  383. package/components/Toggle/Toggle.d.ts +2 -3
  384. package/components/Toggle/Toggle.js +1 -0
  385. package/components/Toggle/Toggle.js.map +1 -1
  386. package/components/Tooltip/Tooltip.cjs +78 -10
  387. package/components/Tooltip/Tooltip.cjs.map +1 -1
  388. package/components/Tooltip/Tooltip.d.ts +2 -6
  389. package/components/Tooltip/Tooltip.js +9 -6
  390. package/components/Tooltip/Tooltip.js.map +1 -1
  391. package/components/Tooltip/TooltipCloseButton.js +5 -3
  392. package/components/Tooltip/TooltipCloseButton.js.map +1 -1
  393. package/components/Tooltip/useTooltipStyleProps.d.ts +20 -8
  394. package/components/Tooltip/useTooltipStyleProps.js.map +1 -1
  395. package/components/Truncate/Truncate.cjs +8 -3
  396. package/components/Truncate/Truncate.cjs.map +1 -1
  397. package/components/Truncate/Truncate.d.ts +1 -1
  398. package/components/Truncate/useTruncateStyleProps.d.ts +3 -3
  399. package/components/UNSTABLE_Header/UNSTABLE_Header.cjs +13 -6
  400. package/components/UNSTABLE_Header/UNSTABLE_Header.cjs.map +1 -1
  401. package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.d.ts +2 -3
  402. package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.js +5 -3
  403. package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.js.map +1 -1
  404. package/components/VisuallyHidden/VisuallyHidden.cjs +8 -3
  405. package/components/VisuallyHidden/VisuallyHidden.cjs.map +1 -1
  406. package/components/VisuallyHidden/VisuallyHidden.d.ts +1 -1
  407. package/components/VisuallyHidden/useVisuallyHiddenProps.d.ts +3 -3
  408. package/components/components.cjs +470 -293
  409. package/components/components.cjs.map +1 -1
  410. package/constants/constants.cjs.map +1 -1
  411. package/hooks/hooks.cjs +62 -2
  412. package/hooks/hooks.cjs.map +1 -1
  413. package/hooks/index.d.ts +1 -0
  414. package/hooks/index.js +1 -0
  415. package/hooks/index.js.map +1 -1
  416. package/hooks/useI18n.d.ts +6 -0
  417. package/hooks/useI18n.js +9 -0
  418. package/hooks/useI18n.js.map +1 -0
  419. package/hooks/useStyleUtilities.js +4 -2
  420. package/hooks/useStyleUtilities.js.map +1 -1
  421. package/index.cjs +474 -293
  422. package/index.cjs.map +1 -1
  423. package/index.d.ts +1 -0
  424. package/index.js +1 -0
  425. package/index.js.map +1 -1
  426. package/package.json +28 -26
  427. package/spirit-web-react.cjs +475 -294
  428. package/spirit-web-react.cjs.map +1 -1
  429. package/spirit-web-react.min.cjs +1 -1
  430. package/translations/defaults.d.ts +29 -0
  431. package/translations/defaults.js +30 -0
  432. package/translations/defaults.js.map +1 -0
  433. package/translations/index.d.ts +3 -0
  434. package/translations/index.js +4 -0
  435. package/translations/index.js.map +1 -0
  436. package/translations/replaceTranslationParams.d.ts +1 -0
  437. package/translations/replaceTranslationParams.js +5 -0
  438. package/translations/replaceTranslationParams.js.map +1 -0
  439. package/translations/resolveTranslationKey.d.ts +10 -0
  440. package/translations/resolveTranslationKey.js +14 -0
  441. package/translations/resolveTranslationKey.js.map +1 -0
  442. package/types/accordion.d.ts +18 -18
  443. package/types/alert.d.ts +4 -6
  444. package/types/avatar.d.ts +6 -6
  445. package/types/box.d.ts +4 -6
  446. package/types/breadcrumbs.d.ts +2 -2
  447. package/types/button.d.ts +9 -11
  448. package/types/card.d.ts +9 -9
  449. package/types/card.js.map +1 -1
  450. package/types/controlButton.d.ts +8 -7
  451. package/types/drawer.d.ts +3 -3
  452. package/types/flex.d.ts +7 -8
  453. package/types/footer.d.ts +6 -7
  454. package/types/grid.d.ts +14 -12
  455. package/types/header.d.ts +16 -18
  456. package/types/heading.d.ts +4 -4
  457. package/types/hidden.d.ts +7 -6
  458. package/types/icon.d.ts +5 -3
  459. package/types/iconBox.d.ts +7 -6
  460. package/types/item.d.ts +3 -3
  461. package/types/link.d.ts +9 -8
  462. package/types/link.js.map +1 -1
  463. package/types/matrix.d.ts +3 -3
  464. package/types/modal.d.ts +7 -5
  465. package/types/navigation.d.ts +10 -5
  466. package/types/pill.d.ts +3 -3
  467. package/types/pricingPlan.d.ts +2 -2
  468. package/types/section.d.ts +6 -5
  469. package/types/shared/dialogs.d.ts +6 -3
  470. package/types/shared/element.d.ts +5 -7
  471. package/types/shared/index.d.ts +4 -3
  472. package/types/shared/index.js +1 -0
  473. package/types/shared/index.js.map +1 -1
  474. package/types/shared/polymorphic.d.ts +13 -0
  475. package/types/shared/polymorphic.js +2 -0
  476. package/types/shared/polymorphic.js.map +1 -0
  477. package/types/shared/shared.cjs.map +1 -1
  478. package/types/skeleton.d.ts +9 -6
  479. package/types/spinner.d.ts +1 -1
  480. package/types/stack.d.ts +12 -10
  481. package/types/tabs.d.ts +6 -5
  482. package/types/tag.d.ts +3 -3
  483. package/types/text.d.ts +3 -3
  484. package/types/tooltip.d.ts +23 -21
  485. package/types/tooltip.js.map +1 -1
  486. package/types/types.cjs.map +1 -1
  487. package/types/unstableHeader.d.ts +9 -7
  488. package/types/visuallyHidden.d.ts +4 -4
  489. package/utils/mergeStyleProps.js +4 -1
  490. package/utils/mergeStyleProps.js.map +1 -1
  491. package/utils/utils.cjs +4 -1
  492. package/utils/utils.cjs.map +1 -1
  493. package/components/Matrix/constant.js.map +0 -1
  494. package/components/Modal/constants.d.ts +0 -1
  495. package/components/Modal/constants.js +0 -2
  496. package/components/Modal/constants.js.map +0 -1
  497. package/components/Pagination/constants.d.ts +0 -3
  498. package/components/Pagination/constants.js +0 -4
  499. package/components/Pagination/constants.js.map +0 -1
  500. package/components/SplitButton/constants.d.ts +0 -1
  501. package/components/SplitButton/constants.js +0 -2
  502. package/components/SplitButton/constants.js.map +0 -1
  503. package/components/TextFieldBase/constants.d.ts +0 -2
  504. package/components/TextFieldBase/constants.js +0 -3
  505. package/components/TextFieldBase/constants.js.map +0 -1
  506. /package/components/Matrix/{constant.d.ts → constants.d.ts} +0 -0
@@ -0,0 +1,29 @@
1
+ export declare const defaultLabels: {
2
+ common: {
3
+ close: string;
4
+ edit: string;
5
+ remove: string;
6
+ };
7
+ breadcrumbs: {
8
+ back: string;
9
+ };
10
+ fileUploader: {
11
+ edit: string;
12
+ remove: string;
13
+ attachments: string;
14
+ };
15
+ pagination: {
16
+ next: string;
17
+ previous: string;
18
+ goToPage: string;
19
+ };
20
+ textField: {
21
+ password: {
22
+ show: string;
23
+ hide: string;
24
+ };
25
+ };
26
+ splitButton: {
27
+ dropdown: string;
28
+ };
29
+ };
@@ -0,0 +1,30 @@
1
+ export const defaultLabels = {
2
+ common: {
3
+ close: 'Close',
4
+ edit: 'Edit',
5
+ remove: 'Remove',
6
+ },
7
+ breadcrumbs: {
8
+ back: 'Go back',
9
+ },
10
+ fileUploader: {
11
+ edit: 'Edit',
12
+ remove: 'Remove',
13
+ attachments: 'Attachments',
14
+ },
15
+ pagination: {
16
+ next: 'Next',
17
+ previous: 'Previous',
18
+ goToPage: 'Go to page',
19
+ },
20
+ textField: {
21
+ password: {
22
+ show: 'Show password',
23
+ hide: 'Hide password',
24
+ },
25
+ },
26
+ splitButton: {
27
+ dropdown: 'More',
28
+ },
29
+ };
30
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/translations/defaults.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE;QACN,KAAK,EAAE,OAAO;QACd,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;KACjB;IACD,WAAW,EAAE;QACX,IAAI,EAAE,SAAS;KAChB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,WAAW,EAAE,aAAa;KAC3B;IACD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,YAAY;KACvB;IACD,SAAS,EAAE;QACT,QAAQ,EAAE;YACR,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,eAAe;SACtB;KACF;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { defaultLabels } from './defaults';
2
+ export { replaceTranslationParams } from './replaceTranslationParams';
3
+ export { resolveTranslationKey } from './resolveTranslationKey';
@@ -0,0 +1,4 @@
1
+ export { defaultLabels } from "./defaults.js";
2
+ export { replaceTranslationParams } from "./replaceTranslationParams.js";
3
+ export { resolveTranslationKey } from "./resolveTranslationKey.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/translations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const replaceTranslationParams: (translation: string, params: Record<string, unknown>) => string;
@@ -0,0 +1,5 @@
1
+ export const replaceTranslationParams = (translation, params) => Object.entries(params).reduce((result, [paramKey, value]) => {
2
+ const safeParamKey = paramKey.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
3
+ return result.replace(new RegExp(`\\{${safeParamKey}\\}`, 'g'), String(value));
4
+ }, translation);
5
+ //# sourceMappingURL=replaceTranslationParams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replaceTranslationParams.js","sourceRoot":"","sources":["../../src/translations/replaceTranslationParams.ts"],"names":[],"mappings":"AAWA,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAE,MAA+B,EAAU,EAAE,CACvG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE;IAC1D,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAErE,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,YAAY,KAAK,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACjF,CAAC,EAAE,WAAW,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ type Segment = string;
2
+ type TwoSegments = `${Segment}.${Segment}`;
3
+ type ThreeSegments = `${TwoSegments}.${Segment}`;
4
+ type FourSegments = `${ThreeSegments}.${Segment}`;
5
+ type DotPath = Segment | TwoSegments | ThreeSegments | FourSegments;
6
+ type Translations = {
7
+ [key: string]: string | Translations;
8
+ };
9
+ export declare const resolveTranslationKey: (obj: Translations, path: DotPath) => string;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ export const resolveTranslationKey = (obj, path) => {
2
+ const keys = path.split('.');
3
+ let current = obj;
4
+ for (const key of keys) {
5
+ if (typeof current === 'object' && current !== null && key in current) {
6
+ current = current[key];
7
+ }
8
+ else {
9
+ return path;
10
+ }
11
+ }
12
+ return typeof current === 'string' ? current : path;
13
+ };
14
+ //# sourceMappingURL=resolveTranslationKey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTranslationKey.js","sourceRoot":"","sources":["../../src/translations/resolveTranslationKey.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAiB,EAAE,IAAa,EAAU,EAAE;IAChF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,IAAI,OAAO,GAA0B,GAAG,CAAC;IAEzC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,EAAE,CAAC;YACtE,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACtD,CAAC,CAAC"}
@@ -1,32 +1,32 @@
1
1
  import { type ElementType, type ReactNode } from 'react';
2
- import { type ChildrenProps, type ElementTypeProps, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
2
+ import { type ChildrenProps, type PolymorphicComponentProps, type StyleProps } from './shared';
3
3
  export type AccordionOpenStateType = string | string[] | undefined;
4
- export interface AccordionHandlingProps {
4
+ export interface AccordionState {
5
5
  open: AccordionOpenStateType;
6
6
  toggle: (id: string) => void;
7
7
  }
8
8
  export interface AccordionItemContextProps {
9
9
  id: string;
10
10
  }
11
- export interface BaseAccordionProps extends ChildrenProps, StyleProps {
11
+ export interface AccordionStateProps {
12
+ defaultOpen?: AccordionOpenStateType;
13
+ stayOpen?: boolean;
14
+ }
15
+ export interface AccordionBaseProps extends ChildrenProps, StyleProps {
12
16
  }
13
- export interface AccordionBaseProps extends BaseAccordionProps, AccordionHandlingProps {
17
+ export interface AccordionStyleProps extends AccordionBaseProps, AccordionState {
14
18
  }
15
- export type AccordionProps<T extends ElementType> = ElementTypeProps<T> & AccordionBaseProps;
16
- export type SpiritAccordionProps<T extends ElementType = 'section'> = AccordionProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionProps<T>>;
17
- export type AccordionHeaderProps<T extends ElementType = 'h3'> = ElementTypeProps<T> & {
19
+ export interface AccordionProps extends AccordionStyleProps {
20
+ }
21
+ export interface AccordionHeaderProps extends AccordionBaseProps {
18
22
  slot?: ReactNode;
19
- } & BaseAccordionProps;
20
- export type SpiritAccordionHeaderProps<T extends ElementType = 'h3'> = AccordionHeaderProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionHeaderProps<T>>;
21
- export interface AccordionItemBaseProps extends BaseAccordionProps, AccordionItemContextProps {
22
23
  }
23
- export type AccordionItemProps<T extends ElementType> = ElementTypeProps<T> & AccordionItemBaseProps;
24
- export type SpiritAccordionItemProps<T extends ElementType = 'article'> = AccordionItemProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionItemProps<T>>;
25
- export interface AccordionContentProps extends BaseAccordionProps {
24
+ export interface AccordionItemProps extends AccordionBaseProps, AccordionItemContextProps {
26
25
  }
27
- export interface UncontrolledAccordionBaseProps extends BaseAccordionProps {
28
- defaultOpen?: AccordionOpenStateType;
29
- stayOpen?: boolean;
26
+ export interface AccordionContentProps extends AccordionBaseProps {
30
27
  }
31
- export type UncontrolledAccordionProps<T extends ElementType> = ElementTypeProps<T> & UncontrolledAccordionBaseProps;
32
- export type SpiritUncontrolledAccordionProps<T extends ElementType = 'section'> = UncontrolledAccordionProps<T> & SpiritPolymorphicElementPropsWithRef<T, UncontrolledAccordionProps<T>>;
28
+ export type UncontrolledAccordionProps = AccordionBaseProps & AccordionStateProps;
29
+ export type SpiritAccordionProps<E extends ElementType = 'section'> = PolymorphicComponentProps<E, AccordionProps>;
30
+ export type SpiritAccordionHeaderProps<E extends ElementType = 'h3'> = PolymorphicComponentProps<E, AccordionHeaderProps>;
31
+ export type SpiritAccordionItemProps<E extends ElementType = 'article'> = PolymorphicComponentProps<E, AccordionItemProps>;
32
+ export type SpiritUncontrolledAccordionProps<E extends ElementType = 'section'> = PolymorphicComponentProps<E, UncontrolledAccordionProps>;
package/types/alert.d.ts CHANGED
@@ -1,12 +1,10 @@
1
1
  import { type ElementType } from 'react';
2
- import type { ChildrenProps, EmotionColorNamesType, StyleProps, TransferProps } from './shared';
3
- export interface AriaAlertElementTypeProps<T extends ElementType = 'div'> {
4
- elementType?: T;
2
+ import type { ChildrenProps, EmotionColorNamesType, SpiritPolymorphicComponentPropWithRef, StyleProps } from './shared';
3
+ export interface AlertBaseProps extends ChildrenProps, StyleProps {
5
4
  }
6
- export interface AlertProps extends ChildrenProps, StyleProps, TransferProps {
7
- }
8
- export interface SpiritAlertProps<T extends ElementType = 'div', C = void> extends AriaAlertElementTypeProps<T>, AlertProps {
5
+ export interface AlertProps<C = void> extends AlertBaseProps {
9
6
  color?: EmotionColorNamesType | C;
10
7
  iconName?: string;
11
8
  isCentered?: boolean;
12
9
  }
10
+ export type SpiritAlertProps<E extends ElementType = 'div', C = void> = SpiritPolymorphicComponentPropWithRef<E, AlertProps<C>>;
package/types/avatar.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { type ElementType } from 'react';
2
- import { type ChildrenProps, type SizeExtendedDictionaryType, type SpiritPolymorphicComponentPropWithRef, type StyleProps } from './shared';
3
- export type AvatarSize<S> = SizeExtendedDictionaryType<S> | S;
2
+ import { type ChildrenProps, type SingleOrResponsive, type SizeExtendedDictionaryType, type SpiritPolymorphicComponentPropWithRef, type StyleProps } from './shared';
3
+ export type SpiritAvatarSizeType<S> = SingleOrResponsive<SizeExtendedDictionaryType<S> | S>;
4
4
  export interface AvatarBaseProps extends ChildrenProps, StyleProps {
5
5
  }
6
- export interface AvatarStyleProps<S = void> extends AvatarBaseProps {
6
+ export interface AvatarStyleProps<S = string> extends AvatarBaseProps {
7
7
  isSquare?: boolean;
8
- size?: AvatarSize<S>;
8
+ size?: SpiritAvatarSizeType<S>;
9
9
  }
10
- export type AvatarProps<S = void> = AvatarStyleProps<S>;
11
- export type SpiritAvatarProps<E extends ElementType = 'div', S = void> = SpiritPolymorphicComponentPropWithRef<E, AvatarProps<S>>;
10
+ export type AvatarProps<S = string> = AvatarStyleProps<S>;
11
+ export type SpiritAvatarProps<E extends ElementType = 'div', S = string> = SpiritPolymorphicComponentPropWithRef<E, AvatarProps<S>>;
package/types/box.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
2
- import { type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type BackgroundGradientsDictionaryType, type BackgroundNeutralColorsType, type BorderAccentColorsType, type BorderColorsDictionaryType, type BorderEmotionColorsType, type BorderRadiiTokenType, type BorderStylesDictionaryType, type BorderWidthsDictionaryType, type ChildrenProps, type SingleOrResponsive, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps, type TextColorProps } from './shared';
1
+ import { type ElementType } from 'react';
2
+ import { type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type BackgroundGradientsDictionaryType, type BackgroundNeutralColorsType, type BorderAccentColorsType, type BorderColorsDictionaryType, type BorderEmotionColorsType, type BorderRadiiTokenType, type BorderStylesDictionaryType, type BorderWidthsDictionaryType, type ChildrenProps, type PolymorphicComponentProps, type SingleOrResponsive, type SpaceToken, type StyleProps, type TextColorProps } from './shared';
3
3
  export type BoxBackgroundColorsType = BackgroundColorsDictionaryType | BackgroundAccentColorsType | BackgroundEmotionColorsType | BackgroundNeutralColorsType;
4
4
  export interface BoxBaseProps extends ChildrenProps, TextColorProps, StyleProps {
5
5
  backgroundColor?: BoxBackgroundColorsType;
@@ -16,7 +16,5 @@ export interface BoxBaseProps extends ChildrenProps, TextColorProps, StyleProps
16
16
  paddingLeft?: SingleOrResponsive<SpaceToken>;
17
17
  paddingRight?: SingleOrResponsive<SpaceToken>;
18
18
  }
19
- export type BoxProps<E extends ElementType> = {
20
- elementType?: E | JSXElementConstructor<unknown>;
21
- } & BoxBaseProps;
22
- export type SpiritBoxProps<E extends ElementType = 'div'> = BoxProps<E> & SpiritPolymorphicElementPropsWithRef<E, BoxProps<E>>;
19
+ export type BoxProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, BoxBaseProps>;
20
+ export type SpiritBoxProps<E extends ElementType = 'div'> = BoxProps<E>;
@@ -12,8 +12,8 @@ export interface SpiritBreadcrumbsItemProps extends ChildrenProps {
12
12
  isCurrent?: boolean;
13
13
  isGoBackOnly?: boolean;
14
14
  }
15
- export interface AriaBreadcrumbsElementTypeProps<T extends ElementType = 'nav'> {
16
- elementType?: T;
15
+ export interface AriaBreadcrumbsElementTypeProps<E extends ElementType = 'nav'> {
16
+ elementType?: E;
17
17
  }
18
18
  export interface BreadcrumbsStyleProps extends StyleProps, TransferProps {
19
19
  isGoBackOnly?: boolean;
package/types/button.d.ts CHANGED
@@ -1,8 +1,10 @@
1
- import { type ComponentPropsWithRef, type ElementType } from 'react';
2
- import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
1
+ import { type ElementType } from 'react';
2
+ import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, PolymorphicComponentProps, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
3
3
  export type ButtonColor<C> = ComponentButtonColorNamesType<C> | EmotionColorNamesType<C>;
4
4
  export type ButtonSize<S> = keyof S extends never ? SizesDictionaryType : ButtonSizesType | S;
5
- export interface ButtonBaseProps<C = void, S = void> extends ChildrenProps, StyleProps, ClickEvents {
5
+ export interface ButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents {
6
+ }
7
+ export interface ButtonStyleProps<C = void, S = void> extends ButtonBaseProps {
6
8
  color?: ButtonColor<C>;
7
9
  isDisabled?: boolean;
8
10
  isBlock?: boolean;
@@ -10,12 +12,8 @@ export interface ButtonBaseProps<C = void, S = void> extends ChildrenProps, Styl
10
12
  isSymmetrical?: SingleOrResponsive<boolean>;
11
13
  size?: ButtonSize<S>;
12
14
  }
13
- export type ButtonProps<E extends ElementType, C = void, S = void> = {
14
- elementType?: E;
15
+ export interface ButtonProps<C = void, S = void> extends ButtonStyleProps<C, S> {
15
16
  type?: ButtonType;
16
- } & ButtonBaseProps<C, S>;
17
- export type ButtonLinkProps<E extends ElementType, C = void, S = void> = {
18
- elementType?: E;
19
- } & ButtonBaseProps<C, S>;
20
- export type SpiritButtonProps<E extends ElementType = 'button', C = void, S = void> = ButtonProps<E, C, S> & ComponentPropsWithRef<E>;
21
- export type SpiritButtonLinkProps<E extends ElementType = 'a', C = void, S = void> = ButtonLinkProps<E, C, S> & ComponentPropsWithRef<E>;
17
+ }
18
+ export type SpiritButtonProps<E extends ElementType = 'button', C = void, S = void> = PolymorphicComponentProps<E, ButtonProps<C, S>>;
19
+ export type SpiritButtonLinkProps<E extends ElementType = 'a', C = void, S = void> = PolymorphicComponentProps<E, Omit<ButtonProps<C, S>, 'type'>>;
package/types/card.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
1
+ import { type ElementType } from 'react';
2
2
  import { type ObjectFit } from '../constants';
3
- import { type AlignmentXDictionaryType, type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type ChildrenProps, type DirectionExtendedDictionaryType, type StyleProps, type TransferProps } from './shared';
3
+ import { type AlignmentXDictionaryType, type AlignmentYDictionaryType, type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type ChildrenProps, type DirectionExtendedDictionaryType, type SingleOrResponsive, type StyleProps, type TransferProps } from './shared';
4
4
  export declare const CardSizes: {
5
5
  readonly AUTO: "auto";
6
6
  readonly SMALL: "small";
@@ -8,17 +8,17 @@ export declare const CardSizes: {
8
8
  readonly LARGE: "large";
9
9
  };
10
10
  export type CardSizesDictionaryKeys = keyof typeof CardSizes;
11
- export type CardSizesDictionaryType<T = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | T;
12
- export type CardAlignmentXType = NonNullable<AlignmentXDictionaryType> | {
13
- [key: string]: NonNullable<AlignmentXDictionaryType>;
14
- };
15
- export interface CardElementTypeProps<T extends ElementType = 'article'> {
16
- elementType?: T | JSXElementConstructor<unknown>;
11
+ export type CardSizesDictionaryType<C = undefined> = (typeof CardSizes)[CardSizesDictionaryKeys] | C;
12
+ export type CardAlignmentXType = SingleOrResponsive<NonNullable<AlignmentXDictionaryType>>;
13
+ export type CardAlignmentYType = SingleOrResponsive<NonNullable<AlignmentYDictionaryType>>;
14
+ export interface CardElementTypeProps<E extends ElementType = 'article'> {
15
+ elementType?: E;
17
16
  }
18
17
  export type CardDirectionType = NonNullable<DirectionExtendedDictionaryType> | {
19
18
  [key: string]: NonNullable<DirectionExtendedDictionaryType>;
20
19
  };
21
- export interface CardProps<T extends ElementType = 'article'> extends CardElementTypeProps<T> {
20
+ export interface CardProps<E extends ElementType = 'article'> extends CardElementTypeProps<E> {
21
+ alignmentY?: CardAlignmentYType;
22
22
  direction?: CardDirectionType;
23
23
  isBoxed?: boolean;
24
24
  }
package/types/card.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/types/card.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAYrD,MAAM,CAAC,MAAM,SAAS,GAAG,gCACpB,KAAK,KACR,IAAI,EAAE,MAAM,GACJ,CAAC"}
1
+ {"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/types/card.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,EAAE,MAAM,cAAc,CAAC;AAcrD,MAAM,CAAC,MAAM,SAAS,GAAG,gCACpB,KAAK,KACR,IAAI,EAAE,MAAM,GACJ,CAAC"}
@@ -1,14 +1,15 @@
1
- import { type ComponentPropsWithRef, type ElementType } from 'react';
2
- import type { ButtonType, ChildrenProps, ClickEvents, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
1
+ import { type ElementType } from 'react';
2
+ import type { ButtonType, ChildrenProps, ClickEvents, PolymorphicComponentProps, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
3
3
  export type ControlButtonSize<S> = keyof S extends never ? SizesDictionaryType : 'small' | 'medium' | 'large' | S;
4
- export interface ControlButtonBaseProps<S = void> extends ChildrenProps, StyleProps, ClickEvents {
4
+ export interface ControlButtonBaseProps extends ChildrenProps, StyleProps, ClickEvents {
5
+ }
6
+ export interface ControlButtonStyleProps<S = void> extends ControlButtonBaseProps {
5
7
  isDisabled?: boolean;
6
8
  isSubtle?: boolean;
7
9
  isSymmetrical?: SingleOrResponsive<boolean>;
8
10
  size?: ControlButtonSize<S>;
9
11
  }
10
- export type ControlButtonProps<E extends ElementType, S = void> = {
11
- elementType?: E;
12
+ export interface ControlButtonProps<S = void> extends ControlButtonStyleProps<S> {
12
13
  type?: ButtonType;
13
- } & ControlButtonBaseProps<S>;
14
- export type SpiritControlButtonProps<E extends ElementType = 'button', S = void> = ControlButtonProps<E, S> & ComponentPropsWithRef<E>;
14
+ }
15
+ export type SpiritControlButtonProps<E extends ElementType = 'button', S = void> = PolymorphicComponentProps<E, ControlButtonProps<S>>;
package/types/drawer.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { type ComponentPropsWithRef, type ElementType } from 'react';
1
+ import { type ComponentPropsWithRef, type ElementType, type SyntheticEvent } from 'react';
2
2
  import { type AlignmentX } from '../constants';
3
3
  import { type ButtonColor, type ButtonSize } from './button';
4
4
  import { type IconBoxSize } from './icon';
5
- import { type ChildrenProps, type ClickEvent, type OmittedExtendedUnsafeStyleProps, type SpiritButtonElementProps, type SpiritDialogElementProps, type StyleProps } from './shared';
5
+ import { type ChildrenProps, type OmittedExtendedUnsafeStyleProps, type SpiritButtonElementProps, type SpiritDialogElementProps, type StyleProps } from './shared';
6
6
  export type DrawerAlignmentXType = (typeof AlignmentX)['LEFT' | 'RIGHT'];
7
7
  export type DrawerPanelElementType = 'aside' | 'form';
8
8
  export type DrawerPanelHandlingProps = {
9
9
  isOpen: boolean;
10
- onClose: (event: ClickEvent) => void;
10
+ onClose: (event: Event | SyntheticEvent) => void;
11
11
  closeOnBackdropClick?: boolean;
12
12
  closeOnEscapeKeyDown?: boolean;
13
13
  };
package/types/flex.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
2
- import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type DirectionExtendedDictionaryType, type SingleOrResponsive, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
3
- export interface FlexElementTypeProps<T extends ElementType = 'div'> {
4
- elementType?: T | JSXElementConstructor<unknown>;
5
- }
1
+ import { type ElementType } from 'react';
2
+ import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type DirectionExtendedDictionaryType, type PolymorphicComponentProps, type SingleOrResponsive, type SpaceToken, type StyleProps } from './shared';
6
3
  export type FlexDirection = DirectionExtendedDictionaryType | 'row' | 'column';
7
4
  export type FlexDirectionType = FlexDirection | {
8
5
  [key: string]: FlexDirection;
@@ -16,7 +13,9 @@ export type FlexAlignmentYType = NonNullable<AlignmentYExtendedDictionaryType> |
16
13
  export type FlexWrapType = boolean | {
17
14
  [key: string]: boolean;
18
15
  };
19
- export interface FlexCustomLayoutProps {
16
+ export interface FlexBaseProps extends ChildrenProps, StyleProps {
17
+ }
18
+ export interface FlexStyleProps extends FlexBaseProps {
20
19
  alignmentX?: FlexAlignmentXType;
21
20
  alignmentY?: FlexAlignmentYType;
22
21
  direction?: FlexDirectionType;
@@ -25,6 +24,6 @@ export interface FlexCustomLayoutProps {
25
24
  spacingX?: SingleOrResponsive<SpaceToken>;
26
25
  spacingY?: SingleOrResponsive<SpaceToken>;
27
26
  }
28
- export interface FlexProps<T extends ElementType = 'div'> extends FlexElementTypeProps<T>, FlexCustomLayoutProps {
27
+ export interface FlexProps extends FlexStyleProps {
29
28
  }
30
- export type SpiritFlexProps<T extends ElementType = 'div'> = FlexProps<T> & ChildrenProps & StyleProps & SpiritPolymorphicElementPropsWithRef<T, FlexProps<T>>;
29
+ export type SpiritFlexProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, FlexProps>;
package/types/footer.d.ts CHANGED
@@ -1,14 +1,13 @@
1
1
  import { type ElementType } from 'react';
2
- import { type BackgroundColorsDictionaryType, type ChildrenProps, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps, type TextAlignmentType } from './shared';
3
- export interface FooterStyleProps {
2
+ import { type BackgroundColorsDictionaryType, type ChildrenProps, type PolymorphicComponentProps, type SpaceToken, type StyleProps, type TextAlignmentType } from './shared';
3
+ export interface FooterBaseProps extends ChildrenProps, StyleProps {
4
+ }
5
+ export interface FooterStyleProps extends FooterBaseProps {
4
6
  paddingTop?: SpaceToken;
5
7
  paddingBottom?: SpaceToken;
6
8
  backgroundColor?: BackgroundColorsDictionaryType;
7
9
  textAlignment?: TextAlignmentType;
8
10
  }
9
- export interface FooterBaseProps extends FooterStyleProps, ChildrenProps, StyleProps {
11
+ export interface FooterProps extends FooterStyleProps {
10
12
  }
11
- export type FooterProps<E extends ElementType> = {
12
- elementType?: E;
13
- } & FooterBaseProps;
14
- export type SpiritFooterProps<E extends ElementType = 'footer'> = FooterProps<E> & SpiritPolymorphicElementPropsWithRef<E, FooterProps<E>>;
13
+ export type SpiritFooterProps<E extends ElementType = 'footer'> = PolymorphicComponentProps<E, FooterProps>;
package/types/grid.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
2
- import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type GridColumns, type SingleOrResponsive, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
1
+ import { type ElementType } from 'react';
2
+ import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type GridColumns, type PolymorphicComponentProps, type SingleOrResponsive, type SpaceToken, type StyleProps } from './shared';
3
3
  export type GridColsBreakpoints = {
4
4
  mobile?: GridColumns;
5
5
  tablet?: GridColumns;
@@ -12,12 +12,6 @@ export type GridItemPositionBreakpoints = {
12
12
  desktop?: number | GridItemSpan;
13
13
  };
14
14
  export type GridItemPosition = number | GridItemSpan | GridItemPositionBreakpoints;
15
- export interface GridElementTypeProps<T extends ElementType = 'div'> {
16
- elementType?: T | JSXElementConstructor<unknown>;
17
- }
18
- export interface GridItemElementTypeProps<T extends ElementType = 'div'> {
19
- elementType?: T | JSXElementConstructor<unknown>;
20
- }
21
15
  export type GridAlignmentXType = NonNullable<AlignmentXExtendedDictionaryType> | {
22
16
  [key: string]: NonNullable<AlignmentXExtendedDictionaryType>;
23
17
  };
@@ -38,9 +32,17 @@ export interface GridItemCustomLayoutProps {
38
32
  rowEnd?: GridItemPosition;
39
33
  rowStart?: GridItemPosition;
40
34
  }
41
- export interface GridProps<T extends ElementType = 'div'> extends GridElementTypeProps<T>, GridCustomLayoutProps {
35
+ export interface GridBaseProps extends ChildrenProps, StyleProps {
36
+ }
37
+ export interface GridItemBaseProps extends ChildrenProps, StyleProps {
38
+ }
39
+ export interface GridStyleProps extends GridBaseProps, GridCustomLayoutProps {
40
+ }
41
+ export interface GridItemStyleProps extends GridItemBaseProps, GridItemCustomLayoutProps {
42
+ }
43
+ export interface GridProps extends GridStyleProps {
42
44
  }
43
- export interface GridItemProps<T extends ElementType = 'div'> extends GridItemElementTypeProps<T>, GridItemCustomLayoutProps {
45
+ export interface GridItemProps extends GridItemStyleProps {
44
46
  }
45
- export type SpiritGridProps<T extends ElementType = 'div'> = GridProps<T> & ChildrenProps & StyleProps & SpiritPolymorphicElementPropsWithRef<T, GridProps<T>>;
46
- export type SpiritGridItemProps<T extends ElementType = 'div'> = GridItemProps<T> & ChildrenProps & StyleProps & SpiritPolymorphicElementPropsWithRef<T, GridItemProps<T>>;
47
+ export type SpiritGridProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, GridProps>;
48
+ export type SpiritGridItemProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, GridItemProps>;
package/types/header.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { type ElementType } from 'react';
2
- import { type ChildrenProps, type ClickEvent, type SpiritButtonElementProps, type SpiritDialogElementProps, type SpiritElementProps, type SpiritLItemElementProps, type SpiritPolymorphicElementPropsWithRef, type SpiritSpanElementProps, type SpiritUListElementProps, type StyleProps, type TransferProps } from './shared';
1
+ import { type ElementType, type SyntheticEvent } from 'react';
2
+ import { type ChildrenProps, type PolymorphicComponentProps, type SpiritButtonElementProps, type SpiritDialogElementProps, type SpiritElementProps, type SpiritLItemElementProps, type SpiritSpanElementProps, type SpiritUListElementProps, type StyleProps, type TransferProps } from './shared';
3
3
  export type HeaderActionsColorType = 'primary' | 'secondary';
4
4
  export type HeaderColorType = 'primary' | 'transparent';
5
5
  export type HeaderDialogHandlingProps = {
6
6
  isOpen: boolean;
7
- onClose: (event: ClickEvent) => void;
7
+ onClose: (event: Event | SyntheticEvent) => void;
8
8
  };
9
9
  export type HeaderMobileActionsHandlingProps = {
10
10
  isOpen: boolean;
11
- onOpen: (event: ClickEvent) => void;
11
+ onOpen: (event: Event | SyntheticEvent) => void;
12
12
  };
13
13
  export interface HeaderProps extends SpiritElementProps, ChildrenProps {
14
14
  color?: HeaderColorType;
@@ -30,26 +30,12 @@ export interface HeaderDialogButtonProps extends SpiritButtonElementProps, Child
30
30
  export interface HeaderDialogCloseButtonProps extends Omit<SpiritButtonElementProps, 'children'> {
31
31
  label?: string;
32
32
  }
33
- export interface BaseHeaderDialogLinkProps extends ChildrenProps, StyleProps, TransferProps {
34
- isCurrent?: boolean;
35
- }
36
- export type HeaderDialogLinkProps<E extends ElementType = 'a'> = {
37
- elementType?: E;
38
- } & BaseHeaderDialogLinkProps;
39
- export type SpiritDialogHeaderLinkProps<E extends ElementType = 'a'> = HeaderDialogLinkProps<E> & SpiritPolymorphicElementPropsWithRef<E, HeaderDialogLinkProps<E>>;
40
33
  export interface HeaderDialogNavProps extends SpiritUListElementProps, ChildrenProps {
41
34
  }
42
35
  export interface HeaderDialogNavItemProps extends SpiritLItemElementProps, ChildrenProps {
43
36
  }
44
37
  export interface HeaderDialogTextProps extends SpiritSpanElementProps, ChildrenProps {
45
38
  }
46
- export interface HeaderLinkBaseProps extends ChildrenProps, StyleProps, TransferProps {
47
- isCurrent?: boolean;
48
- }
49
- export type HeaderLinkProps<E extends ElementType = 'a'> = {
50
- elementType?: E;
51
- } & HeaderLinkBaseProps;
52
- export type SpiritHeaderLinkProps<E extends ElementType = 'a'> = HeaderLinkProps<E> & SpiritPolymorphicElementPropsWithRef<E, HeaderLinkProps<E>>;
53
39
  export interface HeaderMobileActionsProps extends SpiritElementProps, HeaderMobileActionsHandlingProps, ChildrenProps {
54
40
  dialogId: string;
55
41
  menuToggleLabel?: string;
@@ -58,3 +44,15 @@ export interface HeaderNavProps extends SpiritUListElementProps, ChildrenProps {
58
44
  }
59
45
  export interface HeaderNavItemProps extends SpiritLItemElementProps, ChildrenProps {
60
46
  }
47
+ export interface HeaderDialogLinkStyleProps extends ChildrenProps, StyleProps, TransferProps {
48
+ isCurrent?: boolean;
49
+ }
50
+ export interface HeaderLinkStyleProps extends ChildrenProps, StyleProps, TransferProps {
51
+ isCurrent?: boolean;
52
+ }
53
+ export interface HeaderDialogLinkProps extends HeaderDialogLinkStyleProps {
54
+ }
55
+ export interface HeaderLinkProps extends HeaderLinkStyleProps {
56
+ }
57
+ export type SpiritDialogHeaderLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, HeaderDialogLinkProps>;
58
+ export type SpiritHeaderLinkProps<E extends ElementType = 'a'> = PolymorphicComponentProps<E, HeaderLinkProps>;
@@ -1,10 +1,10 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
1
+ import { type ElementType } from 'react';
2
2
  import type { ChildrenProps, EmphasisDictionaryType, EmphasisProps, SizeExtendedDictionaryType, SizeProps, StyleProps, TextColorProps, TextColorsType, TransferProps, TypographyBaseProps } from './shared';
3
3
  export type HeadingColorsType<C = undefined> = TextColorsType<C>;
4
- export interface HeadingElementTypeProps<T extends ElementType> {
5
- elementType: T | JSXElementConstructor<unknown>;
4
+ export interface HeadingElementTypeProps<E extends ElementType> {
5
+ elementType: E;
6
6
  }
7
7
  export interface HeadingProps<T extends ElementType> extends HeadingElementTypeProps<T>, ChildrenProps, StyleProps, TransferProps, TypographyBaseProps {
8
8
  }
9
- export interface SpiritHeadingProps<T extends ElementType, S = void, E = void, C = void> extends HeadingProps<T>, SizeProps<SizeExtendedDictionaryType<S>>, EmphasisProps<EmphasisDictionaryType<E>>, TextColorProps<HeadingColorsType<C>> {
9
+ export interface SpiritHeadingProps<T extends ElementType, S = void, Emph = void, C = void> extends HeadingProps<T>, SizeProps<SizeExtendedDictionaryType<S>>, EmphasisProps<EmphasisDictionaryType<Emph>>, TextColorProps<HeadingColorsType<C>> {
10
10
  }
package/types/hidden.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
2
- import { type BreakpointToken, type ChildrenProps, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
1
+ import { type ElementType } from 'react';
2
+ import { type BreakpointToken, type ChildrenProps, type PolymorphicComponentProps, type StyleProps } from './shared';
3
3
  export interface HiddenBaseProps extends ChildrenProps, StyleProps {
4
+ }
5
+ export interface HiddenStyleProps extends HiddenBaseProps {
4
6
  from?: BreakpointToken;
5
7
  on?: BreakpointToken | BreakpointToken[];
6
8
  }
7
- export type HiddenProps<E extends ElementType> = {
8
- elementType?: E | JSXElementConstructor<unknown>;
9
- } & HiddenBaseProps;
10
- export type SpiritHiddenProps<E extends ElementType = 'span'> = HiddenProps<E> & SpiritPolymorphicElementPropsWithRef<E, HiddenProps<E>>;
9
+ export interface HiddenProps extends HiddenStyleProps {
10
+ }
11
+ export type SpiritHiddenProps<E extends ElementType = 'span'> = PolymorphicComponentProps<E, HiddenProps>;
package/types/icon.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import { type SVGAttributes } from 'react';
2
- import { type AccentColorNamesType, type ChildrenProps, type EmotionColorNamesType, type SingleOrResponsive, type StyleProps, type TextColorNamesType, type TransferProps } from './shared';
2
+ import { type AccentColorNamesType, type ChildrenProps, type EmotionColorNamesType, type SingleOrResponsive, type StyleProps, type TextColorNamesType } from './shared';
3
3
  export type IconBoxSize = SingleOrResponsive<number>;
4
4
  export type IconColorType = TextColorNamesType | EmotionColorNamesType | AccentColorNamesType;
5
- export interface IconProps extends StyleProps, ChildrenProps, SVGAttributes<SVGElement>, TransferProps {
6
- ariaHidden?: boolean;
5
+ export interface IconStyleProps extends SVGAttributes<SVGElement> {
7
6
  boxSize?: IconBoxSize;
8
7
  color?: IconColorType;
9
8
  name: string;
9
+ }
10
+ export interface IconProps extends IconStyleProps, StyleProps, ChildrenProps {
11
+ ariaHidden?: boolean;
10
12
  title?: string;
11
13
  }
12
14
  export interface SpiritIconProps extends IconProps {
@@ -1,10 +1,12 @@
1
- import { type ElementType, type JSXElementConstructor } from 'react';
1
+ import { type ElementType } from 'react';
2
2
  import { type IconBoxShapes } from '../components/IconBox/constants';
3
- import type { AccentColorNamesType, ChildrenProps, EmotionColorNamesType, SingleOrResponsive, SizeExtendedDictionaryType, SpiritPolymorphicElementPropsWithRef, StyleProps } from './shared';
3
+ import type { AccentColorNamesType, ChildrenProps, EmotionColorNamesType, PolymorphicComponentProps, SingleOrResponsive, SizeExtendedDictionaryType, StyleProps } from './shared';
4
4
  export type IconBoxShapeKeys = keyof typeof IconBoxShapes;
5
5
  export type IconBoxShapeType = (typeof IconBoxShapes)[IconBoxShapeKeys];
6
6
  export type IconBoxColorsType = AccentColorNamesType | EmotionColorNamesType;
7
7
  export interface IconBoxBaseProps extends ChildrenProps, StyleProps {
8
+ }
9
+ export interface IconBoxStyleProps extends IconBoxBaseProps {
8
10
  color?: IconBoxColorsType;
9
11
  shape?: IconBoxShapeType;
10
12
  hasBorder?: boolean;
@@ -12,7 +14,6 @@ export interface IconBoxBaseProps extends ChildrenProps, StyleProps {
12
14
  isSubtle?: boolean;
13
15
  size?: SingleOrResponsive<SizeExtendedDictionaryType>;
14
16
  }
15
- export type IconBoxProps<E extends ElementType> = {
16
- elementType?: E | JSXElementConstructor<unknown>;
17
- } & IconBoxBaseProps;
18
- export type SpiritIconBoxProps<E extends ElementType = 'div'> = IconBoxProps<E> & SpiritPolymorphicElementPropsWithRef<E, IconBoxProps<E>>;
17
+ export interface IconBoxProps extends IconBoxStyleProps {
18
+ }
19
+ export type SpiritIconBoxProps<E extends ElementType = 'div'> = PolymorphicComponentProps<E, IconBoxProps>;
package/types/item.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { type ElementType, type JSXElementConstructor, type ReactNode } from 'react';
1
+ import { type ElementType, type ReactNode } from 'react';
2
2
  import { type StyleProps, type TransferProps } from './shared';
3
- export interface AriaItemElementTypeProps<T extends ElementType = 'button'> {
4
- elementType?: T | JSXElementConstructor<unknown>;
3
+ export interface AriaItemElementTypeProps<E extends ElementType = 'button'> {
4
+ elementType?: E;
5
5
  }
6
6
  export interface ItemStyleProps extends StyleProps, TransferProps {
7
7
  isDisabled?: boolean;