@cryptlex/web-components 1.4.1 → 1.6.0
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/README.md +4 -13
- package/dist/components/data-table/column-picker.es.js +3 -4
- package/dist/components/data-table/column-picker.es.js.map +1 -1
- package/dist/components/data-table/data-table.es.js +79 -80
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/page-size.es.js +5 -5
- package/dist/components/data-table/page-size.es.js.map +1 -1
- package/dist/components/data-table/paginator.es.js +25 -31
- package/dist/components/data-table/paginator.es.js.map +1 -1
- package/dist/components/data-table/table-actions.es.js +26 -27
- package/dist/components/data-table/table-actions.es.js.map +1 -1
- package/dist/components/data-table/table-content.es.js +37 -31
- package/dist/components/data-table/table-content.es.js.map +1 -1
- package/dist/components/data-table/table-filter.es.js +42 -45
- package/dist/components/data-table/table-filter.es.js.map +1 -1
- package/dist/components/key-value-card/key-value-card.es.js +17 -14
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -1
- package/dist/components/sidebar/app-layout.es.js +11 -15
- package/dist/components/sidebar/app-layout.es.js.map +1 -1
- package/dist/components/sidebar/breadcrumb.es.js +2 -3
- package/dist/components/sidebar/breadcrumb.es.js.map +1 -1
- package/dist/components/sidebar/nav-main.es.js +18 -18
- package/dist/components/sidebar/nav-main.es.js.map +1 -1
- package/dist/components/static-data-table/data-table.es.js +14 -14
- package/dist/components/static-data-table/data-table.es.js.map +1 -1
- package/dist/components/ui/accordion.es.js +9 -9
- package/dist/components/ui/accordion.es.js.map +1 -1
- package/dist/components/ui/avatar.es.js +16 -16
- package/dist/components/ui/avatar.es.js.map +1 -1
- package/dist/components/ui/badge.es.js +5 -24
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/breadcrumb.es.js +10 -10
- package/dist/components/ui/breadcrumb.es.js.map +1 -1
- package/dist/components/ui/button.es.js +17 -17
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/calendar.es.js +8 -8
- package/dist/components/ui/calendar.es.js.map +1 -1
- package/dist/components/ui/card.es.js +21 -21
- package/dist/components/ui/card.es.js.map +1 -1
- package/dist/components/ui/chart.es.js +76 -102
- package/dist/components/ui/chart.es.js.map +1 -1
- package/dist/components/ui/checkbox.es.js +13 -19
- package/dist/components/ui/checkbox.es.js.map +1 -1
- package/dist/components/ui/command.es.js +4 -4
- package/dist/components/ui/command.es.js.map +1 -1
- package/dist/components/ui/copy-button.es.js +20 -34
- package/dist/components/ui/copy-button.es.js.map +1 -1
- package/dist/components/ui/dialog.es.js +32 -32
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +2 -2
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +74 -82
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/input-otp.es.js +17 -17
- package/dist/components/ui/input-otp.es.js.map +1 -1
- package/dist/components/ui/input.es.js +7 -7
- package/dist/components/ui/input.es.js.map +1 -1
- package/dist/components/ui/link-button.es.js +6 -6
- package/dist/components/ui/link-button.es.js.map +1 -1
- package/dist/components/ui/mutli-select.es.js +52 -52
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +34 -34
- package/dist/components/ui/navigation-menu.es.js.map +1 -1
- package/dist/components/ui/pagination.es.js +38 -38
- package/dist/components/ui/pagination.es.js.map +1 -1
- package/dist/components/ui/password-input.es.js +13 -13
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/radio-group.es.js +11 -11
- package/dist/components/ui/radio-group.es.js.map +1 -1
- package/dist/components/ui/search-input.es.js +11 -11
- package/dist/components/ui/search-input.es.js.map +1 -1
- package/dist/components/ui/select.es.js +31 -49
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +17 -17
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +2 -3
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/table-page-layout.es.js +2 -2
- package/dist/components/ui/table-page-layout.es.js.map +1 -1
- package/dist/components/ui/table.es.js +33 -33
- package/dist/components/ui/table.es.js.map +1 -1
- package/dist/components/ui/tabs.es.js +2 -2
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/components/ui/tooltip.es.js +8 -8
- package/dist/components/ui/tooltip.es.js.map +1 -1
- package/dist/index.es.d.ts +20 -48
- package/dist/index.es.js +253 -257
- package/dist/utils/index.es.js.map +1 -1
- package/lib/index.css +25 -6
- package/lib/tailwind.preset.css +59 -45
- package/lib/tokens.css +0 -9
- package/package.json +1 -1
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { DotsHorizontalIcon as c, ChevronRightIcon as m, ChevronLeftIcon as p } from "@radix-ui/react-icons";
|
|
2
3
|
import * as l from "react";
|
|
3
|
-
import { ChevronLeftIcon as c, ChevronRightIcon as m, DotsHorizontalIcon as p } from "@radix-ui/react-icons";
|
|
4
|
-
import { cn as e } from "../../utils/index.es.js";
|
|
5
4
|
import { buttonVariants as g } from "./button.es.js";
|
|
6
|
-
|
|
5
|
+
import { cn as n } from "../../utils/index.es.js";
|
|
6
|
+
const d = ({ className: i, ...a }) => /* @__PURE__ */ e(
|
|
7
7
|
"nav",
|
|
8
8
|
{
|
|
9
9
|
role: "navigation",
|
|
10
10
|
"aria-label": "pagination",
|
|
11
|
-
className:
|
|
11
|
+
className: n("mx-auto flex w-full justify-center", i),
|
|
12
12
|
...a
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
|
-
|
|
16
|
-
const
|
|
15
|
+
d.displayName = "Pagination";
|
|
16
|
+
const N = l.forwardRef(({ className: i, ...a }, o) => /* @__PURE__ */ e(
|
|
17
17
|
"ul",
|
|
18
18
|
{
|
|
19
19
|
ref: o,
|
|
20
|
-
className:
|
|
20
|
+
className: n("flex flex-row items-center gap-1", i),
|
|
21
21
|
...a
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
|
-
|
|
25
|
-
const f = l.forwardRef(({ className: i, ...a }, o) => /* @__PURE__ */
|
|
24
|
+
N.displayName = "PaginationContent";
|
|
25
|
+
const f = l.forwardRef(({ className: i, ...a }, o) => /* @__PURE__ */ e("li", { ref: o, className: n("", i), ...a }));
|
|
26
26
|
f.displayName = "PaginationItem";
|
|
27
|
-
const
|
|
27
|
+
const t = ({
|
|
28
28
|
className: i,
|
|
29
29
|
isActive: a,
|
|
30
|
-
size: o = "
|
|
30
|
+
size: o = "default",
|
|
31
31
|
...r
|
|
32
|
-
}) => /* @__PURE__ */
|
|
32
|
+
}) => /* @__PURE__ */ e(
|
|
33
33
|
"a",
|
|
34
34
|
{
|
|
35
35
|
"aria-current": a ? "page" : void 0,
|
|
36
|
-
className:
|
|
36
|
+
className: n(
|
|
37
37
|
g({
|
|
38
38
|
variant: a ? "outline" : "ghost",
|
|
39
39
|
size: o
|
|
@@ -43,64 +43,64 @@ const s = ({
|
|
|
43
43
|
...r
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
|
|
46
|
+
t.displayName = "PaginationLink";
|
|
47
47
|
const P = ({
|
|
48
48
|
className: i,
|
|
49
49
|
...a
|
|
50
|
-
}) => /* @__PURE__ */
|
|
51
|
-
|
|
50
|
+
}) => /* @__PURE__ */ s(
|
|
51
|
+
t,
|
|
52
52
|
{
|
|
53
53
|
"aria-label": "Go to previous page",
|
|
54
54
|
size: "default",
|
|
55
|
-
className:
|
|
55
|
+
className: n("gap-1 pl-2.5", i),
|
|
56
56
|
...a,
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ e(p, { className: "size-icon" }),
|
|
59
|
+
/* @__PURE__ */ e("span", { children: "Previous" })
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
P.displayName = "PaginationPrevious";
|
|
64
|
-
const
|
|
64
|
+
const u = ({
|
|
65
65
|
className: i,
|
|
66
66
|
...a
|
|
67
|
-
}) => /* @__PURE__ */
|
|
68
|
-
|
|
67
|
+
}) => /* @__PURE__ */ s(
|
|
68
|
+
t,
|
|
69
69
|
{
|
|
70
70
|
"aria-label": "Go to next page",
|
|
71
71
|
size: "default",
|
|
72
|
-
className:
|
|
72
|
+
className: n("gap-1 pr-2.5", i),
|
|
73
73
|
...a,
|
|
74
74
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ e("span", { children: "Next" }),
|
|
76
|
+
/* @__PURE__ */ e(m, { className: "size-icon" })
|
|
77
77
|
]
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
81
|
-
const
|
|
80
|
+
u.displayName = "PaginationNext";
|
|
81
|
+
const x = ({
|
|
82
82
|
className: i,
|
|
83
83
|
...a
|
|
84
|
-
}) => /* @__PURE__ */
|
|
84
|
+
}) => /* @__PURE__ */ s(
|
|
85
85
|
"span",
|
|
86
86
|
{
|
|
87
87
|
"aria-hidden": !0,
|
|
88
|
-
className:
|
|
88
|
+
className: n("flex size-9 items-center justify-center", i),
|
|
89
89
|
...a,
|
|
90
90
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ e(c, { className: "size-icon" }),
|
|
92
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "More pages" })
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
);
|
|
96
|
-
|
|
96
|
+
x.displayName = "PaginationEllipsis";
|
|
97
97
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
d as Pagination,
|
|
99
|
+
N as PaginationContent,
|
|
100
|
+
x as PaginationEllipsis,
|
|
101
101
|
f as PaginationItem,
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
t as PaginationLink,
|
|
103
|
+
u as PaginationNext,
|
|
104
104
|
P as PaginationPrevious
|
|
105
105
|
};
|
|
106
106
|
//# sourceMappingURL=pagination.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.es.js","sources":["../../../lib/components/ui/pagination.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"pagination.es.js","sources":["../../../lib/components/ui/pagination.tsx"],"sourcesContent":["// TODO, are we using Radix or Lucide???\n// TODO, are we even using this anywhere?\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n DotsHorizontalIcon,\n} from \"@radix-ui/react-icons\"\nimport * as React from \"react\"\n\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\"\nimport { cn } from \"@/utils\"\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n)\nPagination.displayName = \"Pagination\"\n\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n))\nPaginationContent.displayName = \"PaginationContent\"\n\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn(\"\", className)} {...props} />\n))\nPaginationItem.displayName = \"PaginationItem\"\n\ntype PaginationLinkProps = {\n isActive?: boolean\n} & Pick<ButtonProps, \"size\"> &\n React.ComponentProps<\"a\">\n\nconst PaginationLink = ({\n className,\n isActive,\n size = \"default\",\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? \"page\" : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className\n )}\n {...props}\n />\n)\nPaginationLink.displayName = \"PaginationLink\"\n\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon className=\"size-icon\" />\n <span>Previous</span>\n </PaginationLink>\n)\nPaginationPrevious.displayName = \"PaginationPrevious\"\n\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 pr-2.5\", className)}\n {...props}\n >\n <span>Next</span>\n <ChevronRightIcon className=\"size-icon\" />\n </PaginationLink>\n)\nPaginationNext.displayName = \"PaginationNext\"\n\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<\"span\">) => (\n <span\n aria-hidden\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <DotsHorizontalIcon className=\"size-icon\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n)\nPaginationEllipsis.displayName = \"PaginationEllipsis\"\n\nexport {\n Pagination,\n PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious\n}\n\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"],"mappings":";;;;;AAYA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAClC,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,IAC5D,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAW,cAAc;AAEnB,MAAAK,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC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,IACX,MAAK;AAAA,IACL,WAAWL,EAAG,gBAAgBH,CAAS;AAAA,IACtC,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,UAAI,OAAA,CAAA;AAAA,MACV,gBAAAA,EAACc,GAAiB,EAAA,WAAU,YAAY,CAAA;AAAA,IAAA;AAAA,EAAA;AAC1C;AAEFD,EAAe,cAAc;AAE7B,MAAME,IAAqB,CAAC;AAAA,EAC1B,WAAAjB;AAAA,EACA,GAAGC;AACL,MACE,gBAAAY;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,eAAW;AAAA,IACX,WAAWV,EAAG,2CAA2CH,CAAS;AAAA,IACjE,GAAGC;AAAA,IAEJ,UAAA;AAAA,MAAC,gBAAAC,EAAAgB,GAAA,EAAmB,WAAU,YAAY,CAAA;AAAA,MACzC,gBAAAhB,EAAA,QAAA,EAAK,WAAU,WAAU,UAAU,aAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AACtC;AAEFe,EAAmB,cAAc;"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { EyeIcon as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Input as
|
|
7
|
-
const
|
|
8
|
-
({ className: l, ...s },
|
|
9
|
-
const [t, a] =
|
|
3
|
+
import * as o from "react";
|
|
4
|
+
import { EyeIcon as i, EyeOffIcon as d } from "lucide-react";
|
|
5
|
+
import { Button as c } from "./button.es.js";
|
|
6
|
+
import { Input as m } from "./input.es.js";
|
|
7
|
+
const u = o.forwardRef(
|
|
8
|
+
({ className: l, ...s }, r) => {
|
|
9
|
+
const [t, a] = o.useState(!1);
|
|
10
10
|
return /* @__PURE__ */ n("div", { className: "flex flex-row items-center relative", children: [
|
|
11
|
-
/* @__PURE__ */ e(
|
|
11
|
+
/* @__PURE__ */ e(m, { type: t ? "text" : "password", ref: r, ...s }),
|
|
12
12
|
/* @__PURE__ */ e(
|
|
13
|
-
|
|
13
|
+
c,
|
|
14
14
|
{
|
|
15
15
|
type: "button",
|
|
16
|
-
className: "absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-
|
|
16
|
+
className: "absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-background/5 focus:outline-hidden",
|
|
17
17
|
onClick: () => a(!t),
|
|
18
|
-
children: t ? /* @__PURE__ */ e(
|
|
18
|
+
children: t ? /* @__PURE__ */ e(d, { className: "size-icon", "aria-hidden": "true" }) : /* @__PURE__ */ e(i, { className: "size-icon", "aria-hidden": "true" })
|
|
19
19
|
}
|
|
20
20
|
)
|
|
21
21
|
] });
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
|
-
|
|
24
|
+
u.displayName = "PasswordInput";
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
u as PasswordInput
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=password-input.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { Input, InputProps } from './input';\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <div className=\"flex flex-row items-center relative\">\n <Input type={showPassword ? 'text' : 'password'} ref={ref} {...props} />\n <Button\n type=\"button\"\n className=\"absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-
|
|
1
|
+
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { Input, InputProps } from './input';\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <div className=\"flex flex-row items-center relative\">\n <Input type={showPassword ? 'text' : 'password'} ref={ref} {...props} />\n <Button\n type=\"button\"\n className=\"absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-background/5 focus:outline-hidden\"\n onClick={() => setShowPassword(!showPassword)}\n >\n {!showPassword ? (\n <EyeIcon className=\"size-icon\" aria-hidden=\"true\" />\n ) : (\n <EyeOffIcon className=\"size-icon\" aria-hidden=\"true\" />\n )}\n </Button>\n </div>\n );\n },\n);\nPasswordInput.displayName = 'PasswordInput';\n\nexport { PasswordInput };\n"],"names":["PasswordInput","React","className","props","ref","showPassword","setShowPassword","jsxs","jsx","Input","Button","EyeOffIcon","EyeIcon"],"mappings":";;;;;;AAOA,MAAMA,IAAgBC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAChC,UAAM,CAACC,GAAcC,CAAe,IAAIL,EAAM,SAAkB,EAAK;AAEnE,WAAA,gBAAAM,EAAC,OAAI,EAAA,WAAU,uCACb,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAM,MAAMJ,IAAe,SAAS,YAAY,KAAAD,GAAW,GAAGD,GAAO;AAAA,MACtE,gBAAAK;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS,MAAMJ,EAAgB,CAACD,CAAY;AAAA,UAE3C,UAACA,IAGC,gBAAAG,EAAAG,GAAA,EAAW,WAAU,aAAY,eAAY,OAAO,CAAA,IAFpD,gBAAAH,EAAAI,GAAA,EAAQ,WAAU,aAAY,eAAY,OAAO,CAAA;AAAA,QAEG;AAAA,MAAA;AAAA,IAEzD,GACF;AAAA,EAAA;AAGN;AACAZ,EAAc,cAAc;"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import * as s from "react";
|
|
3
2
|
import { CheckIcon as m } from "@radix-ui/react-icons";
|
|
4
3
|
import * as r from "@radix-ui/react-radio-group";
|
|
4
|
+
import * as s from "react";
|
|
5
5
|
import { cn as t } from "../../utils/index.es.js";
|
|
6
|
-
const d = s.forwardRef(({ className:
|
|
6
|
+
const d = s.forwardRef(({ className: i, ...o }, a) => /* @__PURE__ */ e(
|
|
7
7
|
r.Root,
|
|
8
8
|
{
|
|
9
|
-
className: t("grid gap-2",
|
|
10
|
-
...
|
|
9
|
+
className: t("grid gap-2", i),
|
|
10
|
+
...o,
|
|
11
11
|
ref: a
|
|
12
12
|
}
|
|
13
13
|
));
|
|
14
14
|
d.displayName = r.Root.displayName;
|
|
15
|
-
const
|
|
15
|
+
const c = s.forwardRef(({ className: i, ...o }, a) => /* @__PURE__ */ e(
|
|
16
16
|
r.Item,
|
|
17
17
|
{
|
|
18
18
|
ref: a,
|
|
19
19
|
className: t(
|
|
20
|
-
"aspect-square
|
|
21
|
-
|
|
20
|
+
"aspect-square size-icon rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
21
|
+
i
|
|
22
22
|
),
|
|
23
|
-
...
|
|
24
|
-
children: /* @__PURE__ */ e(r.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(m, { className: "
|
|
23
|
+
...o,
|
|
24
|
+
children: /* @__PURE__ */ e(r.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(m, { className: "size-icon fill-primary" }) })
|
|
25
25
|
}
|
|
26
26
|
));
|
|
27
|
-
|
|
27
|
+
c.displayName = r.Item.displayName;
|
|
28
28
|
export {
|
|
29
29
|
d as RadioGroup,
|
|
30
|
-
|
|
30
|
+
c as RadioGroupItem
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=radio-group.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.es.js","sources":["../../../lib/components/ui/radio-group.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"radio-group.es.js","sources":["../../../lib/components/ui/radio-group.tsx"],"sourcesContent":["import { CheckIcon } from \"@radix-ui/react-icons\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square size-icon rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <CheckIcon className=\"size-icon fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"names":["RadioGroup","React","className","props","ref","jsx","RadioGroupPrimitive","cn","RadioGroupItem","CheckIcon"],"mappings":";;;;;AAMM,MAAAA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,WAAWC,EAAG,cAAcL,CAAS;AAAA,IACpC,GAAGC;AAAA,IACJ,KAAAC;AAAA,EAAA;AACF,CAEH;AACDJ,EAAW,cAAcM,EAAoB,KAAK;AAE5C,MAAAE,IAAiBP,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,IAEJ,UAAA,gBAAAE,EAACC,EAAoB,WAApB,EAA8B,WAAU,oCACvC,UAAC,gBAAAD,EAAAI,GAAA,EAAU,WAAU,yBAAyB,CAAA,EAChD,CAAA;AAAA,EAAA;AACF,CAEH;AACDD,EAAe,cAAcF,EAAoB,KAAK;"}
|
|
@@ -3,30 +3,30 @@ import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
|
3
3
|
import { Search as u, X as n } from "lucide-react";
|
|
4
4
|
import { useState as f } from "react";
|
|
5
5
|
import { Input as d } from "./input.es.js";
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
6
|
+
const k = ({ onChange: t, ...o }) => {
|
|
7
|
+
const [s, a] = f(""), i = (e) => {
|
|
8
8
|
const c = e.target.value;
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
|
|
9
|
+
a(c), t == null || t(c);
|
|
10
|
+
}, l = () => {
|
|
11
|
+
a(""), t == null || t("");
|
|
12
12
|
}, m = (e) => {
|
|
13
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
13
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), l());
|
|
14
14
|
};
|
|
15
15
|
return /* @__PURE__ */ p("div", { className: "relative flex items-center", children: [
|
|
16
|
-
/* @__PURE__ */ r("div", { className: "absolute left-2 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ r(u, { className: "
|
|
16
|
+
/* @__PURE__ */ r("div", { className: "absolute left-2 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ r(u, { className: "size-4" }) }),
|
|
17
17
|
/* @__PURE__ */ r(
|
|
18
18
|
d,
|
|
19
19
|
{
|
|
20
20
|
...o,
|
|
21
|
-
value:
|
|
21
|
+
value: s,
|
|
22
22
|
onChange: i,
|
|
23
23
|
className: "w-[200px] pl-7 pr-7"
|
|
24
24
|
}
|
|
25
25
|
),
|
|
26
|
-
|
|
26
|
+
s && /* @__PURE__ */ r(
|
|
27
27
|
n,
|
|
28
28
|
{
|
|
29
|
-
onClick:
|
|
29
|
+
onClick: l,
|
|
30
30
|
onKeyDown: m,
|
|
31
31
|
tabIndex: 0,
|
|
32
32
|
role: "button",
|
|
@@ -37,6 +37,6 @@ const N = ({ onChange: t, ...o }) => {
|
|
|
37
37
|
] });
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
k as SearchInput
|
|
41
41
|
};
|
|
42
42
|
//# sourceMappingURL=search-input.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-input.es.js","sources":["../../../lib/components/ui/search-input.tsx"],"sourcesContent":["'use client';\nimport { Search, X } from 'lucide-react'; // Assuming LucideIcon is the type of your icons\nimport React, { useState } from 'react';\nimport { Input, InputProps } from './input'; // Adjust based on your Input import path\n\ninterface SearchInputProps extends Omit<InputProps, 'onChange'> {\n onChange?: (value: string) => void; // Function to handle input value changes\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ onChange, ...props }) => {\n const [value, setValue] = useState<string>('');\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n setValue(newValue);\n onChange?.(newValue); // Call the custom onChange handler with the new value\n };\n\n const handleClearClick = () => {\n setValue('');\n onChange?.(''); // Notify the parent that the input has been cleared\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<SVGElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleClearClick(); // Trigger the clear action on Enter or Space key press\n }\n };\n\n return (\n <div className=\"relative flex items-center\">\n {/* Search Icon */}\n <div className=\"absolute left-2 top-1/2 transform -translate-y-1/2\">\n <Search className=\"
|
|
1
|
+
{"version":3,"file":"search-input.es.js","sources":["../../../lib/components/ui/search-input.tsx"],"sourcesContent":["'use client';\nimport { Search, X } from 'lucide-react'; // Assuming LucideIcon is the type of your icons\nimport React, { useState } from 'react';\nimport { Input, InputProps } from './input'; // Adjust based on your Input import path\n\ninterface SearchInputProps extends Omit<InputProps, 'onChange'> {\n onChange?: (value: string) => void; // Function to handle input value changes\n}\n\nconst SearchInput: React.FC<SearchInputProps> = ({ onChange, ...props }) => {\n const [value, setValue] = useState<string>('');\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = event.target.value;\n setValue(newValue);\n onChange?.(newValue); // Call the custom onChange handler with the new value\n };\n\n const handleClearClick = () => {\n setValue('');\n onChange?.(''); // Notify the parent that the input has been cleared\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<SVGElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleClearClick(); // Trigger the clear action on Enter or Space key press\n }\n };\n\n return (\n <div className=\"relative flex items-center\">\n {/* Search Icon */}\n <div className=\"absolute left-2 top-1/2 transform -translate-y-1/2\">\n <Search className=\"size-4\" />\n </div>\n\n {/* Input Field */}\n <Input\n {...props}\n value={value}\n onChange={handleInputChange} // Use the internal handler\n className={`w-[200px] pl-7 pr-7`}\n />\n\n {/* Clear (X) Icon */}\n {value && (\n <X\n onClick={handleClearClick}\n onKeyDown={handleKeyDown}\n tabIndex={0}\n role=\"button\" // Announce it as a button for assistive technologies\n aria-label=\"Clear search input\" // Accessible label\n className=\"absolute right-1 top-1/2 transform -translate-y-1/2 cursor-pointer\"\n />\n )}\n </div>\n );\n};\n\nexport { SearchInput };\n"],"names":["SearchInput","onChange","props","value","setValue","useState","handleInputChange","event","newValue","handleClearClick","handleKeyDown","jsxs","jsx","Search","Input","X"],"mappings":";;;;;AASA,MAAMA,IAA0C,CAAC,EAAE,UAAAC,GAAU,GAAGC,QAAY;AAC1E,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAiB,EAAE,GAEvCC,IAAoB,CAACC,MAA+C;AAClE,UAAAC,IAAWD,EAAM,OAAO;AAC9B,IAAAH,EAASI,CAAQ,GACjBP,KAAA,QAAAA,EAAWO;AAAA,EACb,GAEMC,IAAmB,MAAM;AAC7B,IAAAL,EAAS,EAAE,GACXH,KAAA,QAAAA,EAAW;AAAA,EACb,GAEMS,IAAgB,CAACH,MAA2C;AAChE,KAAIA,EAAM,QAAQ,WAAWA,EAAM,QAAQ,SACzCA,EAAM,eAAe,GACJE,EAAA;AAAA,EAErB;AAGE,SAAA,gBAAAE,EAAC,OAAI,EAAA,WAAU,8BAEb,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAI,WAAU,sDACb,4BAACC,GAAO,EAAA,WAAU,UAAS,EAC7B,CAAA;AAAA,IAGA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACE,GAAGZ;AAAA,QACJ,OAAAC;AAAA,QACA,UAAUG;AAAA,QACV,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAGCH,KACC,gBAAAS;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,SAASN;AAAA,QACT,WAAWC;AAAA,QACX,UAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAW;AAAA,QACX,WAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EACZ,GAEJ;AAEJ;"}
|
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { CaretSortIcon as p, ChevronUpIcon as f, ChevronDownIcon as u, CheckIcon as h } from "@radix-ui/react-icons";
|
|
4
4
|
import * as e from "@radix-ui/react-select";
|
|
5
|
-
import * as
|
|
6
|
-
import {
|
|
7
|
-
|
|
5
|
+
import * as l from "react";
|
|
6
|
+
import { buttonVariants as g } from "./button.es.js";
|
|
7
|
+
import { cn as s } from "../../utils/index.es.js";
|
|
8
|
+
const I = e.Root, C = e.Group, z = e.Value, w = l.forwardRef(({ className: o, children: r, ...a }, i) => /* @__PURE__ */ d(
|
|
8
9
|
e.Trigger,
|
|
9
10
|
{
|
|
10
|
-
ref:
|
|
11
|
-
className:
|
|
12
|
-
"flex h-
|
|
11
|
+
ref: i,
|
|
12
|
+
className: s(
|
|
13
|
+
"flex h-input w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-body shadow-xs ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
13
14
|
o
|
|
14
15
|
),
|
|
15
16
|
...a,
|
|
16
17
|
children: [
|
|
17
18
|
r,
|
|
18
|
-
/* @__PURE__ */ t(e.Icon, { asChild: !0, children: /* @__PURE__ */ t(p, { className: "
|
|
19
|
+
/* @__PURE__ */ t(e.Icon, { asChild: !0, children: /* @__PURE__ */ t(p, { className: "size-icon opacity-50" }) })
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
));
|
|
22
|
-
|
|
23
|
-
const n =
|
|
23
|
+
w.displayName = e.Trigger.displayName;
|
|
24
|
+
const n = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
24
25
|
e.ScrollUpButton,
|
|
25
26
|
{
|
|
26
27
|
ref: a,
|
|
27
|
-
className:
|
|
28
|
+
className: s("flex cursor-default items-center justify-center py-1", o),
|
|
28
29
|
...r,
|
|
29
30
|
children: /* @__PURE__ */ t(f, {})
|
|
30
31
|
}
|
|
31
32
|
));
|
|
32
33
|
n.displayName = e.ScrollUpButton.displayName;
|
|
33
|
-
const c =
|
|
34
|
+
const c = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
34
35
|
e.ScrollDownButton,
|
|
35
36
|
{
|
|
36
37
|
ref: a,
|
|
37
|
-
className:
|
|
38
|
+
className: s("flex cursor-default items-center justify-center py-1", o),
|
|
38
39
|
...r,
|
|
39
40
|
children: /* @__PURE__ */ t(u, {})
|
|
40
41
|
}
|
|
41
42
|
));
|
|
42
43
|
c.displayName = e.ScrollDownButton.displayName;
|
|
43
|
-
const
|
|
44
|
+
const y = l.forwardRef(({ className: o, children: r, position: a = "popper", ...i }, m) => /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ d(
|
|
44
45
|
e.Content,
|
|
45
46
|
{
|
|
46
47
|
ref: m,
|
|
47
|
-
className:
|
|
48
|
+
className: s(
|
|
48
49
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",
|
|
49
50
|
a === "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",
|
|
50
51
|
o
|
|
51
52
|
),
|
|
52
53
|
position: a,
|
|
53
|
-
...
|
|
54
|
+
...i,
|
|
54
55
|
children: [
|
|
55
56
|
/* @__PURE__ */ t(n, {}),
|
|
56
57
|
/* @__PURE__ */ t(
|
|
57
58
|
e.Viewport,
|
|
58
59
|
{
|
|
59
|
-
className:
|
|
60
|
+
className: s(
|
|
60
61
|
"p-1",
|
|
61
62
|
a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
62
63
|
),
|
|
@@ -67,51 +68,32 @@ const b = s.forwardRef(({ className: o, children: r, position: a = "popper", ...
|
|
|
67
68
|
]
|
|
68
69
|
}
|
|
69
70
|
) }));
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
e.Label,
|
|
73
|
-
{
|
|
74
|
-
ref: a,
|
|
75
|
-
className: l("px-2 py-1.5 text-body font-semibold", o),
|
|
76
|
-
...r
|
|
77
|
-
}
|
|
78
|
-
));
|
|
79
|
-
w.displayName = e.Label.displayName;
|
|
80
|
-
const g = s.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ i(
|
|
71
|
+
y.displayName = e.Content.displayName;
|
|
72
|
+
const b = l.forwardRef(({ className: o, children: r, ...a }, i) => /* @__PURE__ */ d(
|
|
81
73
|
e.Item,
|
|
82
74
|
{
|
|
83
|
-
ref:
|
|
84
|
-
className:
|
|
85
|
-
|
|
75
|
+
ref: i,
|
|
76
|
+
className: s(
|
|
77
|
+
g({ size: "sm", variant: "ghost" }),
|
|
78
|
+
"w-full",
|
|
86
79
|
o
|
|
87
80
|
),
|
|
88
81
|
...a,
|
|
89
82
|
children: [
|
|
90
|
-
/* @__PURE__ */ t(
|
|
83
|
+
/* @__PURE__ */ t(e.ItemIndicator, { className: "absolute right-2 size-icon", children: /* @__PURE__ */ t(h, { className: "size-icon" }) }),
|
|
91
84
|
/* @__PURE__ */ t(e.ItemText, { children: r })
|
|
92
85
|
]
|
|
93
86
|
}
|
|
94
87
|
));
|
|
95
|
-
|
|
96
|
-
const x = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
97
|
-
e.Separator,
|
|
98
|
-
{
|
|
99
|
-
ref: a,
|
|
100
|
-
className: l("-mx-1 my-1 h-px bg-muted", o),
|
|
101
|
-
...r
|
|
102
|
-
}
|
|
103
|
-
));
|
|
104
|
-
x.displayName = e.Separator.displayName;
|
|
88
|
+
b.displayName = e.Item.displayName;
|
|
105
89
|
export {
|
|
106
90
|
I as Select,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
w as SelectLabel,
|
|
91
|
+
y as SelectContent,
|
|
92
|
+
C as SelectGroup,
|
|
93
|
+
b as SelectItem,
|
|
111
94
|
c as SelectScrollDownButton,
|
|
112
95
|
n as SelectScrollUpButton,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
C as SelectValue
|
|
96
|
+
w as SelectTrigger,
|
|
97
|
+
z as SelectValue
|
|
116
98
|
};
|
|
117
99
|
//# sourceMappingURL=select.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.es.js","sources":["../../../lib/components/ui/select.tsx"],"sourcesContent":["'use client';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-
|
|
1
|
+
{"version":3,"file":"select.es.js","sources":["../../../lib/components/ui/select.tsx"],"sourcesContent":["'use client';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport * as React from 'react';\n\nimport { buttonVariants } from '@/components/ui/button';\nimport { cn } from '@/utils';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-input w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-body shadow-xs ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"size-icon opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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',\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)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n buttonVariants({ size: 'sm', variant: 'ghost' }),\n 'w-full',\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n <CheckIcon className=\"size-icon\" />\n </SelectPrimitive.ItemIndicator>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectTrigger,\n SelectValue\n};\n\n"],"names":["Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","React","className","children","props","ref","jsxs","cn","jsx","CaretSortIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","ChevronDownIcon","SelectContent","position","SelectItem","buttonVariants","CheckIcon"],"mappings":";;;;;;;AAQA,MAAMA,IAASC,EAAgB,MA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