@tetrascience-npm/tetrascience-react-ui 0.5.0-beta.73.1 → 0.5.0-beta.74.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/composed/ProcessFlow/ProcessFlow.cjs +1 -1
- package/dist/components/composed/ProcessFlow/ProcessFlow.cjs.map +1 -1
- package/dist/components/composed/ProcessFlow/ProcessFlow.js +12 -12
- package/dist/components/composed/ProcessFlow/ProcessFlow.js.map +1 -1
- package/dist/components/ui/accordion.cjs +1 -1
- package/dist/components/ui/accordion.cjs.map +1 -1
- package/dist/components/ui/accordion.js +1 -1
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/badge.cjs +1 -1
- package/dist/components/ui/badge.cjs.map +1 -1
- package/dist/components/ui/badge.js +18 -18
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/button.cjs +1 -1
- package/dist/components/ui/button.cjs.map +1 -1
- package/dist/components/ui/button.js +15 -15
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.cjs +1 -1
- package/dist/components/ui/calendar.cjs.map +1 -1
- package/dist/components/ui/calendar.js +5 -5
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/checkbox.cjs +1 -1
- package/dist/components/ui/checkbox.cjs.map +1 -1
- package/dist/components/ui/checkbox.js +9 -9
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.cjs +1 -1
- package/dist/components/ui/combobox.cjs.map +1 -1
- package/dist/components/ui/combobox.js +5 -5
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/input-group.cjs +1 -1
- package/dist/components/ui/input-group.cjs.map +1 -1
- package/dist/components/ui/input-group.js +29 -29
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.cjs +1 -1
- package/dist/components/ui/input-otp.cjs.map +1 -1
- package/dist/components/ui/input-otp.js +10 -10
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.cjs +1 -1
- package/dist/components/ui/input.cjs.map +1 -1
- package/dist/components/ui/input.js +7 -7
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/item.cjs +1 -1
- package/dist/components/ui/item.cjs.map +1 -1
- package/dist/components/ui/item.js +17 -17
- package/dist/components/ui/item.js.map +1 -1
- package/dist/components/ui/navigation-menu.cjs +1 -1
- package/dist/components/ui/navigation-menu.cjs.map +1 -1
- package/dist/components/ui/navigation-menu.js +24 -24
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/radio-group.cjs +1 -1
- package/dist/components/ui/radio-group.cjs.map +1 -1
- package/dist/components/ui/radio-group.js +16 -16
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/scroll-area.cjs +1 -1
- package/dist/components/ui/scroll-area.cjs.map +1 -1
- package/dist/components/ui/scroll-area.js +6 -6
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.cjs +1 -1
- package/dist/components/ui/select.cjs.map +1 -1
- package/dist/components/ui/select.js +48 -48
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/slider.cjs +1 -1
- package/dist/components/ui/slider.cjs.map +1 -1
- package/dist/components/ui/slider.js +22 -22
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/switch.cjs +1 -1
- package/dist/components/ui/switch.cjs.map +1 -1
- package/dist/components/ui/switch.js +14 -14
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/tabs.cjs +1 -1
- package/dist/components/ui/tabs.cjs.map +1 -1
- package/dist/components/ui/tabs.js +9 -9
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.cjs +1 -1
- package/dist/components/ui/textarea.cjs.map +1 -1
- package/dist/components/ui/textarea.js +6 -6
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle.cjs +1 -1
- package/dist/components/ui/toggle.cjs.map +1 -1
- package/dist/components/ui/toggle.js +13 -13
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\"\n\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn(\"grid w-full gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["\"use client\"\n\nimport { RadioGroup as RadioGroupPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot=\"radio-group\"\n className={cn(\"grid w-full gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot=\"radio-group-item\"\n className={cn(\n \"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"flex size-4 items-center justify-center\"\n >\n <span className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"names":["RadioGroup","className","props","jsx","RadioGroupPrimitive","cn","RadioGroupItem"],"mappings":";;;AAOA,SAASA,EAAW;AAAA,EAClB,WAAAC;AAAA,EACA,GAAGC;AACL,GAA0D;AACxD,SACE,gBAAAC;AAAA,IAACC,EAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,qBAAqBJ,CAAS;AAAA,MAC3C,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASI,EAAe;AAAA,EACtB,WAAAL;AAAA,EACA,GAAGC;AACL,GAA0D;AACxD,SACE,gBAAAC;AAAA,IAACC,EAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAoB;AAAA,QAApB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,UAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,wGAAA,CAAwG;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1H;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("radix-ui"),t=require("../../lib/utils.cjs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),l=require("radix-ui"),t=require("../../lib/utils.cjs");function s({className:e,children:a,...o}){return r.jsxs(l.ScrollArea.Root,{"data-slot":"scroll-area",className:t.cn("relative",e),...o,children:[r.jsx(l.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:shadow-focus focus-visible:outline-1",children:a}),r.jsx(c,{}),r.jsx(l.ScrollArea.Corner,{})]})}function c({className:e,orientation:a="vertical",...o}){return r.jsx(l.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:t.cn("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...o,children:r.jsx(l.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}exports.ScrollArea=s;exports.ScrollBar=c;
|
|
2
2
|
//# sourceMappingURL=scroll-area.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.cjs","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:
|
|
1
|
+
{"version":3,"file":"scroll-area.cjs","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:shadow-focus focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"names":["ScrollArea","className","children","props","jsxs","ScrollAreaPrimitive","cn","jsx","ScrollBar","orientation"],"mappings":"4KAOA,SAASA,EAAW,CAClB,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EAA0D,CACxD,OACEC,EAAAA,KAACC,EAAAA,WAAoB,KAApB,CACC,YAAU,cACV,UAAWC,EAAAA,GAAG,WAAYL,CAAS,EAClC,GAAGE,EAEJ,SAAA,CAAAI,EAAAA,IAACF,EAAAA,WAAoB,SAApB,CACC,YAAU,uBACV,UAAU,4HAET,SAAAH,CAAA,CAAA,QAEFM,EAAA,EAAU,EACXD,MAACF,EAAAA,WAAoB,OAApB,CAAA,CAA2B,CAAA,CAAA,CAAA,CAGlC,CAEA,SAASG,EAAU,CACjB,UAAAP,EACA,YAAAQ,EAAc,WACd,GAAGN,CACL,EAAyE,CACvE,OACEI,EAAAA,IAACF,EAAAA,WAAoB,oBAApB,CACC,YAAU,wBACV,mBAAkBI,EAClB,YAAAA,EACA,UAAWH,EAAAA,GACT,qQACAL,CAAA,EAED,GAAGE,EAEJ,SAAAI,EAAAA,IAACF,EAAAA,WAAoB,gBAApB,CACC,YAAU,oBACV,UAAU,wCAAA,CAAA,CACZ,CAAA,CAGN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { ScrollArea as a } from "radix-ui";
|
|
3
3
|
import { cn as e } from "../../lib/utils.js";
|
|
4
4
|
function u({
|
|
@@ -6,7 +6,7 @@ function u({
|
|
|
6
6
|
children: l,
|
|
7
7
|
...t
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ s(
|
|
10
10
|
a.Root,
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "scroll-area",
|
|
@@ -17,17 +17,17 @@ function u({
|
|
|
17
17
|
a.Viewport,
|
|
18
18
|
{
|
|
19
19
|
"data-slot": "scroll-area-viewport",
|
|
20
|
-
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:
|
|
20
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:shadow-focus focus-visible:outline-1",
|
|
21
21
|
children: l
|
|
22
22
|
}
|
|
23
23
|
),
|
|
24
|
-
/* @__PURE__ */ r(
|
|
24
|
+
/* @__PURE__ */ r(c, {}),
|
|
25
25
|
/* @__PURE__ */ r(a.Corner, {})
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function c({
|
|
31
31
|
className: o,
|
|
32
32
|
orientation: l = "vertical",
|
|
33
33
|
...t
|
|
@@ -55,6 +55,6 @@ function n({
|
|
|
55
55
|
}
|
|
56
56
|
export {
|
|
57
57
|
u as ScrollArea,
|
|
58
|
-
|
|
58
|
+
c as ScrollBar
|
|
59
59
|
};
|
|
60
60
|
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:
|
|
1
|
+
{"version":3,"file":"scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["\"use client\"\n\nimport { ScrollArea as ScrollAreaPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:shadow-focus focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>) {\n return (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n \"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent\",\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"],"names":["ScrollArea","className","children","props","jsxs","ScrollAreaPrimitive","cn","jsx","ScrollBar","orientation"],"mappings":";;;AAOA,SAASA,EAAW;AAAA,EAClB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GAA0D;AACxD,SACE,gBAAAC;AAAA,IAACC,EAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,YAAYL,CAAS;AAAA,MAClC,GAAGE;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAACF,EAAoB;AAAA,UAApB;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET,UAAAH;AAAA,UAAA;AAAA,QAAA;AAAA,0BAEFM,GAAA,EAAU;AAAA,QACX,gBAAAD,EAACF,EAAoB,QAApB,CAAA,CAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGlC;AAEA,SAASG,EAAU;AAAA,EACjB,WAAAP;AAAA,EACA,aAAAQ,IAAc;AAAA,EACd,GAAGN;AACL,GAAyE;AACvE,SACE,gBAAAI;AAAA,IAACF,EAAoB;AAAA,IAApB;AAAA,MACC,aAAU;AAAA,MACV,oBAAkBI;AAAA,MAClB,aAAAA;AAAA,MACA,WAAWH;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACF,EAAoB;AAAA,QAApB;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("lucide-react"),n=require("radix-ui"),o=require("../../lib/utils.cjs");function u({...t}){return e.jsx(n.Select.Root,{"data-slot":"select",...t})}function p({className:t,...a}){return e.jsx(n.Select.Group,{"data-slot":"select-group",className:o.cn("scroll-my-1 p-1",t),...a})}function g({...t}){return e.jsx(n.Select.Value,{"data-slot":"select-value",...t})}function m({className:t,size:a="default",children:s,...l}){return e.jsxs(n.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:o.cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l,children:[s,e.jsx(n.Select.Icon,{asChild:!0,children:e.jsx(r.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function f({className:t,children:a,position:s="item-aligned",align:l="center",...d}){return e.jsx(n.Select.Portal,{children:e.jsxs(n.Select.Content,{"data-slot":"select-content","data-align-trigger":s==="item-aligned",className:o.cn("relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",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",t),position:s,align:l,...d,children:[e.jsx(c,{}),e.jsx(n.Select.Viewport,{"data-position":s,className:o.cn("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",s==="popper"&&""),children:a}),e.jsx(i,{})]})})}function x({className:t,...a}){return e.jsx(n.Select.Label,{"data-slot":"select-label",className:o.cn("px-1.5 py-1 text-xs text-muted-foreground",t),...a})}function S({className:t,children:a,...s}){return e.jsxs(n.Select.Item,{"data-slot":"select-item",className:o.cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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",t),...s,children:[e.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:e.jsx(n.Select.ItemIndicator,{children:e.jsx(r.CheckIcon,{className:"pointer-events-none"})})}),e.jsx(n.Select.ItemText,{children:a})]})}function v({className:t,...a}){return e.jsx(n.Select.Separator,{"data-slot":"select-separator",className:o.cn("pointer-events-none -mx-1 my-1 h-px bg-border",t),...a})}function c({className:t,...a}){return e.jsx(n.Select.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:o.cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e.jsx(r.ChevronUpIcon,{})})}function i({className:t,...a}){return e.jsx(n.Select.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:o.cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e.jsx(r.ChevronDownIcon,{})})}exports.Select=u;exports.SelectContent=f;exports.SelectGroup=p;exports.SelectItem=S;exports.SelectLabel=x;exports.SelectScrollDownButton=i;exports.SelectScrollUpButton=c;exports.SelectSeparator=v;exports.SelectTrigger=m;exports.SelectValue=g;
|
|
2
2
|
//# sourceMappingURL=select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.cjs","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: 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 \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:
|
|
1
|
+
{"version":3,"file":"select.cjs","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: 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 \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 [&_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=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\"relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", position ===\"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\", className )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\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(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownButton>\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","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":"sMASA,SAASA,EAAO,CACd,GAAGC,CACL,EAAsD,CACpD,aAAQC,EAAAA,OAAgB,KAAhB,CAAqB,YAAU,SAAU,GAAGD,EAAO,CAC7D,CAEA,SAASE,EAAY,CACnB,UAAAC,EACA,GAAGH,CACL,EAAuD,CACrD,OACEI,EAAAA,IAACH,EAAAA,OAAgB,MAAhB,CACC,YAAU,eACV,UAAWI,EAAAA,GAAG,kBAAmBF,CAAS,EACzC,GAAGH,CAAA,CAAA,CAGV,CAEA,SAASM,EAAY,CACnB,GAAGN,CACL,EAAuD,CACrD,aAAQC,EAAAA,OAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASO,EAAc,CACrB,UAAAJ,EACA,KAAAK,EAAO,UACP,SAAAC,EACA,GAAGT,CACL,EAEG,CACD,OACEU,EAAA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A,CAAAI,EAAAA,IAAC,OAAA,CAAK,UAAU,+EACd,SAAAA,EAAAA,IAACH,SAAgB,cAAhB,CACC,SAAAG,EAAAA,IAACe,YAAA,CAAU,UAAU,qBAAA,CAAsB,CAAA,CAC7C,EACF,EACAf,EAAAA,IAACH,EAAAA,OAAgB,SAAhB,CAA0B,SAAAQ,CAAA,CAAS,CAAA,CAAA,CAAA,CAG1C,CAEA,SAASW,EAAgB,CACvB,UAAAjB,EACA,GAAGH,CACL,EAA2D,CACzD,OACEI,EAAAA,IAACH,EAAAA,OAAgB,UAAhB,CACC,YAAU,mBACV,UAAWI,EAAAA,GAAG,gDAAiDF,CAAS,EACvE,GAAGH,CAAA,CAAA,CAGV,CAEA,SAASe,EAAqB,CAC5B,UAAAZ,EACA,GAAGH,CACL,EAAgE,CAC9D,OACEI,EAAAA,IAACH,EAAAA,OAAgB,eAAhB,CACC,YAAU,0BACV,UAAWI,EAAAA,GACT,4GACAF,CAAA,EAED,GAAGH,EAEJ,SAAAI,EAAAA,IAACiB,EAAAA,cAAA,CAAA,CAAA,CACD,CAAA,CAGN,CAEA,SAASL,EAAuB,CAC9B,UAAAb,EACA,GAAGH,CACL,EAAkE,CAChE,OACEI,EAAAA,IAACH,EAAAA,OAAgB,iBAAhB,CACC,YAAU,4BACV,UAAWI,EAAAA,GACT,4GACAF,CAAA,EAED,GAAGH,EAEJ,SAAAI,EAAAA,IAACO,EAAAA,gBAAA,CAAA,CAAA,CACD,CAAA,CAGN"}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { CheckIcon as c, ChevronDownIcon as
|
|
3
|
-
import { Select as
|
|
4
|
-
import { cn as
|
|
1
|
+
import { jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { CheckIcon as c, ChevronDownIcon as i, ChevronUpIcon as u } from "lucide-react";
|
|
3
|
+
import { Select as o } from "radix-ui";
|
|
4
|
+
import { cn as n } from "../../lib/utils.js";
|
|
5
5
|
function x({
|
|
6
6
|
...e
|
|
7
7
|
}) {
|
|
8
|
-
return /* @__PURE__ */ t(
|
|
8
|
+
return /* @__PURE__ */ t(o.Root, { "data-slot": "select", ...e });
|
|
9
9
|
}
|
|
10
10
|
function b({
|
|
11
11
|
className: e,
|
|
12
12
|
...a
|
|
13
13
|
}) {
|
|
14
14
|
return /* @__PURE__ */ t(
|
|
15
|
-
|
|
15
|
+
o.Group,
|
|
16
16
|
{
|
|
17
17
|
"data-slot": "select-group",
|
|
18
|
-
className:
|
|
18
|
+
className: n("scroll-my-1 p-1", e),
|
|
19
19
|
...a
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function w({
|
|
24
24
|
...e
|
|
25
25
|
}) {
|
|
26
|
-
return /* @__PURE__ */ t(
|
|
26
|
+
return /* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...e });
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function z({
|
|
29
29
|
className: e,
|
|
30
30
|
size: a = "default",
|
|
31
|
-
children:
|
|
31
|
+
children: r,
|
|
32
32
|
...s
|
|
33
33
|
}) {
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
34
|
+
return /* @__PURE__ */ l(
|
|
35
|
+
o.Trigger,
|
|
36
36
|
{
|
|
37
37
|
"data-slot": "select-trigger",
|
|
38
38
|
"data-size": a,
|
|
39
|
-
className:
|
|
40
|
-
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:
|
|
39
|
+
className: n(
|
|
40
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
41
41
|
e
|
|
42
42
|
),
|
|
43
43
|
...s,
|
|
44
44
|
children: [
|
|
45
|
-
|
|
46
|
-
/* @__PURE__ */ t(
|
|
45
|
+
r,
|
|
46
|
+
/* @__PURE__ */ t(o.Icon, { asChild: !0, children: /* @__PURE__ */ t(i, { className: "pointer-events-none size-4 text-muted-foreground" }) })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
);
|
|
@@ -51,33 +51,33 @@ function w({
|
|
|
51
51
|
function S({
|
|
52
52
|
className: e,
|
|
53
53
|
children: a,
|
|
54
|
-
position:
|
|
54
|
+
position: r = "item-aligned",
|
|
55
55
|
align: s = "center",
|
|
56
56
|
...d
|
|
57
57
|
}) {
|
|
58
|
-
return /* @__PURE__ */ t(
|
|
59
|
-
|
|
58
|
+
return /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ l(
|
|
59
|
+
o.Content,
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "select-content",
|
|
62
|
-
"data-align-trigger":
|
|
63
|
-
className:
|
|
64
|
-
position:
|
|
62
|
+
"data-align-trigger": r === "item-aligned",
|
|
63
|
+
className: n("relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", 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),
|
|
64
|
+
position: r,
|
|
65
65
|
align: s,
|
|
66
66
|
...d,
|
|
67
67
|
children: [
|
|
68
68
|
/* @__PURE__ */ t(p, {}),
|
|
69
69
|
/* @__PURE__ */ t(
|
|
70
|
-
|
|
70
|
+
o.Viewport,
|
|
71
71
|
{
|
|
72
|
-
"data-position":
|
|
73
|
-
className:
|
|
72
|
+
"data-position": r,
|
|
73
|
+
className: n(
|
|
74
74
|
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
75
|
-
|
|
75
|
+
r === "popper" && ""
|
|
76
76
|
),
|
|
77
77
|
children: a
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */ t(
|
|
80
|
+
/* @__PURE__ */ t(m, {})
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
) });
|
|
@@ -87,10 +87,10 @@ function y({
|
|
|
87
87
|
...a
|
|
88
88
|
}) {
|
|
89
89
|
return /* @__PURE__ */ t(
|
|
90
|
-
|
|
90
|
+
o.Label,
|
|
91
91
|
{
|
|
92
92
|
"data-slot": "select-label",
|
|
93
|
-
className:
|
|
93
|
+
className: n("px-1.5 py-1 text-xs text-muted-foreground", e),
|
|
94
94
|
...a
|
|
95
95
|
}
|
|
96
96
|
);
|
|
@@ -98,20 +98,20 @@ function y({
|
|
|
98
98
|
function N({
|
|
99
99
|
className: e,
|
|
100
100
|
children: a,
|
|
101
|
-
...
|
|
101
|
+
...r
|
|
102
102
|
}) {
|
|
103
|
-
return /* @__PURE__ */
|
|
104
|
-
|
|
103
|
+
return /* @__PURE__ */ l(
|
|
104
|
+
o.Item,
|
|
105
105
|
{
|
|
106
106
|
"data-slot": "select-item",
|
|
107
|
-
className:
|
|
107
|
+
className: n(
|
|
108
108
|
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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",
|
|
109
109
|
e
|
|
110
110
|
),
|
|
111
|
-
...
|
|
111
|
+
...r,
|
|
112
112
|
children: [
|
|
113
|
-
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(
|
|
114
|
-
/* @__PURE__ */ t(
|
|
113
|
+
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(c, { className: "pointer-events-none" }) }) }),
|
|
114
|
+
/* @__PURE__ */ t(o.ItemText, { children: a })
|
|
115
115
|
]
|
|
116
116
|
}
|
|
117
117
|
);
|
|
@@ -121,10 +121,10 @@ function I({
|
|
|
121
121
|
...a
|
|
122
122
|
}) {
|
|
123
123
|
return /* @__PURE__ */ t(
|
|
124
|
-
|
|
124
|
+
o.Separator,
|
|
125
125
|
{
|
|
126
126
|
"data-slot": "select-separator",
|
|
127
|
-
className:
|
|
127
|
+
className: n("pointer-events-none -mx-1 my-1 h-px bg-border", e),
|
|
128
128
|
...a
|
|
129
129
|
}
|
|
130
130
|
);
|
|
@@ -134,10 +134,10 @@ function p({
|
|
|
134
134
|
...a
|
|
135
135
|
}) {
|
|
136
136
|
return /* @__PURE__ */ t(
|
|
137
|
-
|
|
137
|
+
o.ScrollUpButton,
|
|
138
138
|
{
|
|
139
139
|
"data-slot": "select-scroll-up-button",
|
|
140
|
-
className:
|
|
140
|
+
className: n(
|
|
141
141
|
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
142
142
|
e
|
|
143
143
|
),
|
|
@@ -149,21 +149,21 @@ function p({
|
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function m({
|
|
153
153
|
className: e,
|
|
154
154
|
...a
|
|
155
155
|
}) {
|
|
156
156
|
return /* @__PURE__ */ t(
|
|
157
|
-
|
|
157
|
+
o.ScrollDownButton,
|
|
158
158
|
{
|
|
159
159
|
"data-slot": "select-scroll-down-button",
|
|
160
|
-
className:
|
|
160
|
+
className: n(
|
|
161
161
|
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
162
162
|
e
|
|
163
163
|
),
|
|
164
164
|
...a,
|
|
165
165
|
children: /* @__PURE__ */ t(
|
|
166
|
-
|
|
166
|
+
i,
|
|
167
167
|
{}
|
|
168
168
|
)
|
|
169
169
|
}
|
|
@@ -175,10 +175,10 @@ export {
|
|
|
175
175
|
b as SelectGroup,
|
|
176
176
|
N as SelectItem,
|
|
177
177
|
y as SelectLabel,
|
|
178
|
-
|
|
178
|
+
m as SelectScrollDownButton,
|
|
179
179
|
p as SelectScrollUpButton,
|
|
180
180
|
I as SelectSeparator,
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
z as SelectTrigger,
|
|
182
|
+
w as SelectValue
|
|
183
183
|
};
|
|
184
184
|
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: 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 \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 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 className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\"relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", position ===\"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\", className )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\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(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownButton>\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","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","Sel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,WAAAjB;AAAA,EACA,GAAGH;AACL,GAA2D;AACzD,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI,EAAG,iDAAiDF,CAAS;AAAA,MACvE,GAAGH;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASe,EAAqB;AAAA,EAC5B,WAAAZ;AAAA,EACA,GAAGH;AACL,GAAgE;AAC9D,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACiB;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;AAEA,SAASL,EAAuB;AAAA,EAC9B,WAAAb;AAAA,EACA,GAAGH;AACL,GAAkE;AAChE,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACO;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\"\n\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\"\nimport { Select as SelectPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectValue({\n ...props\n}: 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 \"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-card pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:shadow-focus disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:shadow-focus data-placeholder:text-muted-foreground data-[size=default]:h-10 data-[size=sm]:h-8 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 [&_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=\"pointer-events-none size-4 text-muted-foreground\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n}\n\nfunction SelectContent({\n className,\n children,\n position = \"item-aligned\",\n align = \"center\",\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n data-align-trigger={position === \"item-aligned\"}\n className={cn(\"relative z-50 max-h-(--radix-select-content-available-height) p-1 min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", position ===\"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\", className )}\n position={position}\n align={align}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n data-position={position}\n className={cn(\n \"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)\",\n position === \"popper\" && \"\"\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn(\"px-1.5 py-1 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground 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=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"pointer-events-none\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"pointer-events-none -mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronUpIcon\n />\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(\n \"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <ChevronDownIcon\n />\n </SelectPrimitive.ScrollDownButton>\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","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AASA,SAASA,EAAO;AAAA,EACd,GAAGC;AACL,GAAsD;AACpD,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACn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;AAGV;AAEA,SAASe,EAAqB;AAAA,EAC5B,WAAAZ;AAAA,EACA,GAAGH;AACL,GAAgE;AAC9D,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACiB;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;AAEA,SAASL,EAAuB;AAAA,EAC9B,WAAAb;AAAA,EACA,GAAGH;AACL,GAAkE;AAChE,SACE,gBAAAI;AAAA,IAACH,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWI;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGH;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAACO;AAAA,QAAA,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,EAAA;AAGN;"}
|
|
@@ -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 l=require("react/jsx-runtime"),o=require("radix-ui"),d=require("react"),u=require("../../lib/utils.cjs");function f(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,a.get?a:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const b=f(d);function h({className:r,defaultValue:t,value:e,min:a=0,max:i=100,...s}){const n=b.useMemo(()=>Array.isArray(e)?e:Array.isArray(t)?t:[a,i],[e,t,a,i]);return l.jsxs(o.Slider.Root,{"data-slot":"slider",defaultValue:t,value:e,min:a,max:i,className:u.cn("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",r),...s,children:[l.jsx(o.Slider.Track,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",children:l.jsx(o.Slider.Range,{"data-slot":"slider-range",className:"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"})}),Array.from({length:n.length},(g,c)=>l.jsx(o.Slider.Thumb,{"data-slot":"slider-thumb",className:"relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:shadow-focus focus-visible:shadow-focus focus-visible:outline-hidden active:shadow-focus disabled:pointer-events-none disabled:opacity-50"},c))]})}exports.Slider=h;
|
|
2
2
|
//# sourceMappingURL=slider.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.cjs","sources":["../../../src/components/ui/slider.tsx"],"sourcesContent":["import { Slider as SliderPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className=\"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"relative block size-3 shrink-0 rounded-full border border-ring bg-white
|
|
1
|
+
{"version":3,"file":"slider.cjs","sources":["../../../src/components/ui/slider.tsx"],"sourcesContent":["import { Slider as SliderPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className=\"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:shadow-focus focus-visible:shadow-focus focus-visible:outline-hidden active:shadow-focus disabled:pointer-events-none disabled:opacity-50\"\n />\n ))}\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"],"names":["Slider","className","defaultValue","value","min","max","props","_values","React","jsxs","SliderPrimitive","cn","jsx","_","index"],"mappings":"ydAKA,SAASA,EAAO,CACd,UAAAC,EACA,aAAAC,EACA,MAAAC,EACA,IAAAC,EAAM,EACN,IAAAC,EAAM,IACN,GAAGC,CACL,EAAsD,CACpD,MAAMC,EAAUC,EAAM,QACpB,IACE,MAAM,QAAQL,CAAK,EACfA,EACA,MAAM,QAAQD,CAAY,EACxBA,EACA,CAACE,EAAKC,CAAG,EACjB,CAACF,EAAOD,EAAcE,EAAKC,CAAG,CAAA,EAGhC,OACEI,EAAAA,KAACC,EAAAA,OAAgB,KAAhB,CACC,YAAU,SACV,aAAAR,EACA,MAAAC,EACA,IAAAC,EACA,IAAAC,EACA,UAAWM,EAAAA,GACT,4KACAV,CAAA,EAED,GAAGK,EAEJ,SAAA,CAAAM,EAAAA,IAACF,EAAAA,OAAgB,MAAhB,CACC,YAAU,eACV,UAAU,wIAEV,SAAAE,EAAAA,IAACF,EAAAA,OAAgB,MAAhB,CACC,YAAU,eACV,UAAU,6EAAA,CAAA,CACZ,CAAA,EAED,MAAM,KAAK,CAAE,OAAQH,EAAQ,QAAU,CAACM,EAAGC,IAC1CF,EAAAA,IAACF,EAAAA,OAAgB,MAAhB,CACC,YAAU,eAEV,UAAU,iSAAA,EADLI,CAAA,CAGR,CAAA,CAAA,CAAA,CAGP"}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsxs as c, jsx as
|
|
2
|
-
import { Slider as
|
|
1
|
+
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { Slider as r } from "radix-ui";
|
|
3
3
|
import * as h from "react";
|
|
4
4
|
import { cn as f } from "../../lib/utils.js";
|
|
5
|
-
function
|
|
6
|
-
className:
|
|
7
|
-
defaultValue:
|
|
5
|
+
function w({
|
|
6
|
+
className: i,
|
|
7
|
+
defaultValue: a,
|
|
8
8
|
value: e,
|
|
9
9
|
min: t = 0,
|
|
10
|
-
max:
|
|
10
|
+
max: o = 100,
|
|
11
11
|
...s
|
|
12
12
|
}) {
|
|
13
|
-
const
|
|
14
|
-
() => Array.isArray(e) ? e : Array.isArray(
|
|
15
|
-
[e,
|
|
13
|
+
const d = h.useMemo(
|
|
14
|
+
() => Array.isArray(e) ? e : Array.isArray(a) ? a : [t, o],
|
|
15
|
+
[e, a, t, o]
|
|
16
16
|
);
|
|
17
17
|
return /* @__PURE__ */ c(
|
|
18
|
-
|
|
18
|
+
r.Root,
|
|
19
19
|
{
|
|
20
20
|
"data-slot": "slider",
|
|
21
|
-
defaultValue:
|
|
21
|
+
defaultValue: a,
|
|
22
22
|
value: e,
|
|
23
23
|
min: t,
|
|
24
|
-
max:
|
|
24
|
+
max: o,
|
|
25
25
|
className: f(
|
|
26
26
|
"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",
|
|
27
|
-
|
|
27
|
+
i
|
|
28
28
|
),
|
|
29
29
|
...s,
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
31
|
+
/* @__PURE__ */ l(
|
|
32
|
+
r.Track,
|
|
33
33
|
{
|
|
34
34
|
"data-slot": "slider-track",
|
|
35
35
|
className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
36
|
-
children: /* @__PURE__ */
|
|
37
|
-
|
|
36
|
+
children: /* @__PURE__ */ l(
|
|
37
|
+
r.Range,
|
|
38
38
|
{
|
|
39
39
|
"data-slot": "slider-range",
|
|
40
40
|
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
@@ -42,19 +42,19 @@ function v({
|
|
|
42
42
|
)
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
Array.from({ length:
|
|
46
|
-
|
|
45
|
+
Array.from({ length: d.length }, (u, n) => /* @__PURE__ */ l(
|
|
46
|
+
r.Thumb,
|
|
47
47
|
{
|
|
48
48
|
"data-slot": "slider-thumb",
|
|
49
|
-
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white
|
|
49
|
+
className: "relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:shadow-focus focus-visible:shadow-focus focus-visible:outline-hidden active:shadow-focus disabled:pointer-events-none disabled:opacity-50"
|
|
50
50
|
},
|
|
51
|
-
|
|
51
|
+
n
|
|
52
52
|
))
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
w as Slider
|
|
59
59
|
};
|
|
60
60
|
//# sourceMappingURL=slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sources":["../../../src/components/ui/slider.tsx"],"sourcesContent":["import { Slider as SliderPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className=\"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"relative block size-3 shrink-0 rounded-full border border-ring bg-white
|
|
1
|
+
{"version":3,"file":"slider.js","sources":["../../../src/components/ui/slider.tsx"],"sourcesContent":["import { Slider as SliderPrimitive } from \"radix-ui\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Slider({\n className,\n defaultValue,\n value,\n min = 0,\n max = 100,\n ...props\n}: React.ComponentProps<typeof SliderPrimitive.Root>) {\n const _values = React.useMemo(\n () =>\n Array.isArray(value)\n ? value\n : Array.isArray(defaultValue)\n ? defaultValue\n : [min, max],\n [value, defaultValue, min, max]\n )\n\n return (\n <SliderPrimitive.Root\n data-slot=\"slider\"\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n className={cn(\n \"relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col\",\n className\n )}\n {...props}\n >\n <SliderPrimitive.Track\n data-slot=\"slider-track\"\n className=\"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1\"\n >\n <SliderPrimitive.Range\n data-slot=\"slider-range\"\n className=\"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full\"\n />\n </SliderPrimitive.Track>\n {Array.from({ length: _values.length }, (_, index) => (\n <SliderPrimitive.Thumb\n data-slot=\"slider-thumb\"\n key={index}\n className=\"relative block size-3 shrink-0 rounded-full border border-ring bg-white transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:shadow-focus focus-visible:shadow-focus focus-visible:outline-hidden active:shadow-focus disabled:pointer-events-none disabled:opacity-50\"\n />\n ))}\n </SliderPrimitive.Root>\n )\n}\n\nexport { Slider }\n"],"names":["Slider","className","defaultValue","value","min","max","props","_values","React","jsxs","SliderPrimitive","cn","jsx","_","index"],"mappings":";;;;AAKA,SAASA,EAAO;AAAA,EACd,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,KAAAC,IAAM;AAAA,EACN,GAAGC;AACL,GAAsD;AACpD,QAAMC,IAAUC,EAAM;AAAA,IACpB,MACE,MAAM,QAAQL,CAAK,IACfA,IACA,MAAM,QAAQD,CAAY,IACxBA,IACA,CAACE,GAAKC,CAAG;AAAA,IACjB,CAACF,GAAOD,GAAcE,GAAKC,CAAG;AAAA,EAAA;AAGhC,SACE,gBAAAI;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,cAAAR;AAAA,MACA,OAAAC;AAAA,MACA,KAAAC;AAAA,MACA,KAAAC;AAAA,MACA,WAAWM;AAAA,QACT;AAAA,QACAV;AAAA,MAAA;AAAA,MAED,GAAGK;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAM;AAAA,UAACF,EAAgB;AAAA,UAAhB;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAEV,UAAA,gBAAAE;AAAA,cAACF,EAAgB;AAAA,cAAhB;AAAA,gBACC,aAAU;AAAA,gBACV,WAAU;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ;AAAA,QAAA;AAAA,QAED,MAAM,KAAK,EAAE,QAAQH,EAAQ,UAAU,CAACM,GAAGC,MAC1C,gBAAAF;AAAA,UAACF,EAAgB;AAAA,UAAhB;AAAA,YACC,aAAU;AAAA,YAEV,WAAU;AAAA,UAAA;AAAA,UADLI;AAAA,QAAA,CAGR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("radix-ui"),d=require("../../lib/utils.cjs");function s({className:t,size:i="default",...r}){return a.jsx(e.Switch.Root,{"data-slot":"switch","data-size":i,className:d.cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),e=require("radix-ui"),d=require("../../lib/utils.cjs");function s({className:t,size:i="default",...r}){return a.jsx(e.Switch.Root,{"data-slot":"switch","data-size":i,className:d.cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:shadow-focus aria-invalid:border-destructive aria-invalid:shadow-focus data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",t),...r,children:a.jsx(e.Switch.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}exports.Switch=s;
|
|
2
2
|
//# sourceMappingURL=switch.cjs.map
|