@deckai/deck-ui 0.0.10 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +127 -1
- package/dist/components/AboutCard.cjs +3 -7
- package/dist/components/AboutCard.cjs.map +1 -1
- package/dist/components/AboutCard.d.cts +3 -2
- package/dist/components/AboutCard.d.ts +3 -2
- package/dist/components/AboutCard.js +3 -7
- package/dist/components/AboutCard.js.map +1 -1
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.cjs.map +1 -1
- package/dist/components/Avatar.d.cts +3 -1
- package/dist/components/Avatar.d.ts +3 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.cjs.map +1 -1
- package/dist/components/Badge.d.cts +2 -2
- package/dist/components/Badge.d.ts +2 -2
- package/dist/components/Badge.js +1 -1
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.cjs.map +1 -1
- package/dist/components/Breadcrumbs.js +1 -1
- package/dist/components/Breadcrumbs.js.map +1 -1
- package/dist/components/Button.cjs +3 -7
- package/dist/components/Button.cjs.map +1 -1
- package/dist/components/Button.d.cts +11 -1
- package/dist/components/Button.d.ts +11 -1
- package/dist/components/Button.js +3 -7
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Collapsible.cjs +2 -0
- package/dist/components/Collapsible.cjs.map +1 -0
- package/dist/components/Collapsible.d.cts +12 -0
- package/dist/components/Collapsible.d.ts +12 -0
- package/dist/components/Collapsible.js +2 -0
- package/dist/components/Collapsible.js.map +1 -0
- package/dist/components/Combobox.cjs +1 -1
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.cts +7 -1
- package/dist/components/Combobox.d.ts +7 -1
- package/dist/components/Combobox.js +1 -1
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ContactItem.cjs +1 -1
- package/dist/components/ContactItem.cjs.map +1 -1
- package/dist/components/ContactItem.d.cts +2 -3
- package/dist/components/ContactItem.d.ts +2 -3
- package/dist/components/ContactItem.js +1 -1
- package/dist/components/ContactItem.js.map +1 -1
- package/dist/components/EditButton.cjs +10 -0
- package/dist/components/EditButton.cjs.map +1 -0
- package/dist/components/EditButton.d.cts +12 -0
- package/dist/components/EditButton.d.ts +12 -0
- package/dist/components/EditButton.js +10 -0
- package/dist/components/EditButton.js.map +1 -0
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.cjs.map +1 -1
- package/dist/components/Icon.d.cts +4 -3
- package/dist/components/Icon.d.ts +4 -3
- package/dist/components/Icon.js +1 -1
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconRenderer.cjs +2 -0
- package/dist/components/IconRenderer.cjs.map +1 -0
- package/dist/components/IconRenderer.d.cts +13 -0
- package/dist/components/IconRenderer.d.ts +13 -0
- package/dist/components/IconRenderer.js +2 -0
- package/dist/components/IconRenderer.js.map +1 -0
- package/dist/components/Illustration.cjs +50 -0
- package/dist/components/Illustration.cjs.map +1 -0
- package/dist/components/Illustration.d.cts +10 -0
- package/dist/components/Illustration.d.ts +10 -0
- package/dist/components/Illustration.js +50 -0
- package/dist/components/Illustration.js.map +1 -0
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.cjs.map +1 -1
- package/dist/components/Input.d.cts +6 -2
- package/dist/components/Input.d.ts +6 -2
- package/dist/components/Input.js +1 -1
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/Link.cjs.map +1 -1
- package/dist/components/Link.d.cts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/Link.js.map +1 -1
- package/dist/components/Logo.cjs +1 -1
- package/dist/components/Logo.cjs.map +1 -1
- package/dist/components/Logo.d.cts +2 -5
- package/dist/components/Logo.d.ts +2 -5
- package/dist/components/Logo.js +1 -1
- package/dist/components/Logo.js.map +1 -1
- package/dist/components/MultiSelectCombobox.cjs +2 -0
- package/dist/components/MultiSelectCombobox.cjs.map +1 -0
- package/dist/components/MultiSelectCombobox.d.cts +21 -0
- package/dist/components/MultiSelectCombobox.d.ts +21 -0
- package/dist/components/MultiSelectCombobox.js +2 -0
- package/dist/components/MultiSelectCombobox.js.map +1 -0
- package/dist/components/Navbar.cjs +2 -2
- package/dist/components/Navbar.cjs.map +1 -1
- package/dist/components/Navbar.d.cts +1 -1
- package/dist/components/Navbar.d.ts +1 -1
- package/dist/components/Navbar.js +2 -2
- package/dist/components/Navbar.js.map +1 -1
- package/dist/components/NavbarItem.cjs +1 -1
- package/dist/components/NavbarItem.cjs.map +1 -1
- package/dist/components/NavbarItem.d.cts +1 -1
- package/dist/components/NavbarItem.d.ts +1 -1
- package/dist/components/NavbarItem.js +1 -1
- package/dist/components/NavbarItem.js.map +1 -1
- package/dist/components/Pressable.cjs +1 -1
- package/dist/components/Pressable.cjs.map +1 -1
- package/dist/components/Pressable.js +1 -1
- package/dist/components/Pressable.js.map +1 -1
- package/dist/components/ProfileCard.cjs +3 -7
- package/dist/components/ProfileCard.cjs.map +1 -1
- package/dist/components/ProfileCard.d.cts +3 -1
- package/dist/components/ProfileCard.d.ts +3 -1
- package/dist/components/ProfileCard.js +3 -7
- package/dist/components/ProfileCard.js.map +1 -1
- package/dist/components/Sidebar.cjs +2 -0
- package/dist/components/Sidebar.cjs.map +1 -0
- package/dist/components/Sidebar.d.cts +37 -0
- package/dist/components/Sidebar.d.ts +37 -0
- package/dist/components/Sidebar.js +2 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/components/SocialCard.cjs +1 -1
- package/dist/components/SocialCard.cjs.map +1 -1
- package/dist/components/SocialCard.js +1 -1
- package/dist/components/SocialCard.js.map +1 -1
- package/dist/components/Spinner.cjs +2 -0
- package/dist/components/Spinner.cjs.map +1 -0
- package/dist/components/Spinner.d.cts +19 -0
- package/dist/components/Spinner.d.ts +19 -0
- package/dist/components/Spinner.js +2 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/Tabs.cjs +1 -1
- package/dist/components/Tabs.cjs.map +1 -1
- package/dist/components/Tabs.js +1 -1
- package/dist/components/Tabs.js.map +1 -1
- package/dist/components/Tag.cjs +1 -1
- package/dist/components/Tag.cjs.map +1 -1
- package/dist/components/Tag.d.cts +4 -2
- package/dist/components/Tag.d.ts +4 -2
- package/dist/components/Tag.js +1 -1
- package/dist/components/Tag.js.map +1 -1
- package/dist/components/Text.cjs +1 -1
- package/dist/components/Text.cjs.map +1 -1
- package/dist/components/Text.d.cts +2 -2
- package/dist/components/Text.d.ts +2 -2
- package/dist/components/Text.js +1 -1
- package/dist/components/Text.js.map +1 -1
- package/dist/components/TextArea.cjs +2 -0
- package/dist/components/TextArea.cjs.map +1 -0
- package/dist/components/TextArea.d.cts +19 -0
- package/dist/components/TextArea.d.ts +19 -0
- package/dist/components/TextArea.js +2 -0
- package/dist/components/TextArea.js.map +1 -0
- package/dist/components/WorkCard.cjs +1 -1
- package/dist/components/WorkCard.cjs.map +1 -1
- package/dist/components/WorkCard.js +1 -1
- package/dist/components/WorkCard.js.map +1 -1
- package/dist/index.cjs +51 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +99 -23
- package/dist/index.d.ts +99 -23
- package/dist/index.js +51 -7
- package/dist/index.js.map +1 -1
- package/dist/styles/styles.css +1 -1
- package/dist/{tailwind-DJFscIlV.d.cts → tailwind-CIZ10fKA.d.cts} +4 -3
- package/dist/{tailwind-DJFscIlV.d.ts → tailwind-CIZ10fKA.d.ts} +4 -3
- package/package.json +4 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Avatar.tsx","../../src/components/Combobox.tsx","../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/components/Input.tsx","../../src/components/Option.tsx","../../src/components/Logo.tsx","../../src/components/NavbarItem.tsx","../../src/components/Navbar.tsx"],"names":["focusRingStyles","focusRingStylesCoerced","Pressable","children","type","className","props","React","Avatar","src","size","onClick","sizeStyle","content","cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","baseSize","style","mediaQueries","acc","breakpoint","value","Icon","name","color","title","ref","IconComponent","IconMap","sizeStyles","Input","end","iconName","g","Option","label","onChange","selected","Combobox","options","placeholder","open","setOpen","useState","inputValue","setInputValue","selectedOption","useMemo","option","filteredItems","handleOptionChange","useCallback","e","optionValue","index","Logo","width","height","NavbarItem","hasNotification","Navbar","searchOptions","onSearchChange","navbarItems","onLogoClick","onProfileClick","avatarImage"],"mappings":"+NAmEO,IAAMA,CACX,CAAA,qGAAA,CAEWC,EAAyB,gCCjE/B,CAAA,IAAMC,CAAsC,CAAA,CAAC,CAClD,QAAA,CAAAC,EACA,IAAAC,CAAAA,CAAAA,CAAO,QACP,CAAA,SAAA,CAAAC,CACA,CAAA,GAAGC,CACL,CACEC,GAAAA,UAAAA,CAAA,cAAC,QAEC,CAAA,CAAA,IAAA,CAAMH,EACN,SAAW,CAAA,CAAA,gEAAA,EAAmEJ,CAAe,CAAA,CAAA,EAAIK,CAAS,CAAA,CAAA,CACzG,GAAGC,CAEHH,CAAAA,CAAAA,CACH,CCVK,CAAA,IAAMK,CAAS,CAAA,CAAC,CAAE,GAAAC,CAAAA,CAAAA,CAAK,IAAAC,CAAAA,CAAAA,CAAO,EAAI,CAAA,OAAA,CAAAC,EAAS,GAAGL,CAAM,IAAmB,CAE5E,IAAMM,EAAY,OAAOF,CAAAA,EAAS,QAAW,CAAA,CAAA,EAAGA,CAAI,CAAA,EAAA,CAAA,CAAOA,EACrDG,CAAUJ,CAAAA,CAAAA,CACdF,UAAA,CAAA,aAAA,CAAC,KACC,CAAA,CAAA,GAAA,CAAKE,EACL,GAAI,CAAA,QAAA,CACJ,SAAU,CAAA,cAAA,CACV,KAAO,CAAA,CACL,MAAOG,CACP,CAAA,MAAA,CAAQ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,CAACsC,CAAA,CAAA,CACC,OAASuB,CAAAA,CAAAA,CACT,YAAY,uDACZ,CAAA,GAAA,CAAK7D,UAAA,CAAA,aAAA,CAACsB,CAAA,CAAA,CAAK,KAAK,eAAgB,CAAA,CAAA,CAChC,QAAUwC,CAAAA,CAAAA,CACV,SAAU,CAAA,aAAA,CACZ,CACF,CACA9D,CAAAA,UAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,cACbA,UAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,kDACZ+D,CAAAA,CAAAA,CAAAA,CAAY,IAAI,CAAC,CAAE,QAAA/B,CAAAA,CAAAA,CAAU,KAAAP,CAAAA,CAAAA,CAAO,QAAArB,CAAQ,CAAA,GAC3CJ,UAAA,CAAA,aAAA,CAAC0D,CAAA,CAAA,CACC,IAAKjC,CACL,CAAA,QAAA,CAAUO,CACV,CAAA,KAAA,CAAOP,CACP,CAAA,OAAA,CAASrB,EACX,CACD,CACH,CACAJ,CAAAA,UAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,MACbA,CAAAA,CAAAA,UAAAA,CAAA,aAACC,CAAAA,CAAAA,CAAA,CAAO,OAAA,CAASgE,EAAgB,GAAKC,CAAAA,CAAAA,CAAa,CACrD,CACF,CACF","file":"Navbar.js","sourcesContent":["import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React from \"react\";\nimport { Pressable } from \"./Pressable\";\n\nexport type AvatarProps = {\n src?: string;\n size?: number | string;\n} & Pick<React.ComponentProps<typeof Pressable>, \"onClick\">;\n\nexport const Avatar = ({ src, size = 48, onClick, ...props }: AvatarProps) => {\n // Convert size to a string with 'px' if it's a number\n const sizeStyle = typeof size === \"number\" ? `${size}px` : size;\n const content = src ? (\n <img\n src={src}\n alt=\"avatar\"\n className=\"rounded-full\"\n style={{\n width: sizeStyle,\n height: sizeStyle\n }}\n {...props}\n />\n ) : (\n <div\n style={{\n width: sizeStyle,\n height: sizeStyle\n }}\n className=\"rounded-full bg-gray-200\"\n />\n );\n return onClick ? <Pressable onClick={onClick}>{content}</Pressable> : content;\n};\n","import React, { useCallback, useMemo, useState } from \"react\";\nimport * as Popover from \"@radix-ui/react-popover\";\nimport { Input } from \"./Input\";\nimport { OptionProps, Option } from \"./Option\";\nimport { focusRingStylesCoerced } from \"../utils/tailwind\";\n\nexport type ComboboxProps = {\n options: OptionProps[];\n placeholder?: string;\n value?: string;\n onChange: (value: string) => void;\n end?: React.ReactNode;\n className?: string;\n};\n\nexport const Combobox = ({\n options,\n placeholder = \"Select an item...\",\n value,\n onChange,\n end,\n className\n}: ComboboxProps) => {\n const [open, setOpen] = useState(false);\n const [inputValue, setInputValue] = useState<string | undefined>(value);\n\n const selectedOption: OptionProps | undefined = useMemo(\n () => options.find((option) => option.value === inputValue),\n [inputValue, options]\n );\n\n const filteredItems = options.filter((option) =>\n inputValue\n ? option.label.toLowerCase().includes(inputValue.toLowerCase())\n : options\n );\n\n const handleOptionChange = useCallback(\n (option: string) => {\n onChange(option);\n setOpen(false);\n setInputValue(selectedOption?.label);\n },\n [onChange, selectedOption?.label]\n );\n\n console.log({ open }, \"wtf\");\n\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <div\n className={`relative w-full font-sans text-text-secondary ${className}`}\n >\n <Popover.Trigger asChild>\n <div className=\"flex\">\n <div className=\"relative flex-1\">\n <Input\n placeholder={placeholder}\n value={inputValue}\n onChange={(e) => setInputValue(e.target.value)}\n end={end}\n className={`flex-1 ${open && focusRingStylesCoerced}`}\n />\n </div>\n </div>\n </Popover.Trigger>\n\n <Popover.Portal>\n <Popover.Content\n className=\"w-[--radix-popover-trigger-width] p-1 bg-white rounded-md shadow-lg border mt-1\"\n sideOffset={5}\n >\n <div className=\"max-h-60 overflow-auto flex flex-col items-start\">\n {filteredItems.length > 0 ? (\n filteredItems.map(({ label, value: optionValue }, index) => (\n <Option\n onChange={handleOptionChange}\n value={optionValue}\n key={index}\n label={label}\n />\n ))\n ) : (\n <div className=\"px-2 py-1.5 text-sm text-gray-500\">\n No results found\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover.Portal>\n </div>\n </Popover.Root>\n );\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: number | `${Breakpoint}:${number}`;\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"@media (min-width: 640px)\",\n md: \"@media (min-width: 768px)\",\n lg: \"@media (min-width: 1024px)\",\n xl: \"@media (min-width: 1280px)\",\n \"2xl\": \"@media (min-width: 1536px)\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const baseSize = typeof sizeArray[0] === \"number\" ? sizeArray[0] : 24;\n\n const style: React.CSSProperties = {\n width: `${baseSize}px`,\n height: `${baseSize}px`\n };\n\n // Add media queries for responsive sizes\n const mediaQueries = sizeArray\n .filter(\n (size): size is `${Breakpoint}:${number}` =>\n typeof size === \"string\" && size.includes(\":\")\n )\n .reduce(\n (acc, size) => {\n const [breakpoint, value] = size.split(\":\") as [Breakpoint, string];\n acc[BREAKPOINT_MAP[breakpoint]] = {\n width: `${value}px`,\n height: `${value}px`\n };\n return acc;\n },\n {} as Record<string, React.CSSProperties>\n );\n\n if (Object.keys(mediaQueries).length > 0) {\n (style as any)[\"@media\"] = mediaQueries;\n }\n\n return style;\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import * as React from \"react\";\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\n\nexport type InputProps = {\n className?: string;\n end?: React.ReactNode;\n /** renders an icon in the end slot */\n iconName?: IconName;\n} & React.InputHTMLAttributes<HTMLInputElement> &\n Pick<IconProps, \"color\" | \"size\" | \"title\">;\n\nexport const Input = ({\n className,\n end,\n iconName,\n color,\n size,\n title,\n ...props\n}: InputProps) => (\n <div className=\"relative\">\n <input\n className={cn(\n `font-sans flex w-full rounded-lg border border-secondary-50 bg-background px-3 py-3 text-secondary ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-secondary text-text-primary ${focusRingStyles} disabled:cursor-not-allowed disabled:opacity-50 md:text-md`,\n end && \"pr-10\",\n className\n )}\n {...props}\n />\n {end && (\n <div className=\"absolute inset-y-0 right-0 flex items-center pr-3\">\n {iconName ? (\n <Icon name={iconName} color={color} size={size} title={title} />\n ) : (\n end\n )}\n </div>\n )}\n </div>\n);\n","import React from \"react\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\n\nexport type OptionProps = {\n label: string;\n value: string;\n onChange?: (value: string) => void;\n selected?: boolean;\n};\n\nexport const Option = ({ value, label, onChange, selected }: OptionProps) => (\n <button\n type=\"button\"\n className={cn(\n \"relative w-full h-full text-left px-2 py-1.5 text-sm cursor-pointer hover:bg-gray-100 rounded\",\n selected && \"bg-gray-100\"\n )}\n onClick={() => {\n onChange?.(value);\n }}\n >\n {label}\n </button>\n);\n","import React from \"react\";\n\nexport type LogoProps = {\n /** @default 76 */\n width?: number;\n /** @default 25 */\n height?: number;\n};\n\nexport const Logo = ({ width = 76, height = 25 }: LogoProps) => (\n <svg\n width={width}\n height={height}\n viewBox=\"0 0 76 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.8 15.584C0.8 13.9413 1.12 12.4693 1.76 11.168C2.4 9.84533 3.27467 8.8 4.384 8.032C5.49333 7.264 6.77333 6.88 8.224 6.88C9.39733 6.88 10.464 7.168 11.424 7.744C12.384 8.29867 13.1093 9.03467 13.6 9.952V0.639999H18.72V18.304C18.72 18.816 18.8053 19.1787 18.976 19.392C19.1467 19.584 19.424 19.7013 19.808 19.744V24C18.912 24.1707 18.1867 24.256 17.632 24.256C16.7573 24.256 16.0427 24.064 15.488 23.68C14.9547 23.296 14.624 22.7627 14.496 22.08L14.4 21.216C13.8027 22.2613 12.992 23.04 11.968 23.552C10.944 24.064 9.86667 24.32 8.736 24.32C7.584 24.32 6.51733 24.1067 5.536 23.68C4.576 23.232 3.73333 22.6133 3.008 21.824C2.304 21.0347 1.76 20.1067 1.376 19.04C0.992 17.9733 0.8 16.8213 0.8 15.584ZM13.632 17.664V14.144C13.4187 13.568 13.1093 13.0667 12.704 12.64C12.32 12.2133 11.872 11.872 11.36 11.616C10.8693 11.36 10.368 11.232 9.856 11.232C9.30133 11.232 8.78933 11.3493 8.32 11.584C7.872 11.8187 7.47733 12.1493 7.136 12.576C6.79467 12.9813 6.528 13.4507 6.336 13.984C6.16533 14.5173 6.08 15.0827 6.08 15.68C6.08 16.2987 6.176 16.8747 6.368 17.408C6.58133 17.92 6.86933 18.3787 7.232 18.784C7.59467 19.168 8.02133 19.4667 8.512 19.68C9.00267 19.8933 9.536 20 10.112 20C10.4747 20 10.8267 19.9467 11.168 19.84C11.5093 19.712 11.8293 19.552 12.128 19.36C12.448 19.168 12.736 18.9227 12.992 18.624C13.248 18.3253 13.4613 18.0053 13.632 17.664ZM30.0895 24.32C28.6602 24.32 27.3908 24.096 26.2815 23.648C25.1722 23.1787 24.2228 22.5493 23.4335 21.76C22.6655 20.9707 22.0788 20.064 21.6735 19.04C21.2682 17.9947 21.0655 16.9067 21.0655 15.776C21.0655 14.1547 21.4175 12.6827 22.1215 11.36C22.8468 10.016 23.8815 8.93867 25.2255 8.128C26.5695 7.296 28.1908 6.88 30.0895 6.88C31.9882 6.88 33.5988 7.28533 34.9215 8.096C36.2655 8.90667 37.2895 9.97333 37.9935 11.296C38.6975 12.5973 39.0495 14.016 39.0495 15.552C39.0495 15.8507 39.0282 16.1493 38.9855 16.448C38.9642 16.7253 38.9428 16.9707 38.9215 17.184H26.5055C26.5695 17.9307 26.7722 18.56 27.1135 19.072C27.4762 19.584 27.9348 19.9787 28.4895 20.256C29.0442 20.512 29.6308 20.64 30.2495 20.64C31.0175 20.64 31.7322 20.4587 32.3935 20.096C33.0762 19.7333 33.5455 19.2427 33.8015 18.624L38.1535 19.84C37.7268 20.7147 37.1188 21.4933 36.3295 22.176C35.5615 22.8373 34.6442 23.36 33.5775 23.744C32.5322 24.128 31.3695 24.32 30.0895 24.32ZM26.3775 14.048H33.6735C33.5882 13.344 33.3855 12.736 33.0655 12.224C32.7455 11.6907 32.3188 11.2853 31.7855 11.008C31.2522 10.7093 30.6655 10.56 30.0255 10.56C29.3642 10.56 28.7668 10.7093 28.2335 11.008C27.7215 11.2853 27.3055 11.6907 26.9855 12.224C26.6655 12.736 26.4628 13.344 26.3775 14.048ZM48.762 24.32C47.3327 24.32 46.0633 24.0853 44.954 23.616C43.8447 23.1467 42.8953 22.5067 42.106 21.696C41.338 20.8853 40.7513 19.9573 40.346 18.912C39.9407 17.8667 39.738 16.7573 39.738 15.584C39.738 14.048 40.09 12.6187 40.794 11.296C41.5193 9.97333 42.554 8.90667 43.898 8.096C45.242 7.28533 46.8633 6.88 48.762 6.88C50.682 6.88 52.3033 7.296 53.626 8.128C54.97 8.93867 55.9727 10.0053 56.634 11.328L51.642 12.832C51.322 12.32 50.906 11.9253 50.394 11.648C49.9033 11.3707 49.3487 11.232 48.73 11.232C48.026 11.232 47.386 11.4133 46.81 11.776C46.2553 12.1387 45.8073 12.64 45.466 13.28C45.146 13.92 44.986 14.688 44.986 15.584C44.986 16.4587 45.1567 17.2267 45.498 17.888C45.8393 18.5493 46.2873 19.072 46.842 19.456C47.3967 19.8187 48.026 20 48.73 20C49.1567 20 49.5513 19.936 49.914 19.808C50.298 19.6587 50.6393 19.456 50.938 19.2C51.258 18.944 51.5033 18.656 51.674 18.336L56.666 19.872C56.2607 20.7253 55.674 21.4933 54.906 22.176C54.1593 22.8373 53.274 23.36 52.25 23.744C51.226 24.128 50.0633 24.32 48.762 24.32ZM69.636 24L65.252 17.28L63.46 19.104V24H58.34V0.639999H63.46V14.144L69.156 7.2H74.564L68.516 14.432L75.076 24H69.636Z\"\n fill=\"#080808\"\n />\n </svg>\n);\n","import React from \"react\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\nimport { Pressable, PressableProps } from \"./Pressable\";\n\nexport type NavbarItemProps = {\n iconName: IconName;\n hasNotification?: boolean;\n} & Pick<IconProps, \"color\" | \"title\"> &\n PressableProps;\n\nexport const NavbarItem = ({\n iconName,\n hasNotification,\n color,\n title,\n ...props\n}: NavbarItemProps) => {\n console.log({ hasNotification });\n return (\n <Pressable className=\"relative px-7 py-3\" {...props}>\n <Icon name={iconName} color={color} title={title} />\n {hasNotification && (\n <div className=\"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5\" />\n )}\n </Pressable>\n );\n};\n","import React from \"react\";\nimport { Avatar } from \"./Avatar\";\nimport { Combobox } from \"./Combobox\";\nimport { Icon } from \"./Icon\";\nimport { Logo } from \"./Logo\";\nimport { Pressable } from \"./Pressable\";\nimport { OptionProps } from \"./Option\";\nimport { NavbarItem, NavbarItemProps } from \"./NavbarItem\";\n\nexport type NavbarProps = {\n searchOptions: OptionProps[];\n onSearchChange: (value: string) => void;\n navbarItems: NavbarItemProps[];\n onLogoClick?: () => void;\n onProfileClick?: () => void;\n avatarImage: string;\n};\n\nexport const Navbar = ({\n searchOptions,\n onSearchChange,\n navbarItems,\n onLogoClick,\n onProfileClick,\n avatarImage\n}: NavbarProps) => (\n <div className=\"flex py-6 px-20 justify-between\">\n <div className=\"flex flex-1 gap-6 items-center\">\n <Pressable onClick={onLogoClick} title=\"Deck AI\">\n <Logo />\n </Pressable>\n <Combobox\n options={searchOptions}\n placeholder=\"Search for a creator, type of content, or platform...\"\n end={<Icon name=\"search-normal\" />}\n onChange={onSearchChange}\n className=\"flex-1 mr-8\"\n />\n </div>\n <div className=\"flex gap-4\">\n <div className=\"flex gap-2 border-b-2 border-stroke items-center\">\n {navbarItems.map(({ iconName, title, onClick }) => (\n <NavbarItem\n key={title}\n iconName={iconName}\n title={title}\n onClick={onClick}\n />\n ))}\n </div>\n <div className=\"flex\">\n <Avatar onClick={onProfileClick} src={avatarImage} />\n </div>\n </div>\n </div>\n);\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/Avatar.tsx","../../src/components/Combobox.tsx","../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/components/Input.tsx","../../src/components/Option.tsx","../../src/components/Logo.tsx","../../src/components/NavbarItem.tsx","../../src/components/Navbar.tsx"],"names":["focusRingStyles","focusRingStylesCoerced","Pressable","children","type","className","disabled","props","React","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Avatar","src","onClick","sizeStyles","content","cn","inputs","twMerge","clsx","COLOR_MAP","Icon","name","color","title","style","ref","IconComponent","IconMap","Input","end","iconName","label","labelClassName","id","g","Option","onChange","selected","Combobox","options","placeholder","open","setOpen","useState","inputValue","setInputValue","selectedOption","useMemo","option","filteredItems","handleOptionChange","useCallback","e","optionLabel","optionValue","index","Logo","NavbarItem","hasNotification","Navbar","searchOptions","onSearchChange","navbarItems","onLogoClick","onProfileClick","avatarImage"],"mappings":"+NAmEO,IAAMA,CAAAA,CACX,qGAEWC,CAAAA,CAAAA,CAAyB,gCCjE/B,CAAA,IAAMC,CAAsC,CAAA,CAAC,CAClD,QAAA,CAAAC,CACA,CAAA,IAAA,CAAAC,CAAO,CAAA,QAAA,CACP,SAAAC,CAAAA,CAAAA,CACA,QAAAC,CAAAA,CAAAA,CACA,GAAGC,CACL,CACEC,GAAAA,UAAAA,CAAA,aAAC,CAAA,QAAA,CAAA,CAEC,IAAMJ,CAAAA,CAAAA,CACN,QAAUE,CAAAA,CAAAA,CACV,SAAW,CAAA,CAAA,gEAAA,EAAmEN,CAAe,CAAA,CAAA,EAAIK,CAAS,CAAA,CAAA,EAAIC,CAAW,CAAA,+BAAA,CAAkC,EAAE,CAAA,CAAA,CAC5J,GAAGC,CAAAA,CAAAA,CAEHJ,CACH,CAAA,CCdF,IAAMM,CAAAA,CAA6C,CACjD,EAAA,CAAI,OACJ,CAAA,EAA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AA,CAAA,IAAK,CACR,CAAA,CACA3D,UAAA,CAAA,aAAA,CAACyC,CAAA,CAAA,CACC,OAASsB,CAAAA,CAAAA,CACT,WAAY,CAAA,uDAAA,CACZ,GAAK/D,CAAAA,UAAAA,CAAA,aAACuB,CAAAA,CAAAA,CAAA,CAAK,IAAA,CAAK,eAAgB,CAAA,IAAA,CAAM,CAAC,OAAA,CAAS,EAAE,CAAA,CAAG,CACrD,CAAA,QAAA,CAAUyC,CACV,CAAA,SAAA,CAAU,iBACZ,CAAA,CACF,CACAhE,CAAAA,UAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,YAAA,CAAA,CACbA,UAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,4DACZiE,CAAAA,CAAAA,CAAAA,CAAY,GAAI,CAAA,CAAC,CAAE,QAAA,CAAAhC,CAAU,CAAA,KAAA,CAAAP,CAAO,CAAA,OAAA,CAAAX,CAAQ,CAAA,GAC3Cf,UAAA,CAAA,aAAA,CAAC4D,CAAA,CAAA,CACC,GAAKlC,CAAAA,CAAAA,CACL,QAAUO,CAAAA,CAAAA,CACV,KAAOP,CAAAA,CAAAA,CACP,OAASX,CAAAA,CAAAA,CACX,CACD,CACH,CACAf,CAAAA,UAAAA,CAAA,aAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,MAAA,CAAA,CACbA,UAAA,CAAA,aAAA,CAACa,CAAA,CAAA,CACC,OAASsD,CAAAA,CAAAA,CACT,GAAKC,CAAAA,CAAAA,CACL,IAAM,CAAA,CAAC,OAAS,CAAA,EAAE,CACpB,CAAA,CACF,CACF,CACF","file":"Navbar.js","sourcesContent":["import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React from \"react\";\nimport { Pressable } from \"./Pressable\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nexport type AvatarProps = {\n src?: string;\n size?: ResponsiveSize | ResponsiveSize[];\n} & Pick<React.ComponentProps<typeof Pressable>, \"onClick\">;\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"48px\", height: \"48px\" };\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 (minWidth: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"48px\",\n height: baseSize || \"48px\",\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 Avatar = ({ src, size = 48, onClick, ...props }: AvatarProps) => {\n const sizeStyles = processSizes(size);\n\n const content = src ? (\n <img\n src={src}\n alt=\"avatar\"\n className=\"rounded-full\"\n style={sizeStyles}\n {...props}\n />\n ) : (\n <div style={sizeStyles} className=\"rounded-full bg-gray-200\" />\n );\n\n return onClick ? <Pressable onClick={onClick}>{content}</Pressable> : content;\n};\n","import React, { useCallback, useMemo, useState } from \"react\";\nimport * as Popover from \"@radix-ui/react-popover\";\nimport { Input } from \"./Input\";\nimport { OptionProps, Option } from \"./Option\";\nimport { focusRingStylesCoerced } from \"../utils/tailwind\";\n\nexport type ComboboxProps = {\n options: OptionProps[];\n placeholder?: string;\n value?: string;\n onChange: (value: string) => void;\n end?: React.ReactNode;\n className?: string;\n /** Label text for the combobox */\n label?: string;\n /** Additional classes for the label */\n labelClassName?: string;\n /** ID for accessibility */\n id?: string;\n};\n\nexport const Combobox = ({\n options,\n placeholder = \"Select an item...\",\n value,\n onChange,\n end,\n className,\n label,\n labelClassName,\n id\n}: ComboboxProps) => {\n const [open, setOpen] = useState(false);\n const [inputValue, setInputValue] = useState<string | undefined>(value);\n\n const selectedOption: OptionProps | undefined = useMemo(\n () => options.find((option) => option.value === inputValue),\n [inputValue, options]\n );\n\n const filteredItems = options.filter((option) =>\n inputValue\n ? option.label.toLowerCase().includes(inputValue.toLowerCase())\n : options\n );\n\n const handleOptionChange = useCallback(\n (option: string) => {\n onChange(option);\n setOpen(false);\n setInputValue(selectedOption?.label);\n },\n [onChange, selectedOption?.label]\n );\n\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <div\n className={`relative w-full font-sans text-text-secondary ${className}`}\n >\n <Popover.Trigger asChild>\n <div className=\"flex\">\n <div className=\"relative flex-1\">\n <Input\n id={id}\n label={label}\n labelClassName={labelClassName}\n placeholder={placeholder}\n value={inputValue}\n onChange={(e) => setInputValue(e.target.value)}\n end={end}\n className={`flex-1 ${open && focusRingStylesCoerced}`}\n />\n </div>\n </div>\n </Popover.Trigger>\n\n <Popover.Portal>\n <Popover.Content\n className=\"w-[--radix-popover-trigger-width] p-1 bg-white rounded-md shadow-lg border mt-1 z-20\"\n sideOffset={5}\n >\n <div className=\"max-h-60 overflow-auto flex flex-col items-start\">\n {filteredItems.length > 0 ? (\n filteredItems.map(\n ({ label: optionLabel, value: optionValue }, index) => (\n <Option\n onChange={handleOptionChange}\n value={optionValue}\n key={index}\n label={optionLabel}\n />\n )\n )\n ) : (\n <div className=\"px-2 py-1.5 text-sm text-gray-500\">\n No results found\n </div>\n )}\n </div>\n </Popover.Content>\n </Popover.Portal>\n </div>\n </Popover.Root>\n );\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import * as React from \"react\";\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\n\nexport type InputProps = {\n className?: string;\n end?: React.ReactNode;\n /** renders an icon in the end slot */\n iconName?: IconName;\n /** Label text for the input */\n label?: string;\n /** Additional classes for the label */\n labelClassName?: string;\n} & React.InputHTMLAttributes<HTMLInputElement> &\n Pick<IconProps, \"color\" | \"size\" | \"title\">;\n\nexport const Input = ({\n className,\n end,\n iconName,\n color,\n size,\n title,\n label,\n labelClassName,\n id,\n ...props\n}: InputProps) => (\n <div className=\"space-y-2\">\n {label && (\n <label\n htmlFor={id}\n className={cn(\n \"block text-sm font-medium text-text-primary\",\n labelClassName\n )}\n >\n {label}\n </label>\n )}\n <div className=\"relative\">\n <input\n id={id}\n className={cn(\n `font-sans lg:text-body-default text-xs flex w-full rounded-lg border border-secondary-50 bg-background-0 px-3 md:py-3 py-2 text-secondary ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-secondary text-text-primary ${focusRingStyles} disabled:cursor-not-allowed disabled:opacity-50 md:text-md`,\n end && \"pr-10\",\n className\n )}\n {...props}\n />\n {end && (\n <div className=\"absolute inset-y-0 right-0 flex items-center pr-3\">\n {iconName ? (\n <Icon name={iconName} color={color} size={size} title={title} />\n ) : (\n end\n )}\n </div>\n )}\n </div>\n </div>\n);\n","import React from \"react\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\n\nexport type OptionProps = {\n label: string;\n value: string;\n onChange?: (value: string) => void;\n selected?: boolean;\n};\n\nexport const Option = ({ value, label, onChange, selected }: OptionProps) => (\n <button\n type=\"button\"\n className={cn(\n \"relative w-full h-full text-left px-2 py-1.5 text-sm cursor-pointer hover:bg-gray-100 rounded\",\n selected && \"bg-gray-100\"\n )}\n onClick={() => {\n onChange?.(value);\n }}\n >\n {label}\n </button>\n);\n","import React from \"react\";\nimport { cn } from \"../utils\";\n\nexport type LogoProps = {\n className?: string;\n};\n\nexport const Logo = ({ className }: LogoProps) => (\n <div className={cn(\"lg:w-[76px] lg:h-[25px] w-[58px] h-[19px]\", className)}>\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 76 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M0.8 15.584C0.8 13.9413 1.12 12.4693 1.76 11.168C2.4 9.84533 3.27467 8.8 4.384 8.032C5.49333 7.264 6.77333 6.88 8.224 6.88C9.39733 6.88 10.464 7.168 11.424 7.744C12.384 8.29867 13.1093 9.03467 13.6 9.952V0.639999H18.72V18.304C18.72 18.816 18.8053 19.1787 18.976 19.392C19.1467 19.584 19.424 19.7013 19.808 19.744V24C18.912 24.1707 18.1867 24.256 17.632 24.256C16.7573 24.256 16.0427 24.064 15.488 23.68C14.9547 23.296 14.624 22.7627 14.496 22.08L14.4 21.216C13.8027 22.2613 12.992 23.04 11.968 23.552C10.944 24.064 9.86667 24.32 8.736 24.32C7.584 24.32 6.51733 24.1067 5.536 23.68C4.576 23.232 3.73333 22.6133 3.008 21.824C2.304 21.0347 1.76 20.1067 1.376 19.04C0.992 17.9733 0.8 16.8213 0.8 15.584ZM13.632 17.664V14.144C13.4187 13.568 13.1093 13.0667 12.704 12.64C12.32 12.2133 11.872 11.872 11.36 11.616C10.8693 11.36 10.368 11.232 9.856 11.232C9.30133 11.232 8.78933 11.3493 8.32 11.584C7.872 11.8187 7.47733 12.1493 7.136 12.576C6.79467 12.9813 6.528 13.4507 6.336 13.984C6.16533 14.5173 6.08 15.0827 6.08 15.68C6.08 16.2987 6.176 16.8747 6.368 17.408C6.58133 17.92 6.86933 18.3787 7.232 18.784C7.59467 19.168 8.02133 19.4667 8.512 19.68C9.00267 19.8933 9.536 20 10.112 20C10.4747 20 10.8267 19.9467 11.168 19.84C11.5093 19.712 11.8293 19.552 12.128 19.36C12.448 19.168 12.736 18.9227 12.992 18.624C13.248 18.3253 13.4613 18.0053 13.632 17.664ZM30.0895 24.32C28.6602 24.32 27.3908 24.096 26.2815 23.648C25.1722 23.1787 24.2228 22.5493 23.4335 21.76C22.6655 20.9707 22.0788 20.064 21.6735 19.04C21.2682 17.9947 21.0655 16.9067 21.0655 15.776C21.0655 14.1547 21.4175 12.6827 22.1215 11.36C22.8468 10.016 23.8815 8.93867 25.2255 8.128C26.5695 7.296 28.1908 6.88 30.0895 6.88C31.9882 6.88 33.5988 7.28533 34.9215 8.096C36.2655 8.90667 37.2895 9.97333 37.9935 11.296C38.6975 12.5973 39.0495 14.016 39.0495 15.552C39.0495 15.8507 39.0282 16.1493 38.9855 16.448C38.9642 16.7253 38.9428 16.9707 38.9215 17.184H26.5055C26.5695 17.9307 26.7722 18.56 27.1135 19.072C27.4762 19.584 27.9348 19.9787 28.4895 20.256C29.0442 20.512 29.6308 20.64 30.2495 20.64C31.0175 20.64 31.7322 20.4587 32.3935 20.096C33.0762 19.7333 33.5455 19.2427 33.8015 18.624L38.1535 19.84C37.7268 20.7147 37.1188 21.4933 36.3295 22.176C35.5615 22.8373 34.6442 23.36 33.5775 23.744C32.5322 24.128 31.3695 24.32 30.0895 24.32ZM26.3775 14.048H33.6735C33.5882 13.344 33.3855 12.736 33.0655 12.224C32.7455 11.6907 32.3188 11.2853 31.7855 11.008C31.2522 10.7093 30.6655 10.56 30.0255 10.56C29.3642 10.56 28.7668 10.7093 28.2335 11.008C27.7215 11.2853 27.3055 11.6907 26.9855 12.224C26.6655 12.736 26.4628 13.344 26.3775 14.048ZM48.762 24.32C47.3327 24.32 46.0633 24.0853 44.954 23.616C43.8447 23.1467 42.8953 22.5067 42.106 21.696C41.338 20.8853 40.7513 19.9573 40.346 18.912C39.9407 17.8667 39.738 16.7573 39.738 15.584C39.738 14.048 40.09 12.6187 40.794 11.296C41.5193 9.97333 42.554 8.90667 43.898 8.096C45.242 7.28533 46.8633 6.88 48.762 6.88C50.682 6.88 52.3033 7.296 53.626 8.128C54.97 8.93867 55.9727 10.0053 56.634 11.328L51.642 12.832C51.322 12.32 50.906 11.9253 50.394 11.648C49.9033 11.3707 49.3487 11.232 48.73 11.232C48.026 11.232 47.386 11.4133 46.81 11.776C46.2553 12.1387 45.8073 12.64 45.466 13.28C45.146 13.92 44.986 14.688 44.986 15.584C44.986 16.4587 45.1567 17.2267 45.498 17.888C45.8393 18.5493 46.2873 19.072 46.842 19.456C47.3967 19.8187 48.026 20 48.73 20C49.1567 20 49.5513 19.936 49.914 19.808C50.298 19.6587 50.6393 19.456 50.938 19.2C51.258 18.944 51.5033 18.656 51.674 18.336L56.666 19.872C56.2607 20.7253 55.674 21.4933 54.906 22.176C54.1593 22.8373 53.274 23.36 52.25 23.744C51.226 24.128 50.0633 24.32 48.762 24.32ZM69.636 24L65.252 17.28L63.46 19.104V24H58.34V0.639999H63.46V14.144L69.156 7.2H74.564L68.516 14.432L75.076 24H69.636Z\"\n fill=\"#080808\"\n />\n </svg>\n </div>\n);\n","import React from \"react\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\nimport { Pressable, PressableProps } from \"./Pressable\";\n\nexport type NavbarItemProps = {\n iconName: IconName;\n hasNotification?: boolean;\n} & Pick<IconProps, \"color\" | \"title\"> &\n PressableProps;\n\nexport const NavbarItem = ({\n iconName,\n hasNotification,\n color,\n title,\n ...props\n}: NavbarItemProps) => {\n console.log({ hasNotification });\n return (\n <Pressable className=\"relative lg:px-7 md:px-5 py-3\" {...props}>\n <Icon name={iconName} color={color} title={title} />\n {hasNotification && (\n <div className=\"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5\" />\n )}\n </Pressable>\n );\n};\n","import React from \"react\";\nimport { Avatar } from \"./Avatar\";\nimport { Combobox } from \"./Combobox\";\nimport { Icon } from \"./Icon\";\nimport { Logo } from \"./Logo\";\nimport { Pressable } from \"./Pressable\";\nimport { OptionProps } from \"./Option\";\nimport { NavbarItem, NavbarItemProps } from \"./NavbarItem\";\n\nexport type NavbarProps = {\n searchOptions: OptionProps[];\n onSearchChange: (value: string) => void;\n navbarItems: NavbarItemProps[];\n onLogoClick?: () => void;\n onProfileClick?: () => void;\n avatarImage: string;\n};\n\nexport const Navbar = ({\n searchOptions,\n onSearchChange,\n navbarItems,\n onLogoClick,\n onProfileClick,\n avatarImage\n}: NavbarProps) => (\n <div className=\"flex py-6 lg:px-10 md:px-5 px-6 justify-between md:gap-6 gap-3 sm:relative sticky top-0\">\n <div className=\"flex flex-1 md:gap-6 gap-3 items-center\">\n <Pressable onClick={onLogoClick} title=\"Deck AI\">\n <Logo />\n </Pressable>\n <Combobox\n options={searchOptions}\n placeholder=\"Search for a creator, type of content, or platform...\"\n end={<Icon name=\"search-normal\" size={[\"lg:24\", 18]} />}\n onChange={onSearchChange}\n className=\"flex-1 max-w-lg\"\n />\n </div>\n <div className=\"flex gap-4\">\n <div className=\"md:flex hidden gap-2 border-b-2 border-stroke items-center\">\n {navbarItems.map(({ iconName, title, onClick }) => (\n <NavbarItem\n key={title}\n iconName={iconName}\n title={title}\n onClick={onClick}\n />\n ))}\n </div>\n <div className=\"flex\">\n <Avatar\n onClick={onProfileClick}\n src={avatarImage}\n size={[\"sm:48\", 40]}\n />\n </div>\n </div>\n </div>\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var p=require('react'),icons=require('@deckai/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var p__default=/*#__PURE__*/_interopDefault(p);function f(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var m={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},$={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},v=e=>{if(!e)return {width:"24px",height:"24px"};let s=Array.isArray(e)?e:[e],r={},t;return s.forEach(o=>{if(typeof o=="number")t=`${o}px`;else {let[i,n]=o.split(":"),a=parseInt(n,10);r[`@media (min-width: ${$[i]})`]=`${a}px`;}}),{width:t||"24px",height:t||"24px",...Object.entries(r).reduce((o,[i,n])=>({...o,[i]:{width:n,height:n}}),{})}},c=p__default.default.forwardRef(({name:e,size:s=24,color:r="primary",title:t,className:o,style:i={},...n},a)=>{let d=icons.IconMap[e],g=v(s);return p__default.default.createElement("div",{className:f("flex justify-center items-center",o),style:{...g,"--icon-stroke":m[r],...i}},p__default.default.createElement(d,{ref:a,"aria-hidden":!t,"aria-label":t,stroke:e.includes("filled")?void 0:m[r],...n}))});c.displayName="Icon";var u="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var b=({children:e,type:s="button",className:r,disabled:t,...o})=>p__default.default.createElement("button",{type:s,disabled:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${u} ${r} ${t?"opacity-50 cursor-not-allowed":""}`,...o},e);var F=({iconName:e,hasNotification:s,color:r,title:t,...o})=>(console.log({hasNotification:s}),p__default.default.createElement(b,{className:"relative lg:px-7 md:px-5 py-3",...o},p__default.default.createElement(c,{name:e,color:r,title:t}),s&&p__default.default.createElement("div",{className:"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5"})));if (exports.default) module.exports = exports.default;exports.NavbarItem=F;//# sourceMappingURL=NavbarItem.cjs.map
|
|
2
2
|
//# sourceMappingURL=NavbarItem.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/NavbarItem.tsx"],"names":["cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","baseSize","style","mediaQueries","size","acc","breakpoint","value","Icon","React","name","color","title","className","props","ref","IconComponent","IconMap","sizeStyles","focusRingStyles","Pressable","children","type","NavbarItem","iconName","hasNotification"],"mappings":"gPAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAKF,CAAAA,CAAM,CAAC,CAC7B,CCWA,IAAMG,CAAAA,CAAwC,CAC5C,OAAS,CAAA,SAAA,CACT,SAAW,CAAA,SAAA,CACX,MAAO,SACP,CAAA,WAAA,CAAa,SACf,CAAA,CAKMC,EAA6C,CACjD,EAAA,CAAI,2BACJ,CAAA,EAAA,CAAI,4BACJ,EAAI,CAAA,4BAAA,CACJ,EAAI,CAAA,4BAAA,CACJ,MAAO,4BACT,CAAA,CAEMC,CACJC,CAAAA,CAAAA,EACwB,CACxB,GAAI,CAACA,CAAO,CAAA,OAAO,CAAE,KAAO,CAAA,MAAA,CAAQ,MAAQ,CAAA,MAAO,EAEnD,IAAMC,CAAAA,CAAY,KAAM,CAAA,OAAA,CAAQD,CAAK,CAAIA,CAAAA,CAAAA,CAAQ,CAACA,CAAK,CAAA,CACjDE,EAAW,OAAOD,CAAAA,CAAU,CAAC,CAAA,EAAM,SAAWA,CAAU,CAAA,CAAC,CAAI,CAAA,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file":"NavbarItem.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: number | `${Breakpoint}:${number}`;\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"@media (min-width: 640px)\",\n md: \"@media (min-width: 768px)\",\n lg: \"@media (min-width: 1024px)\",\n xl: \"@media (min-width: 1280px)\",\n \"2xl\": \"@media (min-width: 1536px)\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const baseSize = typeof sizeArray[0] === \"number\" ? sizeArray[0] : 24;\n\n const style: React.CSSProperties = {\n width: `${baseSize}px`,\n height: `${baseSize}px`\n };\n\n // Add media queries for responsive sizes\n const mediaQueries = sizeArray\n .filter(\n (size): size is `${Breakpoint}:${number}` =>\n typeof size === \"string\" && size.includes(\":\")\n )\n .reduce(\n (acc, size) => {\n const [breakpoint, value] = size.split(\":\") as [Breakpoint, string];\n acc[BREAKPOINT_MAP[breakpoint]] = {\n width: `${value}px`,\n height: `${value}px`\n };\n return acc;\n },\n {} as Record<string, React.CSSProperties>\n );\n\n if (Object.keys(mediaQueries).length > 0) {\n (style as any)[\"@media\"] = mediaQueries;\n }\n\n return style;\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React from \"react\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\nimport { Pressable, PressableProps } from \"./Pressable\";\n\nexport type NavbarItemProps = {\n iconName: IconName;\n hasNotification?: boolean;\n} & Pick<IconProps, \"color\" | \"title\"> &\n PressableProps;\n\nexport const NavbarItem = ({\n iconName,\n hasNotification,\n color,\n title,\n ...props\n}: NavbarItemProps) => {\n console.log({ hasNotification });\n return (\n <Pressable className=\"relative px-7 py-3\" {...props}>\n <Icon name={iconName} color={color} title={title} />\n {hasNotification && (\n <div className=\"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5\" />\n )}\n </Pressable>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/NavbarItem.tsx"],"names":["cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","sizeStyles","focusRingStyles","Pressable","children","type","disabled","NavbarItem","iconName","hasNotification"],"mappings":"gPAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCcA,IAAMG,CAAwC,CAAA,CAC5C,QAAS,SACT,CAAA,SAAA,CAAW,UACX,KAAO,CAAA,SAAA,CACP,YAAa,SACf,CAAA,CAEMC,CAA6C,CAAA,CACjD,GAAI,OACJ,CAAA,EAAA,CAAI,OACJ,CAAA,EAAA,CAAI,SACJ,EAAI,CAAA,QAAA,CACJ,KAAO,CAAA,QACT,EAEMC,CACJC,CAAAA,CAAAA,EACwB,CACxB,GAAI,CAACA,EAAO,OAAO,CAAE,KAAO,CAAA,MAAA,CAAQ,OAAQ,MAAO,CAAA,CAEnD,IAAMC,CAAAA,CAAY,MAAM,OAAQD,CAAAA,CAAK,CAAIA,CAAAA,CAAAA,CAAQ,CAACA,CAAK,CAAA,CACjDE,EAAuC,EAAC,CAC1CC,EAGJ,OAAAF,CAAAA,CAAU,OAASG,CAAAA,CAAAA,EAAS,CAC1B,GAAI,OAAOA,CAAS,EAAA,QAAA,CAClBD,EAAW,CAAGC,EAAAA,CAAI,CACb,EAAA,CAAA,CAAA,KAAA,CACL,GAAM,CAACC,CAAAA,CAAYC,CAAQ,CAAIF,CAAAA,CAAAA,CAAK,MAAM,GAAG,CAAA,CACvCG,CAAQ,CAAA,QAAA,CAASD,EAAU,EAAE,CAAA,CACnCJ,CAAa,CAAA,CAAA,mBAAA,EAAsBJ,EAA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CAAc,OC1CZ,IAAMY,CAAAA,CACX,sGC/DK,IAAMC,CAAAA,CAAsC,CAAC,CAClD,SAAAC,CACA,CAAA,IAAA,CAAAC,CAAO,CAAA,QAAA,CACP,UAAAV,CACA,CAAA,QAAA,CAAAW,CACA,CAAA,GAAGT,CACL,CACEN,GAAAA,kBAAAA,CAAA,cAAC,QAEC,CAAA,CAAA,IAAA,CAAMc,EACN,QAAUC,CAAAA,CAAAA,CACV,SAAW,CAAA,CAAA,gEAAA,EAAmEJ,CAAe,CAAIP,CAAAA,EAAAA,CAAS,CAAIW,CAAAA,EAAAA,CAAAA,CAAW,gCAAkC,EAAE,CAAA,CAAA,CAC5J,GAAGT,CAAAA,CAAAA,CAEHO,CACH,CCTK,CAAA,IAAMG,EAAa,CAAC,CACzB,SAAAC,CACA,CAAA,eAAA,CAAAC,CACA,CAAA,KAAA,CAAAhB,EACA,KAAAC,CAAAA,CAAAA,CACA,GAAGG,CACL,KACE,OAAQ,CAAA,GAAA,CAAI,CAAE,eAAA,CAAAY,CAAgB,CAAC,CAAA,CAE7BlB,mBAAA,aAACY,CAAAA,CAAAA,CAAA,CAAU,SAAU,CAAA,+BAAA,CAAiC,GAAGN,CAAAA,CAAAA,CACvDN,mBAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAA,CAAMkB,EAAU,KAAOf,CAAAA,CAAAA,CAAO,KAAOC,CAAAA,CAAAA,CAAO,EACjDe,CACClB,EAAAA,kBAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,yDAAyD,CAE5E,CAAA","file":"NavbarItem.cjs","sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React from \"react\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\nimport { Pressable, PressableProps } from \"./Pressable\";\n\nexport type NavbarItemProps = {\n iconName: IconName;\n hasNotification?: boolean;\n} & Pick<IconProps, \"color\" | \"title\"> &\n PressableProps;\n\nexport const NavbarItem = ({\n iconName,\n hasNotification,\n color,\n title,\n ...props\n}: NavbarItemProps) => {\n console.log({ hasNotification });\n return (\n <Pressable className=\"relative lg:px-7 md:px-5 py-3\" {...props}>\n <Icon name={iconName} color={color} title={title} />\n {hasNotification && (\n <div className=\"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5\" />\n )}\n </Pressable>\n );\n};\n"]}
|
|
@@ -2,7 +2,7 @@ import React__default from 'react';
|
|
|
2
2
|
import { IconName } from '@deckai/icons';
|
|
3
3
|
import { IconProps } from './Icon.cjs';
|
|
4
4
|
import { PressableProps } from './Pressable.cjs';
|
|
5
|
-
import '../tailwind-
|
|
5
|
+
import '../tailwind-CIZ10fKA.cjs';
|
|
6
6
|
|
|
7
7
|
type NavbarItemProps = {
|
|
8
8
|
iconName: IconName;
|
|
@@ -2,7 +2,7 @@ import React__default from 'react';
|
|
|
2
2
|
import { IconName } from '@deckai/icons';
|
|
3
3
|
import { IconProps } from './Icon.js';
|
|
4
4
|
import { PressableProps } from './Pressable.js';
|
|
5
|
-
import '../tailwind-
|
|
5
|
+
import '../tailwind-CIZ10fKA.js';
|
|
6
6
|
|
|
7
7
|
type NavbarItemProps = {
|
|
8
8
|
iconName: IconName;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import p from'react';import {IconMap}from'@deckai/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';function f(...e){return twMerge(clsx(e))}var m={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},$={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},v=e=>{if(!e)return {width:"24px",height:"24px"};let s=Array.isArray(e)?e:[e],r={},t;return s.forEach(o=>{if(typeof o=="number")t=`${o}px`;else {let[i,n]=o.split(":"),a=parseInt(n,10);r[`@media (min-width: ${$[i]})`]=`${a}px`;}}),{width:t||"24px",height:t||"24px",...Object.entries(r).reduce((o,[i,n])=>({...o,[i]:{width:n,height:n}}),{})}},c=p.forwardRef(({name:e,size:s=24,color:r="primary",title:t,className:o,style:i={},...n},a)=>{let d=IconMap[e],g=v(s);return p.createElement("div",{className:f("flex justify-center items-center",o),style:{...g,"--icon-stroke":m[r],...i}},p.createElement(d,{ref:a,"aria-hidden":!t,"aria-label":t,stroke:e.includes("filled")?void 0:m[r],...n}))});c.displayName="Icon";var u="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var b=({children:e,type:s="button",className:r,disabled:t,...o})=>p.createElement("button",{type:s,disabled:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${u} ${r} ${t?"opacity-50 cursor-not-allowed":""}`,...o},e);var F=({iconName:e,hasNotification:s,color:r,title:t,...o})=>(console.log({hasNotification:s}),p.createElement(b,{className:"relative lg:px-7 md:px-5 py-3",...o},p.createElement(c,{name:e,color:r,title:t}),s&&p.createElement("div",{className:"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5"})));if (exports.default) module.exports = exports.default;export{F as NavbarItem};//# sourceMappingURL=NavbarItem.js.map
|
|
2
2
|
//# sourceMappingURL=NavbarItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/NavbarItem.tsx"],"names":["cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","baseSize","style","mediaQueries","size","acc","breakpoint","value","Icon","React","name","color","title","className","props","ref","IconComponent","IconMap","sizeStyles","focusRingStyles","Pressable","children","type","NavbarItem","iconName","hasNotification"],"mappings":"sHAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,OAAAA,CAAQC,IAAKF,CAAAA,CAAM,CAAC,CAC7B,CCWA,IAAMG,CAAAA,CAAwC,CAC5C,OAAS,CAAA,SAAA,CACT,SAAW,CAAA,SAAA,CACX,MAAO,SACP,CAAA,WAAA,CAAa,SACf,CAAA,CAKMC,EAA6C,CACjD,EAAA,CAAI,2BACJ,CAAA,EAAA,CAAI,4BACJ,EAAI,CAAA,4BAAA,CACJ,EAAI,CAAA,4BAAA,CACJ,MAAO,4BACT,CAAA,CAEMC,CACJC,CAAAA,CAAAA,EACwB,CACxB,GAAI,CAACA,CAAO,CAAA,OAAO,CAAE,KAAO,CAAA,MAAA,CAAQ,MAAQ,CAAA,MAAO,EAEnD,IAAMC,CAAAA,CAAY,KAAM,CAAA,OAAA,CAAQD,CAAK,CAAIA,CAAAA,CAAAA,CAAQ,CAACA,CAAK,CAAA,CACjDE,EAAW,OAAOD,CAAAA,CAAU,CAAC,CAAA,EAAM,SAAWA,CAAU,CAAA,CAAC,CAAI,CAAA,EAAA,CAE7DE,EAA6B,CACjC,KAAA,CAAO,CAAGD,EAAAA,CAAQ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wind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: number | `${Breakpoint}:${number}`;\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"@media (min-width: 640px)\",\n md: \"@media (min-width: 768px)\",\n lg: \"@media (min-width: 1024px)\",\n xl: \"@media (min-width: 1280px)\",\n \"2xl\": \"@media (min-width: 1536px)\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const baseSize = typeof sizeArray[0] === \"number\" ? sizeArray[0] : 24;\n\n const style: React.CSSProperties = {\n width: `${baseSize}px`,\n height: `${baseSize}px`\n };\n\n // Add media queries for responsive sizes\n const mediaQueries = sizeArray\n .filter(\n (size): size is `${Breakpoint}:${number}` =>\n typeof size === \"string\" && size.includes(\":\")\n )\n .reduce(\n (acc, size) => {\n const [breakpoint, value] = size.split(\":\") as [Breakpoint, string];\n acc[BREAKPOINT_MAP[breakpoint]] = {\n width: `${value}px`,\n height: `${value}px`\n };\n return acc;\n },\n {} as Record<string, React.CSSProperties>\n );\n\n if (Object.keys(mediaQueries).length > 0) {\n (style as any)[\"@media\"] = mediaQueries;\n }\n\n return style;\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React from \"react\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\nimport { Pressable, PressableProps } from \"./Pressable\";\n\nexport type NavbarItemProps = {\n iconName: IconName;\n hasNotification?: boolean;\n} & Pick<IconProps, \"color\" | \"title\"> &\n PressableProps;\n\nexport const NavbarItem = ({\n iconName,\n hasNotification,\n color,\n title,\n ...props\n}: NavbarItemProps) => {\n console.log({ hasNotification });\n return (\n <Pressable className=\"relative px-7 py-3\" {...props}>\n <Icon name={iconName} color={color} title={title} />\n {hasNotification && (\n <div className=\"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5\" />\n )}\n </Pressable>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/utils/tailwind.ts","../../src/components/Pressable.tsx","../../src/components/NavbarItem.tsx"],"names":["cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","sizeStyles","focusRingStyles","Pressable","children","type","disabled","NavbarItem","iconName","hasNotification"],"mappings":"sHAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCcA,IAAMG,CAAwC,CAAA,CAC5C,QAAS,SACT,CAAA,SAAA,CAAW,UACX,KAAO,CAAA,SAAA,CACP,YAAa,SACf,CAAA,CAEMC,CAA6C,CAAA,CACjD,GAAI,OACJ,CAAA,EAAA,CAAI,OACJ,CAAA,EAAA,CAAI,SACJ,EAAI,CAAA,QAAA,CACJ,KAAO,CAAA,QACT,EAEMC,CACJC,CAAAA,CAAAA,EACwB,CACxB,GAAI,CAACA,EAAO,OAAO,CAAE,KAAO,CAAA,MAAA,CAAQ,OAAQ,MAAO,CAAA,CAEnD,IAAMC,CAAAA,CAAY,MAAM,OAAQD,CAAAA,CAAK,CAAIA,CAAAA,CAAAA,CAAQ,CAACA,CAAK,CAAA,CACjDE,EAAuC,EAAC,CAC1CC,EAGJ,OAAAF,CAAAA,CAAU,OAASG,CAAAA,CAAAA,EAAS,CAC1B,GAAI,OAAOA,CAAS,EAAA,QAAA,CAClBD,EAAW,CAAGC,EAAAA,CAAI,CACb,EAAA,CAAA,CAAA,KAAA,CACL,GAAM,CAACC,CAAAA,CAAYC,CAAQ,CAAIF,CAAAA,CAAAA,CAAK,MAAM,GAAG,CAAA,CACvCG,CAAQ,CAAA,QAAA,CAASD,EAAU,EAAE,CAAA,CACnCJ,CAAa,CAAA,CAAA,mBAAA,EAAsBJ,EAAeO,CAAU,CAAC,CAAG,CAAA,CAAA,CAAA,CAC9D,GAAGE,CAAK,CAAA,EAAA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,SAAAC,CACA,CAAA,IAAA,CAAAC,CAAO,CAAA,QAAA,CACP,UAAAV,CACA,CAAA,QAAA,CAAAW,CACA,CAAA,GAAGT,CACL,CACEN,GAAAA,CAAAA,CAAA,cAAC,QAEC,CAAA,CAAA,IAAA,CAAMc,EACN,QAAUC,CAAAA,CAAAA,CACV,SAAW,CAAA,CAAA,gEAAA,EAAmEJ,CAAe,CAAIP,CAAAA,EAAAA,CAAS,CAAIW,CAAAA,EAAAA,CAAAA,CAAW,gCAAkC,EAAE,CAAA,CAAA,CAC5J,GAAGT,CAAAA,CAAAA,CAEHO,CACH,CCTK,CAAA,IAAMG,EAAa,CAAC,CACzB,SAAAC,CACA,CAAA,eAAA,CAAAC,CACA,CAAA,KAAA,CAAAhB,EACA,KAAAC,CAAAA,CAAAA,CACA,GAAGG,CACL,KACE,OAAQ,CAAA,GAAA,CAAI,CAAE,eAAA,CAAAY,CAAgB,CAAC,CAAA,CAE7BlB,EAAA,aAACY,CAAAA,CAAAA,CAAA,CAAU,SAAU,CAAA,+BAAA,CAAiC,GAAGN,CAAAA,CAAAA,CACvDN,EAAA,aAACD,CAAAA,CAAAA,CAAA,CAAK,IAAA,CAAMkB,EAAU,KAAOf,CAAAA,CAAAA,CAAO,KAAOC,CAAAA,CAAAA,CAAO,EACjDe,CACClB,EAAAA,CAAAA,CAAA,cAAC,KAAI,CAAA,CAAA,SAAA,CAAU,yDAAyD,CAE5E,CAAA","file":"NavbarItem.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, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n","import React from \"react\";\nimport { IconName } from \"@deckai/icons\";\nimport { Icon, IconProps } from \"./Icon\";\nimport { Pressable, PressableProps } from \"./Pressable\";\n\nexport type NavbarItemProps = {\n iconName: IconName;\n hasNotification?: boolean;\n} & Pick<IconProps, \"color\" | \"title\"> &\n PressableProps;\n\nexport const NavbarItem = ({\n iconName,\n hasNotification,\n color,\n title,\n ...props\n}: NavbarItemProps) => {\n console.log({ hasNotification });\n return (\n <Pressable className=\"relative lg:px-7 md:px-5 py-3\" {...props}>\n <Icon name={iconName} color={color} title={title} />\n {hasNotification && (\n <div className=\"w-3 h-3 bg-red-500 rounded-full absolute top-3 right-5\" />\n )}\n </Pressable>\n );\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var i=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var i__default=/*#__PURE__*/_interopDefault(i);var e="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var l=({children:s,type:o="button",className:r,disabled:t,...n})=>i__default.default.createElement("button",{type:o,disabled:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${e} ${r} ${t?"opacity-50 cursor-not-allowed":""}`,...n},s);if (exports.default) module.exports = exports.default;exports.Pressable=l;//# sourceMappingURL=Pressable.cjs.map
|
|
2
2
|
//# sourceMappingURL=Pressable.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx"],"names":["focusRingStyles","Pressable","children","type","className","props","React"],"mappings":"oJAmEO,IAAMA,
|
|
1
|
+
{"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx"],"names":["focusRingStyles","Pressable","children","type","className","disabled","props","React"],"mappings":"oJAmEO,IAAMA,EACX,qGC/DK,CAAA,IAAMC,EAAsC,CAAC,CAClD,QAAAC,CAAAA,CAAAA,CACA,KAAAC,CAAO,CAAA,QAAA,CACP,UAAAC,CACA,CAAA,QAAA,CAAAC,EACA,GAAGC,CACL,CACEC,GAAAA,kBAAAA,CAAA,cAAC,QAEC,CAAA,CAAA,IAAA,CAAMJ,EACN,QAAUE,CAAAA,CAAAA,CACV,UAAW,CAAmEL,gEAAAA,EAAAA,CAAe,CAAII,CAAAA,EAAAA,CAAS,IAAIC,CAAW,CAAA,+BAAA,CAAkC,EAAE,CAC5J,CAAA,CAAA,GAAGC,GAEHJ,CACH","file":"Pressable.cjs","sourcesContent":["import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from'react';var e="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var l=({children:s,type:o="button",className:r,disabled:t,...n})=>i.createElement("button",{type:o,disabled:t,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${e} ${r} ${t?"opacity-50 cursor-not-allowed":""}`,...n},s);if (exports.default) module.exports = exports.default;export{l as Pressable};//# sourceMappingURL=Pressable.js.map
|
|
2
2
|
//# sourceMappingURL=Pressable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx"],"names":["focusRingStyles","Pressable","children","type","className","props","React"],"mappings":"qBAmEO,IAAMA,
|
|
1
|
+
{"version":3,"sources":["../../src/utils/tailwind.ts","../../src/components/Pressable.tsx"],"names":["focusRingStyles","Pressable","children","type","className","disabled","props","React"],"mappings":"qBAmEO,IAAMA,EACX,qGC/DK,CAAA,IAAMC,EAAsC,CAAC,CAClD,QAAAC,CAAAA,CAAAA,CACA,KAAAC,CAAO,CAAA,QAAA,CACP,UAAAC,CACA,CAAA,QAAA,CAAAC,EACA,GAAGC,CACL,CACEC,GAAAA,CAAAA,CAAA,cAAC,QAEC,CAAA,CAAA,IAAA,CAAMJ,EACN,QAAUE,CAAAA,CAAAA,CACV,UAAW,CAAmEL,gEAAAA,EAAAA,CAAe,CAAII,CAAAA,EAAAA,CAAS,IAAIC,CAAW,CAAA,+BAAA,CAAkC,EAAE,CAC5J,CAAA,CAAA,GAAGC,GAEHJ,CACH","file":"Pressable.js","sourcesContent":["import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\n);\n"]}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
px-7
|
|
1
|
+
'use strict';var e=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons'),d=require('@radix-ui/react-tooltip'),H=require('@radix-ui/react-switch');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 e__namespace=/*#__PURE__*/_interopNamespace(e);var d__namespace=/*#__PURE__*/_interopNamespace(d);var H__namespace=/*#__PURE__*/_interopNamespace(H);function p(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var V={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},X={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},J=t=>{if(!t)return {width:"24px",height:"24px"};let r=Array.isArray(t)?t:[t],i={},s;return r.forEach(o=>{if(typeof o=="number")s=`${o}px`;else {let[a,n]=o.split(":"),c=parseInt(n,10);i[`@media (min-width: ${X[a]})`]=`${c}px`;}}),{width:s||"24px",height:s||"24px",...Object.entries(i).reduce((o,[a,n])=>({...o,[a]:{width:n,height:n}}),{})}},m=e__namespace.default.forwardRef(({name:t,size:r=24,color:i="primary",title:s,className:o,style:a={},...n},c)=>{let f=icons.IconMap[t],u=J(r);return e__namespace.default.createElement("div",{className:p("flex justify-center items-center",o),style:{...u,"--icon-stroke":V[i],...a}},e__namespace.default.createElement(f,{ref:c,"aria-hidden":!s,"aria-label":s,stroke:t.includes("filled")?void 0:V[i],...n}))});m.displayName="Icon";var U={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},Y=t=>{let[r,i]=t.split("-");return r==="heading"?U[i]||"p":r==="label"?"label":"p"},Z={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},ee=t=>t?(Array.isArray(t)?t:[t]).map(i=>{if(i.includes(":")){let[s,o]=i.split(":");return `${s}:text-${o}`}return `text-${i}`}).join(" "):"text-body-default",l=e__namespace.default.forwardRef(({variant:t="body-default",color:r="text-primary",as:i,className:s,children:o,weight:a,...n},c)=>{let f=ee(t),u=r&&r==="inherit"?"inherit":r?`text-${r}`:"",N=e__namespace.default.useMemo(()=>{let k=typeof t=="string"?t.split(":").pop():Array.isArray(t)?t[0].split(":").pop():"body-default";return Y(k)},[t]);return e__namespace.default.createElement(i||N,{ref:c,className:`font-sans antialiased ${f} ${u} ${a?`!${Z[a]}`:""} ${s??""}`,...n},o)});l.displayName="Text";var O={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},te=t=>{let r=Object.keys(O),i=t.split("").reduce((a,n)=>n.charCodeAt(0)+((a<<5)-a),0),s=Math.abs(i)%r.length,o=r[s];return console.log({input:t,hash:i,variantKeys:r,index:s,selectedVariant:o}),o},A=e__namespace.forwardRef(({className:t,variant:r,iconName:i,children:s,...o},a)=>{let n=r||(typeof s=="string"?te(s):"pink");return e__namespace.createElement("span",{ref:a,className:p("inline-flex items-center gap-2","rounded-lg px-2 py-1","text-sm font-medium",O[n],t),...o},i&&e__namespace.createElement(m,{size:16,name:i}),e__namespace.createElement(l,{variant:"body-xxs-medium"},s))});A.displayName="Badge";var h="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var oe={black:"bg-text-primary text-white",accent:"bg-primary-100 text-white",secondary:"bg-secondary-100 text-secondary"},B={black:"border border-text-primary text-text-primary",accent:"border border-primary-100 text-primary-100",secondary:"border border-text-secondary text-secondary"},R=e__namespace.forwardRef(({className:t,variant:r="filled",color:i="black",isLoading:s=!1,children:o,disabled:a,...n},c)=>e__namespace.createElement("button",{ref:c,className:p(`
|
|
2
|
+
sm:px-7 px-4
|
|
3
3
|
py-2
|
|
4
4
|
inline-flex items-center justify-center
|
|
5
5
|
rounded-lg
|
|
6
6
|
transition-colors duration-200
|
|
7
|
-
${T}
|
|
8
7
|
disabled:opacity-50 disabled:pointer-events-none
|
|
9
8
|
hover:opacity-80 active:scale-95
|
|
10
|
-
truncate
|
|
11
|
-
${r==="filled"?G[t]:K[t]}
|
|
12
|
-
${e}
|
|
13
|
-
`,disabled:n||i,type:"button",...p},typeof a=="string"?o__namespace.createElement(s,{variant:"body-default-bold",color:"inherit"},a):a));h.displayName="Button";var C=({content:e,children:r,side:t="bottom",align:i="center",className:a,delayDuration:n=200})=>o__namespace.createElement(l__namespace.Provider,{delayDuration:n},o__namespace.createElement(l__namespace.Root,null,o__namespace.createElement(l__namespace.Trigger,{asChild:!0},o__namespace.createElement("span",{tabIndex:0},r)),o__namespace.createElement(l__namespace.Portal,null,o__namespace.createElement(l__namespace.Content,{side:t,align:i,sideOffset:4,className:c("z-50 overflow-hidden rounded-lg","bg-text-primary px-3 py-1.5","text-xs text-white","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2","select-none","max-w-60",a)},e,o__namespace.createElement(l__namespace.Arrow,{className:"fill-text-primary",width:10,height:5})))));var P=o__namespace.forwardRef(({className:e,label:r,description:t,...i},a)=>o__namespace.createElement("div",{className:"flex items-center gap-2"},o__namespace.createElement(b__namespace.Root,{className:c("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",T,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",e),...i,ref:a},o__namespace.createElement(b__namespace.Thumb,{className:c("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")})),(r||t)&&o__namespace.createElement("div",{className:"flex flex-col"},r&&o__namespace.createElement("label",{className:"text-sm font-medium text-text-primary",htmlFor:i.id},r),t&&o__namespace.createElement("span",{className:"text-xs text-text-secondary"},t))));P.displayName="Switch";var w=({children:e,padded:r,color:t="primary",...i})=>o__namespace.default.createElement("div",{className:`rounded bg-secondary-400 ${r?"px-3":"px-2"} py-1.5 h-min`,...i},typeof e=="string"?o__namespace.default.createElement(s,{color:t==="primary"?"primary-100":"text-primary",variant:["body-default-medium","md:body-xs-medium"],className:"truncate"},e):e);var $e=({profileImage:e,name:r,location:t,memberSince:i,interests:a,badges:n})=>{let p=o.useId();return o__namespace.default.createElement("div",{className:"lg:basis-[635px] p-10 rounded-xl border border-stroke relative flex gap-6"},o__namespace.default.createElement(h,{variant:"outlined",color:"secondary",className:"absolute top-10 right-10 !px-2 py-2"},o__namespace.default.createElement(f,{color:"secondary",name:"edit-2"})),o__namespace.default.createElement("div",{className:"flex flex-row gap-6"},o__namespace.default.createElement("div",{className:"flex flex-col gap-4"},o__namespace.default.createElement("img",{src:e,alt:"profile for fiona chen"}),o__namespace.default.createElement(h,null,"Preview Profile"),o__namespace.default.createElement("div",{className:"flex flex-col gap-1"},o__namespace.default.createElement("div",{className:"flex flex-row justify-between"},o__namespace.default.createElement(s,{as:"label",htmlFor:p,variant:"body-default-semibold",color:"text-secondary"},"Private Mode"),o__namespace.default.createElement(P,{id:p})),o__namespace.default.createElement("div",{className:"flex flex-row gap-1"},o__namespace.default.createElement(s,{variant:"body-xs",color:"text-secondary"},"What is this?"),o__namespace.default.createElement(C,{content:"Turning this on makes you not appear in searches. People who follow you will still be able to view your profile. Go to your settings to make changes to Private Mode."},o__namespace.default.createElement(f,{name:"message-question",color:"secondary",size:16}))))),o__namespace.default.createElement("div",{className:"flex flex-col gap-2"},o__namespace.default.createElement(s,{as:"h1",variant:["heading-lg","md:heading-md"]},r),o__namespace.default.createElement("div",{className:"flex gap-2 items-center"},o__namespace.default.createElement(f,{name:"location",size:"md:16"}),o__namespace.default.createElement(s,{variant:["body-lg","md:body-default"],color:"text-secondary"},t)),o__namespace.default.createElement("div",{className:"flex gap-2 items-center"},o__namespace.default.createElement(f,{name:"profile",size:"md:16"}),o__namespace.default.createElement(s,{variant:["body-lg","md:body-default"],color:"text-secondary"},"Member Since"," ",o__namespace.default.createElement(s,{as:"span",variant:["body-lg","md:body-default"]},i))),a&&o__namespace.default.createElement("div",{className:"flex flex-col gap-2 pt-6"},o__namespace.default.createElement(s,{variant:"heading-xs"},"Interests"),o__namespace.default.createElement("div",{className:"flex flex-wrap gap-2"},a.map((m,d)=>o__namespace.default.createElement(w,{key:d},m)))),n&&o__namespace.default.createElement("div",{className:"flex gap-2 flex-wrap pt-6"},n.map((m,d)=>o__namespace.default.createElement(L,{key:d,...m}))))))};if (exports.default) module.exports = exports.default;exports.ProfileCard=$e;//# sourceMappingURL=ProfileCard.cjs.map
|
|
9
|
+
truncate`,h,r==="filled"?oe[i]:B[i],t),disabled:a||s,type:"button",...n},typeof o=="string"?e__namespace.createElement(l,{variant:["sm:body-default-bold","body-xxs-semibold"],color:"inherit"},o):o));R.displayName="Button";var x=({content:t,children:r,side:i="bottom",align:s="center",className:o,delayDuration:a=200})=>e__namespace.createElement(d__namespace.Provider,{delayDuration:a},e__namespace.createElement(d__namespace.Root,null,e__namespace.createElement(d__namespace.Trigger,{asChild:!0},e__namespace.createElement("span",{tabIndex:0},r)),e__namespace.createElement(d__namespace.Portal,null,e__namespace.createElement(d__namespace.Content,{side:i,align:s,sideOffset:4,className:p("z-50 overflow-hidden rounded-lg","bg-text-primary px-3 py-1.5","text-xs text-white","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[side=bottom]:slide-in-from-top-2","data-[side=top]:slide-in-from-bottom-2","select-none","max-w-60",o)},t,e__namespace.createElement(d__namespace.Arrow,{className:"fill-text-primary",width:10,height:5})))));var E=e__namespace.forwardRef(({className:t,label:r,description:i,...s},o)=>e__namespace.createElement("div",{className:"flex items-center gap-2"},e__namespace.createElement(H__namespace.Root,{className:p("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",h,"disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:bg-primary-50 data-[state=unchecked]:bg-secondary-50",t),...s,ref:o},e__namespace.createElement(H__namespace.Thumb,{className:p("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")})),(r||i)&&e__namespace.createElement("div",{className:"flex flex-col"},r&&e__namespace.createElement("label",{className:"text-sm font-medium text-text-primary",htmlFor:s.id},r),i&&e__namespace.createElement("span",{className:"text-xs text-text-secondary"},i))));E.displayName="Switch";var M=({children:t,type:r="button",className:i,disabled:s,...o})=>e__namespace.default.createElement("button",{type:r,disabled:s,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${h} ${i} ${s?"opacity-50 cursor-not-allowed":""}`,...o},t);var G=({children:t,color:r="primary",className:i,onClose:s,...o})=>{let[a,n]=e.useState(!1),c=e.useCallback(()=>{n(!0);},[]),f=e.useCallback(()=>{n(!1);},[]),u=e__namespace.default.createElement("div",{className:p("flex gap-2",s?"justify-between items-center":"items-center justify-center","hover:bg-primary-100 rounded bg-secondary-400 px-2 py-1 sm:px-3 sm:py-1.5 h-min hover:text-white",r==="primary"?"text-primary-100":"text-primary",i),onMouseEnter:c,onMouseLeave:f},typeof t=="string"?e__namespace.default.createElement(l,{color:"inherit",variant:["md:body-default-medium","body-xxs-medium"],className:"truncate pt-0.5"},t):t,s&&e__namespace.default.createElement(M,{...o,onClick:s,className:"flex items-center justify-center"},e__namespace.default.createElement(m,{name:"close",size:10,color:a?"white":"primaryBlue"})));return s?u:e__namespace.default.createElement(M,{...o},u)};var I=({className:t,onClick:r})=>e__namespace.default.createElement(M,{className:p("absolute lg:top-10 md:top-8 top-4 lg:right-10 md:right-8 right-4 lg:px-2 lg:py-2 px-1 py-1 rounded-lg",B.black,t),onClick:r},e__namespace.default.createElement(m,{color:"primary",name:"edit-2"}));I.displayName="EditButton";var L=4,w=3,st=({profileImage:t,name:r,location:i,memberSince:s,interests:o,badges:a,isEditMode:n=!1,onEditClick:c})=>{let f=e.useId(),u=e.useMemo(()=>o?.slice(0,L)||[],[o]),N=e.useMemo(()=>a?.slice(0,w)||[],[a]),j=o&&o.length>L,k=a&&a.length>w,W=o?o.length-L:0,_=a?a.length-w:0;return e__namespace.default.createElement("div",{className:"lg:p-10 md:p-8 p-4 rounded-xl border border-stroke relative flex gap-6 md:flex-row flex-col"},n&&e__namespace.default.createElement(I,{onClick:c}),e__namespace.default.createElement("div",{className:"flex md:flex-row flex-col gap-6"},e__namespace.default.createElement("div",{className:"flex flex-col gap-4 md:items-start items-center"},e__namespace.default.createElement("div",{className:"flex items-center justify-center xl:w-[206px] lg:w-[164px] w-[147px]"},e__namespace.default.createElement("img",{src:t,alt:`Profile for ${r}`,className:"object-cover rounded-lg w-full h-full"})),n&&e__namespace.default.createElement(R,{variant:"filled"},"Preview Profile"),n&&e__namespace.default.createElement("div",{className:"hidden sm:flex sm:flex-col gap-1 w-full"},e__namespace.default.createElement("div",{className:"flex flex-row justify-between"},e__namespace.default.createElement("div",null,e__namespace.default.createElement(l,{as:"label",htmlFor:f,variant:"body-default-semibold"},"Private Mode"),e__namespace.default.createElement("div",{className:"flex items-center gap-1"},e__namespace.default.createElement(l,{variant:"body-default",color:"text-secondary"},"What is this?"),e__namespace.default.createElement(x,{content:"Turning this on makes you not appear in searches. People who follow you will still be able to view your profile. Go to your settings to make changes to Private Mode."},e__namespace.default.createElement(m,{name:"message-question",color:"secondary",size:16})))),e__namespace.default.createElement(E,{id:f})))),e__namespace.default.createElement("div",{className:"flex flex-col gap-2"},e__namespace.default.createElement(l,{as:"h1",variant:["lg:heading-lg","md:heading-md","heading-sm"],className:"text-wrap text-center md:text-left"},r),e__namespace.default.createElement("div",{className:"flex gap-2 items-center sm:justify-start justify-center"},e__namespace.default.createElement(m,{name:"location",color:"secondary"}),e__namespace.default.createElement(x,{content:i},e__namespace.default.createElement(l,{variant:["lg:body-lg","md:body-default","body-xs"],color:"text-secondary",className:"sm:text-left text-center truncate max-w-[300px]"},i))),e__namespace.default.createElement("div",{className:"flex gap-2 items-center sm:justify-start justify-center"},e__namespace.default.createElement(m,{name:"profile",color:"secondary"}),e__namespace.default.createElement(x,{content:`Member Since ${s}`},e__namespace.default.createElement(l,{variant:["lg:body-lg","md:body-default","body-xs"],color:"text-secondary",className:"sm:text-left text-center truncate max-w-[300px]"},"Member Since"," ",e__namespace.default.createElement(l,{as:"span",variant:["lg:body-lg-semibold","md:body-default-bold","body-xs-bold"]},s)))),o&&e__namespace.default.createElement("div",{className:"flex flex-col gap-2 pt-4"},e__namespace.default.createElement(l,{variant:["sm:heading-xs","body-default-bold"],className:"sm:text-left text-center"},"Interests"),e__namespace.default.createElement("div",{className:"flex flex-wrap gap-2 sm:justify-start justify-center items-center"},u.map((T,C)=>e__namespace.default.createElement(G,{key:C},T)),j&&e__namespace.default.createElement(x,{content:o.slice(L).join(", ")},e__namespace.default.createElement(l,{variant:"label-default"},"+",W," more")))),a&&e__namespace.default.createElement("div",{className:"flex gap-2 flex-wrap py-4 sm:justify-start justify-center items-center"},N.map((T,C)=>e__namespace.default.createElement(A,{key:C,...T})),k&&e__namespace.default.createElement(x,{content:a.slice(w).map(T=>T.children).join(", ")},e__namespace.default.createElement(l,{variant:"label-default"},"+",_," more"))),n&&e__namespace.default.createElement("div",{className:"sm:hidden flex justify-between border-t-[1px] border-secondary-50 pt-4"},e__namespace.default.createElement("div",null,e__namespace.default.createElement(l,{as:"label",htmlFor:f,variant:"body-default-semibold"},"Private Mode"),e__namespace.default.createElement("div",{className:"flex items-center gap-1"},e__namespace.default.createElement(l,{variant:"body-default",color:"text-secondary"},"What is this?"),e__namespace.default.createElement(x,{content:"Turning this on makes you not appear in searches. People who follow you will still be able to view your profile. Go to your settings to make changes to Private Mode."},e__namespace.default.createElement(m,{name:"message-question",color:"secondary",size:16})))),e__namespace.default.createElement(E,{id:f})))))};if (exports.default) module.exports = exports.default;exports.ProfileCard=st;//# sourceMappingURL=ProfileCard.cjs.map
|
|
14
10
|
//# sourceMappingURL=ProfileCard.cjs.map
|