@kubetail/ui 3.0.0-rc3 → 3.0.0-rc5
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/elements/button.cjs +1 -1
- package/dist/elements/button.cjs.map +1 -1
- package/dist/elements/button.d.ts +1 -1
- package/dist/elements/button.js +10 -14
- package/dist/elements/button.js.map +1 -1
- package/dist/elements/card.cjs +1 -1
- package/dist/elements/card.cjs.map +1 -1
- package/dist/elements/card.js +1 -1
- package/dist/elements/card.js.map +1 -1
- package/package.json +1 -1
package/dist/elements/button.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`);let t=require(`react/jsx-runtime`),n=require(`class-variance-authority`),r=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`);let t=require(`react/jsx-runtime`),n=require(`class-variance-authority`),r=require(`@base-ui/react/button`);var i=(0,n.cva)(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-4 py-2 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-10 gap-1.5 px-6 py-5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-9`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function a({className:n,variant:a=`default`,size:o=`default`,...s}){return(0,t.jsx)(r.Button,{"data-slot":`button`,className:e.cn(i({variant:a,size:o,className:n})),...s})}exports.Button=a,exports.buttonVariants=i;
|
|
2
2
|
//# sourceMappingURL=button.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.cjs","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\
|
|
1
|
+
{"version":3,"file":"button.cjs","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n outline:\n 'border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',\n ghost:\n 'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50',\n destructive:\n 'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 gap-1.5 px-4 py-2 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: 'h-10 gap-1.5 px-6 py-5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n icon: 'size-9',\n 'icon-xs':\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n 'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\nfunction Button({\n className,\n variant = 'default',\n size = 'default',\n ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n return <ButtonPrimitive data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\nexport type { ButtonVariantProps };\n"],"mappings":"gQAKA,IAAM,GAAA,EAAA,EAAA,KACJ,6lBACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,QACE,kLACF,UACE,kIACF,MACE,mHACF,YACE,8NACF,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,0FACT,GAAI,gNACJ,GAAI,wNACJ,GAAI,2FACJ,KAAM,SACN,UACE,0HACF,UAAW,qFACX,UAAW,UACZ,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAID,SAAS,EAAO,CACd,YACA,UAAU,UACV,OAAO,UACP,GAAG,GAC2D,CAC9D,OAAO,EAAA,EAAA,KAAC,EAAA,OAAD,CAAiB,YAAU,SAAS,UAAW,EAAA,GAAG,EAAe,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAAE,GAAI,EAAS,CAAA"}
|
|
@@ -5,6 +5,6 @@ declare const buttonVariants: (props?: ({
|
|
|
5
5
|
size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
8
|
-
declare function Button({ className, variant, size,
|
|
8
|
+
declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { Button, buttonVariants };
|
|
10
10
|
export type { ButtonVariantProps };
|
package/dist/elements/button.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { cn as e } from "../lib/utils.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { cva as n } from "class-variance-authority";
|
|
4
|
-
import {
|
|
5
|
-
import { Button as i } from "@base-ui/react/button";
|
|
4
|
+
import { Button as r } from "@base-ui/react/button";
|
|
6
5
|
//#region src/elements/button.tsx
|
|
7
|
-
var
|
|
6
|
+
var i = n("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
8
7
|
variants: {
|
|
9
8
|
variant: {
|
|
10
|
-
default: "bg-primary text-primary-foreground
|
|
9
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
11
10
|
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
12
11
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
13
12
|
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
@@ -30,21 +29,18 @@ var a = n("group/button inline-flex shrink-0 items-center justify-center rounded
|
|
|
30
29
|
size: "default"
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
|
-
function
|
|
34
|
-
|
|
35
|
-
return /* @__PURE__ */ t(i, {
|
|
32
|
+
function a({ className: n, variant: a = "default", size: o = "default", ...s }) {
|
|
33
|
+
return /* @__PURE__ */ t(r, {
|
|
36
34
|
"data-slot": "button",
|
|
37
|
-
className: e(
|
|
38
|
-
variant:
|
|
39
|
-
size:
|
|
35
|
+
className: e(i({
|
|
36
|
+
variant: a,
|
|
37
|
+
size: o,
|
|
40
38
|
className: n
|
|
41
39
|
})),
|
|
42
|
-
|
|
43
|
-
render: l,
|
|
44
|
-
...u
|
|
40
|
+
...s
|
|
45
41
|
});
|
|
46
42
|
}
|
|
47
43
|
//#endregion
|
|
48
|
-
export {
|
|
44
|
+
export { a as Button, i as buttonVariants };
|
|
49
45
|
|
|
50
46
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\
|
|
1
|
+
{"version":3,"file":"button.js","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from '@base-ui/react/button';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n outline:\n 'border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',\n ghost:\n 'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50',\n destructive:\n 'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 gap-1.5 px-4 py-2 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-8 gap-1 rounded-[min(var(--radius-md),12px)] px-3 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: 'h-10 gap-1.5 px-6 py-5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n icon: 'size-9',\n 'icon-xs':\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n 'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\ntype ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\nfunction Button({\n className,\n variant = 'default',\n size = 'default',\n ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n return <ButtonPrimitive data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\nexport type { ButtonVariantProps };\n"],"mappings":";;;;;AAKA,IAAM,IAAiB,EACrB,8lBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACF,WACE;GACF,OACE;GACF,aACE;GACF,MAAM;GACP;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;GACN,WACE;GACF,WAAW;GACX,WAAW;GACZ;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAID,SAAS,EAAO,EACd,cACA,aAAU,WACV,UAAO,WACP,GAAG,KAC2D;AAC9D,QAAO,kBAAC,GAAD;EAAiB,aAAU;EAAS,WAAW,EAAG,EAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAAE,GAAI;EAAS,CAAA"}
|
package/dist/elements/card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`);let t=require(`react/jsx-runtime`);function n({className:n,size:r=`default`,...i}){return(0,t.jsx)(`div`,{"data-slot":`card`,"data-size":r,className:e.cn(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../_virtual/_rolldown/runtime.cjs`);const e=require(`../lib/utils.cjs`);let t=require(`react/jsx-runtime`);function n({className:n,size:r=`default`,...i}){return(0,t.jsx)(`div`,{"data-slot":`card`,"data-size":r,className:e.cn(`group/card flex flex-col gap-4 overflow-hidden rounded-xl border bg-card py-4 text-sm text-card-foreground shadow-sm has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),...i})}function r({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`card-header`,className:e.cn(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,n),...r})}function i({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`card-title`,className:e.cn(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),...r})}function a({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`card-description`,className:e.cn(`text-sm text-muted-foreground`,n),...r})}function o({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`card-action`,className:e.cn(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),...r})}function s({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`card-content`,className:e.cn(`px-4 group-data-[size=sm]/card:px-3`,n),...r})}function c({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`card-footer`,className:e.cn(`flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3`,n),...r})}exports.Card=n,exports.CardAction=o,exports.CardContent=s,exports.CardDescription=a,exports.CardFooter=c,exports.CardHeader=r,exports.CardTitle=i;
|
|
2
2
|
//# sourceMappingURL=card.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.cjs","names":[],"sources":["../../src/elements/card.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground
|
|
1
|
+
{"version":3,"file":"card.cjs","names":[],"sources":["../../src/elements/card.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl border bg-card py-4 text-sm text-card-foreground shadow-sm has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-sm text-muted-foreground', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3', className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };\n"],"mappings":"uLAEA,SAAS,EAAK,CAAE,YAAW,OAAO,UAAW,GAAG,GAAoE,CAClH,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,OACV,YAAW,EACX,UAAW,EAAA,GACT,8UACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GACT,qSACA,EACD,CACD,GAAI,EACJ,CAAA,CAIN,SAAS,EAAU,CAAE,YAAW,GAAG,GAAsC,CACvE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,aACV,UAAW,EAAA,GAAG,uFAAwF,EAAU,CAChH,GAAI,EACJ,CAAA,CAIN,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAsC,CAC7E,OAAO,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,mBAAmB,UAAW,EAAA,GAAG,gCAAiC,EAAU,CAAE,GAAI,EAAS,CAAA,CAGnH,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GAAG,iEAAkE,EAAU,CAC1F,GAAI,EACJ,CAAA,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAAsC,CACzE,OAAO,EAAA,EAAA,KAAC,MAAD,CAAK,YAAU,eAAe,UAAW,EAAA,GAAG,sCAAuC,EAAU,CAAE,GAAI,EAAS,CAAA,CAGrH,SAAS,EAAW,CAAE,YAAW,GAAG,GAAsC,CACxE,OACE,EAAA,EAAA,KAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAA,GAAG,wFAAyF,EAAU,CACjH,GAAI,EACJ,CAAA"}
|
package/dist/elements/card.js
CHANGED
|
@@ -5,7 +5,7 @@ function n({ className: n, size: r = "default", ...i }) {
|
|
|
5
5
|
return /* @__PURE__ */ t("div", {
|
|
6
6
|
"data-slot": "card",
|
|
7
7
|
"data-size": r,
|
|
8
|
-
className: e("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground
|
|
8
|
+
className: e("group/card flex flex-col gap-4 overflow-hidden rounded-xl border bg-card py-4 text-sm text-card-foreground shadow-sm has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", n),
|
|
9
9
|
...i
|
|
10
10
|
});
|
|
11
11
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","names":[],"sources":["../../src/elements/card.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground
|
|
1
|
+
{"version":3,"file":"card.js","names":[],"sources":["../../src/elements/card.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Card({ className, size = 'default', ...props }: React.ComponentProps<'div'> & { size?: 'default' | 'sm' }) {\n return (\n <div\n data-slot=\"card\"\n data-size={size}\n className={cn(\n 'group/card flex flex-col gap-4 overflow-hidden rounded-xl border bg-card py-4 text-sm text-card-foreground shadow-sm has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n 'group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn('cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-sm text-muted-foreground', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-4 group-data-[size=sm]/card:px-3', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn('flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3', className)}\n {...props}\n />\n );\n}\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };\n"],"mappings":";;;AAEA,SAAS,EAAK,EAAE,cAAW,UAAO,WAAW,GAAG,KAAoE;AAClH,QACE,kBAAC,OAAD;EACE,aAAU;EACV,aAAW;EACX,WAAW,EACT,+UACA,EACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EACT,sSACA,EACD;EACD,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAU,EAAE,cAAW,GAAG,KAAsC;AACvE,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,wFAAwF,EAAU;EAChH,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAgB,EAAE,cAAW,GAAG,KAAsC;AAC7E,QAAO,kBAAC,OAAD;EAAK,aAAU;EAAmB,WAAW,EAAG,iCAAiC,EAAU;EAAE,GAAI;EAAS,CAAA;;AAGnH,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,kEAAkE,EAAU;EAC1F,GAAI;EACJ,CAAA;;AAIN,SAAS,EAAY,EAAE,cAAW,GAAG,KAAsC;AACzE,QAAO,kBAAC,OAAD;EAAK,aAAU;EAAe,WAAW,EAAG,uCAAuC,EAAU;EAAE,GAAI;EAAS,CAAA;;AAGrH,SAAS,EAAW,EAAE,cAAW,GAAG,KAAsC;AACxE,QACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,yFAAyF,EAAU;EACjH,GAAI;EACJ,CAAA"}
|