@deckai/deck-ui 0.0.18 → 0.0.20

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 (214) 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 +6 -6
  6. package/dist/components/Accordion.cjs.map +1 -1
  7. package/dist/components/Accordion.js +6 -6
  8. package/dist/components/Accordion.js.map +1 -1
  9. package/dist/components/AddWorkCard.cjs +6 -6
  10. package/dist/components/AddWorkCard.cjs.map +1 -1
  11. package/dist/components/AddWorkCard.d.cts +2 -2
  12. package/dist/components/AddWorkCard.d.ts +2 -2
  13. package/dist/components/AddWorkCard.js +6 -6
  14. package/dist/components/AddWorkCard.js.map +1 -1
  15. package/dist/components/AutocompleteInput.cjs +5 -5
  16. package/dist/components/AutocompleteInput.cjs.map +1 -1
  17. package/dist/components/AutocompleteInput.d.cts +15 -16
  18. package/dist/components/AutocompleteInput.d.ts +15 -16
  19. package/dist/components/AutocompleteInput.js +5 -5
  20. package/dist/components/AutocompleteInput.js.map +1 -1
  21. package/dist/components/Avatar.cjs +1 -1
  22. package/dist/components/Avatar.cjs.map +1 -1
  23. package/dist/components/Avatar.d.cts +1 -2
  24. package/dist/components/Avatar.d.ts +1 -2
  25. package/dist/components/Avatar.js +1 -1
  26. package/dist/components/Avatar.js.map +1 -1
  27. package/dist/components/Badge.cjs +5 -5
  28. package/dist/components/Badge.cjs.map +1 -1
  29. package/dist/components/Badge.d.cts +1 -1
  30. package/dist/components/Badge.d.ts +1 -1
  31. package/dist/components/Badge.js +5 -5
  32. package/dist/components/Badge.js.map +1 -1
  33. package/dist/components/Breadcrumbs.cjs +6 -6
  34. package/dist/components/Breadcrumbs.cjs.map +1 -1
  35. package/dist/components/Breadcrumbs.js +6 -6
  36. package/dist/components/Breadcrumbs.js.map +1 -1
  37. package/dist/components/Button.cjs +6 -6
  38. package/dist/components/Button.cjs.map +1 -1
  39. package/dist/components/Button.js +6 -6
  40. package/dist/components/Button.js.map +1 -1
  41. package/dist/components/Carousel.cjs +1 -1
  42. package/dist/components/Carousel.cjs.map +1 -1
  43. package/dist/components/Carousel.js +1 -1
  44. package/dist/components/Carousel.js.map +1 -1
  45. package/dist/components/Collapsible.cjs +7 -7
  46. package/dist/components/Collapsible.cjs.map +1 -1
  47. package/dist/components/Collapsible.js +7 -7
  48. package/dist/components/Collapsible.js.map +1 -1
  49. package/dist/components/Combobox.cjs +5 -5
  50. package/dist/components/Combobox.cjs.map +1 -1
  51. package/dist/components/Combobox.js +5 -5
  52. package/dist/components/Combobox.js.map +1 -1
  53. package/dist/components/ContactItem.cjs +6 -6
  54. package/dist/components/ContactItem.cjs.map +1 -1
  55. package/dist/components/ContactItem.js +6 -6
  56. package/dist/components/ContactItem.js.map +1 -1
  57. package/dist/components/Dropdown.cjs +5 -5
  58. package/dist/components/Dropdown.cjs.map +1 -1
  59. package/dist/components/Dropdown.js +5 -5
  60. package/dist/components/Dropdown.js.map +1 -1
  61. package/dist/components/EditButton.cjs +7 -7
  62. package/dist/components/EditButton.cjs.map +1 -1
  63. package/dist/components/EditButton.js +7 -7
  64. package/dist/components/EditButton.js.map +1 -1
  65. package/dist/components/Icon.cjs +1 -1
  66. package/dist/components/Icon.cjs.map +1 -1
  67. package/dist/components/Icon.d.cts +2 -3
  68. package/dist/components/Icon.d.ts +2 -3
  69. package/dist/components/Icon.js +1 -1
  70. package/dist/components/Icon.js.map +1 -1
  71. package/dist/components/IconRenderer.cjs +1 -1
  72. package/dist/components/IconRenderer.cjs.map +1 -1
  73. package/dist/components/IconRenderer.d.cts +2 -1
  74. package/dist/components/IconRenderer.d.ts +2 -1
  75. package/dist/components/IconRenderer.js +1 -1
  76. package/dist/components/IconRenderer.js.map +1 -1
  77. package/dist/components/Input.cjs +6 -6
  78. package/dist/components/Input.cjs.map +1 -1
  79. package/dist/components/Input.d.cts +1 -0
  80. package/dist/components/Input.d.ts +1 -0
  81. package/dist/components/Input.js +6 -6
  82. package/dist/components/Input.js.map +1 -1
  83. package/dist/components/Link.cjs +4 -4
  84. package/dist/components/Link.cjs.map +1 -1
  85. package/dist/components/Link.d.cts +1 -0
  86. package/dist/components/Link.d.ts +1 -0
  87. package/dist/components/Link.js +4 -4
  88. package/dist/components/Link.js.map +1 -1
  89. package/dist/components/Modal.cjs +2 -0
  90. package/dist/components/Modal.cjs.map +1 -0
  91. package/dist/components/Modal.d.cts +31 -0
  92. package/dist/components/Modal.d.ts +31 -0
  93. package/dist/components/Modal.js +2 -0
  94. package/dist/components/Modal.js.map +1 -0
  95. package/dist/components/MultiSelectCombobox.cjs +5 -5
  96. package/dist/components/MultiSelectCombobox.cjs.map +1 -1
  97. package/dist/components/MultiSelectCombobox.js +5 -5
  98. package/dist/components/MultiSelectCombobox.js.map +1 -1
  99. package/dist/components/Navbar.cjs +6 -6
  100. package/dist/components/Navbar.cjs.map +1 -1
  101. package/dist/components/Navbar.d.cts +2 -1
  102. package/dist/components/Navbar.d.ts +2 -1
  103. package/dist/components/Navbar.js +6 -6
  104. package/dist/components/Navbar.js.map +1 -1
  105. package/dist/components/NavbarItem.cjs +7 -1
  106. package/dist/components/NavbarItem.cjs.map +1 -1
  107. package/dist/components/NavbarItem.d.cts +6 -2
  108. package/dist/components/NavbarItem.d.ts +6 -2
  109. package/dist/components/NavbarItem.js +7 -1
  110. package/dist/components/NavbarItem.js.map +1 -1
  111. package/dist/components/Option.cjs +6 -6
  112. package/dist/components/Option.cjs.map +1 -1
  113. package/dist/components/Option.d.cts +4 -0
  114. package/dist/components/Option.d.ts +4 -0
  115. package/dist/components/Option.js +6 -6
  116. package/dist/components/Option.js.map +1 -1
  117. package/dist/components/Pressable.cjs +1 -1
  118. package/dist/components/Pressable.cjs.map +1 -1
  119. package/dist/components/Pressable.js +1 -1
  120. package/dist/components/Pressable.js.map +1 -1
  121. package/dist/components/ProfileCard.cjs +6 -6
  122. package/dist/components/ProfileCard.cjs.map +1 -1
  123. package/dist/components/ProfileCard.js +6 -6
  124. package/dist/components/ProfileCard.js.map +1 -1
  125. package/dist/components/ProgressBar.cjs +1 -1
  126. package/dist/components/ProgressBar.cjs.map +1 -1
  127. package/dist/components/ProgressBar.js +1 -1
  128. package/dist/components/ProgressBar.js.map +1 -1
  129. package/dist/components/RadioGroup.cjs +5 -5
  130. package/dist/components/RadioGroup.cjs.map +1 -1
  131. package/dist/components/RadioGroup.js +5 -5
  132. package/dist/components/RadioGroup.js.map +1 -1
  133. package/dist/components/SegmentedTabs.cjs +5 -5
  134. package/dist/components/SegmentedTabs.cjs.map +1 -1
  135. package/dist/components/SegmentedTabs.js +5 -5
  136. package/dist/components/SegmentedTabs.js.map +1 -1
  137. package/dist/components/Sidebar.cjs +1 -1
  138. package/dist/components/Sidebar.cjs.map +1 -1
  139. package/dist/components/Sidebar.js +1 -1
  140. package/dist/components/Sidebar.js.map +1 -1
  141. package/dist/components/SlideButton.cjs +1 -1
  142. package/dist/components/SlideButton.cjs.map +1 -1
  143. package/dist/components/SlideButton.js +1 -1
  144. package/dist/components/SlideButton.js.map +1 -1
  145. package/dist/components/Slider.cjs +2 -0
  146. package/dist/components/Slider.cjs.map +1 -0
  147. package/dist/components/Slider.d.cts +7 -0
  148. package/dist/components/Slider.d.ts +7 -0
  149. package/dist/components/Slider.js +2 -0
  150. package/dist/components/Slider.js.map +1 -0
  151. package/dist/components/SocialCard.cjs +5 -5
  152. package/dist/components/SocialCard.cjs.map +1 -1
  153. package/dist/components/SocialCard.d.cts +2 -2
  154. package/dist/components/SocialCard.d.ts +2 -2
  155. package/dist/components/SocialCard.js +5 -5
  156. package/dist/components/SocialCard.js.map +1 -1
  157. package/dist/components/Spinner.cjs +1 -1
  158. package/dist/components/Spinner.cjs.map +1 -1
  159. package/dist/components/Spinner.js +1 -1
  160. package/dist/components/Spinner.js.map +1 -1
  161. package/dist/components/Switch.cjs +1 -1
  162. package/dist/components/Switch.cjs.map +1 -1
  163. package/dist/components/Switch.d.cts +1 -1
  164. package/dist/components/Switch.d.ts +1 -1
  165. package/dist/components/Switch.js +1 -1
  166. package/dist/components/Switch.js.map +1 -1
  167. package/dist/components/Tabs.cjs +3 -3
  168. package/dist/components/Tabs.cjs.map +1 -1
  169. package/dist/components/Tabs.js +3 -3
  170. package/dist/components/Tabs.js.map +1 -1
  171. package/dist/components/Tag.cjs +6 -6
  172. package/dist/components/Tag.cjs.map +1 -1
  173. package/dist/components/Tag.js +6 -6
  174. package/dist/components/Tag.js.map +1 -1
  175. package/dist/components/Text.cjs +2 -2
  176. package/dist/components/Text.cjs.map +1 -1
  177. package/dist/components/Text.d.cts +1 -1
  178. package/dist/components/Text.d.ts +1 -1
  179. package/dist/components/Text.js +2 -2
  180. package/dist/components/Text.js.map +1 -1
  181. package/dist/components/TextArea.cjs +4 -4
  182. package/dist/components/TextArea.cjs.map +1 -1
  183. package/dist/components/TextArea.js +4 -4
  184. package/dist/components/TextArea.js.map +1 -1
  185. package/dist/components/Toast.cjs +6 -6
  186. package/dist/components/Toast.cjs.map +1 -1
  187. package/dist/components/Toast.js +6 -6
  188. package/dist/components/Toast.js.map +1 -1
  189. package/dist/components/Tooltip.cjs +7 -1
  190. package/dist/components/Tooltip.cjs.map +1 -1
  191. package/dist/components/Tooltip.js +7 -1
  192. package/dist/components/Tooltip.js.map +1 -1
  193. package/dist/components/VideoPlayer.cjs +8 -0
  194. package/dist/components/VideoPlayer.cjs.map +1 -0
  195. package/dist/components/VideoPlayer.d.cts +36 -0
  196. package/dist/components/VideoPlayer.d.ts +36 -0
  197. package/dist/components/VideoPlayer.js +8 -0
  198. package/dist/components/VideoPlayer.js.map +1 -0
  199. package/dist/components/WorkCard.cjs +6 -6
  200. package/dist/components/WorkCard.cjs.map +1 -1
  201. package/dist/components/WorkCard.d.cts +2 -1
  202. package/dist/components/WorkCard.d.ts +2 -1
  203. package/dist/components/WorkCard.js +6 -6
  204. package/dist/components/WorkCard.js.map +1 -1
  205. package/dist/index.cjs +7 -7
  206. package/dist/index.cjs.map +1 -1
  207. package/dist/index.d.cts +14 -0
  208. package/dist/index.d.ts +14 -0
  209. package/dist/index.js +7 -7
  210. package/dist/index.js.map +1 -1
  211. package/dist/responsive-CjR1yA5N.d.cts +4 -0
  212. package/dist/responsive-CjR1yA5N.d.ts +4 -0
  213. package/dist/styles/styles.css +2 -2
  214. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts","../../src/components/Tooltip.tsx"],"names":["cn","inputs","twMerge","clsx","Tooltip","content","children","side","align","className","delayDuration","defaultOpen","controlledOpen","onOpenChange","longPressDuration","isOpen","setIsOpen","useState","longPressTimer","open","handleOpenChange","useCallback","newOpen","handleTouchStart","handleTouchEnd"],"mappings":"wKAGO,SAASA,KAAMC,CAAsB,CAAA,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,KCcaG,CAAU,CAAA,CAAC,CACtB,OAAA,CAAAC,CACA,CAAA,QAAA,CAAAC,EACA,IAAAC,CAAAA,CAAAA,CAAO,SACP,KAAAC,CAAAA,CAAAA,CAAQ,SACR,SAAAC,CAAAA,CAAAA,CACA,aAAAC,CAAAA,CAAAA,CAAgB,GAChB,CAAA,WAAA,CAAAC,EACA,IAAMC,CAAAA,CAAAA,CACN,aAAAC,CACA,CAAA,iBAAA,CAAAC,EAAoB,GACtB,CAAA,GAAoB,CAClB,GAAM,CAACC,CAAAA,CAAQC,CAAS,CAAIC,CAAAA,QAAAA,CAASN,GAAe,CAAK,CAAA,CAAA,CACrDO,EAA+B,IAE7BC,CAAAA,CAAAA,CAAOP,CAAkBG,EAAAA,CAAAA,CACzBK,CAAmBC,CAAAA,WAAAA,CACtBC,GAAqB,CACfV,CAAAA,EACHI,EAAUM,CAAO,CAAA,CAEnBT,IAAeS,CAAO,EACxB,CACA,CAAA,CAACV,CAAgBC,CAAAA,CAAY,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BACV,CAAA,KAAA,CAAO,EACP,CAAA,MAAA,CAAQ,EACV,CACF,CACF,CACF,CACF,CAEJ","file":"Tooltip.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","import * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cn } from \"../utils\";\nimport { useCallback, useState } from \"react\";\n\nexport interface TooltipProps {\n content: React.ReactNode;\n children: React.ReactNode;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n className?: string;\n delayDuration?: number;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Duration in ms for long press on mobile devices */\n longPressDuration?: number;\n}\n\nexport const Tooltip = ({\n content,\n children,\n side = \"bottom\",\n align = \"center\",\n className,\n delayDuration = 200,\n defaultOpen,\n open: controlledOpen,\n onOpenChange,\n longPressDuration = 500\n}: TooltipProps) => {\n const [isOpen, setIsOpen] = useState(defaultOpen || false);\n let longPressTimer: Timer | null = null;\n\n const open = controlledOpen ?? isOpen;\n const handleOpenChange = useCallback(\n (newOpen: boolean) => {\n if (!controlledOpen) {\n setIsOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n },\n [controlledOpen, onOpenChange]\n );\n\n const handleTouchStart = useCallback(() => {\n const timer = setTimeout(() => {\n handleOpenChange(true);\n }, longPressDuration);\n longPressTimer = timer;\n }, [handleOpenChange, longPressDuration]);\n\n const handleTouchEnd = useCallback(() => {\n if (longPressTimer) {\n clearTimeout(longPressTimer);\n longPressTimer = null;\n }\n // Keep tooltip open for a brief moment after touch\n setTimeout(() => handleOpenChange(false), 1500);\n }, [longPressTimer, handleOpenChange]);\n\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration}>\n <TooltipPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <TooltipPrimitive.Trigger asChild>\n <span\n tabIndex={0}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onTouchCancel={handleTouchEnd}\n >\n {children}\n </span>\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n side={side}\n align={align}\n sideOffset={4}\n className={cn(\n \"z-50 overflow-hidden rounded-lg\",\n \"bg-black px-3 py-1.5\",\n \"text-xs text-white\",\n \"animate-in fade-in-0 zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0\",\n \"data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=top]:slide-in-from-bottom-2\",\n \"select-none\",\n \"max-w-60\",\n \"touch-none\", // Prevent touch events from interfering with scrolling\n className\n )}\n >\n {content}\n <TooltipPrimitive.Arrow\n className=\"fill-text-primary\"\n width={10}\n height={5}\n />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n};\n"]}
1
+ {"version":3,"sources":["../../src/utils/index.ts","../../src/components/Text.tsx","../../src/components/Tooltip.tsx"],"names":["cn","inputs","twMerge","clsx","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","size","fontWeight","processVariants","variants","breakpoint","typographyClass","Text","React","color","as","className","children","weight","props","ref","typographyClasses","colorClasses","suggestedElement","baseVariant","Tooltip","content","side","align","delayDuration","defaultOpen","controlledOpen","onOpenChange","longPressDuration","isOpen","setIsOpen","useState","longPressTimer","open","handleOpenChange","useCallback","newOpen","handleTouchStart","handleTouchEnd"],"mappings":"mLAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,QAAQC,IAAKF,CAAAA,CAAM,CAAC,CAC7B,CCmEA,IAAMG,CAAAA,CAAmD,CACvD,EAAA,CAAI,KACJ,EAAI,CAAA,IAAA,CACJ,EAAI,CAAA,IAAA,CACJ,EAAI,CAAA,IAAA,CACJ,GAAI,I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U,CAAY,EAAA,QAAA,CAClB,gBAACd,CAAA,CAAA,CAAK,QAAQ,qBAAsB,CAAA,KAAA,CAAM,SACvCc,CACH,CAAA,CAEAA,EAEF,CAAkB,CAAA,aAAA,CAAA,CAAA,CAAA,KAAA,CAAjB,CACC,SAAU,CAAA,mBAAA,CACV,MAAO,EACP,CAAA,MAAA,CAAQ,EACV,CACF,CACF,CACF,CACF,CAEJ","file":"Tooltip.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","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\nimport { Breakpoint } from \"../utils/responsive\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport * as React from \"react\";\nimport { useCallback, useState } from \"react\";\nimport { cn } from \"../utils\";\nimport { Text } from \"./Text\";\nexport interface TooltipProps {\n content: React.ReactNode;\n children: React.ReactNode;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n align?: \"start\" | \"center\" | \"end\";\n className?: string;\n delayDuration?: number;\n defaultOpen?: boolean;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /** Duration in ms for long press on mobile devices */\n longPressDuration?: number;\n}\n\nexport const Tooltip = ({\n content,\n children,\n side = \"bottom\",\n align = \"center\",\n className,\n delayDuration = 200,\n defaultOpen,\n open: controlledOpen,\n onOpenChange,\n longPressDuration = 500\n}: TooltipProps) => {\n const [isOpen, setIsOpen] = useState(defaultOpen || false);\n let longPressTimer: Timer | null = null;\n\n const open = controlledOpen ?? isOpen;\n const handleOpenChange = useCallback(\n (newOpen: boolean) => {\n if (!controlledOpen) {\n setIsOpen(newOpen);\n }\n onOpenChange?.(newOpen);\n },\n [controlledOpen, onOpenChange]\n );\n\n const handleTouchStart = useCallback(() => {\n const timer = setTimeout(() => {\n handleOpenChange(true);\n }, longPressDuration);\n longPressTimer = timer;\n }, [handleOpenChange, longPressDuration]);\n\n const handleTouchEnd = useCallback(() => {\n if (longPressTimer) {\n clearTimeout(longPressTimer);\n longPressTimer = null;\n }\n // Keep tooltip open for a brief moment after touch\n setTimeout(() => handleOpenChange(false), 1500);\n }, [longPressTimer, handleOpenChange]);\n\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration}>\n <TooltipPrimitive.Root open={open} onOpenChange={handleOpenChange}>\n <TooltipPrimitive.Trigger asChild>\n <span\n tabIndex={0}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n onTouchCancel={handleTouchEnd}\n >\n {children}\n </span>\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n side={side}\n align={align}\n sideOffset={4}\n className={cn(\n \"z-50 overflow-hidden rounded-lg\",\n \"bg-black px-3 py-1.5\",\n \"text-xs text-white\",\n \"animate-in fade-in-0 zoom-in-95\",\n \"data-[state=closed]:animate-out data-[state=closed]:fade-out-0\",\n \"data-[side=bottom]:slide-in-from-top-2\",\n \"data-[side=top]:slide-in-from-bottom-2\",\n \"select-none\",\n \"max-w-60\",\n \"touch-none\", // Prevent touch events from interfering with scrolling\n className\n )}\n >\n {typeof content === \"string\" ? (\n <Text variant=\"body-default-medium\" color=\"white\">\n {content}\n </Text>\n ) : (\n content\n )}\n <TooltipPrimitive.Arrow\n className=\"fill-text-primary\"\n width={10}\n height={5}\n />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n};\n"]}
@@ -0,0 +1,8 @@
1
+ 'use strict';var c=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),i=require('@radix-ui/react-dialog'),icons=require('@deckai/icons');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}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 c__default=/*#__PURE__*/_interopDefault(c);var i__namespace=/*#__PURE__*/_interopNamespace(i);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var M=(e,{isActive:s=true,preventScroll:t=false}={})=>{let r=c.useCallback(o=>{let p=e[o.key];p&&p(o);},[e]);c.useEffect(()=>(s&&(document.addEventListener("keydown",r),t&&(document.body.style.overflow="hidden")),()=>{document.removeEventListener("keydown",r),t&&(document.body.style.overflow="unset");}),[s,r,t]);};var g={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]"},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]"},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]"}},h=e=>String(e),v=(e,s=24)=>{let t=[],r={};if(e===undefined){let o=h(s);o?t.push(g[o]):(r.height=`${s}px`,r.width=`${s}px`);}if(typeof e=="number"){let o=h(e);o?t.push(g[o]):(r.height=`${e}px`,r.width=`${e}px`);}if(Array.isArray(e)){let o=h(s),p=[o&&g[o]||`h-[${s}px] w-[${s}px]`];e.forEach(n=>{if(typeof n=="string"){let[a,m]=n.split(":"),x=parseInt(m,10),d=h(x);t.push(d&&H[a]?.[d]||`${a}:h-[${x}px] ${a}:w-[${x}px]`);}}),t.push(...p);}if(typeof e=="string"){let[o,p]=e.split(":"),n=parseInt(p,10),a=h(n);t.push(a&&H[o]?.[a]||`${o}:h-[${n}px] ${o}:w-[${n}px]`);}return {responsiveSizeClasses:t.join(" "),responsiveSizeStyles:r}};var L={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888",danger:"#FF0000"},f=c__default.default.forwardRef(({name:e,size:s=24,color:t="primary",title:r,className:o,style:p={},...n},a)=>{let m=icons.IconMap[e],{responsiveSizeClasses:x,responsiveSizeStyles:d}=v(s,24);return c__default.default.createElement("div",{className:l("flex justify-center items-center",x,o),style:{"--icon-stroke":L[t],...d,...p}},c__default.default.createElement(m,{ref:a,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?undefined:L[t],...n}))});f.displayName="Icon";var R="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var w=c__default.default.forwardRef(({children:e,type:s="button",className:t,disabled:r,...o},p)=>c__default.default.createElement("button",{ref:p,type:s,disabled:r,className:l("appearance-none hover:opacity-80 transition-all active:scale-95",R,r&&"opacity-50 cursor-not-allowed",t),...o},e));w.displayName="Pressable";var T=({children:e,open:s,onClose:t,className:r,showCloseButton:o=true})=>(M({Escape:t},{isActive:s,preventScroll:true}),c__default.default.createElement(i__namespace.Root,{open:s,onOpenChange:t},c__default.default.createElement(i__namespace.Portal,null,c__default.default.createElement(i__namespace.Overlay,{className:l("fixed inset-0 z-50 bg-sidebarOverlay backdrop-blur-[2px]","data-[state=open]:animate-overlay-show","data-[state=closed]:animate-overlay-hide")}),c__default.default.createElement(i__namespace.Content,{className:l("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[90vw] max-w-[90vw] max-h-[90vh]","rounded-xl overflow-hidden","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]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]",r)},e,o&&c__default.default.createElement(i__namespace.Close,{asChild:true},c__default.default.createElement(w,{className:"inline-flex items-center justify-center text-secondary absolute top-4 right-4","aria-label":"Close"},c__default.default.createElement(f,{name:"close",size:12})))))));T.displayName="Modal";var K={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},I=e=>{let[s,t]=e.split("-");return s==="heading"?K[t]||"p":s==="label"?"label":"p"},B={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},O=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",E=c__default.default.forwardRef(({variant:e="body-default",color:s="primary",as:t,className:r,children:o,weight:p,...n},a)=>{let m=O(e),x=s==="inherit"?"text-inherit":`text-${s}`,d=c__default.default.useMemo(()=>{let S=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return I(S)},[e]);return c__default.default.createElement(t||d,{ref:a,className:`
2
+ font-sans antialiased
3
+ ${m}
4
+ ${x}
5
+ ${p&&`!${B[p]}`}
6
+ ${r}
7
+ `,...n},o)});E.displayName="Text";var D={"16:9":"aspect-video","9:16":"aspect-[9/16]","4:3":"aspect-[4/3]","1:1":"aspect-square"},G=({src:e,open:s,onClose:t,caption:r,aspectRatio:o="16:9",className:p})=>{let n=c.useRef(null),[a,m]=c.useState(false),x=c.useCallback(()=>{m(true);},[]),d=c.useCallback(()=>{m(false);},[]);return c__default.default.createElement(T,{open:s,onClose:t,showCloseButton:a,className:l("rounded-xl",p)},c__default.default.createElement("div",{className:l("w-full max-h-[90vh]",D[o],"relative w-full h-full flex items-center justify-center"),onMouseEnter:x,onMouseLeave:d},c__default.default.createElement("video",{ref:n,src:e,className:"w-full h-full object-contain",controls:true,autoPlay:true}),r&&c__default.default.createElement("div",{className:"absolute left-4 bottom-16 flex flex-col gap-1 p-2 rounded-lg bg-overlay max-w-[80%]"},c__default.default.createElement(E,{variant:"body-default-medium",className:"text-white"},r))))};G.displayName="VideoPlayer";exports.VideoPlayer=G;//# sourceMappingURL=VideoPlayer.cjs.map
8
+ //# sourceMappingURL=VideoPlayer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/index.ts","../../src/utils/usePortalKeyboardEvent.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Modal.tsx","../../src/components/Text.tsx","../../src/components/VideoPlayer.tsx"],"names":["cn","inputs","twMerge","clsx","usePortalKeyboardEvent","eventMap","isActive","preventScroll","handleKeyDown","useCallback","event","handler","useEffect","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","Modal","open","onClose","showCloseButton","i","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","aspectRatioClasses","VideoPlayer","src","caption","aspectRatio","videoRef","useRef","isHovering","setIsHovering","useState","handleMouseEnter","handleMouseLeave"],"mappings":"0nBAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAKF,CAAAA,CAAM,CAAC,CAC7B,CCuBO,IAAMG,EAAyB,CACpCC,CAAAA,CACA,CAAE,QAAA,CAAAC,CAAW,CAAA,IAAA,CAAM,aAAAC,CAAAA,CAAAA,CAAgB,KAAM,CAAA,CAA0B,EAAC,GACjE,CACH,IAAMC,EAAgBC,aACnBC,CAAAA,CAAAA,EAAyB,CACxB,IAAMC,CAAUN,CAAAA,CAAAA,CAASK,EAAM,GAAG,CAAA,CAC9BC,CACFA,EAAAA,CAAAA,CAAQD,CAAK,EAEjB,EACA,CAACL,CAAQ,CACX,CAAA,CAEAO,WAAU,CAAA,KACJN,CACF,GAAA,QAAA,CAAS,gBAAiB,CAAA,SAAA,CAAWE,CAAa,CAAA,CAC9CD,CACF,GAAA,QAAA,CAAS,KAAK,KAAM,CAAA,QAAA,CAAW,QAI5B,CAAA,CAAA,CAAA,IAAM,CACX,QAAA,CAAS,oBAAoB,SAAWC,CAAAA,CAAa,CACjDD,CAAAA,CAAAA,GACF,QAAS,CAAA,IAAA,CAAK,MAAM,QAAW,CAAA,OAAA,EAEnC,CACC,CAAA,CAAA,CAACD,CAAUE,CAAAA,CAAAA,CAAeD,CAAa,CAAC,EAC7C,CAAA,CCvCA,IAAMM,CAAAA,CAAsC,CAC1C,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,EAAA,CAAM,mBACN,CAAA,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AA,CAAAA,kBAAAA,CAAA,aAAC,CAAA,OAAA,CAAA,CACC,GAAK0C,CAAAA,CAAAA,CACL,GAAKH,CAAAA,CAAAA,CACL,UAAU,8BACV,CAAA,QAAA,CAAQ,IACR,CAAA,QAAA,CAAQ,IACV,CAAA,CAAA,CACCC,CACCxC,EAAAA,kBAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,qFACbA,CAAAA,CAAAA,kBAAAA,CAAA,aAAC8B,CAAAA,CAAAA,CAAA,CAAK,OAAA,CAAQ,sBAAsB,SAAU,CAAA,YAAA,CAAA,CAC3CU,CACH,CACF,CAEJ,CACF,CAEJ,EAEAF,EAAY,WAAc,CAAA,aAAA","file":"VideoPlayer.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","import { useCallback, useEffect } from \"react\";\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void;\n\ntype KeyboardEventOptions = {\n /**\n * Whether the event should be active\n */\n isActive?: boolean;\n /**\n * Whether to prevent body scroll when active\n * @default false\n */\n preventScroll?: boolean;\n};\n\n/**\n * Hook for handling keyboard events within portals\n * @param eventMap - Map of keyboard events to their handlers\n * @param options - Options for the keyboard events\n * @example\n * ```tsx\n * const handleKeyboardEvents = usePortalKeyboardEvent({\n * Escape: onClose,\n * Enter: onConfirm,\n * }, { isActive: isOpen });\n * ```\n */\nexport const usePortalKeyboardEvent = (\n eventMap: Record<string, KeyboardEventHandler>,\n { isActive = true, preventScroll = false }: KeyboardEventOptions = {}\n) => {\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n const handler = eventMap[event.key];\n if (handler) {\n handler(event);\n }\n },\n [eventMap]\n );\n\n useEffect(() => {\n if (isActive) {\n document.addEventListener(\"keydown\", handleKeyDown);\n if (preventScroll) {\n document.body.style.overflow = \"hidden\";\n }\n }\n\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n if (preventScroll) {\n document.body.style.overflow = \"unset\";\n }\n };\n }, [isActive, handleKeyDown, preventScroll]);\n};\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 { IconMap, IconName } from \"@deckai/icons\";\nimport React, { SVGProps } from \"react\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport { ResponsiveSize, 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\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\",\n danger: \"#FF0000\"\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 React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\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 { 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 Dialog from \"@radix-ui/react-dialog\";\nimport React, { type ReactNode } from \"react\";\nimport { cn } from \"../utils\";\nimport { usePortalKeyboardEvent } from \"../utils/usePortalKeyboardEvent\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type ModalProps = {\n /**\n * The content to be rendered inside the modal\n */\n children: ReactNode;\n /**\n * Whether the modal is open\n */\n open: boolean;\n /**\n * Callback fired when the modal is closed\n */\n onClose: () => void;\n /**\n * Additional class names to be applied to the modal\n */\n className?: string;\n /**\n * Whether to show the close button\n * @default true\n */\n showCloseButton?: boolean;\n};\n\nexport const Modal = ({\n children,\n open,\n onClose,\n className,\n showCloseButton = true\n}: ModalProps) => {\n usePortalKeyboardEvent(\n { Escape: onClose },\n { isActive: open, preventScroll: true }\n );\n\n return (\n <Dialog.Root open={open} onOpenChange={onClose}>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-sidebarOverlay backdrop-blur-[2px]\",\n \"data-[state=open]:animate-overlay-show\",\n \"data-[state=closed]:animate-overlay-hide\"\n )}\n />\n <Dialog.Content\n className={cn(\n \"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2\",\n \"w-[90vw] max-w-[90vw] max-h-[90vh]\",\n \"rounded-xl overflow-hidden\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2\",\n \"data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]\",\n className\n )}\n >\n {children}\n {showCloseButton && (\n <Dialog.Close asChild>\n <Pressable\n className=\"inline-flex items-center justify-center text-secondary absolute top-4 right-4\"\n aria-label=\"Close\"\n >\n <Icon name=\"close\" size={12} />\n </Pressable>\n </Dialog.Close>\n )}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nModal.displayName = \"Modal\";\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\nimport { Breakpoint } from \"../utils/responsive\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { useCallback, useRef, useState } from \"react\";\nimport { cn } from \"../utils\";\nimport { Modal } from \"./Modal\";\nimport { Text } from \"./Text\";\n\nexport type AspectRatio = \"16:9\" | \"9:16\" | \"4:3\" | \"1:1\";\n\nexport type VideoPlayerProps = {\n /**\n * The URL of the video to play\n */\n src: string;\n /**\n * Whether the video modal is open\n */\n open: boolean;\n /**\n * Callback fired when the video modal is closed\n */\n onClose: () => void;\n /**\n * The caption to display in the bottom left corner\n */\n caption?: React.ReactNode;\n /**\n * The aspect ratio of the video\n * @default \"16:9\"\n */\n aspectRatio?: AspectRatio;\n /**\n * Additional class names to be applied to the video container\n */\n className?: string;\n};\n\nconst aspectRatioClasses: Record<AspectRatio, string> = {\n \"16:9\": \"aspect-video\",\n \"9:16\": \"aspect-[9/16]\",\n \"4:3\": \"aspect-[4/3]\",\n \"1:1\": \"aspect-square\"\n};\n\nexport const VideoPlayer = ({\n src,\n open,\n onClose,\n caption,\n aspectRatio = \"16:9\",\n className\n}: VideoPlayerProps) => {\n const videoRef = useRef<HTMLVideoElement>(null);\n const [isHovering, setIsHovering] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovering(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovering(false);\n }, []);\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n showCloseButton={isHovering}\n className={cn(\"rounded-xl\", className)}\n >\n <div\n className={cn(\n \"w-full max-h-[90vh]\",\n aspectRatioClasses[aspectRatio],\n \"relative w-full h-full flex items-center justify-center\"\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <video\n ref={videoRef}\n src={src}\n className=\"w-full h-full object-contain\"\n controls\n autoPlay\n />\n {caption && (\n <div className=\"absolute left-4 bottom-16 flex flex-col gap-1 p-2 rounded-lg bg-overlay max-w-[80%]\">\n <Text variant=\"body-default-medium\" className=\"text-white\">\n {caption}\n </Text>\n </div>\n )}\n </div>\n </Modal>\n );\n};\n\nVideoPlayer.displayName = \"VideoPlayer\";\n"]}
@@ -0,0 +1,36 @@
1
+ import React__default from 'react';
2
+
3
+ type AspectRatio = "16:9" | "9:16" | "4:3" | "1:1";
4
+ type VideoPlayerProps = {
5
+ /**
6
+ * The URL of the video to play
7
+ */
8
+ src: string;
9
+ /**
10
+ * Whether the video modal is open
11
+ */
12
+ open: boolean;
13
+ /**
14
+ * Callback fired when the video modal is closed
15
+ */
16
+ onClose: () => void;
17
+ /**
18
+ * The caption to display in the bottom left corner
19
+ */
20
+ caption?: React__default.ReactNode;
21
+ /**
22
+ * The aspect ratio of the video
23
+ * @default "16:9"
24
+ */
25
+ aspectRatio?: AspectRatio;
26
+ /**
27
+ * Additional class names to be applied to the video container
28
+ */
29
+ className?: string;
30
+ };
31
+ declare const VideoPlayer: {
32
+ ({ src, open, onClose, caption, aspectRatio, className }: VideoPlayerProps): React__default.JSX.Element;
33
+ displayName: string;
34
+ };
35
+
36
+ export { type AspectRatio, VideoPlayer, type VideoPlayerProps };
@@ -0,0 +1,36 @@
1
+ import React__default from 'react';
2
+
3
+ type AspectRatio = "16:9" | "9:16" | "4:3" | "1:1";
4
+ type VideoPlayerProps = {
5
+ /**
6
+ * The URL of the video to play
7
+ */
8
+ src: string;
9
+ /**
10
+ * Whether the video modal is open
11
+ */
12
+ open: boolean;
13
+ /**
14
+ * Callback fired when the video modal is closed
15
+ */
16
+ onClose: () => void;
17
+ /**
18
+ * The caption to display in the bottom left corner
19
+ */
20
+ caption?: React__default.ReactNode;
21
+ /**
22
+ * The aspect ratio of the video
23
+ * @default "16:9"
24
+ */
25
+ aspectRatio?: AspectRatio;
26
+ /**
27
+ * Additional class names to be applied to the video container
28
+ */
29
+ className?: string;
30
+ };
31
+ declare const VideoPlayer: {
32
+ ({ src, open, onClose, caption, aspectRatio, className }: VideoPlayerProps): React__default.JSX.Element;
33
+ displayName: string;
34
+ };
35
+
36
+ export { type AspectRatio, VideoPlayer, type VideoPlayerProps };
@@ -0,0 +1,8 @@
1
+ import c,{useRef,useState,useCallback,useEffect}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import*as i from'@radix-ui/react-dialog';import {IconMap}from'@deckai/icons';function l(...e){return twMerge(clsx(e))}var M=(e,{isActive:s=true,preventScroll:t=false}={})=>{let r=useCallback(o=>{let p=e[o.key];p&&p(o);},[e]);useEffect(()=>(s&&(document.addEventListener("keydown",r),t&&(document.body.style.overflow="hidden")),()=>{document.removeEventListener("keydown",r),t&&(document.body.style.overflow="unset");}),[s,r,t]);};var g={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]"},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]"},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]"}},h=e=>String(e),v=(e,s=24)=>{let t=[],r={};if(e===undefined){let o=h(s);o?t.push(g[o]):(r.height=`${s}px`,r.width=`${s}px`);}if(typeof e=="number"){let o=h(e);o?t.push(g[o]):(r.height=`${e}px`,r.width=`${e}px`);}if(Array.isArray(e)){let o=h(s),p=[o&&g[o]||`h-[${s}px] w-[${s}px]`];e.forEach(n=>{if(typeof n=="string"){let[a,m]=n.split(":"),x=parseInt(m,10),d=h(x);t.push(d&&H[a]?.[d]||`${a}:h-[${x}px] ${a}:w-[${x}px]`);}}),t.push(...p);}if(typeof e=="string"){let[o,p]=e.split(":"),n=parseInt(p,10),a=h(n);t.push(a&&H[o]?.[a]||`${o}:h-[${n}px] ${o}:w-[${n}px]`);}return {responsiveSizeClasses:t.join(" "),responsiveSizeStyles:r}};var L={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888",danger:"#FF0000"},f=c.forwardRef(({name:e,size:s=24,color:t="primary",title:r,className:o,style:p={},...n},a)=>{let m=IconMap[e],{responsiveSizeClasses:x,responsiveSizeStyles:d}=v(s,24);return c.createElement("div",{className:l("flex justify-center items-center",x,o),style:{"--icon-stroke":L[t],...d,...p}},c.createElement(m,{ref:a,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?undefined:L[t],...n}))});f.displayName="Icon";var R="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var w=c.forwardRef(({children:e,type:s="button",className:t,disabled:r,...o},p)=>c.createElement("button",{ref:p,type:s,disabled:r,className:l("appearance-none hover:opacity-80 transition-all active:scale-95",R,r&&"opacity-50 cursor-not-allowed",t),...o},e));w.displayName="Pressable";var T=({children:e,open:s,onClose:t,className:r,showCloseButton:o=true})=>(M({Escape:t},{isActive:s,preventScroll:true}),c.createElement(i.Root,{open:s,onOpenChange:t},c.createElement(i.Portal,null,c.createElement(i.Overlay,{className:l("fixed inset-0 z-50 bg-sidebarOverlay backdrop-blur-[2px]","data-[state=open]:animate-overlay-show","data-[state=closed]:animate-overlay-hide")}),c.createElement(i.Content,{className:l("fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2","w-[90vw] max-w-[90vw] max-h-[90vh]","rounded-xl overflow-hidden","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]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2","data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]",r)},e,o&&c.createElement(i.Close,{asChild:true},c.createElement(w,{className:"inline-flex items-center justify-center text-secondary absolute top-4 right-4","aria-label":"Close"},c.createElement(f,{name:"close",size:12})))))));T.displayName="Modal";var K={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},I=e=>{let[s,t]=e.split("-");return s==="heading"?K[t]||"p":s==="label"?"label":"p"},B={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},O=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",E=c.forwardRef(({variant:e="body-default",color:s="primary",as:t,className:r,children:o,weight:p,...n},a)=>{let m=O(e),x=s==="inherit"?"text-inherit":`text-${s}`,d=c.useMemo(()=>{let S=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return I(S)},[e]);return c.createElement(t||d,{ref:a,className:`
2
+ font-sans antialiased
3
+ ${m}
4
+ ${x}
5
+ ${p&&`!${B[p]}`}
6
+ ${r}
7
+ `,...n},o)});E.displayName="Text";var D={"16:9":"aspect-video","9:16":"aspect-[9/16]","4:3":"aspect-[4/3]","1:1":"aspect-square"},G=({src:e,open:s,onClose:t,caption:r,aspectRatio:o="16:9",className:p})=>{let n=useRef(null),[a,m]=useState(false),x=useCallback(()=>{m(true);},[]),d=useCallback(()=>{m(false);},[]);return c.createElement(T,{open:s,onClose:t,showCloseButton:a,className:l("rounded-xl",p)},c.createElement("div",{className:l("w-full max-h-[90vh]",D[o],"relative w-full h-full flex items-center justify-center"),onMouseEnter:x,onMouseLeave:d},c.createElement("video",{ref:n,src:e,className:"w-full h-full object-contain",controls:true,autoPlay:true}),r&&c.createElement("div",{className:"absolute left-4 bottom-16 flex flex-col gap-1 p-2 rounded-lg bg-overlay max-w-[80%]"},c.createElement(E,{variant:"body-default-medium",className:"text-white"},r))))};G.displayName="VideoPlayer";export{G as VideoPlayer};//# sourceMappingURL=VideoPlayer.js.map
8
+ //# sourceMappingURL=VideoPlayer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/index.ts","../../src/utils/usePortalKeyboardEvent.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Modal.tsx","../../src/components/Text.tsx","../../src/components/VideoPlayer.tsx"],"names":["cn","inputs","twMerge","clsx","usePortalKeyboardEvent","eventMap","isActive","preventScroll","handleKeyDown","useCallback","event","handler","useEffect","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","Modal","open","onClose","showCloseButton","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","aspectRatioClasses","VideoPlayer","src","caption","aspectRatio","videoRef","useRef","isHovering","setIsHovering","useState","handleMouseEnter","handleMouseLeave"],"mappings":"sMAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,OAAAA,CAAQC,IAAKF,CAAAA,CAAM,CAAC,CAC7B,CCuBO,IAAMG,EAAyB,CACpCC,CAAAA,CACA,CAAE,QAAA,CAAAC,CAAW,CAAA,IAAA,CAAM,aAAAC,CAAAA,CAAAA,CAAgB,KAAM,CAAA,CAA0B,EAAC,GACjE,CACH,IAAMC,EAAgBC,WACnBC,CAAAA,CAAAA,EAAyB,CACxB,IAAMC,CAAUN,CAAAA,CAAAA,CAASK,EAAM,GAAG,CAAA,CAC9BC,CACFA,EAAAA,CAAAA,CAAQ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CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAIC,SAAS,KAAK,CAAA,CAE5CC,CAAmBpE,CAAAA,WAAAA,CAAY,IAAM,CACzCkE,CAAc,CAAA,IAAI,EACpB,CAAG,CAAA,EAAE,CAAA,CAECG,CAAmBrE,CAAAA,WAAAA,CAAY,IAAM,CACzCkE,EAAc,KAAK,EACrB,CAAG,CAAA,EAAE,CAAA,CAEL,OACE5C,CAAAA,CAAA,cAACiB,CAAA,CAAA,CACC,IAAMC,CAAAA,CAAAA,CACN,OAASC,CAAAA,CAAAA,CACT,eAAiBwB,CAAAA,CAAAA,CACjB,UAAW1E,CAAG,CAAA,YAAA,CAAcmC,CAAS,CAAA,CAAA,CAErCJ,CAAA,CAAA,aAAA,CAAC,KACC,CAAA,CAAA,SAAA,CAAW/B,EACT,qBACAmE,CAAAA,CAAAA,CAAmBI,CAAW,CAAA,CAC9B,yDACF,CAAA,CACA,YAAcM,CAAAA,CAAAA,CACd,aAAcC,CAEd/C,CAAAA,CAAAA,CAAAA,CAAA,aAAC,CAAA,OAAA,CAAA,CACC,GAAKyC,CAAAA,CAAAA,CACL,GAAKH,CAAAA,CAAAA,CACL,UAAU,8BACV,CAAA,QAAA,CAAQ,IACR,CAAA,QAAA,CAAQ,IACV,CAAA,CAAA,CACCC,CACCvC,EAAAA,CAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,qFACbA,CAAAA,CAAAA,CAAAA,CAAA,aAAC6B,CAAAA,CAAAA,CAAA,CAAK,OAAA,CAAQ,sBAAsB,SAAU,CAAA,YAAA,CAAA,CAC3CU,CACH,CACF,CAEJ,CACF,CAEJ,EAEAF,EAAY,WAAc,CAAA,aAAA","file":"VideoPlayer.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","import { useCallback, useEffect } from \"react\";\n\ntype KeyboardEventHandler = (event: KeyboardEvent) => void;\n\ntype KeyboardEventOptions = {\n /**\n * Whether the event should be active\n */\n isActive?: boolean;\n /**\n * Whether to prevent body scroll when active\n * @default false\n */\n preventScroll?: boolean;\n};\n\n/**\n * Hook for handling keyboard events within portals\n * @param eventMap - Map of keyboard events to their handlers\n * @param options - Options for the keyboard events\n * @example\n * ```tsx\n * const handleKeyboardEvents = usePortalKeyboardEvent({\n * Escape: onClose,\n * Enter: onConfirm,\n * }, { isActive: isOpen });\n * ```\n */\nexport const usePortalKeyboardEvent = (\n eventMap: Record<string, KeyboardEventHandler>,\n { isActive = true, preventScroll = false }: KeyboardEventOptions = {}\n) => {\n const handleKeyDown = useCallback(\n (event: KeyboardEvent) => {\n const handler = eventMap[event.key];\n if (handler) {\n handler(event);\n }\n },\n [eventMap]\n );\n\n useEffect(() => {\n if (isActive) {\n document.addEventListener(\"keydown\", handleKeyDown);\n if (preventScroll) {\n document.body.style.overflow = \"hidden\";\n }\n }\n\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n if (preventScroll) {\n document.body.style.overflow = \"unset\";\n }\n };\n }, [isActive, handleKeyDown, preventScroll]);\n};\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 { IconMap, IconName } from \"@deckai/icons\";\nimport React, { SVGProps } from \"react\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport { ResponsiveSize, 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\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\",\n danger: \"#FF0000\"\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 React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\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 { 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 Dialog from \"@radix-ui/react-dialog\";\nimport React, { type ReactNode } from \"react\";\nimport { cn } from \"../utils\";\nimport { usePortalKeyboardEvent } from \"../utils/usePortalKeyboardEvent\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type ModalProps = {\n /**\n * The content to be rendered inside the modal\n */\n children: ReactNode;\n /**\n * Whether the modal is open\n */\n open: boolean;\n /**\n * Callback fired when the modal is closed\n */\n onClose: () => void;\n /**\n * Additional class names to be applied to the modal\n */\n className?: string;\n /**\n * Whether to show the close button\n * @default true\n */\n showCloseButton?: boolean;\n};\n\nexport const Modal = ({\n children,\n open,\n onClose,\n className,\n showCloseButton = true\n}: ModalProps) => {\n usePortalKeyboardEvent(\n { Escape: onClose },\n { isActive: open, preventScroll: true }\n );\n\n return (\n <Dialog.Root open={open} onOpenChange={onClose}>\n <Dialog.Portal>\n <Dialog.Overlay\n className={cn(\n \"fixed inset-0 z-50 bg-sidebarOverlay backdrop-blur-[2px]\",\n \"data-[state=open]:animate-overlay-show\",\n \"data-[state=closed]:animate-overlay-hide\"\n )}\n />\n <Dialog.Content\n className={cn(\n \"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2\",\n \"w-[90vw] max-w-[90vw] max-h-[90vh]\",\n \"rounded-xl overflow-hidden\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out\",\n \"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n \"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95\",\n \"data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2\",\n \"data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]\",\n className\n )}\n >\n {children}\n {showCloseButton && (\n <Dialog.Close asChild>\n <Pressable\n className=\"inline-flex items-center justify-center text-secondary absolute top-4 right-4\"\n aria-label=\"Close\"\n >\n <Icon name=\"close\" size={12} />\n </Pressable>\n </Dialog.Close>\n )}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n\nModal.displayName = \"Modal\";\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\nimport { Breakpoint } from \"../utils/responsive\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { useCallback, useRef, useState } from \"react\";\nimport { cn } from \"../utils\";\nimport { Modal } from \"./Modal\";\nimport { Text } from \"./Text\";\n\nexport type AspectRatio = \"16:9\" | \"9:16\" | \"4:3\" | \"1:1\";\n\nexport type VideoPlayerProps = {\n /**\n * The URL of the video to play\n */\n src: string;\n /**\n * Whether the video modal is open\n */\n open: boolean;\n /**\n * Callback fired when the video modal is closed\n */\n onClose: () => void;\n /**\n * The caption to display in the bottom left corner\n */\n caption?: React.ReactNode;\n /**\n * The aspect ratio of the video\n * @default \"16:9\"\n */\n aspectRatio?: AspectRatio;\n /**\n * Additional class names to be applied to the video container\n */\n className?: string;\n};\n\nconst aspectRatioClasses: Record<AspectRatio, string> = {\n \"16:9\": \"aspect-video\",\n \"9:16\": \"aspect-[9/16]\",\n \"4:3\": \"aspect-[4/3]\",\n \"1:1\": \"aspect-square\"\n};\n\nexport const VideoPlayer = ({\n src,\n open,\n onClose,\n caption,\n aspectRatio = \"16:9\",\n className\n}: VideoPlayerProps) => {\n const videoRef = useRef<HTMLVideoElement>(null);\n const [isHovering, setIsHovering] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovering(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovering(false);\n }, []);\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n showCloseButton={isHovering}\n className={cn(\"rounded-xl\", className)}\n >\n <div\n className={cn(\n \"w-full max-h-[90vh]\",\n aspectRatioClasses[aspectRatio],\n \"relative w-full h-full flex items-center justify-center\"\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <video\n ref={videoRef}\n src={src}\n className=\"w-full h-full object-contain\"\n controls\n autoPlay\n />\n {caption && (\n <div className=\"absolute left-4 bottom-16 flex flex-col gap-1 p-2 rounded-lg bg-overlay max-w-[80%]\">\n <Text variant=\"body-default-medium\" className=\"text-white\">\n {caption}\n </Text>\n </div>\n )}\n </div>\n </Modal>\n );\n};\n\nVideoPlayer.displayName = \"VideoPlayer\";\n"]}
@@ -1,8 +1,8 @@
1
- 'use strict';var i=require('react'),icons=require('@deckai/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var i__default=/*#__PURE__*/_interopDefault(i);function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var b={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888",danger:"#FF0000"},A={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},P=e=>{if(!e)return {width:"24px",height:"24px"};let s=Array.isArray(e)?e:[e],r={},t;return s.forEach(o=>{if(typeof o=="number")t=`${o}px`;else {let[n,a]=o.split(":"),l=parseInt(a,10);r[`@media (min-width: ${A[n]})`]=`${l}px`;}}),{width:t||"24px",height:t||"24px",...Object.entries(r).reduce((o,[n,a])=>({...o,[n]:{width:a,height:a}}),{})}},c=i__default.default.forwardRef(({name:e,size:s=24,color:r="primary",title:t,className:o,style:n={},...a},l)=>{let u=icons.IconMap[e],p=P(s);return i__default.default.createElement("div",{className:m("flex justify-center items-center",o),style:{...p,"--icon-stroke":b[r],...n}},i__default.default.createElement(u,{ref:l,"aria-hidden":!t,"aria-label":t,stroke:e.includes("filled")?void 0:b[r],...a}))});c.displayName="Icon";var C={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},R=e=>{let[s,r]=e.split("-");return s==="heading"?C[r]||"p":s==="label"?"label":"p"},S={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},w=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[t,o]=r.split(":");return `${t}:text-${o}`}return `text-${r}`}).join(" "):"text-body-default",d=i__default.default.forwardRef(({variant:e="body-default",color:s="primary",as:r,className:t,children:o,weight:n,...a},l)=>{let u=w(e),p=s==="inherit"?"text-inherit":`text-${s}`,L=i__default.default.useMemo(()=>{let E=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return R(E)},[e]);return i__default.default.createElement(r||L,{ref:l,className:`
1
+ 'use strict';var l=require('react'),icons=require('@deckai/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var l__default=/*#__PURE__*/_interopDefault(l);function c(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var f={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]"},b={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]"}},y=e=>String(e),M=(e,p=24)=>{let r=[],s={};if(e===undefined){let t=y(p);t?r.push(f[t]):(s.height=`${p}px`,s.width=`${p}px`);}if(typeof e=="number"){let t=y(e);t?r.push(f[t]):(s.height=`${e}px`,s.width=`${e}px`);}if(Array.isArray(e)){let t=y(p),n=[t&&f[t]||`h-[${p}px] w-[${p}px]`];e.forEach(o=>{if(typeof o=="string"){let[i,x]=o.split(":"),a=parseInt(x,10),m=y(a);r.push(m&&b[i]?.[m]||`${i}:h-[${a}px] ${i}:w-[${a}px]`);}}),r.push(...n);}if(typeof e=="string"){let[t,n]=e.split(":"),o=parseInt(n,10),i=y(o);r.push(i&&b[t]?.[i]||`${t}:h-[${o}px] ${t}:w-[${o}px]`);}return {responsiveSizeClasses:r.join(" "),responsiveSizeStyles:s}};var H={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888",danger:"#FF0000"},h=l__default.default.forwardRef(({name:e,size:p=24,color:r="primary",title:s,className:t,style:n={},...o},i)=>{let x=icons.IconMap[e],{responsiveSizeClasses:a,responsiveSizeStyles:m}=M(p,24);return l__default.default.createElement("div",{className:c("flex justify-center items-center",a,t),style:{"--icon-stroke":H[r],...m,...n}},l__default.default.createElement(x,{ref:i,"aria-hidden":!s,"aria-label":s,stroke:e.includes("filled")?undefined:H[r],...o}))});h.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},P=e=>{let[p,r]=e.split("-");return p==="heading"?A[r]||"p":p==="label"?"label":"p"},N={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},I=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[s,t]=r.split(":");return `${s}:text-${t}`}return `text-${r}`}).join(" "):"text-body-default",d=l__default.default.forwardRef(({variant:e="body-default",color:p="primary",as:r,className:s,children:t,weight:n,...o},i)=>{let x=I(e),a=p==="inherit"?"text-inherit":`text-${p}`,m=l__default.default.useMemo(()=>{let S=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return P(S)},[e]);return l__default.default.createElement(r||m,{ref:i,className:`
2
2
  font-sans antialiased
3
- ${u}
4
- ${p}
5
- ${n&&`!${S[n]}`}
6
- ${t}
7
- `,...a},o)});d.displayName="Text";var h="focus-visible:outline-none focus-visible:border-2 focus-visible:border-primary-100";var y=i__default.default.forwardRef(({children:e,type:s="button",className:r,disabled:t,...o},n)=>i__default.default.createElement("button",{ref:n,type:s,disabled:t,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",h,t&&"opacity-50 cursor-not-allowed",r),...o},e));y.displayName="Pressable";var M=({children:e,color:s="primary",className:r,onClose:t,...o})=>{let[n,a]=i.useState(!1),l=i.useCallback(()=>{a(!0);},[]),u=i.useCallback(()=>{a(!1);},[]),p=i__default.default.createElement("div",{className:m("flex gap-2",t?"justify-between items-center":"items-center justify-center","hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white",s==="primary"?"text-primary-100":"text-primary",r),onMouseEnter:l,onMouseLeave:u},typeof e=="string"?i__default.default.createElement(d,{color:"inherit",variant:["md:body-default-medium","body-xxs-medium"],className:"truncate pt-0.5"},e):e,t&&i__default.default.createElement(y,{...o,onClick:t,className:"flex items-center justify-center"},i__default.default.createElement(c,{name:"close",size:10,color:n?"white":"primaryBlue"})));return t?p:i__default.default.createElement(y,{...o},p)};var de=({socialIconName:e,tags:s,caption:r,playCount:t,backgroundImage:o,onClick:n})=>i__default.default.createElement(y,{onClick:n},i__default.default.createElement("div",{className:"flex flex-col justify-between p-4 sm:w-[227px] sm:h-[371px] w-[148px] h-[234px] rounded-2xl relative overflow-hidden",style:{backgroundColor:"#e7e7e7",backgroundImage:`url(${o})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},i__default.default.createElement("div",{className:"flex justify-between items-center"},i__default.default.createElement("div",{className:"flex items-center justify-center bg-overlay h-10 w-10 rounded-full"},i__default.default.createElement(c,{name:e,size:20,color:"white"})),s&&i__default.default.createElement("div",{className:"flex gap-2 items-center"},s.map((a,l)=>i__default.default.createElement(M,{key:l,color:"text"},a)))),i__default.default.createElement("div",{className:"flex flex-col gap-1 p-2 rounded-lg bg-overlay max-h-[60px] overflow-hidden"},i__default.default.createElement(d,{variant:"body-default-medium",className:"text-white truncate"},r),t&&i__default.default.createElement("div",{className:"flex gap-2"},i__default.default.createElement(c,{name:"play",size:16,color:"white"}),i__default.default.createElement(d,{variant:"body-xs-medium",className:"text-white"},t)))));exports.WorkCard=de;//# sourceMappingURL=WorkCard.cjs.map
3
+ ${x}
4
+ ${a}
5
+ ${n&&`!${N[n]}`}
6
+ ${s}
7
+ `,...o},t)});d.displayName="Text";var E="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100";var g=l__default.default.forwardRef(({children:e,type:p="button",className:r,disabled:s,...t},n)=>l__default.default.createElement("button",{ref:n,type:p,disabled:s,className:c("appearance-none hover:opacity-80 transition-all active:scale-95",E,s&&"opacity-50 cursor-not-allowed",r),...t},e));g.displayName="Pressable";var $=({children:e,color:p="primary",className:r,onClose:s,...t})=>{let[n,o]=l.useState(false),i=l.useCallback(()=>{o(true);},[]),x=l.useCallback(()=>{o(false);},[]),a=l__default.default.createElement("div",{className:c("flex gap-2",s?"justify-between items-center":"items-center justify-center","hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white",p==="primary"?"text-primary-100":"text-primary",r),onMouseEnter:i,onMouseLeave:x},typeof e=="string"?l__default.default.createElement(d,{color:"inherit",variant:["md:body-default-medium","body-xxs-medium"],className:"truncate pt-0.5"},e):e,s&&l__default.default.createElement(g,{...t,onClick:s,className:"flex items-center justify-center"},l__default.default.createElement(h,{name:"close",size:10,color:n?"white":"primaryBlue"})));return s?a:l__default.default.createElement(g,{...t},a)};var ue=({socialIconName:e,tags:p,caption:r,playCount:s,backgroundImage:t,onClick:n,className:o})=>l__default.default.createElement(g,{onClick:n},l__default.default.createElement("div",{className:`flex flex-col justify-between p-4 sm:w-[227px] sm:h-[371px] w-[148px] h-[234px] rounded-2xl relative overflow-hidden ${o}`,style:{backgroundColor:"#e7e7e7",backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}},l__default.default.createElement("div",{className:"flex justify-between items-center"},l__default.default.createElement("div",{className:"flex items-center justify-center bg-overlay h-10 w-10 rounded-full"},l__default.default.createElement(h,{name:e,size:20,color:"white"})),p&&l__default.default.createElement("div",{className:"flex gap-2 items-center"},p.map((i,x)=>l__default.default.createElement($,{key:x,color:"text"},i)))),l__default.default.createElement("div",{className:"flex flex-col gap-1 p-2 rounded-lg bg-overlay max-h-[60px] overflow-hidden"},l__default.default.createElement(d,{variant:"body-default-medium",className:"text-white truncate"},r),s&&l__default.default.createElement("div",{className:"flex gap-2"},l__default.default.createElement(h,{name:"play",size:16,color:"white"}),l__default.default.createElement(d,{variant:"body-xs-medium",className:"text-white"},s)))));exports.WorkCard=ue;//# sourceMappingURL=WorkCard.cjs.map
8
8
  //# sourceMappingURL=WorkCard.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/Tag.tsx","../../src/components/WorkCard.tsx"],"names":["cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","sizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","children","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","focusRingStyles","Pressable","type","disabled","Tag","onClose","pressableProps","isHovered","setIsHovered","useState","handleMouseEnter","useCallback","handleMouseLeave","content","WorkCard","socialIconName","tags","caption","playCount","backgroundImage","onClick","tag","index"],"mappings":"gPAGO,SAASA,KAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAAA,CAAQC,SAAKF,CAAAA,CAAM,CAAC,CAC7B,CCcA,IAAMG,CAAwC,CAAA,CAC5C,QAAS,SACT,CAAA,SAAA,CAAW,SACX,CAAA,KAAA,CAAO,SACP,CAAA,WAAA,CAAa,UACb,QAAU,CAAA,SAAA,CACV,MAAQ,CAAA,SACV,CAEMC,CAAAA,CAAAA,CAA6C,CACjD,EAAI,CAAA,OAAA,CACJ,EAAI,CAAA,OAAA,CACJ,EAAI,CAAA,QAAA,CACJ,GAAI,QACJ,CAAA,KAAA,CAAO,QACT,CAEMC,CAAAA,CAAAA,CACJC,GACwB,CACxB,GAAI,CAACA,CAAAA,CAAO,OAAO,CAAE,MAAO,MAAQ,CAAA,MAAA,CAAQ,MAAO,CAAA,CAEnD,IAAMC,CAAAA,CAAY,MAAM,OAAQD,CAAAA,CAAK,CAAIA,CAAAA,CAAAA,CAAQ,CAACA,CAAK,EACjDE,CAAuC,CAAA,EACzCC,CAAAA,CAAAA,CAGJ,OAAAF,CAAAA,CAAU,QAASG,CAAS,EAAA,CAC1B,GAAI,OAAOA,CAAS,EAAA,QAAA,CAClBD,EAAW,CAAGC,EAAAA,CAAI,CACb,EAAA,CAAA,CAAA,KAAA,CACL,GAAM,CAACC,EAAYC,CAAQ,CAAA,CAAIF,CAAK,CAAA,KAAA,CAAM,GAAG,CAAA,CACvCG,EAAQ,QAASD,CAAAA,CAAAA,CAAU,EAAE,CACnCJ,CA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A,CAACK,CAAKC,CAAAA,CAAAA,GACdjD,mBAAA,aAAC+B,CAAAA,CAAAA,CAAA,CAAI,GAAA,CAAKkB,EAAO,KAAM,CAAA,MAAA,CAAA,CACpBD,CACH,CACD,CACH,CAEJ,CAAA,CACAhD,kBAAA,CAAA,aAAA,CAAC,OAAI,SAAU,CAAA,4EAAA,CAAA,CACbA,kBAAA,CAAA,aAAA,CAACmB,EAAA,CAAK,OAAA,CAAQ,qBAAsB,CAAA,SAAA,CAAU,uBAC3CyB,CACH,CAAA,CACCC,CACC7C,EAAAA,kBAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,YACbA,CAAAA,CAAAA,kBAAAA,CAAA,cAACD,CAAA,CAAA,CAAK,IAAK,CAAA,MAAA,CAAO,KAAM,EAAI,CAAA,KAAA,CAAM,OAAQ,CAAA,CAAA,CAC1CC,mBAAA,aAACmB,CAAAA,CAAAA,CAAA,CAAK,OAAA,CAAQ,iBAAiB,SAAU,CAAA,YAAA,CAAA,CACtC0B,CACH,CACF,CAEJ,CACF,CACF","file":"WorkCard.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","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\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\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\",\n danger: \"#FF0000\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\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 sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\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 React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\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 { 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\n const safelist: 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 breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\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 return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:border-2 focus-visible:border-primary-100\";\n\nexport const focusRingStylesCoerced = \"border-2 border-primary-100\";\n","import React, { useState, useCallback, HTMLAttributes } from \"react\";\nimport { Text } from \"./Text\";\nimport { Pressable, PressableProps } from \"./Pressable\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\n\nexport type TagProps = {\n children: React.ReactNode;\n padded?: boolean;\n color?: \"primary\" | \"text\";\n onClose?: () => void;\n} & HTMLAttributes<HTMLDivElement> &\n PressableProps;\n\nexport const Tag = ({\n children,\n color = \"primary\",\n className,\n onClose,\n ...pressableProps\n}: TagProps) => {\n const [isHovered, setIsHovered] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const content = (\n <div\n className={cn(\n \"flex gap-2\",\n onClose\n ? \"justify-between items-center\"\n : \"items-center justify-center\",\n \"hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white\",\n color === \"primary\" ? \"text-primary-100\" : \"text-primary\",\n className\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n {typeof children === \"string\" ? (\n <Text\n color=\"inherit\"\n variant={[\"md:body-default-medium\", \"body-xxs-medium\"]}\n className=\"truncate pt-0.5\"\n >\n {children}\n </Text>\n ) : (\n children\n )}\n {onClose && (\n <Pressable\n {...pressableProps}\n onClick={onClose}\n className=\"flex items-center justify-center\"\n >\n <Icon\n name=\"close\"\n size={10}\n color={isHovered ? \"white\" : \"primaryBlue\"}\n />\n </Pressable>\n )}\n </div>\n );\n\n return onClose ? (\n content\n ) : (\n <Pressable {...pressableProps}>{content}</Pressable>\n );\n};\n","import React from \"react\";\nimport { Icon } from \"./Icon\";\nimport { Tag } from \"./Tag\";\nimport { Text } from \"./Text\";\nimport { Pressable } from \"./Pressable\";\n\nexport type WorkCardProps = {\n socialIconName: \"instagram-filled\" | \"tiktok-filled\" | \"youtube-filled\";\n tags?: string[];\n caption: string;\n /** play count should already be formatted with k or m */\n playCount?: string;\n backgroundImage: string;\n onClick: () => void;\n};\n\nexport const WorkCard = ({\n socialIconName,\n tags,\n caption,\n playCount,\n backgroundImage,\n onClick\n}: WorkCardProps) => {\n return (\n <Pressable onClick={onClick}>\n <div\n className={`flex flex-col justify-between p-4 sm:w-[227px] sm:h-[371px] w-[148px] h-[234px] rounded-2xl relative overflow-hidden`}\n style={{\n backgroundColor: \"#e7e7e7\",\n backgroundImage: `url(${backgroundImage})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n backgroundRepeat: \"no-repeat\"\n }}\n >\n <div className=\"flex justify-between items-center\">\n <div className=\"flex items-center justify-center bg-overlay h-10 w-10 rounded-full\">\n <Icon name={socialIconName} size={20} color=\"white\" />\n </div>\n {tags && (\n <div className=\"flex gap-2 items-center\">\n {tags.map((tag, index) => (\n <Tag key={index} color=\"text\">\n {tag}\n </Tag>\n ))}\n </div>\n )}\n </div>\n <div className=\"flex flex-col gap-1 p-2 rounded-lg bg-overlay max-h-[60px] overflow-hidden\">\n <Text variant=\"body-default-medium\" className=\"text-white truncate\">\n {caption}\n </Text>\n {playCount && (\n <div className=\"flex gap-2\">\n <Icon name=\"play\" size={16} color=\"white\" />\n <Text variant=\"body-xs-medium\" className=\"text-white\">\n {playCount}\n </Text>\n </div>\n )}\n </div>\n </div>\n </Pressable>\n );\n};\n"]}
1
+ {"version":3,"sources":["../../src/utils/index.ts","../../src/utils/responsive.ts","../../src/components/Icon.tsx","../../src/components/Tag.tsx","../../src/components/Text.tsx","../../src/components/Pressable.tsx","../../src/utils/tailwind.ts","../../src/components/WorkCard.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","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","children","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","focusRingStyles","Pressable","type","disabled","Tag","onClose","pressableProps","isHovered","setIsHovered","useState","handleMouseEnter","useCallback","handleMouseLeave","content","WorkCard","socialIconName","tags","caption","playCount","backgroundImage","onClick","tag","index"],"mappings":"gPAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCaA,IAAMG,CAAAA,CAAsC,CAC1C,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAAA,CAAM,oBACN,EAAM,CAAA,mBAAA,CACN,EAAM,CAAA,mBAAA,CACN,GAAM,mBACN,CAAA,EAA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OAAQ,CAAA,CAAA,CAC1CC,mBAAA,aAACoB,CAAAA,CAAAA,CAAA,CAAK,OAAA,CAAQ,iBAAiB,SAAU,CAAA,YAAA,CAAA,CACtC0B,CACH,CACF,CAEJ,CACF,CACF","file":"WorkCard.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 { IconMap, IconName } from \"@deckai/icons\";\nimport React, { SVGProps } from \"react\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\nimport { ResponsiveSize, 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\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\",\n danger: \"#FF0000\"\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 React, { useState, useCallback, HTMLAttributes } from \"react\";\nimport { Text } from \"./Text\";\nimport { Pressable, PressableProps } from \"./Pressable\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\n\nexport type TagProps = {\n children: React.ReactNode;\n padded?: boolean;\n color?: \"primary\" | \"text\";\n onClose?: () => void;\n} & HTMLAttributes<HTMLDivElement> &\n PressableProps;\n\nexport const Tag = ({\n children,\n color = \"primary\",\n className,\n onClose,\n ...pressableProps\n}: TagProps) => {\n const [isHovered, setIsHovered] = useState(false);\n\n const handleMouseEnter = useCallback(() => {\n setIsHovered(true);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n setIsHovered(false);\n }, []);\n\n const content = (\n <div\n className={cn(\n \"flex gap-2\",\n onClose\n ? \"justify-between items-center\"\n : \"items-center justify-center\",\n \"hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white\",\n color === \"primary\" ? \"text-primary-100\" : \"text-primary\",\n className\n )}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n {typeof children === \"string\" ? (\n <Text\n color=\"inherit\"\n variant={[\"md:body-default-medium\", \"body-xxs-medium\"]}\n className=\"truncate pt-0.5\"\n >\n {children}\n </Text>\n ) : (\n children\n )}\n {onClose && (\n <Pressable\n {...pressableProps}\n onClick={onClose}\n className=\"flex items-center justify-center\"\n >\n <Icon\n name=\"close\"\n size={10}\n color={isHovered ? \"white\" : \"primaryBlue\"}\n />\n </Pressable>\n )}\n </div>\n );\n\n return onClose ? (\n content\n ) : (\n <Pressable {...pressableProps}>{content}</Pressable>\n );\n};\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\nimport { Breakpoint } from \"../utils/responsive\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\"\n | \"primary-100\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses = color === \"inherit\" ? \"text-inherit\" : `text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`\n font-sans antialiased\n ${typographyClasses}\n ${colorClasses}\n ${weight && `!${fontWeight[weight]}`}\n ${className}\n `}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\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 { 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 React from \"react\";\nimport { Icon } from \"./Icon\";\nimport { Tag } from \"./Tag\";\nimport { Text } from \"./Text\";\nimport { Pressable } from \"./Pressable\";\n\nexport type WorkCardProps = {\n socialIconName: \"instagram-filled\" | \"tiktok-filled\" | \"youtube-filled\";\n tags?: string[];\n caption: string;\n /** play count should already be formatted with k or m */\n playCount?: string;\n backgroundImage: string;\n onClick: () => void;\n className?: string;\n};\n\nexport const WorkCard = ({\n socialIconName,\n tags,\n caption,\n playCount,\n backgroundImage,\n onClick,\n className\n}: WorkCardProps) => {\n return (\n <Pressable onClick={onClick}>\n <div\n className={`flex flex-col justify-between p-4 sm:w-[227px] sm:h-[371px] w-[148px] h-[234px] rounded-2xl relative overflow-hidden ${className}`}\n style={{\n backgroundColor: \"#e7e7e7\",\n backgroundImage: `url(${backgroundImage})`,\n backgroundSize: \"cover\",\n backgroundPosition: \"center\",\n backgroundRepeat: \"no-repeat\"\n }}\n >\n <div className=\"flex justify-between items-center\">\n <div className=\"flex items-center justify-center bg-overlay h-10 w-10 rounded-full\">\n <Icon name={socialIconName} size={20} color=\"white\" />\n </div>\n {tags && (\n <div className=\"flex gap-2 items-center\">\n {tags.map((tag, index) => (\n <Tag key={index} color=\"text\">\n {tag}\n </Tag>\n ))}\n </div>\n )}\n </div>\n <div className=\"flex flex-col gap-1 p-2 rounded-lg bg-overlay max-h-[60px] overflow-hidden\">\n <Text variant=\"body-default-medium\" className=\"text-white truncate\">\n {caption}\n </Text>\n {playCount && (\n <div className=\"flex gap-2\">\n <Icon name=\"play\" size={16} color=\"white\" />\n <Text variant=\"body-xs-medium\" className=\"text-white\">\n {playCount}\n </Text>\n </div>\n )}\n </div>\n </div>\n </Pressable>\n );\n};\n"]}
@@ -8,7 +8,8 @@ type WorkCardProps = {
8
8
  playCount?: string;
9
9
  backgroundImage: string;
10
10
  onClick: () => void;
11
+ className?: string;
11
12
  };
12
- declare const WorkCard: ({ socialIconName, tags, caption, playCount, backgroundImage, onClick }: WorkCardProps) => React__default.JSX.Element;
13
+ declare const WorkCard: ({ socialIconName, tags, caption, playCount, backgroundImage, onClick, className }: WorkCardProps) => React__default.JSX.Element;
13
14
 
14
15
  export { WorkCard, type WorkCardProps };
@@ -8,7 +8,8 @@ type WorkCardProps = {
8
8
  playCount?: string;
9
9
  backgroundImage: string;
10
10
  onClick: () => void;
11
+ className?: string;
11
12
  };
12
- declare const WorkCard: ({ socialIconName, tags, caption, playCount, backgroundImage, onClick }: WorkCardProps) => React__default.JSX.Element;
13
+ declare const WorkCard: ({ socialIconName, tags, caption, playCount, backgroundImage, onClick, className }: WorkCardProps) => React__default.JSX.Element;
13
14
 
14
15
  export { WorkCard, type WorkCardProps };