@turingpaper/ui 0.0.1-test.1 → 0.0.1-test.2
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/accordion.mjs +85 -0
- package/dist/alert-dialog.mjs +180 -0
- package/dist/avatar.mjs +106 -0
- package/dist/badge.mjs +43 -0
- package/dist/breadcrumb.mjs +117 -0
- package/dist/checkbox.mjs +34 -0
- package/dist/collapsible.mjs +34 -0
- package/dist/command.mjs +173 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/alert-dialog.d.ts +18 -0
- package/dist/components/avatar.d.ts +11 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/collapsible.d.ts +5 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/dialog.d.ts +17 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/dropdown-menu.d.ts +29 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/pagination.d.ts +17 -0
- package/dist/components/popover.d.ts +10 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/scroll-area.d.ts +5 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/sheet.d.ts +14 -0
- package/dist/components/skeleton.d.ts +2 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/toggle-group.d.ts +10 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/dialog.mjs +156 -0
- package/dist/drawer.mjs +127 -0
- package/dist/dropdown-menu.mjs +251 -0
- package/dist/hover-card.mjs +38 -0
- package/dist/input-group.mjs +141 -0
- package/dist/label.mjs +22 -0
- package/dist/pagination.mjs +128 -0
- package/dist/popover.mjs +80 -0
- package/dist/progress.mjs +31 -0
- package/dist/provider.mjs +1 -1
- package/dist/radio-group.mjs +44 -0
- package/dist/scroll-area.mjs +59 -0
- package/dist/select.mjs +186 -0
- package/dist/separator.mjs +26 -0
- package/dist/sheet.mjs +139 -0
- package/dist/skeleton.mjs +15 -0
- package/dist/slider.mjs +59 -0
- package/dist/styles.css +1 -1
- package/dist/switch.mjs +31 -0
- package/dist/table.mjs +114 -0
- package/dist/tabs.mjs +90 -0
- package/dist/textarea.mjs +18 -0
- package/dist/toggle-group.mjs +76 -0
- package/dist/toggle.mjs +43 -0
- package/dist/tooltip.mjs +55 -0
- package/package.json +128 -2
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { RadioGroup as e } from "radix-ui";
|
|
3
|
+
import { cn as t } from "./utils.mjs";
|
|
4
|
+
function s({
|
|
5
|
+
className: a,
|
|
6
|
+
...i
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ r(
|
|
9
|
+
e.Root,
|
|
10
|
+
{
|
|
11
|
+
"data-slot": "radio-group",
|
|
12
|
+
className: t("grid w-full gap-3", a),
|
|
13
|
+
...i
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function l({
|
|
18
|
+
className: a,
|
|
19
|
+
...i
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ r(
|
|
22
|
+
e.Item,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "radio-group-item",
|
|
25
|
+
className: t(
|
|
26
|
+
"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: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 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
27
|
+
a
|
|
28
|
+
),
|
|
29
|
+
...i,
|
|
30
|
+
children: /* @__PURE__ */ r(
|
|
31
|
+
e.Indicator,
|
|
32
|
+
{
|
|
33
|
+
"data-slot": "radio-group-indicator",
|
|
34
|
+
className: "flex size-4 items-center justify-center",
|
|
35
|
+
children: /* @__PURE__ */ r("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
s as RadioGroup,
|
|
43
|
+
l as RadioGroupItem
|
|
44
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ScrollArea as a } from "radix-ui";
|
|
3
|
+
import { cn as e } from "./utils.mjs";
|
|
4
|
+
function u({
|
|
5
|
+
className: o,
|
|
6
|
+
children: l,
|
|
7
|
+
...t
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ i(
|
|
10
|
+
a.Root,
|
|
11
|
+
{
|
|
12
|
+
"data-slot": "scroll-area",
|
|
13
|
+
className: e("relative", o),
|
|
14
|
+
...t,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ r(
|
|
17
|
+
a.Viewport,
|
|
18
|
+
{
|
|
19
|
+
"data-slot": "scroll-area-viewport",
|
|
20
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
21
|
+
children: l
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
/* @__PURE__ */ r(n, {}),
|
|
25
|
+
/* @__PURE__ */ r(a.Corner, {})
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function n({
|
|
31
|
+
className: o,
|
|
32
|
+
orientation: l = "vertical",
|
|
33
|
+
...t
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ r(
|
|
36
|
+
a.ScrollAreaScrollbar,
|
|
37
|
+
{
|
|
38
|
+
"data-slot": "scroll-area-scrollbar",
|
|
39
|
+
"data-orientation": l,
|
|
40
|
+
orientation: l,
|
|
41
|
+
className: e(
|
|
42
|
+
"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",
|
|
43
|
+
o
|
|
44
|
+
),
|
|
45
|
+
...t,
|
|
46
|
+
children: /* @__PURE__ */ r(
|
|
47
|
+
a.ScrollAreaThumb,
|
|
48
|
+
{
|
|
49
|
+
"data-slot": "scroll-area-thumb",
|
|
50
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
u as ScrollArea,
|
|
58
|
+
n as ScrollBar
|
|
59
|
+
};
|
package/dist/select.mjs
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { Select as r } from "radix-ui";
|
|
3
|
+
import { cn as o } from "./utils.mjs";
|
|
4
|
+
import { CheckIcon as c, ChevronDownIcon as l, ChevronUpIcon as u } from "lucide-react";
|
|
5
|
+
function h({
|
|
6
|
+
...e
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ t(r.Root, { "data-slot": "select", ...e });
|
|
9
|
+
}
|
|
10
|
+
function b({
|
|
11
|
+
className: e,
|
|
12
|
+
...a
|
|
13
|
+
}) {
|
|
14
|
+
return /* @__PURE__ */ t(
|
|
15
|
+
r.Group,
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "select-group",
|
|
18
|
+
className: o("scroll-my-1 p-1", e),
|
|
19
|
+
...a
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function w({
|
|
24
|
+
...e
|
|
25
|
+
}) {
|
|
26
|
+
return /* @__PURE__ */ t(r.Value, { "data-slot": "select-value", ...e });
|
|
27
|
+
}
|
|
28
|
+
function z({
|
|
29
|
+
className: e,
|
|
30
|
+
size: a = "default",
|
|
31
|
+
children: n,
|
|
32
|
+
...s
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ i(
|
|
35
|
+
r.Trigger,
|
|
36
|
+
{
|
|
37
|
+
"data-slot": "select-trigger",
|
|
38
|
+
"data-size": a,
|
|
39
|
+
className: o(
|
|
40
|
+
"flex w-fit items-center justify-between gap-1.5 rounded-4xl border border-input bg-input/30 px-3 py-2 text-sm whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 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",
|
|
41
|
+
e
|
|
42
|
+
),
|
|
43
|
+
...s,
|
|
44
|
+
children: [
|
|
45
|
+
n,
|
|
46
|
+
/* @__PURE__ */ t(r.Icon, { asChild: !0, children: /* @__PURE__ */ t(l, { className: "pointer-events-none size-4 text-muted-foreground" }) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function S({
|
|
52
|
+
className: e,
|
|
53
|
+
children: a,
|
|
54
|
+
position: n = "item-aligned",
|
|
55
|
+
align: s = "center",
|
|
56
|
+
...d
|
|
57
|
+
}) {
|
|
58
|
+
return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ i(
|
|
59
|
+
r.Content,
|
|
60
|
+
{
|
|
61
|
+
"data-slot": "select-content",
|
|
62
|
+
"data-align-trigger": n === "item-aligned",
|
|
63
|
+
className: o("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl bg-popover text-popover-foreground shadow-2xl ring-1 ring-foreground/5 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", n === "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: n,
|
|
65
|
+
align: s,
|
|
66
|
+
...d,
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ t(p, {}),
|
|
69
|
+
/* @__PURE__ */ t(
|
|
70
|
+
r.Viewport,
|
|
71
|
+
{
|
|
72
|
+
"data-position": n,
|
|
73
|
+
className: o(
|
|
74
|
+
"data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
|
|
75
|
+
n === "popper" && ""
|
|
76
|
+
),
|
|
77
|
+
children: a
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ t(g, {})
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
) });
|
|
84
|
+
}
|
|
85
|
+
function y({
|
|
86
|
+
className: e,
|
|
87
|
+
...a
|
|
88
|
+
}) {
|
|
89
|
+
return /* @__PURE__ */ t(
|
|
90
|
+
r.Label,
|
|
91
|
+
{
|
|
92
|
+
"data-slot": "select-label",
|
|
93
|
+
className: o("px-3 py-2.5 text-xs text-muted-foreground", e),
|
|
94
|
+
...a
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
function N({
|
|
99
|
+
className: e,
|
|
100
|
+
children: a,
|
|
101
|
+
...n
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ i(
|
|
104
|
+
r.Item,
|
|
105
|
+
{
|
|
106
|
+
"data-slot": "select-item",
|
|
107
|
+
className: o(
|
|
108
|
+
"relative flex w-full cursor-default items-center gap-2.5 rounded-xl py-2 pr-8 pl-3 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
|
+
e
|
|
110
|
+
),
|
|
111
|
+
...n,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(r.ItemIndicator, { children: /* @__PURE__ */ t(c, { className: "pointer-events-none" }) }) }),
|
|
114
|
+
/* @__PURE__ */ t(r.ItemText, { children: a })
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
function I({
|
|
120
|
+
className: e,
|
|
121
|
+
...a
|
|
122
|
+
}) {
|
|
123
|
+
return /* @__PURE__ */ t(
|
|
124
|
+
r.Separator,
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "select-separator",
|
|
127
|
+
className: o(
|
|
128
|
+
"pointer-events-none -mx-1 my-1 h-px bg-border/50",
|
|
129
|
+
e
|
|
130
|
+
),
|
|
131
|
+
...a
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function p({
|
|
136
|
+
className: e,
|
|
137
|
+
...a
|
|
138
|
+
}) {
|
|
139
|
+
return /* @__PURE__ */ t(
|
|
140
|
+
r.ScrollUpButton,
|
|
141
|
+
{
|
|
142
|
+
"data-slot": "select-scroll-up-button",
|
|
143
|
+
className: o(
|
|
144
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
145
|
+
e
|
|
146
|
+
),
|
|
147
|
+
...a,
|
|
148
|
+
children: /* @__PURE__ */ t(
|
|
149
|
+
u,
|
|
150
|
+
{}
|
|
151
|
+
)
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
function g({
|
|
156
|
+
className: e,
|
|
157
|
+
...a
|
|
158
|
+
}) {
|
|
159
|
+
return /* @__PURE__ */ t(
|
|
160
|
+
r.ScrollDownButton,
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "select-scroll-down-button",
|
|
163
|
+
className: o(
|
|
164
|
+
"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
165
|
+
e
|
|
166
|
+
),
|
|
167
|
+
...a,
|
|
168
|
+
children: /* @__PURE__ */ t(
|
|
169
|
+
l,
|
|
170
|
+
{}
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
export {
|
|
176
|
+
h as Select,
|
|
177
|
+
S as SelectContent,
|
|
178
|
+
b as SelectGroup,
|
|
179
|
+
N as SelectItem,
|
|
180
|
+
y as SelectLabel,
|
|
181
|
+
g as SelectScrollDownButton,
|
|
182
|
+
p as SelectScrollUpButton,
|
|
183
|
+
I as SelectSeparator,
|
|
184
|
+
z as SelectTrigger,
|
|
185
|
+
w as SelectValue
|
|
186
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Separator as i } from "radix-ui";
|
|
3
|
+
import { cn as l } from "./utils.mjs";
|
|
4
|
+
function m({
|
|
5
|
+
className: r,
|
|
6
|
+
orientation: a = "horizontal",
|
|
7
|
+
decorative: t = !0,
|
|
8
|
+
...o
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
|
+
i.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "separator",
|
|
14
|
+
decorative: t,
|
|
15
|
+
orientation: a,
|
|
16
|
+
className: l(
|
|
17
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
18
|
+
r
|
|
19
|
+
),
|
|
20
|
+
...o
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
m as Separator
|
|
26
|
+
};
|
package/dist/sheet.mjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { Dialog as o } from "radix-ui";
|
|
3
|
+
import { cn as d } from "./utils.mjs";
|
|
4
|
+
import { Button as n } from "./button.mjs";
|
|
5
|
+
import { XIcon as f } from "lucide-react";
|
|
6
|
+
function x({ ...t }) {
|
|
7
|
+
return /* @__PURE__ */ e(o.Root, { "data-slot": "sheet", ...t });
|
|
8
|
+
}
|
|
9
|
+
function S({
|
|
10
|
+
...t
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ e(o.Trigger, { "data-slot": "sheet-trigger", ...t });
|
|
13
|
+
}
|
|
14
|
+
function v({
|
|
15
|
+
...t
|
|
16
|
+
}) {
|
|
17
|
+
return /* @__PURE__ */ e(o.Close, { "data-slot": "sheet-close", ...t });
|
|
18
|
+
}
|
|
19
|
+
function m({
|
|
20
|
+
...t
|
|
21
|
+
}) {
|
|
22
|
+
return /* @__PURE__ */ e(o.Portal, { "data-slot": "sheet-portal", ...t });
|
|
23
|
+
}
|
|
24
|
+
function c({
|
|
25
|
+
className: t,
|
|
26
|
+
...a
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ e(
|
|
29
|
+
o.Overlay,
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "sheet-overlay",
|
|
32
|
+
className: d(
|
|
33
|
+
"fixed inset-0 z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
34
|
+
t
|
|
35
|
+
),
|
|
36
|
+
...a
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
function N({
|
|
41
|
+
className: t,
|
|
42
|
+
children: a,
|
|
43
|
+
side: i = "right",
|
|
44
|
+
showCloseButton: r = !0,
|
|
45
|
+
...l
|
|
46
|
+
}) {
|
|
47
|
+
return /* @__PURE__ */ s(m, { children: [
|
|
48
|
+
/* @__PURE__ */ e(c, {}),
|
|
49
|
+
/* @__PURE__ */ s(
|
|
50
|
+
o.Content,
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "sheet-content",
|
|
53
|
+
"data-side": i,
|
|
54
|
+
className: d(
|
|
55
|
+
"fixed z-50 flex flex-col bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",
|
|
56
|
+
t
|
|
57
|
+
),
|
|
58
|
+
...l,
|
|
59
|
+
children: [
|
|
60
|
+
a,
|
|
61
|
+
r && /* @__PURE__ */ e(o.Close, { "data-slot": "sheet-close", asChild: !0, children: /* @__PURE__ */ s(
|
|
62
|
+
n,
|
|
63
|
+
{
|
|
64
|
+
variant: "ghost",
|
|
65
|
+
className: "absolute top-4 right-4",
|
|
66
|
+
size: "icon-sm",
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ e(
|
|
69
|
+
f,
|
|
70
|
+
{}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
) })
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
function C({ className: t, ...a }) {
|
|
82
|
+
return /* @__PURE__ */ e(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
"data-slot": "sheet-header",
|
|
86
|
+
className: d("flex flex-col gap-1.5 p-6", t),
|
|
87
|
+
...a
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
function y({ className: t, ...a }) {
|
|
92
|
+
return /* @__PURE__ */ e(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
"data-slot": "sheet-footer",
|
|
96
|
+
className: d("mt-auto flex flex-col gap-2 p-6", t),
|
|
97
|
+
...a
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function w({
|
|
102
|
+
className: t,
|
|
103
|
+
...a
|
|
104
|
+
}) {
|
|
105
|
+
return /* @__PURE__ */ e(
|
|
106
|
+
o.Title,
|
|
107
|
+
{
|
|
108
|
+
"data-slot": "sheet-title",
|
|
109
|
+
className: d(
|
|
110
|
+
"text-base font-medium text-foreground",
|
|
111
|
+
t
|
|
112
|
+
),
|
|
113
|
+
...a
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
function T({
|
|
118
|
+
className: t,
|
|
119
|
+
...a
|
|
120
|
+
}) {
|
|
121
|
+
return /* @__PURE__ */ e(
|
|
122
|
+
o.Description,
|
|
123
|
+
{
|
|
124
|
+
"data-slot": "sheet-description",
|
|
125
|
+
className: d("text-sm text-muted-foreground", t),
|
|
126
|
+
...a
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
export {
|
|
131
|
+
x as Sheet,
|
|
132
|
+
v as SheetClose,
|
|
133
|
+
N as SheetContent,
|
|
134
|
+
T as SheetDescription,
|
|
135
|
+
y as SheetFooter,
|
|
136
|
+
C as SheetHeader,
|
|
137
|
+
w as SheetTitle,
|
|
138
|
+
S as SheetTrigger
|
|
139
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "./utils.mjs";
|
|
3
|
+
function a({ className: e, ...t }) {
|
|
4
|
+
return /* @__PURE__ */ o(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
"data-slot": "skeleton",
|
|
8
|
+
className: n("animate-pulse rounded-xl bg-muted", e),
|
|
9
|
+
...t
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
a as Skeleton
|
|
15
|
+
};
|
package/dist/slider.mjs
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as h from "react";
|
|
3
|
+
import { Slider as e } from "radix-ui";
|
|
4
|
+
import { cn as m } from "./utils.mjs";
|
|
5
|
+
function v({
|
|
6
|
+
className: i,
|
|
7
|
+
defaultValue: r,
|
|
8
|
+
value: a,
|
|
9
|
+
min: t = 0,
|
|
10
|
+
max: l = 100,
|
|
11
|
+
...s
|
|
12
|
+
}) {
|
|
13
|
+
const d = h.useMemo(
|
|
14
|
+
() => Array.isArray(a) ? a : Array.isArray(r) ? r : [t, l],
|
|
15
|
+
[a, r, t, l]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ c(
|
|
18
|
+
e.Root,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "slider",
|
|
21
|
+
defaultValue: r,
|
|
22
|
+
value: a,
|
|
23
|
+
min: t,
|
|
24
|
+
max: l,
|
|
25
|
+
className: m(
|
|
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
|
+
i
|
|
28
|
+
),
|
|
29
|
+
...s,
|
|
30
|
+
children: [
|
|
31
|
+
/* @__PURE__ */ o(
|
|
32
|
+
e.Track,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "slider-track",
|
|
35
|
+
className: "relative grow overflow-hidden rounded-4xl bg-muted data-horizontal:h-3 data-horizontal:w-full data-vertical:h-full data-vertical:w-3",
|
|
36
|
+
children: /* @__PURE__ */ o(
|
|
37
|
+
e.Range,
|
|
38
|
+
{
|
|
39
|
+
"data-slot": "slider-range",
|
|
40
|
+
className: "absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
Array.from({ length: d.length }, (b, n) => /* @__PURE__ */ o(
|
|
46
|
+
e.Thumb,
|
|
47
|
+
{
|
|
48
|
+
"data-slot": "slider-thumb",
|
|
49
|
+
className: "block size-4 shrink-0 rounded-4xl border border-primary bg-white shadow-sm ring-ring/50 transition-colors select-none hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
50
|
+
},
|
|
51
|
+
n
|
|
52
|
+
))
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
v as Slider
|
|
59
|
+
};
|