laif-ds 0.1.86 → 0.1.89
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/_virtual/index2.js +5 -2
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +5 -5
- package/dist/_virtual/index6.js +2 -2
- package/dist/_virtual/index7.js +2 -2
- package/dist/components/ui/app-multiple-select-dropdown.js +115 -90
- package/dist/components/ui/app-select.js +54 -34
- package/dist/components/ui/async-select.js +185 -155
- package/dist/components/ui/button.js +34 -34
- package/dist/components/ui/calendar.js +2 -2
- package/dist/components/ui/date-picker.js +7 -7
- package/dist/components/ui/input.js +10 -11
- package/dist/components/ui/multiple-selector.js +205 -191
- package/dist/components/ui/select.js +22 -17
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/weekly-calendar/appointment-card.js +39 -39
- package/dist/components/ui/weekly-calendar/day-column.js +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
- package/dist/components/ui/command-portal.js +0 -67
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useDebounce as
|
|
6
|
-
import { cva as
|
|
7
|
-
import { cn as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Command as
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const fe = _(
|
|
17
|
-
"flex items-center justify-between whitespace-nowrap rounded-md border border-input bg-d-input px-3 py-2 shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as p from "react";
|
|
4
|
+
import { useState as a, useEffect as h, useCallback as A } from "react";
|
|
5
|
+
import { useDebounce as re } from "../../hooks/use-debounce.js";
|
|
6
|
+
import { cva as oe } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
7
|
+
import { cn as S } from "../../lib/utils.js";
|
|
8
|
+
import { Label as le } from "./label.js";
|
|
9
|
+
import { Popover as ae, PopoverTrigger as ie, PopoverContent as ce } from "./popover.js";
|
|
10
|
+
import { Command as de, CommandInput as fe, CommandList as me, CommandEmpty as ue, CommandGroup as G, CommandItem as M } from "./command.js";
|
|
11
|
+
import { Icon as B } from "./icon.js";
|
|
12
|
+
import pe from "../../node_modules/lucide-react/dist/esm/icons/loader-circle.js";
|
|
13
|
+
import he from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
14
|
+
const ge = oe(
|
|
15
|
+
"flex items-center justify-between whitespace-nowrap rounded-md border border-d-input bg-d-input px-3 py-2 shadow-sm data-[placeholder]:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",
|
|
18
16
|
{
|
|
19
17
|
variants: {
|
|
20
18
|
size: {
|
|
@@ -28,196 +26,228 @@ const fe = _(
|
|
|
28
26
|
}
|
|
29
27
|
}
|
|
30
28
|
);
|
|
31
|
-
function
|
|
29
|
+
function Te({
|
|
32
30
|
fetcher: c,
|
|
33
|
-
preload:
|
|
34
|
-
filterFn:
|
|
35
|
-
renderOption:
|
|
36
|
-
getOptionValue:
|
|
37
|
-
getDisplayValue:
|
|
38
|
-
notFound:
|
|
39
|
-
loadingSkeleton:
|
|
40
|
-
label:
|
|
41
|
-
labelClassName:
|
|
42
|
-
placeholder:
|
|
43
|
-
value:
|
|
44
|
-
onChange:
|
|
45
|
-
disabled:
|
|
46
|
-
width:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
size: q
|
|
31
|
+
preload: f,
|
|
32
|
+
filterFn: R,
|
|
33
|
+
renderOption: k,
|
|
34
|
+
getOptionValue: i,
|
|
35
|
+
getDisplayValue: g,
|
|
36
|
+
notFound: U,
|
|
37
|
+
loadingSkeleton: X,
|
|
38
|
+
label: z,
|
|
39
|
+
labelClassName: $,
|
|
40
|
+
placeholder: O = "Select...",
|
|
41
|
+
value: r = "",
|
|
42
|
+
onChange: x,
|
|
43
|
+
disabled: W = !1,
|
|
44
|
+
width: m = "200px",
|
|
45
|
+
triggerClassName: q,
|
|
46
|
+
noResultsMessage: H,
|
|
47
|
+
clearable: L = !0,
|
|
48
|
+
size: J
|
|
52
49
|
}) {
|
|
53
|
-
const [
|
|
54
|
-
|
|
50
|
+
const [l, j] = a(!1), w = m === "auto", I = p.useRef(null), T = p.useRef(null), K = p.useRef(null), Q = p.useRef(null), [y, v] = a(!1), [N, b] = a(null), [E, C] = a(null), [D, Y] = a(""), u = re(D, f ? 0 : 300), [P, F] = a([]), [n, d] = a([]), [Z, _] = a(
|
|
51
|
+
void 0
|
|
52
|
+
);
|
|
53
|
+
h(() => ((async () => {
|
|
55
54
|
try {
|
|
56
|
-
if (
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
);
|
|
60
|
-
const o = await c("");
|
|
61
|
-
P(o), d(o);
|
|
55
|
+
if (v(!0), b(null), f) {
|
|
56
|
+
const s = await c("");
|
|
57
|
+
F(s), d(s);
|
|
62
58
|
} else {
|
|
63
|
-
const
|
|
64
|
-
d(
|
|
59
|
+
const s = await c(r);
|
|
60
|
+
d(s);
|
|
65
61
|
}
|
|
66
|
-
} catch (
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
} catch (s) {
|
|
63
|
+
b(
|
|
64
|
+
s instanceof Error ? s.message : "Failed to fetch options"
|
|
69
65
|
);
|
|
70
66
|
} finally {
|
|
71
|
-
|
|
67
|
+
v(!1);
|
|
72
68
|
}
|
|
73
69
|
})(), () => {
|
|
74
|
-
d([]),
|
|
75
|
-
}), [c,
|
|
76
|
-
if (
|
|
77
|
-
if (
|
|
78
|
-
if (
|
|
79
|
-
const t =
|
|
80
|
-
(
|
|
70
|
+
d([]), F([]);
|
|
71
|
+
}), [c, r, f]), h(() => {
|
|
72
|
+
if (l)
|
|
73
|
+
if (f)
|
|
74
|
+
if (u) {
|
|
75
|
+
const t = P.filter(
|
|
76
|
+
(s) => R ? R(s, u) : String(g(s)).toLowerCase().includes(u.toLowerCase())
|
|
81
77
|
);
|
|
82
78
|
d(t);
|
|
83
79
|
} else
|
|
84
|
-
d(
|
|
80
|
+
d(P);
|
|
85
81
|
else
|
|
86
82
|
(async () => {
|
|
87
83
|
try {
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
d(
|
|
91
|
-
} catch (
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
v(!0), b(null);
|
|
85
|
+
const s = await c(u);
|
|
86
|
+
d(s);
|
|
87
|
+
} catch (s) {
|
|
88
|
+
b(
|
|
89
|
+
s instanceof Error ? s.message : "Failed to fetch options"
|
|
94
90
|
);
|
|
95
91
|
} finally {
|
|
96
|
-
|
|
92
|
+
v(!1);
|
|
97
93
|
}
|
|
98
94
|
})();
|
|
99
95
|
}, [
|
|
100
|
-
|
|
96
|
+
l,
|
|
97
|
+
u,
|
|
101
98
|
f,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
99
|
+
R,
|
|
100
|
+
P,
|
|
101
|
+
g
|
|
102
|
+
]), h(() => {
|
|
103
|
+
if (r && n.length > 0) {
|
|
104
|
+
const t = n.find((s) => i(s) === r);
|
|
105
|
+
C(t || null);
|
|
106
|
+
} else r || C(null);
|
|
107
|
+
}, [r, n, i]), h(() => {
|
|
108
|
+
l && I.current && I.current.focus();
|
|
109
|
+
}, [l]), h(() => {
|
|
110
|
+
if (l && T.current) {
|
|
111
|
+
const t = T.current.getBoundingClientRect();
|
|
112
|
+
_(t.width);
|
|
113
|
+
}
|
|
114
|
+
}, [l]);
|
|
115
|
+
const V = A(
|
|
113
116
|
(t) => {
|
|
114
|
-
const
|
|
115
|
-
|
|
117
|
+
const s = L && t === r ? "" : t, se = n.find((ne) => i(ne) === s) || null;
|
|
118
|
+
C(se), x(s), j(!1);
|
|
116
119
|
},
|
|
117
|
-
[
|
|
118
|
-
),
|
|
120
|
+
[r, x, L, n, i]
|
|
121
|
+
), ee = A(
|
|
119
122
|
(t) => {
|
|
120
|
-
t.stopPropagation(), t.preventDefault(),
|
|
123
|
+
t.stopPropagation(), t.preventDefault(), C(null), x(""), j(!1);
|
|
121
124
|
},
|
|
122
|
-
[
|
|
123
|
-
),
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */ e(
|
|
128
|
-
|
|
125
|
+
[x]
|
|
126
|
+
), te = p.useId();
|
|
127
|
+
return /* @__PURE__ */ o("div", { className: S("space-y-1.5", w && "w-full"), children: [
|
|
128
|
+
z && /* @__PURE__ */ e(le, { className: $, children: z }),
|
|
129
|
+
/* @__PURE__ */ e("div", { ref: K, className: "relative", "data-slot": "async-select", children: /* @__PURE__ */ o(ae, { open: l, onOpenChange: j, children: [
|
|
130
|
+
/* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ e(
|
|
131
|
+
"button",
|
|
129
132
|
{
|
|
130
|
-
id:
|
|
133
|
+
id: te,
|
|
131
134
|
type: "button",
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"
|
|
135
|
+
disabled: W,
|
|
136
|
+
className: S(
|
|
137
|
+
ge({ size: J }),
|
|
138
|
+
W && "cursor-not-allowed opacity-50",
|
|
139
|
+
q,
|
|
140
|
+
"font-normal",
|
|
141
|
+
w && "w-full",
|
|
142
|
+
"focus-visible:ring-d-ring focus-visible:ring-1",
|
|
143
|
+
l && "ring-d-ring ring-1"
|
|
140
144
|
),
|
|
141
|
-
style: { width:
|
|
142
|
-
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
|
|
145
|
+
style: w ? void 0 : { width: m },
|
|
146
|
+
ref: T,
|
|
147
|
+
children: /* @__PURE__ */ o("div", { className: "flex w-full flex-1 items-center justify-between overflow-hidden", children: [
|
|
148
|
+
E ? /* @__PURE__ */ e("div", { className: "truncate", children: g(E) }) : /* @__PURE__ */ e("span", { className: "text-d-muted-foreground hover:text-d-foreground", children: O }),
|
|
149
|
+
/* @__PURE__ */ o("div", { className: "flex w-full items-center justify-end gap-1", children: [
|
|
150
|
+
L && E && /* @__PURE__ */ e(
|
|
147
151
|
"div",
|
|
148
152
|
{
|
|
149
|
-
className: "
|
|
150
|
-
onClick:
|
|
153
|
+
className: "border-d-input bg-d-accent cursor-pointer rounded-full p-1",
|
|
154
|
+
onClick: ee,
|
|
151
155
|
onMouseDown: (t) => t.preventDefault(),
|
|
152
156
|
"aria-label": "Clear selection",
|
|
153
|
-
children: /* @__PURE__ */ e(
|
|
157
|
+
children: /* @__PURE__ */ e(
|
|
158
|
+
B,
|
|
159
|
+
{
|
|
160
|
+
name: "X",
|
|
161
|
+
size: "xs",
|
|
162
|
+
className: "!text-d-foreground opacity-50"
|
|
163
|
+
}
|
|
164
|
+
)
|
|
154
165
|
}
|
|
155
166
|
),
|
|
156
|
-
/* @__PURE__ */ e(
|
|
167
|
+
/* @__PURE__ */ e(
|
|
168
|
+
B,
|
|
169
|
+
{
|
|
170
|
+
name: "ChevronsUpDown",
|
|
171
|
+
size: "xs",
|
|
172
|
+
className: "!text-d-foreground opacity-50"
|
|
173
|
+
}
|
|
174
|
+
)
|
|
157
175
|
] })
|
|
158
176
|
] })
|
|
159
177
|
}
|
|
160
178
|
) }),
|
|
161
179
|
/* @__PURE__ */ e(
|
|
162
|
-
|
|
180
|
+
ce,
|
|
163
181
|
{
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
182
|
+
className: S("p-0"),
|
|
183
|
+
style: {
|
|
184
|
+
width: w ? Z : typeof m == "number" ? `${m}px` : m
|
|
185
|
+
},
|
|
186
|
+
align: "start",
|
|
187
|
+
side: "bottom",
|
|
188
|
+
sideOffset: 4,
|
|
189
|
+
onWheel: (t) => t.stopPropagation(),
|
|
190
|
+
avoidCollisions: !1,
|
|
191
|
+
children: /* @__PURE__ */ o(
|
|
192
|
+
de,
|
|
193
|
+
{
|
|
194
|
+
shouldFilter: !1,
|
|
195
|
+
className: "w-full border-none shadow-lg",
|
|
196
|
+
children: [
|
|
197
|
+
/* @__PURE__ */ e(
|
|
198
|
+
fe,
|
|
199
|
+
{
|
|
200
|
+
ref: I,
|
|
201
|
+
placeholder: O,
|
|
202
|
+
value: D,
|
|
203
|
+
onValueChange: Y
|
|
176
204
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
205
|
+
),
|
|
206
|
+
y && n.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ e(pe, { className: "h-4 w-4 animate-spin" }) }),
|
|
207
|
+
/* @__PURE__ */ o(me, { ref: Q, children: [
|
|
208
|
+
N && /* @__PURE__ */ e("div", { className: "text-d-destructive p-3 text-center", children: N }),
|
|
209
|
+
y && n.length === 0 && (X || /* @__PURE__ */ e(xe, {})),
|
|
210
|
+
!y && !N && n.length === 0 && (U || /* @__PURE__ */ e(ue, { children: H || "No results found." })),
|
|
211
|
+
!y && !N && n.length > 0 && /* @__PURE__ */ e(G, { children: n.map((t) => /* @__PURE__ */ o(
|
|
212
|
+
M,
|
|
213
|
+
{
|
|
214
|
+
value: i(t),
|
|
215
|
+
onSelect: V,
|
|
216
|
+
className: "cursor-pointer",
|
|
217
|
+
children: [
|
|
218
|
+
k ? k(t) : /* @__PURE__ */ e("span", { children: g(t) }),
|
|
219
|
+
/* @__PURE__ */ e(
|
|
220
|
+
he,
|
|
221
|
+
{
|
|
222
|
+
className: S(
|
|
223
|
+
"ml-auto h-4 w-4",
|
|
224
|
+
r === i(t) ? "opacity-100" : "opacity-0"
|
|
225
|
+
)
|
|
226
|
+
}
|
|
198
227
|
)
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
i(t)
|
|
231
|
+
)) })
|
|
232
|
+
] })
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
)
|
|
207
236
|
}
|
|
208
237
|
)
|
|
209
|
-
] })
|
|
238
|
+
] }) })
|
|
210
239
|
] });
|
|
211
240
|
}
|
|
212
|
-
function
|
|
213
|
-
return /* @__PURE__ */ e(
|
|
241
|
+
function xe() {
|
|
242
|
+
return /* @__PURE__ */ e(G, { children: [1, 2, 3].map((c) => /* @__PURE__ */ e(M, { disabled: !0, children: /* @__PURE__ */ o("div", { className: "flex w-full items-center gap-2", children: [
|
|
214
243
|
/* @__PURE__ */ e("div", { className: "bg-d-secondary h-6 w-6 animate-pulse rounded-full" }),
|
|
215
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ o("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
216
245
|
/* @__PURE__ */ e("div", { className: "bg-d-secondary h-4 w-24 animate-pulse rounded" }),
|
|
217
246
|
/* @__PURE__ */ e("div", { className: "bg-d-secondary h-3 w-16 animate-pulse rounded" })
|
|
218
247
|
] })
|
|
219
248
|
] }) }, c)) });
|
|
220
249
|
}
|
|
221
250
|
export {
|
|
222
|
-
|
|
251
|
+
Te as AsyncSelect,
|
|
252
|
+
ge as asyncSelectTriggerVariants
|
|
223
253
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import { Root as v } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
-
import { cva as
|
|
4
|
+
import { cva as m } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
5
|
import { cn as l } from "../../lib/utils.js";
|
|
6
6
|
import { Icon as u } from "./icon.js";
|
|
7
|
-
const
|
|
8
|
-
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:ring-[3px] aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive
|
|
7
|
+
const b = m(
|
|
8
|
+
"cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:ring-[3px] aria-invalid:ring-d-destructive/20 dark:aria-invalid:ring-d-destructive/40 aria-invalid:border-d-destructive transition-all duration-200 ease-out transform-gpu active:scale-[0.98] active:shadow-sm overflow-hidden relative group",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-d-primary text-d-primary-foreground shadow-xs hover:bg-d-primary/90",
|
|
13
|
-
destructive: "bg-d-destructive text-white shadow-xs hover:bg-d-destructive/90 focus-visible:ring-d-destructive/20 dark:focus-visible:ring-d-destructive/40 dark:bg-d-destructive/60",
|
|
14
|
-
outline: "border bg-d-background shadow-xs hover:bg-d-accent hover:text-d-accent-foreground dark:bg-d-input/30 dark:border-d-input dark:hover:bg-d-input/50",
|
|
15
|
-
"outline-primary": "border !border-d-primary bg-d-background shadow-xs text-d-primary/80 hover:!text-d-primary",
|
|
16
|
-
secondary: "bg-d-secondary text-d-secondary-foreground shadow-xs hover:bg-d-secondary/80 hover:text-d-secondary-foreground",
|
|
12
|
+
default: "bg-d-primary text-d-primary-foreground shadow-xs hover:bg-d-primary/90 hover:shadow-d-primary/25 before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 before:ease-out",
|
|
13
|
+
destructive: "bg-d-destructive text-white shadow-xs hover:bg-d-destructive/90 hover:shadow-d-destructive/25 focus-visible:ring-d-destructive/20 dark:focus-visible:ring-d-destructive/40 dark:bg-d-destructive/60 before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700 before:ease-out",
|
|
14
|
+
outline: "border bg-d-background shadow-xs hover:bg-d-accent hover:text-d-accent-foreground hover:border-d-accent dark:bg-d-input/30 dark:border-d-input dark:hover:bg-d-input/50",
|
|
15
|
+
"outline-primary": "border !border-d-primary bg-d-background shadow-xs text-d-primary/80 hover:!text-d-primary hover:bg-d-primary/5 hover:border-d-primary/80 ",
|
|
16
|
+
secondary: "bg-d-secondary text-d-secondary-foreground shadow-xs hover:bg-d-secondary/80 hover:text-d-secondary-foreground ",
|
|
17
17
|
ghost: "hover:bg-d-accent hover:text-d-accent-foreground dark:hover:bg-d-accent",
|
|
18
18
|
link: "text-d-primary underline-offset-4 hover:underline"
|
|
19
19
|
},
|
|
@@ -30,42 +30,42 @@ const m = h(
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
function
|
|
34
|
-
className:
|
|
35
|
-
variant:
|
|
36
|
-
size:
|
|
37
|
-
asChild:
|
|
33
|
+
function w({
|
|
34
|
+
className: o,
|
|
35
|
+
variant: a,
|
|
36
|
+
size: e,
|
|
37
|
+
asChild: d = !1,
|
|
38
38
|
iconLeft: n,
|
|
39
|
-
iconRight:
|
|
40
|
-
isLoading:
|
|
39
|
+
iconRight: s,
|
|
40
|
+
isLoading: f = !1,
|
|
41
41
|
...t
|
|
42
42
|
}) {
|
|
43
|
-
const
|
|
44
|
-
return
|
|
45
|
-
|
|
43
|
+
const i = d ? v : "button";
|
|
44
|
+
return d ? /* @__PURE__ */ r(
|
|
45
|
+
i,
|
|
46
46
|
{
|
|
47
47
|
"data-slot": "button",
|
|
48
|
-
className: l(
|
|
48
|
+
className: l(b({ variant: a, size: e, className: o })),
|
|
49
49
|
...t
|
|
50
50
|
}
|
|
51
51
|
) : /* @__PURE__ */ c(
|
|
52
|
-
|
|
52
|
+
i,
|
|
53
53
|
{
|
|
54
54
|
"data-slot": "button",
|
|
55
|
-
className: l(
|
|
55
|
+
className: l(b({ variant: a, size: e, className: o }), "relative"),
|
|
56
56
|
...t,
|
|
57
57
|
children: [
|
|
58
|
-
|
|
58
|
+
f ? /* @__PURE__ */ c(
|
|
59
59
|
"svg",
|
|
60
60
|
{
|
|
61
61
|
className: "mr-1 -ml-1 animate-spin",
|
|
62
62
|
xmlns: "http://www.w3.org/2000/svg",
|
|
63
63
|
fill: "none",
|
|
64
64
|
viewBox: "0 0 24 24",
|
|
65
|
-
width:
|
|
66
|
-
height:
|
|
65
|
+
width: e === "sm" ? 14 : e === "lg" ? 20 : 16,
|
|
66
|
+
height: e === "sm" ? 14 : e === "lg" ? 20 : 16,
|
|
67
67
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ r(
|
|
69
69
|
"circle",
|
|
70
70
|
{
|
|
71
71
|
className: "opacity-25",
|
|
@@ -76,7 +76,7 @@ function k({
|
|
|
76
76
|
strokeWidth: "4"
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ r(
|
|
80
80
|
"path",
|
|
81
81
|
{
|
|
82
82
|
className: "opacity-75",
|
|
@@ -86,19 +86,19 @@ function k({
|
|
|
86
86
|
)
|
|
87
87
|
]
|
|
88
88
|
}
|
|
89
|
-
) : n && /* @__PURE__ */
|
|
89
|
+
) : n && /* @__PURE__ */ r(
|
|
90
90
|
u,
|
|
91
91
|
{
|
|
92
92
|
name: n,
|
|
93
|
-
size:
|
|
93
|
+
size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
96
|
t.children,
|
|
97
|
-
|
|
97
|
+
s && /* @__PURE__ */ r(
|
|
98
98
|
u,
|
|
99
99
|
{
|
|
100
|
-
name:
|
|
101
|
-
size:
|
|
100
|
+
name: s,
|
|
101
|
+
size: e === "default" ? "md" : e === "sm" ? "xs" : "sm"
|
|
102
102
|
}
|
|
103
103
|
)
|
|
104
104
|
]
|
|
@@ -106,6 +106,6 @@ function k({
|
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
108
|
export {
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
w as Button,
|
|
110
|
+
b as buttonVariants
|
|
111
111
|
};
|
|
@@ -64,7 +64,7 @@ function B({
|
|
|
64
64
|
t.dropdowns
|
|
65
65
|
),
|
|
66
66
|
dropdown_root: e(
|
|
67
|
-
"relative has-focus:border-ring border border-d-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
67
|
+
"relative has-focus:border-ring border border-d-input shadow-xs has-focus:ring-d-ring/50 has-focus:ring-[3px] rounded-md",
|
|
68
68
|
t.dropdown_root
|
|
69
69
|
),
|
|
70
70
|
dropdown: e("absolute inset-0 opacity-0", t.dropdown),
|
|
@@ -159,7 +159,7 @@ function v({
|
|
|
159
159
|
"data-range-end": r.range_end,
|
|
160
160
|
"data-range-middle": r.range_middle,
|
|
161
161
|
className: e(
|
|
162
|
-
"data-[selected-single=true]:bg-d-primary data-[selected-single=true]:text-d-primary-foreground data-[range-middle=true]:bg-d-accent data-[range-middle=true]:text-d-accent-foreground data-[range-start=true]:bg-d-primary data-[range-start=true]:text-d-primary-foreground data-[range-end=true]:bg-d-primary data-[range-end=true]:text-d-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-d-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[1px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
162
|
+
"data-[selected-single=true]:bg-d-primary data-[selected-single=true]:text-d-primary-foreground data-[range-middle=true]:bg-d-accent data-[range-middle=true]:text-d-accent-foreground data-[range-start=true]:bg-d-primary data-[range-start=true]:text-d-primary-foreground data-[range-end=true]:bg-d-primary data-[range-end=true]:text-d-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-d-ring/50 dark:hover:text-d-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[1px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
163
163
|
s.day,
|
|
164
164
|
c
|
|
165
165
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
2
|
+
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
4
|
import { cn as g } from "../../lib/utils.js";
|
|
5
5
|
import { buttonVariants as x } from "./button.js";
|
|
6
6
|
import { Icon as h } from "./icon.js";
|
|
@@ -17,20 +17,20 @@ function E({
|
|
|
17
17
|
disabled: t = !1,
|
|
18
18
|
size: o = "default"
|
|
19
19
|
}) {
|
|
20
|
-
const [r, i] =
|
|
21
|
-
|
|
20
|
+
const [r, i] = c.useState(n);
|
|
21
|
+
c.useEffect(() => {
|
|
22
22
|
i(n);
|
|
23
23
|
}, [n]);
|
|
24
24
|
const p = (s) => {
|
|
25
25
|
i(s), a && a(s);
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ d(w, { open: t ? !1 : void 0, children: [
|
|
28
28
|
/* @__PURE__ */ e(P, { asChild: !0, children: /* @__PURE__ */ e(
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
className: g(
|
|
32
32
|
x({ variant: u, size: o }),
|
|
33
|
-
"border-d-input text-d-foreground hover:bg-d-accent bg-d-input ring-offset-background data-[placeholder]:text-d-muted-foreground focus:ring-ring flex items-center justify-between border px-3 py-2 font-normal whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none [&>span]:line-clamp-1",
|
|
33
|
+
"border-d-input text-d-foreground hover:bg-d-accent bg-d-input ring-offset-background data-[placeholder]:text-d-muted-foreground focus:ring-d-ring flex items-center justify-between border px-3 py-2 font-normal whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none [&>span]:line-clamp-1",
|
|
34
34
|
!r && "text-d-muted-foreground",
|
|
35
35
|
t && "cursor-not-allowed opacity-50",
|
|
36
36
|
f,
|
|
@@ -42,7 +42,7 @@ function E({
|
|
|
42
42
|
tabIndex: t ? -1 : 0,
|
|
43
43
|
onClick: t ? void 0 : () => {
|
|
44
44
|
},
|
|
45
|
-
children: /* @__PURE__ */
|
|
45
|
+
children: /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between gap-2", children: [
|
|
46
46
|
/* @__PURE__ */ e(
|
|
47
47
|
h,
|
|
48
48
|
{
|