luan-ui 0.5.1 → 0.5.3
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/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/popover/popover.js +0 -1
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/switch.js.map +1 -1
- package/dist/components/toast/toast.d.ts +2 -2
- package/dist/components/toast/toast.js.map +1 -1
- package/dist/styles/index.css +1 -0
- package/dist/utilities/responsive/responsive.d.ts +14 -10
- package/package.json +25 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sourceRoot":"/","sources":["components/alert/alert.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAEN,aAAa,EACb,UAAU,EACV,UAAU,GACV,MAAM,OAAO,CAAC;AAOf,MAAM,YAAY,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAE5E,MAAM,eAAe,GAAG,GAAG,EAAE;IAC5B,MAAM,OAAO,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAQF,MAAM,WAAW,GAAG,WAAW,CAAC;IAC/B,KAAK,EAAE;QACN,IAAI,EAAE,6JAA6J;QACnK,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,aAAa;KAC1B;IACD,QAAQ,EAAE;QACT,OAAO,EAAE;YACR,OAAO,EAAE;gBACR,IAAI,EAAE,wBAAwB;aAC9B;YACD,SAAS,E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OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACzC,MAAM,EAAE,IAAI,EAAE,GAAG,eAAe,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACzC,OAAO,CACN,KAAC,SAAS,IACT,GAAG,EAAE,GAAG,KACJ,KAAK,EACT,SAAS,EAAE,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,GAC1C,CACF,CAAC;AACH,CAAC,CACD,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAElD,OAAO,EACN,KAAK,EACL,gBAAgB,EAChB,UAAU,GAIV,CAAC","sourcesContent":["import { Slot } from \"@components/slot/slot\";\nimport type { ResponsiveValue } from \"@utilities/responsive/responsive\";\nimport { getVariants } from \"@utilities/responsive/responsive\";\nimport {\n\ttype ComponentPropsWithoutRef,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n} from \"react\";\n\ntype AlertContextType = {\n\tvariant: \"primary\" | \"secondary\" | \"error\";\n\tsize: ResponsiveValue<\"small\" | \"medium\">;\n};\n\nconst AlertContext = createContext<AlertContextType | undefined>(undefined);\n\nconst useAlertContext = () => {\n\tconst context = useContext(AlertContext);\n\tif (!context) {\n\t\tthrow new Error(\"useAlertContext must be used within an Alert component\");\n\t}\n\treturn context;\n};\n\ntype AlertProps = ComponentPropsWithoutRef<\"div\"> & {\n\tvariant?: \"primary\" | \"secondary\" | \"error\";\n\tasChild?: boolean;\n\tsize?: ResponsiveValue<\"small\" | \"medium\">;\n};\n\nconst alertStyles = getVariants({\n\tslots: {\n\t\troot: \"grid w-fit grid-cols-[0_1fr] items-start gap-1 rounded-md border border-transparent has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] [&>svg]:translate-y-1\",\n\t\ttitle: \"col-start-2 font-bold\",\n\t\tdescription: \"col-start-2\",\n\t},\n\tvariants: {\n\t\tvariant: {\n\t\t\tprimary: {\n\t\t\t\troot: \"bg-gray-700 text-white\",\n\t\t\t},\n\t\t\tsecondary: {\n\t\t\t\troot: \"border-gray-700 text-gray-700\",\n\t\t\t},\n\t\t\terror: {\n\t\t\t\troot: \"bg-red-500 text-white\",\n\t\t\t},\n\t\t},\n\t\tsize: {\n\t\t\tsmall: {\n\t\t\t\troot: \"px-2 py-1 has-[>svg]:gap-x-2\",\n\t\t\t\ttitle: \"text-sm\",\n\t\t\t\tdescription: \"text-xs\",\n\t\t\t},\n\t\t\tmedium: {\n\t\t\t\troot: \"px-3 py-2 has-[>svg]:gap-x-3\",\n\t\t\t\ttitle: \"text-base\",\n\t\t\t\tdescription: \"text-sm\",\n\t\t\t},\n\t\t},\n\t},\n});\n\nconst { root, title, description } = alertStyles();\n\nexport const SIZES = {\n\tsm: {\n\t\tsmall: \"sm:px-2 sm:py-1 sm:has-[>svg]:gap-x-2\",\n\t\tmedium: \"sm:px-3 sm:py-2 sm:has-[>svg]:gap-x-3\",\n\t},\n\tmd: {\n\t\tsmall: \"md:px-2 md:py-1 md:has-[>svg]:gap-x-2\",\n\t\tmedium: \"md:px-3 md:py-2 md:has-[>svg]:gap-x-3\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:px-2 lg:py-1 lg:has-[>svg]:gap-x-2\",\n\t\tmedium: \"lg:px-3 lg:py-2 lg:has-[>svg]:gap-x-3\",\n\t},\n\txl: {\n\t\tsmall: \"xl:px-2 xl:py-1 xl:has-[>svg]:gap-x-2\",\n\t\tmedium: \"xl:px-3 xl:py-2 xl:has-[>svg]:gap-x-3\",\n\t},\n};\n\nconst Alert = forwardRef<HTMLDivElement, AlertProps>(\n\t(\n\t\t{ variant = \"primary\", size = \"medium\", className, asChild, ...props },\n\t\tref,\n\t) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\n\t\treturn (\n\t\t\t<AlertContext.Provider value={{ variant, size }}>\n\t\t\t\t<Component\n\t\t\t\t\tclassName={root({ variant, size, className })}\n\t\t\t\t\t{...props}\n\t\t\t\t\tref={ref}\n\t\t\t\t/>\n\t\t\t</AlertContext.Provider>\n\t\t);\n\t},\n);\n\nAlert.displayName = \"Alert\";\n\ntype AlertTitleProps = ComponentPropsWithoutRef<\"div\"> & {\n\tasChild?: boolean;\n};\n\nexport const TITLE_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:text-sm\",\n\t\tmedium: \"sm:text-base\",\n\t},\n\tmd: {\n\t\tsmall: \"md:text-sm\",\n\t\tmedium: \"md:text-base\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:text-sm\",\n\t\tmedium: \"lg:text-base\",\n\t},\n\txl: {\n\t\tsmall: \"xl:text-sm\",\n\t\tmedium: \"xl:text-base\",\n\t},\n};\n\nconst AlertTitle = forwardRef<HTMLDivElement, AlertTitleProps>(\n\t({ className, asChild, ...props }, ref) => {\n\t\tconst { size } = useAlertContext();\n\t\tconst Component = asChild ? Slot : \"div\";\n\t\treturn (\n\t\t\t<Component ref={ref} {...props} className={title({ size, className })} />\n\t\t);\n\t},\n);\n\nAlertTitle.displayName = \"AlertTitle\";\n\ntype AlertDescriptionProps = ComponentPropsWithoutRef<\"div\"> & {\n\tasChild?: boolean;\n};\n\nexport const DESCRIPTION_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:text-xs\",\n\t\tmedium: \"sm:text-sm\",\n\t},\n\tmd: {\n\t\tsmall: \"md:text-xs\",\n\t\tmedium: \"md:text-sm\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:text-xs\",\n\t\tmedium: \"lg:text-sm\",\n\t},\n\txl: {\n\t\tsmall: \"xl:text-xs\",\n\t\tmedium: \"xl:text-sm\",\n\t},\n};\n\nconst AlertDescription = forwardRef<HTMLDivElement, AlertDescriptionProps>(\n\t({ className, asChild, ...props }, ref) => {\n\t\tconst { size } = useAlertContext();\n\t\tconst Component = asChild ? Slot : \"div\";\n\t\treturn (\n\t\t\t<Component\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t\tclassName={description({ size, className })}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nAlertDescription.displayName = \"AlertDescription\";\n\nexport {\n\tAlert,\n\tAlertDescription,\n\tAlertTitle,\n\ttype AlertDescriptionProps,\n\ttype AlertProps,\n\ttype AlertTitleProps,\n};\n"]}
|
|
@@ -62,7 +62,7 @@ const cardStyles = getVariants({
|
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
|
-
const { root, header, content, footer } = cardStyles;
|
|
65
|
+
const { root, header, content, footer } = cardStyles();
|
|
66
66
|
/**
|
|
67
67
|
* Card component that provides a container with consistent styling and spacing.
|
|
68
68
|
* Supports different sizes and can be used with asChild prop for composition.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"/","sources":["components/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAQ9D,MAAM,WAAW,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAE3E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACxC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAWF,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,EAAE,EAAE;QACH,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,kBAAkB;KACzB;IACD,EAAE,EAAE;QACH,KAAK,EAAE,kBAAkB;QACzB,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE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QACzB,KAAK,EAAE,iBAAiB;KACxB;IACD,EAAE,EAAE;QACH,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE,iBAAiB;KACxB;CACD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACzC,OAAO,CACN,KAAC,SAAS,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,KAAM,KAAK,GAAI,CAC1E,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import { Slot } from \"@components/slot/slot\";\nimport type { ResponsiveValue } from \"@utilities/responsive/responsive\";\nimport { getVariants } from \"@utilities/responsive/responsive\";\nimport { createContext, forwardRef, useContext } from \"react\";\n\n/**\n * Card Context\n */\n\ntype CardContextValue = Required<Pick<CardProps, \"size\">>;\n\nconst CardContext = createContext<CardContextValue | undefined>(undefined);\n\nconst useCardContext = () => {\n\tconst context = useContext(CardContext);\n\tif (!context) {\n\t\tthrow new Error(\"Card components must be used within a Card\");\n\t}\n\treturn context;\n};\n\n/**\n * Card\n */\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:gap-2 sm:py-2\",\n\t\tmedium: \"sm:gap-4 sm:py-4\",\n\t\tlarge: \"sm:gap-6 sm:py-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:gap-2 md:py-2\",\n\t\tmedium: \"md:gap-4 md:py-4\",\n\t\tlarge: \"md:gap-6 md:py-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:gap-2 lg:py-2\",\n\t\tmedium: \"lg:gap-4 lg:py-4\",\n\t\tlarge: \"lg:gap-6 lg:py-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:gap-2 xl:py-2\",\n\t\tmedium: \"xl:gap-4 xl:py-4\",\n\t\tlarge: \"xl:gap-6 xl:py-6\",\n\t},\n};\n\nconst cardStyles = getVariants({\n\tslots: {\n\t\troot: \"flex flex-col rounded-lg border border-gray-200 bg-white shadow-md\",\n\t\theader: \"flex items-center justify-between border-gray-200 border-b\",\n\t\tcontent: \"flex flex-col\",\n\t\tfooter: \"flex items-center justify-between border-gray-200 border-t\",\n\t},\n\tvariants: {\n\t\tsize: {\n\t\t\tsmall: {\n\t\t\t\troot: \"gap-2 py-2\",\n\t\t\t\theader: \"px-2 pb-2\",\n\t\t\t\tcontent: \"gap-2 px-2\",\n\t\t\t\tfooter: \"px-2 pt-2\",\n\t\t\t},\n\t\t\tmedium: {\n\t\t\t\troot: \"gap-4 py-4\",\n\t\t\t\theader: \"px-4 pb-4\",\n\t\t\t\tcontent: \"gap-4 px-4\",\n\t\t\t\tfooter: \"px-4 pt-4\",\n\t\t\t},\n\t\t\tlarge: {\n\t\t\t\troot: \"gap-6 py-6\",\n\t\t\t\theader: \"px-6 pb-6\",\n\t\t\t\tcontent: \"gap-6 px-6\",\n\t\t\t\tfooter: \"px-6 pt-6\",\n\t\t\t},\n\t\t},\n\t},\n});\n\nconst { root, header, content, footer } = cardStyles;\n\n/**\n * Card component that provides a container with consistent styling and spacing.\n * Supports different sizes and can be used with asChild prop for composition.\n *\n * @example\n * ```tsx\n * <Card size=\"medium\">\n * <CardHeader>Header</CardHeader>\n * <CardContent>Content</CardContent>\n * <CardFooter>Footer</CardFooter>\n * </Card>\n * ```\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n\t({ className, size = \"medium\", asChild, ...props }, ref) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\t\treturn (\n\t\t\t<CardContext.Provider value={{ size }}>\n\t\t\t\t<Component ref={ref} className={root({ className, size })} {...props} />\n\t\t\t</CardContext.Provider>\n\t\t);\n\t},\n);\n\nCard.displayName = \"Card\";\n\n/**\n * Card Header\n */\n\nexport type CardHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_HEADER_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:px-2 sm:pb-2\",\n\t\tmedium: \"sm:px-4 sm:pb-4\",\n\t\tlarge: \"sm:px-6 sm:pb-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:px-2 md:pb-2\",\n\t\tmedium: \"md:px-4 md:pb-4\",\n\t\tlarge: \"md:px-6 md:pb-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:px-2 lg:pb-2\",\n\t\tmedium: \"lg:px-4 lg:pb-4\",\n\t\tlarge: \"lg:px-6 lg:pb-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:px-2 xl:pb-2\",\n\t\tmedium: \"xl:px-4 xl:pb-4\",\n\t\tlarge: \"xl:px-6 xl:pb-6\",\n\t},\n};\n\n/**\n * Card Header component that provides a consistent header section for the Card.\n * Inherits size from parent Card component.\n *\n * @example\n * ```tsx\n * <CardHeader>\n * <h2>Title</h2>\n * <button>Action</button>\n * </CardHeader>\n * ```\n */\nexport const CardHeader = forwardRef<\n\tHTMLDivElement,\n\tOmit<CardHeaderProps, \"size\">\n>(({ className, asChild, ...props }, ref) => {\n\tconst { size } = useCardContext();\n\tconst Component = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Component ref={ref} className={header({ className, size })} {...props} />\n\t);\n});\n\nCardHeader.displayName = \"CardHeader\";\n\n/**\n * Card Content\n */\n\nexport type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_CONTENT_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:gap-2 sm:px-2\",\n\t\tmedium: \"sm:gap-4 sm:px-4\",\n\t\tlarge: \"sm:gap-6 sm:px-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:gap-2 md:px-2\",\n\t\tmedium: \"md:gap-4 md:px-4\",\n\t\tlarge: \"md:gap-6 md:px-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:gap-2 lg:px-2\",\n\t\tmedium: \"lg:gap-4 lg:px-4\",\n\t\tlarge: \"lg:gap-6 lg:px-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:gap-2 xl:px-2\",\n\t\tmedium: \"xl:gap-4 xl:px-4\",\n\t\tlarge: \"xl:gap-6 xl:px-6\",\n\t},\n};\n\n/**\n * Card Content component that provides the main content area for the Card.\n * Inherits size from parent Card component.\n *\n * @example\n * ```tsx\n * <CardContent>\n * <p>Main content goes here</p>\n * </CardContent>\n * ```\n */\nexport const CardContent = forwardRef<\n\tHTMLDivElement,\n\tOmit<CardContentProps, \"size\">\n>(({ className, asChild, ...props }, ref) => {\n\tconst { size } = useCardContext();\n\tconst Component = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Component ref={ref} className={content({ className, size })} {...props} />\n\t);\n});\n\nCardContent.displayName = \"CardContent\";\n\n/**\n * Card Footer\n */\n\nexport type CardFooterProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_FOOTER_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:px-2 sm:pt-2\",\n\t\tmedium: \"sm:px-4 sm:pt-4\",\n\t\tlarge: \"sm:px-6 sm:pt-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:px-2 md:pt-2\",\n\t\tmedium: \"md:px-4 md:pt-4\",\n\t\tlarge: \"lg:px-6 lg:pt-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:px-2 lg:pt-2\",\n\t\tmedium: \"lg:px-4 lg:pt-4\",\n\t\tlarge: \"lg:px-6 lg:pt-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:px-2 xl:pt-2\",\n\t\tmedium: \"xl:px-4 xl:pt-4\",\n\t\tlarge: \"xl:px-6 xl:pt-6\",\n\t},\n};\n\n/**\n * Card Footer component that provides a consistent footer section for the Card.\n * Inherits size from parent Card component.\n *\n * @example\n * ```tsx\n * <CardFooter>\n * <button>Cancel</button>\n * <button>Submit</button>\n * </CardFooter>\n * ```\n */\nexport const CardFooter = forwardRef<\n\tHTMLDivElement,\n\tOmit<CardFooterProps, \"size\">\n>(({ className, asChild, ...props }, ref) => {\n\tconst { size } = useCardContext();\n\tconst Component = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Component ref={ref} className={footer({ className, size })} {...props} />\n\t);\n});\n\nCardFooter.displayName = \"CardFooter\";\n"]}
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"/","sources":["components/card/card.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAQ9D,MAAM,WAAW,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAE3E,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACxC,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAWF,MAAM,CAAC,MAAM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iBAAiB;QACzB,KAAK,EAAE,iBAAiB;KACxB;IACD,EAAE,EAAE;QACH,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE,iBAAiB;KACxB;IACD,EAAE,EAAE;QACH,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE,iBAAiB;KACxB;IACD,EAAE,EAAE;QACH,KAAK,EAAE,iBAAiB;QACxB,MAAM,EAAE,iBAAiB;QACzB,KAAK,EAAE,iBAAiB;KACxB;CACD,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3C,MAAM,EAAE,IAAI,EAAE,GAAG,cAAc,EAAE,CAAC;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IACzC,OAAO,CACN,KAAC,SAAS,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,KAAM,KAAK,GAAI,CAC1E,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import { Slot } from \"@components/slot/slot\";\nimport type { ResponsiveValue } from \"@utilities/responsive/responsive\";\nimport { getVariants } from \"@utilities/responsive/responsive\";\nimport { createContext, forwardRef, useContext } from \"react\";\n\n/**\n * Card Context\n */\n\ntype CardContextValue = Required<Pick<CardProps, \"size\">>;\n\nconst CardContext = createContext<CardContextValue | undefined>(undefined);\n\nconst useCardContext = () => {\n\tconst context = useContext(CardContext);\n\tif (!context) {\n\t\tthrow new Error(\"Card components must be used within a Card\");\n\t}\n\treturn context;\n};\n\n/**\n * Card\n */\n\nexport type CardProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:gap-2 sm:py-2\",\n\t\tmedium: \"sm:gap-4 sm:py-4\",\n\t\tlarge: \"sm:gap-6 sm:py-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:gap-2 md:py-2\",\n\t\tmedium: \"md:gap-4 md:py-4\",\n\t\tlarge: \"md:gap-6 md:py-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:gap-2 lg:py-2\",\n\t\tmedium: \"lg:gap-4 lg:py-4\",\n\t\tlarge: \"lg:gap-6 lg:py-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:gap-2 xl:py-2\",\n\t\tmedium: \"xl:gap-4 xl:py-4\",\n\t\tlarge: \"xl:gap-6 xl:py-6\",\n\t},\n};\n\nconst cardStyles = getVariants({\n\tslots: {\n\t\troot: \"flex flex-col rounded-lg border border-gray-200 bg-white shadow-md\",\n\t\theader: \"flex items-center justify-between border-gray-200 border-b\",\n\t\tcontent: \"flex flex-col\",\n\t\tfooter: \"flex items-center justify-between border-gray-200 border-t\",\n\t},\n\tvariants: {\n\t\tsize: {\n\t\t\tsmall: {\n\t\t\t\troot: \"gap-2 py-2\",\n\t\t\t\theader: \"px-2 pb-2\",\n\t\t\t\tcontent: \"gap-2 px-2\",\n\t\t\t\tfooter: \"px-2 pt-2\",\n\t\t\t},\n\t\t\tmedium: {\n\t\t\t\troot: \"gap-4 py-4\",\n\t\t\t\theader: \"px-4 pb-4\",\n\t\t\t\tcontent: \"gap-4 px-4\",\n\t\t\t\tfooter: \"px-4 pt-4\",\n\t\t\t},\n\t\t\tlarge: {\n\t\t\t\troot: \"gap-6 py-6\",\n\t\t\t\theader: \"px-6 pb-6\",\n\t\t\t\tcontent: \"gap-6 px-6\",\n\t\t\t\tfooter: \"px-6 pt-6\",\n\t\t\t},\n\t\t},\n\t},\n});\n\nconst { root, header, content, footer } = cardStyles();\n\n/**\n * Card component that provides a container with consistent styling and spacing.\n * Supports different sizes and can be used with asChild prop for composition.\n *\n * @example\n * ```tsx\n * <Card size=\"medium\">\n * <CardHeader>Header</CardHeader>\n * <CardContent>Content</CardContent>\n * <CardFooter>Footer</CardFooter>\n * </Card>\n * ```\n */\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n\t({ className, size = \"medium\", asChild, ...props }, ref) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\t\treturn (\n\t\t\t<CardContext.Provider value={{ size }}>\n\t\t\t\t<Component ref={ref} className={root({ className, size })} {...props} />\n\t\t\t</CardContext.Provider>\n\t\t);\n\t},\n);\n\nCard.displayName = \"Card\";\n\n/**\n * Card Header\n */\n\nexport type CardHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_HEADER_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:px-2 sm:pb-2\",\n\t\tmedium: \"sm:px-4 sm:pb-4\",\n\t\tlarge: \"sm:px-6 sm:pb-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:px-2 md:pb-2\",\n\t\tmedium: \"md:px-4 md:pb-4\",\n\t\tlarge: \"md:px-6 md:pb-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:px-2 lg:pb-2\",\n\t\tmedium: \"lg:px-4 lg:pb-4\",\n\t\tlarge: \"lg:px-6 lg:pb-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:px-2 xl:pb-2\",\n\t\tmedium: \"xl:px-4 xl:pb-4\",\n\t\tlarge: \"xl:px-6 xl:pb-6\",\n\t},\n};\n\n/**\n * Card Header component that provides a consistent header section for the Card.\n * Inherits size from parent Card component.\n *\n * @example\n * ```tsx\n * <CardHeader>\n * <h2>Title</h2>\n * <button>Action</button>\n * </CardHeader>\n * ```\n */\nexport const CardHeader = forwardRef<\n\tHTMLDivElement,\n\tOmit<CardHeaderProps, \"size\">\n>(({ className, asChild, ...props }, ref) => {\n\tconst { size } = useCardContext();\n\tconst Component = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Component ref={ref} className={header({ className, size })} {...props} />\n\t);\n});\n\nCardHeader.displayName = \"CardHeader\";\n\n/**\n * Card Content\n */\n\nexport type CardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_CONTENT_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:gap-2 sm:px-2\",\n\t\tmedium: \"sm:gap-4 sm:px-4\",\n\t\tlarge: \"sm:gap-6 sm:px-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:gap-2 md:px-2\",\n\t\tmedium: \"md:gap-4 md:px-4\",\n\t\tlarge: \"md:gap-6 md:px-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:gap-2 lg:px-2\",\n\t\tmedium: \"lg:gap-4 lg:px-4\",\n\t\tlarge: \"lg:gap-6 lg:px-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:gap-2 xl:px-2\",\n\t\tmedium: \"xl:gap-4 xl:px-4\",\n\t\tlarge: \"xl:gap-6 xl:px-6\",\n\t},\n};\n\n/**\n * Card Content component that provides the main content area for the Card.\n * Inherits size from parent Card component.\n *\n * @example\n * ```tsx\n * <CardContent>\n * <p>Main content goes here</p>\n * </CardContent>\n * ```\n */\nexport const CardContent = forwardRef<\n\tHTMLDivElement,\n\tOmit<CardContentProps, \"size\">\n>(({ className, asChild, ...props }, ref) => {\n\tconst { size } = useCardContext();\n\tconst Component = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Component ref={ref} className={content({ className, size })} {...props} />\n\t);\n});\n\nCardContent.displayName = \"CardContent\";\n\n/**\n * Card Footer\n */\n\nexport type CardFooterProps = React.HTMLAttributes<HTMLDivElement> & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\tasChild?: boolean;\n};\n\nexport const CARD_FOOTER_SIZES = {\n\tsm: {\n\t\tsmall: \"sm:px-2 sm:pt-2\",\n\t\tmedium: \"sm:px-4 sm:pt-4\",\n\t\tlarge: \"sm:px-6 sm:pt-6\",\n\t},\n\tmd: {\n\t\tsmall: \"md:px-2 md:pt-2\",\n\t\tmedium: \"md:px-4 md:pt-4\",\n\t\tlarge: \"lg:px-6 lg:pt-6\",\n\t},\n\tlg: {\n\t\tsmall: \"lg:px-2 lg:pt-2\",\n\t\tmedium: \"lg:px-4 lg:pt-4\",\n\t\tlarge: \"lg:px-6 lg:pt-6\",\n\t},\n\txl: {\n\t\tsmall: \"xl:px-2 xl:pt-2\",\n\t\tmedium: \"xl:px-4 xl:pt-4\",\n\t\tlarge: \"xl:px-6 xl:pt-6\",\n\t},\n};\n\n/**\n * Card Footer component that provides a consistent footer section for the Card.\n * Inherits size from parent Card component.\n *\n * @example\n * ```tsx\n * <CardFooter>\n * <button>Cancel</button>\n * <button>Submit</button>\n * </CardFooter>\n * ```\n */\nexport const CardFooter = forwardRef<\n\tHTMLDivElement,\n\tOmit<CardFooterProps, \"size\">\n>(({ className, asChild, ...props }, ref) => {\n\tconst { size } = useCardContext();\n\tconst Component = asChild ? Slot : \"div\";\n\treturn (\n\t\t<Component ref={ref} className={footer({ className, size })} {...props} />\n\t);\n});\n\nCardFooter.displayName = \"CardFooter\";\n"]}
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Icon } from "../icon/icon";
|
|
3
3
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
4
4
|
import { cn } from "../../utilities/cn/cn";
|
|
5
|
-
import { getVariants } from "../../utilities/responsive/responsive";
|
|
6
5
|
import { Popover as RadixPopover } from "radix-ui";
|
|
7
6
|
import { createContext, forwardRef, useContext, useMemo, } from "react";
|
|
8
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sourceRoot":"/","sources":["components/popover/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"/","sources":["components/popover/popover.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAEN,aAAa,EACb,UAAU,EACV,UAAU,EACV,OAAO,GACP,MAAM,OAAO,CAAC;AAEf;;GAEG;AAEH,MAAM,cAAc,GAAG,aAAa,CAA2B,SAAS,CAAC,CAAC;AAE1E,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACrE,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC;AAaF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,GAAG,CAAC,EAChB,QAAQ,EACR,SAAS,GAAG,IAAI,EAChB,oBAAoB,GAAG,OAAO,EAC9B,eAAe,GAAG,IAAI,EACtB,IAAI,EACJ,GAAG,KAAK,EACM,EAAE,EAAE;IAClB,MAAM,YAAY,GAAG,OAAO,CAC3B,GAAG,EAAE,CAAC,CAAC;QACN,SAAS;QACT,oBAAoB;QACpB,IAAI;QACJ,eAAe;KACf,CAAC,EACF,CA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AO,EACP,cAAc,EACd,cAAc,EACd,YAAY,EACZ,aAAa,EACb,aAAa,GACb,CAAC","sourcesContent":["import { Icon } from \"@components/icon/icon\";\nimport { Cross1Icon } from \"@radix-ui/react-icons\";\nimport { cn } from \"@utilities/cn/cn\";\nimport { Popover as RadixPopover } from \"radix-ui\";\nimport {\n\ttype ComponentRef,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\tuseMemo,\n} from \"react\";\n\n/**\n * Popover Context\n */\n\nconst PopoverContext = createContext<PopoverProps | undefined>(undefined);\n\nconst usePopoverContext = () => {\n\tconst context = useContext(PopoverContext);\n\tif (!context) {\n\t\tthrow new Error(\"Popover components must be used within a Popover\");\n\t}\n\treturn context;\n};\n\n/**\n * Popover\n */\n\nexport type PopoverProps = {\n\tshowArrow?: boolean;\n\tcloseButtonAriaLabel?: string;\n\tshowCloseButton?: boolean;\n} & RadixPopover.PopoverProps &\n\tPick<RadixPopover.PopoverContentProps, \"side\">;\n\n/**\n * Popover component that provides a popover container with a trigger and content.\n *\n * @param {boolean} [props.showArrow=true] - Whether to show the arrow pointing to the trigger\n * @param {string} [props.closeButtonAriaLabel=\"Close\"] - Aria label for the close button\n * @param {boolean} [props.showCloseButton=true] - Whether to show the close button\n * @param {RadixPopover.PopoverContentProps[\"side\"]} [props.side] - The preferred side to show the popover\n *\n * @example\n * ```tsx\n * <Popover>\n * <PopoverTrigger>Open Popover</PopoverTrigger>\n * <PopoverContent>\n * <p>Popover content goes here</p>\n * </PopoverContent>\n * </Popover>\n * ```\n */\nconst Popover = ({\n\tchildren,\n\tshowArrow = true,\n\tcloseButtonAriaLabel = \"Close\",\n\tshowCloseButton = true,\n\tside,\n\t...props\n}: PopoverProps) => {\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\tshowArrow,\n\t\t\tcloseButtonAriaLabel,\n\t\t\tside,\n\t\t\tshowCloseButton,\n\t\t}),\n\t\t[showArrow, closeButtonAriaLabel, side, showCloseButton],\n\t);\n\treturn (\n\t\t<PopoverContext.Provider value={contextValue}>\n\t\t\t<RadixPopover.Root {...props}>{children}</RadixPopover.Root>\n\t\t</PopoverContext.Provider>\n\t);\n};\n\nconst PopoverTrigger = RadixPopover.Trigger;\n\nexport type PopoverContentProps = RadixPopover.PopoverContentProps & {\n\tshowArrow?: boolean;\n\tcloseButtonAriaLabel?: string;\n};\n\n/**\n * Popover Content\n */\n\n/**\n * Popover Content component that provides the content area for the Popover.\n * Inherits size from parent Popover component.\n *\n * @example\n * ```tsx\n * <PopoverContent>\n * <p>Popover content goes here</p>\n * </PopoverContent>\n * ```\n */\nconst PopoverContent = forwardRef<\n\tComponentRef<typeof RadixPopover.Content>,\n\tPopoverContentProps\n>(({ children, className, sideOffset = 4, ...props }, ref) => {\n\tconst { showArrow, closeButtonAriaLabel, side, showCloseButton } =\n\t\tusePopoverContext();\n\treturn (\n\t\t<RadixPopover.Content\n\t\t\tclassName={cn(\n\t\t\t\t\"relative z-50 w-fit max-w-72 rounded-md bg-gray-700 p-4 text-sm text-white shadow-md\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tsideOffset={sideOffset}\n\t\t\tside={side}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t>\n\t\t\t{showCloseButton && (\n\t\t\t\t<PopoverClose\n\t\t\t\t\tclassName=\"absolute top-4 right-4\"\n\t\t\t\t\taria-label={closeButtonAriaLabel}\n\t\t\t\t>\n\t\t\t\t\t<Icon asChild size=\"small\">\n\t\t\t\t\t\t<Cross1Icon />\n\t\t\t\t\t</Icon>\n\t\t\t\t</PopoverClose>\n\t\t\t)}\n\t\t\t{children}\n\t\t\t{showArrow && <RadixPopover.Arrow className=\"fill-gray-700\" />}\n\t\t</RadixPopover.Content>\n\t);\n});\n\n/**\n * Popover Close\n */\n\nconst PopoverClose = RadixPopover.Close;\n\n/**\n * Popover Portal\n */\n\nconst PopoverPortal = RadixPopover.Portal;\n\n/**\n * Popover Anchor\n */\n\nconst PopoverAnchor = RadixPopover.Anchor;\n\nexport {\n\tPopover,\n\tPopoverTrigger,\n\tPopoverContent,\n\tPopoverClose,\n\tPopoverPortal,\n\tPopoverAnchor,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sourceRoot":"/","sources":["components/switch/switch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAqB,UAAU,EAAE,MAAM,OAAO,CAAC;AAOtD,MAAM,WAAW,GAAG,WAAW,CAAC;IAC/B,KAAK,EAAE;QACN,IAAI,EAAE,wOAAwO;QAC9O,KAAK,EACJ,6HAA6H;KAC9H;IACD,QAAQ,EAAE;QACT,QAAQ,EAAE;YACT,IAAI,EAAE;gBACL,IAAI,EAAE,+BAA+B;gBACrC,KAAK,EAAE,aAAa;aACpB;YACD,KAAK,EAAE;gBACN,IAAI,EAAE,4BAA4B;gBAClC,KAAK,EAAE,UAAU;aACjB;SACD;QACD,KAAK,EAAE;YACN,IAAI,EAAE;gBACL,IAAI,EAAE,4CAA4C;gBAClD,KAAK,EAAE,YAAY;aACnB;SACD;QACD,IAAI,EAAE;YACL,KAAK,EAAE;gBACN,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;aAChB;YACD,MAAM,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;aAChB;YACD,KAAK,EAAE;gBACN,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;aAChB;SACD;KACD;CACD,CAAC,CAAC;AAEH,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"switch.js","sourceRoot":"/","sources":["components/switch/switch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAA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AAe;QACzB,KAAK,EAAE,YAAY;KACnB,CAAC,CAAC;IACH,OAAO,CACN,KAAC,WAAW,CAAC,IAAI,IAChB,SAAS,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EACrD,QAAQ,EAAE,QAAQ,KACd,KAAK,EACT,GAAG,EAAE,GAAG,YAER,KAAC,WAAW,CAAC,KAAK,IAAC,SAAS,EAAE,KAAK,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAI,GACzC,CACnB,CAAC;AACH,CAAC,CACD,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import { useFormContext } from \"@components/form-field/form-field-context\";\nimport type { ResponsiveValue } from \"@utilities/responsive/responsive\";\nimport { getVariants } from \"@utilities/responsive/responsive\";\nimport { Switch as RadixSwitch } from \"radix-ui\";\nimport { type ComponentRef, forwardRef } from \"react\";\n\nexport type SwitchProps = RadixSwitch.SwitchProps & {\n\tsize?: ResponsiveValue<\"small\" | \"medium\" | \"large\">;\n\terror?: boolean;\n};\n\nconst thumbStyles = getVariants({\n\tslots: {\n\t\troot: \"relative flex cursor-pointer appearance-none items-center rounded-full bg-gray-500 transition-colors duration-500 ease-out focus:outline-none focus-visible:ring-2 focus-visible:ring-light-blue-300 data-[state=checked]:bg-green-500\",\n\t\tthumb:\n\t\t\t\"absolute left-1 h-5 w-5 rounded-full transition-transform duration-500 ease-out data-[state=checked]:translate-x-[1.125rem]\",\n\t},\n\tvariants: {\n\t\tdisabled: {\n\t\t\ttrue: {\n\t\t\t\troot: \"cursor-not-allowed opacity-50\",\n\t\t\t\tthumb: \"bg-gray-300\",\n\t\t\t},\n\t\t\tfalse: {\n\t\t\t\troot: \"cursor-pointer opacity-100\",\n\t\t\t\tthumb: \"bg-white\",\n\t\t\t},\n\t\t},\n\t\terror: {\n\t\t\ttrue: {\n\t\t\t\troot: \"bg-red-600 data-[state=checked]:bg-red-600\",\n\t\t\t\tthumb: \"bg-red-600\",\n\t\t\t},\n\t\t},\n\t\tsize: {\n\t\t\tsmall: {\n\t\t\t\troot: \"h-5 w-10\",\n\t\t\t\tthumb: \"h-3 w-3\",\n\t\t\t},\n\t\t\tmedium: {\n\t\t\t\troot: \"h-7 w-12\",\n\t\t\t\tthumb: \"h-5 w-5\",\n\t\t\t},\n\t\t\tlarge: {\n\t\t\t\troot: \"h-9 w-14\",\n\t\t\t\tthumb: \"h-7 w-7\",\n\t\t\t},\n\t\t},\n\t},\n});\n\nconst { root, thumb } = thumbStyles();\n\n/**\n * A switch component that toggles between on and off states.\n * Built on top of Radix UI's Switch primitive.\n *\n * @param {SwitchProps} props - The props for the Switch component\n * @param {ResponsiveValue<\"small\" | \"medium\" | \"large\">} [props.size=\"medium\"] - The size of the switch\n * @param {boolean} [props.disabled] - Whether the switch is disabled\n * @param {string} [props.className] - Additional CSS classes to apply\n *\n * @example\n * // Basic usage\n * <Switch />\n *\n * @example\n * // With different sizes\n * <Switch size=\"small\" />\n * <Switch size=\"medium\" />\n * <Switch size=\"large\" />\n *\n * @example\n * // Disabled state\n * <Switch disabled />\n *\n * @example\n * // With onChange handler\n * <Switch onCheckedChange={(checked) => console.log(checked)} />\n *\n * @param {ResponsiveValue<\"small\" | \"medium\" | \"large\">} [props.size=\"medium\"] - The size of the switch\n * @param {boolean} [props.disabled] - Whether the switch is disabled\n * @param {string} [props.className] - Additional CSS classes to apply\n */\nexport const Switch = forwardRef<\n\tComponentRef<typeof RadixSwitch.Root>,\n\tSwitchProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tdisabled: initialDisabled,\n\t\t\tsize = \"medium\",\n\t\t\terror: initialError,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { disabled, error } = useFormContext({\n\t\t\tdisabled: initialDisabled,\n\t\t\terror: initialError,\n\t\t});\n\t\treturn (\n\t\t\t<RadixSwitch.Root\n\t\t\t\tclassName={root({ disabled, size, error, className })}\n\t\t\t\tdisabled={disabled}\n\t\t\t\t{...props}\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<RadixSwitch.Thumb className={thumb({ disabled, size })} />\n\t\t\t</RadixSwitch.Root>\n\t\t);\n\t},\n);\n\nSwitch.displayName = \"Switch\";\n"]}
|
|
@@ -7,7 +7,7 @@ export type ToastProps = {
|
|
|
7
7
|
label: string;
|
|
8
8
|
onClick: () => void;
|
|
9
9
|
};
|
|
10
|
-
} & ToasterProps
|
|
10
|
+
} & Omit<ToasterProps, "id">;
|
|
11
11
|
/**
|
|
12
12
|
* Creates a custom toast notification using the sonner toast library
|
|
13
13
|
* @param toast - The toast configuration object without an ID
|
|
@@ -29,5 +29,5 @@ declare const Toast: import("react").ForwardRefExoticComponent<{
|
|
|
29
29
|
label: string;
|
|
30
30
|
onClick: () => void;
|
|
31
31
|
};
|
|
32
|
-
} & ToasterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
|
+
} & Omit<ToasterProps, "id"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
33
|
export { toast, Toast, Toaster };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","sourceRoot":"/","sources":["components/toast/toast.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EACN,OAAO,IAAI,aAAa,EACxB,KAAK,IAAI,WAAW,GAEpB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAY1C;;;;;;;;;GASG;AACH,MAAM,KAAK,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC/C,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,GAAG,KAAK,CAAC;IAC9D,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACjC,KAAC,KAAK,IACL,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,OAAO,EAAE,MAAM,CAAC,OAAO;SACvB,KACG,YAAY,GACf,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,aAAa,CAAC;AAE9B,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,mDAAmD;AACnD,MAAM,KAAK,GAAG,UAAU,CACvB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3C,OAAO,CACN,eACC,SAAS,EAAC,kGAAkG,EAC5G,GAAG,EAAE,GAAG,aAER,cAAK,SAAS,EAAC,0BAA0B,YACxC,eAAK,SAAS,EAAC,cAAc,aAC5B,YAAG,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAK,EAC5D,YAAG,SAAS,EAAC,uBAAuB,YAAE,WAAW,GAAK,IACjD,GACD,EACN,cAAK,SAAS,EAAC,yCAAyC,YACvD,KAAC,MAAM,IACN,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;wBACb,MAAM,CAAC,OAAO,EAAE,CAAC;wBACjB,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;oBACzB,CAAC,YAEA,MAAM,CAAC,KAAK,GACL,GACJ,IACD,CACN,CAAC;AACH,CAAC,CACD,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { forwardRef } from \"react\";\nimport {\n\tToaster as SonnerToaster,\n\ttoast as sonnerToast,\n\ttype ToasterProps,\n} from \"sonner\";\nimport { Button } from \"../button/button\";\n\nexport type ToastProps = {\n\tid: string | number;\n\ttitle: string;\n\tdescription: string;\n\tbutton: {\n\t\tlabel: string;\n\t\tonClick: () => void;\n\t};\n} & ToasterProps
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"/","sources":["components/toast/toast.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EACN,OAAO,IAAI,aAAa,EACxB,KAAK,IAAI,WAAW,GAEpB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAY1C;;;;;;;;;GASG;AACH,MAAM,KAAK,GAAG,CAAC,KAA6B,EAAE,EAAE;IAC/C,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,GAAG,KAAK,CAAC;IAC9D,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CACjC,KAAC,KAAK,IACL,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE;YACP,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,OAAO,EAAE,MAAM,CAAC,OAAO;SACvB,KACG,YAAY,GACf,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,aAAa,CAAC;AAE9B,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEhC,mDAAmD;AACnD,MAAM,KAAK,GAAG,UAAU,CACvB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;IAC3C,OAAO,CACN,eACC,SAAS,EAAC,kGAAkG,EAC5G,GAAG,EAAE,GAAG,aAER,cAAK,SAAS,EAAC,0BAA0B,YACxC,eAAK,SAAS,EAAC,cAAc,aAC5B,YAAG,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAK,EAC5D,YAAG,SAAS,EAAC,uBAAuB,YAAE,WAAW,GAAK,IACjD,GACD,EACN,cAAK,SAAS,EAAC,yCAAyC,YACvD,KAAC,MAAM,IACN,IAAI,EAAC,OAAO,EACZ,IAAI,EAAC,QAAQ,EACb,OAAO,EAAC,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE;wBACb,MAAM,CAAC,OAAO,EAAE,CAAC;wBACjB,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;oBACzB,CAAC,YAEA,MAAM,CAAC,KAAK,GACL,GACJ,IACD,CACN,CAAC;AACH,CAAC,CACD,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC","sourcesContent":["import { forwardRef } from \"react\";\nimport {\n\tToaster as SonnerToaster,\n\ttoast as sonnerToast,\n\ttype ToasterProps,\n} from \"sonner\";\nimport { Button } from \"../button/button\";\n\nexport type ToastProps = {\n\tid: string | number;\n\ttitle: string;\n\tdescription: string;\n\tbutton: {\n\t\tlabel: string;\n\t\tonClick: () => void;\n\t};\n} & Omit<ToasterProps, \"id\">;\n\n/**\n * Creates a custom toast notification using the sonner toast library\n * @param toast - The toast configuration object without an ID\n * @param toast.title - The title text to display in the toast\n * @param toast.description - The description text to display in the toast\n * @param toast.button - Configuration for the toast's action button\n * @param toast.button.label - The text label for the action button\n * @param toast.button.onClick - Click handler function for the action button\n * @returns A unique identifier for the created toast\n */\nconst toast = (toast: Omit<ToastProps, \"id\">) => {\n\tconst { title, description, button, ...toastOptions } = toast;\n\treturn sonnerToast.custom((id) => (\n\t\t<Toast\n\t\t\tid={id}\n\t\t\ttitle={title}\n\t\t\tdescription={description}\n\t\t\tbutton={{\n\t\t\t\tlabel: button.label,\n\t\t\t\tonClick: button.onClick,\n\t\t\t}}\n\t\t\t{...toastOptions}\n\t\t/>\n\t));\n};\n\nconst Toaster = SonnerToaster;\n\nToaster.displayName = \"Toaster\";\n\n/** A fully custom toast built on top of sonner. */\nconst Toast = forwardRef<HTMLDivElement, ToastProps>(\n\t({ title, description, button, id }, ref) => {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName=\"flex w-full items-center gap-4 rounded-lg bg-white p-4 shadow-lg ring-1 ring-black/5 md:max-w-96\"\n\t\t\t\tref={ref}\n\t\t\t>\n\t\t\t\t<div className=\"flex flex-1 items-center\">\n\t\t\t\t\t<div className=\"w-full gap-1\">\n\t\t\t\t\t\t<p className=\"font-medium text-gray-900 text-sm\">{title}</p>\n\t\t\t\t\t\t<p className=\"text-gray-500 text-sm\">{description}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"shrink-0 rounded-md font-medium text-sm\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tbutton.onClick();\n\t\t\t\t\t\t\tsonnerToast.dismiss(id);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{button.label}\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nToast.displayName = \"Toast\";\n\nexport { toast, Toast, Toaster };\n"]}
|
package/dist/styles/index.css
CHANGED
|
@@ -3,35 +3,39 @@ export declare const breakpoints: readonly ["sm", "md", "lg", "xl"];
|
|
|
3
3
|
export declare const getVariants: {
|
|
4
4
|
<T extends {
|
|
5
5
|
[x: string]: {
|
|
6
|
-
[x: string]: string | Record<string, string>;
|
|
6
|
+
[x: string]: (string | readonly string[]) | Record<string, string | readonly string[]>;
|
|
7
7
|
};
|
|
8
|
-
}
|
|
8
|
+
} = Record<never, {
|
|
9
|
+
[x: string]: (string | readonly string[]) | Record<string, string | readonly string[]>;
|
|
10
|
+
}>, S extends Record<string, string | readonly string[]> = Record<string, string | readonly string[]>>(config: {
|
|
9
11
|
slots: S;
|
|
10
12
|
variants?: T | undefined;
|
|
11
|
-
compoundVariants?: (Partial<{ [K in keyof T]?: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Partial<Record<"true" | "false", string | Record<string, string>>> ? RcvResponsiveValue<boolean, "sm" | "md" | "lg" | "xl"> | undefined : T_1 extends Record<string, unknown> ? RcvResponsiveValue<keyof T_1, "sm" | "md" | "lg" | "xl"> : never : never : never) | undefined; } & {
|
|
13
|
+
compoundVariants?: (Partial<{ [K in keyof T]?: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Partial<Record<"true" | "false", (string | readonly string[]) | Record<string, string | readonly string[]>>> ? RcvResponsiveValue<boolean, "sm" | "md" | "lg" | "xl"> | undefined : T_1 extends Record<string, unknown> ? RcvResponsiveValue<keyof T_1, "sm" | "md" | "lg" | "xl"> : never : never : never) | undefined; } & {
|
|
12
14
|
className?: string;
|
|
13
15
|
}> & {
|
|
14
|
-
class?: Partial<Record<keyof S & string, string>> | undefined;
|
|
16
|
+
class?: Partial<Record<keyof S & string, string | readonly string[]>> | undefined;
|
|
15
17
|
className?: string;
|
|
16
18
|
})[] | undefined;
|
|
17
19
|
onComplete?: (classes: string) => string;
|
|
18
|
-
}): { [K_1 in keyof S]: (props?: ({ [K in keyof T]?: (T[K] extends infer
|
|
20
|
+
}): () => { [K_1 in keyof S]: (props?: ({ [K in keyof T]?: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Partial<Record<"true" | "false", (string | readonly string[]) | Record<string, string | readonly string[]>>> ? RcvResponsiveValue<boolean, "sm" | "md" | "lg" | "xl"> | undefined : T_1 extends Record<string, unknown> ? RcvResponsiveValue<keyof T_1, "sm" | "md" | "lg" | "xl"> : never : never : never) | undefined; } & {
|
|
19
21
|
className?: string;
|
|
20
22
|
}) | undefined) => string; };
|
|
21
23
|
<T extends {
|
|
22
24
|
[x: string]: {
|
|
23
|
-
[x: string]: string | Record<string, string>;
|
|
25
|
+
[x: string]: (string | readonly string[]) | Record<string, string | readonly string[]>;
|
|
24
26
|
};
|
|
25
|
-
}
|
|
27
|
+
} = Record<never, {
|
|
28
|
+
[x: string]: (string | readonly string[]) | Record<string, string | readonly string[]>;
|
|
29
|
+
}>>(config: {
|
|
26
30
|
base: string;
|
|
27
31
|
variants?: T | undefined;
|
|
28
|
-
compoundVariants?: Partial<{ [K in keyof T]?: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Partial<Record<"true" | "false", string | Record<string, string>>> ? RcvResponsiveValue<boolean, "sm" | "md" | "lg" | "xl"> | undefined : T_1 extends Record<string, unknown> ? RcvResponsiveValue<keyof T_1, "sm" | "md" | "lg" | "xl"> : never : never : never) | undefined; } & {
|
|
32
|
+
compoundVariants?: Partial<{ [K in keyof T]?: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Partial<Record<"true" | "false", (string | readonly string[]) | Record<string, string | readonly string[]>>> ? RcvResponsiveValue<boolean, "sm" | "md" | "lg" | "xl"> | undefined : T_1 extends Record<string, unknown> ? RcvResponsiveValue<keyof T_1, "sm" | "md" | "lg" | "xl"> : never : never : never) | undefined; } & {
|
|
29
33
|
className?: string;
|
|
30
34
|
}>[] | undefined;
|
|
31
35
|
onComplete?: (classes: string) => string;
|
|
32
|
-
}): (props
|
|
36
|
+
}): (props?: ({ [K in keyof T]?: (T[K] extends infer T_1 ? T_1 extends T[K] ? T_1 extends Partial<Record<"true" | "false", (string | readonly string[]) | Record<string, string | readonly string[]>>> ? RcvResponsiveValue<boolean, "sm" | "md" | "lg" | "xl"> | undefined : T_1 extends Record<string, unknown> ? RcvResponsiveValue<keyof T_1, "sm" | "md" | "lg" | "xl"> : never : never : never) | undefined; } & {
|
|
33
37
|
className?: string;
|
|
34
|
-
}) => string;
|
|
38
|
+
}) | undefined) => string;
|
|
35
39
|
};
|
|
36
40
|
export type Breakpoints = (typeof breakpoints)[number];
|
|
37
41
|
export type ResponsiveValue<T> = RcvResponsiveValue<T, Breakpoints>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "luan-ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "A UI library for React",
|
|
5
5
|
"author": "benebene84 <benedikt.sperl@gmail.com> (https://github.com/benebene84)",
|
|
6
6
|
"main": "/dist/index.js",
|
|
@@ -33,30 +33,30 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/benebene84/luan-ui#readme",
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@biomejs/biome": "2.
|
|
37
|
-
"@chromatic-com/storybook": "^4.
|
|
38
|
-
"@storybook/addon-docs": "^
|
|
39
|
-
"@storybook/addon-onboarding": "^
|
|
40
|
-
"@storybook/react-vite": "^
|
|
41
|
-
"@tailwindcss/postcss": "^4.1.
|
|
42
|
-
"@tailwindcss/vite": "^4.1.
|
|
43
|
-
"@testing-library/dom": "^10.4.
|
|
44
|
-
"@testing-library/jest-dom": "^6.
|
|
36
|
+
"@biomejs/biome": "2.3.5",
|
|
37
|
+
"@chromatic-com/storybook": "^4.1.2",
|
|
38
|
+
"@storybook/addon-docs": "^10.0.7",
|
|
39
|
+
"@storybook/addon-onboarding": "^10.0.7",
|
|
40
|
+
"@storybook/react-vite": "^10.0.7",
|
|
41
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
42
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
43
|
+
"@testing-library/dom": "^10.4.1",
|
|
44
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
45
45
|
"@testing-library/react": "^16.3.0",
|
|
46
46
|
"@testing-library/user-event": "^14.6.1",
|
|
47
|
-
"@types/node": "^24.
|
|
48
|
-
"@types/react": "^19.
|
|
49
|
-
"@types/react-dom": "^19.
|
|
50
|
-
"@vitejs/plugin-react": "^
|
|
51
|
-
"jsdom": "^
|
|
52
|
-
"lefthook": "^
|
|
53
|
-
"responsive-class-variants": "^1.
|
|
54
|
-
"storybook": "^
|
|
55
|
-
"tailwindcss": "^4.1.
|
|
47
|
+
"@types/node": "^24.10.1",
|
|
48
|
+
"@types/react": "^19.2.5",
|
|
49
|
+
"@types/react-dom": "^19.2.3",
|
|
50
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
51
|
+
"jsdom": "^27.2.0",
|
|
52
|
+
"lefthook": "^2.0.4",
|
|
53
|
+
"responsive-class-variants": "^1.2.3",
|
|
54
|
+
"storybook": "^10.0.7",
|
|
55
|
+
"tailwindcss": "^4.1.17",
|
|
56
56
|
"tsc-alias": "^1.8.16",
|
|
57
|
-
"typescript": "^5.
|
|
58
|
-
"vite": "^
|
|
59
|
-
"vitest": "^
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"vite": "^7.2.2",
|
|
59
|
+
"vitest": "^4.0.9"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"@radix-ui/react-compose-refs": "^1.1.2",
|
|
67
67
|
"@radix-ui/react-icons": "^1.3.2",
|
|
68
68
|
"clsx": "^2.1.1",
|
|
69
|
-
"radix-ui": "^1.4.
|
|
70
|
-
"sonner": "^2.0.
|
|
71
|
-
"tailwind-merge": "^3.
|
|
69
|
+
"radix-ui": "^1.4.3",
|
|
70
|
+
"sonner": "^2.0.7",
|
|
71
|
+
"tailwind-merge": "^3.4.0"
|
|
72
72
|
},
|
|
73
73
|
"packageManager": "pnpm@9.14.2"
|
|
74
74
|
}
|