@kubetail/ui 2.0.0-rc1 → 2.0.0-rc2
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 +2 -2
- package/dist/elements/button.js +10 -17
- package/dist/elements/button.js.map +1 -1
- package/dist/elements/button.stories.d.ts +4 -2
- package/dist/elements/calendar.stories.d.ts +5 -4
- package/dist/elements/calendar.test.d.ts +0 -0
- package/dist/elements/card.stories.d.ts +1 -3
- package/dist/elements/card.test.d.ts +1 -0
- package/dist/elements/checkbox.stories.d.ts +1 -3
- package/dist/elements/checkbox.test.d.ts +0 -0
- package/dist/elements/dropdown-menu.stories.d.ts +2 -6
- package/dist/elements/dropdown-menu.test.d.ts +0 -0
- package/dist/elements/form.test.d.ts +0 -0
- package/dist/elements/input.test.d.ts +0 -1
- package/dist/elements/label.test.d.ts +1 -0
- package/dist/elements/popover.test.d.ts +0 -0
- package/dist/elements/select.cjs +1 -1
- package/dist/elements/select.cjs.map +1 -1
- package/dist/elements/select.d.ts +1 -1
- package/dist/elements/select.js +64 -63
- package/dist/elements/select.js.map +1 -1
- package/dist/elements/select.stories.d.ts +3 -0
- package/dist/elements/select.test.d.ts +0 -0
- package/dist/elements/spinner.test.d.ts +1 -0
- package/dist/elements/table.test.d.ts +1 -0
- package/dist/elements/tabs.stories.d.ts +6 -4
- package/dist/elements/tabs.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/elements/button.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),c=require("@radix-ui/react-slot"),v=require("class-variance-authority"),g=require("react"),l=require("../lib/utils.cjs"),e=v.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"}}),t=g.forwardRef(({className:r,variant:i,size:n,asChild:s=!1,...a},o)=>{const d=s?c.Slot:"button";return u.jsx(d,{"data-slot":"button",className:l.cn(e({variant:i,size:n,className:r})),...a,ref:o})});t.displayName="Button";exports.Button=t;exports.buttonVariants=e;
|
|
2
2
|
//# sourceMappingURL=button.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.cjs","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 */\
|
|
1
|
+
{"version":3,"file":"button.cjs","sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { forwardRef } from 'react';\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\nconst Button = forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> &\n ButtonVariantProps & {\n asChild?: boolean;\n }\n>(({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} ref={ref} />;\n});\n\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","forwardRef","className","variant","size","asChild","props","ref","Comp","Slot","cn"],"mappings":"8OAMMA,EAAiBC,EAAAA,IACrB,8bACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,mEACT,YACE,8JACF,QACE,wIACF,UAAW,yEACX,MAAO,uEACP,KAAM,iDAAA,EAER,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,QAAA,CACR,EAEF,gBAAiB,CACf,QAAS,UACT,KAAM,SAAA,CACR,CAEJ,EAaMC,EAASC,EAAAA,WAMb,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAA,EAASC,IAAQ,CAClE,MAAMC,EAAOH,EAAUI,EAAAA,KAAO,SAE9B,aAAQD,EAAA,CAAK,YAAU,SAAS,UAAWE,KAAGZ,EAAe,CAAE,QAAAK,EAAS,KAAAC,EAAM,UAAAF,EAAW,CAAC,EAAI,GAAGI,EAAO,IAAAC,EAAU,CACpH,CAAC,EAEDP,EAAO,YAAc"}
|
|
@@ -12,7 +12,7 @@ export type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
|
12
12
|
* @param props.size - the button size
|
|
13
13
|
* @parmm props.asChild - as child
|
|
14
14
|
*/
|
|
15
|
-
declare
|
|
15
|
+
declare const Button: import('react').ForwardRefExoticComponent<Omit<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariantProps & {
|
|
16
16
|
asChild?: boolean;
|
|
17
|
-
}
|
|
17
|
+
}, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
18
18
|
export { Button, buttonVariants };
|
package/dist/elements/button.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Slot as
|
|
3
|
-
import { cva as
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Slot as a } from "@radix-ui/react-slot";
|
|
3
|
+
import { cva as d } from "class-variance-authority";
|
|
4
|
+
import { forwardRef as u } from "react";
|
|
5
|
+
import { cn as c } from "../lib/utils.js";
|
|
6
|
+
const v = d(
|
|
6
7
|
"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",
|
|
7
8
|
{
|
|
8
9
|
variants: {
|
|
@@ -26,18 +27,10 @@ const u = a(
|
|
|
26
27
|
size: "default"
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
className: e,
|
|
32
|
-
variant: r,
|
|
33
|
-
size: t,
|
|
34
|
-
asChild: i = !1,
|
|
35
|
-
...n
|
|
36
|
-
}) {
|
|
37
|
-
return /* @__PURE__ */ o(i ? s : "button", { "data-slot": "button", className: d(u({ variant: r, size: t, className: e })), ...n });
|
|
38
|
-
}
|
|
30
|
+
), g = u(({ className: e, variant: r, size: t, asChild: i = !1, ...o }, n) => /* @__PURE__ */ s(i ? a : "button", { "data-slot": "button", className: c(v({ variant: r, size: t, className: e })), ...o, ref: n }));
|
|
31
|
+
g.displayName = "Button";
|
|
39
32
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
g as Button,
|
|
34
|
+
v as buttonVariants
|
|
42
35
|
};
|
|
43
36
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","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 */\
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../src/elements/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { forwardRef } from 'react';\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\nconst Button = forwardRef<\n HTMLButtonElement,\n React.ComponentProps<'button'> &\n ButtonVariantProps & {\n asChild?: boolean;\n }\n>(({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} ref={ref} />;\n});\n\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","forwardRef","className","variant","size","asChild","props","ref","Slot","cn"],"mappings":";;;;;AAMA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SACE;AAAA,QACF,WAAW;AAAA,QACX,OAAO;AAAA,QACP,MAAM;AAAA,MAAA;AAAA,MAER,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAaMC,IAASC,EAMb,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,IAAU,IAAO,GAAGC,EAAA,GAASC,wBAC7CF,IAAUG,IAAO,UAEtB,EAAK,aAAU,UAAS,WAAWC,EAAGX,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,GAAW,CAAC,GAAI,GAAGI,GAAO,KAAAC,GAAU,CACnH;AAEDP,EAAO,cAAc;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonVariantProps } from './button';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
tags: string[];
|
|
6
|
-
component:
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<Omit<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & ButtonVariantProps & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
7
9
|
parameters: {
|
|
8
10
|
docs: {
|
|
9
11
|
description: {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
1
|
declare const meta: {
|
|
3
2
|
title: string;
|
|
4
|
-
tags: string[];
|
|
5
3
|
component: ({ className, showOutsideDays, ...props }: import('./calendar').CalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
tags: string[];
|
|
6
5
|
parameters: {
|
|
7
6
|
docs: {
|
|
8
7
|
description: {
|
|
@@ -12,5 +11,7 @@ declare const meta: {
|
|
|
12
11
|
};
|
|
13
12
|
};
|
|
14
13
|
export default meta;
|
|
15
|
-
|
|
16
|
-
export declare
|
|
14
|
+
export declare function Default(): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare namespace Default {
|
|
16
|
+
var storyName: string;
|
|
17
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -12,9 +12,5 @@ declare const meta: {
|
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
14
|
export default meta;
|
|
15
|
-
export declare
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export declare const RadioGroup: {
|
|
19
|
-
render: () => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
};
|
|
15
|
+
export declare function Checkboxes(): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function RadioGroup(): import("react/jsx-runtime").JSX.Element;
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
package/dist/elements/select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("@radix-ui/react-select"),l=require("lucide-react"),n=require("../lib/utils.cjs");function p(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(a,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return a.default=e,Object.freeze(a)}const s=p(u);function m({...e}){return t.jsx(s.Root,{"data-slot":"select",...e})}function f({...e}){return t.jsx(s.Group,{"data-slot":"select-group",...e})}function g({...e}){return t.jsx(s.Value,{"data-slot":"select-value",...e})}function x({className:e,size:a="default",children:r,asChild:o=!1,...i}){return o?t.jsx(s.Trigger,{...i,asChild:!0,children:r}):t.jsxs(s.Trigger,{"data-slot":"select-trigger","data-size":a,className:n.cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...i,children:[r,t.jsx(s.Icon,{asChild:!0,children:t.jsx(l.ChevronDownIcon,{className:"size-4 opacity-50"})})]})}function c({className:e,...a}){return t.jsx(s.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:n.cn("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(l.ChevronUpIcon,{className:"size-4"})})}function d({className:e,...a}){return t.jsx(s.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:n.cn("flex cursor-default items-center justify-center py-1",e),...a,children:t.jsx(l.ChevronDownIcon,{className:"size-4"})})}function v({className:e,children:a,position:r="popper",...o}){return t.jsx(s.Portal,{children:t.jsxs(s.Content,{"data-slot":"select-content",className:n.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...o,children:[t.jsx(c,{}),t.jsx(s.Viewport,{className:n.cn("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),t.jsx(d,{})]})})}function b({className:e,...a}){return t.jsx(s.Label,{"data-slot":"select-label",className:n.cn("text-muted-foreground px-2 py-1.5 text-xs",e),...a})}function h({className:e,children:a,...r}){return t.jsxs(s.Item,{"data-slot":"select-item",className:n.cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...r,children:[t.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:t.jsx(s.ItemIndicator,{children:t.jsx(l.CheckIcon,{className:"size-4"})})}),t.jsx(s.ItemText,{children:a})]})}function S({className:e,...a}){return t.jsx(s.Separator,{"data-slot":"select-separator",className:n.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),...a})}exports.Select=m;exports.SelectContent=v;exports.SelectGroup=f;exports.SelectItem=h;exports.SelectLabel=b;exports.SelectScrollDownButton=d;exports.SelectScrollUpButton=c;exports.SelectSeparator=S;exports.SelectTrigger=x;exports.SelectValue=g;
|
|
2
2
|
//# sourceMappingURL=select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.cjs","sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","size","children","
|
|
1
|
+
{"version":3,"file":"select.cjs","sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n asChild = false,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n if (asChild) {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n {children}\n </SelectPrimitive.Trigger>\n );\n }\n\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","size","children","asChild","jsx","jsxs","cn","ChevronDownIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","CheckIcon","SelectSeparator"],"mappings":"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"}
|
|
@@ -2,7 +2,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
2
2
|
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
5
|
+
declare function SelectTrigger({ className, size, children, asChild, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
6
6
|
size?: 'sm' | 'default';
|
|
7
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
package/dist/elements/select.js
CHANGED
|
@@ -1,145 +1,146 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "@radix-ui/react-select";
|
|
3
|
-
import { CheckIcon as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
3
|
+
import { CheckIcon as c, ChevronDownIcon as d, ChevronUpIcon as u } from "lucide-react";
|
|
4
|
+
import { cn as o } from "../lib/utils.js";
|
|
5
|
+
function x({ ...t }) {
|
|
6
|
+
return /* @__PURE__ */ e(a.Root, { "data-slot": "select", ...t });
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
8
|
+
function h({ ...t }) {
|
|
9
|
+
return /* @__PURE__ */ e(a.Group, { "data-slot": "select-group", ...t });
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return /* @__PURE__ */
|
|
11
|
+
function b({ ...t }) {
|
|
12
|
+
return /* @__PURE__ */ e(a.Value, { "data-slot": "select-value", ...t });
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
className:
|
|
14
|
+
function w({
|
|
15
|
+
className: t,
|
|
16
16
|
size: r = "default",
|
|
17
|
-
children:
|
|
18
|
-
|
|
17
|
+
children: s,
|
|
18
|
+
asChild: n = !1,
|
|
19
|
+
...i
|
|
19
20
|
}) {
|
|
20
|
-
return /* @__PURE__ */ l(
|
|
21
|
+
return n ? /* @__PURE__ */ e(a.Trigger, { ...i, asChild: !0, children: s }) : /* @__PURE__ */ l(
|
|
21
22
|
a.Trigger,
|
|
22
23
|
{
|
|
23
24
|
"data-slot": "select-trigger",
|
|
24
25
|
"data-size": r,
|
|
25
|
-
className:
|
|
26
|
+
className: o(
|
|
26
27
|
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
27
|
-
|
|
28
|
+
t
|
|
28
29
|
),
|
|
29
|
-
...
|
|
30
|
+
...i,
|
|
30
31
|
children: [
|
|
31
|
-
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
s,
|
|
33
|
+
/* @__PURE__ */ e(a.Icon, { asChild: !0, children: /* @__PURE__ */ e(d, { className: "size-4 opacity-50" }) })
|
|
33
34
|
]
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
function p({ className: t, ...r }) {
|
|
39
|
+
return /* @__PURE__ */ e(
|
|
39
40
|
a.ScrollUpButton,
|
|
40
41
|
{
|
|
41
42
|
"data-slot": "select-scroll-up-button",
|
|
42
|
-
className:
|
|
43
|
+
className: o("flex cursor-default items-center justify-center py-1", t),
|
|
43
44
|
...r,
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ e(u, { className: "size-4" })
|
|
45
46
|
}
|
|
46
47
|
);
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
className:
|
|
49
|
+
function m({
|
|
50
|
+
className: t,
|
|
50
51
|
...r
|
|
51
52
|
}) {
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ e(
|
|
53
54
|
a.ScrollDownButton,
|
|
54
55
|
{
|
|
55
56
|
"data-slot": "select-scroll-down-button",
|
|
56
|
-
className:
|
|
57
|
+
className: o("flex cursor-default items-center justify-center py-1", t),
|
|
57
58
|
...r,
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ e(d, { className: "size-4" })
|
|
59
60
|
}
|
|
60
61
|
);
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
-
className:
|
|
63
|
+
function y({
|
|
64
|
+
className: t,
|
|
64
65
|
children: r,
|
|
65
|
-
position:
|
|
66
|
+
position: s = "popper",
|
|
66
67
|
...n
|
|
67
68
|
}) {
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ e(a.Portal, { children: /* @__PURE__ */ l(
|
|
69
70
|
a.Content,
|
|
70
71
|
{
|
|
71
72
|
"data-slot": "select-content",
|
|
72
|
-
className:
|
|
73
|
+
className: o(
|
|
73
74
|
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
s === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
76
|
+
t
|
|
76
77
|
),
|
|
77
|
-
position:
|
|
78
|
+
position: s,
|
|
78
79
|
...n,
|
|
79
80
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ e(p, {}),
|
|
82
|
+
/* @__PURE__ */ e(
|
|
82
83
|
a.Viewport,
|
|
83
84
|
{
|
|
84
|
-
className:
|
|
85
|
+
className: o(
|
|
85
86
|
"p-1",
|
|
86
|
-
|
|
87
|
+
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
87
88
|
),
|
|
88
89
|
children: r
|
|
89
90
|
}
|
|
90
91
|
),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ e(m, {})
|
|
92
93
|
]
|
|
93
94
|
}
|
|
94
95
|
) });
|
|
95
96
|
}
|
|
96
|
-
function
|
|
97
|
-
return /* @__PURE__ */
|
|
97
|
+
function S({ className: t, ...r }) {
|
|
98
|
+
return /* @__PURE__ */ e(
|
|
98
99
|
a.Label,
|
|
99
100
|
{
|
|
100
101
|
"data-slot": "select-label",
|
|
101
|
-
className:
|
|
102
|
+
className: o("text-muted-foreground px-2 py-1.5 text-xs", t),
|
|
102
103
|
...r
|
|
103
104
|
}
|
|
104
105
|
);
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
+
function z({ className: t, children: r, ...s }) {
|
|
107
108
|
return /* @__PURE__ */ l(
|
|
108
109
|
a.Item,
|
|
109
110
|
{
|
|
110
111
|
"data-slot": "select-item",
|
|
111
|
-
className:
|
|
112
|
+
className: o(
|
|
112
113
|
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
113
|
-
|
|
114
|
+
t
|
|
114
115
|
),
|
|
115
|
-
...
|
|
116
|
+
...s,
|
|
116
117
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(a.ItemIndicator, { children: /* @__PURE__ */ e(c, { className: "size-4" }) }) }),
|
|
119
|
+
/* @__PURE__ */ e(a.ItemText, { children: r })
|
|
119
120
|
]
|
|
120
121
|
}
|
|
121
122
|
);
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
return /* @__PURE__ */
|
|
124
|
+
function N({ className: t, ...r }) {
|
|
125
|
+
return /* @__PURE__ */ e(
|
|
125
126
|
a.Separator,
|
|
126
127
|
{
|
|
127
128
|
"data-slot": "select-separator",
|
|
128
|
-
className:
|
|
129
|
+
className: o("bg-border pointer-events-none -mx-1 my-1 h-px", t),
|
|
129
130
|
...r
|
|
130
131
|
}
|
|
131
132
|
);
|
|
132
133
|
}
|
|
133
134
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
135
|
+
x as Select,
|
|
136
|
+
y as SelectContent,
|
|
137
|
+
h as SelectGroup,
|
|
138
|
+
z as SelectItem,
|
|
139
|
+
S as SelectLabel,
|
|
140
|
+
m as SelectScrollDownButton,
|
|
141
|
+
p as SelectScrollUpButton,
|
|
142
|
+
N as SelectSeparator,
|
|
143
|
+
w as SelectTrigger,
|
|
144
|
+
b as SelectValue
|
|
144
145
|
};
|
|
145
146
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","size","children","
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n asChild = false,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n if (asChild) {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n {children}\n </SelectPrimitive.Trigger>\n );\n }\n\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","size","children","asChild","jsx","jsxs","cn","ChevronDownIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","CheckIcon","SelectSeparator"],"mappings":";;;;AAOA,SAASA,EAAO,EAAE,GAAGC,KAA4D;AAC/E,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY,EAAE,GAAGF,KAA6D;AACrF,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASG,EAAY,EAAE,GAAGH,KAA6D;AACrF,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASI,EAAc;AAAA,EACrB,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,GAAGR;AACL,GAEG;AACD,SAAIQ,IAEA,gBAAAC,EAACR,EAAgB,SAAhB,EAAyB,GAAGD,GAAO,SAAO,IACxC,UAAAO,GACH,IAKF,gBAAAG;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,aAAWK;AAAA,MACX,WAAWK;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEH,UAAA;AAAA,QAAAO;AAAA,QACD,gBAAAE,EAACR,EAAgB,MAAhB,EAAqB,SAAO,IAC3B,UAAA,gBAAAQ,EAACG,GAAA,EAAgB,WAAU,oBAAA,CAAoB,EAAA,CACjD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,SAASC,EAAqB,EAAE,WAAAR,GAAW,GAAGL,KAAsE;AAClH,SACE,gBAAAS;AAAA,IAACR,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU,EAAG,wDAAwDN,CAAS;AAAA,MAC9E,GAAGL;AAAA,MAEJ,UAAA,gBAAAS,EAACK,GAAA,EAAc,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAGxC;AAEA,SAASC,EAAuB;AAAA,EAC9B,WAAAV;AAAA,EACA,GAAGL;AACL,GAAkE;AAChE,SACE,gBAAAS;AAAA,IAACR,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU,EAAG,wDAAwDN,CAAS;AAAA,MAC9E,GAAGL;AAAA,MAEJ,UAAA,gBAAAS,EAACG,GAAA,EAAgB,WAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG1C;AAEA,SAASI,EAAc;AAAA,EACrB,WAAAX;AAAA,EACA,UAAAE;AAAA,EACA,UAAAU,IAAW;AAAA,EACX,GAAGjB;AACL,GAAyD;AACvD,SACE,gBAAAS,EAACR,EAAgB,QAAhB,EACC,UAAA,gBAAAS;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU;AAAA,QACT;AAAA,QACAM,MAAa,YACX;AAAA,QACFZ;AAAA,MAAA;AAAA,MAEF,UAAAY;AAAA,MACC,GAAGjB;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAS,EAACI,GAAA,EAAqB;AAAA,QACtB,gBAAAJ;AAAA,UAACR,EAAgB;AAAA,UAAhB;AAAA,YACC,WAAWU;AAAA,cACT;AAAA,cACAM,MAAa,YACX;AAAA,YAAA;AAAA,YAGH,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,0BAEFQ,GAAA,CAAA,CAAuB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE5B;AAEJ;AAEA,SAASG,EAAY,EAAE,WAAAb,GAAW,GAAGL,KAA6D;AAChG,SACE,gBAAAS;AAAA,IAACR,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU,EAAG,6CAA6CN,CAAS;AAAA,MACnE,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASmB,EAAW,EAAE,WAAAd,GAAW,UAAAE,GAAU,GAAGP,KAA4D;AACxG,SACE,gBAAAU;AAAA,IAACT,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAS,EAAC,QAAA,EAAK,WAAU,8DACd,UAAA,gBAAAA,EAACR,EAAgB,eAAhB,EACC,UAAA,gBAAAQ,EAACW,GAAA,EAAU,WAAU,SAAA,CAAS,EAAA,CAChC,GACF;AAAA,QACA,gBAAAX,EAACR,EAAgB,UAAhB,EAA0B,UAAAM,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;AAEA,SAASc,EAAgB,EAAE,WAAAhB,GAAW,GAAGL,KAAiE;AACxG,SACE,gBAAAS;AAAA,IAACR,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWU,EAAG,iDAAiDN,CAAS;AAAA,MACvE,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { Tabs } from './tabs';
|
|
1
2
|
declare const meta: {
|
|
2
3
|
title: string;
|
|
3
4
|
tags: string[];
|
|
4
|
-
component:
|
|
5
|
+
component: typeof Tabs;
|
|
5
6
|
parameters: {
|
|
6
7
|
docs: {
|
|
7
8
|
description: {
|
|
8
9
|
component: string;
|
|
9
10
|
};
|
|
11
|
+
source: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
10
14
|
};
|
|
11
15
|
};
|
|
12
16
|
};
|
|
13
17
|
export default meta;
|
|
14
|
-
export declare
|
|
15
|
-
render: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
};
|
|
18
|
+
export declare function Demo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|