@deckai/deck-ui 0.0.14 → 0.0.16

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 (209) hide show
  1. package/README.md +30 -4
  2. package/dist/components/AboutCard.cjs +9 -1
  3. package/dist/components/AboutCard.cjs.map +1 -1
  4. package/dist/components/AboutCard.d.cts +12 -0
  5. package/dist/components/AboutCard.d.ts +12 -0
  6. package/dist/components/AboutCard.js +9 -1
  7. package/dist/components/AboutCard.js.map +1 -1
  8. package/dist/components/Accordion.cjs +1 -1
  9. package/dist/components/Accordion.d.cts +26 -0
  10. package/dist/components/Accordion.d.ts +26 -0
  11. package/dist/components/Accordion.js +1 -1
  12. package/dist/components/AddWorkCard.cjs +3 -3
  13. package/dist/components/AddWorkCard.cjs.map +1 -1
  14. package/dist/components/AddWorkCard.d.cts +9 -0
  15. package/dist/components/AddWorkCard.d.ts +9 -0
  16. package/dist/components/AddWorkCard.js +3 -3
  17. package/dist/components/AddWorkCard.js.map +1 -1
  18. package/dist/components/Avatar.cjs +1 -1
  19. package/dist/components/Avatar.d.cts +12 -0
  20. package/dist/components/Avatar.d.ts +12 -0
  21. package/dist/components/Avatar.js +1 -1
  22. package/dist/components/Badge.cjs +1 -1
  23. package/dist/components/Badge.d.cts +13 -0
  24. package/dist/components/Badge.d.ts +13 -0
  25. package/dist/components/Badge.js +1 -1
  26. package/dist/components/Breadcrumbs.cjs +1 -1
  27. package/dist/components/Breadcrumbs.cjs.map +1 -1
  28. package/dist/components/Breadcrumbs.d.cts +16 -0
  29. package/dist/components/Breadcrumbs.d.ts +16 -0
  30. package/dist/components/Breadcrumbs.js +1 -1
  31. package/dist/components/Breadcrumbs.js.map +1 -1
  32. package/dist/components/Button.cjs +2 -2
  33. package/dist/components/Button.cjs.map +1 -1
  34. package/dist/components/Button.d.cts +38 -0
  35. package/dist/components/Button.d.ts +38 -0
  36. package/dist/components/Button.js +2 -2
  37. package/dist/components/Button.js.map +1 -1
  38. package/dist/components/Carousel.cjs +1 -1
  39. package/dist/components/Carousel.cjs.map +1 -1
  40. package/dist/components/Carousel.d.cts +14 -0
  41. package/dist/components/Carousel.d.ts +14 -0
  42. package/dist/components/Carousel.js +1 -1
  43. package/dist/components/Carousel.js.map +1 -1
  44. package/dist/components/Collapsible.cjs +9 -1
  45. package/dist/components/Collapsible.cjs.map +1 -1
  46. package/dist/components/Collapsible.d.cts +12 -0
  47. package/dist/components/Collapsible.d.ts +12 -0
  48. package/dist/components/Collapsible.js +9 -1
  49. package/dist/components/Collapsible.js.map +1 -1
  50. package/dist/components/Combobox.cjs +1 -1
  51. package/dist/components/Combobox.cjs.map +1 -1
  52. package/dist/components/Combobox.d.cts +29 -0
  53. package/dist/components/Combobox.d.ts +29 -0
  54. package/dist/components/Combobox.js +1 -1
  55. package/dist/components/Combobox.js.map +1 -1
  56. package/dist/components/ContactItem.cjs +1 -1
  57. package/dist/components/ContactItem.d.cts +10 -0
  58. package/dist/components/ContactItem.d.ts +10 -0
  59. package/dist/components/ContactItem.js +1 -1
  60. package/dist/components/Dropdown.cjs +1 -1
  61. package/dist/components/Dropdown.d.cts +18 -0
  62. package/dist/components/Dropdown.d.ts +18 -0
  63. package/dist/components/Dropdown.js +1 -1
  64. package/dist/components/EditButton.cjs +2 -2
  65. package/dist/components/EditButton.cjs.map +1 -1
  66. package/dist/components/EditButton.d.cts +12 -0
  67. package/dist/components/EditButton.d.ts +12 -0
  68. package/dist/components/EditButton.js +2 -2
  69. package/dist/components/EditButton.js.map +1 -1
  70. package/dist/components/Icon.cjs +1 -1
  71. package/dist/components/Icon.d.cts +19 -0
  72. package/dist/components/Icon.d.ts +19 -0
  73. package/dist/components/Icon.js +1 -1
  74. package/dist/components/IconRenderer.cjs +1 -1
  75. package/dist/components/IconRenderer.d.cts +13 -0
  76. package/dist/components/IconRenderer.d.ts +13 -0
  77. package/dist/components/IconRenderer.js +1 -1
  78. package/dist/components/Illustration.cjs +1 -1
  79. package/dist/components/Illustration.d.cts +10 -0
  80. package/dist/components/Illustration.d.ts +10 -0
  81. package/dist/components/Illustration.js +1 -1
  82. package/dist/components/Input.cjs +1 -1
  83. package/dist/components/Input.d.cts +20 -0
  84. package/dist/components/Input.d.ts +20 -0
  85. package/dist/components/Input.js +1 -1
  86. package/dist/components/Link.cjs +1 -1
  87. package/dist/components/Link.d.cts +13 -0
  88. package/dist/components/Link.d.ts +13 -0
  89. package/dist/components/Link.js +1 -1
  90. package/dist/components/Logo.cjs +1 -1
  91. package/dist/components/Logo.d.cts +8 -0
  92. package/dist/components/Logo.d.ts +8 -0
  93. package/dist/components/Logo.js +1 -1
  94. package/dist/components/MultiSelectCombobox.cjs +1 -1
  95. package/dist/components/MultiSelectCombobox.cjs.map +1 -1
  96. package/dist/components/MultiSelectCombobox.d.cts +25 -0
  97. package/dist/components/MultiSelectCombobox.d.ts +25 -0
  98. package/dist/components/MultiSelectCombobox.js +1 -1
  99. package/dist/components/MultiSelectCombobox.js.map +1 -1
  100. package/dist/components/Navbar.cjs +1 -1
  101. package/dist/components/Navbar.cjs.map +1 -1
  102. package/dist/components/Navbar.d.cts +22 -0
  103. package/dist/components/Navbar.d.ts +22 -0
  104. package/dist/components/Navbar.js +1 -1
  105. package/dist/components/Navbar.js.map +1 -1
  106. package/dist/components/NavbarItem.cjs +1 -1
  107. package/dist/components/NavbarItem.d.cts +13 -0
  108. package/dist/components/NavbarItem.d.ts +13 -0
  109. package/dist/components/NavbarItem.js +1 -1
  110. package/dist/components/Option.cjs +1 -1
  111. package/dist/components/Option.d.cts +16 -0
  112. package/dist/components/Option.d.ts +16 -0
  113. package/dist/components/Option.js +1 -1
  114. package/dist/components/Pressable.cjs +1 -1
  115. package/dist/components/Pressable.d.cts +6 -0
  116. package/dist/components/Pressable.d.ts +6 -0
  117. package/dist/components/Pressable.js +1 -1
  118. package/dist/components/ProfileCard.cjs +1 -1
  119. package/dist/components/ProfileCard.cjs.map +1 -1
  120. package/dist/components/ProfileCard.d.cts +17 -0
  121. package/dist/components/ProfileCard.d.ts +17 -0
  122. package/dist/components/ProfileCard.js +1 -1
  123. package/dist/components/ProfileCard.js.map +1 -1
  124. package/dist/components/ProgressBar.cjs +1 -1
  125. package/dist/components/ProgressBar.d.cts +21 -0
  126. package/dist/components/ProgressBar.d.ts +21 -0
  127. package/dist/components/ProgressBar.js +1 -1
  128. package/dist/components/SegmentedTabs.cjs +2 -2
  129. package/dist/components/SegmentedTabs.cjs.map +1 -1
  130. package/dist/components/SegmentedTabs.d.cts +16 -0
  131. package/dist/components/SegmentedTabs.d.ts +16 -0
  132. package/dist/components/SegmentedTabs.js +2 -2
  133. package/dist/components/SegmentedTabs.js.map +1 -1
  134. package/dist/components/Sidebar.cjs +1 -1
  135. package/dist/components/Sidebar.d.cts +37 -0
  136. package/dist/components/Sidebar.d.ts +37 -0
  137. package/dist/components/Sidebar.js +1 -1
  138. package/dist/components/SlideButton.cjs +3 -0
  139. package/dist/components/SlideButton.cjs.map +1 -0
  140. package/dist/components/SlideButton.d.cts +21 -0
  141. package/dist/components/SlideButton.d.ts +21 -0
  142. package/dist/components/SlideButton.js +3 -0
  143. package/dist/components/SlideButton.js.map +1 -0
  144. package/dist/components/SocialCard.cjs +1 -1
  145. package/dist/components/SocialCard.cjs.map +1 -1
  146. package/dist/components/SocialCard.d.cts +12 -0
  147. package/dist/components/SocialCard.d.ts +12 -0
  148. package/dist/components/SocialCard.js +1 -1
  149. package/dist/components/SocialCard.js.map +1 -1
  150. package/dist/components/Spinner.cjs +1 -1
  151. package/dist/components/Spinner.d.cts +54 -0
  152. package/dist/components/Spinner.d.ts +54 -0
  153. package/dist/components/Spinner.js +1 -1
  154. package/dist/components/Switch.cjs +1 -1
  155. package/dist/components/Switch.d.cts +13 -0
  156. package/dist/components/Switch.d.ts +13 -0
  157. package/dist/components/Switch.js +1 -1
  158. package/dist/components/Tabs.cjs +2 -2
  159. package/dist/components/Tabs.cjs.map +1 -1
  160. package/dist/components/Tabs.d.cts +17 -0
  161. package/dist/components/Tabs.d.ts +17 -0
  162. package/dist/components/Tabs.js +2 -2
  163. package/dist/components/Tabs.js.map +1 -1
  164. package/dist/components/Tag.cjs +1 -1
  165. package/dist/components/Tag.d.cts +12 -0
  166. package/dist/components/Tag.d.ts +12 -0
  167. package/dist/components/Tag.js +1 -1
  168. package/dist/components/Text.cjs +1 -1
  169. package/dist/components/Text.d.cts +42 -0
  170. package/dist/components/Text.d.ts +42 -0
  171. package/dist/components/Text.js +1 -1
  172. package/dist/components/TextArea.cjs +1 -1
  173. package/dist/components/TextArea.d.cts +19 -0
  174. package/dist/components/TextArea.d.ts +19 -0
  175. package/dist/components/TextArea.js +1 -1
  176. package/dist/components/Toast.cjs +2 -2
  177. package/dist/components/Toast.cjs.map +1 -1
  178. package/dist/components/Toast.d.cts +35 -0
  179. package/dist/components/Toast.d.ts +35 -0
  180. package/dist/components/Toast.js +2 -2
  181. package/dist/components/Toast.js.map +1 -1
  182. package/dist/components/ToastProvider.cjs +1 -1
  183. package/dist/components/ToastProvider.d.cts +8 -0
  184. package/dist/components/ToastProvider.d.ts +8 -0
  185. package/dist/components/ToastProvider.js +1 -1
  186. package/dist/components/Tooltip.cjs +1 -1
  187. package/dist/components/Tooltip.cjs.map +1 -1
  188. package/dist/components/Tooltip.d.cts +18 -0
  189. package/dist/components/Tooltip.d.ts +18 -0
  190. package/dist/components/Tooltip.js +1 -1
  191. package/dist/components/Tooltip.js.map +1 -1
  192. package/dist/components/WorkCard.cjs +1 -1
  193. package/dist/components/WorkCard.d.cts +14 -0
  194. package/dist/components/WorkCard.d.ts +14 -0
  195. package/dist/components/WorkCard.js +1 -1
  196. package/dist/index.cjs +5 -5
  197. package/dist/index.cjs.map +1 -1
  198. package/dist/index.d.cts +194 -0
  199. package/dist/index.d.ts +194 -0
  200. package/dist/index.js +5 -5
  201. package/dist/index.js.map +1 -1
  202. package/dist/styles/fonts.d.cts +2 -0
  203. package/dist/styles/fonts.d.ts +2 -0
  204. package/dist/styles/styles.css +1 -1
  205. package/dist/styles/styles.d.cts +2 -0
  206. package/dist/styles/styles.d.ts +2 -0
  207. package/dist/tailwind-CuJn6tv4.d.cts +36 -0
  208. package/dist/tailwind-CuJn6tv4.d.ts +36 -0
  209. package/package.json +15 -16
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/index.ts","../../src/components/Text.tsx","../../src/components/SlideButton.tsx"],"names":["cn","inputs","twMerge","clsx","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","size","fontWeight","processVariants","variants","breakpoint","typographyClass","Text","React","color","as","className","children","weight","props","ref","typographyClasses","colorClasses","suggestedElement","baseVariant","SlideButton","text","confirmText","onConfirm","disabled","ariaLabel","isDragging","setIsDragging","slidePosition","setSlidePosition","isConfirmed","setIsConfirmed","buttonRef","thumbRef","isFocused","setIsFocused","handleKeyDown","e","thumbElement","trackElement","maxSlide","newPosition","handleDragStart","handleDragMove","clientX","buttonRect","thumbRect","handleMouseMove","handleTouchMove","handleDragEnd","progressPercentage"],"mappings":"mHAGO,SAASA,KAAMC,CAAsB,CAAA,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCiEA,IAAMG,CAAmD,CAAA,CACvD,GAAI,IACJ,CAAA,EAAA,CAAI,KACJ,EAAI,CAAA,IAAA,CACJ,EAAI,CAAA,IAAA,CACJ,EAAI,CAAA,IACN,EAEMC,CAAyBC,CAAAA,CAAAA,EAAwC,CACrE,GAAM,CAACC,EAAUC,CAAI,CAAA,CAAIF,CAAQ,CAAA,KAAA,CAAM,GAAG,CAAA,CAE1C,OAAIC,CAAa,GAAA,SAAA,CACRH,EAAoBI,CAAI,CAAA,EAAK,IAGlCD,CAAa,GAAA,OAAA,CACR,OAGF,CAAA,GACT,CAIME,CAAAA,CAAAA,CAAqC,CACzC,KAAO,CAAA,YAAA,CACP,QAAS,cACT,CAAA,QAAA,CAAU,gBACV,IAAM,CAAA,WACR,CA0BMC,CAAAA,CAAAA,CACJC,CAEKA,EAA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A,KAAA,CAAA,CACC,GAAKW,CAAAA,CAAAA,CACL,UAAWxC,CACT,CAAA,0GAAA,CACAW,CAASL,CAAAA,CAAO,CAAE,CAAA,KAAA,CAClByB,GAAY,oBACZU,CAAAA,CAAAA,EAAa,mBACf,CACA,CAAA,KAAA,CAAO,CACL,SAAW,CAAA,CAAA,WAAA,EAAcN,CAAa,CAAA,GAAA,CACxC,CACA,CAAA,WAAA,CAAac,EACb,YAAcA,CAAAA,CAAAA,CACd,cAAY,MAEZ,CAAA,CAAA,CAAA,CAAA,aAAA,CAAC,OAAI,SAAU,CAAA,mDAAA,CAAA,CACb,CAAC,CAAA,aAAA,CAAA,KAAA,CAAA,CACC,KAAM,CAAA,IAAA,CACN,OAAO,IACP,CAAA,OAAA,CAAQ,YACR,IAAK,CAAA,MAAA,CACL,MAAM,4BACN,CAAA,aAAA,CAAY,MAEZ,CAAA,CAAA,CAAA,CAAA,aAAA,CAAC,MACC,CAAA,CAAA,CAAA,CAAE,sDACF,IAAK,CAAA,OAAA,CACP,CACF,CACF,CACF,CACF,CACF,CAEJ,CACF,EAEAtB,CAAAA,CAAY,WAAc,CAAA,aAAA","file":"SlideButton.js","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-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 * as React from \"react\";\nimport { cn } from \"../utils\";\nimport { Text } from \"./Text\";\n\nexport type SlideButtonProps = {\n /** The text to display when not sliding */\n text: string;\n /** The text to display when sliding is complete */\n confirmText?: string;\n /** Callback fired when sliding is complete */\n onConfirm: () => void;\n /** Optional variant for different visual styles */\n variant?: \"primary\" | \"danger\";\n /** Optional className for custom styling */\n className?: string;\n /** Whether the button is disabled */\n disabled?: boolean;\n /** Optional ARIA label */\n \"aria-label\"?: string;\n};\n\nexport const SlideButton = React.forwardRef<HTMLDivElement, SlideButtonProps>(\n (\n {\n text,\n confirmText = \"Confirmed!\",\n onConfirm,\n variant = \"primary\",\n className,\n disabled = false,\n \"aria-label\": ariaLabel,\n ...props\n },\n ref\n ) => {\n const [isDragging, setIsDragging] = React.useState(false);\n const [slidePosition, setSlidePosition] = React.useState(0);\n const [isConfirmed, setIsConfirmed] = React.useState(false);\n const buttonRef = React.useRef<HTMLDivElement>(null);\n const thumbRef = React.useRef<HTMLDivElement>(null);\n const [isFocused, setIsFocused] = React.useState(false);\n\n const variants = {\n primary: {\n track: \"bg-primary-100/10 hover:bg-primary-100/20\",\n thumb: \"bg-primary-100\",\n text: \"text-primary-100\"\n },\n danger: {\n track: \"bg-tertiary-5 hover:bg-tertiary-5\",\n thumb: \"bg-tertiary-10\",\n text: \"text-tertiary-10\"\n }\n };\n\n const handleKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled || isConfirmed) return;\n\n const thumbElement = thumbRef.current;\n const trackElement = buttonRef.current;\n if (!thumbElement || !trackElement) return;\n\n const maxSlide = trackElement.clientWidth - thumbElement.clientWidth;\n\n switch (e.key) {\n case \"ArrowRight\":\n case \"ArrowUp\":\n e.preventDefault();\n const newPosition = Math.min(\n maxSlide,\n slidePosition + maxSlide * 0.1\n );\n setSlidePosition(newPosition);\n\n if (newPosition >= maxSlide * 0.9) {\n setIsConfirmed(true);\n setSlidePosition(maxSlide);\n onConfirm();\n }\n break;\n case \"ArrowLeft\":\n case \"ArrowDown\":\n e.preventDefault();\n setSlidePosition(Math.max(0, slidePosition - maxSlide * 0.1));\n break;\n case \"Home\":\n e.preventDefault();\n setSlidePosition(0);\n break;\n case \"End\":\n e.preventDefault();\n setSlidePosition(maxSlide);\n setIsConfirmed(true);\n onConfirm();\n break;\n case \"Enter\":\n case \" \":\n e.preventDefault();\n if (slidePosition >= maxSlide * 0.9) {\n setIsConfirmed(true);\n setSlidePosition(maxSlide);\n onConfirm();\n }\n break;\n }\n },\n [disabled, isConfirmed, onConfirm, slidePosition]\n );\n\n const handleDragStart = React.useCallback(\n (e: React.MouseEvent | React.TouchEvent) => {\n if (disabled || isConfirmed) return;\n setIsDragging(true);\n // Prevent text selection during drag\n e.preventDefault();\n },\n [disabled, isConfirmed]\n );\n\n const handleDragMove = React.useCallback(\n (clientX: number) => {\n if (!isDragging || !buttonRef.current || !thumbRef.current) return;\n\n const buttonRect = buttonRef.current.getBoundingClientRect();\n const thumbRect = thumbRef.current.getBoundingClientRect();\n const maxSlide = buttonRect.width - thumbRect.width;\n\n const newPosition = Math.max(\n 0,\n Math.min(maxSlide, clientX - buttonRect.left - thumbRect.width / 2)\n );\n\n setSlidePosition(newPosition);\n\n // Check if slide is complete (e.g., 90% of the way)\n if (newPosition >= maxSlide * 0.9) {\n setIsDragging(false);\n setIsConfirmed(true);\n setSlidePosition(maxSlide);\n onConfirm();\n }\n },\n [isDragging, onConfirm]\n );\n\n const handleMouseMove = React.useCallback(\n (e: MouseEvent) => {\n handleDragMove(e.clientX);\n },\n [handleDragMove]\n );\n\n const handleTouchMove = React.useCallback(\n (e: TouchEvent) => {\n handleDragMove(e.touches[0].clientX);\n },\n [handleDragMove]\n );\n\n const handleDragEnd = React.useCallback(() => {\n if (!isConfirmed) {\n setSlidePosition(0);\n }\n setIsDragging(false);\n }, [isConfirmed]);\n\n React.useEffect(() => {\n if (isDragging) {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleDragEnd);\n document.addEventListener(\"touchmove\", handleTouchMove);\n document.addEventListener(\"touchend\", handleDragEnd);\n }\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleDragEnd);\n document.removeEventListener(\"touchmove\", handleTouchMove);\n document.removeEventListener(\"touchend\", handleDragEnd);\n };\n }, [isDragging, handleMouseMove, handleTouchMove, handleDragEnd]);\n\n // Reset state when disabled prop changes\n React.useEffect(() => {\n if (disabled) {\n setSlidePosition(0);\n setIsConfirmed(false);\n setIsDragging(false);\n }\n }, [disabled]);\n\n const progressPercentage = React.useMemo(() => {\n if (!buttonRef.current || !thumbRef.current) return 0;\n const maxSlide =\n buttonRef.current.clientWidth - thumbRef.current.clientWidth;\n return Math.round((slidePosition / maxSlide) * 100);\n }, [slidePosition]);\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative h-12 rounded-full transition-colors\",\n variants[variant].track,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n <div\n ref={buttonRef}\n role=\"slider\"\n aria-label={ariaLabel || text}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={progressPercentage}\n aria-valuetext={\n isConfirmed ? confirmText : `${progressPercentage}% complete`\n }\n aria-disabled={disabled}\n tabIndex={disabled ? -1 : 0}\n className=\"relative w-full h-full overflow-hidden rounded-full outline-none focus-visible:ring-2 focus-visible:ring-primary-100 focus-visible:ring-offset-2\"\n onKeyDown={handleKeyDown}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n >\n {/* Track text */}\n <div\n className=\"absolute inset-0 flex items-center justify-center\"\n aria-hidden=\"true\"\n >\n <Text\n variant=\"body-default-semibold\"\n className={cn(\n variants[variant].text,\n \"transition-opacity select-none\",\n (isDragging || isConfirmed) && \"opacity-0\"\n )}\n >\n {text}\n </Text>\n <Text\n variant=\"body-default-semibold\"\n className={cn(\n variants[variant].text,\n \"transition-opacity select-none\",\n !isConfirmed && \"opacity-0\"\n )}\n >\n {confirmText}\n </Text>\n </div>\n\n {/* Sliding thumb */}\n <div\n ref={thumbRef}\n className={cn(\n \"absolute top-1 bottom-1 left-1 w-10 rounded-full cursor-grab active:cursor-grabbing transition-transform\",\n variants[variant].thumb,\n disabled && \"cursor-not-allowed\",\n isFocused && \"ring-2 ring-white\"\n )}\n style={{\n transform: `translateX(${slidePosition}px)`\n }}\n onMouseDown={handleDragStart}\n onTouchStart={handleDragStart}\n aria-hidden=\"true\"\n >\n <div className=\"absolute inset-0 flex items-center justify-center\">\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M13.5 10L8.5 15L7.5 14L11.5 10L7.5 6L8.5 5L13.5 10Z\"\n fill=\"white\"\n />\n </svg>\n </div>\n </div>\n </div>\n </div>\n );\n }\n);\n\nSlideButton.displayName = \"SlideButton\";\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var a=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var a__default=/*#__PURE__*/_interopDefault(a);var f="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var g=a__default.default.forwardRef(({children:e,type:o="button",className:t,disabled:r,...s},n)=>a__default.default.createElement("button",{ref:n,type:o,disabled:r,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",f,r&&"opacity-50 cursor-not-allowed",t),...s},e));g.displayName="Pressable";var b={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},$={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},R=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},r;return o.forEach(s=>{if(typeof s=="number")r=`${s}px`;else {let[n,i]=s.split(":"),p=parseInt(i,10);t[`@media (min-width: ${$[n]})`]=`${p}px`;}}),{width:r||"24px",height:r||"24px",...Object.entries(t).reduce((s,[n,i])=>({...s,[n]:{width:i,height:i}}),{})}},l=a__default.default.forwardRef(({name:e,size:o=24,color:t="primary",title:r,className:s,style:n={},...i},p)=>{let d=icons.IconMap[e],y=R(o);return a__default.default.createElement("div",{className:m("flex justify-center items-center",s),style:{...y,"--icon-stroke":b[t],...n}},a__default.default.createElement(d,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:b[t],...i}))});l.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},C=e=>{let[o,t]=e.split("-");return o==="heading"?A[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},S=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,s]=t.split(":");return `${r}:text-${s}`}return `text-${t}`}).join(" "):"text-body-default",c=a__default.default.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:r,children:s,weight:n,...i},p)=>{let d=S(e),y=o==="inherit"?"text-inherit":`text-text-${o}`,x=a__default.default.useMemo(()=>{let H=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return C(H)},[e]);return a__default.default.createElement(t||x,{ref:p,className:`font-sans antialiased ${d} ${y} ${n?`!${P[n]}`:""} ${r??""}`,...i},s)});c.displayName="Text";var ee=({icon:e,followers:o,engagement:t,...r})=>a__default.default.createElement(g,{className:"sm:w-max w-full hover:bg-secondary-400",...r},a__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"},a__default.default.createElement(l,{name:e,size:["lg:40",32],color:"primaryBlue"}),a__default.default.createElement("div",{className:"flex items-center sm:pt-0 pt-3"},a__default.default.createElement(l,{name:"profile",size:["sm:20",16]}),a__default.default.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},o)),a__default.default.createElement("div",{className:"flex items-center"},a__default.default.createElement(l,{name:"like-1",size:["sm:20",16]}),a__default.default.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},t))));if (exports.default) module.exports = exports.default;exports.SocialCard=ee;//# sourceMappingURL=SocialCard.cjs.map
1
+ 'use strict';var a=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var a__default=/*#__PURE__*/_interopDefault(a);var f="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var g=a__default.default.forwardRef(({children:e,type:o="button",className:t,disabled:r,...s},n)=>a__default.default.createElement("button",{ref:n,type:o,disabled:r,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",f,r&&"opacity-50 cursor-not-allowed",t),...s},e));g.displayName="Pressable";var b={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},$={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},R=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},r;return o.forEach(s=>{if(typeof s=="number")r=`${s}px`;else {let[n,i]=s.split(":"),p=parseInt(i,10);t[`@media (min-width: ${$[n]})`]=`${p}px`;}}),{width:r||"24px",height:r||"24px",...Object.entries(t).reduce((s,[n,i])=>({...s,[n]:{width:i,height:i}}),{})}},l=a__default.default.forwardRef(({name:e,size:o=24,color:t="primary",title:r,className:s,style:n={},...i},p)=>{let d=icons.IconMap[e],y=R(o);return a__default.default.createElement("div",{className:m("flex justify-center items-center",s),style:{...y,"--icon-stroke":b[t],...n}},a__default.default.createElement(d,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:b[t],...i}))});l.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},C=e=>{let[o,t]=e.split("-");return o==="heading"?A[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},S=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,s]=t.split(":");return `${r}:text-${s}`}return `text-${t}`}).join(" "):"text-body-default",c=a__default.default.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:r,children:s,weight:n,...i},p)=>{let d=S(e),y=o==="inherit"?"text-inherit":`text-text-${o}`,x=a__default.default.useMemo(()=>{let H=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return C(H)},[e]);return a__default.default.createElement(t||x,{ref:p,className:`font-sans antialiased ${d} ${y} ${n?`!${P[n]}`:""} ${r??""}`,...i},s)});c.displayName="Text";var ee=({icon:e,followers:o,engagement:t,...r})=>a__default.default.createElement(g,{className:"sm:w-max w-full hover:bg-secondary-400 rounded-lg",...r},a__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"},a__default.default.createElement(l,{name:e,size:["lg:40",32],color:"primaryBlue"}),a__default.default.createElement("div",{className:"flex items-center sm:pt-0 pt-3"},a__default.default.createElement(l,{name:"profile",size:["sm:20",16]}),a__default.default.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},o)),a__default.default.createElement("div",{className:"flex items-center"},a__default.default.createElement(l,{name:"like-1",size:["sm:20",16]}),a__default.default.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},t))));exports.SocialCard=ee;//# sourceMappingURL=SocialCard.cjs.map
2
2
  //# sourceMappingURL=SocialCard.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/utils/index.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","cn","inputs","twMerge","clsx","Pressable","React","children","type","className","disabled","props","ref","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","name","color","title","style","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,qGCpEF,CAGO,SAASC,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAAA,CAAQC,UAAKF,CAAM,CAAC,CAC7B,CCCO,IAAMG,CAAYC,CAAAA,kBAAAA,CAAM,UAC7B,CAAA,CAAC,CAAE,QAAAC,CAAAA,CAAAA,CAAU,IAAAC,CAAAA,CAAAA,CAAO,QAAU,CAAA,SAAA,CAAAC,CAAW,CAAA,QAAA,CAAAC,EAAU,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAC7DN,mBAAA,aAAC,CAAA,QAAA,CAAA,CACC,GAAKM,CAAAA,CAAAA,CACL,KAAMJ,CACN,CAAA,QAAA,CAAUE,CACV,CAAA,SAAA,CAAWT,CACT,CAAA,iEAAA,CACAD,CACAU,CAAAA,CAAAA,EAAY,gCACZD,CACF,CAAA,CACC,GAAGE,CAAAA,CAAAA,CAEHJ,CACH,CAEJ,CAAA,CAEAF,CAAU,CAAA,WAAA,CAAc,YCNxB,IAAMQ,EAAwC,CAC5C,OAAA,CAAS,SACT,CAAA,SAAA,CAAW,SACX,CAAA,KAAA,CAAO,SACP,CAAA,WAAA,CAAa,UACb,QAAU,CAAA,SACZ,CAEMC,CAAAA,CAAAA,CAA6C,CACjD,EAAA,CAAI,OACJ,CAAA,EAAA,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AAA,CAAA,SAAA,CAAU,qBACbA,kBAAA,CAAA,aAAA,CAACoB,CAAA,CAAA,CAAK,KAAK,QAAS,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAAG,CACzCpB,CAAAA,kBAAAA,CAAA,cAACoC,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 { 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, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-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
+ {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/utils/index.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","cn","inputs","twMerge","clsx","Pressable","React","children","type","className","disabled","props","ref","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","name","color","title","style","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,qGCpEF,CAGO,SAASC,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAAA,CAAQC,UAAKF,CAAM,CAAC,CAC7B,CCCO,IAAMG,CAAYC,CAAAA,kBAAAA,CAAM,UAC7B,CAAA,CAAC,CAAE,QAAAC,CAAAA,CAAAA,CAAU,IAAAC,CAAAA,CAAAA,CAAO,QAAU,CAAA,SAAA,CAAAC,CAAW,CAAA,QAAA,CAAAC,EAAU,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAC7DN,mBAAA,aAAC,CAAA,QAAA,CAAA,CACC,GAAKM,CAAAA,CAAAA,CACL,KAAMJ,CACN,CAAA,QAAA,CAAUE,CACV,CAAA,SAAA,CAAWT,CACT,CAAA,iEAAA,CACAD,CACAU,CAAAA,CAAAA,EAAY,gCACZD,CACF,CAAA,CACC,GAAGE,CAAAA,CAAAA,CAEHJ,CACH,CAEJ,CAAA,CAEAF,CAAU,CAAA,WAAA,CAAc,YCNxB,IAAMQ,EAAwC,CAC5C,OAAA,CAAS,SACT,CAAA,SAAA,CAAW,SACX,CAAA,KAAA,CAAO,SACP,CAAA,WAAA,CAAa,UACb,QAAU,CAAA,SACZ,CAEMC,CAAAA,CAAAA,CAA6C,CACjD,EAAA,CAAI,OACJ,CAAA,EAAA,CAAI,QACJ,EAAI,CAAA,QAAA,CACJ,EAAI,CAAA,QAAA,CACJ,MAAO,QACT,CAAA,CAEMC,CACJC,CAAAA,CAAAA,EACwB,CACxB,GAAI,CAACA,CAAO,CAAA,OAAO,CAAE,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AA,kBAAAA,CAAA,cAACoC,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 { 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, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-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 rounded-lg\"\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,12 @@
1
+ import React__default from 'react';
2
+ import { PressableProps } from './Pressable.cjs';
3
+ import { IconName } from '@deckai/icons';
4
+
5
+ type SocialCardProps = {
6
+ icon: IconName;
7
+ followers: string;
8
+ engagement: string;
9
+ } & PressableProps;
10
+ declare const SocialCard: ({ icon, followers, engagement, ...pressableProps }: SocialCardProps) => React__default.JSX.Element;
11
+
12
+ export { SocialCard, type SocialCardProps };
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { PressableProps } from './Pressable.js';
3
+ import { IconName } from '@deckai/icons';
4
+
5
+ type SocialCardProps = {
6
+ icon: IconName;
7
+ followers: string;
8
+ engagement: string;
9
+ } & PressableProps;
10
+ declare const SocialCard: ({ icon, followers, engagement, ...pressableProps }: SocialCardProps) => React__default.JSX.Element;
11
+
12
+ export { SocialCard, type SocialCardProps };
@@ -1,2 +1,2 @@
1
- import a from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';var f="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function m(...e){return twMerge(clsx(e))}var g=a.forwardRef(({children:e,type:o="button",className:t,disabled:r,...s},n)=>a.createElement("button",{ref:n,type:o,disabled:r,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",f,r&&"opacity-50 cursor-not-allowed",t),...s},e));g.displayName="Pressable";var b={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},$={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},R=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},r;return o.forEach(s=>{if(typeof s=="number")r=`${s}px`;else {let[n,i]=s.split(":"),p=parseInt(i,10);t[`@media (min-width: ${$[n]})`]=`${p}px`;}}),{width:r||"24px",height:r||"24px",...Object.entries(t).reduce((s,[n,i])=>({...s,[n]:{width:i,height:i}}),{})}},l=a.forwardRef(({name:e,size:o=24,color:t="primary",title:r,className:s,style:n={},...i},p)=>{let d=IconMap[e],y=R(o);return a.createElement("div",{className:m("flex justify-center items-center",s),style:{...y,"--icon-stroke":b[t],...n}},a.createElement(d,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:b[t],...i}))});l.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},C=e=>{let[o,t]=e.split("-");return o==="heading"?A[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},S=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,s]=t.split(":");return `${r}:text-${s}`}return `text-${t}`}).join(" "):"text-body-default",c=a.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:r,children:s,weight:n,...i},p)=>{let d=S(e),y=o==="inherit"?"text-inherit":`text-text-${o}`,x=a.useMemo(()=>{let H=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return C(H)},[e]);return a.createElement(t||x,{ref:p,className:`font-sans antialiased ${d} ${y} ${n?`!${P[n]}`:""} ${r??""}`,...i},s)});c.displayName="Text";var ee=({icon:e,followers:o,engagement:t,...r})=>a.createElement(g,{className:"sm:w-max w-full hover:bg-secondary-400",...r},a.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"},a.createElement(l,{name:e,size:["lg:40",32],color:"primaryBlue"}),a.createElement("div",{className:"flex items-center sm:pt-0 pt-3"},a.createElement(l,{name:"profile",size:["sm:20",16]}),a.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},o)),a.createElement("div",{className:"flex items-center"},a.createElement(l,{name:"like-1",size:["sm:20",16]}),a.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},t))));if (exports.default) module.exports = exports.default;export{ee as SocialCard};//# sourceMappingURL=SocialCard.js.map
1
+ import a from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';var f="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function m(...e){return twMerge(clsx(e))}var g=a.forwardRef(({children:e,type:o="button",className:t,disabled:r,...s},n)=>a.createElement("button",{ref:n,type:o,disabled:r,className:m("appearance-none hover:opacity-80 transition-all active:scale-95",f,r&&"opacity-50 cursor-not-allowed",t),...s},e));g.displayName="Pressable";var b={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},$={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},R=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},r;return o.forEach(s=>{if(typeof s=="number")r=`${s}px`;else {let[n,i]=s.split(":"),p=parseInt(i,10);t[`@media (min-width: ${$[n]})`]=`${p}px`;}}),{width:r||"24px",height:r||"24px",...Object.entries(t).reduce((s,[n,i])=>({...s,[n]:{width:i,height:i}}),{})}},l=a.forwardRef(({name:e,size:o=24,color:t="primary",title:r,className:s,style:n={},...i},p)=>{let d=IconMap[e],y=R(o);return a.createElement("div",{className:m("flex justify-center items-center",s),style:{...y,"--icon-stroke":b[t],...n}},a.createElement(d,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:b[t],...i}))});l.displayName="Icon";var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},C=e=>{let[o,t]=e.split("-");return o==="heading"?A[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},S=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,s]=t.split(":");return `${r}:text-${s}`}return `text-${t}`}).join(" "):"text-body-default",c=a.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:r,children:s,weight:n,...i},p)=>{let d=S(e),y=o==="inherit"?"text-inherit":`text-text-${o}`,x=a.useMemo(()=>{let H=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return C(H)},[e]);return a.createElement(t||x,{ref:p,className:`font-sans antialiased ${d} ${y} ${n?`!${P[n]}`:""} ${r??""}`,...i},s)});c.displayName="Text";var ee=({icon:e,followers:o,engagement:t,...r})=>a.createElement(g,{className:"sm:w-max w-full hover:bg-secondary-400 rounded-lg",...r},a.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"},a.createElement(l,{name:e,size:["lg:40",32],color:"primaryBlue"}),a.createElement("div",{className:"flex items-center sm:pt-0 pt-3"},a.createElement(l,{name:"profile",size:["sm:20",16]}),a.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},o)),a.createElement("div",{className:"flex items-center"},a.createElement(l,{name:"like-1",size:["sm:20",16]}),a.createElement(c,{variant:["body-default-medium","md:body-xs-medium"]},t))));export{ee as SocialCard};//# sourceMappingURL=SocialCard.js.map
2
2
  //# sourceMappingURL=SocialCard.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/utils/index.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","cn","inputs","twMerge","clsx","Pressable","React","children","type","className","disabled","props","ref","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","name","color","title","style","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,qGCpEF,CAGO,SAASC,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,OAAAA,CAAQC,KAAKF,CAAM,CAAC,CAC7B,CCCO,IAAMG,CAAYC,CAAAA,CAAAA,CAAM,UAC7B,CAAA,CAAC,CAAE,QAAAC,CAAAA,CAAAA,CAAU,IAAAC,CAAAA,CAAAA,CAAO,QAAU,CAAA,SAAA,CAAAC,CAAW,CAAA,QAAA,CAAAC,EAAU,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAC7DN,EAAA,aAAC,CAAA,QAAA,CAAA,CACC,GAAKM,CAAAA,CAAAA,CACL,KAAMJ,CACN,CAAA,QAAA,CAAUE,CACV,CAAA,SAA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C3D5C,EAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,gCAAA,CAAA,CACbA,CAAA,CAAA,aAAA,CAACoB,CAAA,CAAA,CAAK,KAAK,SAAU,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAG,CAAA,CAAA,CAC1CpB,CAAA,CAAA,aAAA,CAACoC,EAAA,CAAK,OAAA,CAAS,CAAC,qBAAA,CAAuB,mBAAmB,CAAA,CAAA,CACvDS,CACH,CACF,EACA7C,CAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,qBACbA,CAAA,CAAA,aAAA,CAACoB,CAAA,CAAA,CAAK,KAAK,QAAS,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAAG,CACzCpB,CAAAA,CAAAA,CAAA,cAACoC,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 { 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, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-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
+ {"version":3,"sources":["../../src/utils/tailwind.ts","../../src/utils/index.ts","../../src/components/Pressable.tsx","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/SocialCard.tsx"],"names":["focusRingStyles","cn","inputs","twMerge","clsx","Pressable","React","children","type","className","disabled","props","ref","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","name","color","title","style","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,qGCpEF,CAGO,SAASC,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,OAAAA,CAAQC,KAAKF,CAAM,CAAC,CAC7B,CCCO,IAAMG,CAAYC,CAAAA,CAAAA,CAAM,UAC7B,CAAA,CAAC,CAAE,QAAAC,CAAAA,CAAAA,CAAU,IAAAC,CAAAA,CAAAA,CAAO,QAAU,CAAA,SAAA,CAAAC,CAAW,CAAA,QAAA,CAAAC,EAAU,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAC7DN,EAAA,aAAC,CAAA,QAAA,CAAA,CACC,GAAKM,CAAAA,CAAAA,CACL,KAAMJ,CACN,CAAA,QAAA,CAAUE,CACV,CAAA,SAAA,CAAWT,CACT,CAAA,iEAAA,CACAD,CACAU,CAAAA,CAAAA,EAAY,gCACZD,CACF,CAAA,CACC,GAAGE,CAAAA,CAAAA,CAEHJ,CACH,CAEJ,CAAA,CAEAF,CAAU,CAAA,WAAA,CAAc,YCNxB,IAAMQ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,CAAA,CAAA,CAC1CpB,CAAA,CAAA,aAAA,CAACoC,EAAA,CAAK,OAAA,CAAS,CAAC,qBAAA,CAAuB,mBAAmB,CAAA,CAAA,CACvDS,CACH,CACF,EACA7C,CAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,qBACbA,CAAA,CAAA,aAAA,CAACoB,CAAA,CAAA,CAAK,KAAK,QAAS,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAAG,CACzCpB,CAAAA,CAAAA,CAAA,cAACoC,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 { 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, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-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 rounded-lg\"\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
- '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-3",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
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-3",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";exports.Spinner=M;//# sourceMappingURL=Spinner.cjs.map
2
2
  //# sourceMappingURL=Spinner.cjs.map
@@ -0,0 +1,54 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+
4
+ /**
5
+ * Copyright 2022 Joe Bell. All rights reserved.
6
+ *
7
+ * This file is licensed to you under the Apache License, Version 2.0
8
+ * (the "License"); you may not use this file except in compliance with the
9
+ * License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
16
+ * License for the specific language governing permissions and limitations under
17
+ * the License.
18
+ */
19
+
20
+ type OmitUndefined<T> = T extends undefined ? never : T;
21
+
22
+ /**
23
+ * Copyright 2022 Joe Bell. All rights reserved.
24
+ *
25
+ * This file is licensed to you under the Apache License, Version 2.0
26
+ * (the "License"); you may not use this file except in compliance with the
27
+ * License. You may obtain a copy of the License at
28
+ *
29
+ * http://www.apache.org/licenses/LICENSE-2.0
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software
32
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
33
+ * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
34
+ * License for the specific language governing permissions and limitations under
35
+ * the License.
36
+ */
37
+
38
+ type VariantProps<Component extends (...args: any) => any> = Omit<OmitUndefined<Parameters<Component>[0]>, "class" | "className">;
39
+
40
+ declare const spinnerVariants: (props?: ({
41
+ size?: "lg" | "md" | "sm" | null | undefined;
42
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
43
+ type SpinnerProps = {
44
+ className?: string;
45
+ customSize?: number;
46
+ } & VariantProps<typeof spinnerVariants>;
47
+ declare const Spinner: React.ForwardRefExoticComponent<{
48
+ className?: string;
49
+ customSize?: number;
50
+ } & VariantProps<(props?: ({
51
+ size?: "lg" | "md" | "sm" | null | undefined;
52
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
53
+
54
+ export { Spinner, type SpinnerProps };
@@ -0,0 +1,54 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+
4
+ /**
5
+ * Copyright 2022 Joe Bell. All rights reserved.
6
+ *
7
+ * This file is licensed to you under the Apache License, Version 2.0
8
+ * (the "License"); you may not use this file except in compliance with the
9
+ * License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15
+ * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
16
+ * License for the specific language governing permissions and limitations under
17
+ * the License.
18
+ */
19
+
20
+ type OmitUndefined<T> = T extends undefined ? never : T;
21
+
22
+ /**
23
+ * Copyright 2022 Joe Bell. All rights reserved.
24
+ *
25
+ * This file is licensed to you under the Apache License, Version 2.0
26
+ * (the "License"); you may not use this file except in compliance with the
27
+ * License. You may obtain a copy of the License at
28
+ *
29
+ * http://www.apache.org/licenses/LICENSE-2.0
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software
32
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
33
+ * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the
34
+ * License for the specific language governing permissions and limitations under
35
+ * the License.
36
+ */
37
+
38
+ type VariantProps<Component extends (...args: any) => any> = Omit<OmitUndefined<Parameters<Component>[0]>, "class" | "className">;
39
+
40
+ declare const spinnerVariants: (props?: ({
41
+ size?: "lg" | "md" | "sm" | null | undefined;
42
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
43
+ type SpinnerProps = {
44
+ className?: string;
45
+ customSize?: number;
46
+ } & VariantProps<typeof spinnerVariants>;
47
+ declare const Spinner: React.ForwardRefExoticComponent<{
48
+ className?: string;
49
+ customSize?: number;
50
+ } & VariantProps<(props?: ({
51
+ size?: "lg" | "md" | "sm" | null | undefined;
52
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
53
+
54
+ export { Spinner, type SpinnerProps };
@@ -1,2 +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-3",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
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-3",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";export{M as Spinner};//# sourceMappingURL=Spinner.js.map
2
2
  //# sourceMappingURL=Spinner.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var t=require('react'),e=require('@radix-ui/react-switch'),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 t__namespace=/*#__PURE__*/_interopNamespace(t);var e__namespace=/*#__PURE__*/_interopNamespace(e);function i(...s){return tailwindMerge.twMerge(clsx.clsx(s))}var n="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var p=t__namespace.forwardRef(({className:s,label:o,description:r,...a},c)=>t__namespace.createElement("div",{className:"flex items-center gap-2"},t__namespace.createElement(e__namespace.Root,{className:i("peer inline-flex h-6 w-11 shrink-0 cursor-pointer","items-center rounded-full border-2 border-transparent","transition-colors focus-visible:outline-none",n,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",s),...a,ref:c},t__namespace.createElement(e__namespace.Thumb,{className:i("pointer-events-none block h-5 w-5","rounded-full bg-white shadow-lg ring-0","transition-transform","data-[state=checked]:translate-x-5","data-[state=unchecked]:translate-x-0")})),(o||r)&&t__namespace.createElement("div",{className:"flex flex-col"},o&&t__namespace.createElement("label",{className:"text-sm font-medium text-text",htmlFor:a.id},o),r&&t__namespace.createElement("span",{className:"text-xs text-text-secondary"},r))));p.displayName="Switch";if (exports.default) module.exports = exports.default;exports.Switch=p;//# sourceMappingURL=Switch.cjs.map
1
+ 'use strict';var t=require('react'),e=require('@radix-ui/react-switch'),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 t__namespace=/*#__PURE__*/_interopNamespace(t);var e__namespace=/*#__PURE__*/_interopNamespace(e);function i(...s){return tailwindMerge.twMerge(clsx.clsx(s))}var n="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var p=t__namespace.forwardRef(({className:s,label:o,description:r,...a},c)=>t__namespace.createElement("div",{className:"flex items-center gap-2"},t__namespace.createElement(e__namespace.Root,{className:i("peer inline-flex h-6 w-11 shrink-0 cursor-pointer","items-center rounded-full border-2 border-transparent","transition-colors focus-visible:outline-none",n,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",s),...a,ref:c},t__namespace.createElement(e__namespace.Thumb,{className:i("pointer-events-none block h-5 w-5","rounded-full bg-white shadow-lg ring-0","transition-transform","data-[state=checked]:translate-x-5","data-[state=unchecked]:translate-x-0")})),(o||r)&&t__namespace.createElement("div",{className:"flex flex-col"},o&&t__namespace.createElement("label",{className:"text-sm font-medium text-text",htmlFor:a.id},o),r&&t__namespace.createElement("span",{className:"text-xs text-text-secondary"},r))));p.displayName="Switch";exports.Switch=p;//# sourceMappingURL=Switch.cjs.map
2
2
  //# sourceMappingURL=Switch.cjs.map
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
3
+
4
+ type SwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> & {
5
+ label?: string;
6
+ description?: string;
7
+ };
8
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
9
+ label?: string;
10
+ description?: string;
11
+ } & React.RefAttributes<HTMLButtonElement>>;
12
+
13
+ export { Switch, type SwitchProps };
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
3
+
4
+ type SwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> & {
5
+ label?: string;
6
+ description?: string;
7
+ };
8
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitive.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
9
+ label?: string;
10
+ description?: string;
11
+ } & React.RefAttributes<HTMLButtonElement>>;
12
+
13
+ export { Switch, type SwitchProps };
@@ -1,2 +1,2 @@
1
- import*as t from'react';import*as e from'@radix-ui/react-switch';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';function i(...s){return twMerge(clsx(s))}var n="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var p=t.forwardRef(({className:s,label:o,description:r,...a},c)=>t.createElement("div",{className:"flex items-center gap-2"},t.createElement(e.Root,{className:i("peer inline-flex h-6 w-11 shrink-0 cursor-pointer","items-center rounded-full border-2 border-transparent","transition-colors focus-visible:outline-none",n,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",s),...a,ref:c},t.createElement(e.Thumb,{className:i("pointer-events-none block h-5 w-5","rounded-full bg-white shadow-lg ring-0","transition-transform","data-[state=checked]:translate-x-5","data-[state=unchecked]:translate-x-0")})),(o||r)&&t.createElement("div",{className:"flex flex-col"},o&&t.createElement("label",{className:"text-sm font-medium text-text",htmlFor:a.id},o),r&&t.createElement("span",{className:"text-xs text-text-secondary"},r))));p.displayName="Switch";if (exports.default) module.exports = exports.default;export{p as Switch};//# sourceMappingURL=Switch.js.map
1
+ import*as t from'react';import*as e from'@radix-ui/react-switch';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';function i(...s){return twMerge(clsx(s))}var n="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var p=t.forwardRef(({className:s,label:o,description:r,...a},c)=>t.createElement("div",{className:"flex items-center gap-2"},t.createElement(e.Root,{className:i("peer inline-flex h-6 w-11 shrink-0 cursor-pointer","items-center rounded-full border-2 border-transparent","transition-colors focus-visible:outline-none",n,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",s),...a,ref:c},t.createElement(e.Thumb,{className:i("pointer-events-none block h-5 w-5","rounded-full bg-white shadow-lg ring-0","transition-transform","data-[state=checked]:translate-x-5","data-[state=unchecked]:translate-x-0")})),(o||r)&&t.createElement("div",{className:"flex flex-col"},o&&t.createElement("label",{className:"text-sm font-medium text-text",htmlFor:a.id},o),r&&t.createElement("span",{className:"text-xs text-text-secondary"},r))));p.displayName="Switch";export{p as Switch};//# sourceMappingURL=Switch.js.map
2
2
  //# sourceMappingURL=Switch.js.map
@@ -1,4 +1,4 @@
1
- 'use strict';var n=require('react'),s=require('@radix-ui/react-tabs'),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 n__namespace=/*#__PURE__*/_interopNamespace(n);var s__namespace=/*#__PURE__*/_interopNamespace(s);var x={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},H=e=>{let[r,a]=e.split("-");return r==="heading"?x[a]||"p":r==="label"?"label":"p"},M={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},L=e=>e?(Array.isArray(e)?e:[e]).map(a=>{if(a.includes(":")){let[l,o]=a.split(":");return `${l}:text-${o}`}return `text-${a}`}).join(" "):"text-body-default",d=n__namespace.default.forwardRef(({variant:e="body-default",color:r="primary",as:a,className:l,children:o,weight:i,...p},c)=>{let b=L(e),t=r==="inherit"?"text-inherit":`text-text-${r}`,f=n__namespace.default.useMemo(()=>{let h=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return H(h)},[e]);return n__namespace.default.createElement(a||f,{ref:c,className:`font-sans antialiased ${b} ${t} ${i?`!${M[i]}`:""} ${l??""}`,...p},o)});d.displayName="Text";function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var g="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var v={black:"bg-text-text text-white",accent:"bg-primary-100 text-white",secondary:"bg-secondary-100 text-secondary"},$={black:"border border-text text-text",accent:"border border-primary-100 text-primary-100",secondary:"border border-text-secondary text-secondary"},y=n__namespace.forwardRef(({className:e,variant:r="filled",color:a="black",isLoading:l=!1,children:o,disabled:i,...p},c)=>n__namespace.createElement("button",{ref:c,className:m(`
1
+ 'use strict';var n=require('react'),s=require('@radix-ui/react-tabs'),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 n__namespace=/*#__PURE__*/_interopNamespace(n);var s__namespace=/*#__PURE__*/_interopNamespace(s);var x={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},H=e=>{let[r,a]=e.split("-");return r==="heading"?x[a]||"p":r==="label"?"label":"p"},M={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},L=e=>e?(Array.isArray(e)?e:[e]).map(a=>{if(a.includes(":")){let[l,o]=a.split(":");return `${l}:text-${o}`}return `text-${a}`}).join(" "):"text-body-default",T=n__namespace.default.forwardRef(({variant:e="body-default",color:r="primary",as:a,className:l,children:o,weight:i,...p},c)=>{let d=L(e),t=r==="inherit"?"text-inherit":`text-text-${r}`,f=n__namespace.default.useMemo(()=>{let h=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return H(h)},[e]);return n__namespace.default.createElement(a||f,{ref:c,className:`font-sans antialiased ${d} ${t} ${i?`!${M[i]}`:""} ${l??""}`,...p},o)});T.displayName="Text";function b(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var g="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var v={black:"bg-text-text text-white",accent:"bg-primary-100 text-white",secondary:"bg-secondary-100 text-secondary"},$={black:"border border-text text-text",accent:"border border-primary-100 text-primary-100",secondary:"border border-text-secondary text-secondary"},y=n__namespace.forwardRef(({className:e,variant:r="filled",color:a="black",isLoading:l=!1,children:o,disabled:i,end:p,...c},d)=>n__namespace.createElement("button",{ref:d,className:b(`
2
2
  sm:px-7 px-4
3
3
  py-2
4
4
  inline-flex items-center justify-center
@@ -6,5 +6,5 @@
6
6
  transition-colors duration-200
7
7
  disabled:opacity-50 disabled:pointer-events-none
8
8
  hover:opacity-80 active:scale-95
9
- truncate`,g,r==="filled"?v[a]:$[a],e),disabled:i||l,type:"button",...p},typeof o=="string"?n__namespace.createElement(d,{variant:["sm:body-default-bold","body-xxs-semibold"],color:"inherit"},o):o));y.displayName="Button";var C=n__namespace.default.forwardRef(({items:e,defaultValue:r,className:a="",onChange:l,variant:o="default"},i)=>{let[p,c]=n__namespace.default.useState(r||e[0]?.value),b=n.useCallback(t=>{l?.(t),c(t);},[l]);return n__namespace.default.createElement(s__namespace.Root,{defaultValue:r||e[0]?.value,onValueChange:b,className:a},n__namespace.default.createElement(s__namespace.List,{ref:i,className:m("flex",o==="default"?"gap-8 border-b border-stroke mb-4":"gap-4 justify-center flex")},e.map(t=>o==="default"?n__namespace.default.createElement(s__namespace.Trigger,{key:t.value,value:t.value,className:"group relative flex-1 pb-4"},n__namespace.default.createElement(d,{variant:["sm:body-md","body-default-semibold"],color:"secondary",className:"group-data-[state=active]:text-text transition-colors sm:text-inherit"},t.label),n__namespace.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"})):n__namespace.default.createElement(s__namespace.Trigger,{key:t.value,value:t.value,asChild:!0},n__namespace.default.createElement(y,{variant:"filled",color:t.value===p?"black":"secondary",className:"py-3"},t.label)))),e.map(t=>n__namespace.default.createElement(s__namespace.Content,{key:t.value,value:t.value},t.content)))});C.displayName="Tabs";if (exports.default) module.exports = exports.default;exports.Tabs=C;//# sourceMappingURL=Tabs.cjs.map
9
+ truncate`,g,r==="filled"?v[a]:$[a],e),disabled:i||l,type:"button",...c},typeof o=="string"?n__namespace.createElement(T,{variant:["sm:body-default-bold","body-xxs-semibold"],color:"inherit"},o):o,p));y.displayName="Button";var C=n__namespace.default.forwardRef(({items:e,defaultValue:r,className:a="",onChange:l,variant:o="default"},i)=>{let[p,c]=n__namespace.default.useState(r||e[0]?.value),d=n.useCallback(t=>{l?.(t),c(t);},[l]);return n__namespace.default.createElement(s__namespace.Root,{defaultValue:r||e[0]?.value,onValueChange:d,className:a},n__namespace.default.createElement(s__namespace.List,{ref:i,className:b("flex",o==="default"?"gap-8 border-b border-stroke mb-4":"gap-4 justify-center flex")},e.map(t=>o==="default"?n__namespace.default.createElement(s__namespace.Trigger,{key:t.value,value:t.value,className:"group relative flex-1 pb-4"},n__namespace.default.createElement(T,{variant:["sm:body-md","body-default-semibold"],color:"secondary",className:"group-data-[state=active]:text-text transition-colors sm:text-inherit"},t.label),n__namespace.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"})):n__namespace.default.createElement(s__namespace.Trigger,{key:t.value,value:t.value,asChild:!0},n__namespace.default.createElement(y,{variant:"filled",color:t.value===p?"black":"secondary",className:"py-3"},t.label)))),e.map(t=>n__namespace.default.createElement(s__namespace.Content,{key:t.value,value:t.value},t.content)))});C.displayName="Tabs";exports.Tabs=C;//# sourceMappingURL=Tabs.cjs.map
10
10
  //# sourceMappingURL=Tabs.cjs.map