@evolve.ui/core-components 1.0.1 → 1.2.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 (670) hide show
  1. package/{BottomSheet-ZV_eq3xt.mjs → BottomSheet-CNVLnEoD.mjs} +3 -3
  2. package/BottomSheet-CNVLnEoD.mjs.map +1 -0
  3. package/{BottomSheet-emWP9Fct.cjs → BottomSheet-D5w0WZDl.cjs} +3 -3
  4. package/BottomSheet-D5w0WZDl.cjs.map +1 -0
  5. package/Button.cjs +1 -1
  6. package/Button.mjs +1 -1
  7. package/{CookieConsent-CIwm0bTz.mjs → CookieConsent-B9dg9WdC.mjs} +2 -2
  8. package/{CookieConsent-CIwm0bTz.mjs.map → CookieConsent-B9dg9WdC.mjs.map} +1 -1
  9. package/{CookieConsent-PIglB_bb.cjs → CookieConsent-BSXJHMwX.cjs} +2 -2
  10. package/{CookieConsent-PIglB_bb.cjs.map → CookieConsent-BSXJHMwX.cjs.map} +1 -1
  11. package/{Drawer-9HFG45OA.cjs → Drawer-3rA9dGCl.cjs} +2 -2
  12. package/{Drawer-9HFG45OA.cjs.map → Drawer-3rA9dGCl.cjs.map} +1 -1
  13. package/Drawer-CFZbwg0R.d.cts.map +1 -1
  14. package/Drawer-CFZbwg0R.d.mts.map +1 -1
  15. package/{Drawer-BkCPfK6P.mjs → Drawer-DzKEmewj.mjs} +2 -2
  16. package/{Drawer-BkCPfK6P.mjs.map → Drawer-DzKEmewj.mjs.map} +1 -1
  17. package/{FavoriteButton-CC3qL0lR.mjs → FavoriteButton-7nK77lQP.mjs} +6 -6
  18. package/FavoriteButton-7nK77lQP.mjs.map +1 -0
  19. package/{FavoriteButton-BGF-3dze.d.cts → FavoriteButton-B8r_qtlj.d.cts} +2 -2
  20. package/{FavoriteButton-BGF-3dze.d.cts.map → FavoriteButton-B8r_qtlj.d.cts.map} +1 -1
  21. package/{FavoriteButton-DliYzkfu.cjs → FavoriteButton-BkIaWfgD.cjs} +6 -6
  22. package/FavoriteButton-BkIaWfgD.cjs.map +1 -0
  23. package/{FavoriteButton-BZEGWrRo.d.mts → FavoriteButton-hIkGjcKH.d.mts} +2 -2
  24. package/{FavoriteButton-BZEGWrRo.d.mts.map → FavoriteButton-hIkGjcKH.d.mts.map} +1 -1
  25. package/{FileUpload-p_pl9NXr.mjs → FileUpload-BfZOMsLs.mjs} +6 -6
  26. package/FileUpload-BfZOMsLs.mjs.map +1 -0
  27. package/{FileUpload--e_UJ_ek.cjs → FileUpload-gjRbkgrL.cjs} +6 -6
  28. package/FileUpload-gjRbkgrL.cjs.map +1 -0
  29. package/IconButton.cjs +1 -1
  30. package/IconButton.mjs +1 -1
  31. package/{ImageSlider-BidXfnLj.cjs → ImageSlider-CAgxQffP.cjs} +3 -3
  32. package/ImageSlider-CAgxQffP.cjs.map +1 -0
  33. package/{ImageSlider-CDrg_TbL.mjs → ImageSlider-fdrJ6lIJ.mjs} +3 -3
  34. package/ImageSlider-fdrJ6lIJ.mjs.map +1 -0
  35. package/InfoIconTooltip.cjs +1 -1
  36. package/InfoIconTooltip.cjs.map +1 -1
  37. package/InfoIconTooltip.mjs +1 -1
  38. package/InfoIconTooltip.mjs.map +1 -1
  39. package/InlineButton-CRLbNJZ3.d.mts.map +1 -1
  40. package/InlineButton-DoXGLiSE.d.cts.map +1 -1
  41. package/Input.cjs +1 -1
  42. package/Input.cjs.map +1 -1
  43. package/Input.mjs +1 -1
  44. package/Input.mjs.map +1 -1
  45. package/JumpMenu-BXYZnPIH.cjs.map +1 -1
  46. package/JumpMenu-DcZjAiej.mjs.map +1 -1
  47. package/{Menu-Cxu8CaX1.mjs → Menu-Bn4smlEe.mjs} +2 -2
  48. package/Menu-Bn4smlEe.mjs.map +1 -0
  49. package/{Menu-ClUogmwE.cjs → Menu-DuDhtoNP.cjs} +2 -2
  50. package/Menu-DuDhtoNP.cjs.map +1 -0
  51. package/Modal-DM0aXJZ5.d.cts.map +1 -1
  52. package/Modal-DM0aXJZ5.d.mts.map +1 -1
  53. package/{Modal-C6gatdtT.mjs → Modal-DtxWd7Le.mjs} +3 -2
  54. package/{Modal-C6gatdtT.mjs.map → Modal-DtxWd7Le.mjs.map} +1 -1
  55. package/{Modal-CiBqXyiK.cjs → Modal-q4HhBAQU.cjs} +3 -2
  56. package/Modal-q4HhBAQU.cjs.map +1 -0
  57. package/{Pagination-bAtbN478.cjs → Pagination-Denb9_zB.cjs} +2 -2
  58. package/{Pagination-bAtbN478.cjs.map → Pagination-Denb9_zB.cjs.map} +1 -1
  59. package/{Pagination-DIpGKMLz.mjs → Pagination-Dyfeys4B.mjs} +2 -2
  60. package/{Pagination-DIpGKMLz.mjs.map → Pagination-Dyfeys4B.mjs.map} +1 -1
  61. package/PhoneInput-B5pkpkdt.mjs.map +1 -1
  62. package/PhoneInput-BXnkBME4.d.mts.map +1 -1
  63. package/PhoneInput-Bkrbrins.d.cts.map +1 -1
  64. package/PhoneInput-CUMPOSxJ.cjs.map +1 -1
  65. package/{ProgressCircle-BC81D9sU.cjs → ProgressCircle-B6R4dxoV.cjs} +2 -2
  66. package/{ProgressCircle-BC81D9sU.cjs.map → ProgressCircle-B6R4dxoV.cjs.map} +1 -1
  67. package/{ProgressCircle-ae8cvZhe.mjs → ProgressCircle-zSai1HTT.mjs} +2 -2
  68. package/{ProgressCircle-ae8cvZhe.mjs.map → ProgressCircle-zSai1HTT.mjs.map} +1 -1
  69. package/SearchInput-DYIPC8Cd.d.cts.map +1 -1
  70. package/SearchInput-IfEWePDQ.d.mts.map +1 -1
  71. package/{Select-BkZu8OLs.mjs → Select-CH_ZN88G.mjs} +2 -2
  72. package/Select-CH_ZN88G.mjs.map +1 -0
  73. package/{Select-BXDjzyDs.cjs → Select-DCCcyLT4.cjs} +2 -2
  74. package/Select-DCCcyLT4.cjs.map +1 -0
  75. package/{SplitButton-DcmmLW8j.cjs → SplitButton-B_Y253RU.cjs} +2 -2
  76. package/{SplitButton-DcmmLW8j.cjs.map → SplitButton-B_Y253RU.cjs.map} +1 -1
  77. package/{SplitButton-WE5ymwCQ.mjs → SplitButton-_poP9Ykq.mjs} +2 -2
  78. package/{SplitButton-WE5ymwCQ.mjs.map → SplitButton-_poP9Ykq.mjs.map} +1 -1
  79. package/{Table-M-rANdMt.mjs → Table-CQGtDpvH.mjs} +3 -3
  80. package/{Table-M-rANdMt.mjs.map → Table-CQGtDpvH.mjs.map} +1 -1
  81. package/{Table-CLlDragJ.cjs → Table-D4UYosb1.cjs} +3 -3
  82. package/{Table-CLlDragJ.cjs.map → Table-D4UYosb1.cjs.map} +1 -1
  83. package/Typography/InlineButton.cjs +1 -1
  84. package/Typography/InlineButton.cjs.map +1 -1
  85. package/Typography/InlineButton.mjs +1 -1
  86. package/Typography/InlineButton.mjs.map +1 -1
  87. package/{ViewMore-BBoUvo7p.cjs → ViewMore-BcoSRZSl.cjs} +14 -1
  88. package/ViewMore-BcoSRZSl.cjs.map +1 -0
  89. package/{ViewMore-BrZPuE4E.mjs → ViewMore-Be0TQZ_2.mjs} +14 -1
  90. package/ViewMore-Be0TQZ_2.mjs.map +1 -0
  91. package/bottomSheet.cjs +1 -1
  92. package/bottomSheet.mjs +1 -1
  93. package/{buttonColorClasses-C3hg1at8.cjs → buttonColorClasses-CQQmLYfk.cjs} +4 -4
  94. package/buttonColorClasses-CQQmLYfk.cjs.map +1 -0
  95. package/{buttonColorClasses-B7OU4aQA.mjs → buttonColorClasses-CQnqAJXl.mjs} +4 -4
  96. package/buttonColorClasses-CQnqAJXl.mjs.map +1 -0
  97. package/card/components/createFavoriteButton.cjs +1 -1
  98. package/card/components/createFavoriteButton.mjs +1 -1
  99. package/cookieConsent.cjs +1 -1
  100. package/cookieConsent.mjs +1 -1
  101. package/drawer.cjs +1 -1
  102. package/drawer.mjs +1 -1
  103. package/evolve-ui.entries.json +556 -0
  104. package/favoriteButton.cjs +1 -1
  105. package/favoriteButton.d.cts +1 -1
  106. package/favoriteButton.d.mts +1 -1
  107. package/favoriteButton.mjs +1 -1
  108. package/featureFlags/hooks.d.cts +1 -1
  109. package/featureFlags/hooks.d.mts +1 -1
  110. package/fileUpload.cjs +1 -1
  111. package/fileUpload.mjs +1 -1
  112. package/imageSlider.cjs +1 -1
  113. package/imageSlider.mjs +1 -1
  114. package/index.cjs +14 -14
  115. package/index.d.cts +1 -1
  116. package/index.d.mts +1 -1
  117. package/index.mjs +14 -14
  118. package/menu.cjs +1 -1
  119. package/menu.mjs +1 -1
  120. package/modal/useCloseModal.cjs +2 -1
  121. package/modal/useCloseModal.cjs.map +1 -1
  122. package/modal/useCloseModal.mjs +2 -1
  123. package/modal/useCloseModal.mjs.map +1 -1
  124. package/modal.cjs +1 -1
  125. package/modal.mjs +1 -1
  126. package/package.json +2 -4
  127. package/pagination.cjs +1 -1
  128. package/pagination.mjs +1 -1
  129. package/progressCircle.cjs +1 -1
  130. package/progressCircle.mjs +1 -1
  131. package/searchInput.cjs +4 -4
  132. package/searchInput.cjs.map +1 -1
  133. package/searchInput.mjs +4 -4
  134. package/searchInput.mjs.map +1 -1
  135. package/select.cjs +1 -1
  136. package/select.mjs +1 -1
  137. package/selectAsync.cjs +1 -1
  138. package/selectAsync.mjs +1 -1
  139. package/selectAsyncCreatable.cjs +1 -1
  140. package/selectAsyncCreatable.mjs +1 -1
  141. package/selectCreatable.cjs +1 -1
  142. package/selectCreatable.mjs +1 -1
  143. package/splitButton.cjs +1 -1
  144. package/splitButton.mjs +1 -1
  145. package/src/Accordion/Accordion.tsx +233 -0
  146. package/src/AddressDisplay/AddressDisplay.tsx +43 -0
  147. package/src/AddressDisplay/components/addressComponents.tsx +111 -0
  148. package/src/AddressDisplay/components/addressField.tsx +25 -0
  149. package/src/AddressDisplay/components/addressSection.tsx +8 -0
  150. package/src/AddressDisplay/components/getCountryValue.tsx +31 -0
  151. package/src/AddressDisplay/types.ts +26 -0
  152. package/src/AutomatedCarousel/AutomatedCarousel.tsx +163 -0
  153. package/src/AutomatedCarousel/automatedCarousel.types.ts +7 -0
  154. package/src/AutomatedCarousel/components/CarouselProgressBar/CarouselProgressBar.tsx +139 -0
  155. package/src/AutomatedCarousel/components/CarouselProgressBar/components/CarouselProgressBarUnit/CarouselProgressBarUnit.tsx +165 -0
  156. package/src/Badge/Badge.tsx +104 -0
  157. package/src/Badge/Badge.types.ts +58 -0
  158. package/src/Badge/ItemBadge.tsx +97 -0
  159. package/src/Badge/LiveStatusBadge.tsx +93 -0
  160. package/src/BannerNotification/BannerNotification.tsx +157 -0
  161. package/src/BannerNotification/components/BannerNotificationSkeleton.tsx +39 -0
  162. package/src/BannerNotification/components/CalloutIcon/BannerIcon.tsx +48 -0
  163. package/src/BannerNotification/utils/getRandomTooltipId.ts +3 -0
  164. package/src/BottomSheet/BottomSheet.tsx +476 -0
  165. package/src/BottomSheet/components/BottomSheetBackdrop/BottomSheetBackdrop.tsx +47 -0
  166. package/src/BottomSheet/components/BottomSheetContentArea/BottomSheetContentArea.tsx +93 -0
  167. package/src/BottomSheet/components/BottomSheetOverlay/BottomSheetOverlayTranslate3d.tsx +199 -0
  168. package/src/BottomSheet/components/SheetDescription/SheetDescription.tsx +22 -0
  169. package/src/BottomSheet/components/SheetTitle/SheetTitle.tsx +21 -0
  170. package/src/BottomSheet/components/index.tsx +5 -0
  171. package/src/BottomSheet/hooks/index.tsx +13 -0
  172. package/src/BottomSheet/hooks/useAriaHider.tsx +91 -0
  173. package/src/BottomSheet/hooks/useBottomSheetServices.tsx +224 -0
  174. package/src/BottomSheet/hooks/useDragHandler.tsx +282 -0
  175. package/src/BottomSheet/hooks/useFocusTrap.tsx +113 -0
  176. package/src/BottomSheet/hooks/useLayoutEffect.tsx +4 -0
  177. package/src/BottomSheet/hooks/useOptimizedResizeObserver.tsx +94 -0
  178. package/src/BottomSheet/hooks/useOptimizedScrollState.tsx +87 -0
  179. package/src/BottomSheet/hooks/useReady.tsx +34 -0
  180. package/src/BottomSheet/hooks/useReducedMotion.tsx +22 -0
  181. package/src/BottomSheet/hooks/useScrollLock.tsx +143 -0
  182. package/src/BottomSheet/hooks/useSnapPoints.tsx +355 -0
  183. package/src/BottomSheet/hooks/useSpring.tsx +47 -0
  184. package/src/BottomSheet/hooks/useSpringInterpolationsTranslate3d.tsx +101 -0
  185. package/src/BottomSheet/index.tsx +237 -0
  186. package/src/BottomSheet/state/atoms.ts +147 -0
  187. package/src/BottomSheet/state/useBottomSheetStateMachine.ts +246 -0
  188. package/src/BottomSheet/types.ts +172 -0
  189. package/src/BottomSheet/utils.ts +65 -0
  190. package/src/Breadcrumbs/Breadcrumbs.tsx +126 -0
  191. package/src/Button/Button.tsx +164 -0
  192. package/src/Button/Button.types.ts +80 -0
  193. package/src/Button/buttonColorClasses.ts +58 -0
  194. package/src/Callout/Callout.tsx +136 -0
  195. package/src/Callout/Callout.types.ts +29 -0
  196. package/src/Callout/components/CalloutIcon/CalloutIcon.tsx +56 -0
  197. package/src/Card/CardGrid.tsx +263 -0
  198. package/src/Card/SingleCard.tsx +22 -0
  199. package/src/Card/cardFactory.tsx +176 -0
  200. package/src/Card/components/createBadge.tsx +34 -0
  201. package/src/Card/components/createFavoriteButton.tsx +40 -0
  202. package/src/Card/components/createImage.tsx +64 -0
  203. package/src/Card/components/createInfo.tsx +84 -0
  204. package/src/Card/components/createName.tsx +63 -0
  205. package/src/Card/components/createPriceStatus.tsx +100 -0
  206. package/src/Card/components/types.ts +4 -0
  207. package/src/Card/hooks/useCardVisibilityTracking.ts +82 -0
  208. package/src/Card/sharedProps.ts +12 -0
  209. package/src/Card/types.ts +62 -0
  210. package/src/Carousel/Carousel.tsx +513 -0
  211. package/src/Carousel/Carousel.types.ts +43 -0
  212. package/src/Carousel/Carousel.utils.ts +63 -0
  213. package/src/Carousel/components/DotButton/DotButton.tsx +42 -0
  214. package/src/Carousel/components/NavigationButtons/NavigationButtons.tsx +77 -0
  215. package/src/Carousel/components/TitleSection/TitleSection.tsx +61 -0
  216. package/src/Carousel/components/TitleSection/components/SubHeaderLeft/SubHeaderLeft.tsx +53 -0
  217. package/src/Carousel/components/TitleSection/components/Title/Title.tsx +46 -0
  218. package/src/Carousel/index.ts +2 -0
  219. package/src/Carousel/testUtils.ts +10 -0
  220. package/src/Chips/Chip.tsx +153 -0
  221. package/src/Chips/ChipGroup.tsx +173 -0
  222. package/src/Chips/SuggestionChip.tsx +15 -0
  223. package/src/Chips/chipTypes.ts +113 -0
  224. package/src/Chips/index.ts +4 -0
  225. package/src/ChoiceListItem/Checkbox.tsx +69 -0
  226. package/src/ChoiceListItem/Radio.tsx +61 -0
  227. package/src/ChoiceListItem/choiceListItem.tsx +99 -0
  228. package/src/ChoiceListItem/common.tsx +148 -0
  229. package/src/ChoiceListItem/index.ts +3 -0
  230. package/src/Collapsible/Collapsible.tsx +58 -0
  231. package/src/Confetti/Confetti.tsx +270 -0
  232. package/src/Confetti/index.ts +2 -0
  233. package/src/ContentPager/ContentPager.tsx +189 -0
  234. package/src/ContentPager/components/Page.tsx +24 -0
  235. package/src/CookieConsent/components/CookieCategoryRow/CookieCategoryRow.tsx +30 -0
  236. package/src/CookieConsent/components/CookieConsent/CookieConsent.tsx +74 -0
  237. package/src/CookieConsent/components/CookieConsentBanner/CookieConsentBanner.tsx +51 -0
  238. package/src/CookieConsent/components/CookieConsentModal/CookieConsentModal.tsx +64 -0
  239. package/src/CookieConsent/hooks/useCookieConsent.ts +170 -0
  240. package/src/CookieConsent/hooks/useCookieConsentState.ts +142 -0
  241. package/src/CookieConsent/index.ts +16 -0
  242. package/src/CookieConsent/types/cookieConsent.types.ts +79 -0
  243. package/src/CookieConsent/types/index.ts +7 -0
  244. package/src/Countdown/Countdown.tsx +161 -0
  245. package/src/Countdown/Countdown.types.ts +4 -0
  246. package/src/Countdown/hooks/useGetCountdown.ts +103 -0
  247. package/src/DateTimeInput/dateInput/DateInput.tsx +199 -0
  248. package/src/DateTimeInput/datePicker/DatePicker.tsx +138 -0
  249. package/src/DateTimeInput/datePicker/components/calendar/Calendar.tsx +72 -0
  250. package/src/DateTimeInput/datePicker/index.ts +2 -0
  251. package/src/DateTimeInput/timeInput/TimeInput.tsx +128 -0
  252. package/src/DateTimeInput/timePicker/TimePicker.tsx +118 -0
  253. package/src/DateTimeInput/timePicker/components/TimePopover/AmPmSwitch.tsx +103 -0
  254. package/src/DateTimeInput/timePicker/components/TimePopover/TimeFieldInput.tsx +26 -0
  255. package/src/DateTimeInput/timePicker/components/TimePopover/TimePopover.tsx +84 -0
  256. package/src/DateTimeInput/timePicker/components/TimePopover/TimePopover.utils.ts +67 -0
  257. package/src/DateTimeInput/timePicker/components/TimePopover/TimePopoverActions.tsx +26 -0
  258. package/src/DateTimeInput/timePicker/index.ts +2 -0
  259. package/src/DateTimeInput/utils/getDisplayDate.ts +15 -0
  260. package/src/DateTimeInput/utils/getDisplayTime.ts +15 -0
  261. package/src/DateTimeInput/utils/index.ts +2 -0
  262. package/src/DateTimeInput/utils/parseTimeValue.ts +54 -0
  263. package/src/Drawer/Drawer.tsx +443 -0
  264. package/src/Drawer/atoms.ts +4 -0
  265. package/src/Drawer/components/DialogActions/DialogActions.tsx +33 -0
  266. package/src/Drawer/components/DialogContent/DialogContent.tsx +80 -0
  267. package/src/Drawer/components/DialogHeader/DialogHeader.tsx +68 -0
  268. package/src/EducationalPopover/EducationalPopover.tsx +174 -0
  269. package/src/FavoriteButton/FavoriteButton.tsx +64 -0
  270. package/src/FavoriteButton/components/IconOnlyFavoriteButton/IconOnlyFavoriteButton.tsx +83 -0
  271. package/src/FavoriteButton/components/LabeledAnimatedFavoriteButton/LabeledAnimatedFavoriteButton.tsx +186 -0
  272. package/src/FavoriteButton/components/LabeledFavoriteButton/LabeledFavoriteButton.tsx +71 -0
  273. package/src/FavoriteButton/components/SmallHeartStraightIcon/SmallHeartStraightIcon.tsx +14 -0
  274. package/src/FavoriteButton/hooks/useFavoriteButtonState.ts +30 -0
  275. package/src/FavoriteButton/index.ts +2 -0
  276. package/src/FavoriteButton/types/favoriteButton.ts +87 -0
  277. package/src/FeatureFlags/devTools/FeatureFlagDevToolsUI.tsx +226 -0
  278. package/src/FeatureFlags/devTools/getFeatureFlagCookieOverrides.ts +30 -0
  279. package/src/FeatureFlags/devTools/utils/cookies.ts +169 -0
  280. package/src/FeatureFlags/hooks/index.ts +2 -0
  281. package/src/FeatureFlags/hooks/useFeatureFlag.tsx +19 -0
  282. package/src/FeatureFlags/hooks/useFeatureFlags.tsx +15 -0
  283. package/src/FileUpload/components/FileCard/FileCard.tsx +50 -0
  284. package/src/FileUpload/components/FileDropzone/FileDropzone.tsx +221 -0
  285. package/src/FileUpload/components/FileDropzone/components/DropzoneContent/DropzoneContent.tsx +28 -0
  286. package/src/FileUpload/components/FileDropzone/components/DropzoneContent/DropzoneText.tsx +81 -0
  287. package/src/FileUpload/components/FileDropzone/components/FileDropzoneDebugger/FileDropzoneDebugger.tsx +40 -0
  288. package/src/FileUpload/components/FileDropzone/components/FileDropzoneDebugger/FileRejectionsDisplay.tsx +110 -0
  289. package/src/FileUpload/components/FileDropzoneOverlay/FileDropzoneOverlay.tsx +183 -0
  290. package/src/FileUpload/components/FileDropzoneOverlay/components/OverlayDropzoneContent.tsx +146 -0
  291. package/src/FileUpload/components/FileDropzoneOverlay/components/OverlayDropzoneDragText.tsx +42 -0
  292. package/src/FileUpload/components/FileDropzoneOverlay/styles.ts +79 -0
  293. package/src/FileUpload/components/FilePreviewList/FilePreviewList.tsx +251 -0
  294. package/src/FileUpload/components/FilePreviewList/virtualizerComponents/FilePreviewVirtualizedList/FilePreviewVirtualizedList.tsx +88 -0
  295. package/src/FileUpload/components/FileUpload/FileUpload.tsx +63 -0
  296. package/src/FileUpload/components/FileUploadCanvas/FileUploadCanvas.tsx +125 -0
  297. package/src/FileUpload/components/GridFileCard/GridFileCard.tsx +364 -0
  298. package/src/FileUpload/components/GridFileCard/utils/sortable.ts +48 -0
  299. package/src/FileUpload/components/ListFileCard/ListFileCard.tsx +259 -0
  300. package/src/FileUpload/components/types.ts +78 -0
  301. package/src/FileUpload/hooks/filePreview/useImageFilePreviewUrl.ts +62 -0
  302. package/src/FileUpload/hooks/index.ts +11 -0
  303. package/src/FileUpload/hooks/upload/useHandleDragEnter/useHandleDragEnter.ts +154 -0
  304. package/src/FileUpload/hooks/upload/useHandleDrop/createFileRejectionHelpers.ts +273 -0
  305. package/src/FileUpload/hooks/upload/useHandleDrop/useHandleDrop.ts +153 -0
  306. package/src/FileUpload/hooks/upload/useUploadAvailability/useUploadAvailability.ts +44 -0
  307. package/src/FileUpload/hooks/validation/createDropzoneValidator.ts +41 -0
  308. package/src/FileUpload/hooks/validation/useFileValidation.ts +25 -0
  309. package/src/FileUpload/hooks/validation/useFileValidationLogic.ts +107 -0
  310. package/src/FileUpload/hooks/validation/useValidationMessages.ts +92 -0
  311. package/src/FileUpload/hooks/validation/useValidationState.ts +171 -0
  312. package/src/FileUpload/index.ts +57 -0
  313. package/src/FileUpload/providers/FileUploadProvider.tsx +219 -0
  314. package/src/FileUpload/providers/UploadValidationProvider.tsx +159 -0
  315. package/src/FileUpload/testUtils/mockFilesAndImages.ts +64 -0
  316. package/src/FileUpload/testUtils/testUtils.ts +111 -0
  317. package/src/FileUpload/types/commonTypes.ts +267 -0
  318. package/src/FileUpload/types/index.ts +31 -0
  319. package/src/FileUpload/types/sharedTypes.ts +159 -0
  320. package/src/FileUpload/utils/constants.ts +79 -0
  321. package/src/FileUpload/utils/createMessageContext.ts +180 -0
  322. package/src/FileUpload/utils/getFileExtensionsFromAcceptedTypes.ts +73 -0
  323. package/src/FileUpload/utils/getFilePluralizationText.ts +68 -0
  324. package/src/FileUpload/utils/getMimeTypes.ts +26 -0
  325. package/src/FileUpload/utils/messageUtils.ts +41 -0
  326. package/src/FileUpload/utils/styles.ts +68 -0
  327. package/src/FormLabel/FormLabel.tsx +212 -0
  328. package/src/IconButton/IconButton.tsx +154 -0
  329. package/src/Icons/CreditCardIcon/CreditCardIcon.tsx +73 -0
  330. package/src/Icons/CreditCardIcon/cardIcons.tsx +270 -0
  331. package/src/Icons/IconBase.tsx +133 -0
  332. package/src/Icons/anyIcon.ts +3 -0
  333. package/src/Icons/generatedIcons/Archive.tsx +48 -0
  334. package/src/Icons/generatedIcons/ArrowClockwise.tsx +48 -0
  335. package/src/Icons/generatedIcons/ArrowDown.tsx +48 -0
  336. package/src/Icons/generatedIcons/ArrowLeft.tsx +48 -0
  337. package/src/Icons/generatedIcons/ArrowRight.tsx +48 -0
  338. package/src/Icons/generatedIcons/ArrowSquareOut.tsx +51 -0
  339. package/src/Icons/generatedIcons/ArrowSquareRight.tsx +51 -0
  340. package/src/Icons/generatedIcons/ArrowUp.tsx +48 -0
  341. package/src/Icons/generatedIcons/ArrowsCounterClockwise.tsx +48 -0
  342. package/src/Icons/generatedIcons/ArrowsLeftRight.tsx +48 -0
  343. package/src/Icons/generatedIcons/ArrowsOutCardinal.tsx +48 -0
  344. package/src/Icons/generatedIcons/Bank.tsx +48 -0
  345. package/src/Icons/generatedIcons/Bell.tsx +51 -0
  346. package/src/Icons/generatedIcons/BookBookmark.tsx +51 -0
  347. package/src/Icons/generatedIcons/BookmarksSimple.tsx +51 -0
  348. package/src/Icons/generatedIcons/Broadcast.tsx +48 -0
  349. package/src/Icons/generatedIcons/CalendarBlank.tsx +48 -0
  350. package/src/Icons/generatedIcons/CalendarStar.tsx +51 -0
  351. package/src/Icons/generatedIcons/Camera.tsx +51 -0
  352. package/src/Icons/generatedIcons/CaretDown.tsx +48 -0
  353. package/src/Icons/generatedIcons/CaretLeft.tsx +48 -0
  354. package/src/Icons/generatedIcons/CaretRight.tsx +48 -0
  355. package/src/Icons/generatedIcons/CaretUp.tsx +48 -0
  356. package/src/Icons/generatedIcons/Certificate.tsx +51 -0
  357. package/src/Icons/generatedIcons/ChartBar.tsx +48 -0
  358. package/src/Icons/generatedIcons/Check.tsx +51 -0
  359. package/src/Icons/generatedIcons/CheckCircle.tsx +48 -0
  360. package/src/Icons/generatedIcons/CirclesFour.tsx +51 -0
  361. package/src/Icons/generatedIcons/Clock.tsx +48 -0
  362. package/src/Icons/generatedIcons/ClockCountdown.tsx +48 -0
  363. package/src/Icons/generatedIcons/Close.tsx +51 -0
  364. package/src/Icons/generatedIcons/CloudArrowUp.tsx +51 -0
  365. package/src/Icons/generatedIcons/CloudWarning.tsx +51 -0
  366. package/src/Icons/generatedIcons/Code.tsx +48 -0
  367. package/src/Icons/generatedIcons/Compass.tsx +51 -0
  368. package/src/Icons/generatedIcons/Confetti.tsx +51 -0
  369. package/src/Icons/generatedIcons/Copy.tsx +48 -0
  370. package/src/Icons/generatedIcons/CornersOut.tsx +48 -0
  371. package/src/Icons/generatedIcons/CreditCard.tsx +48 -0
  372. package/src/Icons/generatedIcons/Crown.tsx +51 -0
  373. package/src/Icons/generatedIcons/CrownSimple.tsx +51 -0
  374. package/src/Icons/generatedIcons/CurrencyCircleDollar.tsx +48 -0
  375. package/src/Icons/generatedIcons/CurrencyDollarSimple.tsx +51 -0
  376. package/src/Icons/generatedIcons/Desktop.tsx +51 -0
  377. package/src/Icons/generatedIcons/Detective.tsx +51 -0
  378. package/src/Icons/generatedIcons/DotOutline.tsx +46 -0
  379. package/src/Icons/generatedIcons/DotsSixVertical.tsx +51 -0
  380. package/src/Icons/generatedIcons/DotsThreeOutline.tsx +51 -0
  381. package/src/Icons/generatedIcons/DotsThreeOutlineVertical.tsx +51 -0
  382. package/src/Icons/generatedIcons/DownloadSimple.tsx +51 -0
  383. package/src/Icons/generatedIcons/EnvelopeSimple.tsx +48 -0
  384. package/src/Icons/generatedIcons/Eraser.tsx +51 -0
  385. package/src/Icons/generatedIcons/Eye.tsx +51 -0
  386. package/src/Icons/generatedIcons/EyeSlash.tsx +51 -0
  387. package/src/Icons/generatedIcons/FacebookLogo.tsx +48 -0
  388. package/src/Icons/generatedIcons/FileArchive.tsx +48 -0
  389. package/src/Icons/generatedIcons/FileArrowDown.tsx +48 -0
  390. package/src/Icons/generatedIcons/FileCsv.tsx +48 -0
  391. package/src/Icons/generatedIcons/FilePdf.tsx +48 -0
  392. package/src/Icons/generatedIcons/FileText.tsx +48 -0
  393. package/src/Icons/generatedIcons/Files.tsx +51 -0
  394. package/src/Icons/generatedIcons/Fire.tsx +51 -0
  395. package/src/Icons/generatedIcons/Flag.tsx +51 -0
  396. package/src/Icons/generatedIcons/FlagBannerFold.tsx +48 -0
  397. package/src/Icons/generatedIcons/FloppyDisk.tsx +51 -0
  398. package/src/Icons/generatedIcons/Gauge.tsx +51 -0
  399. package/src/Icons/generatedIcons/Gavel.tsx +51 -0
  400. package/src/Icons/generatedIcons/Gear.tsx +51 -0
  401. package/src/Icons/generatedIcons/GlobeHemisphereWest.tsx +51 -0
  402. package/src/Icons/generatedIcons/GoogleLogo.tsx +48 -0
  403. package/src/Icons/generatedIcons/GridNine.tsx +51 -0
  404. package/src/Icons/generatedIcons/HandCoins.tsx +51 -0
  405. package/src/Icons/generatedIcons/HandbagSimple.tsx +51 -0
  406. package/src/Icons/generatedIcons/Headset.tsx +51 -0
  407. package/src/Icons/generatedIcons/HeartStraight.tsx +51 -0
  408. package/src/Icons/generatedIcons/HourglassLow.tsx +48 -0
  409. package/src/Icons/generatedIcons/House.tsx +51 -0
  410. package/src/Icons/generatedIcons/Image.tsx +51 -0
  411. package/src/Icons/generatedIcons/ImageSquare.tsx +51 -0
  412. package/src/Icons/generatedIcons/ImagesSquare.tsx +51 -0
  413. package/src/Icons/generatedIcons/Info.tsx +48 -0
  414. package/src/Icons/generatedIcons/InstagramLogo.tsx +51 -0
  415. package/src/Icons/generatedIcons/Lightning.tsx +48 -0
  416. package/src/Icons/generatedIcons/Link.tsx +51 -0
  417. package/src/Icons/generatedIcons/LinkedinLogo.tsx +51 -0
  418. package/src/Icons/generatedIcons/List.tsx +48 -0
  419. package/src/Icons/generatedIcons/Lock.tsx +51 -0
  420. package/src/Icons/generatedIcons/LockOpen.tsx +51 -0
  421. package/src/Icons/generatedIcons/MagnifyingGlass.tsx +48 -0
  422. package/src/Icons/generatedIcons/MapPin.tsx +51 -0
  423. package/src/Icons/generatedIcons/MapPinSimpleArea.tsx +48 -0
  424. package/src/Icons/generatedIcons/Medal.tsx +48 -0
  425. package/src/Icons/generatedIcons/Megaphone.tsx +48 -0
  426. package/src/Icons/generatedIcons/Minus.tsx +45 -0
  427. package/src/Icons/generatedIcons/Money.tsx +51 -0
  428. package/src/Icons/generatedIcons/Notches.tsx +48 -0
  429. package/src/Icons/generatedIcons/NotePencil.tsx +48 -0
  430. package/src/Icons/generatedIcons/Package.tsx +51 -0
  431. package/src/Icons/generatedIcons/PaintBrush.tsx +51 -0
  432. package/src/Icons/generatedIcons/PaperPlaneTilt.tsx +51 -0
  433. package/src/Icons/generatedIcons/Paperclip.tsx +51 -0
  434. package/src/Icons/generatedIcons/Pause.tsx +51 -0
  435. package/src/Icons/generatedIcons/PencilLine.tsx +51 -0
  436. package/src/Icons/generatedIcons/PencilRuler.tsx +51 -0
  437. package/src/Icons/generatedIcons/PencilSimple.tsx +51 -0
  438. package/src/Icons/generatedIcons/Phone.tsx +51 -0
  439. package/src/Icons/generatedIcons/PinterestLogo.tsx +51 -0
  440. package/src/Icons/generatedIcons/Play.tsx +51 -0
  441. package/src/Icons/generatedIcons/Plus.tsx +51 -0
  442. package/src/Icons/generatedIcons/PlusCircle.tsx +48 -0
  443. package/src/Icons/generatedIcons/Printer.tsx +51 -0
  444. package/src/Icons/generatedIcons/Question.tsx +48 -0
  445. package/src/Icons/generatedIcons/Receipt.tsx +51 -0
  446. package/src/Icons/generatedIcons/Rows.tsx +51 -0
  447. package/src/Icons/generatedIcons/SealCheck.tsx +51 -0
  448. package/src/Icons/generatedIcons/SelectionSlash.tsx +48 -0
  449. package/src/Icons/generatedIcons/ShareNetwork.tsx +51 -0
  450. package/src/Icons/generatedIcons/ShieldCheck.tsx +51 -0
  451. package/src/Icons/generatedIcons/ShieldStar.tsx +51 -0
  452. package/src/Icons/generatedIcons/ShoppingCart.tsx +48 -0
  453. package/src/Icons/generatedIcons/ShuffleAngular.tsx +48 -0
  454. package/src/Icons/generatedIcons/SidebarSimple.tsx +48 -0
  455. package/src/Icons/generatedIcons/SlidersHorizontal.tsx +51 -0
  456. package/src/Icons/generatedIcons/Smiley.tsx +48 -0
  457. package/src/Icons/generatedIcons/Sparkle.tsx +51 -0
  458. package/src/Icons/generatedIcons/SpinnerGap.tsx +48 -0
  459. package/src/Icons/generatedIcons/StackPlus.tsx +48 -0
  460. package/src/Icons/generatedIcons/Star.tsx +51 -0
  461. package/src/Icons/generatedIcons/Storefront.tsx +51 -0
  462. package/src/Icons/generatedIcons/Swap.tsx +51 -0
  463. package/src/Icons/generatedIcons/Tag.tsx +51 -0
  464. package/src/Icons/generatedIcons/ThumbsDown.tsx +48 -0
  465. package/src/Icons/generatedIcons/ThumbsUp.tsx +48 -0
  466. package/src/Icons/generatedIcons/Toolbox.tsx +48 -0
  467. package/src/Icons/generatedIcons/Trash.tsx +48 -0
  468. package/src/Icons/generatedIcons/TrendUp.tsx +48 -0
  469. package/src/Icons/generatedIcons/Trophy.tsx +51 -0
  470. package/src/Icons/generatedIcons/Truck.tsx +51 -0
  471. package/src/Icons/generatedIcons/UploadSimple.tsx +51 -0
  472. package/src/Icons/generatedIcons/User.tsx +48 -0
  473. package/src/Icons/generatedIcons/Users.tsx +48 -0
  474. package/src/Icons/generatedIcons/UsersThree.tsx +51 -0
  475. package/src/Icons/generatedIcons/VideoCamera.tsx +51 -0
  476. package/src/Icons/generatedIcons/Warning.tsx +51 -0
  477. package/src/Icons/generatedIcons/WarningCircle.tsx +48 -0
  478. package/src/Icons/generatedIcons/WifiHigh.tsx +51 -0
  479. package/src/Icons/generatedIcons/XCircle.tsx +48 -0
  480. package/src/Icons/generatedIcons/XLogo.tsx +48 -0
  481. package/src/Icons/generatedIcons/YoutubeLogo.tsx +51 -0
  482. package/src/Icons/importedIcons.ts +152 -0
  483. package/src/Icons/index.ts +149 -0
  484. package/src/Icons/socialIcons/appleSocialIcon.tsx +50 -0
  485. package/src/Icons/socialIcons/facebookSocialIcon.tsx +41 -0
  486. package/src/Icons/socialIcons/googleSocialIcon.tsx +134 -0
  487. package/src/ImageCluster/ImageCluster.tsx +125 -0
  488. package/src/ImageSlider/ImageSlider.tsx +584 -0
  489. package/src/ImageSlider/ImageSlider.types.ts +90 -0
  490. package/src/ImageSlider/components/IndexIndicator/IndexIndicator.tsx +21 -0
  491. package/src/ImageSlider/components/NavigationButtons/NavigationButtons.tsx +113 -0
  492. package/src/ImageSlider/components/ResponsiveImage/ResponsiveImage.tsx +114 -0
  493. package/src/ImageSlider/components/ResponsiveImage/index.ts +1 -0
  494. package/src/ImageSlider/components/Thumbnails/Thumbnails.tsx +184 -0
  495. package/src/ImageSlider/constants.ts +59 -0
  496. package/src/ImageSlider/hooks/index.ts +3 -0
  497. package/src/ImageSlider/hooks/useImageSlider.ts +57 -0
  498. package/src/ImageSlider/hooks/useImageSliderNavigation.ts +133 -0
  499. package/src/ImageSlider/hooks/useImageSliderScrollHandler.ts +171 -0
  500. package/src/ImageSlider/index.ts +3 -0
  501. package/src/ImageSlider/utils/imageOptimization.ts +97 -0
  502. package/src/ImageSlider/utils/index.ts +1 -0
  503. package/src/InlineNotification/InlineNotification.tsx +95 -0
  504. package/src/JumpMenu/JumpMenu.tsx +395 -0
  505. package/src/JumpMenu/components/JumpMenuItem/JumpMenuItem.tsx +65 -0
  506. package/src/JumpMenu/hooks/useContainerTracking.ts +171 -0
  507. package/src/JumpMenu/hooks/useIntersectionObserver.ts +77 -0
  508. package/src/JumpMenu/hooks/useKeyboardNavigation.ts +102 -0
  509. package/src/JumpMenu/hooks/useResizeObserver.ts +53 -0
  510. package/src/JumpMenu/hooks/useSectionObserver.ts +102 -0
  511. package/src/JumpMenu/index.ts +2 -0
  512. package/src/JumpMenu/types/index.ts +19 -0
  513. package/src/Loading/Loading.tsx +39 -0
  514. package/src/Loading/components/LoadingDot/LoadingDot.tsx +16 -0
  515. package/src/LoadingSpinner/LoadingSpinner.tsx +20 -0
  516. package/src/Menu/Menu.tsx +372 -0
  517. package/src/Menu/components/MenuDivider/MenuDivider.tsx +5 -0
  518. package/src/Menu/components/MenuItem/MenuItem.tsx +298 -0
  519. package/src/Menu/context/menuContext.tsx +20 -0
  520. package/src/Menu/hooks/useMenu.tsx +18 -0
  521. package/src/Menu/index.ts +3 -0
  522. package/src/Modal/ComposableModal.tsx +321 -0
  523. package/src/Modal/Modal.tsx +231 -0
  524. package/src/Modal/components/BackButton/BackButton.tsx +43 -0
  525. package/src/Modal/components/Backdrop/Backdrop.tsx +62 -0
  526. package/src/Modal/components/CloseButton/CloseButton.tsx +55 -0
  527. package/src/Modal/components/ModalActions/ModalActions.tsx +135 -0
  528. package/src/Modal/components/ModalContent/ModalContent.tsx +163 -0
  529. package/src/Modal/components/ModalHeader/ModalHeader.tsx +84 -0
  530. package/src/Modal/components/ModalHeader/hooks/useHeaderAnimation.tsx +49 -0
  531. package/src/Modal/components/ModalProgressSteps/ModalProgressSteps.tsx +26 -0
  532. package/src/Modal/components/ModalSubTitle/ModalSubTitle.tsx +29 -0
  533. package/src/Modal/components/ModalTitle/ModalTitle.tsx +22 -0
  534. package/src/Modal/components/PreventModalScroll/PreventModalScroll.tsx +106 -0
  535. package/src/Modal/components/index.ts +12 -0
  536. package/src/Modal/context.ts +33 -0
  537. package/src/Modal/hooks/useCloseModal.ts +140 -0
  538. package/src/NotificationBadge/NotificationBadge.tsx +34 -0
  539. package/src/Pagination/AdvancedPagination.tsx +48 -0
  540. package/src/Pagination/Pagination.tsx +216 -0
  541. package/src/Pagination/components/AdvancedPaginator/AdvancedPaginator.tsx +52 -0
  542. package/src/Pagination/components/AdvancedPaginator/components/PageSelect/PageSelect.tsx +43 -0
  543. package/src/Pagination/components/ItemCountDisplay/ItemCountDisplay.tsx +32 -0
  544. package/src/Pagination/components/ItemCountSelect/ItemCountSelect.tsx +33 -0
  545. package/src/Pagination/index.tsx +3 -0
  546. package/src/Pagination/paginationProvider.tsx +234 -0
  547. package/src/Pagination/utils.tsx +36 -0
  548. package/src/PhoneInput/PhoneInput.tsx +515 -0
  549. package/src/PhoneInput/useDropdownLogic.tsx +163 -0
  550. package/src/ProgressCircle/ProgressCircle.tsx +246 -0
  551. package/src/ProgressCircle/hooks/useProgressStatusTransitions.ts +49 -0
  552. package/src/ProgressCircle/utils/progressCircle.constants.ts +27 -0
  553. package/src/ProgressSteps/ProgressSteps.tsx +160 -0
  554. package/src/SaveConfetti/SaveConfetti.tsx +277 -0
  555. package/src/SaveConfetti/index.ts +2 -0
  556. package/src/SearchInput/SearchInput.tsx +237 -0
  557. package/src/SegmentedControl/SegmentedControl.tsx +111 -0
  558. package/src/SegmentedControl/SegmentedControlGroup.tsx +94 -0
  559. package/src/SegmentedControl/index.ts +4 -0
  560. package/src/Select/Select.tsx +154 -0
  561. package/src/Select/SelectAsync.tsx +13 -0
  562. package/src/Select/SelectAsyncCreatable.tsx +14 -0
  563. package/src/Select/SelectCreatable.tsx +12 -0
  564. package/src/Select/reexportedComponents.tsx +5 -0
  565. package/src/Select/selectComponents.tsx +305 -0
  566. package/src/Skeleton/Skeleton.tsx +13 -0
  567. package/src/SplitButton/SplitButton.tsx +298 -0
  568. package/src/SplitButton/SplitButtonTrigger.tsx +55 -0
  569. package/src/StarRating/StarRating.tsx +165 -0
  570. package/src/StarRating/components/StarComponent/StarComponent.tsx +44 -0
  571. package/src/Table/Table.tsx +474 -0
  572. package/src/Table/components/TableHeader/TableHeader.tsx +166 -0
  573. package/src/Table/components/TablePagination/TablePagination.tsx +18 -0
  574. package/src/Table/components/TablePagination/components/ItemCountDisplay/ItemCountDisplay.tsx +17 -0
  575. package/src/Table/components/TablePagination/components/ItemCountSelect/ItemCountSelect.tsx +31 -0
  576. package/src/Table/components/TablePagination/components/TablePaginator/TablePaginator.tsx +37 -0
  577. package/src/Table/components/TablePagination/components/TablePaginator/components/PageSelect/PageSelect.tsx +32 -0
  578. package/src/Table/components/TableRow/TableRows.tsx +147 -0
  579. package/src/Table/components/TableRow/components/TableRowCell/TableRowCell.tsx +49 -0
  580. package/src/Table/components/TableShadow/TableShadow.tsx +46 -0
  581. package/src/Table/index.ts +2 -0
  582. package/src/Table/sharedState.ts +30 -0
  583. package/src/Table/sharedStyles.ts +1 -0
  584. package/src/Table/types.ts +55 -0
  585. package/src/Tabs/Tabs.tsx +358 -0
  586. package/src/TextArea/TextArea.tsx +159 -0
  587. package/src/TextInput/TextInput.tsx +173 -0
  588. package/src/Toast/Toast.tsx +64 -0
  589. package/src/Toast/components/ToastContainer/ToastContainer.tsx +48 -0
  590. package/src/Toast/index.ts +2 -0
  591. package/src/Toast/types/role.ts +1 -0
  592. package/src/Toast/utils/getIcon.tsx +41 -0
  593. package/src/ToggleSwitch/ToggleSwitch.tsx +188 -0
  594. package/src/Tooltip/InfoIconTooltip.tsx +47 -0
  595. package/src/Tooltip/Tooltip.tsx +41 -0
  596. package/src/Typography/InlineButton/InlineButton.tsx +167 -0
  597. package/src/Typography/Links/Links.tsx +113 -0
  598. package/src/Typography/Text/Text.tsx +239 -0
  599. package/src/ViewMore/ViewMore.tsx +226 -0
  600. package/src/WebRTCPlayer/WebRTCPlayer.tsx +325 -0
  601. package/src/WebRTCPlayer/adaptor/NativeWebRTCAdaptor.ts +588 -0
  602. package/src/WebRTCPlayer/hooks/useWebRTCStream.ts +571 -0
  603. package/src/WebRTCPlayer/index.ts +22 -0
  604. package/src/WebRTCPlayer/types.ts +95 -0
  605. package/src/breakpoints/index.tsx +1 -0
  606. package/src/breakpoints/utils.tsx +50 -0
  607. package/src/declarations.d.ts +7 -0
  608. package/src/grid/gridHighlighter.tsx +83 -0
  609. package/src/grid/index.ts +3 -0
  610. package/src/grid/pageGrid.tsx +37 -0
  611. package/src/grid/useSubGridCSS.tsx +214 -0
  612. package/src/hooks/useHorizontalScrollFade.ts +44 -0
  613. package/src/hooks/usePrevious.ts +14 -0
  614. package/src/index.ts +351 -0
  615. package/src/intl/index.ts +4 -0
  616. package/src/intl/utils.ts +67 -0
  617. package/src/mixins/horizontalScrollFadeMixin.ts +56 -0
  618. package/src/mixins/index.ts +18 -0
  619. package/src/mixins/propMixins.ts +389 -0
  620. package/src/providers/createContextProvider.ts +22 -0
  621. package/src/providers/designSystemProvider.tsx +218 -0
  622. package/src/providers/errorBoundaryProvider.tsx +179 -0
  623. package/src/providers/featureFlagProvider.tsx +18 -0
  624. package/src/providers/gridSizeProvider.tsx +23 -0
  625. package/src/providers/index.ts +12 -0
  626. package/src/providers/linkProvider.tsx +32 -0
  627. package/src/providers/normalize.tsx +93 -0
  628. package/src/providers/targets/DatePickerTarget.tsx +10 -0
  629. package/src/providers/targets/ModalTarget.tsx +14 -0
  630. package/src/providers/targets/TimePickerTarget.tsx +10 -0
  631. package/src/providers/themeContext.tsx +24 -0
  632. package/src/providers/windowSizeProvider.tsx +125 -0
  633. package/src/spacing/index.ts +1 -0
  634. package/src/spacing/spacing.ts +11 -0
  635. package/src/utils/countriesWithISOCodes.ts +1419 -0
  636. package/src/utils/dateTimeFormat.ts +257 -0
  637. package/src/utils/effectEventListener.ts +11 -0
  638. package/src/utils/formatFileSize.ts +18 -0
  639. package/src/utils/isClientSide.ts +1 -0
  640. package/src/utils/keepTransition.ts +15 -0
  641. package/src/utils/nodeEnv.ts +9 -0
  642. package/src/utils/smoothScrollTo.ts +65 -0
  643. package/src/utils/utilityTypes.ts +13 -0
  644. package/table.cjs +1 -1
  645. package/table.mjs +1 -1
  646. package/tabs.cjs +1 -1
  647. package/tabs.cjs.map +1 -1
  648. package/tabs.mjs +1 -1
  649. package/tabs.mjs.map +1 -1
  650. package/textArea.cjs.map +1 -1
  651. package/textArea.mjs.map +1 -1
  652. package/viewMore.cjs +1 -1
  653. package/viewMore.mjs +1 -1
  654. package/BottomSheet-ZV_eq3xt.mjs.map +0 -1
  655. package/BottomSheet-emWP9Fct.cjs.map +0 -1
  656. package/FavoriteButton-CC3qL0lR.mjs.map +0 -1
  657. package/FavoriteButton-DliYzkfu.cjs.map +0 -1
  658. package/FileUpload--e_UJ_ek.cjs.map +0 -1
  659. package/FileUpload-p_pl9NXr.mjs.map +0 -1
  660. package/ImageSlider-BidXfnLj.cjs.map +0 -1
  661. package/ImageSlider-CDrg_TbL.mjs.map +0 -1
  662. package/Menu-ClUogmwE.cjs.map +0 -1
  663. package/Menu-Cxu8CaX1.mjs.map +0 -1
  664. package/Modal-CiBqXyiK.cjs.map +0 -1
  665. package/Select-BXDjzyDs.cjs.map +0 -1
  666. package/Select-BkZu8OLs.mjs.map +0 -1
  667. package/ViewMore-BBoUvo7p.cjs.map +0 -1
  668. package/ViewMore-BrZPuE4E.mjs.map +0 -1
  669. package/buttonColorClasses-B7OU4aQA.mjs.map +0 -1
  670. package/buttonColorClasses-C3hg1at8.cjs.map +0 -1
@@ -0,0 +1,34 @@
1
+ import { ComponentProps } from 'react';
2
+
3
+ import { Badge } from '../../Badge/Badge';
4
+ import { CardComponent } from '../types';
5
+ import { CardHook } from './types';
6
+
7
+ /**
8
+ * Creates the card component that uses the provided hook `useGetBadgeState` to render a `Badge` for a Card. By default the props are `emphasis="bold"` and `round`.
9
+ *
10
+ * Returning `false` from the hook will render no badge.
11
+ */
12
+ export const createBadge = <ExtraData,>({
13
+ useGetBadgeState,
14
+ }: {
15
+ /** Returns the props to pass to the badge, or `false` to render no badge. */
16
+ useGetBadgeState: CardHook<ExtraData, ComponentProps<typeof Badge> | false>;
17
+ }): CardComponent<ExtraData> => ({
18
+ Component: (props) => {
19
+ const badgeProps = useGetBadgeState(props);
20
+
21
+ if (badgeProps === false) {
22
+ return null;
23
+ }
24
+
25
+ return (
26
+ <Badge
27
+ className="absolute left-xs top-xs z-[1]"
28
+ emphasis="bold"
29
+ round
30
+ {...badgeProps}
31
+ />
32
+ );
33
+ },
34
+ });
@@ -0,0 +1,40 @@
1
+ import { useCallback } from 'react';
2
+
3
+ import { FavoriteButton } from '../../FavoriteButton/FavoriteButton';
4
+ import { CardComponent } from '../types';
5
+ import { CardHook } from './types';
6
+
7
+ /**
8
+ * Creates the card component that adds a favorite button.
9
+ *
10
+ * Callbacks that modify the favorite button:
11
+ * - `isFavoriteButtonFavorited` - show the favorite button as favorited
12
+ * - `onFavoriteButtonClick` - handle the favorite button click
13
+ */
14
+ export const createFavoriteButton = <ExtraData,>({
15
+ useIsFavorited,
16
+ useSetFavorited,
17
+ }: {
18
+ /** Returns whether the favorite button should be favorited. */
19
+ useIsFavorited: CardHook<ExtraData, boolean>;
20
+ /** Adds the onclick to the favorite button. */
21
+ useSetFavorited: CardHook<ExtraData, (favorited: boolean) => void>;
22
+ }): CardComponent<ExtraData> => ({
23
+ Component: (props) => {
24
+ const isFavoriteButtonFavorited = useIsFavorited(props);
25
+ const onFavoriteButtonClick = useSetFavorited(props);
26
+
27
+ // Memoize the click handler
28
+ const handleClick = useCallback(() => {
29
+ onFavoriteButtonClick(!isFavoriteButtonFavorited);
30
+ }, [isFavoriteButtonFavorited, onFavoriteButtonClick]);
31
+
32
+ return (
33
+ <FavoriteButton
34
+ className="absolute right-xs top-xs z-[2]"
35
+ favorited={isFavoriteButtonFavorited}
36
+ onClick={handleClick}
37
+ />
38
+ );
39
+ },
40
+ });
@@ -0,0 +1,64 @@
1
+ import { ComponentType, useCallback } from 'react';
2
+
3
+ import { usePreventDefaultLinkOnClick } from '../../providers';
4
+ import { CardComponent } from '../types';
5
+ import { CardHook } from './types';
6
+
7
+ /**
8
+ * Helps style an image for a card.
9
+ */
10
+ export const createImage = <ExtraData,>({
11
+ aspectRatio = 1,
12
+ ImageComponent,
13
+ useHref,
14
+ }: {
15
+ /** The your rendered image to use. Receives card data as props and `className`.
16
+ *
17
+ * **Do not forget to forward the className**
18
+ */
19
+ ImageComponent: ComponentType<ExtraData & { className: string }>;
20
+ /** Optional parameter to set aspect ratio on the image (1:1 by default) */
21
+ aspectRatio?: number;
22
+ /** A hook that returns the href to use for the image (makes it a link) */
23
+ useHref?: CardHook<ExtraData, string>;
24
+ }): CardComponent<ExtraData> => ({
25
+ Component: (props) => {
26
+ const href = useHref?.(props);
27
+ const navigate = usePreventDefaultLinkOnClick();
28
+
29
+ const imageClasses = 'w-full object-cover';
30
+ const linkClasses = 'peer/card-image relative w-full cursor-pointer';
31
+
32
+ // Memoize click handler
33
+ const handleClick = useCallback((href: string) => navigate(href), [navigate]);
34
+
35
+ const image = (
36
+ <ImageComponent
37
+ className={imageClasses}
38
+ style={{ aspectRatio }}
39
+ {...props}
40
+ />
41
+ );
42
+
43
+ if (href) {
44
+ return (
45
+ <a
46
+ className={linkClasses}
47
+ href={href}
48
+ onClick={handleClick(href)}
49
+ style={{ aspectRatio }}
50
+ tabIndex={-1}
51
+ >
52
+ {image}
53
+ </a>
54
+ );
55
+ }
56
+
57
+ return image;
58
+ },
59
+ skeletonConfig: {
60
+ height: 282,
61
+ type: 'inline',
62
+ width: 282,
63
+ },
64
+ });
@@ -0,0 +1,84 @@
1
+ import { ReactNode, useCallback } from 'react';
2
+
3
+ import { usePreventDefaultLinkOnClick } from '../../providers';
4
+ import { SubtleWeakLink } from '../../Typography/Links/Links';
5
+ import { BodySecondary } from '../../Typography/Text/Text';
6
+ import { CardComponent } from '../types';
7
+ import { CardHook } from './types';
8
+
9
+ /**
10
+ * The sizes of the shadows used in the card.
11
+ *
12
+ * Pass this to the shadowSize prop of `createInfo`.
13
+ */
14
+ export const shadowSizes = {
15
+ footer: 141,
16
+ location: 282,
17
+ sellerName: 143,
18
+ shipping: 79,
19
+ } as const;
20
+
21
+ /**
22
+ * Creates the card component that uses the given key of the `CardData` as a piece of info.
23
+ *
24
+ * This info might include
25
+ * - Seller Name
26
+ * - Location
27
+ * - Shipping
28
+ * - Footer
29
+ */
30
+ export const createInfo = <ExtraData,>({
31
+ className = 'line-clamp-2',
32
+ skeletonWidth,
33
+ useHref,
34
+ useText,
35
+ }: {
36
+ /**
37
+ * Pass styles down including line clamping
38
+ *
39
+ * @default 'line-clamp-2'
40
+ */
41
+ className?: string;
42
+ /** The width of the shadow to use. See `shadowSizes` export for options. */
43
+ skeletonWidth?: number;
44
+ /** A hook that returns the href to use for the name (makes it a link) */
45
+ useHref?: CardHook<ExtraData, string>;
46
+ /** A hook that returns the text to use for the component */
47
+ useText: CardHook<ExtraData, ReactNode>;
48
+ }): CardComponent<ExtraData> => ({
49
+ Component: (props) => {
50
+ const info = useText(props);
51
+ const href = useHref?.(props);
52
+ const navigate = usePreventDefaultLinkOnClick();
53
+
54
+ // Memoize the click handler
55
+ const handleClick = useCallback((href: string) => navigate(href), [navigate]);
56
+
57
+ if (href) {
58
+ return (
59
+ <SubtleWeakLink
60
+ className={className}
61
+ href={href}
62
+ onClick={handleClick(href)}
63
+ size="sm"
64
+ >
65
+ {info}
66
+ </SubtleWeakLink>
67
+ );
68
+ }
69
+
70
+ return (
71
+ <BodySecondary
72
+ className={className}
73
+ color="secondary"
74
+ >
75
+ {info}
76
+ </BodySecondary>
77
+ );
78
+ },
79
+ skeletonConfig: {
80
+ height: 22,
81
+ type: 'inline',
82
+ width: skeletonWidth,
83
+ },
84
+ });
@@ -0,0 +1,63 @@
1
+ import { cn } from '@evolve.ui/theme-system';
2
+ import { ReactNode, useMemo } from 'react';
3
+
4
+ import { usePreventDefaultLinkOnClick } from '../../providers';
5
+ import { SubtleMonochromeLink } from '../../Typography/Links/Links';
6
+ import { BodySecondary } from '../../Typography/Text/Text';
7
+ import { CardComponent } from '../types';
8
+ import { CardHook } from './types';
9
+
10
+ /**
11
+ * Creates the card component with default "name" styles
12
+ */
13
+ export const createName = <ExtraData,>({
14
+ className = 'line-clamp-2',
15
+ useHref,
16
+ useText,
17
+ }: {
18
+ /**
19
+ * Pass styles down including line clamping
20
+ *
21
+ * @default 'line-clamp-2'
22
+ */
23
+ className?: string;
24
+ /** The number of lines to wrap */
25
+ lineClamp?: number;
26
+ /** A hook that returns the href to use for the name (makes it a link) */
27
+ useHref?: CardHook<ExtraData, string>;
28
+ /** A hook that returns the text to use for the component */
29
+ useText: CardHook<ExtraData, ReactNode>;
30
+ }): CardComponent<ExtraData> => ({
31
+ Component: (props) => {
32
+ const navigate = usePreventDefaultLinkOnClick();
33
+ const name = useText(props);
34
+ const href = useHref?.(props);
35
+
36
+ // Memoize the full class names
37
+ const linkClasses = useMemo(
38
+ () =>
39
+ cn('hui-card-name peer-hover/card-image:text-link-primary peer-hover/card-image:underline', className),
40
+ []
41
+ );
42
+
43
+ if (href) {
44
+ return (
45
+ <SubtleMonochromeLink
46
+ className={linkClasses}
47
+ href={href}
48
+ onClick={navigate(href)}
49
+ size="md"
50
+ >
51
+ {name}
52
+ </SubtleMonochromeLink>
53
+ );
54
+ }
55
+
56
+ return <BodySecondary className={linkClasses}>{name}</BodySecondary>;
57
+ },
58
+ skeletonConfig: {
59
+ height: 24,
60
+ type: 'inline',
61
+ width: 230,
62
+ },
63
+ });
@@ -0,0 +1,100 @@
1
+ import { useMemo } from 'react';
2
+ import { useIntl } from 'react-intl';
3
+
4
+ import { InlineButton } from '../../Typography/InlineButton/InlineButton';
5
+ import { BodyPrimary } from '../../Typography/Text/Text';
6
+ import { CardComponent } from '../types';
7
+ import { CardHook } from './types';
8
+
9
+ export const priceStatusSeeSoldPriceIntlKey = 'hui.card.priceStatusSeeSoldPrice';
10
+ export const priceStatusPreviewOnlyIntlKey = 'hui.card.priceStatusPreviewOnly';
11
+ export const priceStatusSoldIntlKey = 'hui.card.priceStatusSold';
12
+
13
+ /**
14
+ * Creates the card component that represents price.
15
+ */
16
+ export const createPriceStatus = <ExtraData,>({
17
+ useBidCount,
18
+ useIsPriceStatusHidden,
19
+ useIsPriceStatusPreviewOnly,
20
+ useIsPriceStatusSold,
21
+ useOnSeeSoldPriceClick,
22
+ usePrice,
23
+ useShouldPriceStatusShowBidCount,
24
+ }: {
25
+ /** A hook that returns the bid count to use for the component */
26
+ useBidCount?: CardHook<ExtraData, string>;
27
+ /** Returns whether the price status should be hidden. */
28
+ useIsPriceStatusHidden?: CardHook<ExtraData, boolean>;
29
+ /** Returns whether the price status should be "Preview Only". */
30
+ useIsPriceStatusPreviewOnly?: CardHook<ExtraData, boolean>;
31
+ /** Returns whether the price status should be "Sold for". */
32
+ useIsPriceStatusSold?: CardHook<ExtraData, boolean>;
33
+ /** Adds the onclick to the "See Sold Price" button. */
34
+ useOnSeeSoldPriceClick?: CardHook<ExtraData, () => void>;
35
+ /** A hook that returns the price to use for the component */
36
+ usePrice: CardHook<ExtraData, string>;
37
+ /** Returns whether the price status should show the bid count. */
38
+ useShouldPriceStatusShowBidCount?: CardHook<ExtraData, boolean>;
39
+ }): CardComponent<ExtraData> => ({
40
+ Component: (props) => {
41
+ const price = usePrice(props);
42
+ const bidCount = useBidCount?.(props);
43
+ const { formatMessage } = useIntl();
44
+
45
+ const isPriceStatusHidden = useIsPriceStatusHidden?.(props);
46
+ const isPriceStatusPreviewOnly = useIsPriceStatusPreviewOnly?.(props);
47
+ const isPriceStatusSold = useIsPriceStatusSold?.(props);
48
+ const onSeeSoldPriceClick = useOnSeeSoldPriceClick?.(props);
49
+ const shouldPriceStatusShowBidCount = useShouldPriceStatusShowBidCount?.(props);
50
+
51
+ // Memoize classes
52
+ const containerClasses = 'flex gap-xs';
53
+ const textClasses = 'hui-text-h5';
54
+
55
+ // Memoize formatMessage calls
56
+ const seeSoldPriceText = useMemo(
57
+ () => formatMessage({ defaultMessage: 'See Sold Price', id: priceStatusSeeSoldPriceIntlKey }),
58
+ [formatMessage]
59
+ );
60
+ const previewOnlyText = useMemo(
61
+ () => formatMessage({ defaultMessage: 'Preview Only', id: priceStatusPreviewOnlyIntlKey }),
62
+ [formatMessage]
63
+ );
64
+ const soldForText = useMemo(
65
+ () =>
66
+ formatMessage(
67
+ {
68
+ defaultMessage: 'Sold for {price}',
69
+ id: priceStatusSoldIntlKey,
70
+ },
71
+ { price }
72
+ ),
73
+ [formatMessage, price]
74
+ );
75
+
76
+ if (isPriceStatusHidden) {
77
+ return <InlineButton onClick={() => onSeeSoldPriceClick}>{seeSoldPriceText}</InlineButton>;
78
+ }
79
+
80
+ if (isPriceStatusPreviewOnly) {
81
+ return <span className={textClasses}>{previewOnlyText}</span>;
82
+ }
83
+
84
+ if (isPriceStatusSold) {
85
+ return <div className={containerClasses}>{soldForText}</div>;
86
+ }
87
+
88
+ return (
89
+ <div className={containerClasses}>
90
+ <span className={textClasses}>{price}</span>
91
+ {shouldPriceStatusShowBidCount && bidCount && <BodyPrimary color="secondary">{bidCount}</BodyPrimary>}
92
+ </div>
93
+ );
94
+ },
95
+ skeletonConfig: {
96
+ height: 22,
97
+ type: 'inline',
98
+ width: 56,
99
+ },
100
+ });
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Helps define hooks used in the `create*` functions.
3
+ */
4
+ export type CardHook<CardData, ExpectedReturnType> = (data: CardData) => ExpectedReturnType;
@@ -0,0 +1,82 @@
1
+ import { useCallback, useRef } from 'react';
2
+
3
+ import { useIntersectionObserver } from '../../JumpMenu/hooks/useIntersectionObserver';
4
+
5
+ /**
6
+ * Options for the useCardVisibilityTracking hook
7
+ */
8
+ type UseCardVisibilityTrackingOptions = {
9
+ /**
10
+ * Threshold at which to trigger the visibility callback.
11
+ * 0.5 means the callback fires when 50% of the card is visible.
12
+ * @default 0.5
13
+ */
14
+ threshold?: number;
15
+ };
16
+
17
+ /**
18
+ * Hook that tracks when a card becomes visible in the viewport
19
+ * and fires a callback only once per card.
20
+ *
21
+ * @param onVisible - Callback function to call when a card becomes visible
22
+ * @param options - Configuration options for visibility detection
23
+ * @returns A function that returns a ref callback for a specific card key
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * const getVisibilityRef = useCardVisibilityTracking(
28
+ * (cardKey) => trackItemVisible(cardKey),
29
+ * { threshold: 0.5 }
30
+ * );
31
+ *
32
+ * <Card visibilityRef={getVisibilityRef('card-123')} />
33
+ * ```
34
+ */
35
+ export const useCardVisibilityTracking = <CardKey extends string | number>(
36
+ onVisible: (cardKey: CardKey) => void,
37
+ options: UseCardVisibilityTrackingOptions = {}
38
+ ) => {
39
+ const { threshold = 0.5 } = options;
40
+
41
+ // Track which cards have already triggered the callback
42
+ const seenCardsRef = useRef<Set<string>>(new Set());
43
+
44
+ // Handle intersection changes
45
+ const handleIntersection = useCallback(
46
+ (entries: IntersectionObserverEntry[]) => {
47
+ entries.forEach((entry) => {
48
+ // Only fire callback if card is intersecting and meets the threshold requirement
49
+ if (entry.isIntersecting && entry.intersectionRatio >= threshold) {
50
+ // Extract card key from the element's data attribute
51
+ const element = entry.target as HTMLElement;
52
+ const cardKey = element.getAttribute('data-card-key');
53
+
54
+ if (cardKey && !seenCardsRef.current.has(cardKey)) {
55
+ seenCardsRef.current.add(cardKey);
56
+ onVisible(cardKey as CardKey);
57
+ }
58
+ }
59
+ });
60
+ },
61
+ [onVisible, threshold]
62
+ );
63
+
64
+ // Create intersection observer with specified threshold
65
+ const { observe } = useIntersectionObserver(handleIntersection, {
66
+ threshold,
67
+ });
68
+
69
+ // Return a function that creates a ref callback for a specific card key
70
+ const getRefCallback = useCallback(
71
+ (cardKey: CardKey) => (element: Element | null) => {
72
+ if (element) {
73
+ // Set the card key as a data attribute
74
+ (element as HTMLElement).setAttribute('data-card-key', String(cardKey));
75
+ observe(element);
76
+ }
77
+ },
78
+ [observe]
79
+ );
80
+
81
+ return getRefCallback;
82
+ };
@@ -0,0 +1,12 @@
1
+ import { CreatedCard } from './cardFactory';
2
+
3
+ export type SharedProps<CardData> = {
4
+ /**
5
+ * The card to render. Must be created by `cardFactory`.
6
+ */
7
+ card: CreatedCard<CardData>;
8
+ /**
9
+ * Force render the skeleton card.
10
+ */
11
+ forceSkeleton?: boolean;
12
+ };
@@ -0,0 +1,62 @@
1
+ import { JSX, ReactNode } from 'react';
2
+
3
+ export type CardComponent<ExtraData> = {
4
+ /**
5
+ * Component that gets rendered. Automatically gets passed all values from the card data.
6
+ */
7
+ Component: (props: { key?: number } & ExtraData) => JSX.Element | null;
8
+ /**
9
+ * The skeleton size of the component.
10
+ *
11
+ * We are assuming the item card is `282px` wide.
12
+ *
13
+ * `inline` means that it will be tracked and spacing will be added accordingly.
14
+ *
15
+ * `absolute` means that it will not be tracked, so you just put a `rect` wherever you like.
16
+ */
17
+ skeletonConfig?:
18
+ | {
19
+ height?: number;
20
+ rx?: number;
21
+ ry?: number;
22
+ type: 'inline';
23
+ width?: number;
24
+ }
25
+ | {
26
+ node: ReactNode;
27
+ type: 'absolute';
28
+ };
29
+ };
30
+
31
+ export type Spacer = {
32
+ spacerPx: number;
33
+ };
34
+
35
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- hammer-parity: the ExtraData generic is irrelevant to this Spacer type guard (only `spacerPx` is checked); `unknown` breaks callers via contravariance on CardComponent's Component param
36
+ export const isSpacer = (component: CardComponent<any> | Spacer): component is Spacer =>
37
+ (component as Spacer).spacerPx > 0;
38
+
39
+ export type CardSpec<ExtraData> = {
40
+ /**
41
+ * The styles for the container of the card.
42
+ */
43
+ className?: string;
44
+ /**
45
+ * The components that make up the card.
46
+ *
47
+ * If you need space between components, do not style the components,
48
+ * instead, add a number to the array, which will be interpreted as
49
+ * margin-bottom to the above component.
50
+ */
51
+ components: (CardComponent<ExtraData> | Spacer)[];
52
+ /**
53
+ * The name of the card.
54
+ *
55
+ * Needed for React for better dev experience.
56
+ */
57
+ name: string;
58
+ /**
59
+ * The height of the skeleton card, if for some reason, the computed one is incorrect.
60
+ */
61
+ overrideSkeletonHeightPx?: number;
62
+ };