@kubetail/ui 2.0.4 → 2.0.5

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.
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-slot`),i=require(`class-variance-authority`);var a=(0,i.cva)(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function o({className:e,variant:i,size:o,asChild:s=!1,...c}){return(0,n.jsx)(s?r.Slot:`button`,{"data-slot":`button`,className:t.cn(a({variant:i,size:o,className:e})),...c})}exports.Button=o,exports.buttonVariants=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-slot`),i=require(`class-variance-authority`);var a=(0,i.cva)(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow-xs hover:bg-primary/90`,destructive:`bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,sm:`h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function o({className:e,variant:i,size:o,asChild:s=!1,...c}){return(0,n.jsx)(s?r.Slot:`button`,{"data-slot":`button`,className:t.cn(a({variant:i,size:o,className:e})),...c})}exports.Button=o,exports.buttonVariants=a;
2
2
  //# sourceMappingURL=button.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.cjs","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\n/**\n * `Button` renders a button component\n *\n * @param props.className - the custom className\n * @param props.variant - the button variant\n * @param props.size - the button size\n * @parmm props.asChild - as child\n */\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n ButtonVariantProps & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\n"],"mappings":"gQAKA,IAAM,GAAA,EAAA,EAAA,KACJ,8bACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,mEACT,YACE,8JACF,QACE,wIACF,UAAW,yEACX,MAAO,uEACP,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,SACP,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAaD,SAAS,EAAO,CACd,YACA,UACA,OACA,UAAU,GACV,GAAG,GAIA,CAGH,OAAO,EAAA,EAAA,KAFM,EAAU,EAAA,KAAO,SAEtB,CAAK,YAAU,SAAS,UAAW,EAAA,GAAG,EAAe,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAAE,GAAI,GAAS"}
1
+ {"version":3,"file":"button.cjs","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\n/**\n * `Button` renders a button component\n *\n * @param props.className - the custom className\n * @param props.variant - the button variant\n * @param props.size - the button size\n * @parmm props.asChild - as child\n */\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n ButtonVariantProps & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\n"],"mappings":"gQAKA,IAAM,GAAA,EAAA,EAAA,KACJ,8bACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,mEACT,YACE,8JACF,QACE,wIACF,UAAW,yEACX,MAAO,uEACP,KAAM,kDACP,CACD,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,SACN,UAAW,SACX,UAAW,UACZ,CACF,CACD,gBAAiB,CACf,QAAS,UACT,KAAM,UACP,CACF,CACF,CAaD,SAAS,EAAO,CACd,YACA,UACA,OACA,UAAU,GACV,GAAG,GAIA,CAGH,OAAO,EAAA,EAAA,KAFM,EAAU,EAAA,KAAO,SAEtB,CAAK,YAAU,SAAS,UAAW,EAAA,GAAG,EAAe,CAAE,UAAS,OAAM,YAAW,CAAC,CAAC,CAAE,GAAI,GAAS"}
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  declare const buttonVariants: (props?: ({
3
3
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
4
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
4
+ size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
5
5
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
6
  export type ButtonVariantProps = VariantProps<typeof buttonVariants>;
7
7
  /**
@@ -16,7 +16,9 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespa
16
16
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
17
  sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
18
18
  lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
19
- icon: "size-9"
19
+ icon: "size-9",
20
+ "icon-sm": "size-8",
21
+ "icon-lg": "size-10"
20
22
  }
21
23
  },
22
24
  defaultVariants: {
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\n/**\n * `Button` renders a button component\n *\n * @param props.className - the custom className\n * @param props.variant - the button variant\n * @param props.size - the button size\n * @parmm props.asChild - as child\n */\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n ButtonVariantProps & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\n"],"mappings":";;;;AAKA,IAAM,iBAAiB,IACrB,+bACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;GACF,SACE;GACF,WAAW;GACX,OAAO;GACP,MAAM;GACP;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,MAAM;GACP;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAaD,SAAS,OAAO,EACd,cACA,YACA,SACA,aAAU,IACV,GAAG,KAIA;AAGH,QAAO,oBAFM,IAAU,OAAO,UAEtB;EAAK,aAAU;EAAS,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAAE,GAAI;GAAS"}
1
+ {"version":3,"file":"button.js","names":[],"sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n 'icon-sm': 'size-8',\n 'icon-lg': 'size-10',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type ButtonVariantProps = VariantProps<typeof buttonVariants>;\n\n/**\n * `Button` renders a button component\n *\n * @param props.className - the custom className\n * @param props.variant - the button variant\n * @param props.size - the button size\n * @parmm props.asChild - as child\n */\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n ButtonVariantProps & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\n"],"mappings":";;;;AAKA,IAAM,iBAAiB,IACrB,+bACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,aACE;GACF,SACE;GACF,WAAW;GACX,OAAO;GACP,MAAM;GACP;EACD,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,MAAM;GACN,WAAW;GACX,WAAW;GACZ;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAaD,SAAS,OAAO,EACd,cACA,YACA,SACA,aAAU,IACV,GAAG,KAIA;AAGH,QAAO,oBAFM,IAAU,OAAO,UAEtB;EAAK,aAAU;EAAS,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAAE,GAAI;GAAS"}
@@ -4,7 +4,7 @@ declare const meta: {
4
4
  tags: string[];
5
5
  component: ({ className, size }: {
6
6
  className?: string;
7
- size?: "sm" | "lg" | "xs" | "md";
7
+ size?: "sm" | "lg" | "md" | "xs";
8
8
  }) => import("react/jsx-runtime").JSX.Element;
9
9
  };
10
10
  export default meta;
package/dist/index.css CHANGED
@@ -9,7 +9,7 @@
9
9
  --card-foreground: var(--color-zinc-950);
10
10
  --popover: var(--color-white);
11
11
  --popover-foreground: var(--color-zinc-950);
12
- --primary: oklch(0.563 0.194 262.62); /* color-bg-primary */
12
+ --primary: oklch(0.563 0.194 262.62); /* color-bg-primary */
13
13
  --primary-foreground: var(--color-white); /* color-text-on-color */
14
14
  --secondary: var(--color-zinc-100); /* color-bg-secondary */
15
15
  --secondary-foreground: var(--color-zinc-950); /* color-text */
@@ -119,6 +119,11 @@
119
119
  body {
120
120
  @apply bg-background text-foreground;
121
121
  }
122
+
123
+ button:not(:disabled),
124
+ [role="button"]:not(:disabled) {
125
+ cursor: pointer;
126
+ }
122
127
  }
123
128
 
124
129
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubetail/ui",
3
- "version": "v2.0.4",
3
+ "version": "v2.0.5",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "module": "./dist/index.js",