@cryptlex/web-components 5.1.1 → 5.3.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/dist/components/data-table/data-table-filter.d.ts +27 -0
- package/dist/components/data-table/data-table-filter.js +112 -0
- package/dist/components/data-table/data-table.d.ts +73 -0
- package/dist/components/data-table/data-table.js +265 -0
- package/dist/components/data-table/table-commons.d.ts +56 -0
- package/dist/components/data-table/table-commons.js +137 -0
- package/dist/components/inputs/checkbox.d.ts +8 -0
- package/dist/components/inputs/checkbox.js +25 -0
- package/dist/components/inputs/date-picker.d.ts +11 -0
- package/dist/components/inputs/date-picker.js +22 -0
- package/dist/components/inputs/datefield.d.ts +14 -0
- package/dist/components/inputs/datefield.js +25 -0
- package/dist/components/inputs/field.d.ts +21 -0
- package/dist/components/inputs/field.js +48 -0
- package/dist/components/inputs/id-search.d.ts +20 -0
- package/dist/components/inputs/id-search.js +40 -0
- package/dist/components/inputs/input-otp.d.ts +8 -0
- package/dist/components/inputs/input-otp.js +19 -0
- package/dist/components/inputs/multi-select.d.ts +17 -0
- package/dist/components/inputs/multi-select.js +18 -0
- package/dist/components/inputs/numberfield.d.ts +7 -0
- package/dist/components/inputs/numberfield.js +25 -0
- package/dist/components/inputs/searchfield.d.ts +5 -0
- package/dist/components/inputs/searchfield.js +24 -0
- package/dist/components/inputs/select-options.d.ts +8 -0
- package/dist/components/inputs/select-options.js +286 -0
- package/dist/components/inputs/select.d.ts +17 -0
- package/dist/components/inputs/select.js +34 -0
- package/dist/components/inputs/textfield.d.ts +7 -0
- package/dist/components/inputs/textfield.js +28 -0
- package/dist/components/key-value-card/key-value-card.d.ts +17 -0
- package/dist/components/key-value-card/key-value-card.js +40 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/alert.js +18 -0
- package/dist/components/ui/avatar.d.ts +8 -0
- package/dist/components/ui/avatar.js +5 -0
- package/dist/components/ui/badge.d.ts +2 -0
- package/dist/components/ui/badge.js +5 -0
- package/dist/components/ui/breadcrumbs.d.ts +10 -0
- package/dist/components/ui/breadcrumbs.js +28 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +34 -0
- package/dist/components/ui/calendar.d.ts +17 -0
- package/dist/components/ui/calendar.js +63 -0
- package/dist/components/ui/card.d.ts +7 -0
- package/dist/components/ui/card.js +20 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +42 -0
- package/dist/components/ui/disclosure.d.ts +19 -0
- package/dist/components/ui/disclosure.js +20 -0
- package/dist/components/ui/list-box.d.ts +5 -0
- package/dist/components/ui/list-box.js +24 -0
- package/dist/components/ui/loader.d.ts +5 -0
- package/dist/components/ui/loader.js +6 -0
- package/dist/components/ui/menu.d.ts +25 -0
- package/dist/components/ui/menu.js +38 -0
- package/dist/components/ui/popover.d.ts +4 -0
- package/dist/components/ui/popover.js +14 -0
- package/dist/components/ui/sidebar.d.ts +53 -0
- package/dist/components/ui/sidebar.js +177 -0
- package/dist/components/ui/skeleton.d.ts +1 -0
- package/dist/components/ui/skeleton.js +5 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.js +14 -0
- package/dist/components/ui/table.d.ts +9 -0
- package/dist/components/ui/table.js +26 -0
- package/dist/components/ui/tabs.d.ts +5 -0
- package/dist/components/ui/tabs.js +25 -0
- package/dist/components/ui/timeline.d.ts +15 -0
- package/dist/components/ui/timeline.js +31 -0
- package/dist/components/ui/tooltip.d.ts +4 -0
- package/dist/components/ui/tooltip.js +12 -0
- package/dist/utils/form-context.d.ts +4 -0
- package/dist/utils/form-context.js +5 -0
- package/dist/utils/form-hook.d.ts +25 -0
- package/dist/utils/form-hook.js +30 -0
- package/dist/utils/primitives.d.ts +30 -0
- package/dist/utils/primitives.js +39 -0
- package/dist/utils/resource-names.d.ts +23 -0
- package/dist/utils/resource-names.js +212 -0
- package/dist/utils/use-mobile.d.ts +1 -0
- package/dist/utils/use-mobile.js +15 -0
- package/package.json +32 -37
- package/dist/components/data-table/data-table-filter.es.js +0 -132
- package/dist/components/data-table/data-table-filter.es.js.map +0 -1
- package/dist/components/data-table/data-table.es.js +0 -412
- package/dist/components/data-table/data-table.es.js.map +0 -1
- package/dist/components/data-table/table-commons.es.js +0 -136
- package/dist/components/data-table/table-commons.es.js.map +0 -1
- package/dist/components/inputs/checkbox.es.js +0 -61
- package/dist/components/inputs/checkbox.es.js.map +0 -1
- package/dist/components/inputs/date-picker.es.js +0 -124
- package/dist/components/inputs/date-picker.es.js.map +0 -1
- package/dist/components/inputs/datefield.es.js +0 -90
- package/dist/components/inputs/datefield.es.js.map +0 -1
- package/dist/components/inputs/field.es.js +0 -91
- package/dist/components/inputs/field.es.js.map +0 -1
- package/dist/components/inputs/id-search.es.js +0 -61
- package/dist/components/inputs/id-search.es.js.map +0 -1
- package/dist/components/inputs/input-otp.es.js +0 -60
- package/dist/components/inputs/input-otp.es.js.map +0 -1
- package/dist/components/inputs/multi-select.es.js +0 -47
- package/dist/components/inputs/multi-select.es.js.map +0 -1
- package/dist/components/inputs/numberfield.es.js +0 -101
- package/dist/components/inputs/numberfield.es.js.map +0 -1
- package/dist/components/inputs/searchfield.es.js +0 -80
- package/dist/components/inputs/searchfield.es.js.map +0 -1
- package/dist/components/inputs/select-options.es.js +0 -286
- package/dist/components/inputs/select-options.es.js.map +0 -1
- package/dist/components/inputs/select.es.js +0 -113
- package/dist/components/inputs/select.es.js.map +0 -1
- package/dist/components/inputs/textfield.es.js +0 -86
- package/dist/components/inputs/textfield.es.js.map +0 -1
- package/dist/components/key-value-card/key-value-card.es.js +0 -53
- package/dist/components/key-value-card/key-value-card.es.js.map +0 -1
- package/dist/components/ui/alert.es.js +0 -29
- package/dist/components/ui/alert.es.js.map +0 -1
- package/dist/components/ui/avatar.es.js +0 -19
- package/dist/components/ui/avatar.es.js.map +0 -1
- package/dist/components/ui/badge.es.js +0 -19
- package/dist/components/ui/badge.es.js.map +0 -1
- package/dist/components/ui/breadcrumbs.es.js +0 -104
- package/dist/components/ui/breadcrumbs.es.js.map +0 -1
- package/dist/components/ui/button.es.js +0 -58
- package/dist/components/ui/button.es.js.map +0 -1
- package/dist/components/ui/calendar.es.js +0 -163
- package/dist/components/ui/calendar.es.js.map +0 -1
- package/dist/components/ui/card.es.js +0 -53
- package/dist/components/ui/card.es.js.map +0 -1
- package/dist/components/ui/dialog.es.js +0 -156
- package/dist/components/ui/dialog.es.js.map +0 -1
- package/dist/components/ui/disclosure.es.js +0 -90
- package/dist/components/ui/disclosure.es.js.map +0 -1
- package/dist/components/ui/list-box.es.js +0 -76
- package/dist/components/ui/list-box.es.js.map +0 -1
- package/dist/components/ui/loader.es.js +0 -10
- package/dist/components/ui/loader.es.js.map +0 -1
- package/dist/components/ui/menu.es.js +0 -129
- package/dist/components/ui/menu.es.js.map +0 -1
- package/dist/components/ui/popover.es.js +0 -32
- package/dist/components/ui/popover.es.js.map +0 -1
- package/dist/components/ui/sidebar.es.js +0 -456
- package/dist/components/ui/sidebar.es.js.map +0 -1
- package/dist/components/ui/skeleton.es.js +0 -9
- package/dist/components/ui/skeleton.es.js.map +0 -1
- package/dist/components/ui/sonner.es.js +0 -24
- package/dist/components/ui/sonner.es.js.map +0 -1
- package/dist/components/ui/table.es.js +0 -88
- package/dist/components/ui/table.es.js.map +0 -1
- package/dist/components/ui/tabs.es.js +0 -83
- package/dist/components/ui/tabs.es.js.map +0 -1
- package/dist/components/ui/timeline.es.js +0 -46
- package/dist/components/ui/timeline.es.js.map +0 -1
- package/dist/components/ui/tooltip.es.js +0 -28
- package/dist/components/ui/tooltip.es.js.map +0 -1
- package/dist/index.es.d.ts +0 -861
- package/dist/index.es.js +0 -218
- package/dist/index.es.js.map +0 -1
- package/dist/utils/form-context.es.js +0 -8
- package/dist/utils/form-context.es.js.map +0 -1
- package/dist/utils/form-hook.es.js +0 -30
- package/dist/utils/form-hook.es.js.map +0 -1
- package/dist/utils/primitives.es.js +0 -31
- package/dist/utils/primitives.es.js.map +0 -1
- package/dist/utils/resource-names.es.js +0 -182
- package/dist/utils/resource-names.es.js.map +0 -1
- package/dist/utils/use-mobile.es.js +0 -17
- package/dist/utils/use-mobile.es.js.map +0 -1
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { cn as o } from "../../utils/primitives.es.js";
|
|
3
|
-
function c({ className: r, ...e }) {
|
|
4
|
-
return /* @__PURE__ */ n(
|
|
5
|
-
"div",
|
|
6
|
-
{
|
|
7
|
-
className: o(
|
|
8
|
-
"flex flex-col p-icon border border-border bg-card text-card-foreground",
|
|
9
|
-
r
|
|
10
|
-
),
|
|
11
|
-
...e
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
function i({ className: r, ...e }) {
|
|
16
|
-
return /* @__PURE__ */ n(
|
|
17
|
-
"div",
|
|
18
|
-
{
|
|
19
|
-
className: o("flex flex-col gap-y-1 pb-icon shrink-0", r),
|
|
20
|
-
...e
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
function d({ className: r, ...e }) {
|
|
25
|
-
return /* @__PURE__ */ n("h3", { className: o("h4 leading-none", r), ...e });
|
|
26
|
-
}
|
|
27
|
-
function l({
|
|
28
|
-
className: r,
|
|
29
|
-
...e
|
|
30
|
-
}) {
|
|
31
|
-
return /* @__PURE__ */ n("p", { className: o("caption", r), ...e });
|
|
32
|
-
}
|
|
33
|
-
function s({ className: r, ...e }) {
|
|
34
|
-
return /* @__PURE__ */ n("div", { className: o("grow body", r), ...e });
|
|
35
|
-
}
|
|
36
|
-
function f({ className: r, ...e }) {
|
|
37
|
-
return /* @__PURE__ */ n(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
className: o("flex items-center w-full pt-icon gap-2 justify-end", r),
|
|
41
|
-
...e
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
export {
|
|
46
|
-
c as Card,
|
|
47
|
-
s as CardContent,
|
|
48
|
-
l as CardDescription,
|
|
49
|
-
f as CardFooter,
|
|
50
|
-
i as CardHeader,
|
|
51
|
-
d as CardTitle
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=card.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.es.js","sources":["../../../lib/components/ui/card.tsx"],"sourcesContent":["import type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nexport function Card({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-col p-icon border border-border bg-card text-card-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"flex flex-col gap-y-1 pb-icon shrink-0\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function CardTitle({ className, ...props }: React.ComponentProps<\"h3\">) {\n\treturn (\n\t\t<h3 className={cn(\"h4 leading-none\", className)} {...props} />\n\t);\n}\n\n\nexport function CardDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"p\">) {\n\treturn (\n\t\t<p className={cn(\"caption\", className)} {...props} />\n\t);\n}\n\nexport function CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div className={cn(\"grow body\", className)} {...props} />\n\t);\n}\n\n\nexport function CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"flex items-center w-full pt-icon gap-2 justify-end\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\n"],"names":["Card","className","props","jsx","cn","CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],"mappings":";;AAGO,SAASA,EAAK,EAAE,WAAAC,GAAW,GAAGC,KAAsC;AAC1E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEO,SAASG,EAAW,EAAE,WAAAJ,GAAW,GAAGC,KAAsC;AAChF,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC,EAAG,0CAA0CH,CAAS;AAAA,MAChE,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAGO,SAASI,EAAU,EAAE,WAAAL,GAAW,GAAGC,KAAqC;AAC9E,SACC,gBAAAC,EAAC,QAAG,WAAWC,EAAG,mBAAmBH,CAAS,GAAI,GAAGC,GAAO;AAE9D;AAGO,SAASK,EAAgB;AAAA,EAC/B,WAAAN;AAAA,EACA,GAAGC;AACJ,GAA8B;AAC7B,SACC,gBAAAC,EAAC,OAAE,WAAWC,EAAG,WAAWH,CAAS,GAAI,GAAGC,GAAO;AAErD;AAEO,SAASM,EAAY,EAAE,WAAAP,GAAW,GAAGC,KAAsC;AACjF,SACC,gBAAAC,EAAC,SAAI,WAAWC,EAAG,aAAaH,CAAS,GAAI,GAAGC,GAAO;AAEzD;AAGO,SAASO,EAAW,EAAE,WAAAR,GAAW,GAAGC,KAAsC;AAChF,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC,EAAG,sDAAsDH,CAAS;AAAA,MAC5E,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as s, Fragment as f } from "react/jsx-runtime";
|
|
2
|
-
import { cva as c } from "class-variance-authority";
|
|
3
|
-
import { DialogTrigger as u, ModalOverlay as x, composeRenderProps as l, Modal as p, Dialog as h, Heading as b } from "react-aria-components";
|
|
4
|
-
import { Button as v } from "./button.es.js";
|
|
5
|
-
import { X as y } from "lucide-react";
|
|
6
|
-
import { cn as i } from "../../utils/primitives.es.js";
|
|
7
|
-
const D = c(
|
|
8
|
-
[
|
|
9
|
-
"fixed z-50 gap-4 bg-popover transition ease-in-out",
|
|
10
|
-
"data-[entering]:duration-200 data-[entering]:animate-in data-[entering]:fade-in-0 data-[exiting]:duration-200 data-[exiting]:animate-out data-[exiting]:fade-out-0"
|
|
11
|
-
],
|
|
12
|
-
{
|
|
13
|
-
variants: {
|
|
14
|
-
side: {
|
|
15
|
-
top: "inset-x-0 top-0 border-b data-[entering]:slide-in-from-top data-[exiting]:slide-out-to-top max-h-table",
|
|
16
|
-
bottom: "inset-x-0 bottom-0 border-t data-[entering]:slide-in-from-bottom data-[exiting]:slide-out-to-bottom max-h-table",
|
|
17
|
-
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[entering]:slide-in-from-left data-[exiting]:slide-out-to-left sm:max-w-sm",
|
|
18
|
-
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[entering]:slide-in-from-right data-[exiting]:slide-out-to-right sm:max-w-sm"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
), F = u, H = ({
|
|
23
|
-
className: t,
|
|
24
|
-
isDismissable: e = !0,
|
|
25
|
-
...n
|
|
26
|
-
}) => /* @__PURE__ */ a(
|
|
27
|
-
x,
|
|
28
|
-
{
|
|
29
|
-
isDismissable: e,
|
|
30
|
-
className: l(
|
|
31
|
-
t,
|
|
32
|
-
(o) => i(
|
|
33
|
-
"fixed inset-0 z-50 bg-card/20",
|
|
34
|
-
/* Exiting */
|
|
35
|
-
"data-[exiting]:duration-100 data-[exiting]:animate-out",
|
|
36
|
-
/* Entering */
|
|
37
|
-
"data-[entering]:animate-in",
|
|
38
|
-
o
|
|
39
|
-
)
|
|
40
|
-
),
|
|
41
|
-
...n
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
function M({
|
|
45
|
-
className: t,
|
|
46
|
-
children: e,
|
|
47
|
-
side: n,
|
|
48
|
-
role: o,
|
|
49
|
-
closeButton: d = !0,
|
|
50
|
-
...g
|
|
51
|
-
}) {
|
|
52
|
-
return /* @__PURE__ */ a(
|
|
53
|
-
p,
|
|
54
|
-
{
|
|
55
|
-
className: l(
|
|
56
|
-
t,
|
|
57
|
-
(r) => i(
|
|
58
|
-
n ? D({ side: n, className: "h-full p-6" }) : ["fixed left-[50vw] top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 border bg-popover p-icon duration-100 data-[exiting]:duration-100 data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[entering]:zoom-in-95 data-[exiting]:zoom-out-95 md:w-full"],
|
|
59
|
-
r
|
|
60
|
-
)
|
|
61
|
-
),
|
|
62
|
-
...g,
|
|
63
|
-
children: /* @__PURE__ */ a(
|
|
64
|
-
h,
|
|
65
|
-
{
|
|
66
|
-
role: o,
|
|
67
|
-
className: i(!n && "grid h-full gap-4 relative", "h-full outline-none"),
|
|
68
|
-
children: l(e, (r, m) => /* @__PURE__ */ s(f, { children: [
|
|
69
|
-
r,
|
|
70
|
-
d && /* @__PURE__ */ a("div", { className: "absolute right-1 top-1", children: /* @__PURE__ */ s(
|
|
71
|
-
v,
|
|
72
|
-
{
|
|
73
|
-
size: "icon",
|
|
74
|
-
variant: "destructive",
|
|
75
|
-
onPress: m.close,
|
|
76
|
-
className: "opacity-70 transition-opacity data-[hovered]:opacity-100",
|
|
77
|
-
children: [
|
|
78
|
-
/* @__PURE__ */ a(y, {}),
|
|
79
|
-
/* @__PURE__ */ a("span", { className: "sr-only", children: "Close" })
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
) })
|
|
83
|
-
] }))
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
function O({
|
|
90
|
-
className: t,
|
|
91
|
-
...e
|
|
92
|
-
}) {
|
|
93
|
-
return /* @__PURE__ */ a(
|
|
94
|
-
"div",
|
|
95
|
-
{
|
|
96
|
-
className: i(
|
|
97
|
-
"flex flex-col gap-y-2 text-center sm:text-left",
|
|
98
|
-
t
|
|
99
|
-
),
|
|
100
|
-
...e
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
function P({
|
|
105
|
-
className: t,
|
|
106
|
-
...e
|
|
107
|
-
}) {
|
|
108
|
-
return /* @__PURE__ */ a(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
className: i(
|
|
112
|
-
"flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",
|
|
113
|
-
t
|
|
114
|
-
),
|
|
115
|
-
...e
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
function k({ className: t, ...e }) {
|
|
120
|
-
return /* @__PURE__ */ a(
|
|
121
|
-
b,
|
|
122
|
-
{
|
|
123
|
-
slot: "title",
|
|
124
|
-
className: i(
|
|
125
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
126
|
-
t
|
|
127
|
-
),
|
|
128
|
-
...e
|
|
129
|
-
}
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
function B({
|
|
133
|
-
className: t,
|
|
134
|
-
...e
|
|
135
|
-
}) {
|
|
136
|
-
return /* @__PURE__ */ a(
|
|
137
|
-
"p",
|
|
138
|
-
{
|
|
139
|
-
className: i(
|
|
140
|
-
"flex flex-col gap-y-1 text-center sm:text-left",
|
|
141
|
-
t
|
|
142
|
-
),
|
|
143
|
-
...e
|
|
144
|
-
}
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
export {
|
|
148
|
-
M as DialogContent,
|
|
149
|
-
B as DialogDescription,
|
|
150
|
-
P as DialogFooter,
|
|
151
|
-
O as DialogHeader,
|
|
152
|
-
H as DialogOverlay,
|
|
153
|
-
k as DialogTitle,
|
|
154
|
-
F as DialogTrigger
|
|
155
|
-
};
|
|
156
|
-
//# sourceMappingURL=dialog.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.es.js","sources":["../../../lib/components/ui/dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\nimport {\n Dialog as AriaDialog,\n DialogProps as AriaDialogProps,\n DialogTrigger as AriaDialogTrigger,\n Heading as AriaHeading,\n HeadingProps as AriaHeadingProps,\n Modal as AriaModal,\n ModalOverlay as AriaModalOverlay,\n ModalOverlayProps as AriaModalOverlayProps,\n composeRenderProps\n} from \"react-aria-components\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/utils/index\"\nimport { X } from \"lucide-react\"\n\nconst sheetVariants = cva(\n [\n \"fixed z-50 gap-4 bg-popover transition ease-in-out\",\n \"data-[entering]:duration-200 data-[entering]:animate-in data-[entering]:fade-in-0 data-[exiting]:duration-200 data-[exiting]:animate-out data-[exiting]:fade-out-0\",\n ],\n {\n variants: {\n side: {\n top: \"inset-x-0 top-0 border-b data-[entering]:slide-in-from-top data-[exiting]:slide-out-to-top max-h-table\",\n bottom:\n \"inset-x-0 bottom-0 border-t data-[entering]:slide-in-from-bottom data-[exiting]:slide-out-to-bottom max-h-table\",\n left: \"inset-y-0 left-0 h-full w-3/4 border-r data-[entering]:slide-in-from-left data-[exiting]:slide-out-to-left sm:max-w-sm\",\n right:\n \"inset-y-0 right-0 h-full w-3/4 border-l data-[entering]:slide-in-from-right data-[exiting]:slide-out-to-right sm:max-w-sm\",\n },\n },\n }\n)\n\nexport const DialogTrigger = AriaDialogTrigger\n\nexport const DialogOverlay = ({\n className,\n isDismissable = true,\n ...props\n}: AriaModalOverlayProps) => (\n <AriaModalOverlay\n isDismissable={isDismissable}\n className={composeRenderProps(className, (className) =>\n cn(\n \"fixed inset-0 z-50 bg-card/20\",\n /* Exiting */\n \"data-[exiting]:duration-100 data-[exiting]:animate-out\",\n /* Entering */\n \"data-[entering]:animate-in\",\n className\n )\n )}\n {...props}\n />\n)\n\nexport interface DialogContentProps\n extends Omit<React.ComponentProps<typeof AriaModal>, \"children\">,\n VariantProps<typeof sheetVariants> {\n children?: AriaDialogProps[\"children\"]\n role?: AriaDialogProps[\"role\"]\n closeButton?: boolean\n}\n\nexport function DialogContent({\n className,\n children,\n side,\n role,\n closeButton = true,\n ...props\n}: DialogContentProps) {\n return (\n <AriaModal\n className={composeRenderProps(className, (className) =>\n cn(\n side\n ? sheetVariants({ side, className: \"h-full p-6\" })\n : [\"fixed left-[50vw] top-1/2 z-50 w-full max-w-lg -translate-x-1/2 -translate-y-1/2 border bg-popover p-icon duration-100 data-[exiting]:duration-100 data-[entering]:animate-in data-[exiting]:animate-out data-[entering]:fade-in-0 data-[exiting]:fade-out-0 data-[entering]:zoom-in-95 data-[exiting]:zoom-out-95 md:w-full\"],\n className\n )\n )}\n {...props}\n >\n <AriaDialog\n role={role}\n className={cn(!side && \"grid h-full gap-4 relative\", \"h-full outline-none\")}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n {children}\n {closeButton && (\n <div className=\"absolute right-1 top-1\">\n <Button\n size={'icon'}\n variant={'destructive'}\n onPress={renderProps.close}\n className=\"opacity-70 transition-opacity data-[hovered]:opacity-100\"\n >\n <X />\n <span className=\"sr-only\">Close</span>\n </Button>\n </div>\n )}\n </>\n ))}\n </AriaDialog>\n </AriaModal>\n )\n}\n\nexport function DialogHeader({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\n \"flex flex-col gap-y-2 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport function DialogFooter({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport function DialogTitle({ className, ...props }: AriaHeadingProps) {\n return (\n <AriaHeading\n slot=\"title\"\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport function DialogDescription({\n className,\n ...props\n}: React.HTMLAttributes<HTMLParagraphElement>) {\n return (\n <p\n className={cn(\n \"flex flex-col gap-y-1 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n )\n}"],"names":["sheetVariants","cva","DialogTrigger","AriaDialogTrigger","DialogOverlay","className","isDismissable","props","jsx","AriaModalOverlay","composeRenderProps","cn","DialogContent","children","side","role","closeButton","AriaModal","AriaDialog","renderProps","jsxs","Fragment","Button","X","DialogHeader","DialogFooter","DialogTitle","AriaHeading","DialogDescription"],"mappings":"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"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDownIcon as u } from "lucide-react";
|
|
3
|
-
import { useContext as d } from "react";
|
|
4
|
-
import { DisclosureGroupStateContext as c, Disclosure as p, composeRenderProps as t, Heading as m, Button as f, DisclosurePanel as b, DisclosureGroup as g } from "react-aria-components";
|
|
5
|
-
import { cn as n } from "../../utils/primitives.es.js";
|
|
6
|
-
function G({ children: e, className: r, ...o }) {
|
|
7
|
-
let i = d(c) !== null;
|
|
8
|
-
return /* @__PURE__ */ s(
|
|
9
|
-
p,
|
|
10
|
-
{
|
|
11
|
-
...o,
|
|
12
|
-
className: t(
|
|
13
|
-
r,
|
|
14
|
-
(a, D) => n(
|
|
15
|
-
"group min-w-64",
|
|
16
|
-
i && "border-0 border-b last:border-b-0",
|
|
17
|
-
a
|
|
18
|
-
)
|
|
19
|
-
),
|
|
20
|
-
children: e
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
function w({ children: e, className: r }) {
|
|
25
|
-
return /* @__PURE__ */ s(m, { className: "flex", children: /* @__PURE__ */ l(
|
|
26
|
-
f,
|
|
27
|
-
{
|
|
28
|
-
slot: "trigger",
|
|
29
|
-
className: t(r, (o) => n(
|
|
30
|
-
"group flex flex-1 items-center justify-between rounded-md py-4 font-medium ring-offset-background transition-all hover:underline",
|
|
31
|
-
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
32
|
-
"data-[focus-visible]:outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2",
|
|
33
|
-
"outline-none",
|
|
34
|
-
o
|
|
35
|
-
)),
|
|
36
|
-
children: [
|
|
37
|
-
e,
|
|
38
|
-
/* @__PURE__ */ s(
|
|
39
|
-
u,
|
|
40
|
-
{
|
|
41
|
-
"aria-hidden": !0,
|
|
42
|
-
className: n(
|
|
43
|
-
"size-4 shrink-0 transition-transform duration-200",
|
|
44
|
-
"group-data-[expanded]:rotate-180",
|
|
45
|
-
"group-data-[disabled]:opacity-50"
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
) });
|
|
52
|
-
}
|
|
53
|
-
function y({
|
|
54
|
-
children: e,
|
|
55
|
-
className: r,
|
|
56
|
-
...o
|
|
57
|
-
}) {
|
|
58
|
-
return /* @__PURE__ */ s(
|
|
59
|
-
b,
|
|
60
|
-
{
|
|
61
|
-
...o,
|
|
62
|
-
className: "overflow-hidden text-sm transition-all",
|
|
63
|
-
children: /* @__PURE__ */ s("div", { className: n("pb-4 pt-0", r), children: e })
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
function j({
|
|
68
|
-
children: e,
|
|
69
|
-
className: r,
|
|
70
|
-
...o
|
|
71
|
-
}) {
|
|
72
|
-
return /* @__PURE__ */ s(
|
|
73
|
-
g,
|
|
74
|
-
{
|
|
75
|
-
...o,
|
|
76
|
-
className: t(
|
|
77
|
-
r,
|
|
78
|
-
(i, a) => n("", i)
|
|
79
|
-
),
|
|
80
|
-
children: e
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
export {
|
|
85
|
-
G as Disclosure,
|
|
86
|
-
j as DisclosureGroup,
|
|
87
|
-
w as DisclosureHeader,
|
|
88
|
-
y as DisclosurePanel
|
|
89
|
-
};
|
|
90
|
-
//# sourceMappingURL=disclosure.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disclosure.es.js","sources":["../../../lib/components/ui/disclosure.tsx"],"sourcesContent":["import { ChevronDownIcon } from \"lucide-react\"\nimport React, { useContext } from \"react\"\nimport {\n Disclosure as AriaDisclosure,\n DisclosureGroup as AriaDisclosureGroup,\n DisclosureGroupProps as AriaDisclosureGroupProps,\n DisclosurePanel as AriaDisclosurePanel,\n DisclosurePanelProps as AriaDisclosurePanelProps,\n DisclosureProps as AriaDisclosureProps,\n Button,\n ButtonProps,\n composeRenderProps,\n DisclosureGroupStateContext,\n Heading,\n} from \"react-aria-components\"\n\nimport { cn } from \"@/utils/index\"\n\nexport interface DisclosureProps extends AriaDisclosureProps {\n children: React.ReactNode\n}\n\nexport function Disclosure({ children, className, ...props }: DisclosureProps) {\n let isInGroup = useContext(DisclosureGroupStateContext) !== null\n return (\n <AriaDisclosure\n {...props}\n className={composeRenderProps(className, (className, renderProps) =>\n cn(\n \"group min-w-64\",\n isInGroup && \"border-0 border-b last:border-b-0\",\n className\n )\n )}\n >\n {children}\n </AriaDisclosure>\n )\n}\n\nexport interface DisclosureHeaderProps {\n children: React.ReactNode\n className?: ButtonProps[\"className\"]\n}\n\nexport function DisclosureHeader({ children, className }: DisclosureHeaderProps) {\n return (\n <Heading className=\"flex\">\n <Button\n slot=\"trigger\"\n className={composeRenderProps(className, (className) => {\n return cn(\n \"group flex flex-1 items-center justify-between rounded-md py-4 font-medium ring-offset-background transition-all hover:underline\",\n \"data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n \"data-[focus-visible]:outline-none data-[focus-visible]:ring-2 data-[focus-visible]:ring-ring data-[focus-visible]:ring-offset-2\",\n \"outline-none\",\n className\n )\n })}\n >\n {children}\n <ChevronDownIcon\n aria-hidden\n className={cn(\n \"size-4 shrink-0 transition-transform duration-200\",\n \"group-data-[expanded]:rotate-180\",\n \"group-data-[disabled]:opacity-50\"\n )}\n />\n </Button>\n </Heading>\n )\n}\n\nexport interface DisclosurePanelProps extends AriaDisclosurePanelProps {\n children: React.ReactNode\n}\n\nexport function DisclosurePanel({\n children,\n className,\n ...props\n}: DisclosurePanelProps) {\n return (\n <AriaDisclosurePanel\n {...props}\n className={\"overflow-hidden text-sm transition-all\"}\n >\n <div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n </AriaDisclosurePanel>\n )\n}\n\nexport interface DisclosureGroupProps extends AriaDisclosureGroupProps {\n children: React.ReactNode\n}\n\nexport function DisclosureGroup({\n children,\n className,\n ...props\n}: DisclosureGroupProps) {\n return (\n <AriaDisclosureGroup\n {...props}\n className={composeRenderProps(className, (className, renderProps) =>\n cn(\"\", className)\n )}\n >\n {children}\n </AriaDisclosureGroup>\n )\n}\n"],"names":["Disclosure","children","className","props","isInGroup","useContext","DisclosureGroupStateContext","jsx","AriaDisclosure","composeRenderProps","renderProps","cn","DisclosureHeader","Heading","jsxs","Button","ChevronDownIcon","DisclosurePanel","AriaDisclosurePanel","DisclosureGroup","AriaDisclosureGroup"],"mappings":";;;;;AAsBO,SAASA,EAAW,EAAE,UAAAC,GAAU,WAAAC,GAAW,GAAGC,KAA0B;AAC7E,MAAIC,IAAYC,EAAWC,CAA2B,MAAM;AAC5D,SACE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACE,GAAGL;AAAA,MACJ,WAAWM;AAAA,QAAmBP;AAAA,QAAW,CAACA,GAAWQ,MACnDC;AAAA,UACE;AAAA,UACAP,KAAa;AAAA,UACbF;AAAAA,QAAA;AAAA,MACF;AAAA,MAGD,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;AAOO,SAASW,EAAiB,EAAE,UAAAX,GAAU,WAAAC,KAAoC;AAC/E,SACE,gBAAAK,EAACM,GAAA,EAAQ,WAAU,QACjB,UAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAWN,EAAmBP,GAAW,CAACA,MACjCS;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAT;AAAAA,MAAA,CAEH;AAAA,MAEA,UAAA;AAAA,QAAAD;AAAA,QACD,gBAAAM;AAAA,UAACS;AAAA,UAAA;AAAA,YACC,eAAW;AAAA,YACX,WAAWL;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAMO,SAASM,EAAgB;AAAA,EAC9B,UAAAhB;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAyB;AACvB,SACE,gBAAAI;AAAA,IAACW;AAAAA,IAAA;AAAA,MACE,GAAGf;AAAA,MACJ,WAAW;AAAA,MAEX,4BAAC,OAAA,EAAI,WAAWQ,EAAG,aAAaT,CAAS,GAAI,UAAAD,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAG5D;AAMO,SAASkB,EAAgB;AAAA,EAC9B,UAAAlB;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAyB;AACvB,SACE,gBAAAI;AAAA,IAACa;AAAAA,IAAA;AAAA,MACE,GAAGjB;AAAA,MACJ,WAAWM;AAAA,QAAmBP;AAAA,QAAW,CAACA,GAAWQ,MACnDC,EAAG,IAAIT,CAAS;AAAA,MAAA;AAAA,MAGjB,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as c, Fragment as d } from "react/jsx-runtime";
|
|
2
|
-
import { Collection as l, ListBoxItem as m, composeRenderProps as n, Header as p, ListBox as u } from "react-aria-components";
|
|
3
|
-
import { Check as x } from "lucide-react";
|
|
4
|
-
import { cn as r } from "../../utils/primitives.es.js";
|
|
5
|
-
const b = l;
|
|
6
|
-
function v({
|
|
7
|
-
className: t,
|
|
8
|
-
...e
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
11
|
-
u,
|
|
12
|
-
{
|
|
13
|
-
className: n(
|
|
14
|
-
t,
|
|
15
|
-
(s) => r(
|
|
16
|
-
s,
|
|
17
|
-
"group overflow-auto border bg-popover p-1 text-popover-foreground shadow-md outline-none",
|
|
18
|
-
/* Empty */
|
|
19
|
-
"data-[empty]:p-6 data-[empty]:text-center data-[empty]:text-sm"
|
|
20
|
-
)
|
|
21
|
-
),
|
|
22
|
-
...e
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
function y({
|
|
27
|
-
className: t,
|
|
28
|
-
children: e,
|
|
29
|
-
...s
|
|
30
|
-
}) {
|
|
31
|
-
return /* @__PURE__ */ o(
|
|
32
|
-
m,
|
|
33
|
-
{
|
|
34
|
-
textValue: s.textValue || (typeof e == "string" ? e : void 0),
|
|
35
|
-
className: n(
|
|
36
|
-
t,
|
|
37
|
-
(a) => r(
|
|
38
|
-
"relative flex w-full cursor-default select-none items-center px-2 py-1.5 text-sm outline-none",
|
|
39
|
-
/* Disabled */
|
|
40
|
-
"disabled-muted",
|
|
41
|
-
/* Focused */
|
|
42
|
-
"data-[focused]:bg-accent data-[focused]:text-accent-foreground",
|
|
43
|
-
/* Hovered */
|
|
44
|
-
"data-[hovered]:bg-accent data-[hovered]:text-accent-foreground",
|
|
45
|
-
/* Selection */
|
|
46
|
-
"data-[selection-mode]:pl-input",
|
|
47
|
-
a
|
|
48
|
-
)
|
|
49
|
-
),
|
|
50
|
-
...s,
|
|
51
|
-
children: n(e, (a, i) => /* @__PURE__ */ c(d, { children: [
|
|
52
|
-
i.isSelected && /* @__PURE__ */ o("span", { className: "absolute left-2 flex size-icon items-center justify-center", children: /* @__PURE__ */ o(x, { className: "size-icon" }) }),
|
|
53
|
-
a
|
|
54
|
-
] }))
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
function h({
|
|
59
|
-
className: t,
|
|
60
|
-
...e
|
|
61
|
-
}) {
|
|
62
|
-
return /* @__PURE__ */ o(
|
|
63
|
-
p,
|
|
64
|
-
{
|
|
65
|
-
className: r("py-1.5 pl-input pr-2 text-sm font-semibold", t),
|
|
66
|
-
...e
|
|
67
|
-
}
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
export {
|
|
71
|
-
v as ListBox,
|
|
72
|
-
b as ListBoxCollection,
|
|
73
|
-
h as ListBoxHeader,
|
|
74
|
-
y as ListBoxItem
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=list-box.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-box.es.js","sources":["../../../lib/components/ui/list-box.tsx"],"sourcesContent":["import {\n Collection as AriaCollection,\n Header as AriaHeader,\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxItemProps as AriaListBoxItemProps,\n ListBoxProps as AriaListBoxProps,\n composeRenderProps\n} from \"react-aria-components\"\n\nimport { cn } from \"@/utils/index\"\nimport { Check } from \"lucide-react\"\n\n\nexport const ListBoxCollection = AriaCollection\n\nexport function ListBox<T extends object>({\n className,\n ...props\n}: AriaListBoxProps<T>) {\n return (\n <AriaListBox\n className={composeRenderProps(className, (className) =>\n cn(\n className,\n \"group overflow-auto border bg-popover p-1 text-popover-foreground shadow-md outline-none\",\n /* Empty */\n \"data-[empty]:p-6 data-[empty]:text-center data-[empty]:text-sm\"\n )\n )}\n {...props}\n />\n )\n}\n\nexport function ListBoxItem<T extends object>({\n className,\n children,\n ...props\n}: AriaListBoxItemProps<T>) {\n return (\n <AriaListBoxItem\n textValue={\n props.textValue || (typeof children === \"string\" ? children : undefined)\n }\n className={composeRenderProps(className, (className) =>\n cn(\n \"relative flex w-full cursor-default select-none items-center px-2 py-1.5 text-sm outline-none\",\n /* Disabled */\n \"disabled-muted\",\n /* Focused */\n \"data-[focused]:bg-accent data-[focused]:text-accent-foreground\",\n /* Hovered */\n \"data-[hovered]:bg-accent data-[hovered]:text-accent-foreground\",\n /* Selection */\n \"data-[selection-mode]:pl-input\",\n className\n )\n )}\n {...props}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n {renderProps.isSelected && (\n <span className=\"absolute left-2 flex size-icon items-center justify-center\">\n <Check className=\"size-icon\" />\n </span>\n )}\n {children}\n </>\n ))}\n </AriaListBoxItem>\n )\n}\n\nexport function ListBoxHeader({\n className,\n ...props\n}: React.ComponentProps<typeof AriaHeader>) {\n return (\n <AriaHeader\n className={cn(\"py-1.5 pl-input pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n )\n}\n"],"names":["ListBoxCollection","AriaCollection","ListBox","className","props","jsx","AriaListBox","composeRenderProps","cn","ListBoxItem","children","AriaListBoxItem","renderProps","jsxs","Fragment","Check","ListBoxHeader","AriaHeader"],"mappings":";;;;AAcO,MAAMA,IAAoBC;AAE1B,SAASC,EAA0B;AAAA,EACxC,WAAAC;AAAA,EACA,GAAGC;AACL,GAAwB;AACtB,SACE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QAAmBJ;AAAA,QAAW,CAACA,MACxCK;AAAA,UACEL;AAAAA,UACA;AAAA;AAAA,UAEA;AAAA,QAAA;AAAA,MACF;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEO,SAASK,EAA8B;AAAA,EAC5C,WAAAN;AAAA,EACA,UAAAO;AAAA,EACA,GAAGN;AACL,GAA4B;AAC1B,SACE,gBAAAC;AAAA,IAACM;AAAAA,IAAA;AAAA,MACC,WACEP,EAAM,cAAc,OAAOM,KAAa,WAAWA,IAAW;AAAA,MAEhE,WAAWH;AAAA,QAAmBJ;AAAA,QAAW,CAACA,MACxCK;AAAA,UACE;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA;AAAA,UACAL;AAAAA,QAAA;AAAA,MACF;AAAA,MAED,GAAGC;AAAA,MAEH,UAAAG,EAAmBG,GAAU,CAACA,GAAUE,MACvC,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAF,EAAY,gCACV,QAAA,EAAK,WAAU,8DACd,UAAA,gBAAAP,EAACU,GAAA,EAAM,WAAU,YAAA,CAAY,EAAA,CAC/B;AAAA,QAEDL;AAAAA,MAAA,GACH,CACD;AAAA,IAAA;AAAA,EAAA;AAGP;AAEO,SAASM,EAAc;AAAA,EAC5B,WAAAb;AAAA,EACA,GAAGC;AACL,GAA4C;AAC1C,SACE,gBAAAC;AAAA,IAACY;AAAAA,IAAA;AAAA,MACC,WAAWT,EAAG,8CAA8CL,CAAS;AAAA,MACpE,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Loader2 as i } from "lucide-react";
|
|
3
|
-
import { cn as m } from "../../utils/primitives.es.js";
|
|
4
|
-
function a({ className: o }) {
|
|
5
|
-
return /* @__PURE__ */ r(i, { className: m("animate-spin size-icon", o) });
|
|
6
|
-
}
|
|
7
|
-
export {
|
|
8
|
-
a as Loader
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=loader.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader.es.js","sources":["../../../lib/components/ui/loader.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport { Loader2 } from \"lucide-react\";\n\ninterface LoaderProps {\n\tclassName?: string; // Define props interface\n}\n\nexport function Loader({ className }: LoaderProps) {\n\treturn <Loader2 className={cn(`animate-spin size-icon`, className)} />;\n}\n"],"names":["Loader","className","Loader2","cn"],"mappings":";;;AAOO,SAASA,EAAO,EAAE,WAAAC,KAA0B;AAClD,2BAAQC,GAAA,EAAQ,WAAWC,EAAG,0BAA0BF,CAAS,GAAG;AACrE;"}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { jsx as n, jsxs as s, Fragment as l } from "react/jsx-runtime";
|
|
2
|
-
import { MenuTrigger as m, SubmenuTrigger as d, composeRenderProps as u, Menu as p, MenuItem as f, Header as g, Separator as x, Keyboard as b } from "react-aria-components";
|
|
3
|
-
import { Dot as M, Check as h, ChevronRight as y } from "lucide-react";
|
|
4
|
-
import { SelectPopover as N } from "../inputs/select.es.js";
|
|
5
|
-
import { Button as v } from "./button.es.js";
|
|
6
|
-
import { ListBoxCollection as S } from "./list-box.es.js";
|
|
7
|
-
import { cn as i } from "../../utils/primitives.es.js";
|
|
8
|
-
const T = m, k = d, H = S;
|
|
9
|
-
function _({ className: e, ...t }) {
|
|
10
|
-
return /* @__PURE__ */ n(
|
|
11
|
-
N,
|
|
12
|
-
{
|
|
13
|
-
className: u(
|
|
14
|
-
e,
|
|
15
|
-
(o) => i(o)
|
|
16
|
-
),
|
|
17
|
-
...t
|
|
18
|
-
}
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
function z({ className: e, ...t }) {
|
|
22
|
-
return /* @__PURE__ */ n(
|
|
23
|
-
p,
|
|
24
|
-
{
|
|
25
|
-
className: i(
|
|
26
|
-
"overflow-auto p-1 outline-0 [clip-path:inset(0_0_0_0_round_calc(var(--radius)-2px))]",
|
|
27
|
-
e
|
|
28
|
-
),
|
|
29
|
-
escapeKeyBehavior: "none",
|
|
30
|
-
...t
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
function R({ children: e, className: t, ...o }) {
|
|
35
|
-
return /* @__PURE__ */ n(
|
|
36
|
-
f,
|
|
37
|
-
{
|
|
38
|
-
textValue: o.textValue || (typeof e == "string" ? e : void 0),
|
|
39
|
-
className: u(
|
|
40
|
-
t,
|
|
41
|
-
(r) => i(
|
|
42
|
-
"relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors",
|
|
43
|
-
/* Disabled */
|
|
44
|
-
"disabled-muted",
|
|
45
|
-
/* Focused */
|
|
46
|
-
"data-[focused]:bg-accent data-[focused]:text-accent-foreground ",
|
|
47
|
-
/* Selection Mode */
|
|
48
|
-
"data-[selection-mode]:pl-input",
|
|
49
|
-
r
|
|
50
|
-
)
|
|
51
|
-
),
|
|
52
|
-
...o,
|
|
53
|
-
children: u(e, (r, a) => /* @__PURE__ */ s(l, { children: [
|
|
54
|
-
/* @__PURE__ */ n("span", { className: "absolute left-2 flex size-icon items-center justify-center", children: a.isSelected && /* @__PURE__ */ s(l, { children: [
|
|
55
|
-
a.selectionMode == "single" && /* @__PURE__ */ n(M, { className: "size-icon fill-current" }),
|
|
56
|
-
a.selectionMode == "multiple" && /* @__PURE__ */ n(h, { className: "size-icon" })
|
|
57
|
-
] }) }),
|
|
58
|
-
r,
|
|
59
|
-
a.hasSubmenu && /* @__PURE__ */ n(y, { className: "ml-auto size-icon" })
|
|
60
|
-
] }))
|
|
61
|
-
}
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
function V({
|
|
65
|
-
className: e,
|
|
66
|
-
inset: t,
|
|
67
|
-
separator: o = !0,
|
|
68
|
-
...r
|
|
69
|
-
}) {
|
|
70
|
-
return /* @__PURE__ */ n(
|
|
71
|
-
g,
|
|
72
|
-
{
|
|
73
|
-
className: i(
|
|
74
|
-
"px-3 py-1.5 text-sm font-semibold",
|
|
75
|
-
t && "pl-input",
|
|
76
|
-
o && "-mx-1 mb-1 border-b border-b-border pb-2.5",
|
|
77
|
-
e
|
|
78
|
-
),
|
|
79
|
-
...r
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
function D({ className: e, ...t }) {
|
|
84
|
-
return /* @__PURE__ */ n(
|
|
85
|
-
x,
|
|
86
|
-
{
|
|
87
|
-
className: i("-mx-1 my-1 h-px bg-muted", e),
|
|
88
|
-
...t
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
function E({
|
|
93
|
-
className: e,
|
|
94
|
-
...t
|
|
95
|
-
}) {
|
|
96
|
-
return /* @__PURE__ */ n(
|
|
97
|
-
b,
|
|
98
|
-
{
|
|
99
|
-
className: i("ml-auto text-xs tracking-widest opacity-60", e),
|
|
100
|
-
...t
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
function F({
|
|
105
|
-
label: e,
|
|
106
|
-
children: t,
|
|
107
|
-
variant: o,
|
|
108
|
-
isDisabled: r,
|
|
109
|
-
size: a,
|
|
110
|
-
...c
|
|
111
|
-
}) {
|
|
112
|
-
return /* @__PURE__ */ s(T, { ...c, children: [
|
|
113
|
-
/* @__PURE__ */ n(v, { isDisabled: r, type: "button", variant: o, size: a, children: e }),
|
|
114
|
-
/* @__PURE__ */ n(_, { className: "overflow-auto", children: /* @__PURE__ */ n(z, { ...c, children: t }) })
|
|
115
|
-
] });
|
|
116
|
-
}
|
|
117
|
-
export {
|
|
118
|
-
F as EasyMenu,
|
|
119
|
-
z as Menu,
|
|
120
|
-
H as MenuCollection,
|
|
121
|
-
V as MenuHeader,
|
|
122
|
-
R as MenuItem,
|
|
123
|
-
E as MenuKeyboard,
|
|
124
|
-
_ as MenuPopover,
|
|
125
|
-
D as MenuSeparator,
|
|
126
|
-
k as MenuSubTrigger,
|
|
127
|
-
T as MenuTrigger
|
|
128
|
-
};
|
|
129
|
-
//# sourceMappingURL=menu.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu.es.js","sources":["../../../lib/components/ui/menu.tsx"],"sourcesContent":["import { VariantProps } from \"class-variance-authority\"\nimport * as React from \"react\"\nimport {\n Header as AriaHeader,\n Keyboard as AriaKeyboard,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n MenuItemProps as AriaMenuItemProps,\n MenuProps as AriaMenuProps,\n MenuTrigger as AriaMenuTrigger,\n MenuTriggerProps as AriaMenuTriggerProps,\n Separator as AriaSeparator,\n SeparatorProps as AriaSeparatorProps,\n SubmenuTrigger as AriaSubmenuTrigger,\n composeRenderProps,\n PopoverProps,\n} from \"react-aria-components\"\n\nimport { cn } from \"@/utils/index\"\n\nimport { Check, ChevronRight, Dot } from \"lucide-react\"\nimport { SelectPopover } from \"../inputs/select\"\nimport { Button, buttonVariants } from \"./button\"\nimport { ListBoxCollection } from \"./list-box\"\n\nexport const MenuTrigger = AriaMenuTrigger\nexport const MenuSubTrigger = AriaSubmenuTrigger\nexport const MenuCollection = ListBoxCollection\n\nexport function MenuPopover({ className, ...props }: PopoverProps) {\n return (\n <SelectPopover\n className={composeRenderProps(className, (className) =>\n cn(className)\n )}\n {...props}\n />\n )\n}\n\nexport function Menu<T extends object>({ className, ...props }: AriaMenuProps<T>) {\n return (\n <AriaMenu\n className={cn(\n \"overflow-auto p-1 outline-0 [clip-path:inset(0_0_0_0_round_calc(var(--radius)-2px))]\",\n className\n )}\n escapeKeyBehavior=\"none\"\n {...props}\n />\n )\n}\n\nexport function MenuItem({ children, className, ...props }: AriaMenuItemProps & { ref?: React.Ref<HTMLDivElement> }) {\n return (\n <AriaMenuItem\n textValue={\n props.textValue || (typeof children === \"string\" ? children : undefined)\n }\n className={composeRenderProps(className, (className) =>\n cn(\n \"relative flex cursor-default select-none items-center gap-2 px-2 py-1.5 text-sm outline-none transition-colors\",\n /* Disabled */\n \"disabled-muted\",\n /* Focused */\n \"data-[focused]:bg-accent data-[focused]:text-accent-foreground \",\n /* Selection Mode */\n \"data-[selection-mode]:pl-input\",\n className\n )\n )}\n {...props}\n >\n {composeRenderProps(children, (children, renderProps) => (\n <>\n <span className=\"absolute left-2 flex size-icon items-center justify-center\">\n {renderProps.isSelected && (\n <>\n {renderProps.selectionMode == \"single\" && (\n <Dot className=\"size-icon fill-current\" />\n )}\n {renderProps.selectionMode == \"multiple\" && (\n <Check className=\"size-icon\" />\n )}\n </>\n )}\n </span>\n\n {children}\n\n {renderProps.hasSubmenu && <ChevronRight className=\"ml-auto size-icon\" />}\n </>\n ))}\n </AriaMenuItem>\n )\n}\n\ninterface MenuHeaderProps extends React.ComponentProps<typeof AriaHeader> {\n inset?: boolean\n separator?: boolean\n}\n\nexport function MenuHeader({\n className,\n inset,\n separator = true,\n ...props\n}: MenuHeaderProps) {\n return (\n <AriaHeader\n className={cn(\n \"px-3 py-1.5 text-sm font-semibold\",\n inset && \"pl-input\",\n separator && \"-mx-1 mb-1 border-b border-b-border pb-2.5\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport function MenuSeparator({ className, ...props }: AriaSeparatorProps) {\n return (\n <AriaSeparator\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n )\n}\n\nexport function MenuKeyboard({\n className,\n ...props\n}: React.ComponentProps<typeof AriaKeyboard>) {\n return (\n <AriaKeyboard\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n )\n}\ninterface MenuProps<T>\n extends AriaMenuProps<T>,\n VariantProps<typeof buttonVariants>,\n Omit<AriaMenuTriggerProps, \"children\"> {\n label?: React.ReactNode\n isDisabled?: boolean\n}\n// TODO name this better\nexport function EasyMenu<T extends object>({\n label,\n children,\n variant,\n isDisabled,\n size,\n ...props\n}: MenuProps<T>) {\n return (\n <MenuTrigger {...props}>\n <Button isDisabled={isDisabled} type=\"button\" variant={variant} size={size}>\n {label}\n </Button>\n <MenuPopover className=\"overflow-auto\">\n <Menu {...props}>{children}</Menu>\n </MenuPopover>\n </MenuTrigger>\n )\n}\n"],"names":["MenuTrigger","AriaMenuTrigger","MenuSubTrigger","AriaSubmenuTrigger","MenuCollection","ListBoxCollection","MenuPopover","className","props","jsx","SelectPopover","composeRenderProps","cn","Menu","AriaMenu","MenuItem","children","AriaMenuItem","renderProps","jsxs","Fragment","Dot","Check","ChevronRight","MenuHeader","inset","separator","AriaHeader","MenuSeparator","AriaSeparator","MenuKeyboard","AriaKeyboard","EasyMenu","label","variant","isDisabled","size","Button"],"mappings":"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"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { DialogTrigger as r, Popover as m, composeRenderProps as p, Dialog as d } from "react-aria-components";
|
|
3
|
-
import { cn as a } from "../../utils/primitives.es.js";
|
|
4
|
-
const f = r, c = ({ className: o, offset: e = 4, ...i }) => /* @__PURE__ */ t(
|
|
5
|
-
m,
|
|
6
|
-
{
|
|
7
|
-
offset: e,
|
|
8
|
-
className: p(
|
|
9
|
-
o,
|
|
10
|
-
(n) => a(
|
|
11
|
-
"z-50 border bg-popover text-popover-foreground outline-none max-w-lg",
|
|
12
|
-
/* Entering */
|
|
13
|
-
"data-[entering]:animate-in data-[entering]:fade-in-0 data-[entering]:zoom-in-95",
|
|
14
|
-
/* Exiting */
|
|
15
|
-
"data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95",
|
|
16
|
-
/* Placement */
|
|
17
|
-
"data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2",
|
|
18
|
-
n
|
|
19
|
-
)
|
|
20
|
-
),
|
|
21
|
-
...i
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
function u({ className: o, ...e }) {
|
|
25
|
-
return /* @__PURE__ */ t(d, { className: a("p-icon outline-0", o), ...e });
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
c as Popover,
|
|
29
|
-
u as PopoverDialog,
|
|
30
|
-
f as PopoverTrigger
|
|
31
|
-
};
|
|
32
|
-
//# sourceMappingURL=popover.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popover.es.js","sources":["../../../lib/components/ui/popover.tsx"],"sourcesContent":["import {\n\tDialog as AriaDialog,\n\tDialogProps as AriaDialogProps,\n\tDialogTrigger as AriaDialogTrigger,\n\tPopover as AriaPopover,\n\tPopoverProps as AriaPopoverProps,\n\tcomposeRenderProps,\n} from \"react-aria-components\"\n\nimport { cn } from \"@/utils/index\"\n\nexport const PopoverTrigger = AriaDialogTrigger\n\nexport const Popover = ({ className, offset = 4, ...props }: AriaPopoverProps) => (\n\t<AriaPopover\n\t\toffset={offset}\n\t\tclassName={composeRenderProps(className, (className) =>\n\t\t\tcn(\n\t\t\t\t\"z-50 border bg-popover text-popover-foreground outline-none max-w-lg\",\n\t\t\t\t/* Entering */\n\t\t\t\t\"data-[entering]:animate-in data-[entering]:fade-in-0 data-[entering]:zoom-in-95\",\n\t\t\t\t/* Exiting */\n\t\t\t\t\"data-[exiting]:animate-out data-[exiting]:fade-out-0 data-[exiting]:zoom-out-95\",\n\t\t\t\t/* Placement */\n\t\t\t\t\"data-[placement=bottom]:slide-in-from-top-2 data-[placement=left]:slide-in-from-right-2 data-[placement=right]:slide-in-from-left-2 data-[placement=top]:slide-in-from-bottom-2\",\n\t\t\t\tclassName\n\t\t\t)\n\t\t)}\n\t\t{...props}\n\t/>\n)\n\nexport function PopoverDialog({ className, ...props }: AriaDialogProps) {\n\treturn (\n\t\t<AriaDialog className={cn(\"p-icon outline-0\", className)} {...props} />\n\t)\n}\n"],"names":["PopoverTrigger","AriaDialogTrigger","Popover","className","offset","props","jsx","AriaPopover","composeRenderProps","cn","PopoverDialog","AriaDialog"],"mappings":";;;AAWO,MAAMA,IAAiBC,GAEjBC,IAAU,CAAC,EAAE,WAAAC,GAAW,QAAAC,IAAS,GAAG,GAAGC,QACnD,gBAAAC;AAAA,EAACC;AAAAA,EAAA;AAAA,IACA,QAAAH;AAAA,IACA,WAAWI;AAAA,MAAmBL;AAAA,MAAW,CAACA,MACzCM;AAAA,QACC;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA;AAAA,QAEA;AAAA,QACAN;AAAAA,MAAA;AAAA,IACD;AAAA,IAEA,GAAGE;AAAA,EAAA;AACL;AAGM,SAASK,EAAc,EAAE,WAAAP,GAAW,GAAGE,KAA0B;AACvE,SACC,gBAAAC,EAACK,KAAW,WAAWF,EAAG,oBAAoBN,CAAS,GAAI,GAAGE,GAAO;AAEvE;"}
|