@deckai/deck-ui 0.0.10 → 0.0.13

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 (169) hide show
  1. package/README.md +127 -1
  2. package/dist/components/AboutCard.cjs +3 -7
  3. package/dist/components/AboutCard.cjs.map +1 -1
  4. package/dist/components/AboutCard.d.cts +3 -2
  5. package/dist/components/AboutCard.d.ts +3 -2
  6. package/dist/components/AboutCard.js +3 -7
  7. package/dist/components/AboutCard.js.map +1 -1
  8. package/dist/components/Avatar.cjs +1 -1
  9. package/dist/components/Avatar.cjs.map +1 -1
  10. package/dist/components/Avatar.d.cts +3 -1
  11. package/dist/components/Avatar.d.ts +3 -1
  12. package/dist/components/Avatar.js +1 -1
  13. package/dist/components/Avatar.js.map +1 -1
  14. package/dist/components/Badge.cjs +1 -1
  15. package/dist/components/Badge.cjs.map +1 -1
  16. package/dist/components/Badge.d.cts +2 -2
  17. package/dist/components/Badge.d.ts +2 -2
  18. package/dist/components/Badge.js +1 -1
  19. package/dist/components/Badge.js.map +1 -1
  20. package/dist/components/Breadcrumbs.cjs +1 -1
  21. package/dist/components/Breadcrumbs.cjs.map +1 -1
  22. package/dist/components/Breadcrumbs.js +1 -1
  23. package/dist/components/Breadcrumbs.js.map +1 -1
  24. package/dist/components/Button.cjs +3 -7
  25. package/dist/components/Button.cjs.map +1 -1
  26. package/dist/components/Button.d.cts +11 -1
  27. package/dist/components/Button.d.ts +11 -1
  28. package/dist/components/Button.js +3 -7
  29. package/dist/components/Button.js.map +1 -1
  30. package/dist/components/Collapsible.cjs +2 -0
  31. package/dist/components/Collapsible.cjs.map +1 -0
  32. package/dist/components/Collapsible.d.cts +12 -0
  33. package/dist/components/Collapsible.d.ts +12 -0
  34. package/dist/components/Collapsible.js +2 -0
  35. package/dist/components/Collapsible.js.map +1 -0
  36. package/dist/components/Combobox.cjs +1 -1
  37. package/dist/components/Combobox.cjs.map +1 -1
  38. package/dist/components/Combobox.d.cts +7 -1
  39. package/dist/components/Combobox.d.ts +7 -1
  40. package/dist/components/Combobox.js +1 -1
  41. package/dist/components/Combobox.js.map +1 -1
  42. package/dist/components/ContactItem.cjs +1 -1
  43. package/dist/components/ContactItem.cjs.map +1 -1
  44. package/dist/components/ContactItem.d.cts +2 -3
  45. package/dist/components/ContactItem.d.ts +2 -3
  46. package/dist/components/ContactItem.js +1 -1
  47. package/dist/components/ContactItem.js.map +1 -1
  48. package/dist/components/EditButton.cjs +10 -0
  49. package/dist/components/EditButton.cjs.map +1 -0
  50. package/dist/components/EditButton.d.cts +12 -0
  51. package/dist/components/EditButton.d.ts +12 -0
  52. package/dist/components/EditButton.js +10 -0
  53. package/dist/components/EditButton.js.map +1 -0
  54. package/dist/components/Icon.cjs +1 -1
  55. package/dist/components/Icon.cjs.map +1 -1
  56. package/dist/components/Icon.d.cts +4 -3
  57. package/dist/components/Icon.d.ts +4 -3
  58. package/dist/components/Icon.js +1 -1
  59. package/dist/components/Icon.js.map +1 -1
  60. package/dist/components/IconRenderer.cjs +2 -0
  61. package/dist/components/IconRenderer.cjs.map +1 -0
  62. package/dist/components/IconRenderer.d.cts +13 -0
  63. package/dist/components/IconRenderer.d.ts +13 -0
  64. package/dist/components/IconRenderer.js +2 -0
  65. package/dist/components/IconRenderer.js.map +1 -0
  66. package/dist/components/Illustration.cjs +50 -0
  67. package/dist/components/Illustration.cjs.map +1 -0
  68. package/dist/components/Illustration.d.cts +10 -0
  69. package/dist/components/Illustration.d.ts +10 -0
  70. package/dist/components/Illustration.js +50 -0
  71. package/dist/components/Illustration.js.map +1 -0
  72. package/dist/components/Input.cjs +1 -1
  73. package/dist/components/Input.cjs.map +1 -1
  74. package/dist/components/Input.d.cts +6 -2
  75. package/dist/components/Input.d.ts +6 -2
  76. package/dist/components/Input.js +1 -1
  77. package/dist/components/Input.js.map +1 -1
  78. package/dist/components/Link.cjs +1 -1
  79. package/dist/components/Link.cjs.map +1 -1
  80. package/dist/components/Link.d.cts +1 -1
  81. package/dist/components/Link.d.ts +1 -1
  82. package/dist/components/Link.js +1 -1
  83. package/dist/components/Link.js.map +1 -1
  84. package/dist/components/Logo.cjs +1 -1
  85. package/dist/components/Logo.cjs.map +1 -1
  86. package/dist/components/Logo.d.cts +2 -5
  87. package/dist/components/Logo.d.ts +2 -5
  88. package/dist/components/Logo.js +1 -1
  89. package/dist/components/Logo.js.map +1 -1
  90. package/dist/components/MultiSelectCombobox.cjs +2 -0
  91. package/dist/components/MultiSelectCombobox.cjs.map +1 -0
  92. package/dist/components/MultiSelectCombobox.d.cts +21 -0
  93. package/dist/components/MultiSelectCombobox.d.ts +21 -0
  94. package/dist/components/MultiSelectCombobox.js +2 -0
  95. package/dist/components/MultiSelectCombobox.js.map +1 -0
  96. package/dist/components/Navbar.cjs +2 -2
  97. package/dist/components/Navbar.cjs.map +1 -1
  98. package/dist/components/Navbar.d.cts +1 -1
  99. package/dist/components/Navbar.d.ts +1 -1
  100. package/dist/components/Navbar.js +2 -2
  101. package/dist/components/Navbar.js.map +1 -1
  102. package/dist/components/NavbarItem.cjs +1 -1
  103. package/dist/components/NavbarItem.cjs.map +1 -1
  104. package/dist/components/NavbarItem.d.cts +1 -1
  105. package/dist/components/NavbarItem.d.ts +1 -1
  106. package/dist/components/NavbarItem.js +1 -1
  107. package/dist/components/NavbarItem.js.map +1 -1
  108. package/dist/components/Pressable.cjs +1 -1
  109. package/dist/components/Pressable.cjs.map +1 -1
  110. package/dist/components/Pressable.js +1 -1
  111. package/dist/components/Pressable.js.map +1 -1
  112. package/dist/components/ProfileCard.cjs +3 -7
  113. package/dist/components/ProfileCard.cjs.map +1 -1
  114. package/dist/components/ProfileCard.d.cts +3 -1
  115. package/dist/components/ProfileCard.d.ts +3 -1
  116. package/dist/components/ProfileCard.js +3 -7
  117. package/dist/components/ProfileCard.js.map +1 -1
  118. package/dist/components/Sidebar.cjs +2 -0
  119. package/dist/components/Sidebar.cjs.map +1 -0
  120. package/dist/components/Sidebar.d.cts +37 -0
  121. package/dist/components/Sidebar.d.ts +37 -0
  122. package/dist/components/Sidebar.js +2 -0
  123. package/dist/components/Sidebar.js.map +1 -0
  124. package/dist/components/SocialCard.cjs +1 -1
  125. package/dist/components/SocialCard.cjs.map +1 -1
  126. package/dist/components/SocialCard.js +1 -1
  127. package/dist/components/SocialCard.js.map +1 -1
  128. package/dist/components/Spinner.cjs +2 -0
  129. package/dist/components/Spinner.cjs.map +1 -0
  130. package/dist/components/Spinner.d.cts +19 -0
  131. package/dist/components/Spinner.d.ts +19 -0
  132. package/dist/components/Spinner.js +2 -0
  133. package/dist/components/Spinner.js.map +1 -0
  134. package/dist/components/Tabs.cjs +1 -1
  135. package/dist/components/Tabs.cjs.map +1 -1
  136. package/dist/components/Tabs.js +1 -1
  137. package/dist/components/Tabs.js.map +1 -1
  138. package/dist/components/Tag.cjs +1 -1
  139. package/dist/components/Tag.cjs.map +1 -1
  140. package/dist/components/Tag.d.cts +4 -2
  141. package/dist/components/Tag.d.ts +4 -2
  142. package/dist/components/Tag.js +1 -1
  143. package/dist/components/Tag.js.map +1 -1
  144. package/dist/components/Text.cjs +1 -1
  145. package/dist/components/Text.cjs.map +1 -1
  146. package/dist/components/Text.d.cts +2 -2
  147. package/dist/components/Text.d.ts +2 -2
  148. package/dist/components/Text.js +1 -1
  149. package/dist/components/Text.js.map +1 -1
  150. package/dist/components/TextArea.cjs +2 -0
  151. package/dist/components/TextArea.cjs.map +1 -0
  152. package/dist/components/TextArea.d.cts +19 -0
  153. package/dist/components/TextArea.d.ts +19 -0
  154. package/dist/components/TextArea.js +2 -0
  155. package/dist/components/TextArea.js.map +1 -0
  156. package/dist/components/WorkCard.cjs +1 -1
  157. package/dist/components/WorkCard.cjs.map +1 -1
  158. package/dist/components/WorkCard.js +1 -1
  159. package/dist/components/WorkCard.js.map +1 -1
  160. package/dist/index.cjs +51 -7
  161. package/dist/index.cjs.map +1 -1
  162. package/dist/index.d.cts +99 -23
  163. package/dist/index.d.ts +99 -23
  164. package/dist/index.js +51 -7
  165. package/dist/index.js.map +1 -1
  166. package/dist/styles/styles.css +1 -1
  167. package/dist/{tailwind-DJFscIlV.d.cts → tailwind-CIZ10fKA.d.cts} +4 -3
  168. package/dist/{tailwind-DJFscIlV.d.ts → tailwind-CIZ10fKA.d.ts} +4 -3
  169. package/package.json +4 -2
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useMediaQuery.ts","../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Sidebar.tsx"],"names":["useIsomorphicLayoutEffect","useEffect","useMediaQuery","query","matches","setMatches","useState","getMatches","useCallback","mediaQuery","handleChange","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","sizeStyles","focusRingStyles","Pressable","children","type","disabled","Sidebar","open","onClose","width","footer","position","isMobile","handleEscapeKey","event","positionClasses","useMemo","r"],"mappings":"0nBAEA,IAAMA,CACJ,CAAA,OAAO,MAAW,CAAA,GAAA,CAAcC,YAAY,IAAM,EAEvCC,CAAAA,CAAAA,CAAiBC,GAA2B,CAEvD,GAAM,CAACC,CAAAA,CAASC,CAAU,CAAIC,CAAAA,UAAAA,CAAyB,IAAI,CAAA,CAErDC,EAAaC,aAAaL,CAAAA,CAAAA,EAC1B,OAAO,MAAA,CAAW,IACb,MAAO,CAAA,UAAA,CAAWA,CAAK,CAAA,CAAE,QAE3B,CACN,CAAA,CAAA,EAAE,CAAA,CAGL,OAAAH,CAA0B,CAAA,IAAM,CAC9BK,CAAAA,CAAWE,EAAWJ,CAAK,CAAC,EAC9B,CAAA,CAAG,CAACA,CAAOI,CAAAA,CAAU,CAAC,CAAA,CAEtBN,YAAU,IAAM,CACd,GAAI,OAAO,OAAW,GAAa,CAAA,CACjC,IAAMQ,CAAAA,CAAa,MAAO,CAAA,UAAA,C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,KAAA,CAAP,CAAa,SAAA,CAAU,sCACrBxB,CACH,CAAA,CACAH,kBAAA,CAAA,aAAA,CAAQ2B,mBAAP,CAAa,OAAA,CAAO,CACnB3B,CAAAA,CAAAA,CAAAA,kBAAAA,CAAA,cAACY,CAAA,CAAA,CACC,SAAU,CAAA,+FAAA,CACV,aAAW,OAEXZ,CAAAA,CAAAA,kBAAAA,CAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,OAAA,CAAQ,IAAM,CAAA,EAAA,CAAI,CAC/B,CACF,CACF,CAGAC,CAAAA,kBAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,4BAA8Ba,CAAAA,CAAAA,CAAS,EAGrDO,CAAUpB,EAAAA,kBAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,WAAaoB,CAAAA,CAAAA,CAAO,CAChD,CACF,CACF,CAEJ","file":"Sidebar.cjs","sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\n\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useEffect : () => {};\n\nexport const useMediaQuery = (query: string): boolean => {\n // Initialize with null to prevent hydration mismatch\n const [matches, setMatches] = useState<boolean | null>(null);\n\n const getMatches = useCallback((query: string): boolean => {\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n }, []);\n\n // Update matches after mount to prevent hydration mismatch\n useIsomorphicLayoutEffect(() => {\n setMatches(getMatches(query));\n }, [query, getMatches]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n const mediaQuery = window.matchMedia(query);\n\n const handleChange = () => {\n setMatches(getMatches(query));\n };\n\n mediaQuery.addEventListener(\"change\", handleChange);\n\n return () => {\n mediaQuery.removeEventListener(\"change\", handleChange);\n };\n }\n }, [query, getMatches]);\n\n // Return false during SSR, actual value after hydration\n return matches ?? false;\n};\n","import { 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};\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 { 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:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React, { useCallback, useEffect, useMemo, type ReactNode } from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { useMediaQuery } from \"../hooks/useMediaQuery\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type SidebarProps = {\n /**\n * The content to be rendered inside the sidebar\n */\n children: ReactNode;\n /**\n * Whether the sidebar is open\n */\n open: boolean;\n /**\n * Callback fired when the sidebar is closed\n */\n onClose: () => void;\n /** @default left */\n position?: \"left\" | \"right\";\n /**\n * The width of the sidebar on desktop. Defaults to 480px.\n */\n width?: number;\n /**\n * Additional class names to be applied to the sidebar\n */\n className?: string;\n /**\n * The title to display in the header\n */\n title?: string;\n /**\n * Optional footer content\n */\n footer?: ReactNode;\n};\n\nexport const Sidebar = ({\n children,\n open,\n onClose,\n width = 480,\n className,\n title,\n footer,\n position = \"left\"\n}: SidebarProps) => {\n const isMobile = useMediaQuery(\"(max-width: 834px)\");\n\n // Handle escape key press\n const handleEscapeKey = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose();\n }\n },\n [onClose]\n );\n\n useEffect(() => {\n if (open) {\n document.addEventListener(\"keydown\", handleEscapeKey);\n // Prevent body scroll when sidebar is open\n document.body.style.overflow = \"hidden\";\n } else {\n // Ensure we clean up when sidebar is closed\n document.removeEventListener(\"keydown\", handleEscapeKey);\n document.body.style.overflow = \"unset\";\n }\n\n return () => {\n document.removeEventListener(\"keydown\", handleEscapeKey);\n document.body.style.overflow = \"unset\";\n };\n }, [open, handleEscapeKey]);\n\n const positionClasses = useMemo(\n () =>\n position === \"right\"\n ? {\n position: \"right-0\",\n enter: \"data-[state=open]:animate-slide-in-from-right\",\n exit: \"data-[state=closed]:animate-slide-out-to-right\",\n transform: \"translate-x-full\"\n }\n : {\n position: \"left-0\",\n enter: \"data-[state=open]:animate-slide-in-from-left\",\n exit: \"data-[state=closed]:animate-slide-out-to-left\",\n transform: \"-translate-x-full\"\n },\n [position]\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 top-0 z-50 flex h-full flex-col bg-white\",\n positionClasses.position,\n positionClasses.enter,\n positionClasses.exit,\n // During SSR, default to desktop layout\n typeof window === \"undefined\" || !isMobile\n ? position === \"right\"\n ? \"border-l\"\n : \"border-r\"\n : \"w-full\",\n \"border-stroke\",\n className\n )}\n style={{\n width: typeof window === \"undefined\" || !isMobile ? width : \"100%\"\n }}\n >\n {/* Header */}\n <div className=\"flex items-center justify-between border-b border-secondary-50 px-8 py-6\">\n <Dialog.Title className=\"text-heading-xs text-center w-full\">\n {title}\n </Dialog.Title>\n <Dialog.Close asChild>\n <Pressable\n className=\"inline-flex items-center justify-center text-text-secondary hover:bg-secondary-100 rounded-lg\"\n aria-label=\"Close\"\n >\n <Icon name=\"close\" size={12} />\n </Pressable>\n </Dialog.Close>\n </div>\n\n {/* Content */}\n <div className=\"flex-1 overflow-y-auto p-6\">{children}</div>\n\n {/* Footer */}\n {footer && <div className=\"px-6 pb-6\">{footer}</div>}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n"]}
@@ -0,0 +1,37 @@
1
+ import React__default, { ReactNode } from 'react';
2
+
3
+ type SidebarProps = {
4
+ /**
5
+ * The content to be rendered inside the sidebar
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * Whether the sidebar is open
10
+ */
11
+ open: boolean;
12
+ /**
13
+ * Callback fired when the sidebar is closed
14
+ */
15
+ onClose: () => void;
16
+ /** @default left */
17
+ position?: "left" | "right";
18
+ /**
19
+ * The width of the sidebar on desktop. Defaults to 480px.
20
+ */
21
+ width?: number;
22
+ /**
23
+ * Additional class names to be applied to the sidebar
24
+ */
25
+ className?: string;
26
+ /**
27
+ * The title to display in the header
28
+ */
29
+ title?: string;
30
+ /**
31
+ * Optional footer content
32
+ */
33
+ footer?: ReactNode;
34
+ };
35
+ declare const Sidebar: ({ children, open, onClose, width, className, title, footer, position }: SidebarProps) => React__default.JSX.Element;
36
+
37
+ export { Sidebar, type SidebarProps };
@@ -0,0 +1,37 @@
1
+ import React__default, { ReactNode } from 'react';
2
+
3
+ type SidebarProps = {
4
+ /**
5
+ * The content to be rendered inside the sidebar
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * Whether the sidebar is open
10
+ */
11
+ open: boolean;
12
+ /**
13
+ * Callback fired when the sidebar is closed
14
+ */
15
+ onClose: () => void;
16
+ /** @default left */
17
+ position?: "left" | "right";
18
+ /**
19
+ * The width of the sidebar on desktop. Defaults to 480px.
20
+ */
21
+ width?: number;
22
+ /**
23
+ * Additional class names to be applied to the sidebar
24
+ */
25
+ className?: string;
26
+ /**
27
+ * The title to display in the header
28
+ */
29
+ title?: string;
30
+ /**
31
+ * Optional footer content
32
+ */
33
+ footer?: ReactNode;
34
+ };
35
+ declare const Sidebar: ({ children, open, onClose, width, className, title, footer, position }: SidebarProps) => React__default.JSX.Element;
36
+
37
+ export { Sidebar, type SidebarProps };
@@ -0,0 +1,2 @@
1
+ import i,{useCallback,useEffect,useMemo,useState}from'react';import*as r from'@radix-ui/react-dialog';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';var S=typeof window<"u"?useEffect:()=>{},h=e=>{let[n,s]=useState(null),t=useCallback(o=>typeof window<"u"?window.matchMedia(o).matches:!1,[]);return S(()=>{s(t(e));},[e,t]),useEffect(()=>{if(typeof window<"u"){let o=window.matchMedia(e),a=()=>{s(t(e));};return o.addEventListener("change",a),()=>{o.removeEventListener("change",a);}}},[e,t]),n??!1};function p(...e){return twMerge(clsx(e))}var y={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},M={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},I=e=>{if(!e)return {width:"24px",height:"24px"};let n=Array.isArray(e)?e:[e],s={},t;return n.forEach(o=>{if(typeof o=="number")t=`${o}px`;else {let[a,l]=o.split(":"),c=parseInt(l,10);s[`@media (min-width: ${M[a]})`]=`${c}px`;}}),{width:t||"24px",height:t||"24px",...Object.entries(s).reduce((o,[a,l])=>({...o,[a]:{width:l,height:l}}),{})}},g=i.forwardRef(({name:e,size:n=24,color:s="primary",title:t,className:o,style:a={},...l},c)=>{let f=IconMap[e],d=I(n);return i.createElement("div",{className:p("flex justify-center items-center",o),style:{...d,"--icon-stroke":y[s],...a}},i.createElement(f,{ref:c,"aria-hidden":!t,"aria-label":t,stroke:e.includes("filled")?void 0:y[s],...l}))});g.displayName="Icon";var x="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var v=({children:e,type:n="button",className:s,disabled:t,...o})=>i.createElement("button",{type:n,disabled:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${x} ${s} ${t?"opacity-50 cursor-not-allowed":""}`,...o},e);var te=({children:e,open:n,onClose:s,width:t=480,className:o,title:a,footer:l,position:c="left"})=>{let f=h("(max-width: 834px)"),d=useCallback(w=>{w.key==="Escape"&&s();},[s]);useEffect(()=>(n?(document.addEventListener("keydown",d),document.body.style.overflow="hidden"):(document.removeEventListener("keydown",d),document.body.style.overflow="unset"),()=>{document.removeEventListener("keydown",d),document.body.style.overflow="unset";}),[n,d]);let m=useMemo(()=>c==="right"?{position:"right-0",enter:"data-[state=open]:animate-slide-in-from-right",exit:"data-[state=closed]:animate-slide-out-to-right",transform:"translate-x-full"}:{position:"left-0",enter:"data-[state=open]:animate-slide-in-from-left",exit:"data-[state=closed]:animate-slide-out-to-left",transform:"-translate-x-full"},[c]);return i.createElement(r.Root,{open:n,onOpenChange:s},i.createElement(r.Portal,null,i.createElement(r.Overlay,{className:p("fixed inset-0 z-50 bg-sidebarOverlay backdrop-blur-[2px]","data-[state=open]:animate-overlay-show","data-[state=closed]:animate-overlay-hide")}),i.createElement(r.Content,{className:p("fixed top-0 z-50 flex h-full flex-col bg-white",m.position,m.enter,m.exit,typeof window>"u"||!f?c==="right"?"border-l":"border-r":"w-full","border-stroke",o),style:{width:typeof window>"u"||!f?t:"100%"}},i.createElement("div",{className:"flex items-center justify-between border-b border-secondary-50 px-8 py-6"},i.createElement(r.Title,{className:"text-heading-xs text-center w-full"},a),i.createElement(r.Close,{asChild:!0},i.createElement(v,{className:"inline-flex items-center justify-center text-text-secondary hover:bg-secondary-100 rounded-lg","aria-label":"Close"},i.createElement(g,{name:"close",size:12})))),i.createElement("div",{className:"flex-1 overflow-y-auto p-6"},e),l&&i.createElement("div",{className:"px-6 pb-6"},l))))};if (exports.default) module.exports = exports.default;export{te as Sidebar};//# sourceMappingURL=Sidebar.js.map
2
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/useMediaQuery.ts","../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Sidebar.tsx"],"names":["useIsomorphicLayoutEffect","useEffect","useMediaQuery","query","matches","setMatches","useState","getMatches","useCallback","mediaQuery","handleChange","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","sizeStyles","focusRingStyles","Pressable","children","type","disabled","Sidebar","open","onClose","width","footer","position","isMobile","handleEscapeKey","event","positionClasses","useMemo"],"mappings":"uMAEA,IAAMA,CACJ,CAAA,OAAO,MAAW,CAAA,GAAA,CAAcC,UAAY,IAAM,EAEvCC,CAAAA,CAAAA,CAAiBC,GAA2B,CAEvD,GAAM,CAACC,CAAAA,CAASC,CAAU,CAAIC,CAAAA,QAAAA,CAAyB,IAAI,CAAA,CAErDC,EAAaC,WAAaL,CAAAA,CAAAA,EAC1B,OAAO,MAAA,CAAW,IACb,MAAO,CAAA,UAAA,CAAWA,CAAK,CAAA,CAAE,QAE3B,CACN,CAAA,CAAA,EAAE,CAAA,CAGL,OAAAH,CAA0B,CAAA,IAAM,CAC9BK,CAAAA,CAAWE,EAAWJ,CAAK,CAAC,EAC9B,CAAA,CAAG,CAACA,CAAOI,CAAAA,CAAU,CAAC,CAAA,CAEtBN,UAAU,IAAM,CACd,GAAI,OAAO,OAAW,GAAa,CAAA,CACjC,IAAMQ,CAAAA,CAAa,MAAO,CAAA,UAAA,CAAWN,CAAK,CAAA,CAEpCO,EAAe,IAAM,CACzBL,CAAWE,CAAAA,CAAAA,CAAWJ,CAAK,CAAC,EAC9B,CAEA,CAAA,OAAAM,EAAW,gBAAiB,CAAA,QAAA,CAAUC,CAAY,CAAA,CAE3C,IAAM,CACXD,CAAAA,CAAW,m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A,CAAAA,CAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,OAAA,CAAQ,IAAM,CAAA,EAAA,CAAI,CAC/B,CACF,CACF,CAGAC,CAAAA,CAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,4BAA8Ba,CAAAA,CAAAA,CAAS,EAGrDO,CAAUpB,EAAAA,CAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,WAAaoB,CAAAA,CAAAA,CAAO,CAChD,CACF,CACF,CAEJ","file":"Sidebar.js","sourcesContent":["import { useCallback, useEffect, useState } from \"react\";\n\nconst useIsomorphicLayoutEffect =\n typeof window !== \"undefined\" ? useEffect : () => {};\n\nexport const useMediaQuery = (query: string): boolean => {\n // Initialize with null to prevent hydration mismatch\n const [matches, setMatches] = useState<boolean | null>(null);\n\n const getMatches = useCallback((query: string): boolean => {\n if (typeof window !== \"undefined\") {\n return window.matchMedia(query).matches;\n }\n return false;\n }, []);\n\n // Update matches after mount to prevent hydration mismatch\n useIsomorphicLayoutEffect(() => {\n setMatches(getMatches(query));\n }, [query, getMatches]);\n\n useEffect(() => {\n if (typeof window !== \"undefined\") {\n const mediaQuery = window.matchMedia(query);\n\n const handleChange = () => {\n setMatches(getMatches(query));\n };\n\n mediaQuery.addEventListener(\"change\", handleChange);\n\n return () => {\n mediaQuery.removeEventListener(\"change\", handleChange);\n };\n }\n }, [query, getMatches]);\n\n // Return false during SSR, actual value after hydration\n return matches ?? false;\n};\n","import { 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};\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 { 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:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React, { useCallback, useEffect, useMemo, type ReactNode } from \"react\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { useMediaQuery } from \"../hooks/useMediaQuery\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type SidebarProps = {\n /**\n * The content to be rendered inside the sidebar\n */\n children: ReactNode;\n /**\n * Whether the sidebar is open\n */\n open: boolean;\n /**\n * Callback fired when the sidebar is closed\n */\n onClose: () => void;\n /** @default left */\n position?: \"left\" | \"right\";\n /**\n * The width of the sidebar on desktop. Defaults to 480px.\n */\n width?: number;\n /**\n * Additional class names to be applied to the sidebar\n */\n className?: string;\n /**\n * The title to display in the header\n */\n title?: string;\n /**\n * Optional footer content\n */\n footer?: ReactNode;\n};\n\nexport const Sidebar = ({\n children,\n open,\n onClose,\n width = 480,\n className,\n title,\n footer,\n position = \"left\"\n}: SidebarProps) => {\n const isMobile = useMediaQuery(\"(max-width: 834px)\");\n\n // Handle escape key press\n const handleEscapeKey = useCallback(\n (event: KeyboardEvent) => {\n if (event.key === \"Escape\") {\n onClose();\n }\n },\n [onClose]\n );\n\n useEffect(() => {\n if (open) {\n document.addEventListener(\"keydown\", handleEscapeKey);\n // Prevent body scroll when sidebar is open\n document.body.style.overflow = \"hidden\";\n } else {\n // Ensure we clean up when sidebar is closed\n document.removeEventListener(\"keydown\", handleEscapeKey);\n document.body.style.overflow = \"unset\";\n }\n\n return () => {\n document.removeEventListener(\"keydown\", handleEscapeKey);\n document.body.style.overflow = \"unset\";\n };\n }, [open, handleEscapeKey]);\n\n const positionClasses = useMemo(\n () =>\n position === \"right\"\n ? {\n position: \"right-0\",\n enter: \"data-[state=open]:animate-slide-in-from-right\",\n exit: \"data-[state=closed]:animate-slide-out-to-right\",\n transform: \"translate-x-full\"\n }\n : {\n position: \"left-0\",\n enter: \"data-[state=open]:animate-slide-in-from-left\",\n exit: \"data-[state=closed]:animate-slide-out-to-left\",\n transform: \"-translate-x-full\"\n },\n [position]\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 top-0 z-50 flex h-full flex-col bg-white\",\n positionClasses.position,\n positionClasses.enter,\n positionClasses.exit,\n // During SSR, default to desktop layout\n typeof window === \"undefined\" || !isMobile\n ? position === \"right\"\n ? \"border-l\"\n : \"border-r\"\n : \"w-full\",\n \"border-stroke\",\n className\n )}\n style={{\n width: typeof window === \"undefined\" || !isMobile ? width : \"100%\"\n }}\n >\n {/* Header */}\n <div className=\"flex items-center justify-between border-b border-secondary-50 px-8 py-6\">\n <Dialog.Title className=\"text-heading-xs text-center w-full\">\n {title}\n </Dialog.Title>\n <Dialog.Close asChild>\n <Pressable\n className=\"inline-flex items-center justify-center text-text-secondary hover:bg-secondary-100 rounded-lg\"\n aria-label=\"Close\"\n >\n <Icon name=\"close\" size={12} />\n </Pressable>\n </Dialog.Close>\n </div>\n\n {/* Content */}\n <div className=\"flex-1 overflow-y-auto p-6\">{children}</div>\n\n {/* Footer */}\n {footer && <div className=\"px-6 pb-6\">{footer}</div>}\n </Dialog.Content>\n </Dialog.Portal>\n </Dialog.Root>\n );\n};\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var s=require('react'),icons=require('@deckai/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var s__default=/*#__PURE__*/_interopDefault(s);var g="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var u=({children:e,type:t="button",className:r,...o})=>s__default.default.createElement("button",{type:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${g} ${r}`,...o},e);function h(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var f={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},C={sm:"@media (min-width: 640px)",md:"@media (min-width: 768px)",lg:"@media (min-width: 1024px)",xl:"@media (min-width: 1280px)","2xl":"@media (min-width: 1536px)"},$=e=>{if(!e)return {width:"24px",height:"24px"};let t=Array.isArray(e)?e:[e],r=typeof t[0]=="number"?t[0]:24,o={width:`${r}px`,height:`${r}px`},a=t.filter(n=>typeof n=="string"&&n.includes(":")).reduce((n,p)=>{let[l,i]=p.split(":");return n[C[l]]={width:`${i}px`,height:`${i}px`},n},{});return Object.keys(a).length>0&&(o["@media"]=a),o},m=s__default.default.forwardRef(({name:e,size:t=24,color:r="primary",title:o,className:a,style:n={},...p},l)=>{let i=icons.IconMap[e],y=$(t);return s__default.default.createElement("div",{className:h("flex justify-center items-center",a),style:{...y,"--icon-stroke":f[r],...n}},s__default.default.createElement(i,{ref:l,"aria-hidden":!o,"aria-label":o,stroke:e.includes("filled")?void 0:f[r],...p}))});m.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},S=e=>{let[t,r]=e.split("-");return t==="heading"?A[r]||"p":t==="label"?"label":"p"},R={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[o,a]=r.split(":");return `${o}:text-${a}`}return Array.isArray(e)?`lg:text-${r}`:`text-${r}`}).join(" "):"text-body-default",c=s__default.default.forwardRef(({variant:e="body-default",color:t="text-primary",as:r,className:o,children:a,weight:n,...p},l)=>{let i=P(e),y=t&&t==="inherit"?"inherit":t?`text-${t}`:"",b=s__default.default.useMemo(()=>{let x=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return S(x)},[e]);return s__default.default.createElement(r||b,{ref:l,className:`font-sans antialiased ${i} ${y} ${n?`!${R[n]}`:""} ${o??""}`,...p},a)});c.displayName="Text";var Z=({icon:e,followers:t,engagement:r,...o})=>s__default.default.createElement(u,{...o},s__default.default.createElement("div",{className:"flex gap-4 px-6 py-4 border border-secondary rounded-lg"},s__default.default.createElement(m,{name:e,size:40}),s__default.default.createElement("div",{className:"flex items-center"},s__default.default.createElement(m,{name:"profile",size:20}),s__default.default.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},t)),s__default.default.createElement("div",{className:"flex items-center"},s__default.default.createElement(m,{name:"arrow-swap-horizontal",className:"rotate-90",size:20}),s__default.default.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},r))));if (exports.default) module.exports = exports.default;exports.SocialCard=Z;//# sourceMappingURL=SocialCard.cjs.map
1
+ 'use strict';var n=require('react'),icons=require('@deckai/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);var g="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var u=({children:e,type:r="button",className:t,disabled:o,...s})=>n__default.default.createElement("button",{type:r,disabled:o,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${g} ${t} ${o?"opacity-50 cursor-not-allowed":""}`,...s},e);function f(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var h={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},C={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},$=e=>{if(!e)return {width:"24px",height:"24px"};let r=Array.isArray(e)?e:[e],t={},o;return r.forEach(s=>{if(typeof s=="number")o=`${s}px`;else {let[a,i]=s.split(":"),l=parseInt(i,10);t[`@media (min-width: ${C[a]})`]=`${l}px`;}}),{width:o||"24px",height:o||"24px",...Object.entries(t).reduce((s,[a,i])=>({...s,[a]:{width:i,height:i}}),{})}},p=n__default.default.forwardRef(({name:e,size:r=24,color:t="primary",title:o,className:s,style:a={},...i},l)=>{let c=icons.IconMap[e],y=$(r);return n__default.default.createElement("div",{className:f("flex justify-center items-center",s),style:{...y,"--icon-stroke":h[t],...a}},n__default.default.createElement(c,{ref:l,"aria-hidden":!o,"aria-label":o,stroke:e.includes("filled")?void 0:h[t],...i}))});p.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},S=e=>{let[r,t]=e.split("-");return r==="heading"?R[t]||"p":r==="label"?"label":"p"},A={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[o,s]=t.split(":");return `${o}:text-${s}`}return `text-${t}`}).join(" "):"text-body-default",m=n__default.default.forwardRef(({variant:e="body-default",color:r="text-primary",as:t,className:o,children:s,weight:a,...i},l)=>{let c=P(e),y=r&&r==="inherit"?"inherit":r?`text-${r}`:"",b=n__default.default.useMemo(()=>{let x=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return S(x)},[e]);return n__default.default.createElement(t||b,{ref:l,className:`font-sans antialiased ${c} ${y} ${a?`!${A[a]}`:""} ${o??""}`,...i},s)});m.displayName="Text";var Z=({icon:e,followers:r,engagement:t,...o})=>n__default.default.createElement(u,{className:"sm:w-max w-full hover:bg-secondary-400",...o},n__default.default.createElement("div",{className:"flex sm:flex-row flex-col items-center sm:gap-4 gap-1 sm:px-6 sm:py-4 p-2 border border-secondary rounded-lg"},n__default.default.createElement(p,{name:e,size:["lg:40",32],color:"primaryBlue"}),n__default.default.createElement("div",{className:"flex items-center sm:pt-0 pt-3"},n__default.default.createElement(p,{name:"profile",size:["sm:20",16]}),n__default.default.createElement(m,{variant:["body-default-medium","md:body-xs-medium"]},r)),n__default.default.createElement("div",{className:"flex items-center"},n__default.default.createElement(p,{name:"like-1",size:["sm:20",16]}),n__default.default.createElement(m,{variant:["body-default-medium","md:body-xs-medium"]},t))));if (exports.default) module.exports = exports.default;exports.SocialCard=Z;//# sourceMappingURL=SocialCard.cjs.map
2
2
  //# sourceMappingURL=SocialCard.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/utils/index.ts","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","Pressable","children","type","className","props","React","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","baseSize","style","mediaQueries","size","acc","breakpoint","value","Icon","name","color","title","ref","IconComponent","IconMap","sizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","SocialCard","icon","followers","engagement","pressableProps"],"mappings":"gPAmEO,IAAMA,CAAAA,CACX,qGC/DK,CAAA,IAAMC,CAAsC,CAAA,CAAC,CAClD,QAAA,CAAAC,EACA,IAAAC,CAAAA,CAAAA,CAAO,QACP,CAAA,SAAA,CAAAC,CACA,CAAA,GAAGC,CACL,CAAA,GACEC,mBAAA,aAAC,CAAA,QAAA,CAAA,CAEC,IAAMH,CAAAA,CAAAA,CACN,SAAW,CAAA,CAAA,gEAAA,EAAmEH,CAAe,CAAA,CAAA,EAAII,CAAS,CACzG,CAAA,CAAA,GAAGC,CAEHH,CAAAA,CAAAA,CACH,CClBF,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AA,CAAI,UAAU,yDACbA,CAAAA,CAAAA,kBAAAA,CAAA,aAACiB,CAAAA,CAAAA,CAAA,CAAK,IAAA,CAAMwB,CAAM,CAAA,IAAA,CAAM,GAAI,CAC5BzC,CAAAA,kBAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,mBAAA,CAAA,CACbA,kBAAA,CAAA,aAAA,CAACiB,EAAA,CAAK,IAAA,CAAK,SAAU,CAAA,IAAA,CAAM,EAAI,CAAA,CAAA,CAC/BjB,kBAAA,CAAA,aAAA,CAACiC,EAAA,CAAK,OAAA,CAAS,CAAC,qBAAA,CAAuB,mBAAmB,CAAA,CAAA,CACvDS,CACH,CACF,EACA1C,kBAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,mBACbA,CAAAA,CAAAA,kBAAAA,CAAA,aAACiB,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,uBAAA,CAAwB,SAAU,CAAA,WAAA,CAAY,IAAM,CAAA,EAAA,CAAI,CACnEjB,CAAAA,kBAAAA,CAAA,cAACiC,CAAA,CAAA,CAAK,OAAS,CAAA,CAAC,sBAAuB,mBAAmB,CAAA,CAAA,CACvDU,CACH,CACF,CACF,CACF","file":"SocialCard.cjs","sourcesContent":["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:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: number | `${Breakpoint}:${number}`;\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};\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"@media (min-width: 640px)\",\n md: \"@media (min-width: 768px)\",\n lg: \"@media (min-width: 1024px)\",\n xl: \"@media (min-width: 1280px)\",\n \"2xl\": \"@media (min-width: 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 baseSize = typeof sizeArray[0] === \"number\" ? sizeArray[0] : 24;\n\n const style: React.CSSProperties = {\n width: `${baseSize}px`,\n height: `${baseSize}px`\n };\n\n // Add media queries for responsive sizes\n const mediaQueries = sizeArray\n .filter(\n (size): size is `${Breakpoint}:${number}` =>\n typeof size === \"string\" && size.includes(\":\")\n )\n .reduce(\n (acc, size) => {\n const [breakpoint, value] = size.split(\":\") as [Breakpoint, string];\n acc[BREAKPOINT_MAP[breakpoint]] = {\n width: `${value}px`,\n height: `${value}px`\n };\n return acc;\n },\n {} as Record<string, React.CSSProperties>\n );\n\n if (Object.keys(mediaQueries).length > 0) {\n (style as any)[\"@media\"] = mediaQueries;\n }\n\n return style;\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 { 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 {\n Colors,\n TextColorVariant,\n PrimaryShades,\n SecondaryShades,\n TertiaryShades,\n Typography\n} 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 ColorCategory = keyof Omit<Colors, \"stroke\" | \"background\">;\ntype ColorValue<T extends ColorCategory> = T extends \"text\"\n ? TextColorVariant\n : T extends \"primary\"\n ? keyof PrimaryShades\n : T extends \"secondary\"\n ? keyof SecondaryShades\n : T extends \"tertiary\"\n ? keyof TertiaryShades\n : never;\n\ntype ColorKey = {\n [T in ColorCategory]: `${T}-${ColorValue<T>}`;\n}[ColorCategory];\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\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\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: ColorKey | \"inherit\";\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 Array.isArray(variants) ? `lg:text-${variant}` : `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"text-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 =\n color && color === \"inherit\" ? \"inherit\" : color ? `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={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React from \"react\";\nimport { Pressable, PressableProps } from \"./Pressable\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\nimport { IconName } from \"@deckai/icons\";\n\nexport type SocialCardProps = {\n icon: IconName;\n followers: string;\n engagement: string;\n} & PressableProps;\n\nexport const SocialCard = ({\n icon,\n followers,\n engagement,\n ...pressableProps\n}: SocialCardProps) => (\n <Pressable {...pressableProps}>\n <div className=\"flex gap-4 px-6 py-4 border border-secondary rounded-lg\">\n <Icon name={icon} size={40} />\n <div className=\"flex items-center\">\n <Icon name=\"profile\" size={20} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {followers}\n </Text>\n </div>\n <div className=\"flex items-center\">\n <Icon name=\"arrow-swap-horizontal\" className=\"rotate-90\" size={20} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {engagement}\n </Text>\n </div>\n </div>\n </Pressable>\n);\n"]}
1
+ {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/utils/index.ts","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","Pressable","children","type","className","disabled","props","React","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","name","color","title","style","ref","IconComponent","IconMap","sizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","SocialCard","icon","followers","engagement","pressableProps"],"mappings":"gPAmEO,IAAMA,CAAAA,CACX,qGC/DK,CAAA,IAAMC,CAAsC,CAAA,CAAC,CAClD,QAAA,CAAAC,EACA,IAAAC,CAAAA,CAAAA,CAAO,QACP,CAAA,SAAA,CAAAC,CACA,CAAA,QAAA,CAAAC,CACA,CAAA,GAAGC,CACL,CACEC,GAAAA,kBAAAA,CAAA,aAAC,CAAA,QAAA,CAAA,CAEC,KAAMJ,CACN,CAAA,QAAA,CAAUE,CACV,CAAA,SAAA,CAAW,mEAAmEL,CAAe,CAAA,CAAA,EAAII,CAAS,CAAA,CAAA,EAA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AE,CAAG,CAAA,KAAA,CAAM,aAAc,CAAA,CAAA,CAC3D3C,mBAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,gCAAA,CAAA,CACbA,kBAAA,CAAA,aAAA,CAACkB,CAAA,CAAA,CAAK,KAAK,SAAU,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAG,CAAA,CAAA,CAC1ClB,kBAAA,CAAA,aAAA,CAACmC,EAAA,CAAK,OAAA,CAAS,CAAC,qBAAA,CAAuB,mBAAmB,CAAA,CAAA,CACvDS,CACH,CACF,EACA5C,kBAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,qBACbA,kBAAA,CAAA,aAAA,CAACkB,CAAA,CAAA,CAAK,KAAK,QAAS,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAAG,CACzClB,CAAAA,kBAAAA,CAAA,cAACmC,CAAA,CAAA,CAAK,OAAS,CAAA,CAAC,sBAAuB,mBAAmB,CAAA,CAAA,CACvDU,CACH,CACF,CACF,CACF","file":"SocialCard.cjs","sourcesContent":["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:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\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};\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 { 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 {\n Colors,\n TextColorVariant,\n PrimaryShades,\n SecondaryShades,\n TertiaryShades,\n Typography\n} 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 ColorCategory = keyof Omit<Colors, \"stroke\" | \"background\">;\ntype ColorValue<T extends ColorCategory> = T extends \"text\"\n ? TextColorVariant\n : T extends \"primary\"\n ? keyof PrimaryShades\n : T extends \"secondary\"\n ? keyof SecondaryShades\n : T extends \"tertiary\"\n ? keyof TertiaryShades\n : never;\n\ntype ColorKey = {\n [T in ColorCategory]: `${T}-${ColorValue<T>}`;\n}[ColorCategory];\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\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\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: ColorKey | \"inherit\";\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 = \"text-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 =\n color && color === \"inherit\" ? \"inherit\" : color ? `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={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React from \"react\";\nimport { Pressable, PressableProps } from \"./Pressable\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\nimport { IconName } from \"@deckai/icons\";\n\nexport type SocialCardProps = {\n icon: IconName;\n followers: string;\n engagement: string;\n} & PressableProps;\n\nexport const SocialCard = ({\n icon,\n followers,\n engagement,\n ...pressableProps\n}: SocialCardProps) => (\n <Pressable\n className=\"sm:w-max w-full hover:bg-secondary-400\"\n {...pressableProps}\n >\n <div className=\"flex sm:flex-row flex-col items-center sm:gap-4 gap-1 sm:px-6 sm:py-4 p-2 border border-secondary rounded-lg\">\n <Icon name={icon} size={[\"lg:40\", 32]} color=\"primaryBlue\" />\n <div className=\"flex items-center sm:pt-0 pt-3\">\n <Icon name=\"profile\" size={[\"sm:20\", 16]} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {followers}\n </Text>\n </div>\n <div className=\"flex items-center\">\n <Icon name=\"like-1\" size={[\"sm:20\", 16]} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {engagement}\n </Text>\n </div>\n </div>\n </Pressable>\n);\n"]}
@@ -1,2 +1,2 @@
1
- import s from'react';import {IconMap}from'@deckai/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';var g="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var u=({children:e,type:t="button",className:r,...o})=>s.createElement("button",{type:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${g} ${r}`,...o},e);function h(...e){return twMerge(clsx(e))}var f={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},C={sm:"@media (min-width: 640px)",md:"@media (min-width: 768px)",lg:"@media (min-width: 1024px)",xl:"@media (min-width: 1280px)","2xl":"@media (min-width: 1536px)"},$=e=>{if(!e)return {width:"24px",height:"24px"};let t=Array.isArray(e)?e:[e],r=typeof t[0]=="number"?t[0]:24,o={width:`${r}px`,height:`${r}px`},a=t.filter(n=>typeof n=="string"&&n.includes(":")).reduce((n,p)=>{let[l,i]=p.split(":");return n[C[l]]={width:`${i}px`,height:`${i}px`},n},{});return Object.keys(a).length>0&&(o["@media"]=a),o},m=s.forwardRef(({name:e,size:t=24,color:r="primary",title:o,className:a,style:n={},...p},l)=>{let i=IconMap[e],y=$(t);return s.createElement("div",{className:h("flex justify-center items-center",a),style:{...y,"--icon-stroke":f[r],...n}},s.createElement(i,{ref:l,"aria-hidden":!o,"aria-label":o,stroke:e.includes("filled")?void 0:f[r],...p}))});m.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},S=e=>{let[t,r]=e.split("-");return t==="heading"?A[r]||"p":t==="label"?"label":"p"},R={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[o,a]=r.split(":");return `${o}:text-${a}`}return Array.isArray(e)?`lg:text-${r}`:`text-${r}`}).join(" "):"text-body-default",c=s.forwardRef(({variant:e="body-default",color:t="text-primary",as:r,className:o,children:a,weight:n,...p},l)=>{let i=P(e),y=t&&t==="inherit"?"inherit":t?`text-${t}`:"",b=s.useMemo(()=>{let x=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return S(x)},[e]);return s.createElement(r||b,{ref:l,className:`font-sans antialiased ${i} ${y} ${n?`!${R[n]}`:""} ${o??""}`,...p},a)});c.displayName="Text";var Z=({icon:e,followers:t,engagement:r,...o})=>s.createElement(u,{...o},s.createElement("div",{className:"flex gap-4 px-6 py-4 border border-secondary rounded-lg"},s.createElement(m,{name:e,size:40}),s.createElement("div",{className:"flex items-center"},s.createElement(m,{name:"profile",size:20}),s.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},t)),s.createElement("div",{className:"flex items-center"},s.createElement(m,{name:"arrow-swap-horizontal",className:"rotate-90",size:20}),s.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},r))));if (exports.default) module.exports = exports.default;export{Z as SocialCard};//# sourceMappingURL=SocialCard.js.map
1
+ import n from'react';import {IconMap}from'@deckai/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';var g="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var u=({children:e,type:r="button",className:t,disabled:o,...s})=>n.createElement("button",{type:r,disabled:o,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${g} ${t} ${o?"opacity-50 cursor-not-allowed":""}`,...s},e);function f(...e){return twMerge(clsx(e))}var h={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},C={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},$=e=>{if(!e)return {width:"24px",height:"24px"};let r=Array.isArray(e)?e:[e],t={},o;return r.forEach(s=>{if(typeof s=="number")o=`${s}px`;else {let[a,i]=s.split(":"),l=parseInt(i,10);t[`@media (min-width: ${C[a]})`]=`${l}px`;}}),{width:o||"24px",height:o||"24px",...Object.entries(t).reduce((s,[a,i])=>({...s,[a]:{width:i,height:i}}),{})}},p=n.forwardRef(({name:e,size:r=24,color:t="primary",title:o,className:s,style:a={},...i},l)=>{let c=IconMap[e],y=$(r);return n.createElement("div",{className:f("flex justify-center items-center",s),style:{...y,"--icon-stroke":h[t],...a}},n.createElement(c,{ref:l,"aria-hidden":!o,"aria-label":o,stroke:e.includes("filled")?void 0:h[t],...i}))});p.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},S=e=>{let[r,t]=e.split("-");return r==="heading"?R[t]||"p":r==="label"?"label":"p"},A={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[o,s]=t.split(":");return `${o}:text-${s}`}return `text-${t}`}).join(" "):"text-body-default",m=n.forwardRef(({variant:e="body-default",color:r="text-primary",as:t,className:o,children:s,weight:a,...i},l)=>{let c=P(e),y=r&&r==="inherit"?"inherit":r?`text-${r}`:"",b=n.useMemo(()=>{let x=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return S(x)},[e]);return n.createElement(t||b,{ref:l,className:`font-sans antialiased ${c} ${y} ${a?`!${A[a]}`:""} ${o??""}`,...i},s)});m.displayName="Text";var Z=({icon:e,followers:r,engagement:t,...o})=>n.createElement(u,{className:"sm:w-max w-full hover:bg-secondary-400",...o},n.createElement("div",{className:"flex sm:flex-row flex-col items-center sm:gap-4 gap-1 sm:px-6 sm:py-4 p-2 border border-secondary rounded-lg"},n.createElement(p,{name:e,size:["lg:40",32],color:"primaryBlue"}),n.createElement("div",{className:"flex items-center sm:pt-0 pt-3"},n.createElement(p,{name:"profile",size:["sm:20",16]}),n.createElement(m,{variant:["body-default-medium","md:body-xs-medium"]},r)),n.createElement("div",{className:"flex items-center"},n.createElement(p,{name:"like-1",size:["sm:20",16]}),n.createElement(m,{variant:["body-default-medium","md:body-xs-medium"]},t))));if (exports.default) module.exports = exports.default;export{Z as SocialCard};//# sourceMappingURL=SocialCard.js.map
2
2
  //# sourceMappingURL=SocialCard.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/utils/index.ts","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","Pressable","children","type","className","props","React","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","baseSize","style","mediaQueries","size","acc","breakpoint","value","Icon","name","color","title","ref","IconComponent","IconMap","sizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","SocialCard","icon","followers","engagement","pressableProps"],"mappings":"sHAmEO,IAAMA,CAAAA,CACX,qGC/DK,CAAA,IAAMC,CAAsC,CAAA,CAAC,CAClD,QAAA,CAAAC,EACA,IAAAC,CAAAA,CAAAA,CAAO,QACP,CAAA,SAAA,CAAAC,CACA,CAAA,GAAGC,CACL,CAAA,GACEC,EAAA,aAAC,CAAA,QAAA,CAAA,CAEC,IAAMH,CAAAA,CAAAA,CACN,SAAW,CAAA,CAAA,gEAAA,EAAmEH,CAAe,CAAA,CAAA,EAAII,CAAS,CACzG,CAAA,CAAA,GAAGC,CAEHH,CAAAA,CAAAA,CACH,CClBF,CCGO,SAASK,CAAAA,CAAAA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,CAAAA,CAAA,aAACiB,CAAAA,CAAAA,CAAA,CAAK,IAAA,CAAMwB,CAAM,CAAA,IAAA,CAAM,GAAI,CAC5BzC,CAAAA,CAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,mBAAA,CAAA,CACbA,CAAA,CAAA,aAAA,CAACiB,EAAA,CAAK,IAAA,CAAK,SAAU,CAAA,IAAA,CAAM,EAAI,CAAA,CAAA,CAC/BjB,CAAA,CAAA,aAAA,CAACiC,EAAA,CAAK,OAAA,CAAS,CAAC,qBAAA,CAAuB,mBAAmB,CAAA,CAAA,CACvDS,CACH,CACF,EACA1C,CAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,mBACbA,CAAAA,CAAAA,CAAAA,CAAA,aAACiB,CAAAA,CAAAA,CAAA,CAAK,IAAK,CAAA,uBAAA,CAAwB,SAAU,CAAA,WAAA,CAAY,IAAM,CAAA,EAAA,CAAI,CACnEjB,CAAAA,CAAAA,CAAA,cAACiC,CAAA,CAAA,CAAK,OAAS,CAAA,CAAC,sBAAuB,mBAAmB,CAAA,CAAA,CACvDU,CACH,CACF,CACF,CACF","file":"SocialCard.js","sourcesContent":["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:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: number | `${Breakpoint}:${number}`;\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};\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"@media (min-width: 640px)\",\n md: \"@media (min-width: 768px)\",\n lg: \"@media (min-width: 1024px)\",\n xl: \"@media (min-width: 1280px)\",\n \"2xl\": \"@media (min-width: 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 baseSize = typeof sizeArray[0] === \"number\" ? sizeArray[0] : 24;\n\n const style: React.CSSProperties = {\n width: `${baseSize}px`,\n height: `${baseSize}px`\n };\n\n // Add media queries for responsive sizes\n const mediaQueries = sizeArray\n .filter(\n (size): size is `${Breakpoint}:${number}` =>\n typeof size === \"string\" && size.includes(\":\")\n )\n .reduce(\n (acc, size) => {\n const [breakpoint, value] = size.split(\":\") as [Breakpoint, string];\n acc[BREAKPOINT_MAP[breakpoint]] = {\n width: `${value}px`,\n height: `${value}px`\n };\n return acc;\n },\n {} as Record<string, React.CSSProperties>\n );\n\n if (Object.keys(mediaQueries).length > 0) {\n (style as any)[\"@media\"] = mediaQueries;\n }\n\n return style;\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 { 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 {\n Colors,\n TextColorVariant,\n PrimaryShades,\n SecondaryShades,\n TertiaryShades,\n Typography\n} 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 ColorCategory = keyof Omit<Colors, \"stroke\" | \"background\">;\ntype ColorValue<T extends ColorCategory> = T extends \"text\"\n ? TextColorVariant\n : T extends \"primary\"\n ? keyof PrimaryShades\n : T extends \"secondary\"\n ? keyof SecondaryShades\n : T extends \"tertiary\"\n ? keyof TertiaryShades\n : never;\n\ntype ColorKey = {\n [T in ColorCategory]: `${T}-${ColorValue<T>}`;\n}[ColorCategory];\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\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\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: ColorKey | \"inherit\";\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 Array.isArray(variants) ? `lg:text-${variant}` : `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"text-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 =\n color && color === \"inherit\" ? \"inherit\" : color ? `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={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React from \"react\";\nimport { Pressable, PressableProps } from \"./Pressable\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\nimport { IconName } from \"@deckai/icons\";\n\nexport type SocialCardProps = {\n icon: IconName;\n followers: string;\n engagement: string;\n} & PressableProps;\n\nexport const SocialCard = ({\n icon,\n followers,\n engagement,\n ...pressableProps\n}: SocialCardProps) => (\n <Pressable {...pressableProps}>\n <div className=\"flex gap-4 px-6 py-4 border border-secondary rounded-lg\">\n <Icon name={icon} size={40} />\n <div className=\"flex items-center\">\n <Icon name=\"profile\" size={20} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {followers}\n </Text>\n </div>\n <div className=\"flex items-center\">\n <Icon name=\"arrow-swap-horizontal\" className=\"rotate-90\" size={20} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {engagement}\n </Text>\n </div>\n </div>\n </Pressable>\n);\n"]}
1
+ {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/utils/index.ts","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","Pressable","children","type","className","disabled","props","React","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","name","color","title","style","ref","IconComponent","IconMap","sizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","SocialCard","icon","followers","engagement","pressableProps"],"mappings":"sHAmEO,IAAMA,CAAAA,CACX,qGC/DK,CAAA,IAAMC,CAAsC,CAAA,CAAC,CAClD,QAAA,CAAAC,EACA,IAAAC,CAAAA,CAAAA,CAAO,QACP,CAAA,SAAA,CAAAC,CACA,CAAA,QAAA,CAAAC,CACA,CAAA,GAAGC,CACL,CACEC,GAAAA,CAAAA,CAAA,aAAC,CAAA,QAAA,CAAA,CAEC,KAAMJ,CACN,CAAA,QAAA,CAAUE,CACV,CAAA,SAAA,CAAW,mEAAmEL,CAAe,CAAA,CAAA,EAAII,CAAS,CAAA,CAAA,EAAIC,CAAW,CAAA,+BAAA,CAAkC,EAAE,CAAA,CAAA,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,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,gCAAA,CAAA,CACbA,CAAA,CAAA,aAAA,CAACkB,CAAA,CAAA,CAAK,KAAK,SAAU,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAG,CAAA,CAAA,CAC1ClB,CAAA,CAAA,aAAA,CAACmC,EAAA,CAAK,OAAA,CAAS,CAAC,qBAAA,CAAuB,mBAAmB,CAAA,CAAA,CACvDS,CACH,CACF,EACA5C,CAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,qBACbA,CAAA,CAAA,aAAA,CAACkB,CAAA,CAAA,CAAK,KAAK,QAAS,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAAG,CACzClB,CAAAA,CAAAA,CAAA,cAACmC,CAAA,CAAA,CAAK,OAAS,CAAA,CAAC,sBAAuB,mBAAmB,CAAA,CAAA,CACvDU,CACH,CACF,CACF,CACF","file":"SocialCard.js","sourcesContent":["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:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\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};\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 { 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 {\n Colors,\n TextColorVariant,\n PrimaryShades,\n SecondaryShades,\n TertiaryShades,\n Typography\n} 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 ColorCategory = keyof Omit<Colors, \"stroke\" | \"background\">;\ntype ColorValue<T extends ColorCategory> = T extends \"text\"\n ? TextColorVariant\n : T extends \"primary\"\n ? keyof PrimaryShades\n : T extends \"secondary\"\n ? keyof SecondaryShades\n : T extends \"tertiary\"\n ? keyof TertiaryShades\n : never;\n\ntype ColorKey = {\n [T in ColorCategory]: `${T}-${ColorValue<T>}`;\n}[ColorCategory];\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\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\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: ColorKey | \"inherit\";\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 = \"text-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 =\n color && color === \"inherit\" ? \"inherit\" : color ? `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={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React from \"react\";\nimport { Pressable, PressableProps } from \"./Pressable\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\nimport { IconName } from \"@deckai/icons\";\n\nexport type SocialCardProps = {\n icon: IconName;\n followers: string;\n engagement: string;\n} & PressableProps;\n\nexport const SocialCard = ({\n icon,\n followers,\n engagement,\n ...pressableProps\n}: SocialCardProps) => (\n <Pressable\n className=\"sm:w-max w-full hover:bg-secondary-400\"\n {...pressableProps}\n >\n <div className=\"flex sm:flex-row flex-col items-center sm:gap-4 gap-1 sm:px-6 sm:py-4 p-2 border border-secondary rounded-lg\">\n <Icon name={icon} size={[\"lg:40\", 32]} color=\"primaryBlue\" />\n <div className=\"flex items-center sm:pt-0 pt-3\">\n <Icon name=\"profile\" size={[\"sm:20\", 16]} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {followers}\n </Text>\n </div>\n <div className=\"flex items-center\">\n <Icon name=\"like-1\" size={[\"sm:20\", 16]} />\n <Text variant={[\"body-default-medium\", \"md:body-xs-medium\"]}>\n {engagement}\n </Text>\n </div>\n </div>\n </Pressable>\n);\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var d=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');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 d__namespace=/*#__PURE__*/_interopNamespace(d);var f=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,y=clsx.clsx,V=(t,r)=>e=>{var o;if(r?.variants==null)return y(t,e?.class,e?.className);let{variants:u,defaultVariants:a}=r,b=Object.keys(u).map(n=>{let s=e?.[n],l=a?.[n];if(s===null)return null;let i=f(s)||f(l);return u[n][i]}),c=e&&Object.entries(e).reduce((n,s)=>{let[l,i]=s;return i===void 0||(n[l]=i),n},{}),x=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((n,s)=>{let{class:l,className:i,...h}=s;return Object.entries(h).every(N=>{let[v,m]=N;return Array.isArray(m)?m.includes({...a,...c}[v]):{...a,...c}[v]===m})?[...n,l,i]:n},[]);return y(t,b,x,e?.class,e?.className)};function p(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var g=V("animate-spin rounded-full border-current border-t-transparent",{variants:{size:{sm:"h-4 w-4 border-4",md:"h-6 w-6 border-4",lg:"h-8 w-8 border-8"}},defaultVariants:{size:"md"}}),M=d__namespace.forwardRef(({size:t,className:r,customSize:e,...o},u)=>{let a=e?{width:e,height:e,borderWidth:Math.max(2,Math.floor(e/16))}:{};return d__namespace.createElement("div",{role:"status","aria-label":"Loading",ref:u,className:p(g({size:t}),"text-primary-100",r),style:a,...o},d__namespace.createElement("span",{className:"sr-only"},"Loading..."))});M.displayName="Spinner";if (exports.default) module.exports = exports.default;exports.Spinner=M;//# sourceMappingURL=Spinner.cjs.map
2
+ //# sourceMappingURL=Spinner.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/class-variance-authority/dist/index.mjs","../../src/utils/index.ts","../../src/components/Spinner.tsx"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","cn","inputs","twMerge","spinnerVariants","Spinner","d","size","className","customSize","ref","styles"],"mappings":"ucAeA,IAAMA,CAAAA,CAAiBC,CAAQ,EAAA,OAAOA,GAAU,SAAY,CAAA,CAAA,EAAGA,CAAK,CAAA,CAAA,CAAKA,IAAU,CAAI,CAAA,GAAA,CAAMA,CAChFC,CAAAA,CAAAA,CAAKC,UACLC,CAAM,CAAA,CAACC,CAAMC,CAAAA,CAAAA,GAAUC,GAAQ,CACpC,IAAIC,CACJ,CAAA,GAAqDF,GAAO,QAAa,EAAA,IAAA,CAAM,OAAOJ,CAAAA,CAAGG,EAAoDE,CAAM,EAAA,KAAA,CAAqDA,CAAM,EAAA,SAAS,EACvN,GAAM,CAAE,QAAAE,CAAAA,CAAAA,CAAU,gBAAAC,CAAgB,CAAA,CAAIJ,CAChCK,CAAAA,CAAAA,CAAuB,OAAO,IAAKF,CAAAA,CAAQ,CAAE,CAAA,GAAA,CAAKG,GAAU,CAC9D,IAAMC,CAA4DN,CAAAA,CAAAA,GAAMK,CAAO,CACzEE,CAAAA,CAAAA,CAAuFJ,CAAgB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ent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../utils\";\n\nconst spinnerVariants = cva(\n \"animate-spin rounded-full border-current border-t-transparent\",\n {\n variants: {\n size: {\n sm: \"h-4 w-4 border-4\",\n md: \"h-6 w-6 border-4\",\n lg: \"h-8 w-8 border-8\"\n }\n },\n defaultVariants: {\n size: \"md\"\n }\n }\n);\n\nexport type SpinnerProps = {\n className?: string;\n customSize?: number;\n} & VariantProps<typeof spinnerVariants>;\n\nexport const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n ({ size, className, customSize, ...props }, ref) => {\n const styles = customSize\n ? {\n width: customSize,\n height: customSize,\n borderWidth: Math.max(2, Math.floor(customSize / 16))\n }\n : {};\n\n return (\n <div\n role=\"status\"\n aria-label=\"Loading\"\n ref={ref}\n className={cn(spinnerVariants({ size }), \"text-primary-100\", className)}\n style={styles}\n {...props}\n >\n <span className=\"sr-only\">Loading...</span>\n </div>\n );\n }\n);\n\nSpinner.displayName = \"Spinner\";\n"]}
@@ -0,0 +1,19 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const spinnerVariants: (props?: ({
6
+ size?: "lg" | "md" | "sm" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ type SpinnerProps = {
9
+ className?: string;
10
+ customSize?: number;
11
+ } & VariantProps<typeof spinnerVariants>;
12
+ declare const Spinner: React.ForwardRefExoticComponent<{
13
+ className?: string;
14
+ customSize?: number;
15
+ } & VariantProps<(props?: ({
16
+ size?: "lg" | "md" | "sm" | null | undefined;
17
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
18
+
19
+ export { Spinner, type SpinnerProps };
@@ -0,0 +1,19 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const spinnerVariants: (props?: ({
6
+ size?: "lg" | "md" | "sm" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ type SpinnerProps = {
9
+ className?: string;
10
+ customSize?: number;
11
+ } & VariantProps<typeof spinnerVariants>;
12
+ declare const Spinner: React.ForwardRefExoticComponent<{
13
+ className?: string;
14
+ customSize?: number;
15
+ } & VariantProps<(props?: ({
16
+ size?: "lg" | "md" | "sm" | null | undefined;
17
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
18
+
19
+ export { Spinner, type SpinnerProps };
@@ -0,0 +1,2 @@
1
+ import*as d from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';var f=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,y=clsx,V=(t,r)=>e=>{var o;if(r?.variants==null)return y(t,e?.class,e?.className);let{variants:u,defaultVariants:a}=r,b=Object.keys(u).map(n=>{let s=e?.[n],l=a?.[n];if(s===null)return null;let i=f(s)||f(l);return u[n][i]}),c=e&&Object.entries(e).reduce((n,s)=>{let[l,i]=s;return i===void 0||(n[l]=i),n},{}),x=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((n,s)=>{let{class:l,className:i,...h}=s;return Object.entries(h).every(N=>{let[v,m]=N;return Array.isArray(m)?m.includes({...a,...c}[v]):{...a,...c}[v]===m})?[...n,l,i]:n},[]);return y(t,b,x,e?.class,e?.className)};function p(...t){return twMerge(clsx(t))}var g=V("animate-spin rounded-full border-current border-t-transparent",{variants:{size:{sm:"h-4 w-4 border-4",md:"h-6 w-6 border-4",lg:"h-8 w-8 border-8"}},defaultVariants:{size:"md"}}),M=d.forwardRef(({size:t,className:r,customSize:e,...o},u)=>{let a=e?{width:e,height:e,borderWidth:Math.max(2,Math.floor(e/16))}:{};return d.createElement("div",{role:"status","aria-label":"Loading",ref:u,className:p(g({size:t}),"text-primary-100",r),style:a,...o},d.createElement("span",{className:"sr-only"},"Loading..."))});M.displayName="Spinner";if (exports.default) module.exports = exports.default;export{M as Spinner};//# sourceMappingURL=Spinner.js.map
2
+ //# sourceMappingURL=Spinner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../node_modules/class-variance-authority/dist/index.mjs","../../src/utils/index.ts","../../src/components/Spinner.tsx"],"names":["falsyToString","value","cx","clsx","cva","base","config","props","_config_compoundVariants","variants","defaultVariants","getVariantClassNames","variant","variantProp","defaultVariantProp","variantKey","propsWithoutUndefined","acc","param","key","getCompoundVariantClassNames","cvClass","cvClassName","compoundVariantOptions","cn","inputs","twMerge","spinnerVariants","Spinner","size","className","customSize","ref","styles"],"mappings":"qFAeA,IAAMA,CAAAA,CAAiBC,CAAQ,EAAA,OAAOA,GAAU,SAAY,CAAA,CAAA,EAAGA,CAAK,CAAA,CAAA,CAAKA,IAAU,CAAI,CAAA,GAAA,CAAMA,CAChFC,CAAAA,CAAAA,CAAKC,KACLC,CAAM,CAAA,CAACC,CAAMC,CAAAA,CAAAA,GAAUC,GAAQ,CACpC,IAAIC,CACJ,CAAA,GAAqDF,GAAO,QAAa,EAAA,IAAA,CAAM,OAAOJ,CAAAA,CAAGG,EAAoDE,CAAM,EAAA,KAAA,CAAqDA,CAAM,EAAA,SAAS,EACvN,GAAM,CAAE,QAAAE,CAAAA,CAAAA,CAAU,gBAAAC,CAAgB,CAAA,CAAIJ,CAChCK,CAAAA,CAAAA,CAAuB,OAAO,IAAKF,CAAAA,CAAQ,CAAE,CAAA,GAAA,CAAKG,GAAU,CAC9D,IAAMC,CAA4DN,CAAAA,CAAAA,GAAMK,CAAO,CACzEE,CAAAA,CA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spinner.js","sourcesContent":["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../utils\";\n\nconst spinnerVariants = cva(\n \"animate-spin rounded-full border-current border-t-transparent\",\n {\n variants: {\n size: {\n sm: \"h-4 w-4 border-4\",\n md: \"h-6 w-6 border-4\",\n lg: \"h-8 w-8 border-8\"\n }\n },\n defaultVariants: {\n size: \"md\"\n }\n }\n);\n\nexport type SpinnerProps = {\n className?: string;\n customSize?: number;\n} & VariantProps<typeof spinnerVariants>;\n\nexport const Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n ({ size, className, customSize, ...props }, ref) => {\n const styles = customSize\n ? {\n width: customSize,\n height: customSize,\n borderWidth: Math.max(2, Math.floor(customSize / 16))\n }\n : {};\n\n return (\n <div\n role=\"status\"\n aria-label=\"Loading\"\n ref={ref}\n className={cn(spinnerVariants({ size }), \"text-primary-100\", className)}\n style={styles}\n {...props}\n >\n <span className=\"sr-only\">Loading...</span>\n </div>\n );\n }\n);\n\nSpinner.displayName = \"Spinner\";\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var n=require('react'),o=require('@radix-ui/react-tabs');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 n__default=/*#__PURE__*/_interopDefault(n);var o__namespace=/*#__PURE__*/_interopNamespace(o);var c={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},u=e=>{let[t,a]=e.split("-");return t==="heading"?c[a]||"p":t==="label"?"label":"p"},h={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},H=e=>e?(Array.isArray(e)?e:[e]).map(a=>{if(a.includes(":")){let[s,l]=a.split(":");return `${s}:text-${l}`}return Array.isArray(e)?`lg:text-${a}`:`text-${a}`}).join(" "):"text-body-default",T=n__default.default.forwardRef(({variant:e="body-default",color:t="text-primary",as:a,className:s,children:l,weight:r,...p},y)=>{let m=H(e),g=t&&t==="inherit"?"inherit":t?`text-${t}`:"",d=n__default.default.useMemo(()=>{let b=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return u(b)},[e]);return n__default.default.createElement(a||d,{ref:y,className:`font-sans antialiased ${m} ${g} ${r?`!${h[r]}`:""} ${s??""}`,...p},l)});T.displayName="Text";var L=n__default.default.forwardRef(({items:e,defaultValue:t,className:a="",onChange:s},l)=>n__default.default.createElement(o__namespace.Root,{defaultValue:t||e[0]?.value,onValueChange:s,className:a},n__default.default.createElement(o__namespace.List,{ref:l,className:"flex gap-8 border-b border-stroke mb-8"},e.map(r=>n__default.default.createElement(o__namespace.Trigger,{key:r.value,value:r.value,className:"group pb-4 relative flex-1"},n__default.default.createElement(T,{variant:"body-lg-semibold",color:"text-secondary",className:"group-data-[state=active]:text-text-primary transition-colors"},r.label),n__default.default.createElement("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-primary-100 scale-x-0 group-data-[state=active]:scale-x-100 transition-transform"})))),e.map(r=>n__default.default.createElement(o__namespace.Content,{key:r.value,value:r.value},r.content))));L.displayName="Tabs";if (exports.default) module.exports = exports.default;exports.Tabs=L;//# sourceMappingURL=Tabs.cjs.map
1
+ 'use strict';var n=require('react'),o=require('@radix-ui/react-tabs');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 n__default=/*#__PURE__*/_interopDefault(n);var o__namespace=/*#__PURE__*/_interopNamespace(o);var u={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},c=e=>{let[t,r]=e.split("-");return t==="heading"?u[r]||"p":t==="label"?"label":"p"},h={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},H=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[s,l]=r.split(":");return `${s}:text-${l}`}return `text-${r}`}).join(" "):"text-body-default",T=n__default.default.forwardRef(({variant:e="body-default",color:t="text-primary",as:r,className:s,children:l,weight:a,...p},y)=>{let m=H(e),d=t&&t==="inherit"?"inherit":t?`text-${t}`:"",g=n__default.default.useMemo(()=>{let b=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return c(b)},[e]);return n__default.default.createElement(r||g,{ref:y,className:`font-sans antialiased ${m} ${d} ${a?`!${h[a]}`:""} ${s??""}`,...p},l)});T.displayName="Text";var L=n__default.default.forwardRef(({items:e,defaultValue:t,className:r="",onChange:s},l)=>n__default.default.createElement(o__namespace.Root,{defaultValue:t||e[0]?.value,onValueChange:s,className:r},n__default.default.createElement(o__namespace.List,{ref:l,className:"flex gap-8 border-b border-stroke mb-8"},e.map(a=>n__default.default.createElement(o__namespace.Trigger,{key:a.value,value:a.value,className:"group pb-4 relative flex-1"},n__default.default.createElement(T,{variant:["sm:body-lg-semibold","body-default-semibold"],color:"text-secondary",className:"group-data-[state=active]:text-text-primary transition-colors sm:text-inherit"},a.label),n__default.default.createElement("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-primary-100 scale-x-0 group-data-[state=active]:scale-x-100 transition-transform"})))),e.map(a=>n__default.default.createElement(o__namespace.Content,{key:a.value,value:a.value},a.content))));L.displayName="Tabs";if (exports.default) module.exports = exports.default;exports.Tabs=L;//# sourceMappingURL=Tabs.cjs.map
2
2
  //# sourceMappingURL=Tabs.cjs.map