@deckai/deck-ui 0.0.23 → 0.0.25

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 (197) hide show
  1. package/dist/components/AboutCard.cjs +5 -5
  2. package/dist/components/AboutCard.cjs.map +1 -1
  3. package/dist/components/AboutCard.js +5 -5
  4. package/dist/components/AboutCard.js.map +1 -1
  5. package/dist/components/Accordion.cjs +1 -1
  6. package/dist/components/Accordion.cjs.map +1 -1
  7. package/dist/components/Accordion.js +1 -1
  8. package/dist/components/Accordion.js.map +1 -1
  9. package/dist/components/AddWorkCard.cjs +5 -5
  10. package/dist/components/AddWorkCard.cjs.map +1 -1
  11. package/dist/components/AddWorkCard.js +5 -5
  12. package/dist/components/AddWorkCard.js.map +1 -1
  13. package/dist/components/AutocompleteInput.cjs +6 -6
  14. package/dist/components/AutocompleteInput.cjs.map +1 -1
  15. package/dist/components/AutocompleteInput.d.cts +1 -1
  16. package/dist/components/AutocompleteInput.d.ts +1 -1
  17. package/dist/components/AutocompleteInput.js +6 -6
  18. package/dist/components/AutocompleteInput.js.map +1 -1
  19. package/dist/components/Avatar.cjs +1 -1
  20. package/dist/components/Avatar.cjs.map +1 -1
  21. package/dist/components/Avatar.js +1 -1
  22. package/dist/components/Avatar.js.map +1 -1
  23. package/dist/components/Badge.cjs +2 -2
  24. package/dist/components/Badge.cjs.map +1 -1
  25. package/dist/components/Badge.d.cts +1 -1
  26. package/dist/components/Badge.d.ts +1 -1
  27. package/dist/components/Badge.js +2 -2
  28. package/dist/components/Badge.js.map +1 -1
  29. package/dist/components/Breadcrumbs.cjs +2 -2
  30. package/dist/components/Breadcrumbs.cjs.map +1 -1
  31. package/dist/components/Breadcrumbs.js +2 -2
  32. package/dist/components/Breadcrumbs.js.map +1 -1
  33. package/dist/components/Button.cjs +6 -6
  34. package/dist/components/Button.cjs.map +1 -1
  35. package/dist/components/Button.d.cts +5 -0
  36. package/dist/components/Button.d.ts +5 -0
  37. package/dist/components/Button.js +6 -6
  38. package/dist/components/Button.js.map +1 -1
  39. package/dist/components/Carousel.cjs +1 -1
  40. package/dist/components/Carousel.cjs.map +1 -1
  41. package/dist/components/Carousel.d.cts +3 -1
  42. package/dist/components/Carousel.d.ts +3 -1
  43. package/dist/components/Carousel.js +1 -1
  44. package/dist/components/Carousel.js.map +1 -1
  45. package/dist/components/Collapsible.cjs +5 -5
  46. package/dist/components/Collapsible.cjs.map +1 -1
  47. package/dist/components/Collapsible.js +5 -5
  48. package/dist/components/Collapsible.js.map +1 -1
  49. package/dist/components/Combobox.cjs +3 -3
  50. package/dist/components/Combobox.cjs.map +1 -1
  51. package/dist/components/Combobox.d.cts +2 -1
  52. package/dist/components/Combobox.d.ts +2 -1
  53. package/dist/components/Combobox.js +3 -3
  54. package/dist/components/Combobox.js.map +1 -1
  55. package/dist/components/ContactItem.cjs +2 -2
  56. package/dist/components/ContactItem.cjs.map +1 -1
  57. package/dist/components/ContactItem.js +2 -2
  58. package/dist/components/ContactItem.js.map +1 -1
  59. package/dist/components/CreatorCard.cjs +8 -0
  60. package/dist/components/CreatorCard.cjs.map +1 -0
  61. package/dist/components/CreatorCard.d.cts +33 -0
  62. package/dist/components/CreatorCard.d.ts +33 -0
  63. package/dist/components/CreatorCard.js +8 -0
  64. package/dist/components/CreatorCard.js.map +1 -0
  65. package/dist/components/Dropdown.cjs +2 -2
  66. package/dist/components/Dropdown.cjs.map +1 -1
  67. package/dist/components/Dropdown.js +2 -2
  68. package/dist/components/Dropdown.js.map +1 -1
  69. package/dist/components/EditButton.cjs +4 -4
  70. package/dist/components/EditButton.cjs.map +1 -1
  71. package/dist/components/EditButton.js +4 -4
  72. package/dist/components/EditButton.js.map +1 -1
  73. package/dist/components/Hero.cjs +8 -0
  74. package/dist/components/Hero.cjs.map +1 -0
  75. package/dist/components/Hero.d.cts +19 -0
  76. package/dist/components/Hero.d.ts +19 -0
  77. package/dist/components/Hero.js +8 -0
  78. package/dist/components/Hero.js.map +1 -0
  79. package/dist/components/Icon.cjs +1 -1
  80. package/dist/components/Icon.cjs.map +1 -1
  81. package/dist/components/Icon.d.cts +1 -1
  82. package/dist/components/Icon.d.ts +1 -1
  83. package/dist/components/Icon.js +1 -1
  84. package/dist/components/Icon.js.map +1 -1
  85. package/dist/components/IconRenderer.cjs +1 -1
  86. package/dist/components/IconRenderer.cjs.map +1 -1
  87. package/dist/components/IconRenderer.js +1 -1
  88. package/dist/components/IconRenderer.js.map +1 -1
  89. package/dist/components/Input.cjs +2 -2
  90. package/dist/components/Input.cjs.map +1 -1
  91. package/dist/components/Input.d.cts +2 -2
  92. package/dist/components/Input.d.ts +2 -2
  93. package/dist/components/Input.js +2 -2
  94. package/dist/components/Input.js.map +1 -1
  95. package/dist/components/Link.cjs +1 -1
  96. package/dist/components/Link.cjs.map +1 -1
  97. package/dist/components/Link.d.cts +1 -1
  98. package/dist/components/Link.d.ts +1 -1
  99. package/dist/components/Link.js +1 -1
  100. package/dist/components/Link.js.map +1 -1
  101. package/dist/components/Modal.cjs +1 -1
  102. package/dist/components/Modal.cjs.map +1 -1
  103. package/dist/components/Modal.js +1 -1
  104. package/dist/components/Modal.js.map +1 -1
  105. package/dist/components/MultiSelectCombobox.cjs +2 -2
  106. package/dist/components/MultiSelectCombobox.cjs.map +1 -1
  107. package/dist/components/MultiSelectCombobox.js +2 -2
  108. package/dist/components/MultiSelectCombobox.js.map +1 -1
  109. package/dist/components/Navbar.cjs +14 -6
  110. package/dist/components/Navbar.cjs.map +1 -1
  111. package/dist/components/Navbar.d.cts +4 -2
  112. package/dist/components/Navbar.d.ts +4 -2
  113. package/dist/components/Navbar.js +14 -6
  114. package/dist/components/Navbar.js.map +1 -1
  115. package/dist/components/NavbarItem.cjs +3 -3
  116. package/dist/components/NavbarItem.cjs.map +1 -1
  117. package/dist/components/NavbarItem.d.cts +1 -1
  118. package/dist/components/NavbarItem.d.ts +1 -1
  119. package/dist/components/NavbarItem.js +3 -3
  120. package/dist/components/NavbarItem.js.map +1 -1
  121. package/dist/components/Option.cjs +3 -3
  122. package/dist/components/Option.cjs.map +1 -1
  123. package/dist/components/Option.js +3 -3
  124. package/dist/components/Option.js.map +1 -1
  125. package/dist/components/ProfileCard.cjs +2 -2
  126. package/dist/components/ProfileCard.cjs.map +1 -1
  127. package/dist/components/ProfileCard.js +2 -2
  128. package/dist/components/ProfileCard.js.map +1 -1
  129. package/dist/components/ProgressBar.cjs.map +1 -1
  130. package/dist/components/ProgressBar.js.map +1 -1
  131. package/dist/components/RadioGroup.cjs +2 -2
  132. package/dist/components/RadioGroup.cjs.map +1 -1
  133. package/dist/components/RadioGroup.js +2 -2
  134. package/dist/components/RadioGroup.js.map +1 -1
  135. package/dist/components/SegmentedTabs.cjs +6 -6
  136. package/dist/components/SegmentedTabs.cjs.map +1 -1
  137. package/dist/components/SegmentedTabs.js +6 -6
  138. package/dist/components/SegmentedTabs.js.map +1 -1
  139. package/dist/components/Sidebar.cjs +1 -1
  140. package/dist/components/Sidebar.cjs.map +1 -1
  141. package/dist/components/Sidebar.js +1 -1
  142. package/dist/components/Sidebar.js.map +1 -1
  143. package/dist/components/SlideButton.cjs.map +1 -1
  144. package/dist/components/SlideButton.js.map +1 -1
  145. package/dist/components/SocialCard.cjs +4 -4
  146. package/dist/components/SocialCard.cjs.map +1 -1
  147. package/dist/components/SocialCard.js +4 -4
  148. package/dist/components/SocialCard.js.map +1 -1
  149. package/dist/components/Tabs.cjs +5 -5
  150. package/dist/components/Tabs.cjs.map +1 -1
  151. package/dist/components/Tabs.js +5 -5
  152. package/dist/components/Tabs.js.map +1 -1
  153. package/dist/components/Tag.cjs +4 -4
  154. package/dist/components/Tag.cjs.map +1 -1
  155. package/dist/components/Tag.js +4 -4
  156. package/dist/components/Tag.js.map +1 -1
  157. package/dist/components/Text.cjs +3 -3
  158. package/dist/components/Text.cjs.map +1 -1
  159. package/dist/components/Text.d.cts +3 -3
  160. package/dist/components/Text.d.ts +3 -3
  161. package/dist/components/Text.js +3 -3
  162. package/dist/components/Text.js.map +1 -1
  163. package/dist/components/TextArea.cjs +2 -2
  164. package/dist/components/TextArea.cjs.map +1 -1
  165. package/dist/components/TextArea.js +2 -2
  166. package/dist/components/TextArea.js.map +1 -1
  167. package/dist/components/Toast.cjs +5 -5
  168. package/dist/components/Toast.cjs.map +1 -1
  169. package/dist/components/Toast.d.cts +4 -1
  170. package/dist/components/Toast.d.ts +4 -1
  171. package/dist/components/Toast.js +5 -5
  172. package/dist/components/Toast.js.map +1 -1
  173. package/dist/components/Tooltip.cjs +3 -3
  174. package/dist/components/Tooltip.cjs.map +1 -1
  175. package/dist/components/Tooltip.js +3 -3
  176. package/dist/components/Tooltip.js.map +1 -1
  177. package/dist/components/VideoPlayer.cjs +2 -2
  178. package/dist/components/VideoPlayer.cjs.map +1 -1
  179. package/dist/components/VideoPlayer.js +2 -2
  180. package/dist/components/VideoPlayer.js.map +1 -1
  181. package/dist/components/WorkCard.cjs +4 -4
  182. package/dist/components/WorkCard.cjs.map +1 -1
  183. package/dist/components/WorkCard.js +4 -4
  184. package/dist/components/WorkCard.js.map +1 -1
  185. package/dist/index.cjs +6 -6
  186. package/dist/index.cjs.map +1 -1
  187. package/dist/index.d.cts +2 -1
  188. package/dist/index.d.ts +2 -1
  189. package/dist/index.js +6 -6
  190. package/dist/index.js.map +1 -1
  191. package/dist/styles/styles.css +1 -1
  192. package/dist/styles/styles.css.map +1 -1
  193. package/dist/tailwind-D0Cc0jDS.d.cts +38 -0
  194. package/dist/tailwind-D0Cc0jDS.d.ts +38 -0
  195. package/dist/tailwind-DIVT5G0q.d.cts +38 -0
  196. package/dist/tailwind-DIVT5G0q.d.ts +38 -0
  197. package/package.json +6 -8
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/hooks/useMediaQuery.ts","../../src/components/Carousel.tsx"],"names":["cn","inputs","twMerge","clsx","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","size","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","COLOR_MAP","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","responsiveSizeClasses","responsiveSizeStyles","focusRingStyles","Pressable","children","type","disabled","useIsomorphicLayoutEffect","useEffect","useMediaQuery","query","matches","setMatches","useState","getMatches","useCallback","mediaQuery","handleChange","Carousel","gap","scrollContainerRef","useRef","showLeftPaddle","setShowLeftPaddle","showRightPaddle","setShowRightPaddle","isHoveringStart","setIsHoveringStart","isHoveringEnd","setIsHoveringEnd","touchStart","setTouchStart","touchEnd","setTouchEnd","isMobile","checkScrollPosition","container","scrollLeft","scrollWidth","clientWidth","handleMouseMove","rect","mouseX","HOVER_THRESHOLD","handleTouchStart","handleTouchMove","handleTouchEnd","distance","itemWidth","direction","targetScroll","handleWheel","isHorizontalScroll","scrollAmount","observer","scroll","handleKeyDown","C","child"],"mappings":"+nBAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,sBAAQC,SAAKF,CAAAA,CAAM,CAAC,CAC7B,CCaA,IAAMG,CAAsC,CAAA,CAC1C,GAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,mBACR,CAAA,CAEMC,EAAgE,CACpE,EAAA,CAAI,CACF,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yB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AU,gFACV,YAAW,CAAA,aAAA,CAAA,CAEXjE,kBAAA,CAAA,aAAA,CAAC,OAAI,SAAU,CAAA,qFAAA,CAAA,CACbA,kBAAA,CAAA,aAAA,CAACD,EAAA,CAAK,IAAA,CAAK,YAAa,CAAA,IAAA,CAAM,GAAI,KAAM,CAAA,OAAA,CAAQ,CAClD,CACF,CAGDmC,CAAAA,CAAAA,EAAmBI,CAClBtC,EAAAA,kBAAAA,CAAA,cAACa,CAAA,CAAA,CACC,OAAS,CAAA,IAAMoD,EAAO,OAAO,CAAA,CAC7B,SAAU,CAAA,gFAAA,CACV,aAAW,cAEXjE,CAAAA,CAAAA,kBAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,qFACbA,CAAAA,CAAAA,kBAAAA,CAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,aAAA,CAAc,IAAM,CAAA,EAAA,CAAI,MAAM,OAAQ,CAAA,CACnD,CACF,CAEJ,CAEJ,CAEJ","file":"Carousel.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","export type Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type ResponsiveSize = number | `${Breakpoint}:${number}`;\n\ntype SizeKey =\n | \"12\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"36\"\n | \"40\"\n | \"42\"\n | \"48\"\n | \"64\"\n | \"72\";\n\n// These constants help Tailwind identify the classes during compilation\nconst BASE_SIZES: Record<SizeKey, string> = {\n \"12\": \"h-[12px] w-[12px]\",\n \"16\": \"h-[16px] w-[16px]\",\n \"18\": \"h-[18px] w-[18px]\",\n \"20\": \"h-[20px] w-[20px]\",\n \"24\": \"h-[24px] w-[24px]\",\n \"32\": \"h-[32px] w-[32px]\",\n \"36\": \"h-[36px] w-[36px]\",\n \"40\": \"h-[40px] w-[40px]\",\n \"42\": \"h-[42px] w-[42px]\",\n \"48\": \"h-[48px] w-[48px]\",\n \"64\": \"h-[64px] w-[64px]\",\n \"72\": \"h-[72px] w-[72px]\"\n};\n\nconst RESPONSIVE_SIZES: Record<Breakpoint, Record<SizeKey, string>> = {\n sm: {\n \"12\": \"sm:h-[12px] sm:w-[12px]\",\n \"16\": \"sm:h-[16px] sm:w-[16px]\",\n \"18\": \"sm:h-[18px] sm:w-[18px]\",\n \"20\": \"sm:h-[20px] sm:w-[20px]\",\n \"24\": \"sm:h-[24px] sm:w-[24px]\",\n \"32\": \"sm:h-[32px] sm:w-[32px]\",\n \"36\": \"sm:h-[36px] sm:w-[36px]\",\n \"40\": \"sm:h-[40px] sm:w-[40px]\",\n \"42\": \"sm:h-[42px] sm:w-[42px]\",\n \"48\": \"sm:h-[48px] sm:w-[48px]\",\n \"64\": \"sm:h-[64px] sm:w-[64px]\",\n \"72\": \"sm:h-[72px] sm:w-[72px]\"\n },\n md: {\n \"12\": \"md:h-[12px] md:w-[12px]\",\n \"16\": \"md:h-[16px] md:w-[16px]\",\n \"18\": \"md:h-[18px] md:w-[18px]\",\n \"20\": \"md:h-[20px] md:w-[20px]\",\n \"24\": \"md:h-[24px] md:w-[24px]\",\n \"32\": \"md:h-[32px] md:w-[32px]\",\n \"36\": \"md:h-[36px] md:w-[36px]\",\n \"40\": \"md:h-[40px] md:w-[40px]\",\n \"42\": \"md:h-[42px] md:w-[42px]\",\n \"48\": \"md:h-[48px] md:w-[48px]\",\n \"64\": \"md:h-[64px] md:w-[64px]\",\n \"72\": \"md:h-[72px] md:w-[72px]\"\n },\n lg: {\n \"12\": \"lg:h-[12px] lg:w-[12px]\",\n \"16\": \"lg:h-[16px] lg:w-[16px]\",\n \"18\": \"lg:h-[18px] lg:w-[18px]\",\n \"20\": \"lg:h-[20px] lg:w-[20px]\",\n \"24\": \"lg:h-[24px] lg:w-[24px]\",\n \"32\": \"lg:h-[32px] lg:w-[32px]\",\n \"36\": \"lg:h-[36px] lg:w-[36px]\",\n \"40\": \"lg:h-[40px] lg:w-[40px]\",\n \"42\": \"lg:h-[42px] lg:w-[42px]\",\n \"48\": \"lg:h-[48px] lg:w-[48px]\",\n \"64\": \"lg:h-[64px] lg:w-[64px]\",\n \"72\": \"lg:h-[72px] lg:w-[72px]\"\n },\n xl: {\n \"12\": \"xl:h-[12px] xl:w-[12px]\",\n \"16\": \"xl:h-[16px] xl:w-[16px]\",\n \"18\": \"xl:h-[18px] xl:w-[18px]\",\n \"20\": \"xl:h-[20px] xl:w-[20px]\",\n \"24\": \"xl:h-[24px] xl:w-[24px]\",\n \"32\": \"xl:h-[32px] xl:w-[32px]\",\n \"36\": \"xl:h-[36px] xl:w-[36px]\",\n \"40\": \"xl:h-[40px] xl:w-[40px]\",\n \"42\": \"xl:h-[42px] xl:w-[42px]\",\n \"48\": \"xl:h-[48px] xl:w-[48px]\",\n \"64\": \"xl:h-[64px] xl:w-[64px]\",\n \"72\": \"xl:h-[72px] xl:w-[72px]\"\n },\n \"2xl\": {\n \"12\": \"2xl:h-[12px] 2xl:w-[12px]\",\n \"16\": \"2xl:h-[16px] 2xl:w-[16px]\",\n \"18\": \"2xl:h-[18px] 2xl:w-[18px]\",\n \"20\": \"2xl:h-[20px] 2xl:w-[20px]\",\n \"24\": \"2xl:h-[24px] 2xl:w-[24px]\",\n \"32\": \"2xl:h-[32px] 2xl:w-[32px]\",\n \"36\": \"2xl:h-[36px] 2xl:w-[36px]\",\n \"40\": \"2xl:h-[40px] 2xl:w-[40px]\",\n \"42\": \"2xl:h-[42px] 2xl:w-[42px]\",\n \"48\": \"2xl:h-[48px] 2xl:w-[48px]\",\n \"64\": \"2xl:h-[64px] 2xl:w-[64px]\",\n \"72\": \"2xl:h-[72px] 2xl:w-[72px]\"\n }\n};\n\nconst getSizeKey = (size: number): SizeKey | undefined => {\n return String(size) as SizeKey;\n};\n\nexport const getResponsiveSize = (\n size: ResponsiveSize | ResponsiveSize[] | undefined,\n baseSize: number = 24\n): {\n responsiveSizeClasses: string;\n responsiveSizeStyles: Record<string, string>;\n} => {\n const classes: string[] = [];\n const styles: Record<string, string> = {};\n\n // If no size provided, use baseSize\n if (size === undefined) {\n const key = getSizeKey(baseSize);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${baseSize}px`;\n styles.width = `${baseSize}px`;\n }\n }\n\n // If size is a number, use that directly\n if (typeof size === \"number\") {\n const key = getSizeKey(size);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${size}px`;\n styles.width = `${size}px`;\n }\n }\n\n // If array of responsive sizes, generate responsive classes\n if (Array.isArray(size)) {\n const baseKey = getSizeKey(baseSize);\n const responsiveClasses = [\n (baseKey && BASE_SIZES[baseKey]) || `h-[${baseSize}px] w-[${baseSize}px]`\n ];\n\n size.forEach((s) => {\n if (typeof s === \"string\") {\n const [breakpoint, valueStr] = s.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const key = getSizeKey(value);\n classes.push(\n (key && RESPONSIVE_SIZES[breakpoint]?.[key]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n });\n\n classes.push(...responsiveClasses);\n }\n\n if (typeof size === \"string\") {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const valueKey = getSizeKey(value);\n classes.push(\n (valueKey && RESPONSIVE_SIZES[breakpoint]?.[valueKey]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n\n return {\n responsiveSizeClasses: classes.join(\" \"),\n responsiveSizeStyles: styles\n };\n};\n","import type { IconName } from \"@deckai/icons\";\nimport { IconMap } from \"@deckai/icons\";\nimport type { SVGProps } from \"react\";\nimport React from \"react\";\n\nimport type { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\n// Using CSS variables to support dark mode\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"var(--color-primary)\",\n secondary: \"var(--color-secondary)\",\n white: \"var(--color-white)\",\n primaryBlue: \"var(--color-primary-100)\",\n disabled: \"var(--color-disabled)\",\n danger: \"var(--color-danger)\"\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 24\n );\n\n return (\n <div\n className={cn(\n \"flex justify-center items-center\",\n responsiveSizeClasses,\n className\n )}\n style={{\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...responsiveSizeStyles,\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import type { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const sizes = [\"24\", \"42\", \"48\", \"64\", \"72\"]; // Add all the sizes you need\n\n const safelist: (string | { pattern: RegExp; variants: string[] })[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n // Generate size classes with responsive variants\n const sizeClasses = sizes.flatMap((size) => [\n `h-[${size}px]`,\n `w-[${size}px]`,\n ...breakpoints.flatMap((bp) => [\n `${bp}:h-[${size}px]`,\n `${bp}:w-[${size}px]`\n ])\n ]);\n\n return [...typographyClasses, ...responsiveTypographyClasses, ...sizeClasses];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\";\nexport const focusRingWithinStyles =\n \"focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-100\";\nexport const focusRingStylesCoerced = \"ring-2 ring-primary-100\";\n","import type { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import { useCallback, useEffect, useState } from \"react\";\n\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useEffect : () => {};\n\nexport const useMediaQuery = (query: string): boolean => {\n // Initialize with null to prevent hydration mismatch\n const [matches, setMatches] = useState<boolean | null>(null);\n\n const getMatches = useCallback((query: string): boolean => {\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n }, []);\n\n // Update matches after mount to prevent hydration mismatch\n useIsomorphicLayoutEffect(() => {\n setMatches(getMatches(query));\n }, [query, getMatches]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n const mediaQuery = window.matchMedia(query);\n\n const handleChange = () => {\n setMatches(getMatches(query));\n };\n\n mediaQuery.addEventListener(\"change\", handleChange);\n\n return () => {\n mediaQuery.removeEventListener(\"change\", handleChange);\n };\n }\n }, [query, getMatches]);\n\n // Return false during SSR, actual value after hydration\n return matches ?? false;\n};\n","import * as ScrollArea from \"@radix-ui/react-scroll-area\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\nimport { useMediaQuery } from \"../hooks/useMediaQuery\";\n\nexport type CarouselProps = {\n children: React.ReactNode;\n /** Optional className for the root element */\n className?: string;\n /** Optional gap between items in pixels */\n gap?: number;\n};\n\nexport function Carousel({\n children,\n className = \"\",\n gap = 20\n}: CarouselProps) {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const [showLeftPaddle, setShowLeftPaddle] = useState(false);\n const [showRightPaddle, setShowRightPaddle] = useState(false);\n const [isHoveringStart, setIsHoveringStart] = useState(false);\n const [isHoveringEnd, setIsHoveringEnd] = useState(false);\n const [touchStart, setTouchStart] = useState<number | null>(null);\n const [touchEnd, setTouchEnd] = useState<number | null>(null);\n const isMobile = useMediaQuery(\"(max-width: 768px)\");\n\n const checkScrollPosition = useCallback(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const { scrollLeft, scrollWidth, clientWidth } = container;\n setShowLeftPaddle(scrollLeft > 0);\n setShowRightPaddle(Math.ceil(scrollLeft + clientWidth) < scrollWidth);\n }, []);\n\n const handleMouseMove = useCallback(\n (e: React.MouseEvent) => {\n if (isMobile) return;\n\n const container = e.currentTarget;\n const rect = container.getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const HOVER_THRESHOLD = 300;\n\n setIsHoveringStart(mouseX < HOVER_THRESHOLD);\n setIsHoveringEnd(mouseX > rect.width - HOVER_THRESHOLD);\n },\n [isMobile]\n );\n\n // Touch handling\n const handleTouchStart = useCallback((e: React.TouchEvent) => {\n setTouchStart(e.touches[0].clientX);\n setTouchEnd(null);\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent) => {\n setTouchEnd(e.touches[0].clientX);\n }, []);\n\n const handleTouchEnd = useCallback(() => {\n if (!touchStart || !touchEnd) return;\n\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const distance = touchStart - touchEnd;\n const minSwipeDistance = 50;\n\n if (Math.abs(distance) < minSwipeDistance) {\n return;\n }\n\n const itemWidth = container.clientWidth;\n const direction = distance > 0 ? 1 : -1;\n const targetScroll = container.scrollLeft + itemWidth * direction;\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, [touchStart, touchEnd]);\n\n const handleWheel = useCallback((e: WheelEvent) => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n // Check if the scroll is predominantly horizontal or if shift key is pressed\n const isHorizontalScroll = Math.abs(e.deltaX) > Math.abs(e.deltaY);\n if (!isHorizontalScroll && !e.shiftKey) return;\n\n e.preventDefault();\n\n // Determine the scroll amount based on the input type\n const scrollAmount = isHorizontalScroll ? e.deltaX : e.deltaY;\n\n // Apply smooth scrolling\n container.scrollBy({\n left: scrollAmount,\n behavior: \"smooth\"\n });\n }, []);\n\n useEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const observer = new ResizeObserver(checkScrollPosition);\n observer.observe(container);\n\n container.addEventListener(\"scroll\", checkScrollPosition);\n container.addEventListener(\"wheel\", handleWheel, { passive: false });\n\n return () => {\n observer.disconnect();\n container.removeEventListener(\"scroll\", checkScrollPosition);\n container.removeEventListener(\"wheel\", handleWheel);\n };\n }, [checkScrollPosition, handleWheel]);\n\n const scroll = useCallback((direction: \"left\" | \"right\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const scrollAmount = container.clientWidth;\n const targetScroll =\n container.scrollLeft +\n (direction === \"left\" ? -scrollAmount : scrollAmount);\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, []);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") {\n scroll(\"left\");\n } else if (e.key === \"ArrowRight\") {\n scroll(\"right\");\n }\n },\n [scroll]\n );\n\n return (\n <div\n className={`relative group ${className}`}\n onKeyDown={handleKeyDown}\n onMouseMove={handleMouseMove}\n onMouseLeave={() => {\n setIsHoveringStart(false);\n setIsHoveringEnd(false);\n }}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n role=\"region\"\n aria-label=\"Carousel\"\n >\n <ScrollArea.Root className=\"overflow-hidden\" type=\"hover\">\n <ScrollArea.Viewport\n ref={scrollContainerRef}\n className=\"w-full overflow-x-auto snap-x snap-mandatory\"\n style={{\n scrollbarWidth: \"none\",\n msOverflowStyle: \"none\",\n WebkitOverflowScrolling: \"touch\"\n }}\n >\n <div\n className=\"inline-flex\"\n style={{\n gap: `${gap}px`\n }}\n >\n {React.Children.map(children, (child) =>\n child === null ? null : (\n <div className=\"snap-start shrink-0\">{child}</div>\n )\n )}\n </div>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n\n {/* Navigation Paddles - Only show on desktop */}\n {!isMobile && (\n <>\n {showLeftPaddle && isHoveringStart && (\n <Pressable\n onClick={() => scroll(\"left\")}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll left\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-left\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n\n {showRightPaddle && isHoveringEnd && (\n <Pressable\n onClick={() => scroll(\"right\")}\n className=\"absolute right-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll right\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-right\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n </>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/hooks/useMediaQuery.ts","../../src/components/Icon.tsx","../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Carousel.tsx"],"names":["useIsomorphicLayoutEffect","useEffect","useMediaQuery","query","matches","setMatches","useState","getMatches","useCallback","mediaQuery","handleChange","cn","inputs","twMerge","clsx","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","size","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","COLOR_MAP","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","responsiveSizeClasses","responsiveSizeStyles","focusRingStyles","Pressable","children","type","disabled","Carousel","gap","minHeight","scrollContainerRef","useRef","showLeftPaddle","setShowLeftPaddle","showRightPaddle","setShowRightPaddle","isHoveringStart","setIsHoveringStart","isHoveringEnd","setIsHoveringEnd","touchStart","setTouchStart","touchEnd","setTouchEnd","isMobile","checkScrollPosition","container","scrollLeft","scrollWidth","clientWidth","handleMouseMove","rect","mouseX","HOVER_THRESHOLD","handleTouchStart","handleTouchMove","handleTouchEnd","distance","itemWidth","direction","targetScroll","handleWheel","isHorizontalScroll","scrollAmount","observer","scroll","handleKeyDown","C","child"],"mappings":"+nBAEA,IAAMA,CACJ,CAAA,OAAO,OAAW,GAAcC,CAAAA,WAAAA,CAAY,IAAM,GAEvCC,CAAiBC,CAAAA,CAAAA,EAA2B,CAEvD,GAAM,CAACC,CAASC,CAAAA,CAAU,CAAIC,CAAAA,UAAAA,CAAyB,IAAI,CAAA,CAErDC,CAAaC,CAAAA,aAAAA,CAAaL,GAC1B,OAAO,MAAA,CAAW,GACb,CAAA,MAAA,CAAO,WAAWA,CAAK,CAAA,CAAE,OAE3B,CAAA,KAAA,CACN,EAAE,CAAA,CAGL,OAAAH,CAAAA,CAA0B,IAAM,CAC9BK,CAAAA,CAAWE,CAAWJ,CAAAA,CAAK,CAAC,EAC9B,CAAA,CAAG,CAACA,CAAAA,CAAOI,CAAU,CAAC,CAAA,CAEtBN,WAAU,CAAA,IAAM,CACd,GAAI,OAAO,MAAW,CAAA,GAAA,CAAa,CACjC,IAAMQ,CAAa,CAAA,MAAA,CAAO,WAAWN,CAAK,CAAA,CAEpCO,CAAe,CAAA,IAAM,CACzBL,CAAWE,CAAAA,CAAAA,CAAWJ,CAAK,CAAC,EAC9B,CAEA,CAAA,OAAAM,CAAW,CAAA,gBAAA,CAAiB,SAAUC,CAAY,CAAA,CAE3C,IAAM,CACXD,EAAW,mBAAoB,CAAA,QAAA,CAAUC,CAAY,EACvD,CACF,CACF,CAAA,CAAG,CAACP,CAAAA,CAAOI,CAAU,CAAC,CAAA,CAGfH,CAAW,EAAA,KACpB,CCtCA,CCEO,SAASO,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAKF,CAAAA,CAAM,CAAC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OAAQ,CAAA,CAClD,CACF,CAGDyB,CAAAA,CAAAA,EAAmBI,CAClB5B,EAAAA,kBAAAA,CAAA,cAACa,CAAA,CAAA,CACC,OAAS,CAAA,IAAM0C,EAAO,OAAO,CAAA,CAC7B,SAAU,CAAA,gFAAA,CACV,aAAW,cAEXvD,CAAAA,CAAAA,kBAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,qFACbA,CAAAA,CAAAA,kBAAAA,CAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,aAAA,CAAc,IAAM,CAAA,EAAA,CAAI,MAAM,OAAQ,CAAA,CACnD,CACF,CAEJ,CAEJ,CAEJ","file":"Carousel.cjs","sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\n\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useEffect : () => {};\n\nexport const useMediaQuery = (query: string): boolean => {\n // Initialize with null to prevent hydration mismatch\n const [matches, setMatches] = useState<boolean | null>(null);\n\n const getMatches = useCallback((query: string): boolean => {\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n }, []);\n\n // Update matches after mount to prevent hydration mismatch\n useIsomorphicLayoutEffect(() => {\n setMatches(getMatches(query));\n }, [query, getMatches]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n const mediaQuery = window.matchMedia(query);\n\n const handleChange = () => {\n setMatches(getMatches(query));\n };\n\n mediaQuery.addEventListener(\"change\", handleChange);\n\n return () => {\n mediaQuery.removeEventListener(\"change\", handleChange);\n };\n }\n }, [query, getMatches]);\n\n // Return false during SSR, actual value after hydration\n return matches ?? false;\n};\n","import type { IconName } from \"@deckai/icons\";\nimport { IconMap } from \"@deckai/icons\";\nimport type { SVGProps } from \"react\";\nimport React from \"react\";\n\nimport type { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\n// Using CSS variables to support dark mode\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"var(--color-primary)\",\n secondary: \"var(--color-secondary)\",\n white: \"var(--color-white)\",\n primaryBlue: \"var(--color-primary-100)\",\n disabled: \"var(--color-disabled)\",\n danger: \"var(--color-danger)\",\n tertiary: \"var(--color-tertiary-20)\"\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 24\n );\n\n return (\n <div\n className={cn(\n \"flex justify-center items-center\",\n responsiveSizeClasses,\n className\n )}\n style={{\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...responsiveSizeStyles,\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","export type Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type ResponsiveSize = number | `${Breakpoint}:${number}`;\n\ntype SizeKey =\n | \"12\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"36\"\n | \"40\"\n | \"42\"\n | \"48\"\n | \"64\"\n | \"72\"\n | \"80\";\n\n// These constants help Tailwind identify the classes during compilation\nconst BASE_SIZES: Record<SizeKey, string> = {\n \"12\": \"h-[12px] w-[12px]\",\n \"16\": \"h-[16px] w-[16px]\",\n \"18\": \"h-[18px] w-[18px]\",\n \"20\": \"h-[20px] w-[20px]\",\n \"24\": \"h-[24px] w-[24px]\",\n \"32\": \"h-[32px] w-[32px]\",\n \"36\": \"h-[36px] w-[36px]\",\n \"40\": \"h-[40px] w-[40px]\",\n \"42\": \"h-[42px] w-[42px]\",\n \"48\": \"h-[48px] w-[48px]\",\n \"64\": \"h-[64px] w-[64px]\",\n \"72\": \"h-[72px] w-[72px]\",\n \"80\": \"h-[80px] w-[80px]\"\n};\n\nconst RESPONSIVE_SIZES: Record<Breakpoint, Record<SizeKey, string>> = {\n sm: {\n \"12\": \"sm:h-[12px] sm:w-[12px]\",\n \"16\": \"sm:h-[16px] sm:w-[16px]\",\n \"18\": \"sm:h-[18px] sm:w-[18px]\",\n \"20\": \"sm:h-[20px] sm:w-[20px]\",\n \"24\": \"sm:h-[24px] sm:w-[24px]\",\n \"32\": \"sm:h-[32px] sm:w-[32px]\",\n \"36\": \"sm:h-[36px] sm:w-[36px]\",\n \"40\": \"sm:h-[40px] sm:w-[40px]\",\n \"42\": \"sm:h-[42px] sm:w-[42px]\",\n \"48\": \"sm:h-[48px] sm:w-[48px]\",\n \"64\": \"sm:h-[64px] sm:w-[64px]\",\n \"72\": \"sm:h-[72px] sm:w-[72px]\",\n \"80\": \"sm:h-[80px] sm:w-[80px]\"\n },\n md: {\n \"12\": \"md:h-[12px] md:w-[12px]\",\n \"16\": \"md:h-[16px] md:w-[16px]\",\n \"18\": \"md:h-[18px] md:w-[18px]\",\n \"20\": \"md:h-[20px] md:w-[20px]\",\n \"24\": \"md:h-[24px] md:w-[24px]\",\n \"32\": \"md:h-[32px] md:w-[32px]\",\n \"36\": \"md:h-[36px] md:w-[36px]\",\n \"40\": \"md:h-[40px] md:w-[40px]\",\n \"42\": \"md:h-[42px] md:w-[42px]\",\n \"48\": \"md:h-[48px] md:w-[48px]\",\n \"64\": \"md:h-[64px] md:w-[64px]\",\n \"72\": \"md:h-[72px] md:w-[72px]\",\n \"80\": \"md:h-[80px] md:w-[80px]\"\n },\n lg: {\n \"12\": \"lg:h-[12px] lg:w-[12px]\",\n \"16\": \"lg:h-[16px] lg:w-[16px]\",\n \"18\": \"lg:h-[18px] lg:w-[18px]\",\n \"20\": \"lg:h-[20px] lg:w-[20px]\",\n \"24\": \"lg:h-[24px] lg:w-[24px]\",\n \"32\": \"lg:h-[32px] lg:w-[32px]\",\n \"36\": \"lg:h-[36px] lg:w-[36px]\",\n \"40\": \"lg:h-[40px] lg:w-[40px]\",\n \"42\": \"lg:h-[42px] lg:w-[42px]\",\n \"48\": \"lg:h-[48px] lg:w-[48px]\",\n \"64\": \"lg:h-[64px] lg:w-[64px]\",\n \"72\": \"lg:h-[72px] lg:w-[72px]\",\n \"80\": \"lg:h-[80px] lg:w-[80px]\"\n },\n xl: {\n \"12\": \"xl:h-[12px] xl:w-[12px]\",\n \"16\": \"xl:h-[16px] xl:w-[16px]\",\n \"18\": \"xl:h-[18px] xl:w-[18px]\",\n \"20\": \"xl:h-[20px] xl:w-[20px]\",\n \"24\": \"xl:h-[24px] xl:w-[24px]\",\n \"32\": \"xl:h-[32px] xl:w-[32px]\",\n \"36\": \"xl:h-[36px] xl:w-[36px]\",\n \"40\": \"xl:h-[40px] xl:w-[40px]\",\n \"42\": \"xl:h-[42px] xl:w-[42px]\",\n \"48\": \"xl:h-[48px] xl:w-[48px]\",\n \"64\": \"xl:h-[64px] xl:w-[64px]\",\n \"72\": \"xl:h-[72px] xl:w-[72px]\",\n \"80\": \"xl:h-[80px] xl:w-[80px]\"\n },\n \"2xl\": {\n \"12\": \"2xl:h-[12px] 2xl:w-[12px]\",\n \"16\": \"2xl:h-[16px] 2xl:w-[16px]\",\n \"18\": \"2xl:h-[18px] 2xl:w-[18px]\",\n \"20\": \"2xl:h-[20px] 2xl:w-[20px]\",\n \"24\": \"2xl:h-[24px] 2xl:w-[24px]\",\n \"32\": \"2xl:h-[32px] 2xl:w-[32px]\",\n \"36\": \"2xl:h-[36px] 2xl:w-[36px]\",\n \"40\": \"2xl:h-[40px] 2xl:w-[40px]\",\n \"42\": \"2xl:h-[42px] 2xl:w-[42px]\",\n \"48\": \"2xl:h-[48px] 2xl:w-[48px]\",\n \"64\": \"2xl:h-[64px] 2xl:w-[64px]\",\n \"72\": \"2xl:h-[72px] 2xl:w-[72px]\",\n \"80\": \"2xl:h-[80px] 2xl:w-[80px]\"\n }\n};\n\nconst getSizeKey = (size: number): SizeKey | undefined => {\n return String(size) as SizeKey;\n};\n\nexport const getResponsiveSize = (\n size: ResponsiveSize | ResponsiveSize[] | undefined,\n baseSize: number = 24\n): {\n responsiveSizeClasses: string;\n responsiveSizeStyles: Record<string, string>;\n} => {\n const classes: string[] = [];\n const styles: Record<string, string> = {};\n\n // If no size provided, use baseSize\n if (size === undefined) {\n const key = getSizeKey(baseSize);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${baseSize}px`;\n styles.width = `${baseSize}px`;\n }\n }\n\n // If size is a number, use that directly\n if (typeof size === \"number\") {\n const key = getSizeKey(size);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${size}px`;\n styles.width = `${size}px`;\n }\n }\n\n // If array of responsive sizes, generate responsive classes\n if (Array.isArray(size)) {\n const baseKey = getSizeKey(baseSize);\n const responsiveClasses = [\n (baseKey && BASE_SIZES[baseKey]) || `h-[${baseSize}px] w-[${baseSize}px]`\n ];\n\n size.forEach((s) => {\n if (typeof s === \"string\") {\n const [breakpoint, valueStr] = s.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const key = getSizeKey(value);\n classes.push(\n (key && RESPONSIVE_SIZES[breakpoint]?.[key]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n });\n\n classes.push(...responsiveClasses);\n }\n\n if (typeof size === \"string\") {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const valueKey = getSizeKey(value);\n classes.push(\n (valueKey && RESPONSIVE_SIZES[breakpoint]?.[valueKey]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n\n return {\n responsiveSizeClasses: classes.join(\" \"),\n responsiveSizeStyles: styles\n };\n};\n","import type { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import type { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const sizes = [\"24\", \"42\", \"48\", \"64\", \"72\"]; // Add all the sizes you need\n\n const safelist: (string | { pattern: RegExp; variants: string[] })[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n // Generate size classes with responsive variants\n const sizeClasses = sizes.flatMap((size) => [\n `h-[${size}px]`,\n `w-[${size}px]`,\n ...breakpoints.flatMap((bp) => [\n `${bp}:h-[${size}px]`,\n `${bp}:w-[${size}px]`\n ])\n ]);\n\n return [...typographyClasses, ...responsiveTypographyClasses, ...sizeClasses];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\";\nexport const focusRingWithinStyles =\n \"focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-100\";\nexport const focusRingStylesCoerced = \"ring-2 ring-primary-100\";\n","import * as ScrollArea from \"@radix-ui/react-scroll-area\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useMediaQuery } from \"../hooks/useMediaQuery\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type CarouselProps = {\n children: React.ReactNode;\n /** Optional className for the root element */\n className?: string;\n /** Optional gap between items in pixels */\n gap?: number;\n /** Optional minimum height for the carousel */\n minHeight?: string;\n};\n\nexport function Carousel({\n children,\n className = \"\",\n gap = 20,\n minHeight\n}: CarouselProps) {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const [showLeftPaddle, setShowLeftPaddle] = useState(false);\n const [showRightPaddle, setShowRightPaddle] = useState(false);\n const [isHoveringStart, setIsHoveringStart] = useState(false);\n const [isHoveringEnd, setIsHoveringEnd] = useState(false);\n const [touchStart, setTouchStart] = useState<number | null>(null);\n const [touchEnd, setTouchEnd] = useState<number | null>(null);\n const isMobile = useMediaQuery(\"(max-width: 768px)\");\n\n const checkScrollPosition = useCallback(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const { scrollLeft, scrollWidth, clientWidth } = container;\n setShowLeftPaddle(scrollLeft > 0);\n setShowRightPaddle(Math.ceil(scrollLeft + clientWidth) < scrollWidth);\n }, []);\n\n const handleMouseMove = useCallback(\n (e: React.MouseEvent) => {\n if (isMobile) return;\n\n const container = e.currentTarget;\n const rect = container.getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const HOVER_THRESHOLD = 300;\n\n setIsHoveringStart(mouseX < HOVER_THRESHOLD);\n setIsHoveringEnd(mouseX > rect.width - HOVER_THRESHOLD);\n },\n [isMobile]\n );\n\n // Touch handling\n const handleTouchStart = useCallback((e: React.TouchEvent) => {\n setTouchStart(e.touches[0].clientX);\n setTouchEnd(null);\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent) => {\n setTouchEnd(e.touches[0].clientX);\n }, []);\n\n const handleTouchEnd = useCallback(() => {\n if (!touchStart || !touchEnd) return;\n\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const distance = touchStart - touchEnd;\n const minSwipeDistance = 50;\n\n if (Math.abs(distance) < minSwipeDistance) {\n return;\n }\n\n const itemWidth = container.clientWidth;\n const direction = distance > 0 ? 1 : -1;\n const targetScroll = container.scrollLeft + itemWidth * direction;\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, [touchStart, touchEnd]);\n\n const handleWheel = useCallback((e: WheelEvent) => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n // Check if the scroll is predominantly horizontal or if shift key is pressed\n const isHorizontalScroll = Math.abs(e.deltaX) > Math.abs(e.deltaY);\n if (!isHorizontalScroll && !e.shiftKey) return;\n\n e.preventDefault();\n\n // Determine the scroll amount based on the input type\n const scrollAmount = isHorizontalScroll ? e.deltaX : e.deltaY;\n\n // Apply smooth scrolling\n container.scrollBy({\n left: scrollAmount,\n behavior: \"smooth\"\n });\n }, []);\n\n useEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const observer = new ResizeObserver(checkScrollPosition);\n observer.observe(container);\n\n container.addEventListener(\"scroll\", checkScrollPosition);\n container.addEventListener(\"wheel\", handleWheel, { passive: false });\n\n return () => {\n observer.disconnect();\n container.removeEventListener(\"scroll\", checkScrollPosition);\n container.removeEventListener(\"wheel\", handleWheel);\n };\n }, [checkScrollPosition, handleWheel]);\n\n const scroll = useCallback((direction: \"left\" | \"right\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const scrollAmount = container.clientWidth;\n const targetScroll =\n container.scrollLeft +\n (direction === \"left\" ? -scrollAmount : scrollAmount);\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, []);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") {\n scroll(\"left\");\n } else if (e.key === \"ArrowRight\") {\n scroll(\"right\");\n }\n },\n [scroll]\n );\n\n return (\n <div\n className={`relative group w-full max-w-full overflow-x-hidden ${className}`}\n onKeyDown={handleKeyDown}\n onMouseMove={handleMouseMove}\n onMouseLeave={() => {\n setIsHoveringStart(false);\n setIsHoveringEnd(false);\n }}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n role=\"region\"\n aria-label=\"Carousel\"\n >\n <ScrollArea.Root\n className=\"overflow-x-hidden w-full max-w-full\"\n type=\"hover\"\n >\n <ScrollArea.Viewport\n ref={scrollContainerRef}\n className=\"w-full max-w-full overflow-x-auto snap-x snap-mandatory\"\n style={{\n scrollbarWidth: \"none\",\n msOverflowStyle: \"none\",\n WebkitOverflowScrolling: \"touch\",\n minHeight\n }}\n >\n <div\n className=\"inline-flex w-max\"\n style={{\n gap: `${gap}px`\n }}\n >\n {React.Children.map(children, (child) =>\n child === null ? null : (\n <div className=\"snap-start shrink-0\">{child}</div>\n )\n )}\n </div>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n\n {/* Navigation Paddles - Only show on desktop */}\n {!isMobile && (\n <>\n {showLeftPaddle && isHoveringStart && (\n <Pressable\n onClick={() => scroll(\"left\")}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll left\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-left\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n\n {showRightPaddle && isHoveringEnd && (\n <Pressable\n onClick={() => scroll(\"right\")}\n className=\"absolute right-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll right\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-right\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n </>\n )}\n </div>\n );\n}\n"]}
@@ -6,7 +6,9 @@ type CarouselProps = {
6
6
  className?: string;
7
7
  /** Optional gap between items in pixels */
8
8
  gap?: number;
9
+ /** Optional minimum height for the carousel */
10
+ minHeight?: string;
9
11
  };
10
- declare function Carousel({ children, className, gap }: CarouselProps): React__default.JSX.Element;
12
+ declare function Carousel({ children, className, gap, minHeight }: CarouselProps): React__default.JSX.Element;
11
13
 
12
14
  export { Carousel, type CarouselProps };
@@ -6,7 +6,9 @@ type CarouselProps = {
6
6
  className?: string;
7
7
  /** Optional gap between items in pixels */
8
8
  gap?: number;
9
+ /** Optional minimum height for the carousel */
10
+ minHeight?: string;
9
11
  };
10
- declare function Carousel({ children, className, gap }: CarouselProps): React__default.JSX.Element;
12
+ declare function Carousel({ children, className, gap, minHeight }: CarouselProps): React__default.JSX.Element;
11
13
 
12
14
  export { Carousel, type CarouselProps };
@@ -1,2 +1,2 @@
1
- import*as C from'@radix-ui/react-scroll-area';import p,{useRef,useState,useCallback,useEffect}from'react';import {IconMap}from'@deckai/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';function b(...t){return twMerge(clsx(t))}var T={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]"},N={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]"}},v=t=>String(t),O=(t,l=24)=>{let n=[],o={};if(t===void 0){let s=v(l);s?n.push(T[s]):(o.height=`${l}px`,o.width=`${l}px`);}if(typeof t=="number"){let s=v(t);s?n.push(T[s]):(o.height=`${t}px`,o.width=`${t}px`);}if(Array.isArray(t)){let s=v(l),i=[s&&T[s]||`h-[${l}px] w-[${l}px]`];t.forEach(c=>{if(typeof c=="string"){let[x,w]=c.split(":"),m=parseInt(w,10),u=v(m);n.push(u&&N[x]?.[u]||`${x}:h-[${m}px] ${x}:w-[${m}px]`);}}),n.push(...i);}if(typeof t=="string"){let[s,i]=t.split(":"),c=parseInt(i,10),x=v(c);n.push(x&&N[s]?.[x]||`${s}:h-[${c}px] ${s}:w-[${c}px]`);}return {responsiveSizeClasses:n.join(" "),responsiveSizeStyles:o}};var B={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)"},$=p.forwardRef(({name:t,size:l=24,color:n="primary",title:o,className:s,style:i={},...c},x)=>{let w=IconMap[t],{responsiveSizeClasses:m,responsiveSizeStyles:u}=O(l,24);return p.createElement("div",{className:b("flex justify-center items-center",m,s),style:{"--icon-stroke":B[n],...u,...i}},p.createElement(w,{ref:x,"aria-hidden":!o,"aria-label":o,stroke:t.includes("filled")?void 0:B[n],...c}))});$.displayName="Icon";var H="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var E=p.forwardRef(({children:t,type:l="button",className:n,disabled:o,...s},i)=>p.createElement("button",{ref:i,type:l,disabled:o,className:b("appearance-none hover:opacity-80 transition-all active:scale-95",H,o&&"opacity-50 cursor-not-allowed",n),...s},t));E.displayName="Pressable";var q=typeof window<"u"?useEffect:()=>{},V=t=>{let[l,n]=useState(null),o=useCallback(s=>typeof window<"u"?window.matchMedia(s).matches:false,[]);return q(()=>{n(o(t));},[t,o]),useEffect(()=>{if(typeof window<"u"){let s=window.matchMedia(t),i=()=>{n(o(t));};return s.addEventListener("change",i),()=>{s.removeEventListener("change",i);}}},[t,o]),l??false};function be({children:t,className:l="",gap:n=20}){let o=useRef(null),[s,i]=useState(false),[c,x]=useState(false),[w,m]=useState(false),[u,I]=useState(false),[M,j]=useState(null),[k,A]=useState(null),R=V("(max-width: 768px)"),y=useCallback(()=>{let e=o.current;if(!e)return;let{scrollLeft:r,scrollWidth:a,clientWidth:h}=e;i(r>0),x(Math.ceil(r+h)<a);},[]),W=useCallback(e=>{if(R)return;let a=e.currentTarget.getBoundingClientRect(),h=e.clientX-a.left,S=300;m(h<S),I(h>a.width-S);},[R]),D=useCallback(e=>{j(e.touches[0].clientX),A(null);},[]),G=useCallback(e=>{A(e.touches[0].clientX);},[]),X=useCallback(()=>{if(!M||!k)return;let e=o.current;if(!e)return;let r=M-k;if(Math.abs(r)<50)return;let h=e.clientWidth,S=r>0?1:-1,Q=e.scrollLeft+h*S;e.scrollTo({left:Q,behavior:"smooth"});},[M,k]),P=useCallback(e=>{let r=o.current;if(!r)return;let a=Math.abs(e.deltaX)>Math.abs(e.deltaY);if(!a&&!e.shiftKey)return;e.preventDefault();let h=a?e.deltaX:e.deltaY;r.scrollBy({left:h,behavior:"smooth"});},[]);useEffect(()=>{let e=o.current;if(!e)return;let r=new ResizeObserver(y);return r.observe(e),e.addEventListener("scroll",y),e.addEventListener("wheel",P,{passive:false}),()=>{r.disconnect(),e.removeEventListener("scroll",y),e.removeEventListener("wheel",P);}},[y,P]);let g=useCallback(e=>{let r=o.current;if(!r)return;let a=r.clientWidth,h=r.scrollLeft+(e==="left"?-a:a);r.scrollTo({left:h,behavior:"smooth"});},[]),_=useCallback(e=>{e.key==="ArrowLeft"?g("left"):e.key==="ArrowRight"&&g("right");},[g]);return p.createElement("div",{className:`relative group ${l}`,onKeyDown:_,onMouseMove:W,onMouseLeave:()=>{m(false),I(false);},onTouchStart:D,onTouchMove:G,onTouchEnd:X,role:"region","aria-label":"Carousel"},p.createElement(C.Root,{className:"overflow-hidden",type:"hover"},p.createElement(C.Viewport,{ref:o,className:"w-full overflow-x-auto snap-x snap-mandatory",style:{scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch"}},p.createElement("div",{className:"inline-flex",style:{gap:`${n}px`}},p.Children.map(t,e=>e===null?null:p.createElement("div",{className:"snap-start shrink-0"},e))))),!R&&p.createElement(p.Fragment,null,s&&w&&p.createElement(E,{onClick:()=>g("left"),className:"absolute left-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200","aria-label":"Scroll left"},p.createElement("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm"},p.createElement($,{name:"arrow-left",size:24,color:"white"}))),c&&u&&p.createElement(E,{onClick:()=>g("right"),className:"absolute right-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200","aria-label":"Scroll right"},p.createElement("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm"},p.createElement($,{name:"arrow-right",size:24,color:"white"})))))}export{be as Carousel};//# sourceMappingURL=Carousel.js.map
1
+ import*as C from'@radix-ui/react-scroll-area';import p,{useRef,useState,useCallback,useEffect}from'react';import {IconMap}from'@deckai/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';var J=typeof window<"u"?useEffect:()=>{},O=o=>{let[l,n]=useState(null),s=useCallback(t=>typeof window<"u"?window.matchMedia(t).matches:false,[]);return J(()=>{n(s(o));},[o,s]),useEffect(()=>{if(typeof window<"u"){let t=window.matchMedia(o),i=()=>{n(s(o));};return t.addEventListener("change",i),()=>{t.removeEventListener("change",i);}}},[o,s]),l??false};function b(...o){return twMerge(clsx(o))}var T={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},H={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]",80:"sm:h-[80px] sm:w-[80px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]",80:"md:h-[80px] md:w-[80px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]",80:"lg:h-[80px] lg:w-[80px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]",80:"xl:h-[80px] xl:w-[80px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},v=o=>String(o),B=(o,l=24)=>{let n=[],s={};if(o===void 0){let t=v(l);t?n.push(T[t]):(s.height=`${l}px`,s.width=`${l}px`);}if(typeof o=="number"){let t=v(o);t?n.push(T[t]):(s.height=`${o}px`,s.width=`${o}px`);}if(Array.isArray(o)){let t=v(l),i=[t&&T[t]||`h-[${l}px] w-[${l}px]`];o.forEach(x=>{if(typeof x=="string"){let[c,w]=x.split(":"),d=parseInt(w,10),u=v(d);n.push(u&&H[c]?.[u]||`${c}:h-[${d}px] ${c}:w-[${d}px]`);}}),n.push(...i);}if(typeof o=="string"){let[t,i]=o.split(":"),x=parseInt(i,10),c=v(x);n.push(c&&H[t]?.[c]||`${t}:h-[${x}px] ${t}:w-[${x}px]`);}return {responsiveSizeClasses:n.join(" "),responsiveSizeStyles:s}};var z={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)",tertiary:"var(--color-tertiary-20)"},$=p.forwardRef(({name:o,size:l=24,color:n="primary",title:s,className:t,style:i={},...x},c)=>{let w=IconMap[o],{responsiveSizeClasses:d,responsiveSizeStyles:u}=B(l,24);return p.createElement("div",{className:b("flex justify-center items-center",d,t),style:{"--icon-stroke":z[n],...u,...i}},p.createElement(w,{ref:c,"aria-hidden":!s,"aria-label":s,stroke:o.includes("filled")?void 0:z[n],...x}))});$.displayName="Icon";var K="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var E=p.forwardRef(({children:o,type:l="button",className:n,disabled:s,...t},i)=>p.createElement("button",{ref:i,type:l,disabled:s,className:b("appearance-none hover:opacity-80 transition-all active:scale-95",K,s&&"opacity-50 cursor-not-allowed",n),...t},o));E.displayName="Pressable";function $e({children:o,className:l="",gap:n=20,minHeight:s}){let t=useRef(null),[i,x]=useState(false),[c,w]=useState(false),[d,u]=useState(false),[j,I]=useState(false),[M,W]=useState(null),[k,A]=useState(null),R=O("(max-width: 768px)"),y=useCallback(()=>{let e=t.current;if(!e)return;let{scrollLeft:r,scrollWidth:a,clientWidth:h}=e;x(r>0),w(Math.ceil(r+h)<a);},[]),D=useCallback(e=>{if(R)return;let a=e.currentTarget.getBoundingClientRect(),h=e.clientX-a.left,S=300;u(h<S),I(h>a.width-S);},[R]),G=useCallback(e=>{W(e.touches[0].clientX),A(null);},[]),X=useCallback(e=>{A(e.touches[0].clientX);},[]),_=useCallback(()=>{if(!M||!k)return;let e=t.current;if(!e)return;let r=M-k;if(Math.abs(r)<50)return;let h=e.clientWidth,S=r>0?1:-1,Y=e.scrollLeft+h*S;e.scrollTo({left:Y,behavior:"smooth"});},[M,k]),P=useCallback(e=>{let r=t.current;if(!r)return;let a=Math.abs(e.deltaX)>Math.abs(e.deltaY);if(!a&&!e.shiftKey)return;e.preventDefault();let h=a?e.deltaX:e.deltaY;r.scrollBy({left:h,behavior:"smooth"});},[]);useEffect(()=>{let e=t.current;if(!e)return;let r=new ResizeObserver(y);return r.observe(e),e.addEventListener("scroll",y),e.addEventListener("wheel",P,{passive:false}),()=>{r.disconnect(),e.removeEventListener("scroll",y),e.removeEventListener("wheel",P);}},[y,P]);let g=useCallback(e=>{let r=t.current;if(!r)return;let a=r.clientWidth,h=r.scrollLeft+(e==="left"?-a:a);r.scrollTo({left:h,behavior:"smooth"});},[]),Q=useCallback(e=>{e.key==="ArrowLeft"?g("left"):e.key==="ArrowRight"&&g("right");},[g]);return p.createElement("div",{className:`relative group w-full max-w-full overflow-x-hidden ${l}`,onKeyDown:Q,onMouseMove:D,onMouseLeave:()=>{u(false),I(false);},onTouchStart:G,onTouchMove:X,onTouchEnd:_,role:"region","aria-label":"Carousel"},p.createElement(C.Root,{className:"overflow-x-hidden w-full max-w-full",type:"hover"},p.createElement(C.Viewport,{ref:t,className:"w-full max-w-full overflow-x-auto snap-x snap-mandatory",style:{scrollbarWidth:"none",msOverflowStyle:"none",WebkitOverflowScrolling:"touch",minHeight:s}},p.createElement("div",{className:"inline-flex w-max",style:{gap:`${n}px`}},p.Children.map(o,e=>e===null?null:p.createElement("div",{className:"snap-start shrink-0"},e))))),!R&&p.createElement(p.Fragment,null,i&&d&&p.createElement(E,{onClick:()=>g("left"),className:"absolute left-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200","aria-label":"Scroll left"},p.createElement("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm"},p.createElement($,{name:"arrow-left",size:24,color:"white"}))),c&&j&&p.createElement(E,{onClick:()=>g("right"),className:"absolute right-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200","aria-label":"Scroll right"},p.createElement("div",{className:"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm"},p.createElement($,{name:"arrow-right",size:24,color:"white"})))))}export{$e as Carousel};//# sourceMappingURL=Carousel.js.map
2
2
  //# sourceMappingURL=Carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/hooks/useMediaQuery.ts","../../src/components/Carousel.tsx"],"names":["cn","inputs","twMerge","clsx","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","size","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","COLOR_MAP","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","responsiveSizeClasses","responsiveSizeStyles","focusRingStyles","Pressable","children","type","disabled","useIsomorphicLayoutEffect","useEffect","useMediaQuery","query","matches","setMatches","useState","getMatches","useCallback","mediaQuery","handleChange","Carousel","gap","scrollContainerRef","useRef","showLeftPaddle","setShowLeftPaddle","showRightPaddle","setShowRightPaddle","isHoveringStart","setIsHoveringStart","isHoveringEnd","setIsHoveringEnd","touchStart","setTouchStart","touchEnd","setTouchEnd","isMobile","checkScrollPosition","container","scrollLeft","scrollWidth","clientWidth","handleMouseMove","rect","mouseX","HOVER_THRESHOLD","handleTouchStart","handleTouchMove","handleTouchEnd","distance","itemWidth","direction","targetScroll","handleWheel","isHorizontalScroll","scrollAmount","observer","scroll","handleKeyDown","child"],"mappings":"2MAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,QAAQC,IAAKF,CAAAA,CAAM,CAAC,CAC7B,CCaA,IAAMG,CAAsC,CAAA,CAC1C,GAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,mBACR,CAAA,CAEMC,EAAgE,CACpE,EAAA,CAAI,CACF,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,yBACR,CAAA,CACA,EAAI,CAAA,CACF,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,EAAA,CAAM,yBACN,CAAA,EAAA,CAAM,0BACN,EAAM,CAAA,yBAAA,CACN,EAAM,CAAA,yBAAA,CACN,GAAM,yBACN,CAAA,E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CAAA,cAACa,CAAA,CAAA,CACC,OAAS,CAAA,IAAMoD,EAAO,OAAO,CAAA,CAC7B,SAAU,CAAA,gFAAA,CACV,aAAW,cAEXjE,CAAAA,CAAAA,CAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,qFACbA,CAAAA,CAAAA,CAAAA,CAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,aAAA,CAAc,IAAM,CAAA,EAAA,CAAI,MAAM,OAAQ,CAAA,CACnD,CACF,CAEJ,CAEJ,CAEJ","file":"Carousel.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","export type Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type ResponsiveSize = number | `${Breakpoint}:${number}`;\n\ntype SizeKey =\n | \"12\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"36\"\n | \"40\"\n | \"42\"\n | \"48\"\n | \"64\"\n | \"72\";\n\n// These constants help Tailwind identify the classes during compilation\nconst BASE_SIZES: Record<SizeKey, string> = {\n \"12\": \"h-[12px] w-[12px]\",\n \"16\": \"h-[16px] w-[16px]\",\n \"18\": \"h-[18px] w-[18px]\",\n \"20\": \"h-[20px] w-[20px]\",\n \"24\": \"h-[24px] w-[24px]\",\n \"32\": \"h-[32px] w-[32px]\",\n \"36\": \"h-[36px] w-[36px]\",\n \"40\": \"h-[40px] w-[40px]\",\n \"42\": \"h-[42px] w-[42px]\",\n \"48\": \"h-[48px] w-[48px]\",\n \"64\": \"h-[64px] w-[64px]\",\n \"72\": \"h-[72px] w-[72px]\"\n};\n\nconst RESPONSIVE_SIZES: Record<Breakpoint, Record<SizeKey, string>> = {\n sm: {\n \"12\": \"sm:h-[12px] sm:w-[12px]\",\n \"16\": \"sm:h-[16px] sm:w-[16px]\",\n \"18\": \"sm:h-[18px] sm:w-[18px]\",\n \"20\": \"sm:h-[20px] sm:w-[20px]\",\n \"24\": \"sm:h-[24px] sm:w-[24px]\",\n \"32\": \"sm:h-[32px] sm:w-[32px]\",\n \"36\": \"sm:h-[36px] sm:w-[36px]\",\n \"40\": \"sm:h-[40px] sm:w-[40px]\",\n \"42\": \"sm:h-[42px] sm:w-[42px]\",\n \"48\": \"sm:h-[48px] sm:w-[48px]\",\n \"64\": \"sm:h-[64px] sm:w-[64px]\",\n \"72\": \"sm:h-[72px] sm:w-[72px]\"\n },\n md: {\n \"12\": \"md:h-[12px] md:w-[12px]\",\n \"16\": \"md:h-[16px] md:w-[16px]\",\n \"18\": \"md:h-[18px] md:w-[18px]\",\n \"20\": \"md:h-[20px] md:w-[20px]\",\n \"24\": \"md:h-[24px] md:w-[24px]\",\n \"32\": \"md:h-[32px] md:w-[32px]\",\n \"36\": \"md:h-[36px] md:w-[36px]\",\n \"40\": \"md:h-[40px] md:w-[40px]\",\n \"42\": \"md:h-[42px] md:w-[42px]\",\n \"48\": \"md:h-[48px] md:w-[48px]\",\n \"64\": \"md:h-[64px] md:w-[64px]\",\n \"72\": \"md:h-[72px] md:w-[72px]\"\n },\n lg: {\n \"12\": \"lg:h-[12px] lg:w-[12px]\",\n \"16\": \"lg:h-[16px] lg:w-[16px]\",\n \"18\": \"lg:h-[18px] lg:w-[18px]\",\n \"20\": \"lg:h-[20px] lg:w-[20px]\",\n \"24\": \"lg:h-[24px] lg:w-[24px]\",\n \"32\": \"lg:h-[32px] lg:w-[32px]\",\n \"36\": \"lg:h-[36px] lg:w-[36px]\",\n \"40\": \"lg:h-[40px] lg:w-[40px]\",\n \"42\": \"lg:h-[42px] lg:w-[42px]\",\n \"48\": \"lg:h-[48px] lg:w-[48px]\",\n \"64\": \"lg:h-[64px] lg:w-[64px]\",\n \"72\": \"lg:h-[72px] lg:w-[72px]\"\n },\n xl: {\n \"12\": \"xl:h-[12px] xl:w-[12px]\",\n \"16\": \"xl:h-[16px] xl:w-[16px]\",\n \"18\": \"xl:h-[18px] xl:w-[18px]\",\n \"20\": \"xl:h-[20px] xl:w-[20px]\",\n \"24\": \"xl:h-[24px] xl:w-[24px]\",\n \"32\": \"xl:h-[32px] xl:w-[32px]\",\n \"36\": \"xl:h-[36px] xl:w-[36px]\",\n \"40\": \"xl:h-[40px] xl:w-[40px]\",\n \"42\": \"xl:h-[42px] xl:w-[42px]\",\n \"48\": \"xl:h-[48px] xl:w-[48px]\",\n \"64\": \"xl:h-[64px] xl:w-[64px]\",\n \"72\": \"xl:h-[72px] xl:w-[72px]\"\n },\n \"2xl\": {\n \"12\": \"2xl:h-[12px] 2xl:w-[12px]\",\n \"16\": \"2xl:h-[16px] 2xl:w-[16px]\",\n \"18\": \"2xl:h-[18px] 2xl:w-[18px]\",\n \"20\": \"2xl:h-[20px] 2xl:w-[20px]\",\n \"24\": \"2xl:h-[24px] 2xl:w-[24px]\",\n \"32\": \"2xl:h-[32px] 2xl:w-[32px]\",\n \"36\": \"2xl:h-[36px] 2xl:w-[36px]\",\n \"40\": \"2xl:h-[40px] 2xl:w-[40px]\",\n \"42\": \"2xl:h-[42px] 2xl:w-[42px]\",\n \"48\": \"2xl:h-[48px] 2xl:w-[48px]\",\n \"64\": \"2xl:h-[64px] 2xl:w-[64px]\",\n \"72\": \"2xl:h-[72px] 2xl:w-[72px]\"\n }\n};\n\nconst getSizeKey = (size: number): SizeKey | undefined => {\n return String(size) as SizeKey;\n};\n\nexport const getResponsiveSize = (\n size: ResponsiveSize | ResponsiveSize[] | undefined,\n baseSize: number = 24\n): {\n responsiveSizeClasses: string;\n responsiveSizeStyles: Record<string, string>;\n} => {\n const classes: string[] = [];\n const styles: Record<string, string> = {};\n\n // If no size provided, use baseSize\n if (size === undefined) {\n const key = getSizeKey(baseSize);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${baseSize}px`;\n styles.width = `${baseSize}px`;\n }\n }\n\n // If size is a number, use that directly\n if (typeof size === \"number\") {\n const key = getSizeKey(size);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${size}px`;\n styles.width = `${size}px`;\n }\n }\n\n // If array of responsive sizes, generate responsive classes\n if (Array.isArray(size)) {\n const baseKey = getSizeKey(baseSize);\n const responsiveClasses = [\n (baseKey && BASE_SIZES[baseKey]) || `h-[${baseSize}px] w-[${baseSize}px]`\n ];\n\n size.forEach((s) => {\n if (typeof s === \"string\") {\n const [breakpoint, valueStr] = s.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const key = getSizeKey(value);\n classes.push(\n (key && RESPONSIVE_SIZES[breakpoint]?.[key]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n });\n\n classes.push(...responsiveClasses);\n }\n\n if (typeof size === \"string\") {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const valueKey = getSizeKey(value);\n classes.push(\n (valueKey && RESPONSIVE_SIZES[breakpoint]?.[valueKey]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n\n return {\n responsiveSizeClasses: classes.join(\" \"),\n responsiveSizeStyles: styles\n };\n};\n","import type { IconName } from \"@deckai/icons\";\nimport { IconMap } from \"@deckai/icons\";\nimport type { SVGProps } from \"react\";\nimport React from \"react\";\n\nimport type { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\n// Using CSS variables to support dark mode\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"var(--color-primary)\",\n secondary: \"var(--color-secondary)\",\n white: \"var(--color-white)\",\n primaryBlue: \"var(--color-primary-100)\",\n disabled: \"var(--color-disabled)\",\n danger: \"var(--color-danger)\"\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 24\n );\n\n return (\n <div\n className={cn(\n \"flex justify-center items-center\",\n responsiveSizeClasses,\n className\n )}\n style={{\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...responsiveSizeStyles,\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import type { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const sizes = [\"24\", \"42\", \"48\", \"64\", \"72\"]; // Add all the sizes you need\n\n const safelist: (string | { pattern: RegExp; variants: string[] })[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n // Generate size classes with responsive variants\n const sizeClasses = sizes.flatMap((size) => [\n `h-[${size}px]`,\n `w-[${size}px]`,\n ...breakpoints.flatMap((bp) => [\n `${bp}:h-[${size}px]`,\n `${bp}:w-[${size}px]`\n ])\n ]);\n\n return [...typographyClasses, ...responsiveTypographyClasses, ...sizeClasses];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\";\nexport const focusRingWithinStyles =\n \"focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-100\";\nexport const focusRingStylesCoerced = \"ring-2 ring-primary-100\";\n","import type { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import { useCallback, useEffect, useState } from \"react\";\n\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useEffect : () => {};\n\nexport const useMediaQuery = (query: string): boolean => {\n // Initialize with null to prevent hydration mismatch\n const [matches, setMatches] = useState<boolean | null>(null);\n\n const getMatches = useCallback((query: string): boolean => {\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n }, []);\n\n // Update matches after mount to prevent hydration mismatch\n useIsomorphicLayoutEffect(() => {\n setMatches(getMatches(query));\n }, [query, getMatches]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n const mediaQuery = window.matchMedia(query);\n\n const handleChange = () => {\n setMatches(getMatches(query));\n };\n\n mediaQuery.addEventListener(\"change\", handleChange);\n\n return () => {\n mediaQuery.removeEventListener(\"change\", handleChange);\n };\n }\n }, [query, getMatches]);\n\n // Return false during SSR, actual value after hydration\n return matches ?? false;\n};\n","import * as ScrollArea from \"@radix-ui/react-scroll-area\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\nimport { useMediaQuery } from \"../hooks/useMediaQuery\";\n\nexport type CarouselProps = {\n children: React.ReactNode;\n /** Optional className for the root element */\n className?: string;\n /** Optional gap between items in pixels */\n gap?: number;\n};\n\nexport function Carousel({\n children,\n className = \"\",\n gap = 20\n}: CarouselProps) {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const [showLeftPaddle, setShowLeftPaddle] = useState(false);\n const [showRightPaddle, setShowRightPaddle] = useState(false);\n const [isHoveringStart, setIsHoveringStart] = useState(false);\n const [isHoveringEnd, setIsHoveringEnd] = useState(false);\n const [touchStart, setTouchStart] = useState<number | null>(null);\n const [touchEnd, setTouchEnd] = useState<number | null>(null);\n const isMobile = useMediaQuery(\"(max-width: 768px)\");\n\n const checkScrollPosition = useCallback(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const { scrollLeft, scrollWidth, clientWidth } = container;\n setShowLeftPaddle(scrollLeft > 0);\n setShowRightPaddle(Math.ceil(scrollLeft + clientWidth) < scrollWidth);\n }, []);\n\n const handleMouseMove = useCallback(\n (e: React.MouseEvent) => {\n if (isMobile) return;\n\n const container = e.currentTarget;\n const rect = container.getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const HOVER_THRESHOLD = 300;\n\n setIsHoveringStart(mouseX < HOVER_THRESHOLD);\n setIsHoveringEnd(mouseX > rect.width - HOVER_THRESHOLD);\n },\n [isMobile]\n );\n\n // Touch handling\n const handleTouchStart = useCallback((e: React.TouchEvent) => {\n setTouchStart(e.touches[0].clientX);\n setTouchEnd(null);\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent) => {\n setTouchEnd(e.touches[0].clientX);\n }, []);\n\n const handleTouchEnd = useCallback(() => {\n if (!touchStart || !touchEnd) return;\n\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const distance = touchStart - touchEnd;\n const minSwipeDistance = 50;\n\n if (Math.abs(distance) < minSwipeDistance) {\n return;\n }\n\n const itemWidth = container.clientWidth;\n const direction = distance > 0 ? 1 : -1;\n const targetScroll = container.scrollLeft + itemWidth * direction;\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, [touchStart, touchEnd]);\n\n const handleWheel = useCallback((e: WheelEvent) => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n // Check if the scroll is predominantly horizontal or if shift key is pressed\n const isHorizontalScroll = Math.abs(e.deltaX) > Math.abs(e.deltaY);\n if (!isHorizontalScroll && !e.shiftKey) return;\n\n e.preventDefault();\n\n // Determine the scroll amount based on the input type\n const scrollAmount = isHorizontalScroll ? e.deltaX : e.deltaY;\n\n // Apply smooth scrolling\n container.scrollBy({\n left: scrollAmount,\n behavior: \"smooth\"\n });\n }, []);\n\n useEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const observer = new ResizeObserver(checkScrollPosition);\n observer.observe(container);\n\n container.addEventListener(\"scroll\", checkScrollPosition);\n container.addEventListener(\"wheel\", handleWheel, { passive: false });\n\n return () => {\n observer.disconnect();\n container.removeEventListener(\"scroll\", checkScrollPosition);\n container.removeEventListener(\"wheel\", handleWheel);\n };\n }, [checkScrollPosition, handleWheel]);\n\n const scroll = useCallback((direction: \"left\" | \"right\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const scrollAmount = container.clientWidth;\n const targetScroll =\n container.scrollLeft +\n (direction === \"left\" ? -scrollAmount : scrollAmount);\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, []);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") {\n scroll(\"left\");\n } else if (e.key === \"ArrowRight\") {\n scroll(\"right\");\n }\n },\n [scroll]\n );\n\n return (\n <div\n className={`relative group ${className}`}\n onKeyDown={handleKeyDown}\n onMouseMove={handleMouseMove}\n onMouseLeave={() => {\n setIsHoveringStart(false);\n setIsHoveringEnd(false);\n }}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n role=\"region\"\n aria-label=\"Carousel\"\n >\n <ScrollArea.Root className=\"overflow-hidden\" type=\"hover\">\n <ScrollArea.Viewport\n ref={scrollContainerRef}\n className=\"w-full overflow-x-auto snap-x snap-mandatory\"\n style={{\n scrollbarWidth: \"none\",\n msOverflowStyle: \"none\",\n WebkitOverflowScrolling: \"touch\"\n }}\n >\n <div\n className=\"inline-flex\"\n style={{\n gap: `${gap}px`\n }}\n >\n {React.Children.map(children, (child) =>\n child === null ? null : (\n <div className=\"snap-start shrink-0\">{child}</div>\n )\n )}\n </div>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n\n {/* Navigation Paddles - Only show on desktop */}\n {!isMobile && (\n <>\n {showLeftPaddle && isHoveringStart && (\n <Pressable\n onClick={() => scroll(\"left\")}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll left\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-left\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n\n {showRightPaddle && isHoveringEnd && (\n <Pressable\n onClick={() => scroll(\"right\")}\n className=\"absolute right-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll right\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-right\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n </>\n )}\n </div>\n );\n}\n"]}
1
+ {"version":3,"sources":["../../src/hooks/useMediaQuery.ts","../../src/components/Icon.tsx","../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Carousel.tsx"],"names":["useIsomorphicLayoutEffect","useEffect","useMediaQuery","query","matches","setMatches","useState","getMatches","useCallback","mediaQuery","handleChange","cn","inputs","twMerge","clsx","BASE_SIZES","RESPONSIVE_SIZES","getSizeKey","size","getResponsiveSize","baseSize","classes","styles","key","baseKey","responsiveClasses","s","breakpoint","valueStr","value","valueKey","COLOR_MAP","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","responsiveSizeClasses","responsiveSizeStyles","focusRingStyles","Pressable","children","type","disabled","Carousel","gap","minHeight","scrollContainerRef","useRef","showLeftPaddle","setShowLeftPaddle","showRightPaddle","setShowRightPaddle","isHoveringStart","setIsHoveringStart","isHoveringEnd","setIsHoveringEnd","touchStart","setTouchStart","touchEnd","setTouchEnd","isMobile","checkScrollPosition","container","scrollLeft","scrollWidth","clientWidth","handleMouseMove","rect","mouseX","HOVER_THRESHOLD","handleTouchStart","handleTouchMove","handleTouchEnd","distance","itemWidth","direction","targetScroll","handleWheel","isHorizontalScroll","scrollAmount","observer","scroll","handleKeyDown","child"],"mappings":"2MAEA,IAAMA,CACJ,CAAA,OAAO,OAAW,GAAcC,CAAAA,SAAAA,CAA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AA,CAAK,IAAK,CAAA,aAAA,CAAc,IAAM,CAAA,EAAA,CAAI,MAAM,OAAQ,CAAA,CACnD,CACF,CAEJ,CAEJ,CAEJ","file":"Carousel.js","sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\n\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useEffect : () => {};\n\nexport const useMediaQuery = (query: string): boolean => {\n // Initialize with null to prevent hydration mismatch\n const [matches, setMatches] = useState<boolean | null>(null);\n\n const getMatches = useCallback((query: string): boolean => {\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n }, []);\n\n // Update matches after mount to prevent hydration mismatch\n useIsomorphicLayoutEffect(() => {\n setMatches(getMatches(query));\n }, [query, getMatches]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n const mediaQuery = window.matchMedia(query);\n\n const handleChange = () => {\n setMatches(getMatches(query));\n };\n\n mediaQuery.addEventListener(\"change\", handleChange);\n\n return () => {\n mediaQuery.removeEventListener(\"change\", handleChange);\n };\n }\n }, [query, getMatches]);\n\n // Return false during SSR, actual value after hydration\n return matches ?? false;\n};\n","import type { IconName } from \"@deckai/icons\";\nimport { IconMap } from \"@deckai/icons\";\nimport type { SVGProps } from \"react\";\nimport React from \"react\";\n\nimport type { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport type { ResponsiveSize } from \"../utils/responsive\";\nimport { getResponsiveSize } from \"../utils/responsive\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\n// Using CSS variables to support dark mode\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"var(--color-primary)\",\n secondary: \"var(--color-secondary)\",\n white: \"var(--color-white)\",\n primaryBlue: \"var(--color-primary-100)\",\n disabled: \"var(--color-disabled)\",\n danger: \"var(--color-danger)\",\n tertiary: \"var(--color-tertiary-20)\"\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const { responsiveSizeClasses, responsiveSizeStyles } = getResponsiveSize(\n size,\n 24\n );\n\n return (\n <div\n className={cn(\n \"flex justify-center items-center\",\n responsiveSizeClasses,\n className\n )}\n style={{\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...responsiveSizeStyles,\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","export type Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type ResponsiveSize = number | `${Breakpoint}:${number}`;\n\ntype SizeKey =\n | \"12\"\n | \"16\"\n | \"18\"\n | \"20\"\n | \"24\"\n | \"32\"\n | \"36\"\n | \"40\"\n | \"42\"\n | \"48\"\n | \"64\"\n | \"72\"\n | \"80\";\n\n// These constants help Tailwind identify the classes during compilation\nconst BASE_SIZES: Record<SizeKey, string> = {\n \"12\": \"h-[12px] w-[12px]\",\n \"16\": \"h-[16px] w-[16px]\",\n \"18\": \"h-[18px] w-[18px]\",\n \"20\": \"h-[20px] w-[20px]\",\n \"24\": \"h-[24px] w-[24px]\",\n \"32\": \"h-[32px] w-[32px]\",\n \"36\": \"h-[36px] w-[36px]\",\n \"40\": \"h-[40px] w-[40px]\",\n \"42\": \"h-[42px] w-[42px]\",\n \"48\": \"h-[48px] w-[48px]\",\n \"64\": \"h-[64px] w-[64px]\",\n \"72\": \"h-[72px] w-[72px]\",\n \"80\": \"h-[80px] w-[80px]\"\n};\n\nconst RESPONSIVE_SIZES: Record<Breakpoint, Record<SizeKey, string>> = {\n sm: {\n \"12\": \"sm:h-[12px] sm:w-[12px]\",\n \"16\": \"sm:h-[16px] sm:w-[16px]\",\n \"18\": \"sm:h-[18px] sm:w-[18px]\",\n \"20\": \"sm:h-[20px] sm:w-[20px]\",\n \"24\": \"sm:h-[24px] sm:w-[24px]\",\n \"32\": \"sm:h-[32px] sm:w-[32px]\",\n \"36\": \"sm:h-[36px] sm:w-[36px]\",\n \"40\": \"sm:h-[40px] sm:w-[40px]\",\n \"42\": \"sm:h-[42px] sm:w-[42px]\",\n \"48\": \"sm:h-[48px] sm:w-[48px]\",\n \"64\": \"sm:h-[64px] sm:w-[64px]\",\n \"72\": \"sm:h-[72px] sm:w-[72px]\",\n \"80\": \"sm:h-[80px] sm:w-[80px]\"\n },\n md: {\n \"12\": \"md:h-[12px] md:w-[12px]\",\n \"16\": \"md:h-[16px] md:w-[16px]\",\n \"18\": \"md:h-[18px] md:w-[18px]\",\n \"20\": \"md:h-[20px] md:w-[20px]\",\n \"24\": \"md:h-[24px] md:w-[24px]\",\n \"32\": \"md:h-[32px] md:w-[32px]\",\n \"36\": \"md:h-[36px] md:w-[36px]\",\n \"40\": \"md:h-[40px] md:w-[40px]\",\n \"42\": \"md:h-[42px] md:w-[42px]\",\n \"48\": \"md:h-[48px] md:w-[48px]\",\n \"64\": \"md:h-[64px] md:w-[64px]\",\n \"72\": \"md:h-[72px] md:w-[72px]\",\n \"80\": \"md:h-[80px] md:w-[80px]\"\n },\n lg: {\n \"12\": \"lg:h-[12px] lg:w-[12px]\",\n \"16\": \"lg:h-[16px] lg:w-[16px]\",\n \"18\": \"lg:h-[18px] lg:w-[18px]\",\n \"20\": \"lg:h-[20px] lg:w-[20px]\",\n \"24\": \"lg:h-[24px] lg:w-[24px]\",\n \"32\": \"lg:h-[32px] lg:w-[32px]\",\n \"36\": \"lg:h-[36px] lg:w-[36px]\",\n \"40\": \"lg:h-[40px] lg:w-[40px]\",\n \"42\": \"lg:h-[42px] lg:w-[42px]\",\n \"48\": \"lg:h-[48px] lg:w-[48px]\",\n \"64\": \"lg:h-[64px] lg:w-[64px]\",\n \"72\": \"lg:h-[72px] lg:w-[72px]\",\n \"80\": \"lg:h-[80px] lg:w-[80px]\"\n },\n xl: {\n \"12\": \"xl:h-[12px] xl:w-[12px]\",\n \"16\": \"xl:h-[16px] xl:w-[16px]\",\n \"18\": \"xl:h-[18px] xl:w-[18px]\",\n \"20\": \"xl:h-[20px] xl:w-[20px]\",\n \"24\": \"xl:h-[24px] xl:w-[24px]\",\n \"32\": \"xl:h-[32px] xl:w-[32px]\",\n \"36\": \"xl:h-[36px] xl:w-[36px]\",\n \"40\": \"xl:h-[40px] xl:w-[40px]\",\n \"42\": \"xl:h-[42px] xl:w-[42px]\",\n \"48\": \"xl:h-[48px] xl:w-[48px]\",\n \"64\": \"xl:h-[64px] xl:w-[64px]\",\n \"72\": \"xl:h-[72px] xl:w-[72px]\",\n \"80\": \"xl:h-[80px] xl:w-[80px]\"\n },\n \"2xl\": {\n \"12\": \"2xl:h-[12px] 2xl:w-[12px]\",\n \"16\": \"2xl:h-[16px] 2xl:w-[16px]\",\n \"18\": \"2xl:h-[18px] 2xl:w-[18px]\",\n \"20\": \"2xl:h-[20px] 2xl:w-[20px]\",\n \"24\": \"2xl:h-[24px] 2xl:w-[24px]\",\n \"32\": \"2xl:h-[32px] 2xl:w-[32px]\",\n \"36\": \"2xl:h-[36px] 2xl:w-[36px]\",\n \"40\": \"2xl:h-[40px] 2xl:w-[40px]\",\n \"42\": \"2xl:h-[42px] 2xl:w-[42px]\",\n \"48\": \"2xl:h-[48px] 2xl:w-[48px]\",\n \"64\": \"2xl:h-[64px] 2xl:w-[64px]\",\n \"72\": \"2xl:h-[72px] 2xl:w-[72px]\",\n \"80\": \"2xl:h-[80px] 2xl:w-[80px]\"\n }\n};\n\nconst getSizeKey = (size: number): SizeKey | undefined => {\n return String(size) as SizeKey;\n};\n\nexport const getResponsiveSize = (\n size: ResponsiveSize | ResponsiveSize[] | undefined,\n baseSize: number = 24\n): {\n responsiveSizeClasses: string;\n responsiveSizeStyles: Record<string, string>;\n} => {\n const classes: string[] = [];\n const styles: Record<string, string> = {};\n\n // If no size provided, use baseSize\n if (size === undefined) {\n const key = getSizeKey(baseSize);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${baseSize}px`;\n styles.width = `${baseSize}px`;\n }\n }\n\n // If size is a number, use that directly\n if (typeof size === \"number\") {\n const key = getSizeKey(size);\n if (key) {\n classes.push(BASE_SIZES[key]);\n } else {\n styles.height = `${size}px`;\n styles.width = `${size}px`;\n }\n }\n\n // If array of responsive sizes, generate responsive classes\n if (Array.isArray(size)) {\n const baseKey = getSizeKey(baseSize);\n const responsiveClasses = [\n (baseKey && BASE_SIZES[baseKey]) || `h-[${baseSize}px] w-[${baseSize}px]`\n ];\n\n size.forEach((s) => {\n if (typeof s === \"string\") {\n const [breakpoint, valueStr] = s.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const key = getSizeKey(value);\n classes.push(\n (key && RESPONSIVE_SIZES[breakpoint]?.[key]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n });\n\n classes.push(...responsiveClasses);\n }\n\n if (typeof size === \"string\") {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n const valueKey = getSizeKey(value);\n classes.push(\n (valueKey && RESPONSIVE_SIZES[breakpoint]?.[valueKey]) ||\n `${breakpoint}:h-[${value}px] ${breakpoint}:w-[${value}px]`\n );\n }\n\n return {\n responsiveSizeClasses: classes.join(\" \"),\n responsiveSizeStyles: styles\n };\n};\n","import type { ButtonHTMLAttributes } from \"react\";\nimport React from \"react\";\n\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import type { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const sizes = [\"24\", \"42\", \"48\", \"64\", \"72\"]; // Add all the sizes you need\n\n const safelist: (string | { pattern: RegExp; variants: string[] })[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n // Generate size classes with responsive variants\n const sizeClasses = sizes.flatMap((size) => [\n `h-[${size}px]`,\n `w-[${size}px]`,\n ...breakpoints.flatMap((bp) => [\n `${bp}:h-[${size}px]`,\n `${bp}:w-[${size}px]`\n ])\n ]);\n\n return [...typographyClasses, ...responsiveTypographyClasses, ...sizeClasses];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\";\nexport const focusRingWithinStyles =\n \"focus-within:outline-none focus-within:ring-2 focus-within:ring-primary-100\";\nexport const focusRingStylesCoerced = \"ring-2 ring-primary-100\";\n","import * as ScrollArea from \"@radix-ui/react-scroll-area\";\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { useMediaQuery } from \"../hooks/useMediaQuery\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type CarouselProps = {\n children: React.ReactNode;\n /** Optional className for the root element */\n className?: string;\n /** Optional gap between items in pixels */\n gap?: number;\n /** Optional minimum height for the carousel */\n minHeight?: string;\n};\n\nexport function Carousel({\n children,\n className = \"\",\n gap = 20,\n minHeight\n}: CarouselProps) {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const [showLeftPaddle, setShowLeftPaddle] = useState(false);\n const [showRightPaddle, setShowRightPaddle] = useState(false);\n const [isHoveringStart, setIsHoveringStart] = useState(false);\n const [isHoveringEnd, setIsHoveringEnd] = useState(false);\n const [touchStart, setTouchStart] = useState<number | null>(null);\n const [touchEnd, setTouchEnd] = useState<number | null>(null);\n const isMobile = useMediaQuery(\"(max-width: 768px)\");\n\n const checkScrollPosition = useCallback(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const { scrollLeft, scrollWidth, clientWidth } = container;\n setShowLeftPaddle(scrollLeft > 0);\n setShowRightPaddle(Math.ceil(scrollLeft + clientWidth) < scrollWidth);\n }, []);\n\n const handleMouseMove = useCallback(\n (e: React.MouseEvent) => {\n if (isMobile) return;\n\n const container = e.currentTarget;\n const rect = container.getBoundingClientRect();\n const mouseX = e.clientX - rect.left;\n const HOVER_THRESHOLD = 300;\n\n setIsHoveringStart(mouseX < HOVER_THRESHOLD);\n setIsHoveringEnd(mouseX > rect.width - HOVER_THRESHOLD);\n },\n [isMobile]\n );\n\n // Touch handling\n const handleTouchStart = useCallback((e: React.TouchEvent) => {\n setTouchStart(e.touches[0].clientX);\n setTouchEnd(null);\n }, []);\n\n const handleTouchMove = useCallback((e: React.TouchEvent) => {\n setTouchEnd(e.touches[0].clientX);\n }, []);\n\n const handleTouchEnd = useCallback(() => {\n if (!touchStart || !touchEnd) return;\n\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const distance = touchStart - touchEnd;\n const minSwipeDistance = 50;\n\n if (Math.abs(distance) < minSwipeDistance) {\n return;\n }\n\n const itemWidth = container.clientWidth;\n const direction = distance > 0 ? 1 : -1;\n const targetScroll = container.scrollLeft + itemWidth * direction;\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, [touchStart, touchEnd]);\n\n const handleWheel = useCallback((e: WheelEvent) => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n // Check if the scroll is predominantly horizontal or if shift key is pressed\n const isHorizontalScroll = Math.abs(e.deltaX) > Math.abs(e.deltaY);\n if (!isHorizontalScroll && !e.shiftKey) return;\n\n e.preventDefault();\n\n // Determine the scroll amount based on the input type\n const scrollAmount = isHorizontalScroll ? e.deltaX : e.deltaY;\n\n // Apply smooth scrolling\n container.scrollBy({\n left: scrollAmount,\n behavior: \"smooth\"\n });\n }, []);\n\n useEffect(() => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const observer = new ResizeObserver(checkScrollPosition);\n observer.observe(container);\n\n container.addEventListener(\"scroll\", checkScrollPosition);\n container.addEventListener(\"wheel\", handleWheel, { passive: false });\n\n return () => {\n observer.disconnect();\n container.removeEventListener(\"scroll\", checkScrollPosition);\n container.removeEventListener(\"wheel\", handleWheel);\n };\n }, [checkScrollPosition, handleWheel]);\n\n const scroll = useCallback((direction: \"left\" | \"right\") => {\n const container = scrollContainerRef.current;\n if (!container) return;\n\n const scrollAmount = container.clientWidth;\n const targetScroll =\n container.scrollLeft +\n (direction === \"left\" ? -scrollAmount : scrollAmount);\n\n container.scrollTo({\n left: targetScroll,\n behavior: \"smooth\"\n });\n }, []);\n\n const handleKeyDown = useCallback(\n (e: React.KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") {\n scroll(\"left\");\n } else if (e.key === \"ArrowRight\") {\n scroll(\"right\");\n }\n },\n [scroll]\n );\n\n return (\n <div\n className={`relative group w-full max-w-full overflow-x-hidden ${className}`}\n onKeyDown={handleKeyDown}\n onMouseMove={handleMouseMove}\n onMouseLeave={() => {\n setIsHoveringStart(false);\n setIsHoveringEnd(false);\n }}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n role=\"region\"\n aria-label=\"Carousel\"\n >\n <ScrollArea.Root\n className=\"overflow-x-hidden w-full max-w-full\"\n type=\"hover\"\n >\n <ScrollArea.Viewport\n ref={scrollContainerRef}\n className=\"w-full max-w-full overflow-x-auto snap-x snap-mandatory\"\n style={{\n scrollbarWidth: \"none\",\n msOverflowStyle: \"none\",\n WebkitOverflowScrolling: \"touch\",\n minHeight\n }}\n >\n <div\n className=\"inline-flex w-max\"\n style={{\n gap: `${gap}px`\n }}\n >\n {React.Children.map(children, (child) =>\n child === null ? null : (\n <div className=\"snap-start shrink-0\">{child}</div>\n )\n )}\n </div>\n </ScrollArea.Viewport>\n </ScrollArea.Root>\n\n {/* Navigation Paddles - Only show on desktop */}\n {!isMobile && (\n <>\n {showLeftPaddle && isHoveringStart && (\n <Pressable\n onClick={() => scroll(\"left\")}\n className=\"absolute left-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll left\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-left\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n\n {showRightPaddle && isHoveringEnd && (\n <Pressable\n onClick={() => scroll(\"right\")}\n className=\"absolute right-4 top-1/2 -translate-y-1/2 z-20 transition-opacity duration-200\"\n aria-label=\"Scroll right\"\n >\n <div className=\"flex items-center justify-center w-10 h-10 rounded-full bg-overlay backdrop-blur-sm\">\n <Icon name=\"arrow-right\" size={24} color=\"white\" />\n </div>\n </Pressable>\n )}\n </>\n )}\n </div>\n );\n}\n"]}
@@ -1,10 +1,10 @@
1
- 'use strict';var v=require('@radix-ui/react-collapsible'),a=require('react'),m=require('@radix-ui/react-toast'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var v__namespace=/*#__PURE__*/_interopNamespace(v);var a__namespace=/*#__PURE__*/_interopNamespace(a);var m__namespace=/*#__PURE__*/_interopNamespace(m);function d(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var j={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},K=e=>{let[r,t]=e.split("-");return r==="heading"?j[t]||"p":r==="label"?"label":"p"},z={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},G=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[s,o]=t.split(":");return `${s}:text-${o}`}return `text-${t}`}).join(" "):"text-body-default",h=a__namespace.default.forwardRef(({variant:e="body-default",color:r="primary",as:t,className:s,children:o,weight:n,...p},i)=>{let l=G(e),c=r==="inherit"?"text-inherit":`text-${r}`,x=a__namespace.default.useMemo(()=>{let y=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return K(y)},[e]);return a__namespace.default.createElement(t||x,{ref:i,className:`
1
+ 'use strict';var v=require('@radix-ui/react-collapsible'),a=require('react'),x=require('@radix-ui/react-toast'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var v__namespace=/*#__PURE__*/_interopNamespace(v);var a__namespace=/*#__PURE__*/_interopNamespace(a);var x__namespace=/*#__PURE__*/_interopNamespace(x);function d(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var b="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var j={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},K=e=>{let[s,t]=e.split("-");return s==="heading"?j[t]||"p":s==="label"?"label":"p"},z={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},G=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,o]=t.split(":");return `${r}:text-${o}`}return `text-${t}`}).join(" "):"text-body-default",h=a__namespace.default.forwardRef(({variant:e="body-default",color:s="primary",as:t,className:r,children:o,weight:n,...p},i)=>{let c=G(e),l=s==="inherit"?"text-inherit":`text-${s}`,m=a__namespace.default.useMemo(()=>{let y=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return K(y)},[e]);return a__namespace.default.createElement(t||m,{ref:i,className:`
2
2
  font-sans antialiased
3
- ${l}
4
3
  ${c}
4
+ ${l}
5
5
  ${n&&`!${z[n]}`}
6
- ${s}
7
- `,...p},o)});h.displayName="Text";var b="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var W={black:"bg-primary text-white",accent:"bg-primary-100 text-white",secondary:"bg-secondary-100 text-secondary"},_={black:"border border-text text-primary",accent:"border border-primary-100 text-primary-100",secondary:"border border-text-secondary text-secondary"},T=a__namespace.forwardRef(({className:e,variant:r="filled",color:t="black",isLoading:s=false,children:o,disabled:n,end:p,...i},l)=>a__namespace.createElement("button",{ref:l,className:d(`
6
+ ${r}
7
+ `,...p},o)});h.displayName="Text";var W={black:"bg-primary text-background-0",accent:"bg-primary-100 text-background-0",secondary:"bg-secondary-100 text-secondary"},_={black:"border border-text text-primary",accent:"border border-primary-100 text-primary-100",secondary:"border border-text-secondary text-secondary"},T=a__namespace.forwardRef(({className:e,textVariant:s,variant:t="filled",color:r="black",isLoading:o=false,children:n,disabled:p,end:i,...c},l)=>a__namespace.createElement("button",{ref:l,className:d(`
8
8
  sm:px-7 px-4
9
9
  py-2
10
10
  inline-flex items-center justify-center
@@ -12,5 +12,5 @@
12
12
  transition-colors duration-200
13
13
  disabled:opacity-50 disabled:pointer-events-none
14
14
  hover:opacity-80 active:scale-95
15
- truncate`,b,r==="filled"?W[t]:r==="transparent"?"bg-transparent text-text":_[t],e),disabled:n||s,type:"button",...i},typeof o=="string"?a__namespace.createElement(h,{variant:["sm:body-default-bold","body-xxs-semibold"],color:"inherit"},o):o,p));T.displayName="Button";var M={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]"},k={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]"}},g=e=>String(e),P=(e,r=24)=>{let t=[],s={};if(e===void 0){let o=g(r);o?t.push(M[o]):(s.height=`${r}px`,s.width=`${r}px`);}if(typeof e=="number"){let o=g(e);o?t.push(M[o]):(s.height=`${e}px`,s.width=`${e}px`);}if(Array.isArray(e)){let o=g(r),n=[o&&M[o]||`h-[${r}px] w-[${r}px]`];e.forEach(p=>{if(typeof p=="string"){let[i,l]=p.split(":"),c=parseInt(l,10),x=g(c);t.push(x&&k[i]?.[x]||`${i}:h-[${c}px] ${i}:w-[${c}px]`);}}),t.push(...n);}if(typeof e=="string"){let[o,n]=e.split(":"),p=parseInt(n,10),i=g(p);t.push(i&&k[o]?.[i]||`${o}:h-[${p}px] ${o}:w-[${p}px]`);}return {responsiveSizeClasses:t.join(" "),responsiveSizeStyles:s}};var S={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)"},w=a__namespace.default.forwardRef(({name:e,size:r=24,color:t="primary",title:s,className:o,style:n={},...p},i)=>{let l=icons.IconMap[e],{responsiveSizeClasses:c,responsiveSizeStyles:x}=P(r,24);return a__namespace.default.createElement("div",{className:d("flex justify-center items-center",c,o),style:{"--icon-stroke":S[t],...x,...n}},a__namespace.default.createElement(l,{ref:i,"aria-hidden":!s,"aria-label":s,stroke:e.includes("filled")?void 0:S[t],...p}))});w.displayName="Icon";var Q={default:{icon:"information",className:"bg-gray-900 text-white"},success:{icon:"check",className:"bg-green-600 text-white"},error:{icon:"danger",className:"bg-tertiary-10 text-white"},warning:{icon:"warning-2",className:"bg-tertiary-20 text-white"}},N=a__namespace.forwardRef(({title:e,message:r,action:t,secondaryAction:s,variant:o="default",duration:n=5e3,className:p,onOpenChange:i,allowOutsideClick:l=true,onClose:c,...x},$)=>{let y=Q[o],I=a__namespace.useCallback(R=>{!l&&R===false||(i?.(R),R||c?.());},[i,l,c]);return a__namespace.createElement(m__namespace.Root,{ref:$,onOpenChange:I,duration:n,className:d("group pointer-events-auto relative flex w-full flex-col gap-4 rounded-lg p-4 items-center","shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full",y.className,p),...x},a__namespace.createElement(m__namespace.Close,{className:"absolute right-1 top-1 h-[40px] w-[40px] p-1 hover:bg-background-0/10 flex items-center justify-center rounded-lg","aria-label":"Close",onClick:c},a__namespace.createElement(w,{name:"close",size:16,color:"white"})),a__namespace.createElement("div",{className:"flex gap-4"},a__namespace.createElement(w,{name:y.icon,className:"h-5 w-5 shrink-0",color:"white"}),a__namespace.createElement("div",{className:"flex flex-col flex-1 gap-2"},e&&a__namespace.createElement(m__namespace.Title,{asChild:true},a__namespace.createElement(h,{variant:"body-default-bold",color:"inherit"},e)),a__namespace.createElement(m__namespace.Description,{asChild:true},a__namespace.createElement(h,{variant:"body-xs-medium",color:"inherit"},r)))),(t||s)&&a__namespace.createElement("div",{className:"flex gap-2 justify-end mt-2"},s&&a__namespace.createElement(m__namespace.Action,{asChild:true,altText:s.label},a__namespace.createElement("div",{className:"min-h-[40px] flex items-center"},a__namespace.createElement(T,{variant:s.variant||"outlined",color:"black",className:"border-white text-white hover:bg-background-0/10",onClick:s.onClick},s.label))),t&&a__namespace.createElement(m__namespace.Action,{asChild:true,altText:t.label},a__namespace.createElement("div",{className:"flex items-center"},a__namespace.createElement(T,{variant:t.variant||"outlined",color:"black",className:"border-white text-white hover:bg-background-0/10",onClick:t.onClick},t.label)))))});N.displayName="Toast";var A=typeof window<"u"?a.useLayoutEffect:a.useEffect;var C=a__namespace.default.forwardRef(({children:e,type:r="button",className:t,disabled:s,...o},n)=>a__namespace.default.createElement("button",{ref:n,type:r,disabled:s,className:d("appearance-none hover:opacity-80 transition-all active:scale-95",b,s&&"opacity-50 cursor-not-allowed",t),...o},e));C.displayName="Pressable";function X({children:e,maxHeight:r=100}){let[t,s]=a__namespace.default.useState(false),o=a.useRef(null),[n,p]=a.useState(r);A(()=>{if(!o.current)return;let l=new ResizeObserver(c=>{for(let x of c)p(x.target.scrollHeight);});return l.observe(o.current),()=>l.disconnect()},[]);let i=n>r;return a__namespace.default.createElement(v__namespace.Root,{open:t,onOpenChange:s},a__namespace.default.createElement("div",{className:"relative"},a__namespace.default.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:t?`${n}px`:`${r}px`}},a__namespace.default.createElement("div",{ref:o,className:"w-full"},e)),i&&a__namespace.default.createElement(v__namespace.Trigger,{asChild:true},a__namespace.default.createElement(C,{className:d("absolute -bottom-8 left-0 right-0","flex items-end justify-center","h-16 pt-8 pb-2",!t&&"bg-gradient-to-b from-transparent via-background-0 to-background-0","hover:opacity-100 transition-opacity")},a__namespace.default.createElement(h,{variant:"label-default",color:"secondary"},t?"See less":"See more")))))}X.displayName="Collapsible";exports.Collapsible=X;//# sourceMappingURL=Collapsible.cjs.map
15
+ truncate`,b,t==="filled"?W[r]:t==="transparent"?"bg-transparent text-text":_[r],e),disabled:p||o,type:"button",...c},typeof n=="string"?a__namespace.createElement(h,{variant:s??"body-xxs-semibold",color:"inherit"},n):n,i));T.displayName="Button";var M={12:"h-[12px] w-[12px]",16:"h-[16px] w-[16px]",18:"h-[18px] w-[18px]",20:"h-[20px] w-[20px]",24:"h-[24px] w-[24px]",32:"h-[32px] w-[32px]",36:"h-[36px] w-[36px]",40:"h-[40px] w-[40px]",42:"h-[42px] w-[42px]",48:"h-[48px] w-[48px]",64:"h-[64px] w-[64px]",72:"h-[72px] w-[72px]",80:"h-[80px] w-[80px]"},k={sm:{12:"sm:h-[12px] sm:w-[12px]",16:"sm:h-[16px] sm:w-[16px]",18:"sm:h-[18px] sm:w-[18px]",20:"sm:h-[20px] sm:w-[20px]",24:"sm:h-[24px] sm:w-[24px]",32:"sm:h-[32px] sm:w-[32px]",36:"sm:h-[36px] sm:w-[36px]",40:"sm:h-[40px] sm:w-[40px]",42:"sm:h-[42px] sm:w-[42px]",48:"sm:h-[48px] sm:w-[48px]",64:"sm:h-[64px] sm:w-[64px]",72:"sm:h-[72px] sm:w-[72px]",80:"sm:h-[80px] sm:w-[80px]"},md:{12:"md:h-[12px] md:w-[12px]",16:"md:h-[16px] md:w-[16px]",18:"md:h-[18px] md:w-[18px]",20:"md:h-[20px] md:w-[20px]",24:"md:h-[24px] md:w-[24px]",32:"md:h-[32px] md:w-[32px]",36:"md:h-[36px] md:w-[36px]",40:"md:h-[40px] md:w-[40px]",42:"md:h-[42px] md:w-[42px]",48:"md:h-[48px] md:w-[48px]",64:"md:h-[64px] md:w-[64px]",72:"md:h-[72px] md:w-[72px]",80:"md:h-[80px] md:w-[80px]"},lg:{12:"lg:h-[12px] lg:w-[12px]",16:"lg:h-[16px] lg:w-[16px]",18:"lg:h-[18px] lg:w-[18px]",20:"lg:h-[20px] lg:w-[20px]",24:"lg:h-[24px] lg:w-[24px]",32:"lg:h-[32px] lg:w-[32px]",36:"lg:h-[36px] lg:w-[36px]",40:"lg:h-[40px] lg:w-[40px]",42:"lg:h-[42px] lg:w-[42px]",48:"lg:h-[48px] lg:w-[48px]",64:"lg:h-[64px] lg:w-[64px]",72:"lg:h-[72px] lg:w-[72px]",80:"lg:h-[80px] lg:w-[80px]"},xl:{12:"xl:h-[12px] xl:w-[12px]",16:"xl:h-[16px] xl:w-[16px]",18:"xl:h-[18px] xl:w-[18px]",20:"xl:h-[20px] xl:w-[20px]",24:"xl:h-[24px] xl:w-[24px]",32:"xl:h-[32px] xl:w-[32px]",36:"xl:h-[36px] xl:w-[36px]",40:"xl:h-[40px] xl:w-[40px]",42:"xl:h-[42px] xl:w-[42px]",48:"xl:h-[48px] xl:w-[48px]",64:"xl:h-[64px] xl:w-[64px]",72:"xl:h-[72px] xl:w-[72px]",80:"xl:h-[80px] xl:w-[80px]"},"2xl":{12:"2xl:h-[12px] 2xl:w-[12px]",16:"2xl:h-[16px] 2xl:w-[16px]",18:"2xl:h-[18px] 2xl:w-[18px]",20:"2xl:h-[20px] 2xl:w-[20px]",24:"2xl:h-[24px] 2xl:w-[24px]",32:"2xl:h-[32px] 2xl:w-[32px]",36:"2xl:h-[36px] 2xl:w-[36px]",40:"2xl:h-[40px] 2xl:w-[40px]",42:"2xl:h-[42px] 2xl:w-[42px]",48:"2xl:h-[48px] 2xl:w-[48px]",64:"2xl:h-[64px] 2xl:w-[64px]",72:"2xl:h-[72px] 2xl:w-[72px]",80:"2xl:h-[80px] 2xl:w-[80px]"}},f=e=>String(e),P=(e,s=24)=>{let t=[],r={};if(e===void 0){let o=f(s);o?t.push(M[o]):(r.height=`${s}px`,r.width=`${s}px`);}if(typeof e=="number"){let o=f(e);o?t.push(M[o]):(r.height=`${e}px`,r.width=`${e}px`);}if(Array.isArray(e)){let o=f(s),n=[o&&M[o]||`h-[${s}px] w-[${s}px]`];e.forEach(p=>{if(typeof p=="string"){let[i,c]=p.split(":"),l=parseInt(c,10),m=f(l);t.push(m&&k[i]?.[m]||`${i}:h-[${l}px] ${i}:w-[${l}px]`);}}),t.push(...n);}if(typeof e=="string"){let[o,n]=e.split(":"),p=parseInt(n,10),i=f(p);t.push(i&&k[o]?.[i]||`${o}:h-[${p}px] ${o}:w-[${p}px]`);}return {responsiveSizeClasses:t.join(" "),responsiveSizeStyles:r}};var S={primary:"var(--color-primary)",secondary:"var(--color-secondary)",white:"var(--color-white)",primaryBlue:"var(--color-primary-100)",disabled:"var(--color-disabled)",danger:"var(--color-danger)",tertiary:"var(--color-tertiary-20)"},w=a__namespace.default.forwardRef(({name:e,size:s=24,color:t="primary",title:r,className:o,style:n={},...p},i)=>{let c=icons.IconMap[e],{responsiveSizeClasses:l,responsiveSizeStyles:m}=P(s,24);return a__namespace.default.createElement("div",{className:d("flex justify-center items-center",l,o),style:{"--icon-stroke":S[t],...m,...n}},a__namespace.default.createElement(c,{ref:i,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:S[t],...p}))});w.displayName="Icon";var Q={default:{icon:"information",className:"bg-gray-900 text-white"},success:{icon:"check",className:"bg-green-600 text-white"},error:{icon:"danger",className:"bg-tertiary-10 text-white"},warning:{icon:"warning-2",className:"bg-tertiary-20 text-white"}},N=a__namespace.forwardRef(({title:e,message:s,action:t,secondaryAction:r,variant:o="default",duration:n=5e3,className:p,onOpenChange:i,allowOutsideClick:c=true,onClose:l,...m},$)=>{let y=Q[o],I=a__namespace.useCallback(R=>{!c&&R===false||(i?.(R),R||l?.());},[i,c,l]);return a__namespace.createElement(x__namespace.Root,{ref:$,onOpenChange:I,duration:n,className:d("group pointer-events-auto relative flex w-full flex-col gap-4 rounded-lg p-4 items-center","shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full",y.className,p),...m},a__namespace.createElement(x__namespace.Close,{className:"absolute right-1 top-1 h-[40px] w-[40px] p-1 hover:bg-background-0/10 flex items-center justify-center rounded-lg","aria-label":"Close",onClick:l},a__namespace.createElement(w,{name:"close",size:16,color:"white"})),a__namespace.createElement("div",{className:"flex gap-4"},a__namespace.createElement(w,{name:y.icon,className:"h-5 w-5 shrink-0",color:"white"}),a__namespace.createElement("div",{className:"flex flex-col flex-1 gap-2"},e&&a__namespace.createElement(x__namespace.Title,{asChild:true},a__namespace.createElement(h,{variant:"body-default-bold",color:"inherit"},e)),a__namespace.createElement(x__namespace.Description,{asChild:true},a__namespace.createElement(h,{variant:"body-xs-medium",color:"inherit"},s)))),(t||r)&&a__namespace.createElement("div",{className:"flex gap-2 justify-end mt-2"},r&&a__namespace.createElement(x__namespace.Action,{asChild:true,altText:r.label},a__namespace.createElement("div",{className:"min-h-[40px] flex items-center"},a__namespace.createElement(T,{variant:r.variant||"outlined",color:"black",className:"border-white text-white hover:bg-background-0/10",onClick:r.onClick},r.label))),t&&a__namespace.createElement(x__namespace.Action,{asChild:true,altText:t.label},a__namespace.createElement("div",{className:"flex items-center"},a__namespace.createElement(T,{variant:t.variant||"outlined",color:"black",className:"border-white text-white hover:bg-background-0/10",onClick:t.onClick},t.label)))))});N.displayName="Toast";var A=typeof window<"u"?a.useLayoutEffect:a.useEffect;var C=a__namespace.default.forwardRef(({children:e,type:s="button",className:t,disabled:r,...o},n)=>a__namespace.default.createElement("button",{ref:n,type:s,disabled:r,className:d("appearance-none hover:opacity-80 transition-all active:scale-95",b,r&&"opacity-50 cursor-not-allowed",t),...o},e));C.displayName="Pressable";function X({children:e,maxHeight:s=100}){let[t,r]=a__namespace.default.useState(false),o=a.useRef(null),[n,p]=a.useState(s);A(()=>{if(!o.current)return;let c=new ResizeObserver(l=>{for(let m of l)p(m.target.scrollHeight);});return c.observe(o.current),()=>c.disconnect()},[]);let i=n>s;return a__namespace.default.createElement(v__namespace.Root,{open:t,onOpenChange:r},a__namespace.default.createElement("div",{className:"relative"},a__namespace.default.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:t?`${n}px`:`${s}px`}},a__namespace.default.createElement("div",{ref:o,className:"w-full"},e)),i&&a__namespace.default.createElement(v__namespace.Trigger,{asChild:true},a__namespace.default.createElement(C,{className:d("absolute -bottom-8 left-0 right-0","flex items-end justify-center","h-16 pt-8 pb-2",!t&&"bg-gradient-to-b from-transparent via-background-0 to-background-0","hover:opacity-100 transition-opacity")},a__namespace.default.createElement(h,{variant:"label-default",color:"secondary"},t?"See less":"See more")))))}X.displayName="Collapsible";exports.Collapsible=X;//# sourceMappingURL=Collapsible.cjs.map
16
16
  //# sourceMappingURL=Collapsible.cjs.map