@mlw-packages/react-components 1.4.7 → 1.4.8
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/index.css +4123 -0
- package/dist/index.d.mts +673 -0
- package/dist/index.d.ts +673 -0
- package/dist/index.js +4939 -0
- package/dist/index.mjs +4935 -0
- package/package.json +1 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,4935 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './index.css';
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
|
|
29
|
+
// node_modules/picocolors/picocolors.browser.js
|
|
30
|
+
var require_picocolors_browser = __commonJS({
|
|
31
|
+
"node_modules/picocolors/picocolors.browser.js"(exports, module) {
|
|
32
|
+
"use strict";
|
|
33
|
+
var x = String;
|
|
34
|
+
var create = function() {
|
|
35
|
+
return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x, blackBright: x, redBright: x, greenBright: x, yellowBright: x, blueBright: x, magentaBright: x, cyanBright: x, whiteBright: x, bgBlackBright: x, bgRedBright: x, bgGreenBright: x, bgYellowBright: x, bgBlueBright: x, bgMagentaBright: x, bgCyanBright: x, bgWhiteBright: x };
|
|
36
|
+
};
|
|
37
|
+
module.exports = create();
|
|
38
|
+
module.exports.createColors = create;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
// node_modules/tailwindcss/lib/util/log.js
|
|
43
|
+
var require_log = __commonJS({
|
|
44
|
+
"node_modules/tailwindcss/lib/util/log.js"(exports) {
|
|
45
|
+
"use strict";
|
|
46
|
+
Object.defineProperty(exports, "__esModule", {
|
|
47
|
+
value: true
|
|
48
|
+
});
|
|
49
|
+
function _export(target, all) {
|
|
50
|
+
for (var name in all) Object.defineProperty(target, name, {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: all[name]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
_export(exports, {
|
|
56
|
+
dim: function() {
|
|
57
|
+
return dim;
|
|
58
|
+
},
|
|
59
|
+
default: function() {
|
|
60
|
+
return _default;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
var _picocolors = /* @__PURE__ */ _interop_require_default(require_picocolors_browser());
|
|
64
|
+
function _interop_require_default(obj) {
|
|
65
|
+
return obj && obj.__esModule ? obj : {
|
|
66
|
+
default: obj
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
var alreadyShown = /* @__PURE__ */ new Set();
|
|
70
|
+
function log(type, messages, key) {
|
|
71
|
+
if (typeof process !== "undefined" && process.env.JEST_WORKER_ID) return;
|
|
72
|
+
if (key && alreadyShown.has(key)) return;
|
|
73
|
+
if (key) alreadyShown.add(key);
|
|
74
|
+
console.warn("");
|
|
75
|
+
messages.forEach((message) => console.warn(type, "-", message));
|
|
76
|
+
}
|
|
77
|
+
function dim(input) {
|
|
78
|
+
return _picocolors.default.dim(input);
|
|
79
|
+
}
|
|
80
|
+
var _default = {
|
|
81
|
+
info(key, messages) {
|
|
82
|
+
log(_picocolors.default.bold(_picocolors.default.cyan("info")), ...Array.isArray(key) ? [
|
|
83
|
+
key
|
|
84
|
+
] : [
|
|
85
|
+
messages,
|
|
86
|
+
key
|
|
87
|
+
]);
|
|
88
|
+
},
|
|
89
|
+
warn(key, messages) {
|
|
90
|
+
log(_picocolors.default.bold(_picocolors.default.yellow("warn")), ...Array.isArray(key) ? [
|
|
91
|
+
key
|
|
92
|
+
] : [
|
|
93
|
+
messages,
|
|
94
|
+
key
|
|
95
|
+
]);
|
|
96
|
+
},
|
|
97
|
+
risk(key, messages) {
|
|
98
|
+
log(_picocolors.default.bold(_picocolors.default.magenta("risk")), ...Array.isArray(key) ? [
|
|
99
|
+
key
|
|
100
|
+
] : [
|
|
101
|
+
messages,
|
|
102
|
+
key
|
|
103
|
+
]);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// node_modules/tailwindcss/lib/public/colors.js
|
|
110
|
+
var require_colors = __commonJS({
|
|
111
|
+
"node_modules/tailwindcss/lib/public/colors.js"(exports) {
|
|
112
|
+
"use strict";
|
|
113
|
+
Object.defineProperty(exports, "__esModule", {
|
|
114
|
+
value: true
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "default", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function() {
|
|
119
|
+
return _default;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
var _log = /* @__PURE__ */ _interop_require_default(require_log());
|
|
123
|
+
function _interop_require_default(obj) {
|
|
124
|
+
return obj && obj.__esModule ? obj : {
|
|
125
|
+
default: obj
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function warn({ version, from, to }) {
|
|
129
|
+
_log.default.warn(`${from}-color-renamed`, [
|
|
130
|
+
`As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`,
|
|
131
|
+
"Update your configuration file to silence this warning."
|
|
132
|
+
]);
|
|
133
|
+
}
|
|
134
|
+
var _default = {
|
|
135
|
+
inherit: "inherit",
|
|
136
|
+
current: "currentColor",
|
|
137
|
+
transparent: "transparent",
|
|
138
|
+
black: "#000",
|
|
139
|
+
white: "#fff",
|
|
140
|
+
slate: {
|
|
141
|
+
50: "#f8fafc",
|
|
142
|
+
100: "#f1f5f9",
|
|
143
|
+
200: "#e2e8f0",
|
|
144
|
+
300: "#cbd5e1",
|
|
145
|
+
400: "#94a3b8",
|
|
146
|
+
500: "#64748b",
|
|
147
|
+
600: "#475569",
|
|
148
|
+
700: "#334155",
|
|
149
|
+
800: "#1e293b",
|
|
150
|
+
900: "#0f172a",
|
|
151
|
+
950: "#020617"
|
|
152
|
+
},
|
|
153
|
+
gray: {
|
|
154
|
+
50: "#f9fafb",
|
|
155
|
+
100: "#f3f4f6",
|
|
156
|
+
200: "#e5e7eb",
|
|
157
|
+
300: "#d1d5db",
|
|
158
|
+
400: "#9ca3af",
|
|
159
|
+
500: "#6b7280",
|
|
160
|
+
600: "#4b5563",
|
|
161
|
+
700: "#374151",
|
|
162
|
+
800: "#1f2937",
|
|
163
|
+
900: "#111827",
|
|
164
|
+
950: "#030712"
|
|
165
|
+
},
|
|
166
|
+
zinc: {
|
|
167
|
+
50: "#fafafa",
|
|
168
|
+
100: "#f4f4f5",
|
|
169
|
+
200: "#e4e4e7",
|
|
170
|
+
300: "#d4d4d8",
|
|
171
|
+
400: "#a1a1aa",
|
|
172
|
+
500: "#71717a",
|
|
173
|
+
600: "#52525b",
|
|
174
|
+
700: "#3f3f46",
|
|
175
|
+
800: "#27272a",
|
|
176
|
+
900: "#18181b",
|
|
177
|
+
950: "#09090b"
|
|
178
|
+
},
|
|
179
|
+
neutral: {
|
|
180
|
+
50: "#fafafa",
|
|
181
|
+
100: "#f5f5f5",
|
|
182
|
+
200: "#e5e5e5",
|
|
183
|
+
300: "#d4d4d4",
|
|
184
|
+
400: "#a3a3a3",
|
|
185
|
+
500: "#737373",
|
|
186
|
+
600: "#525252",
|
|
187
|
+
700: "#404040",
|
|
188
|
+
800: "#262626",
|
|
189
|
+
900: "#171717",
|
|
190
|
+
950: "#0a0a0a"
|
|
191
|
+
},
|
|
192
|
+
stone: {
|
|
193
|
+
50: "#fafaf9",
|
|
194
|
+
100: "#f5f5f4",
|
|
195
|
+
200: "#e7e5e4",
|
|
196
|
+
300: "#d6d3d1",
|
|
197
|
+
400: "#a8a29e",
|
|
198
|
+
500: "#78716c",
|
|
199
|
+
600: "#57534e",
|
|
200
|
+
700: "#44403c",
|
|
201
|
+
800: "#292524",
|
|
202
|
+
900: "#1c1917",
|
|
203
|
+
950: "#0c0a09"
|
|
204
|
+
},
|
|
205
|
+
red: {
|
|
206
|
+
50: "#fef2f2",
|
|
207
|
+
100: "#fee2e2",
|
|
208
|
+
200: "#fecaca",
|
|
209
|
+
300: "#fca5a5",
|
|
210
|
+
400: "#f87171",
|
|
211
|
+
500: "#ef4444",
|
|
212
|
+
600: "#dc2626",
|
|
213
|
+
700: "#b91c1c",
|
|
214
|
+
800: "#991b1b",
|
|
215
|
+
900: "#7f1d1d",
|
|
216
|
+
950: "#450a0a"
|
|
217
|
+
},
|
|
218
|
+
orange: {
|
|
219
|
+
50: "#fff7ed",
|
|
220
|
+
100: "#ffedd5",
|
|
221
|
+
200: "#fed7aa",
|
|
222
|
+
300: "#fdba74",
|
|
223
|
+
400: "#fb923c",
|
|
224
|
+
500: "#f97316",
|
|
225
|
+
600: "#ea580c",
|
|
226
|
+
700: "#c2410c",
|
|
227
|
+
800: "#9a3412",
|
|
228
|
+
900: "#7c2d12",
|
|
229
|
+
950: "#431407"
|
|
230
|
+
},
|
|
231
|
+
amber: {
|
|
232
|
+
50: "#fffbeb",
|
|
233
|
+
100: "#fef3c7",
|
|
234
|
+
200: "#fde68a",
|
|
235
|
+
300: "#fcd34d",
|
|
236
|
+
400: "#fbbf24",
|
|
237
|
+
500: "#f59e0b",
|
|
238
|
+
600: "#d97706",
|
|
239
|
+
700: "#b45309",
|
|
240
|
+
800: "#92400e",
|
|
241
|
+
900: "#78350f",
|
|
242
|
+
950: "#451a03"
|
|
243
|
+
},
|
|
244
|
+
yellow: {
|
|
245
|
+
50: "#fefce8",
|
|
246
|
+
100: "#fef9c3",
|
|
247
|
+
200: "#fef08a",
|
|
248
|
+
300: "#fde047",
|
|
249
|
+
400: "#facc15",
|
|
250
|
+
500: "#eab308",
|
|
251
|
+
600: "#ca8a04",
|
|
252
|
+
700: "#a16207",
|
|
253
|
+
800: "#854d0e",
|
|
254
|
+
900: "#713f12",
|
|
255
|
+
950: "#422006"
|
|
256
|
+
},
|
|
257
|
+
lime: {
|
|
258
|
+
50: "#f7fee7",
|
|
259
|
+
100: "#ecfccb",
|
|
260
|
+
200: "#d9f99d",
|
|
261
|
+
300: "#bef264",
|
|
262
|
+
400: "#a3e635",
|
|
263
|
+
500: "#84cc16",
|
|
264
|
+
600: "#65a30d",
|
|
265
|
+
700: "#4d7c0f",
|
|
266
|
+
800: "#3f6212",
|
|
267
|
+
900: "#365314",
|
|
268
|
+
950: "#1a2e05"
|
|
269
|
+
},
|
|
270
|
+
green: {
|
|
271
|
+
50: "#f0fdf4",
|
|
272
|
+
100: "#dcfce7",
|
|
273
|
+
200: "#bbf7d0",
|
|
274
|
+
300: "#86efac",
|
|
275
|
+
400: "#4ade80",
|
|
276
|
+
500: "#22c55e",
|
|
277
|
+
600: "#16a34a",
|
|
278
|
+
700: "#15803d",
|
|
279
|
+
800: "#166534",
|
|
280
|
+
900: "#14532d",
|
|
281
|
+
950: "#052e16"
|
|
282
|
+
},
|
|
283
|
+
emerald: {
|
|
284
|
+
50: "#ecfdf5",
|
|
285
|
+
100: "#d1fae5",
|
|
286
|
+
200: "#a7f3d0",
|
|
287
|
+
300: "#6ee7b7",
|
|
288
|
+
400: "#34d399",
|
|
289
|
+
500: "#10b981",
|
|
290
|
+
600: "#059669",
|
|
291
|
+
700: "#047857",
|
|
292
|
+
800: "#065f46",
|
|
293
|
+
900: "#064e3b",
|
|
294
|
+
950: "#022c22"
|
|
295
|
+
},
|
|
296
|
+
teal: {
|
|
297
|
+
50: "#f0fdfa",
|
|
298
|
+
100: "#ccfbf1",
|
|
299
|
+
200: "#99f6e4",
|
|
300
|
+
300: "#5eead4",
|
|
301
|
+
400: "#2dd4bf",
|
|
302
|
+
500: "#14b8a6",
|
|
303
|
+
600: "#0d9488",
|
|
304
|
+
700: "#0f766e",
|
|
305
|
+
800: "#115e59",
|
|
306
|
+
900: "#134e4a",
|
|
307
|
+
950: "#042f2e"
|
|
308
|
+
},
|
|
309
|
+
cyan: {
|
|
310
|
+
50: "#ecfeff",
|
|
311
|
+
100: "#cffafe",
|
|
312
|
+
200: "#a5f3fc",
|
|
313
|
+
300: "#67e8f9",
|
|
314
|
+
400: "#22d3ee",
|
|
315
|
+
500: "#06b6d4",
|
|
316
|
+
600: "#0891b2",
|
|
317
|
+
700: "#0e7490",
|
|
318
|
+
800: "#155e75",
|
|
319
|
+
900: "#164e63",
|
|
320
|
+
950: "#083344"
|
|
321
|
+
},
|
|
322
|
+
sky: {
|
|
323
|
+
50: "#f0f9ff",
|
|
324
|
+
100: "#e0f2fe",
|
|
325
|
+
200: "#bae6fd",
|
|
326
|
+
300: "#7dd3fc",
|
|
327
|
+
400: "#38bdf8",
|
|
328
|
+
500: "#0ea5e9",
|
|
329
|
+
600: "#0284c7",
|
|
330
|
+
700: "#0369a1",
|
|
331
|
+
800: "#075985",
|
|
332
|
+
900: "#0c4a6e",
|
|
333
|
+
950: "#082f49"
|
|
334
|
+
},
|
|
335
|
+
blue: {
|
|
336
|
+
50: "#eff6ff",
|
|
337
|
+
100: "#dbeafe",
|
|
338
|
+
200: "#bfdbfe",
|
|
339
|
+
300: "#93c5fd",
|
|
340
|
+
400: "#60a5fa",
|
|
341
|
+
500: "#3b82f6",
|
|
342
|
+
600: "#2563eb",
|
|
343
|
+
700: "#1d4ed8",
|
|
344
|
+
800: "#1e40af",
|
|
345
|
+
900: "#1e3a8a",
|
|
346
|
+
950: "#172554"
|
|
347
|
+
},
|
|
348
|
+
indigo: {
|
|
349
|
+
50: "#eef2ff",
|
|
350
|
+
100: "#e0e7ff",
|
|
351
|
+
200: "#c7d2fe",
|
|
352
|
+
300: "#a5b4fc",
|
|
353
|
+
400: "#818cf8",
|
|
354
|
+
500: "#6366f1",
|
|
355
|
+
600: "#4f46e5",
|
|
356
|
+
700: "#4338ca",
|
|
357
|
+
800: "#3730a3",
|
|
358
|
+
900: "#312e81",
|
|
359
|
+
950: "#1e1b4b"
|
|
360
|
+
},
|
|
361
|
+
violet: {
|
|
362
|
+
50: "#f5f3ff",
|
|
363
|
+
100: "#ede9fe",
|
|
364
|
+
200: "#ddd6fe",
|
|
365
|
+
300: "#c4b5fd",
|
|
366
|
+
400: "#a78bfa",
|
|
367
|
+
500: "#8b5cf6",
|
|
368
|
+
600: "#7c3aed",
|
|
369
|
+
700: "#6d28d9",
|
|
370
|
+
800: "#5b21b6",
|
|
371
|
+
900: "#4c1d95",
|
|
372
|
+
950: "#2e1065"
|
|
373
|
+
},
|
|
374
|
+
purple: {
|
|
375
|
+
50: "#faf5ff",
|
|
376
|
+
100: "#f3e8ff",
|
|
377
|
+
200: "#e9d5ff",
|
|
378
|
+
300: "#d8b4fe",
|
|
379
|
+
400: "#c084fc",
|
|
380
|
+
500: "#a855f7",
|
|
381
|
+
600: "#9333ea",
|
|
382
|
+
700: "#7e22ce",
|
|
383
|
+
800: "#6b21a8",
|
|
384
|
+
900: "#581c87",
|
|
385
|
+
950: "#3b0764"
|
|
386
|
+
},
|
|
387
|
+
fuchsia: {
|
|
388
|
+
50: "#fdf4ff",
|
|
389
|
+
100: "#fae8ff",
|
|
390
|
+
200: "#f5d0fe",
|
|
391
|
+
300: "#f0abfc",
|
|
392
|
+
400: "#e879f9",
|
|
393
|
+
500: "#d946ef",
|
|
394
|
+
600: "#c026d3",
|
|
395
|
+
700: "#a21caf",
|
|
396
|
+
800: "#86198f",
|
|
397
|
+
900: "#701a75",
|
|
398
|
+
950: "#4a044e"
|
|
399
|
+
},
|
|
400
|
+
pink: {
|
|
401
|
+
50: "#fdf2f8",
|
|
402
|
+
100: "#fce7f3",
|
|
403
|
+
200: "#fbcfe8",
|
|
404
|
+
300: "#f9a8d4",
|
|
405
|
+
400: "#f472b6",
|
|
406
|
+
500: "#ec4899",
|
|
407
|
+
600: "#db2777",
|
|
408
|
+
700: "#be185d",
|
|
409
|
+
800: "#9d174d",
|
|
410
|
+
900: "#831843",
|
|
411
|
+
950: "#500724"
|
|
412
|
+
},
|
|
413
|
+
rose: {
|
|
414
|
+
50: "#fff1f2",
|
|
415
|
+
100: "#ffe4e6",
|
|
416
|
+
200: "#fecdd3",
|
|
417
|
+
300: "#fda4af",
|
|
418
|
+
400: "#fb7185",
|
|
419
|
+
500: "#f43f5e",
|
|
420
|
+
600: "#e11d48",
|
|
421
|
+
700: "#be123c",
|
|
422
|
+
800: "#9f1239",
|
|
423
|
+
900: "#881337",
|
|
424
|
+
950: "#4c0519"
|
|
425
|
+
},
|
|
426
|
+
get lightBlue() {
|
|
427
|
+
warn({
|
|
428
|
+
version: "v2.2",
|
|
429
|
+
from: "lightBlue",
|
|
430
|
+
to: "sky"
|
|
431
|
+
});
|
|
432
|
+
return this.sky;
|
|
433
|
+
},
|
|
434
|
+
get warmGray() {
|
|
435
|
+
warn({
|
|
436
|
+
version: "v3.0",
|
|
437
|
+
from: "warmGray",
|
|
438
|
+
to: "stone"
|
|
439
|
+
});
|
|
440
|
+
return this.stone;
|
|
441
|
+
},
|
|
442
|
+
get trueGray() {
|
|
443
|
+
warn({
|
|
444
|
+
version: "v3.0",
|
|
445
|
+
from: "trueGray",
|
|
446
|
+
to: "neutral"
|
|
447
|
+
});
|
|
448
|
+
return this.neutral;
|
|
449
|
+
},
|
|
450
|
+
get coolGray() {
|
|
451
|
+
warn({
|
|
452
|
+
version: "v3.0",
|
|
453
|
+
from: "coolGray",
|
|
454
|
+
to: "gray"
|
|
455
|
+
});
|
|
456
|
+
return this.gray;
|
|
457
|
+
},
|
|
458
|
+
get blueGray() {
|
|
459
|
+
warn({
|
|
460
|
+
version: "v3.0",
|
|
461
|
+
from: "blueGray",
|
|
462
|
+
to: "slate"
|
|
463
|
+
});
|
|
464
|
+
return this.slate;
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
}
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
// node_modules/tailwindcss/colors.js
|
|
471
|
+
var require_colors2 = __commonJS({
|
|
472
|
+
"node_modules/tailwindcss/colors.js"(exports, module) {
|
|
473
|
+
"use strict";
|
|
474
|
+
var colors2 = require_colors();
|
|
475
|
+
module.exports = (colors2.__esModule ? colors2 : { default: colors2 }).default;
|
|
476
|
+
}
|
|
477
|
+
});
|
|
478
|
+
|
|
479
|
+
// src/components/ui/AlertDialogBase.tsx
|
|
480
|
+
import * as React2 from "react";
|
|
481
|
+
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
482
|
+
|
|
483
|
+
// src/lib/utils.ts
|
|
484
|
+
import { clsx } from "clsx";
|
|
485
|
+
import { twMerge } from "tailwind-merge";
|
|
486
|
+
function cn(...inputs) {
|
|
487
|
+
return twMerge(clsx(inputs));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
// src/components/ui/ButtonBase.tsx
|
|
491
|
+
import * as React from "react";
|
|
492
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
493
|
+
import { cva } from "class-variance-authority";
|
|
494
|
+
import { jsx } from "react/jsx-runtime";
|
|
495
|
+
var buttonVariantsBase = cva(
|
|
496
|
+
`
|
|
497
|
+
inline-flex items-center justify-center gap-2
|
|
498
|
+
whitespace-nowrap rounded-md text-sm
|
|
499
|
+
transition-all duration-200
|
|
500
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
|
|
501
|
+
disabled:pointer-events-none disabled:opacity-50
|
|
502
|
+
active:scale-[0.97]
|
|
503
|
+
[&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-transparent
|
|
504
|
+
`,
|
|
505
|
+
{
|
|
506
|
+
variants: {
|
|
507
|
+
variant: {
|
|
508
|
+
default: "bg-primary text-primary-foreground shadow hover:opacity-90 hover:shadow-md",
|
|
509
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",
|
|
510
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground hover:shadow-md",
|
|
511
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm border border-transparent hover:opacity-80 hover:shadow-md",
|
|
512
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
513
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
514
|
+
},
|
|
515
|
+
size: {
|
|
516
|
+
default: "px-4 py-1.5",
|
|
517
|
+
sm: "rounded-md px-3 text-xs",
|
|
518
|
+
lg: "rounded-md px-8",
|
|
519
|
+
icon: "h-9 w-9"
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
defaultVariants: {
|
|
523
|
+
variant: "default",
|
|
524
|
+
size: "default"
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
);
|
|
528
|
+
var ButtonBase = React.forwardRef(
|
|
529
|
+
({ className, variant, size, asChild = false, testid = `button-${variant ?? "default"}`, ...props }, ref) => {
|
|
530
|
+
const Comp = asChild ? Slot : "button";
|
|
531
|
+
return /* @__PURE__ */ jsx(
|
|
532
|
+
Comp,
|
|
533
|
+
{
|
|
534
|
+
className: cn(buttonVariantsBase({ variant, size, className })),
|
|
535
|
+
ref,
|
|
536
|
+
"data-testid": testid ?? `button-${variant ?? "default"}`,
|
|
537
|
+
...props
|
|
538
|
+
}
|
|
539
|
+
);
|
|
540
|
+
}
|
|
541
|
+
);
|
|
542
|
+
ButtonBase.displayName = "Button";
|
|
543
|
+
var ButtonGroupBase = React.forwardRef(
|
|
544
|
+
({ className, children, orientation = "horizontal", ...props }, ref) => {
|
|
545
|
+
return /* @__PURE__ */ jsx(
|
|
546
|
+
"div",
|
|
547
|
+
{
|
|
548
|
+
ref,
|
|
549
|
+
className: cn(
|
|
550
|
+
"inline-flex",
|
|
551
|
+
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
552
|
+
"rounded-md overflow-hidden isolate",
|
|
553
|
+
className
|
|
554
|
+
),
|
|
555
|
+
...props,
|
|
556
|
+
children: React.Children.map(children, (child, index) => {
|
|
557
|
+
if (!React.isValidElement(child)) return child;
|
|
558
|
+
const typedChild = child;
|
|
559
|
+
return React.cloneElement(typedChild, {
|
|
560
|
+
className: cn(
|
|
561
|
+
typedChild.props.className,
|
|
562
|
+
"rounded-none border-0",
|
|
563
|
+
index === 0 && orientation === "horizontal" && "rounded-l-md",
|
|
564
|
+
index === 0 && orientation === "vertical" && "rounded-t-md",
|
|
565
|
+
index === React.Children.count(children) - 1 && orientation === "horizontal" && "rounded-r-md",
|
|
566
|
+
index === React.Children.count(children) - 1 && orientation === "vertical" && "rounded-b-md"
|
|
567
|
+
)
|
|
568
|
+
});
|
|
569
|
+
})
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
ButtonGroupBase.displayName = "ButtonGroup";
|
|
575
|
+
|
|
576
|
+
// src/components/ui/AlertDialogBase.tsx
|
|
577
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
578
|
+
var AlertDialogBase = AlertDialogPrimitive.Root;
|
|
579
|
+
var AlertDialogTriggerBase = AlertDialogPrimitive.Trigger;
|
|
580
|
+
var AlertDialogPortalBase = AlertDialogPrimitive.Portal;
|
|
581
|
+
var AlertDialogOverlayBase = React2.forwardRef(({ className, testid = "alertdialog-overlay", ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
582
|
+
AlertDialogPrimitive.Overlay,
|
|
583
|
+
{
|
|
584
|
+
className: cn(
|
|
585
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
586
|
+
className
|
|
587
|
+
),
|
|
588
|
+
"data-testid": testid,
|
|
589
|
+
...props,
|
|
590
|
+
ref
|
|
591
|
+
}
|
|
592
|
+
));
|
|
593
|
+
AlertDialogOverlayBase.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
594
|
+
var AlertDialogContentBase = React2.forwardRef(({ className, testid = "alertdialog-content", ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortalBase, { children: [
|
|
595
|
+
/* @__PURE__ */ jsx2(AlertDialogOverlayBase, {}),
|
|
596
|
+
/* @__PURE__ */ jsx2(
|
|
597
|
+
AlertDialogPrimitive.Content,
|
|
598
|
+
{
|
|
599
|
+
ref,
|
|
600
|
+
className: cn(
|
|
601
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
602
|
+
className
|
|
603
|
+
),
|
|
604
|
+
"data-testid": testid,
|
|
605
|
+
...props
|
|
606
|
+
}
|
|
607
|
+
)
|
|
608
|
+
] }));
|
|
609
|
+
AlertDialogContentBase.displayName = AlertDialogPrimitive.Content.displayName;
|
|
610
|
+
var AlertDialogHeaderBase = ({
|
|
611
|
+
className,
|
|
612
|
+
...props
|
|
613
|
+
}) => /* @__PURE__ */ jsx2(
|
|
614
|
+
"div",
|
|
615
|
+
{
|
|
616
|
+
className: cn(
|
|
617
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
618
|
+
className
|
|
619
|
+
),
|
|
620
|
+
...props
|
|
621
|
+
}
|
|
622
|
+
);
|
|
623
|
+
AlertDialogHeaderBase.displayName = "AlertDialogHeaderBase";
|
|
624
|
+
var AlertDialogFooterBase = ({
|
|
625
|
+
className,
|
|
626
|
+
...props
|
|
627
|
+
}) => /* @__PURE__ */ jsx2(
|
|
628
|
+
"div",
|
|
629
|
+
{
|
|
630
|
+
className: cn(
|
|
631
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
632
|
+
className
|
|
633
|
+
),
|
|
634
|
+
...props
|
|
635
|
+
}
|
|
636
|
+
);
|
|
637
|
+
AlertDialogFooterBase.displayName = "AlertDialogFooterBase";
|
|
638
|
+
var AlertDialogTitleBase = React2.forwardRef(({ className, testid = "alertdialog-title", ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
639
|
+
AlertDialogPrimitive.Title,
|
|
640
|
+
{
|
|
641
|
+
ref,
|
|
642
|
+
className: cn("text-lg font-semibold", className),
|
|
643
|
+
"data-testid": testid,
|
|
644
|
+
...props
|
|
645
|
+
}
|
|
646
|
+
));
|
|
647
|
+
AlertDialogTitleBase.displayName = AlertDialogPrimitive.Title.displayName;
|
|
648
|
+
var AlertDialogDescriptionBase = React2.forwardRef(({ className, testid = "alertdialog-description", ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
649
|
+
AlertDialogPrimitive.Description,
|
|
650
|
+
{
|
|
651
|
+
ref,
|
|
652
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
653
|
+
"data-testid": testid,
|
|
654
|
+
...props
|
|
655
|
+
}
|
|
656
|
+
));
|
|
657
|
+
AlertDialogDescriptionBase.displayName = AlertDialogPrimitive.Description.displayName;
|
|
658
|
+
var AlertDialogActionBase = React2.forwardRef(({ className, testid = "alertdialog-action", ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
659
|
+
AlertDialogPrimitive.Action,
|
|
660
|
+
{
|
|
661
|
+
ref,
|
|
662
|
+
className: cn(buttonVariantsBase(), className),
|
|
663
|
+
"data-testid": testid,
|
|
664
|
+
...props
|
|
665
|
+
}
|
|
666
|
+
));
|
|
667
|
+
AlertDialogActionBase.displayName = AlertDialogPrimitive.Action.displayName;
|
|
668
|
+
var AlertDialogCancelBase = React2.forwardRef(({ className, testid = "alertdialog-cancel", ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
669
|
+
AlertDialogPrimitive.Cancel,
|
|
670
|
+
{
|
|
671
|
+
ref,
|
|
672
|
+
className: cn(
|
|
673
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
674
|
+
"mt-2 sm:mt-0",
|
|
675
|
+
className
|
|
676
|
+
),
|
|
677
|
+
"data-testid": testid,
|
|
678
|
+
...props
|
|
679
|
+
}
|
|
680
|
+
));
|
|
681
|
+
AlertDialogCancelBase.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
682
|
+
|
|
683
|
+
// src/components/ui/AvatarBase.tsx
|
|
684
|
+
import * as React3 from "react";
|
|
685
|
+
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
686
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
687
|
+
var AvatarBase = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
688
|
+
AvatarPrimitive.Root,
|
|
689
|
+
{
|
|
690
|
+
ref,
|
|
691
|
+
className: cn(
|
|
692
|
+
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
693
|
+
className
|
|
694
|
+
),
|
|
695
|
+
...props
|
|
696
|
+
}
|
|
697
|
+
));
|
|
698
|
+
AvatarBase.displayName = AvatarPrimitive.Root.displayName;
|
|
699
|
+
var AvatarImageBase = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
700
|
+
AvatarPrimitive.Image,
|
|
701
|
+
{
|
|
702
|
+
ref,
|
|
703
|
+
className: cn("aspect-square h-full w-full", className),
|
|
704
|
+
...props
|
|
705
|
+
}
|
|
706
|
+
));
|
|
707
|
+
AvatarImageBase.displayName = AvatarPrimitive.Image.displayName;
|
|
708
|
+
var AvatarFallbackBase = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
709
|
+
AvatarPrimitive.Fallback,
|
|
710
|
+
{
|
|
711
|
+
ref,
|
|
712
|
+
className: cn(
|
|
713
|
+
"flex h-full w-full items-center justify-center rounded-full bg-muted",
|
|
714
|
+
className
|
|
715
|
+
),
|
|
716
|
+
...props
|
|
717
|
+
}
|
|
718
|
+
));
|
|
719
|
+
AvatarFallbackBase.displayName = AvatarPrimitive.Fallback.displayName;
|
|
720
|
+
|
|
721
|
+
// src/components/ui/BadgeBase.tsx
|
|
722
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
723
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
724
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
725
|
+
var tailwindColors = {
|
|
726
|
+
// Red
|
|
727
|
+
"red-50": "#fef2f2",
|
|
728
|
+
"red-100": "#fee2e2",
|
|
729
|
+
"red-200": "#fecaca",
|
|
730
|
+
"red-300": "#fca5a5",
|
|
731
|
+
"red-400": "#f87171",
|
|
732
|
+
"red-500": "#ef4444",
|
|
733
|
+
"red-600": "#dc2626",
|
|
734
|
+
"red-700": "#b91c1c",
|
|
735
|
+
"red-800": "#991b1b",
|
|
736
|
+
"red-900": "#7f1d1d",
|
|
737
|
+
// Orange
|
|
738
|
+
"orange-50": "#fff7ed",
|
|
739
|
+
"orange-100": "#ffedd5",
|
|
740
|
+
"orange-200": "#fed7aa",
|
|
741
|
+
"orange-300": "#fdba74",
|
|
742
|
+
"orange-400": "#fb923c",
|
|
743
|
+
"orange-500": "#f97316",
|
|
744
|
+
"orange-600": "#ea580c",
|
|
745
|
+
"orange-700": "#c2410c",
|
|
746
|
+
"orange-800": "#9a3412",
|
|
747
|
+
"orange-900": "#7c2d12",
|
|
748
|
+
// Yellow
|
|
749
|
+
"yellow-50": "#fefce8",
|
|
750
|
+
"yellow-100": "#fef3c7",
|
|
751
|
+
"yellow-200": "#fde68a",
|
|
752
|
+
"yellow-300": "#fcd34d",
|
|
753
|
+
"yellow-400": "#fbbf24",
|
|
754
|
+
"yellow-500": "#f59e0b",
|
|
755
|
+
"yellow-600": "#d97706",
|
|
756
|
+
"yellow-700": "#b45309",
|
|
757
|
+
"yellow-800": "#92400e",
|
|
758
|
+
"yellow-900": "#78350f",
|
|
759
|
+
// Green
|
|
760
|
+
"green-50": "#f0fdf4",
|
|
761
|
+
"green-100": "#dcfce7",
|
|
762
|
+
"green-200": "#bbf7d0",
|
|
763
|
+
"green-300": "#86efac",
|
|
764
|
+
"green-400": "#4ade80",
|
|
765
|
+
"green-500": "#22c55e",
|
|
766
|
+
"green-600": "#16a34a",
|
|
767
|
+
"green-700": "#15803d",
|
|
768
|
+
"green-800": "#166534",
|
|
769
|
+
"green-900": "#14532d",
|
|
770
|
+
// Blue
|
|
771
|
+
"blue-50": "#eff6ff",
|
|
772
|
+
"blue-100": "#dbeafe",
|
|
773
|
+
"blue-200": "#bfdbfe",
|
|
774
|
+
"blue-300": "#93c5fd",
|
|
775
|
+
"blue-400": "#60a5fa",
|
|
776
|
+
"blue-500": "#3b82f6",
|
|
777
|
+
"blue-600": "#2563eb",
|
|
778
|
+
"blue-700": "#1d4ed8",
|
|
779
|
+
"blue-800": "#1e40af",
|
|
780
|
+
"blue-900": "#1e3a8a",
|
|
781
|
+
// Purple
|
|
782
|
+
"purple-50": "#faf5ff",
|
|
783
|
+
"purple-100": "#f3e8ff",
|
|
784
|
+
"purple-200": "#e9d5ff",
|
|
785
|
+
"purple-300": "#d8b4fe",
|
|
786
|
+
"purple-400": "#c084fc",
|
|
787
|
+
"purple-500": "#a855f7",
|
|
788
|
+
"purple-600": "#9333ea",
|
|
789
|
+
"purple-700": "#7c3aed",
|
|
790
|
+
"purple-800": "#6b21a8",
|
|
791
|
+
"purple-900": "#581c87",
|
|
792
|
+
// Pink
|
|
793
|
+
"pink-50": "#fdf2f8",
|
|
794
|
+
"pink-100": "#fce7f3",
|
|
795
|
+
"pink-200": "#fbcfe8",
|
|
796
|
+
"pink-300": "#f9a8d4",
|
|
797
|
+
"pink-400": "#f472b6",
|
|
798
|
+
"pink-500": "#ec4899",
|
|
799
|
+
"pink-600": "#db2777",
|
|
800
|
+
"pink-700": "#be185d",
|
|
801
|
+
"pink-800": "#9d174d",
|
|
802
|
+
"pink-900": "#831843",
|
|
803
|
+
// Gray
|
|
804
|
+
"gray-50": "#f9fafb",
|
|
805
|
+
"gray-100": "#f3f4f6",
|
|
806
|
+
"gray-200": "#e5e7eb",
|
|
807
|
+
"gray-300": "#d1d5db",
|
|
808
|
+
"gray-400": "#9ca3af",
|
|
809
|
+
"gray-500": "#6b7280",
|
|
810
|
+
"gray-600": "#4b5563",
|
|
811
|
+
"gray-700": "#374151",
|
|
812
|
+
"gray-800": "#1f2937",
|
|
813
|
+
"gray-900": "#111827",
|
|
814
|
+
// Indigo
|
|
815
|
+
"indigo-50": "#eef2ff",
|
|
816
|
+
"indigo-100": "#e0e7ff",
|
|
817
|
+
"indigo-200": "#c7d2fe",
|
|
818
|
+
"indigo-300": "#a5b4fc",
|
|
819
|
+
"indigo-400": "#818cf8",
|
|
820
|
+
"indigo-500": "#6366f1",
|
|
821
|
+
"indigo-600": "#4f46e5",
|
|
822
|
+
"indigo-700": "#4338ca",
|
|
823
|
+
"indigo-800": "#3730a3",
|
|
824
|
+
"indigo-900": "#312e81",
|
|
825
|
+
// Teal
|
|
826
|
+
"teal-50": "#f0fdfa",
|
|
827
|
+
"teal-100": "#ccfbf1",
|
|
828
|
+
"teal-200": "#99f6e4",
|
|
829
|
+
"teal-300": "#5eead4",
|
|
830
|
+
"teal-400": "#2dd4bf",
|
|
831
|
+
"teal-500": "#14b8a6",
|
|
832
|
+
"teal-600": "#0d9488",
|
|
833
|
+
"teal-700": "#0f766e",
|
|
834
|
+
"teal-800": "#115e59",
|
|
835
|
+
"teal-900": "#134e4a",
|
|
836
|
+
// Emerald
|
|
837
|
+
"emerald-50": "#ecfdf5",
|
|
838
|
+
"emerald-100": "#d1fae5",
|
|
839
|
+
"emerald-200": "#a7f3d0",
|
|
840
|
+
"emerald-300": "#6ee7b7",
|
|
841
|
+
"emerald-400": "#34d399",
|
|
842
|
+
"emerald-500": "#10b981",
|
|
843
|
+
"emerald-600": "#059669",
|
|
844
|
+
"emerald-700": "#047857",
|
|
845
|
+
"emerald-800": "#065f46",
|
|
846
|
+
"emerald-900": "#064e3b",
|
|
847
|
+
// Cyan
|
|
848
|
+
"cyan-50": "#ecfeff",
|
|
849
|
+
"cyan-100": "#cffafe",
|
|
850
|
+
"cyan-200": "#a5f3fc",
|
|
851
|
+
"cyan-300": "#67e8f9",
|
|
852
|
+
"cyan-400": "#22d3ee",
|
|
853
|
+
"cyan-500": "#06b6d4",
|
|
854
|
+
"cyan-600": "#0891b2",
|
|
855
|
+
"cyan-700": "#0e7490",
|
|
856
|
+
"cyan-800": "#155e75",
|
|
857
|
+
"cyan-900": "#164e63"
|
|
858
|
+
};
|
|
859
|
+
var getTailwindColor = (color) => {
|
|
860
|
+
if (color.startsWith("#") || color.startsWith("rgb") || color.startsWith("hsl")) {
|
|
861
|
+
return color;
|
|
862
|
+
}
|
|
863
|
+
if (tailwindColors[color]) {
|
|
864
|
+
return tailwindColors[color];
|
|
865
|
+
}
|
|
866
|
+
if (!color.includes("-")) {
|
|
867
|
+
const defaultColor = `${color}-500`;
|
|
868
|
+
if (tailwindColors[defaultColor]) {
|
|
869
|
+
return tailwindColors[defaultColor];
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
return color;
|
|
873
|
+
};
|
|
874
|
+
var badgeVariants = cva2(
|
|
875
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
876
|
+
{
|
|
877
|
+
variants: {
|
|
878
|
+
variant: {
|
|
879
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
880
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
881
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
882
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
883
|
+
},
|
|
884
|
+
status: {
|
|
885
|
+
success: "bg-green-500 border-white dark:border-zinc-900",
|
|
886
|
+
desactivated: "bg-gray-400 border-white dark:border-zinc-900",
|
|
887
|
+
destructive: "bg-red-500 border-white dark:border-zinc-900",
|
|
888
|
+
away: "bg-yellow-400 border-white dark:border-zinc-900",
|
|
889
|
+
custom: "border-white dark:border-zinc-900"
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
defaultVariants: {
|
|
893
|
+
variant: "default"
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
);
|
|
897
|
+
function BadgeBase({
|
|
898
|
+
className,
|
|
899
|
+
variant,
|
|
900
|
+
status,
|
|
901
|
+
statusColor,
|
|
902
|
+
asChild = false,
|
|
903
|
+
children,
|
|
904
|
+
style,
|
|
905
|
+
...props
|
|
906
|
+
}) {
|
|
907
|
+
const Comp = asChild ? Slot2 : "span";
|
|
908
|
+
const isStatus = Boolean(status);
|
|
909
|
+
const resolvedStatusColor = statusColor ? getTailwindColor(statusColor) : void 0;
|
|
910
|
+
const customStyle = status === "custom" && resolvedStatusColor ? { ...style, backgroundColor: resolvedStatusColor } : style;
|
|
911
|
+
return /* @__PURE__ */ jsx4(
|
|
912
|
+
Comp,
|
|
913
|
+
{
|
|
914
|
+
"data-slot": "badge",
|
|
915
|
+
className: cn(
|
|
916
|
+
badgeVariants({ variant, status: isStatus ? status : void 0 }),
|
|
917
|
+
isStatus && "absolute bottom-0 right-0 rounded-full p-0 h-4 w-4 flex items-center justify-center border-2",
|
|
918
|
+
className
|
|
919
|
+
),
|
|
920
|
+
style: customStyle,
|
|
921
|
+
...props,
|
|
922
|
+
children: isStatus ? null : children
|
|
923
|
+
}
|
|
924
|
+
);
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// src/components/ui/BreadcrumbBase.tsx
|
|
928
|
+
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
929
|
+
import { CaretRight, DotsThree } from "phosphor-react";
|
|
930
|
+
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
931
|
+
function BreadcrumbBase({ ...props }) {
|
|
932
|
+
return /* @__PURE__ */ jsx5("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
933
|
+
}
|
|
934
|
+
function BreadcrumbListBase({ className, ...props }) {
|
|
935
|
+
return /* @__PURE__ */ jsx5(
|
|
936
|
+
"ol",
|
|
937
|
+
{
|
|
938
|
+
"data-slot": "breadcrumb-list",
|
|
939
|
+
className: cn(
|
|
940
|
+
"text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",
|
|
941
|
+
className
|
|
942
|
+
),
|
|
943
|
+
...props
|
|
944
|
+
}
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
function BreadcrumbItemBase({ className, ...props }) {
|
|
948
|
+
return /* @__PURE__ */ jsx5(
|
|
949
|
+
"li",
|
|
950
|
+
{
|
|
951
|
+
"data-slot": "breadcrumb-item",
|
|
952
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
953
|
+
...props
|
|
954
|
+
}
|
|
955
|
+
);
|
|
956
|
+
}
|
|
957
|
+
function BreadcrumbLinkBase({
|
|
958
|
+
asChild,
|
|
959
|
+
className,
|
|
960
|
+
...props
|
|
961
|
+
}) {
|
|
962
|
+
const Comp = asChild ? Slot3 : "a";
|
|
963
|
+
return /* @__PURE__ */ jsx5(
|
|
964
|
+
Comp,
|
|
965
|
+
{
|
|
966
|
+
"data-slot": "breadcrumb-link",
|
|
967
|
+
className: cn("hover:text-foreground transition-colors", className),
|
|
968
|
+
...props
|
|
969
|
+
}
|
|
970
|
+
);
|
|
971
|
+
}
|
|
972
|
+
function BreadcrumbPageBase({ className, ...props }) {
|
|
973
|
+
return /* @__PURE__ */ jsx5(
|
|
974
|
+
"span",
|
|
975
|
+
{
|
|
976
|
+
"data-slot": "breadcrumb-page",
|
|
977
|
+
role: "link",
|
|
978
|
+
"aria-disabled": "true",
|
|
979
|
+
"aria-current": "page",
|
|
980
|
+
className: cn("text-foreground font-normal", className),
|
|
981
|
+
...props
|
|
982
|
+
}
|
|
983
|
+
);
|
|
984
|
+
}
|
|
985
|
+
function BreadcrumbSeparatorBase({
|
|
986
|
+
children,
|
|
987
|
+
className,
|
|
988
|
+
...props
|
|
989
|
+
}) {
|
|
990
|
+
return /* @__PURE__ */ jsx5(
|
|
991
|
+
"li",
|
|
992
|
+
{
|
|
993
|
+
"data-slot": "breadcrumb-separator",
|
|
994
|
+
role: "presentation",
|
|
995
|
+
"aria-hidden": "true",
|
|
996
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
997
|
+
...props,
|
|
998
|
+
children: children ?? /* @__PURE__ */ jsx5(CaretRight, {})
|
|
999
|
+
}
|
|
1000
|
+
);
|
|
1001
|
+
}
|
|
1002
|
+
function BreadcrumbEllipsisBase({
|
|
1003
|
+
className,
|
|
1004
|
+
...props
|
|
1005
|
+
}) {
|
|
1006
|
+
return /* @__PURE__ */ jsxs2(
|
|
1007
|
+
"span",
|
|
1008
|
+
{
|
|
1009
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
1010
|
+
role: "presentation",
|
|
1011
|
+
"aria-hidden": "true",
|
|
1012
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
1013
|
+
...props,
|
|
1014
|
+
children: [
|
|
1015
|
+
/* @__PURE__ */ jsx5(DotsThree, { className: "size-4" }),
|
|
1016
|
+
/* @__PURE__ */ jsx5("span", { className: "sr-only", children: "More" })
|
|
1017
|
+
]
|
|
1018
|
+
}
|
|
1019
|
+
);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
// src/components/ui/CalendarBase.tsx
|
|
1023
|
+
import { CaretLeft, CaretRight as CaretRight2 } from "phosphor-react";
|
|
1024
|
+
import { DayPicker } from "react-day-picker";
|
|
1025
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1026
|
+
function CalendarBase({
|
|
1027
|
+
className,
|
|
1028
|
+
classNames,
|
|
1029
|
+
showOutsideDays = true,
|
|
1030
|
+
...props
|
|
1031
|
+
}) {
|
|
1032
|
+
return /* @__PURE__ */ jsx6(
|
|
1033
|
+
DayPicker,
|
|
1034
|
+
{
|
|
1035
|
+
showOutsideDays,
|
|
1036
|
+
className: cn("bg-background p-3", className),
|
|
1037
|
+
classNames: {
|
|
1038
|
+
months: "flex items-center flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
1039
|
+
month: "space-y-4",
|
|
1040
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
1041
|
+
caption_label: "text-sm font-medium",
|
|
1042
|
+
nav: "space-x-1 flex items-center",
|
|
1043
|
+
nav_button: cn(
|
|
1044
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
1045
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
1046
|
+
),
|
|
1047
|
+
nav_button_previous: "absolute left-1",
|
|
1048
|
+
nav_button_next: "absolute right-1",
|
|
1049
|
+
table: "w-full border-collapse space-y-1",
|
|
1050
|
+
head_row: "flex",
|
|
1051
|
+
head_cell: "text-slate-500 rounded-md w-9 font-normal text-[0.8rem] dark:text-slate-400",
|
|
1052
|
+
row: "flex w-full mt-2",
|
|
1053
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-slate-100/50 [&:has([aria-selected])]:bg-slate-100 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 dark:[&:has([aria-selected].day-outside)]:bg-slate-800/50 dark:[&:has([aria-selected])]:bg-slate-800",
|
|
1054
|
+
day: cn(
|
|
1055
|
+
buttonVariantsBase({ variant: "ghost" }),
|
|
1056
|
+
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
1057
|
+
),
|
|
1058
|
+
day_range_end: "day-range-end",
|
|
1059
|
+
day_selected: "bg-purple text-slate-50 hover:bg-primary hover:text-slate-50 focus:bg-purple-500 focus:text-slate-50 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50 dark:hover:text-slate-900 dark:focus:bg-slate-50 dark:focus:text-slate-900",
|
|
1060
|
+
day_today: "bg-slate-100 text-slate-900 dark:bg-primary dark:text-slate-50",
|
|
1061
|
+
day_outside: "day-outside text-slate-500 opacity-50 aria-selected:bg-slate-100/50 aria-selected:text-slate-500 aria-selected:opacity-30 dark:text-slate-400 dark:aria-selected:bg-slate-800/50 dark:aria-selected:text-slate-400",
|
|
1062
|
+
day_disabled: "text-slate-500 opacity-50 dark:text-slate-400",
|
|
1063
|
+
day_range_middle: "aria-selected:bg-slate-100 aria-selected:text-slate-900 dark:aria-selected:bg-primary dark:aria-selected:text-primary",
|
|
1064
|
+
day_hidden: "invisible",
|
|
1065
|
+
...classNames
|
|
1066
|
+
},
|
|
1067
|
+
components: {
|
|
1068
|
+
IconLeft: () => /* @__PURE__ */ jsx6(CaretLeft, { className: "h-4 w-4" }),
|
|
1069
|
+
IconRight: () => /* @__PURE__ */ jsx6(CaretRight2, { className: "h-4 w-4" })
|
|
1070
|
+
},
|
|
1071
|
+
...props
|
|
1072
|
+
}
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1075
|
+
CalendarBase.displayName = "Calendar";
|
|
1076
|
+
|
|
1077
|
+
// src/components/ui/CardBase.tsx
|
|
1078
|
+
import * as React4 from "react";
|
|
1079
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1080
|
+
var CardBase = React4.forwardRef(({ className, testid: dataTestId = "card-base", ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
1081
|
+
"div",
|
|
1082
|
+
{
|
|
1083
|
+
ref,
|
|
1084
|
+
className: cn(
|
|
1085
|
+
"rounded-xl border bg-card text-card-foreground shadow",
|
|
1086
|
+
className
|
|
1087
|
+
),
|
|
1088
|
+
"data-testid": dataTestId,
|
|
1089
|
+
...props
|
|
1090
|
+
}
|
|
1091
|
+
));
|
|
1092
|
+
CardBase.displayName = "Card";
|
|
1093
|
+
var CardHeaderBase = React4.forwardRef(({ className, testid: dataTestId = "card-header", ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
1094
|
+
"div",
|
|
1095
|
+
{
|
|
1096
|
+
ref,
|
|
1097
|
+
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
1098
|
+
"data-testid": dataTestId,
|
|
1099
|
+
...props
|
|
1100
|
+
}
|
|
1101
|
+
));
|
|
1102
|
+
CardHeaderBase.displayName = "CardHeader";
|
|
1103
|
+
var CardTitleBase = React4.forwardRef(({ className, testid: dataTestId = "card-title", ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
1104
|
+
"div",
|
|
1105
|
+
{
|
|
1106
|
+
ref,
|
|
1107
|
+
className: cn("font-semibold leading-none tracking-tight", className),
|
|
1108
|
+
"data-testid": dataTestId,
|
|
1109
|
+
...props
|
|
1110
|
+
}
|
|
1111
|
+
));
|
|
1112
|
+
CardTitleBase.displayName = "CardTitle";
|
|
1113
|
+
var CardDescriptionBase = React4.forwardRef(({ className, testid: dataTestId = "card-description", ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
1114
|
+
"div",
|
|
1115
|
+
{
|
|
1116
|
+
ref,
|
|
1117
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1118
|
+
"data-testid": dataTestId,
|
|
1119
|
+
...props
|
|
1120
|
+
}
|
|
1121
|
+
));
|
|
1122
|
+
CardDescriptionBase.displayName = "CardDescription";
|
|
1123
|
+
var CardContentBase = React4.forwardRef(({ className, testid: dataTestId = "card-content", ...props }, ref) => /* @__PURE__ */ jsx7("div", { ref, className: cn("p-6 pt-0", className), "data-testid": dataTestId, ...props }));
|
|
1124
|
+
CardContentBase.displayName = "CardContent";
|
|
1125
|
+
var CardFooterBase = React4.forwardRef(({ className, testid: dataTestId = "card-footer", ...props }, ref) => /* @__PURE__ */ jsx7(
|
|
1126
|
+
"div",
|
|
1127
|
+
{
|
|
1128
|
+
ref,
|
|
1129
|
+
className: cn("flex items-center p-6 pt-0", className),
|
|
1130
|
+
"data-testid": dataTestId,
|
|
1131
|
+
...props
|
|
1132
|
+
}
|
|
1133
|
+
));
|
|
1134
|
+
CardFooterBase.displayName = "CardFooter";
|
|
1135
|
+
|
|
1136
|
+
// src/components/ui/CarouselBase.tsx
|
|
1137
|
+
import * as React5 from "react";
|
|
1138
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
1139
|
+
import { ArrowLeft, ArrowRight } from "phosphor-react";
|
|
1140
|
+
import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1141
|
+
var CarouselContext = React5.createContext(null);
|
|
1142
|
+
function useCarousel() {
|
|
1143
|
+
const context = React5.useContext(CarouselContext);
|
|
1144
|
+
if (!context) {
|
|
1145
|
+
throw new Error("useCarousel must be used within a <CarouselBase />");
|
|
1146
|
+
}
|
|
1147
|
+
return context;
|
|
1148
|
+
}
|
|
1149
|
+
function CarouselBase({
|
|
1150
|
+
orientation = "horizontal",
|
|
1151
|
+
opts,
|
|
1152
|
+
setApi,
|
|
1153
|
+
plugins,
|
|
1154
|
+
className,
|
|
1155
|
+
children,
|
|
1156
|
+
...props
|
|
1157
|
+
}) {
|
|
1158
|
+
const [carouselRef, api] = useEmblaCarousel(
|
|
1159
|
+
{
|
|
1160
|
+
...opts,
|
|
1161
|
+
axis: orientation === "horizontal" ? "x" : "y"
|
|
1162
|
+
},
|
|
1163
|
+
plugins
|
|
1164
|
+
);
|
|
1165
|
+
const [canScrollPrev, setCanScrollPrev] = React5.useState(false);
|
|
1166
|
+
const [canScrollNext, setCanScrollNext] = React5.useState(false);
|
|
1167
|
+
const onSelect = React5.useCallback((api2) => {
|
|
1168
|
+
if (!api2) return;
|
|
1169
|
+
setCanScrollPrev(api2.canScrollPrev());
|
|
1170
|
+
setCanScrollNext(api2.canScrollNext());
|
|
1171
|
+
}, []);
|
|
1172
|
+
const scrollPrev = React5.useCallback(() => {
|
|
1173
|
+
api?.scrollPrev();
|
|
1174
|
+
}, [api]);
|
|
1175
|
+
const scrollNext = React5.useCallback(() => {
|
|
1176
|
+
api?.scrollNext();
|
|
1177
|
+
}, [api]);
|
|
1178
|
+
const handleKeyDown = React5.useCallback(
|
|
1179
|
+
(event) => {
|
|
1180
|
+
if (event.key === "ArrowLeft") {
|
|
1181
|
+
event.preventDefault();
|
|
1182
|
+
scrollPrev();
|
|
1183
|
+
} else if (event.key === "ArrowRight") {
|
|
1184
|
+
event.preventDefault();
|
|
1185
|
+
scrollNext();
|
|
1186
|
+
}
|
|
1187
|
+
},
|
|
1188
|
+
[scrollPrev, scrollNext]
|
|
1189
|
+
);
|
|
1190
|
+
React5.useEffect(() => {
|
|
1191
|
+
if (!api || !setApi) return;
|
|
1192
|
+
setApi(api);
|
|
1193
|
+
}, [api, setApi]);
|
|
1194
|
+
React5.useEffect(() => {
|
|
1195
|
+
if (!api) return;
|
|
1196
|
+
onSelect(api);
|
|
1197
|
+
api.on("reInit", onSelect);
|
|
1198
|
+
api.on("select", onSelect);
|
|
1199
|
+
return () => {
|
|
1200
|
+
api?.off("select", onSelect);
|
|
1201
|
+
};
|
|
1202
|
+
}, [api, onSelect]);
|
|
1203
|
+
return /* @__PURE__ */ jsx8(
|
|
1204
|
+
CarouselContext.Provider,
|
|
1205
|
+
{
|
|
1206
|
+
value: {
|
|
1207
|
+
carouselRef,
|
|
1208
|
+
api,
|
|
1209
|
+
opts,
|
|
1210
|
+
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
1211
|
+
scrollPrev,
|
|
1212
|
+
scrollNext,
|
|
1213
|
+
canScrollPrev,
|
|
1214
|
+
canScrollNext
|
|
1215
|
+
},
|
|
1216
|
+
children: /* @__PURE__ */ jsx8(
|
|
1217
|
+
"div",
|
|
1218
|
+
{
|
|
1219
|
+
onKeyDownCapture: handleKeyDown,
|
|
1220
|
+
className: cn("relative", className),
|
|
1221
|
+
role: "region",
|
|
1222
|
+
"aria-roledescription": "carousel",
|
|
1223
|
+
"data-slot": "carousel",
|
|
1224
|
+
...props,
|
|
1225
|
+
children
|
|
1226
|
+
}
|
|
1227
|
+
)
|
|
1228
|
+
}
|
|
1229
|
+
);
|
|
1230
|
+
}
|
|
1231
|
+
function CarouselContentBase({ className, ...props }) {
|
|
1232
|
+
const { carouselRef, orientation } = useCarousel();
|
|
1233
|
+
return /* @__PURE__ */ jsx8(
|
|
1234
|
+
"div",
|
|
1235
|
+
{
|
|
1236
|
+
ref: carouselRef,
|
|
1237
|
+
className: "overflow-hidden",
|
|
1238
|
+
"data-slot": "carousel-content",
|
|
1239
|
+
children: /* @__PURE__ */ jsx8(
|
|
1240
|
+
"div",
|
|
1241
|
+
{
|
|
1242
|
+
className: cn(
|
|
1243
|
+
"flex",
|
|
1244
|
+
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
1245
|
+
className
|
|
1246
|
+
),
|
|
1247
|
+
...props
|
|
1248
|
+
}
|
|
1249
|
+
)
|
|
1250
|
+
}
|
|
1251
|
+
);
|
|
1252
|
+
}
|
|
1253
|
+
function CarouselItemBase({ className, ...props }) {
|
|
1254
|
+
const { orientation } = useCarousel();
|
|
1255
|
+
return /* @__PURE__ */ jsx8(
|
|
1256
|
+
"div",
|
|
1257
|
+
{
|
|
1258
|
+
role: "group",
|
|
1259
|
+
"aria-roledescription": "slide",
|
|
1260
|
+
"data-slot": "carousel-item",
|
|
1261
|
+
className: cn(
|
|
1262
|
+
"min-w-0 shrink-0 grow-0 basis-full",
|
|
1263
|
+
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
1264
|
+
className
|
|
1265
|
+
),
|
|
1266
|
+
...props
|
|
1267
|
+
}
|
|
1268
|
+
);
|
|
1269
|
+
}
|
|
1270
|
+
function CarouselPrevious({
|
|
1271
|
+
className,
|
|
1272
|
+
variant = "outline",
|
|
1273
|
+
size = "icon",
|
|
1274
|
+
...props
|
|
1275
|
+
}) {
|
|
1276
|
+
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1277
|
+
return /* @__PURE__ */ jsxs3(
|
|
1278
|
+
ButtonBase,
|
|
1279
|
+
{
|
|
1280
|
+
"data-slot": "carousel-previous",
|
|
1281
|
+
variant,
|
|
1282
|
+
size,
|
|
1283
|
+
className: cn(
|
|
1284
|
+
"absolute size-8 rounded-full",
|
|
1285
|
+
orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1286
|
+
className
|
|
1287
|
+
),
|
|
1288
|
+
disabled: !canScrollPrev,
|
|
1289
|
+
onClick: scrollPrev,
|
|
1290
|
+
...props,
|
|
1291
|
+
children: [
|
|
1292
|
+
/* @__PURE__ */ jsx8(ArrowLeft, {}),
|
|
1293
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Previous slide" })
|
|
1294
|
+
]
|
|
1295
|
+
}
|
|
1296
|
+
);
|
|
1297
|
+
}
|
|
1298
|
+
function CarouselNextBase({
|
|
1299
|
+
className,
|
|
1300
|
+
variant = "outline",
|
|
1301
|
+
size = "icon",
|
|
1302
|
+
...props
|
|
1303
|
+
}) {
|
|
1304
|
+
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1305
|
+
return /* @__PURE__ */ jsxs3(
|
|
1306
|
+
ButtonBase,
|
|
1307
|
+
{
|
|
1308
|
+
"data-slot": "carousel-next",
|
|
1309
|
+
variant,
|
|
1310
|
+
size,
|
|
1311
|
+
className: cn(
|
|
1312
|
+
"absolute size-8 rounded-full",
|
|
1313
|
+
orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90",
|
|
1314
|
+
className
|
|
1315
|
+
),
|
|
1316
|
+
disabled: !canScrollNext,
|
|
1317
|
+
onClick: scrollNext,
|
|
1318
|
+
...props,
|
|
1319
|
+
children: [
|
|
1320
|
+
/* @__PURE__ */ jsx8(ArrowRight, {}),
|
|
1321
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: "Next slide" })
|
|
1322
|
+
]
|
|
1323
|
+
}
|
|
1324
|
+
);
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
// src/components/ui/CheckBoxBase.tsx
|
|
1328
|
+
import * as React6 from "react";
|
|
1329
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
1330
|
+
import { Check } from "phosphor-react";
|
|
1331
|
+
import { motion } from "framer-motion";
|
|
1332
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1333
|
+
var CheckboxBase = React6.forwardRef(({ className, testid: dataTestId = "checkbox-base", ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
1334
|
+
CheckboxPrimitive.Root,
|
|
1335
|
+
{
|
|
1336
|
+
ref,
|
|
1337
|
+
className: cn(
|
|
1338
|
+
"peer h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground transition-colors",
|
|
1339
|
+
className
|
|
1340
|
+
),
|
|
1341
|
+
"data-testid": dataTestId,
|
|
1342
|
+
...props,
|
|
1343
|
+
children: /* @__PURE__ */ jsx9(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ jsx9(
|
|
1344
|
+
motion.div,
|
|
1345
|
+
{
|
|
1346
|
+
initial: { scale: 0, opacity: 0, rotate: -90 },
|
|
1347
|
+
animate: { scale: 1, opacity: 1, rotate: 0 },
|
|
1348
|
+
exit: { scale: 0, opacity: 0, rotate: 90 },
|
|
1349
|
+
transition: { type: "spring", stiffness: 500, damping: 30 },
|
|
1350
|
+
className: "flex items-center justify-center text-current",
|
|
1351
|
+
children: /* @__PURE__ */ jsx9(Check, { className: "h-4 w-4", weight: "bold" })
|
|
1352
|
+
}
|
|
1353
|
+
) })
|
|
1354
|
+
}
|
|
1355
|
+
));
|
|
1356
|
+
CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
|
|
1357
|
+
|
|
1358
|
+
// src/components/ui/CommandBase.tsx
|
|
1359
|
+
import * as React8 from "react";
|
|
1360
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
1361
|
+
import { MagnifyingGlass } from "phosphor-react";
|
|
1362
|
+
import { motion as motion2, AnimatePresence } from "framer-motion";
|
|
1363
|
+
|
|
1364
|
+
// src/components/ui/DialogBase.tsx
|
|
1365
|
+
import * as React7 from "react";
|
|
1366
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
1367
|
+
import { X } from "phosphor-react";
|
|
1368
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1369
|
+
var DialogBase = DialogPrimitive.Root;
|
|
1370
|
+
var DialogTriggerBase = DialogPrimitive.Trigger;
|
|
1371
|
+
var DialogPortalBase = DialogPrimitive.Portal;
|
|
1372
|
+
var DialogCloseBase = DialogPrimitive.Close;
|
|
1373
|
+
var DialogOverlayBase = React7.forwardRef(({ className, testid: dataTestId = "dialog-overlay", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1374
|
+
DialogPrimitive.Overlay,
|
|
1375
|
+
{
|
|
1376
|
+
ref,
|
|
1377
|
+
className: cn(
|
|
1378
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1379
|
+
className
|
|
1380
|
+
),
|
|
1381
|
+
"data-testid": dataTestId,
|
|
1382
|
+
...props
|
|
1383
|
+
}
|
|
1384
|
+
));
|
|
1385
|
+
DialogOverlayBase.displayName = DialogPrimitive.Overlay.displayName;
|
|
1386
|
+
var DialogContentBase = React7.forwardRef(({ className, children, testid: dataTestId = "dialog-content", ...props }, ref) => /* @__PURE__ */ jsxs4(DialogPortalBase, { children: [
|
|
1387
|
+
/* @__PURE__ */ jsx10(DialogOverlayBase, {}),
|
|
1388
|
+
/* @__PURE__ */ jsxs4(
|
|
1389
|
+
DialogPrimitive.Content,
|
|
1390
|
+
{
|
|
1391
|
+
ref,
|
|
1392
|
+
className: cn(
|
|
1393
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
1394
|
+
className
|
|
1395
|
+
),
|
|
1396
|
+
"data-testid": dataTestId,
|
|
1397
|
+
...props,
|
|
1398
|
+
children: [
|
|
1399
|
+
children,
|
|
1400
|
+
/* @__PURE__ */ jsxs4(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1401
|
+
/* @__PURE__ */ jsx10(X, { className: "h-4 w-4" }),
|
|
1402
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Close" })
|
|
1403
|
+
] })
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
] }));
|
|
1408
|
+
DialogContentBase.displayName = DialogPrimitive.Content.displayName;
|
|
1409
|
+
var DialogHeaderBase = React7.forwardRef(({ className, testid: dataTestId = "dialog-header", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1410
|
+
"div",
|
|
1411
|
+
{
|
|
1412
|
+
ref,
|
|
1413
|
+
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className),
|
|
1414
|
+
"data-testid": dataTestId,
|
|
1415
|
+
...props
|
|
1416
|
+
}
|
|
1417
|
+
));
|
|
1418
|
+
DialogHeaderBase.displayName = "DialogHeader";
|
|
1419
|
+
var DialogFooterBase = React7.forwardRef(({ className, testid: dataTestId = "dialog-footer", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1420
|
+
"div",
|
|
1421
|
+
{
|
|
1422
|
+
ref,
|
|
1423
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
1424
|
+
"data-testid": dataTestId,
|
|
1425
|
+
...props
|
|
1426
|
+
}
|
|
1427
|
+
));
|
|
1428
|
+
DialogFooterBase.displayName = "DialogFooter";
|
|
1429
|
+
var DialogTitleBase = React7.forwardRef(({ className, testid: dataTestId = "dialog-title", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1430
|
+
DialogPrimitive.Title,
|
|
1431
|
+
{
|
|
1432
|
+
ref,
|
|
1433
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
1434
|
+
"data-testid": dataTestId,
|
|
1435
|
+
...props
|
|
1436
|
+
}
|
|
1437
|
+
));
|
|
1438
|
+
DialogTitleBase.displayName = DialogPrimitive.Title.displayName;
|
|
1439
|
+
var DialogDescriptionBase = React7.forwardRef(({ className, testid: dataTestId = "dialog-description", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1440
|
+
DialogPrimitive.Description,
|
|
1441
|
+
{
|
|
1442
|
+
ref,
|
|
1443
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1444
|
+
"data-testid": dataTestId,
|
|
1445
|
+
...props
|
|
1446
|
+
}
|
|
1447
|
+
));
|
|
1448
|
+
DialogDescriptionBase.displayName = DialogPrimitive.Description.displayName;
|
|
1449
|
+
|
|
1450
|
+
// src/components/ui/CommandBase.tsx
|
|
1451
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1452
|
+
var CommandBase = React8.forwardRef(({ className, testid: dataTestId = "command-base", ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
1453
|
+
CommandPrimitive,
|
|
1454
|
+
{
|
|
1455
|
+
ref,
|
|
1456
|
+
className: cn(
|
|
1457
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-background text-popover-foreground",
|
|
1458
|
+
className
|
|
1459
|
+
),
|
|
1460
|
+
"data-testid": dataTestId,
|
|
1461
|
+
...props
|
|
1462
|
+
}
|
|
1463
|
+
));
|
|
1464
|
+
CommandBase.displayName = CommandPrimitive.displayName;
|
|
1465
|
+
var dialogVariants = {
|
|
1466
|
+
hidden: { opacity: 0, scale: 0.95, y: -20 },
|
|
1467
|
+
visible: { opacity: 1, scale: 1, y: 0 },
|
|
1468
|
+
exit: { opacity: 0, scale: 0.95, y: -20 }
|
|
1469
|
+
};
|
|
1470
|
+
var CommandDialogBase = ({ children, open, ...props }) => {
|
|
1471
|
+
return /* @__PURE__ */ jsx11(DialogBase, { open, ...props, children: /* @__PURE__ */ jsx11(AnimatePresence, { children: open && /* @__PURE__ */ jsx11(DialogContentBase, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx11(
|
|
1472
|
+
motion2.div,
|
|
1473
|
+
{
|
|
1474
|
+
initial: "hidden",
|
|
1475
|
+
animate: "visible",
|
|
1476
|
+
exit: "exit",
|
|
1477
|
+
variants: dialogVariants,
|
|
1478
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
1479
|
+
className: "overflow-hidden p-0",
|
|
1480
|
+
children: /* @__PURE__ */ jsx11(CommandBase, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
1481
|
+
},
|
|
1482
|
+
"command-dialog"
|
|
1483
|
+
) }) }) });
|
|
1484
|
+
};
|
|
1485
|
+
var CommandInputBase = React8.forwardRef(({ className, testid: dataTestId = "command-input", ...props }, ref) => /* @__PURE__ */ jsxs5("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
1486
|
+
/* @__PURE__ */ jsx11(MagnifyingGlass, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
|
|
1487
|
+
/* @__PURE__ */ jsx11(
|
|
1488
|
+
CommandPrimitive.Input,
|
|
1489
|
+
{
|
|
1490
|
+
ref,
|
|
1491
|
+
className: cn(
|
|
1492
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none text-primary placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
1493
|
+
className
|
|
1494
|
+
),
|
|
1495
|
+
"data-testid": dataTestId,
|
|
1496
|
+
...props
|
|
1497
|
+
}
|
|
1498
|
+
)
|
|
1499
|
+
] }));
|
|
1500
|
+
CommandInputBase.displayName = CommandPrimitive.Input.displayName;
|
|
1501
|
+
var CommandListBase = React8.forwardRef(({ className, testid: dataTestId = "command-list", ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
1502
|
+
CommandPrimitive.List,
|
|
1503
|
+
{
|
|
1504
|
+
ref,
|
|
1505
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
1506
|
+
"data-testid": dataTestId,
|
|
1507
|
+
...props
|
|
1508
|
+
}
|
|
1509
|
+
));
|
|
1510
|
+
CommandListBase.displayName = CommandPrimitive.List.displayName;
|
|
1511
|
+
var CommandEmptyBase = React8.forwardRef(({ testid: dataTestId = "command-empty", ...props }, ref) => /* @__PURE__ */ jsx11(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", "data-testid": dataTestId, ...props }));
|
|
1512
|
+
CommandEmptyBase.displayName = CommandPrimitive.Empty.displayName;
|
|
1513
|
+
var CommandGroupBase = React8.forwardRef(({ className, testid: dataTestId = "command-group", ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
1514
|
+
CommandPrimitive.Group,
|
|
1515
|
+
{
|
|
1516
|
+
ref,
|
|
1517
|
+
className: cn(
|
|
1518
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
1519
|
+
className
|
|
1520
|
+
),
|
|
1521
|
+
"data-testid": dataTestId,
|
|
1522
|
+
...props
|
|
1523
|
+
}
|
|
1524
|
+
));
|
|
1525
|
+
CommandGroupBase.displayName = CommandPrimitive.Group.displayName;
|
|
1526
|
+
var CommandSeparatorBase = React8.forwardRef(({ className, testid: dataTestId = "command-separator", ...props }, ref) => /* @__PURE__ */ jsx11(CommandPrimitive.Separator, { ref, className: cn("-mx-1 h-px bg-border", className), "data-testid": dataTestId, ...props }));
|
|
1527
|
+
CommandSeparatorBase.displayName = CommandPrimitive.Separator.displayName;
|
|
1528
|
+
var CommandItemBase = React8.forwardRef(({ className, testid: dataTestId = "command-item", ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
1529
|
+
CommandPrimitive.Item,
|
|
1530
|
+
{
|
|
1531
|
+
ref,
|
|
1532
|
+
className: cn(
|
|
1533
|
+
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary data-[selected=true]:text-background data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-[1.02] active:scale-[0.98]",
|
|
1534
|
+
className
|
|
1535
|
+
),
|
|
1536
|
+
"data-testid": dataTestId,
|
|
1537
|
+
...props
|
|
1538
|
+
}
|
|
1539
|
+
));
|
|
1540
|
+
CommandItemBase.displayName = CommandPrimitive.Item.displayName;
|
|
1541
|
+
var CommandShortcutBase = ({ className, ...props }) => {
|
|
1542
|
+
return /* @__PURE__ */ jsx11("span", { className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props });
|
|
1543
|
+
};
|
|
1544
|
+
CommandShortcutBase.displayName = "CommandShortcut";
|
|
1545
|
+
|
|
1546
|
+
// src/components/ui/ContextMenuBase.tsx
|
|
1547
|
+
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
1548
|
+
import { CaretRight as CaretRight3, Check as Check2, Circle } from "phosphor-react";
|
|
1549
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1550
|
+
function ContextMenuBase(props) {
|
|
1551
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
1552
|
+
}
|
|
1553
|
+
function ContextMenuTriggerBase(props) {
|
|
1554
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
|
|
1555
|
+
}
|
|
1556
|
+
function ContextMenuGroupBase(props) {
|
|
1557
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
|
|
1558
|
+
}
|
|
1559
|
+
function ContextMenuPortalBase(props) {
|
|
1560
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Portal, { "data-slot": "context-menu-portal", ...props });
|
|
1561
|
+
}
|
|
1562
|
+
function ContextMenuSubBase(props) {
|
|
1563
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Sub, { "data-slot": "context-menu-sub", ...props });
|
|
1564
|
+
}
|
|
1565
|
+
function ContextMenuRadioGroupBase(props) {
|
|
1566
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.RadioGroup, { "data-slot": "context-menu-radio-group", ...props });
|
|
1567
|
+
}
|
|
1568
|
+
function ContextMenuSubTriggerBase({
|
|
1569
|
+
className,
|
|
1570
|
+
inset,
|
|
1571
|
+
children,
|
|
1572
|
+
...props
|
|
1573
|
+
}) {
|
|
1574
|
+
return /* @__PURE__ */ jsxs6(
|
|
1575
|
+
ContextMenuPrimitive.SubTrigger,
|
|
1576
|
+
{
|
|
1577
|
+
"data-slot": "context-menu-sub-trigger",
|
|
1578
|
+
"data-inset": inset,
|
|
1579
|
+
className: cn(
|
|
1580
|
+
"focus:outline-none",
|
|
1581
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1582
|
+
"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm select-none",
|
|
1583
|
+
"data-[inset]:pl-8",
|
|
1584
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1585
|
+
className
|
|
1586
|
+
),
|
|
1587
|
+
...props,
|
|
1588
|
+
children: [
|
|
1589
|
+
children,
|
|
1590
|
+
/* @__PURE__ */ jsx12(CaretRight3, { className: "ml-auto" })
|
|
1591
|
+
]
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
}
|
|
1595
|
+
function ContextMenuSubContentBase({
|
|
1596
|
+
className,
|
|
1597
|
+
...props
|
|
1598
|
+
}) {
|
|
1599
|
+
return /* @__PURE__ */ jsx12(
|
|
1600
|
+
ContextMenuPrimitive.SubContent,
|
|
1601
|
+
{
|
|
1602
|
+
"data-slot": "context-menu-sub-content",
|
|
1603
|
+
className: cn(
|
|
1604
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1605
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1606
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
1607
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1608
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border p-1 shadow-lg",
|
|
1609
|
+
className
|
|
1610
|
+
),
|
|
1611
|
+
...props
|
|
1612
|
+
}
|
|
1613
|
+
);
|
|
1614
|
+
}
|
|
1615
|
+
function ContextMenuContentBase({
|
|
1616
|
+
className,
|
|
1617
|
+
...props
|
|
1618
|
+
}) {
|
|
1619
|
+
return /* @__PURE__ */ jsx12(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
1620
|
+
ContextMenuPrimitive.Content,
|
|
1621
|
+
{
|
|
1622
|
+
"data-slot": "context-menu-content",
|
|
1623
|
+
className: cn(
|
|
1624
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1625
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1626
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
1627
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1628
|
+
"z-50 max-h-[var(--radix-context-menu-content-available-height)] min-w-[8rem]",
|
|
1629
|
+
"overflow-x-hidden overflow-y-auto rounded-md border border-border p-1 shadow-md",
|
|
1630
|
+
className
|
|
1631
|
+
),
|
|
1632
|
+
...props
|
|
1633
|
+
}
|
|
1634
|
+
) });
|
|
1635
|
+
}
|
|
1636
|
+
function ContextMenuItemBase({
|
|
1637
|
+
className,
|
|
1638
|
+
inset,
|
|
1639
|
+
variant = "default",
|
|
1640
|
+
...props
|
|
1641
|
+
}) {
|
|
1642
|
+
return /* @__PURE__ */ jsx12(
|
|
1643
|
+
ContextMenuPrimitive.Item,
|
|
1644
|
+
{
|
|
1645
|
+
"data-slot": "context-menu-item",
|
|
1646
|
+
"data-inset": inset,
|
|
1647
|
+
"data-variant": variant,
|
|
1648
|
+
className: cn(
|
|
1649
|
+
"focus:outline-none",
|
|
1650
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1651
|
+
"data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20",
|
|
1652
|
+
"data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive",
|
|
1653
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
1654
|
+
"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm select-none",
|
|
1655
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1656
|
+
"data-[inset]:pl-8",
|
|
1657
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1658
|
+
className
|
|
1659
|
+
),
|
|
1660
|
+
...props
|
|
1661
|
+
}
|
|
1662
|
+
);
|
|
1663
|
+
}
|
|
1664
|
+
function ContextMenuCheckboxItemBase({
|
|
1665
|
+
className,
|
|
1666
|
+
children,
|
|
1667
|
+
checked,
|
|
1668
|
+
...props
|
|
1669
|
+
}) {
|
|
1670
|
+
return /* @__PURE__ */ jsxs6(
|
|
1671
|
+
ContextMenuPrimitive.CheckboxItem,
|
|
1672
|
+
{
|
|
1673
|
+
"data-slot": "context-menu-checkbox-item",
|
|
1674
|
+
className: cn(
|
|
1675
|
+
"focus:outline-none",
|
|
1676
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1677
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm select-none",
|
|
1678
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1679
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1680
|
+
className
|
|
1681
|
+
),
|
|
1682
|
+
checked,
|
|
1683
|
+
...props,
|
|
1684
|
+
children: [
|
|
1685
|
+
/* @__PURE__ */ jsx12("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx12(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx12(Check2, { className: "size-4" }) }) }),
|
|
1686
|
+
children
|
|
1687
|
+
]
|
|
1688
|
+
}
|
|
1689
|
+
);
|
|
1690
|
+
}
|
|
1691
|
+
function ContextMenuRadioItemBase({
|
|
1692
|
+
className,
|
|
1693
|
+
children,
|
|
1694
|
+
...props
|
|
1695
|
+
}) {
|
|
1696
|
+
return /* @__PURE__ */ jsxs6(
|
|
1697
|
+
ContextMenuPrimitive.RadioItem,
|
|
1698
|
+
{
|
|
1699
|
+
"data-slot": "context-menu-radio-item",
|
|
1700
|
+
className: cn(
|
|
1701
|
+
"focus:outline-none",
|
|
1702
|
+
"focus:bg-accent focus:text-accent-foreground",
|
|
1703
|
+
"relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm select-none",
|
|
1704
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1705
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1706
|
+
className
|
|
1707
|
+
),
|
|
1708
|
+
...props,
|
|
1709
|
+
children: [
|
|
1710
|
+
/* @__PURE__ */ jsx12("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx12(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx12(Circle, { className: "size-2 fill-current" }) }) }),
|
|
1711
|
+
children
|
|
1712
|
+
]
|
|
1713
|
+
}
|
|
1714
|
+
);
|
|
1715
|
+
}
|
|
1716
|
+
function ContextMenuLabelBase({
|
|
1717
|
+
className,
|
|
1718
|
+
inset,
|
|
1719
|
+
...props
|
|
1720
|
+
}) {
|
|
1721
|
+
return /* @__PURE__ */ jsx12(
|
|
1722
|
+
ContextMenuPrimitive.Label,
|
|
1723
|
+
{
|
|
1724
|
+
"data-slot": "context-menu-label",
|
|
1725
|
+
"data-inset": inset,
|
|
1726
|
+
className: cn("text-foreground px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
1727
|
+
...props
|
|
1728
|
+
}
|
|
1729
|
+
);
|
|
1730
|
+
}
|
|
1731
|
+
function ContextMenuSeparatorBase({
|
|
1732
|
+
className,
|
|
1733
|
+
...props
|
|
1734
|
+
}) {
|
|
1735
|
+
return /* @__PURE__ */ jsx12(
|
|
1736
|
+
ContextMenuPrimitive.Separator,
|
|
1737
|
+
{
|
|
1738
|
+
"data-slot": "context-menu-separator",
|
|
1739
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1740
|
+
...props
|
|
1741
|
+
}
|
|
1742
|
+
);
|
|
1743
|
+
}
|
|
1744
|
+
function ContextMenuShortcutBase({
|
|
1745
|
+
className,
|
|
1746
|
+
...props
|
|
1747
|
+
}) {
|
|
1748
|
+
return /* @__PURE__ */ jsx12(
|
|
1749
|
+
"span",
|
|
1750
|
+
{
|
|
1751
|
+
"data-slot": "context-menu-shortcut",
|
|
1752
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
1753
|
+
...props
|
|
1754
|
+
}
|
|
1755
|
+
);
|
|
1756
|
+
}
|
|
1757
|
+
|
|
1758
|
+
// src/components/ui/DrawerBase.tsx
|
|
1759
|
+
import { Drawer as DrawerPrimitive } from "vaul";
|
|
1760
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1761
|
+
function DrawerBase({
|
|
1762
|
+
...props
|
|
1763
|
+
}) {
|
|
1764
|
+
return /* @__PURE__ */ jsx13(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
|
|
1765
|
+
}
|
|
1766
|
+
function DrawerTriggerBase({
|
|
1767
|
+
...props
|
|
1768
|
+
}) {
|
|
1769
|
+
return /* @__PURE__ */ jsx13(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
|
|
1770
|
+
}
|
|
1771
|
+
function DrawerPortalBase({
|
|
1772
|
+
...props
|
|
1773
|
+
}) {
|
|
1774
|
+
return /* @__PURE__ */ jsx13(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
|
|
1775
|
+
}
|
|
1776
|
+
function DrawerCloseBase({
|
|
1777
|
+
...props
|
|
1778
|
+
}) {
|
|
1779
|
+
return /* @__PURE__ */ jsx13(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
|
|
1780
|
+
}
|
|
1781
|
+
function DrawerOverlayBase({
|
|
1782
|
+
className,
|
|
1783
|
+
...props
|
|
1784
|
+
}) {
|
|
1785
|
+
return /* @__PURE__ */ jsx13(
|
|
1786
|
+
DrawerPrimitive.Overlay,
|
|
1787
|
+
{
|
|
1788
|
+
"data-slot": "drawer-overlay",
|
|
1789
|
+
className: cn(
|
|
1790
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
1791
|
+
className
|
|
1792
|
+
),
|
|
1793
|
+
...props
|
|
1794
|
+
}
|
|
1795
|
+
);
|
|
1796
|
+
}
|
|
1797
|
+
function DrawerContentBase({
|
|
1798
|
+
className,
|
|
1799
|
+
children,
|
|
1800
|
+
...props
|
|
1801
|
+
}) {
|
|
1802
|
+
return /* @__PURE__ */ jsxs7(DrawerPortalBase, { children: [
|
|
1803
|
+
/* @__PURE__ */ jsx13(DrawerOverlayBase, {}),
|
|
1804
|
+
/* @__PURE__ */ jsxs7(
|
|
1805
|
+
DrawerPrimitive.Content,
|
|
1806
|
+
{
|
|
1807
|
+
"data-slot": "drawer-content",
|
|
1808
|
+
className: cn(
|
|
1809
|
+
"group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
|
|
1810
|
+
"data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
|
|
1811
|
+
"data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
|
|
1812
|
+
"data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
|
|
1813
|
+
"data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
|
|
1814
|
+
className
|
|
1815
|
+
),
|
|
1816
|
+
...props,
|
|
1817
|
+
children: [
|
|
1818
|
+
/* @__PURE__ */ jsx13("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
|
|
1819
|
+
children
|
|
1820
|
+
]
|
|
1821
|
+
}
|
|
1822
|
+
)
|
|
1823
|
+
] });
|
|
1824
|
+
}
|
|
1825
|
+
function DrawerHeaderBase({
|
|
1826
|
+
className,
|
|
1827
|
+
...props
|
|
1828
|
+
}) {
|
|
1829
|
+
return /* @__PURE__ */ jsx13(
|
|
1830
|
+
"div",
|
|
1831
|
+
{
|
|
1832
|
+
"data-slot": "drawer-header",
|
|
1833
|
+
className: cn(
|
|
1834
|
+
"flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
|
|
1835
|
+
className
|
|
1836
|
+
),
|
|
1837
|
+
...props
|
|
1838
|
+
}
|
|
1839
|
+
);
|
|
1840
|
+
}
|
|
1841
|
+
function DrawerFooterBase({
|
|
1842
|
+
className,
|
|
1843
|
+
...props
|
|
1844
|
+
}) {
|
|
1845
|
+
return /* @__PURE__ */ jsx13(
|
|
1846
|
+
"div",
|
|
1847
|
+
{
|
|
1848
|
+
"data-slot": "drawer-footer",
|
|
1849
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1850
|
+
...props
|
|
1851
|
+
}
|
|
1852
|
+
);
|
|
1853
|
+
}
|
|
1854
|
+
function DrawerTitleBase({
|
|
1855
|
+
className,
|
|
1856
|
+
...props
|
|
1857
|
+
}) {
|
|
1858
|
+
return /* @__PURE__ */ jsx13(
|
|
1859
|
+
DrawerPrimitive.Title,
|
|
1860
|
+
{
|
|
1861
|
+
"data-slot": "drawer-title",
|
|
1862
|
+
className: cn("text-foreground font-semibold", className),
|
|
1863
|
+
...props
|
|
1864
|
+
}
|
|
1865
|
+
);
|
|
1866
|
+
}
|
|
1867
|
+
function DrawerDescriptionBase({
|
|
1868
|
+
className,
|
|
1869
|
+
...props
|
|
1870
|
+
}) {
|
|
1871
|
+
return /* @__PURE__ */ jsx13(
|
|
1872
|
+
DrawerPrimitive.Description,
|
|
1873
|
+
{
|
|
1874
|
+
"data-slot": "drawer-description",
|
|
1875
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1876
|
+
...props
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
// src/components/ui/DropDownMenuBase.tsx
|
|
1882
|
+
import * as React9 from "react";
|
|
1883
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1884
|
+
import { Check as Check3, CaretRight as CaretRight4, Circle as Circle2 } from "phosphor-react";
|
|
1885
|
+
import { motion as motion3, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
1886
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1887
|
+
var DropDownMenuBase = DropdownMenuPrimitive.Root;
|
|
1888
|
+
var DropDownMenuTriggerBase = DropdownMenuPrimitive.Trigger;
|
|
1889
|
+
var DropDownMenuGroupBase = DropdownMenuPrimitive.Group;
|
|
1890
|
+
var DropDownMenuPortalBase = DropdownMenuPrimitive.Portal;
|
|
1891
|
+
var DropDownMenuSubBase = DropdownMenuPrimitive.Sub;
|
|
1892
|
+
var DropDownMenuRadioGroupBase = DropdownMenuPrimitive.RadioGroup;
|
|
1893
|
+
var DropDownMenuSubTriggerBase = React9.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
1894
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
1895
|
+
{
|
|
1896
|
+
ref,
|
|
1897
|
+
className: cn(
|
|
1898
|
+
"flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
1899
|
+
inset && "pl-8",
|
|
1900
|
+
className
|
|
1901
|
+
),
|
|
1902
|
+
...props,
|
|
1903
|
+
children: [
|
|
1904
|
+
children,
|
|
1905
|
+
/* @__PURE__ */ jsx14(CaretRight4, { className: "ml-auto" })
|
|
1906
|
+
]
|
|
1907
|
+
}
|
|
1908
|
+
));
|
|
1909
|
+
DropDownMenuSubTriggerBase.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
1910
|
+
var DropDownMenuSubContentBase = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
1911
|
+
DropdownMenuPrimitive.SubContent,
|
|
1912
|
+
{
|
|
1913
|
+
ref,
|
|
1914
|
+
className: cn(
|
|
1915
|
+
" min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1916
|
+
className
|
|
1917
|
+
),
|
|
1918
|
+
...props
|
|
1919
|
+
}
|
|
1920
|
+
));
|
|
1921
|
+
var DropDownMenuContentBase = React9.forwardRef(({ className, sideOffset = 4, testid: dataTestId = "dropdown-content", ...props }, ref) => /* @__PURE__ */ jsx14(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx14(
|
|
1922
|
+
DropdownMenuPrimitive.Content,
|
|
1923
|
+
{
|
|
1924
|
+
sideOffset,
|
|
1925
|
+
forceMount: true,
|
|
1926
|
+
ref,
|
|
1927
|
+
className: cn("z-[9999] p-0", className),
|
|
1928
|
+
"data-testid": dataTestId,
|
|
1929
|
+
...props,
|
|
1930
|
+
children: /* @__PURE__ */ jsx14(AnimatePresence2, { children: /* @__PURE__ */ jsx14(
|
|
1931
|
+
motion3.div,
|
|
1932
|
+
{
|
|
1933
|
+
initial: { opacity: 0, scale: 0.95, y: 5 },
|
|
1934
|
+
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1935
|
+
exit: { opacity: 0, scale: 0.95, y: 5 },
|
|
1936
|
+
transition: { duration: 0.2, ease: "easeOut" },
|
|
1937
|
+
className: cn(
|
|
1938
|
+
"min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1939
|
+
className
|
|
1940
|
+
),
|
|
1941
|
+
children: props.children
|
|
1942
|
+
}
|
|
1943
|
+
) })
|
|
1944
|
+
}
|
|
1945
|
+
) }));
|
|
1946
|
+
DropDownMenuContentBase.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1947
|
+
var DropDownMenuItemBase = React9.forwardRef(({ className, inset, leftIcon, rightIcon, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
1948
|
+
DropdownMenuPrimitive.Item,
|
|
1949
|
+
{
|
|
1950
|
+
ref,
|
|
1951
|
+
className: cn(
|
|
1952
|
+
"relative flex cursor-default select-none items-center justify-between rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1953
|
+
inset && "pl-8",
|
|
1954
|
+
className
|
|
1955
|
+
),
|
|
1956
|
+
...props,
|
|
1957
|
+
children: [
|
|
1958
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
|
|
1959
|
+
leftIcon && /* @__PURE__ */ jsx14("span", { className: "[&>svg]:size-4", children: leftIcon }),
|
|
1960
|
+
children
|
|
1961
|
+
] }),
|
|
1962
|
+
rightIcon && /* @__PURE__ */ jsx14("span", { className: "[&>svg]:size-4", children: rightIcon })
|
|
1963
|
+
]
|
|
1964
|
+
}
|
|
1965
|
+
));
|
|
1966
|
+
DropDownMenuItemBase.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1967
|
+
var DropDownMenuCheckboxItemBase = React9.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
1968
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
1969
|
+
{
|
|
1970
|
+
ref,
|
|
1971
|
+
className: cn(
|
|
1972
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1973
|
+
className
|
|
1974
|
+
),
|
|
1975
|
+
checked,
|
|
1976
|
+
...props,
|
|
1977
|
+
children: [
|
|
1978
|
+
/* @__PURE__ */ jsx14("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14(Check3, { className: "h-4 w-4" }) }) }),
|
|
1979
|
+
children
|
|
1980
|
+
]
|
|
1981
|
+
}
|
|
1982
|
+
));
|
|
1983
|
+
DropDownMenuCheckboxItemBase.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1984
|
+
var DropDownMenuRadioItemBase = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs8(
|
|
1985
|
+
DropdownMenuPrimitive.RadioItem,
|
|
1986
|
+
{
|
|
1987
|
+
ref,
|
|
1988
|
+
className: cn(
|
|
1989
|
+
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1990
|
+
className
|
|
1991
|
+
),
|
|
1992
|
+
...props,
|
|
1993
|
+
children: [
|
|
1994
|
+
/* @__PURE__ */ jsx14("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx14(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx14(Circle2, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1995
|
+
children
|
|
1996
|
+
]
|
|
1997
|
+
}
|
|
1998
|
+
));
|
|
1999
|
+
DropDownMenuRadioItemBase.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
2000
|
+
var DropDownMenuLabelBase = React9.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
2001
|
+
DropdownMenuPrimitive.Label,
|
|
2002
|
+
{
|
|
2003
|
+
ref,
|
|
2004
|
+
className: cn(
|
|
2005
|
+
"px-2 py-1.5 text-sm font-semibold",
|
|
2006
|
+
inset && "pl-8",
|
|
2007
|
+
className
|
|
2008
|
+
),
|
|
2009
|
+
...props
|
|
2010
|
+
}
|
|
2011
|
+
));
|
|
2012
|
+
DropDownMenuLabelBase.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
2013
|
+
var DropDownMenuSeparatorBase = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
|
|
2014
|
+
DropdownMenuPrimitive.Separator,
|
|
2015
|
+
{
|
|
2016
|
+
ref,
|
|
2017
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2018
|
+
...props
|
|
2019
|
+
}
|
|
2020
|
+
));
|
|
2021
|
+
DropDownMenuSeparatorBase.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
2022
|
+
var DropDownMenuShortcutBase = ({
|
|
2023
|
+
className,
|
|
2024
|
+
...props
|
|
2025
|
+
}) => {
|
|
2026
|
+
return /* @__PURE__ */ jsx14(
|
|
2027
|
+
"span",
|
|
2028
|
+
{
|
|
2029
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
2030
|
+
...props
|
|
2031
|
+
}
|
|
2032
|
+
);
|
|
2033
|
+
};
|
|
2034
|
+
DropDownMenuShortcutBase.displayName = "DropDownMenuShortcutBase";
|
|
2035
|
+
|
|
2036
|
+
// src/components/ui/FilterBase.tsx
|
|
2037
|
+
import { useState as useState3, useCallback as useCallback4, useMemo as useMemo3, useEffect as useEffect2 } from "react";
|
|
2038
|
+
import { useSearchParams } from "react-router-dom";
|
|
2039
|
+
|
|
2040
|
+
// src/components/ui/InputBase.tsx
|
|
2041
|
+
import * as React11 from "react";
|
|
2042
|
+
|
|
2043
|
+
// src/components/ui/LabelBase.tsx
|
|
2044
|
+
import * as React10 from "react";
|
|
2045
|
+
import { Label as RadixLabel } from "@radix-ui/react-label";
|
|
2046
|
+
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
2047
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2048
|
+
var LabelBase = React10.forwardRef(
|
|
2049
|
+
({ className, asChild = false, testid = "label-base", ...props }, ref) => {
|
|
2050
|
+
const Comp = asChild ? Slot4 : "label";
|
|
2051
|
+
return /* @__PURE__ */ jsx15(RadixLabel, { children: /* @__PURE__ */ jsx15(
|
|
2052
|
+
Comp,
|
|
2053
|
+
{
|
|
2054
|
+
ref,
|
|
2055
|
+
className: cn(
|
|
2056
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
2057
|
+
className
|
|
2058
|
+
),
|
|
2059
|
+
"data-testid": testid,
|
|
2060
|
+
...props
|
|
2061
|
+
}
|
|
2062
|
+
) });
|
|
2063
|
+
}
|
|
2064
|
+
);
|
|
2065
|
+
LabelBase.displayName = "LabelBase";
|
|
2066
|
+
var LabelBase_default = LabelBase;
|
|
2067
|
+
|
|
2068
|
+
// src/components/ui/InputBase.tsx
|
|
2069
|
+
import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2070
|
+
var InputBase = React11.forwardRef(
|
|
2071
|
+
({
|
|
2072
|
+
className,
|
|
2073
|
+
type = "text",
|
|
2074
|
+
label,
|
|
2075
|
+
labelClassname,
|
|
2076
|
+
leftIcon,
|
|
2077
|
+
rightIcon,
|
|
2078
|
+
"data-testid": dataTestId,
|
|
2079
|
+
...props
|
|
2080
|
+
}, ref) => {
|
|
2081
|
+
return /* @__PURE__ */ jsxs9("div", { className: "flex flex-col w-full min-w-[150px]", children: [
|
|
2082
|
+
label && /* @__PURE__ */ jsx16(LabelBase_default, { className: labelClassname, children: label }),
|
|
2083
|
+
/* @__PURE__ */ jsxs9(
|
|
2084
|
+
"div",
|
|
2085
|
+
{
|
|
2086
|
+
className: cn(
|
|
2087
|
+
"flex items-center rounded-md transition focus-within:ring-1 focus-within:ring-ring focus-within:border-ring bg-background overflow-hidden",
|
|
2088
|
+
type !== "file" && "border border-input"
|
|
2089
|
+
),
|
|
2090
|
+
children: [
|
|
2091
|
+
leftIcon && /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center px-2", children: leftIcon }),
|
|
2092
|
+
/* @__PURE__ */ jsx16(
|
|
2093
|
+
"input",
|
|
2094
|
+
{
|
|
2095
|
+
type,
|
|
2096
|
+
className: cn(
|
|
2097
|
+
"w-full flex-1 text-sm py-1.5 px-3 focus:outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 bg-background text-foreground",
|
|
2098
|
+
className
|
|
2099
|
+
),
|
|
2100
|
+
ref,
|
|
2101
|
+
"data-testid": dataTestId ?? "input-base",
|
|
2102
|
+
...props
|
|
2103
|
+
}
|
|
2104
|
+
),
|
|
2105
|
+
rightIcon && /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center px-2", children: rightIcon })
|
|
2106
|
+
]
|
|
2107
|
+
}
|
|
2108
|
+
)
|
|
2109
|
+
] });
|
|
2110
|
+
}
|
|
2111
|
+
);
|
|
2112
|
+
InputBase.displayName = "Input";
|
|
2113
|
+
|
|
2114
|
+
// src/components/selects/Combobox.tsx
|
|
2115
|
+
import { useCallback as useCallback2, useMemo } from "react";
|
|
2116
|
+
|
|
2117
|
+
// src/components/ui/PopoverBase.tsx
|
|
2118
|
+
import * as React12 from "react";
|
|
2119
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2120
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
2121
|
+
var PopoverBase = PopoverPrimitive.Root;
|
|
2122
|
+
var PopoverTriggerBase = PopoverPrimitive.Trigger;
|
|
2123
|
+
var PopoverAnchorBase = PopoverPrimitive.Anchor;
|
|
2124
|
+
var PopoverContentBase = React12.forwardRef(({ className, align = "center", sideOffset = 4, testid: dataTestId = "popover-content", ...props }, ref) => /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
|
|
2125
|
+
PopoverPrimitive.Content,
|
|
2126
|
+
{
|
|
2127
|
+
ref,
|
|
2128
|
+
align,
|
|
2129
|
+
sideOffset,
|
|
2130
|
+
className: cn(
|
|
2131
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2132
|
+
className
|
|
2133
|
+
),
|
|
2134
|
+
"data-testid": dataTestId,
|
|
2135
|
+
...props
|
|
2136
|
+
}
|
|
2137
|
+
) }));
|
|
2138
|
+
PopoverContentBase.displayName = PopoverPrimitive.Content.displayName;
|
|
2139
|
+
|
|
2140
|
+
// src/components/selects/ComboboxBase.tsx
|
|
2141
|
+
import { CaretDown, Check as Check4 } from "phosphor-react";
|
|
2142
|
+
import { useState as useState2 } from "react";
|
|
2143
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2144
|
+
function ComboboxBase({
|
|
2145
|
+
items,
|
|
2146
|
+
renderSelected,
|
|
2147
|
+
handleSelection,
|
|
2148
|
+
checkIsSelected,
|
|
2149
|
+
searchPlaceholder,
|
|
2150
|
+
errorMessage,
|
|
2151
|
+
testIds = {}
|
|
2152
|
+
}) {
|
|
2153
|
+
const [open, setOpen] = useState2(false);
|
|
2154
|
+
return /* @__PURE__ */ jsx18(
|
|
2155
|
+
"div",
|
|
2156
|
+
{
|
|
2157
|
+
className: "col-span-1 w-full",
|
|
2158
|
+
"data-testid": testIds.root ?? "combobox-base-root",
|
|
2159
|
+
children: /* @__PURE__ */ jsxs10(PopoverBase, { open, onOpenChange: setOpen, modal: true, children: [
|
|
2160
|
+
/* @__PURE__ */ jsx18(
|
|
2161
|
+
PopoverTriggerBase,
|
|
2162
|
+
{
|
|
2163
|
+
asChild: true,
|
|
2164
|
+
className: "flex w-full justify-between dark:bg-[hsl(231,15%,19%)]",
|
|
2165
|
+
children: /* @__PURE__ */ jsxs10(
|
|
2166
|
+
ButtonBase,
|
|
2167
|
+
{
|
|
2168
|
+
variant: "outline",
|
|
2169
|
+
role: "combobox",
|
|
2170
|
+
"aria-expanded": open,
|
|
2171
|
+
className: cn(
|
|
2172
|
+
"flex items-start gap-2 justify-between h-full",
|
|
2173
|
+
errorMessage && "border-red-500"
|
|
2174
|
+
),
|
|
2175
|
+
"data-testid": testIds.trigger ?? "combobox-trigger",
|
|
2176
|
+
children: [
|
|
2177
|
+
renderSelected,
|
|
2178
|
+
/* @__PURE__ */ jsx18(CaretDown, { size: 16, className: "mt-0.5" })
|
|
2179
|
+
]
|
|
2180
|
+
}
|
|
2181
|
+
)
|
|
2182
|
+
}
|
|
2183
|
+
),
|
|
2184
|
+
/* @__PURE__ */ jsx18(
|
|
2185
|
+
PopoverContentBase,
|
|
2186
|
+
{
|
|
2187
|
+
className: "max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0 border-none",
|
|
2188
|
+
"data-testid": testIds.popover ?? "combobox-popover",
|
|
2189
|
+
children: /* @__PURE__ */ jsxs10(
|
|
2190
|
+
CommandBase,
|
|
2191
|
+
{
|
|
2192
|
+
className: "dark:text-white",
|
|
2193
|
+
"data-testid": testIds.command ?? "combobox-command",
|
|
2194
|
+
children: [
|
|
2195
|
+
/* @__PURE__ */ jsx18(
|
|
2196
|
+
CommandInputBase,
|
|
2197
|
+
{
|
|
2198
|
+
tabIndex: -1,
|
|
2199
|
+
placeholder: searchPlaceholder ?? "Busque uma op\xE7\xE3o...",
|
|
2200
|
+
"data-testid": testIds.search ?? "combobox-search"
|
|
2201
|
+
}
|
|
2202
|
+
),
|
|
2203
|
+
/* @__PURE__ */ jsxs10(CommandListBase, { "data-testid": testIds.list ?? "combobox-list", children: [
|
|
2204
|
+
/* @__PURE__ */ jsx18(CommandEmptyBase, { "data-testid": testIds.empty ?? "combobox-empty", children: "Nenhum dado encontrado" }),
|
|
2205
|
+
/* @__PURE__ */ jsx18(CommandGroupBase, { "data-testid": testIds.group ?? "combobox-group", children: items.map((item) => {
|
|
2206
|
+
const isSelected = checkIsSelected(item.value);
|
|
2207
|
+
return /* @__PURE__ */ jsxs10(
|
|
2208
|
+
CommandItemBase,
|
|
2209
|
+
{
|
|
2210
|
+
keywords: [item.label],
|
|
2211
|
+
value: item.value,
|
|
2212
|
+
onSelect: (value) => {
|
|
2213
|
+
handleSelection(value);
|
|
2214
|
+
setOpen(false);
|
|
2215
|
+
},
|
|
2216
|
+
"data-testid": testIds.option ?? "combobox-option",
|
|
2217
|
+
children: [
|
|
2218
|
+
item.label,
|
|
2219
|
+
/* @__PURE__ */ jsx18(
|
|
2220
|
+
Check4,
|
|
2221
|
+
{
|
|
2222
|
+
className: cn(
|
|
2223
|
+
"ml-auto",
|
|
2224
|
+
isSelected ? "opacity-100" : "opacity-0"
|
|
2225
|
+
),
|
|
2226
|
+
"data-testid": isSelected ? testIds.check ?? "combobox-option-check" : void 0
|
|
2227
|
+
}
|
|
2228
|
+
)
|
|
2229
|
+
]
|
|
2230
|
+
},
|
|
2231
|
+
item.value
|
|
2232
|
+
);
|
|
2233
|
+
}) })
|
|
2234
|
+
] })
|
|
2235
|
+
]
|
|
2236
|
+
}
|
|
2237
|
+
)
|
|
2238
|
+
}
|
|
2239
|
+
)
|
|
2240
|
+
] })
|
|
2241
|
+
}
|
|
2242
|
+
);
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
// src/components/selects/Combobox.tsx
|
|
2246
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2247
|
+
function Combobox({
|
|
2248
|
+
items,
|
|
2249
|
+
selected,
|
|
2250
|
+
onChange,
|
|
2251
|
+
className,
|
|
2252
|
+
placeholder,
|
|
2253
|
+
searchPlaceholder,
|
|
2254
|
+
label,
|
|
2255
|
+
labelClassname,
|
|
2256
|
+
testIds
|
|
2257
|
+
}) {
|
|
2258
|
+
const selectedItem = items.find((item) => item.value === selected);
|
|
2259
|
+
const renderSelected = useMemo(() => {
|
|
2260
|
+
return /* @__PURE__ */ jsx19(
|
|
2261
|
+
"span",
|
|
2262
|
+
{
|
|
2263
|
+
"data-testid": testIds?.selected ?? "combobox-selected",
|
|
2264
|
+
className: cn("truncate", !selectedItem && "text-gray-500"),
|
|
2265
|
+
children: selectedItem?.label ?? placeholder ?? "Selecione uma op\xE7\xE3o..."
|
|
2266
|
+
}
|
|
2267
|
+
);
|
|
2268
|
+
}, [placeholder, selectedItem, testIds?.selected]);
|
|
2269
|
+
const checkIsSelected = useCallback2(
|
|
2270
|
+
(value) => selected == null ? false : selected == value,
|
|
2271
|
+
[selected]
|
|
2272
|
+
);
|
|
2273
|
+
const handleSelection = useCallback2(
|
|
2274
|
+
(value) => {
|
|
2275
|
+
onChange(value === selected ? null : value);
|
|
2276
|
+
},
|
|
2277
|
+
[selected, onChange]
|
|
2278
|
+
);
|
|
2279
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn("flex flex-col gap-1 w-full min-w-[150px]", className), children: [
|
|
2280
|
+
label && /* @__PURE__ */ jsx19(LabelBase_default, { className: labelClassname, children: label }),
|
|
2281
|
+
/* @__PURE__ */ jsx19(
|
|
2282
|
+
ComboboxBase,
|
|
2283
|
+
{
|
|
2284
|
+
items,
|
|
2285
|
+
renderSelected,
|
|
2286
|
+
handleSelection,
|
|
2287
|
+
checkIsSelected,
|
|
2288
|
+
searchPlaceholder,
|
|
2289
|
+
testIds
|
|
2290
|
+
}
|
|
2291
|
+
)
|
|
2292
|
+
] });
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
// src/components/selects/MultiCombobox.tsx
|
|
2296
|
+
import { useCallback as useCallback3, useMemo as useMemo2 } from "react";
|
|
2297
|
+
import { X as X2 } from "phosphor-react";
|
|
2298
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2299
|
+
function MultiCombobox({
|
|
2300
|
+
items,
|
|
2301
|
+
selected,
|
|
2302
|
+
onChange,
|
|
2303
|
+
className,
|
|
2304
|
+
placeholder,
|
|
2305
|
+
searchPlaceholder,
|
|
2306
|
+
label,
|
|
2307
|
+
labelClassname,
|
|
2308
|
+
testIds = {}
|
|
2309
|
+
}) {
|
|
2310
|
+
const selectedItems = items.filter((item) => selected.includes(item.value));
|
|
2311
|
+
const checkIsSelected = useCallback3(
|
|
2312
|
+
(value) => selected.includes(value),
|
|
2313
|
+
[selected]
|
|
2314
|
+
);
|
|
2315
|
+
const handleSelection = useCallback3(
|
|
2316
|
+
(value) => {
|
|
2317
|
+
const isSelected = selected.includes(value);
|
|
2318
|
+
if (isSelected) {
|
|
2319
|
+
onChange(selected.filter((item) => item !== value));
|
|
2320
|
+
} else {
|
|
2321
|
+
onChange([...selected, value]);
|
|
2322
|
+
}
|
|
2323
|
+
},
|
|
2324
|
+
[selected, onChange]
|
|
2325
|
+
);
|
|
2326
|
+
const renderSelected = useMemo2(() => {
|
|
2327
|
+
if (selectedItems.length === 0) {
|
|
2328
|
+
return /* @__PURE__ */ jsx20(
|
|
2329
|
+
"span",
|
|
2330
|
+
{
|
|
2331
|
+
"data-testid": testIds.emptyPlaceholder ?? "combobox-selected-empty",
|
|
2332
|
+
className: "text-gray-500",
|
|
2333
|
+
children: placeholder ?? "Selecione uma op\xE7\xE3o..."
|
|
2334
|
+
}
|
|
2335
|
+
);
|
|
2336
|
+
}
|
|
2337
|
+
return /* @__PURE__ */ jsx20(
|
|
2338
|
+
"div",
|
|
2339
|
+
{
|
|
2340
|
+
"data-testid": testIds.selectedWrapper ?? "combobox-selected-wrapper",
|
|
2341
|
+
className: "flex w-full flex-wrap gap-2",
|
|
2342
|
+
children: selectedItems.map((item) => /* @__PURE__ */ jsxs12(
|
|
2343
|
+
"div",
|
|
2344
|
+
{
|
|
2345
|
+
className: "flex items-center gap-1 rounded-md border p-1",
|
|
2346
|
+
"data-testid": testIds.selectedItem?.(item.value) ?? `combobox-selected-${item.value}`,
|
|
2347
|
+
children: [
|
|
2348
|
+
/* @__PURE__ */ jsx20("span", { className: "whitespace-break-spaces text-xs", children: item.label }),
|
|
2349
|
+
/* @__PURE__ */ jsx20(
|
|
2350
|
+
"span",
|
|
2351
|
+
{
|
|
2352
|
+
role: "button",
|
|
2353
|
+
tabIndex: 0,
|
|
2354
|
+
onClick: (e) => {
|
|
2355
|
+
e.stopPropagation();
|
|
2356
|
+
handleSelection(item.value);
|
|
2357
|
+
},
|
|
2358
|
+
className: "cursor-pointer p-0 m-0 text-xs flex items-center justify-center hover:text-red-500 hover:scale-110 transition-all",
|
|
2359
|
+
children: /* @__PURE__ */ jsx20(X2, { size: 14 })
|
|
2360
|
+
}
|
|
2361
|
+
)
|
|
2362
|
+
]
|
|
2363
|
+
},
|
|
2364
|
+
item.value
|
|
2365
|
+
))
|
|
2366
|
+
}
|
|
2367
|
+
);
|
|
2368
|
+
}, [handleSelection, placeholder, selectedItems, testIds]);
|
|
2369
|
+
return /* @__PURE__ */ jsxs12(
|
|
2370
|
+
"div",
|
|
2371
|
+
{
|
|
2372
|
+
className: cn("flex flex-col gap-1 w-full min-w-[150px]", className),
|
|
2373
|
+
"data-testid": testIds.root ?? "multi-combobox-root",
|
|
2374
|
+
children: [
|
|
2375
|
+
label && /* @__PURE__ */ jsx20(
|
|
2376
|
+
LabelBase_default,
|
|
2377
|
+
{
|
|
2378
|
+
className: labelClassname,
|
|
2379
|
+
"data-testid": testIds.label ?? "multi-combobox-label",
|
|
2380
|
+
children: label
|
|
2381
|
+
}
|
|
2382
|
+
),
|
|
2383
|
+
/* @__PURE__ */ jsx20(
|
|
2384
|
+
ComboboxBase,
|
|
2385
|
+
{
|
|
2386
|
+
items,
|
|
2387
|
+
renderSelected,
|
|
2388
|
+
handleSelection,
|
|
2389
|
+
checkIsSelected,
|
|
2390
|
+
searchPlaceholder
|
|
2391
|
+
}
|
|
2392
|
+
)
|
|
2393
|
+
]
|
|
2394
|
+
}
|
|
2395
|
+
);
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
// src/components/ui/TooltipBase.tsx
|
|
2399
|
+
import * as React13 from "react";
|
|
2400
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
2401
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
2402
|
+
var TooltipProviderBase = TooltipPrimitive.Provider;
|
|
2403
|
+
var TooltipBase = TooltipPrimitive.Root;
|
|
2404
|
+
var TooltipTriggerBase = TooltipPrimitive.Trigger;
|
|
2405
|
+
var TooltipContentBase = React13.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx21(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx21(
|
|
2406
|
+
TooltipPrimitive.Content,
|
|
2407
|
+
{
|
|
2408
|
+
ref,
|
|
2409
|
+
sideOffset,
|
|
2410
|
+
className: cn(
|
|
2411
|
+
"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
2412
|
+
className
|
|
2413
|
+
),
|
|
2414
|
+
...props
|
|
2415
|
+
}
|
|
2416
|
+
) }));
|
|
2417
|
+
TooltipContentBase.displayName = TooltipPrimitive.Content.displayName;
|
|
2418
|
+
|
|
2419
|
+
// src/components/ui/FilterBase.tsx
|
|
2420
|
+
var import_colors = __toESM(require_colors2());
|
|
2421
|
+
import { FunnelSimple, Plus, Trash } from "phosphor-react";
|
|
2422
|
+
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2423
|
+
|
|
2424
|
+
// src/components/ui/HoverCardBase.tsx
|
|
2425
|
+
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
2426
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2427
|
+
function HoverCardBase(props) {
|
|
2428
|
+
return /* @__PURE__ */ jsx23(HoverCardPrimitive.Root, { ...props });
|
|
2429
|
+
}
|
|
2430
|
+
function HoverCardTriggerBase(props) {
|
|
2431
|
+
return /* @__PURE__ */ jsx23(HoverCardPrimitive.Trigger, { ...props });
|
|
2432
|
+
}
|
|
2433
|
+
function HoverCardContentBase({
|
|
2434
|
+
className,
|
|
2435
|
+
align = "center",
|
|
2436
|
+
sideOffset = 4,
|
|
2437
|
+
...props
|
|
2438
|
+
}) {
|
|
2439
|
+
return /* @__PURE__ */ jsx23(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx23(
|
|
2440
|
+
HoverCardPrimitive.Content,
|
|
2441
|
+
{
|
|
2442
|
+
align,
|
|
2443
|
+
sideOffset,
|
|
2444
|
+
className: cn(
|
|
2445
|
+
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none",
|
|
2446
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2447
|
+
"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
|
|
2448
|
+
"data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
|
|
2449
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
2450
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
2451
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
2452
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
2453
|
+
className
|
|
2454
|
+
),
|
|
2455
|
+
...props
|
|
2456
|
+
}
|
|
2457
|
+
) });
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
// src/components/ui/Input-OTP-Base.tsx
|
|
2461
|
+
import * as React14 from "react";
|
|
2462
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
2463
|
+
import { Minus } from "phosphor-react";
|
|
2464
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2465
|
+
function InputOTPBase({
|
|
2466
|
+
className,
|
|
2467
|
+
containerClassName,
|
|
2468
|
+
...props
|
|
2469
|
+
}) {
|
|
2470
|
+
return /* @__PURE__ */ jsx24(
|
|
2471
|
+
OTPInput,
|
|
2472
|
+
{
|
|
2473
|
+
"data-slot": "input-otp",
|
|
2474
|
+
containerClassName: cn(
|
|
2475
|
+
"flex items-center gap-2 has-disabled:opacity-50",
|
|
2476
|
+
containerClassName
|
|
2477
|
+
),
|
|
2478
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
2479
|
+
...props
|
|
2480
|
+
}
|
|
2481
|
+
);
|
|
2482
|
+
}
|
|
2483
|
+
function InputOTPGroupBase({ className, ...props }) {
|
|
2484
|
+
return /* @__PURE__ */ jsx24(
|
|
2485
|
+
"div",
|
|
2486
|
+
{
|
|
2487
|
+
"data-slot": "input-otp-group",
|
|
2488
|
+
className: cn("flex items-center", className),
|
|
2489
|
+
...props
|
|
2490
|
+
}
|
|
2491
|
+
);
|
|
2492
|
+
}
|
|
2493
|
+
function InputOTPSlotBase({
|
|
2494
|
+
index,
|
|
2495
|
+
className,
|
|
2496
|
+
...props
|
|
2497
|
+
}) {
|
|
2498
|
+
const inputOTPContext = React14.useContext(OTPInputContext);
|
|
2499
|
+
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
2500
|
+
return /* @__PURE__ */ jsxs14(
|
|
2501
|
+
"div",
|
|
2502
|
+
{
|
|
2503
|
+
"data-slot": "input-otp-slot",
|
|
2504
|
+
"data-active": isActive,
|
|
2505
|
+
className: cn(
|
|
2506
|
+
"data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",
|
|
2507
|
+
className
|
|
2508
|
+
),
|
|
2509
|
+
...props,
|
|
2510
|
+
children: [
|
|
2511
|
+
char,
|
|
2512
|
+
hasFakeCaret && /* @__PURE__ */ jsx24("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx24("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
2513
|
+
]
|
|
2514
|
+
}
|
|
2515
|
+
);
|
|
2516
|
+
}
|
|
2517
|
+
function InputOTPSeparatorBase({ ...props }) {
|
|
2518
|
+
return /* @__PURE__ */ jsx24("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx24(Minus, {}) });
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
// src/components/ui/NavigationMenuBase.tsx
|
|
2522
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
2523
|
+
import { cva as cva3 } from "class-variance-authority";
|
|
2524
|
+
import { CaretDown as CaretDown2 } from "phosphor-react";
|
|
2525
|
+
import { jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2526
|
+
function NavigationMenuBase({
|
|
2527
|
+
className,
|
|
2528
|
+
children,
|
|
2529
|
+
viewport = true,
|
|
2530
|
+
...props
|
|
2531
|
+
}) {
|
|
2532
|
+
return /* @__PURE__ */ jsxs15(
|
|
2533
|
+
NavigationMenuPrimitive.Root,
|
|
2534
|
+
{
|
|
2535
|
+
"data-slot": "navigation-menu",
|
|
2536
|
+
"data-viewport": viewport,
|
|
2537
|
+
className: cn(
|
|
2538
|
+
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
2539
|
+
className
|
|
2540
|
+
),
|
|
2541
|
+
...props,
|
|
2542
|
+
children: [
|
|
2543
|
+
children,
|
|
2544
|
+
viewport && /* @__PURE__ */ jsx25(NavigationMenuViewportBase, {})
|
|
2545
|
+
]
|
|
2546
|
+
}
|
|
2547
|
+
);
|
|
2548
|
+
}
|
|
2549
|
+
function NavigationMenuListBase({
|
|
2550
|
+
className,
|
|
2551
|
+
...props
|
|
2552
|
+
}) {
|
|
2553
|
+
return /* @__PURE__ */ jsx25(
|
|
2554
|
+
NavigationMenuPrimitive.List,
|
|
2555
|
+
{
|
|
2556
|
+
"data-slot": "navigation-menu-list",
|
|
2557
|
+
className: cn(
|
|
2558
|
+
"group flex flex-1 list-none items-center justify-center gap-1",
|
|
2559
|
+
className
|
|
2560
|
+
),
|
|
2561
|
+
...props
|
|
2562
|
+
}
|
|
2563
|
+
);
|
|
2564
|
+
}
|
|
2565
|
+
function NavigationMenuItemBase({
|
|
2566
|
+
className,
|
|
2567
|
+
...props
|
|
2568
|
+
}) {
|
|
2569
|
+
return /* @__PURE__ */ jsx25(
|
|
2570
|
+
NavigationMenuPrimitive.Item,
|
|
2571
|
+
{
|
|
2572
|
+
"data-slot": "navigation-menu-item",
|
|
2573
|
+
className: cn("relative", className),
|
|
2574
|
+
...props
|
|
2575
|
+
}
|
|
2576
|
+
);
|
|
2577
|
+
}
|
|
2578
|
+
var navigationMenuTriggerStyle = cva3(
|
|
2579
|
+
"group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
|
|
2580
|
+
);
|
|
2581
|
+
function NavigationMenuTriggerBase({
|
|
2582
|
+
className,
|
|
2583
|
+
children,
|
|
2584
|
+
...props
|
|
2585
|
+
}) {
|
|
2586
|
+
return /* @__PURE__ */ jsxs15(
|
|
2587
|
+
NavigationMenuPrimitive.Trigger,
|
|
2588
|
+
{
|
|
2589
|
+
"data-slot": "navigation-menu-trigger",
|
|
2590
|
+
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
2591
|
+
...props,
|
|
2592
|
+
children: [
|
|
2593
|
+
children,
|
|
2594
|
+
/* @__PURE__ */ jsx25(
|
|
2595
|
+
CaretDown2,
|
|
2596
|
+
{
|
|
2597
|
+
className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
2598
|
+
"aria-hidden": "true"
|
|
2599
|
+
}
|
|
2600
|
+
)
|
|
2601
|
+
]
|
|
2602
|
+
}
|
|
2603
|
+
);
|
|
2604
|
+
}
|
|
2605
|
+
function NavigationMenuContentBase({
|
|
2606
|
+
className,
|
|
2607
|
+
...props
|
|
2608
|
+
}) {
|
|
2609
|
+
return /* @__PURE__ */ jsx25(
|
|
2610
|
+
NavigationMenuPrimitive.Content,
|
|
2611
|
+
{
|
|
2612
|
+
"data-slot": "navigation-menu-content",
|
|
2613
|
+
className: cn(
|
|
2614
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
2615
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
2616
|
+
className
|
|
2617
|
+
),
|
|
2618
|
+
...props
|
|
2619
|
+
}
|
|
2620
|
+
);
|
|
2621
|
+
}
|
|
2622
|
+
function NavigationMenuViewportBase({
|
|
2623
|
+
className,
|
|
2624
|
+
...props
|
|
2625
|
+
}) {
|
|
2626
|
+
return /* @__PURE__ */ jsx25("div", { className: cn("absolute top-full left-0 isolate z-50 flex justify-center"), children: /* @__PURE__ */ jsx25(
|
|
2627
|
+
NavigationMenuPrimitive.Viewport,
|
|
2628
|
+
{
|
|
2629
|
+
"data-slot": "navigation-menu-viewport",
|
|
2630
|
+
className: cn(
|
|
2631
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
2632
|
+
className
|
|
2633
|
+
),
|
|
2634
|
+
...props
|
|
2635
|
+
}
|
|
2636
|
+
) });
|
|
2637
|
+
}
|
|
2638
|
+
function NavigationMenuLinkBase({
|
|
2639
|
+
className,
|
|
2640
|
+
...props
|
|
2641
|
+
}) {
|
|
2642
|
+
return /* @__PURE__ */ jsx25(
|
|
2643
|
+
NavigationMenuPrimitive.Link,
|
|
2644
|
+
{
|
|
2645
|
+
"data-slot": "navigation-menu-link",
|
|
2646
|
+
className: cn(
|
|
2647
|
+
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
2648
|
+
className
|
|
2649
|
+
),
|
|
2650
|
+
...props
|
|
2651
|
+
}
|
|
2652
|
+
);
|
|
2653
|
+
}
|
|
2654
|
+
function NavigationMenuIndicatorBase({
|
|
2655
|
+
className,
|
|
2656
|
+
...props
|
|
2657
|
+
}) {
|
|
2658
|
+
return /* @__PURE__ */ jsx25(
|
|
2659
|
+
NavigationMenuPrimitive.Indicator,
|
|
2660
|
+
{
|
|
2661
|
+
"data-slot": "navigation-menu-indicator",
|
|
2662
|
+
className: cn(
|
|
2663
|
+
"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",
|
|
2664
|
+
className
|
|
2665
|
+
),
|
|
2666
|
+
...props,
|
|
2667
|
+
children: /* @__PURE__ */ jsx25("div", { className: "bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md" })
|
|
2668
|
+
}
|
|
2669
|
+
);
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
// src/components/ui/ProgressBase.tsx
|
|
2673
|
+
import * as React15 from "react";
|
|
2674
|
+
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
2675
|
+
import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2676
|
+
var ProgressBase = React15.forwardRef(({ className, value, label, leftIcon, rightIcon, ...props }, ref) => {
|
|
2677
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
2678
|
+
label && /* @__PURE__ */ jsx26(LabelBase_default, { className: "py-2", children: label }),
|
|
2679
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
2680
|
+
leftIcon && /* @__PURE__ */ jsx26("div", { className: "flex items-center justify-center", children: leftIcon }),
|
|
2681
|
+
/* @__PURE__ */ jsx26(
|
|
2682
|
+
ProgressPrimitive.Root,
|
|
2683
|
+
{
|
|
2684
|
+
ref,
|
|
2685
|
+
className: cn(
|
|
2686
|
+
"relative h-3 w-full overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-800 shadow-inner transition-all",
|
|
2687
|
+
className
|
|
2688
|
+
),
|
|
2689
|
+
value,
|
|
2690
|
+
...props,
|
|
2691
|
+
children: /* @__PURE__ */ jsx26(
|
|
2692
|
+
ProgressPrimitive.Indicator,
|
|
2693
|
+
{
|
|
2694
|
+
className: "h-full w-full flex-1 bg-primary transition-all duration-500 ease-in-out",
|
|
2695
|
+
style: { transform: `translateX(-${100 - (value || 0)}%)` }
|
|
2696
|
+
}
|
|
2697
|
+
)
|
|
2698
|
+
}
|
|
2699
|
+
),
|
|
2700
|
+
rightIcon && /* @__PURE__ */ jsx26("div", { className: "flex items-center justify-center", children: rightIcon })
|
|
2701
|
+
] })
|
|
2702
|
+
] });
|
|
2703
|
+
});
|
|
2704
|
+
ProgressBase.displayName = "ProgressBase";
|
|
2705
|
+
var ProgressSegmentsBase = ({
|
|
2706
|
+
label,
|
|
2707
|
+
segments,
|
|
2708
|
+
value
|
|
2709
|
+
}) => {
|
|
2710
|
+
const filled = Math.round(value / 100 * segments);
|
|
2711
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
2712
|
+
label && /* @__PURE__ */ jsx26(LabelBase_default, { className: "py-2", children: label }),
|
|
2713
|
+
/* @__PURE__ */ jsx26("div", { className: "flex gap-1 w-full", children: Array.from({ length: segments }).map((_, idx) => /* @__PURE__ */ jsx26(
|
|
2714
|
+
"div",
|
|
2715
|
+
{
|
|
2716
|
+
className: cn(
|
|
2717
|
+
"h-2 flex-1 rounded-full transition-all duration-300",
|
|
2718
|
+
idx < filled ? "bg-primary" : "bg-zinc-300 hover:bg-zinc-400"
|
|
2719
|
+
)
|
|
2720
|
+
},
|
|
2721
|
+
idx
|
|
2722
|
+
)) })
|
|
2723
|
+
] });
|
|
2724
|
+
};
|
|
2725
|
+
var ArrowRightIcon = () => /* @__PURE__ */ jsx26(
|
|
2726
|
+
"svg",
|
|
2727
|
+
{
|
|
2728
|
+
className: "w-6 h-6 text-zinc-400 transition-transform duration-300 group-hover:translate-x-1",
|
|
2729
|
+
fill: "none",
|
|
2730
|
+
stroke: "currentColor",
|
|
2731
|
+
strokeWidth: 2,
|
|
2732
|
+
viewBox: "0 0 24 24",
|
|
2733
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2734
|
+
children: /* @__PURE__ */ jsx26("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
|
|
2735
|
+
}
|
|
2736
|
+
);
|
|
2737
|
+
var ProgressPanelsBase = ({
|
|
2738
|
+
label,
|
|
2739
|
+
steps,
|
|
2740
|
+
currentStep
|
|
2741
|
+
}) => {
|
|
2742
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
2743
|
+
label && /* @__PURE__ */ jsx26(LabelBase_default, { className: "py-2", children: label }),
|
|
2744
|
+
/* @__PURE__ */ jsx26("div", { className: "flex w-full gap-1 rounded-lg overflow-hidden", children: steps.map((step, idx) => {
|
|
2745
|
+
const isActive = idx === currentStep;
|
|
2746
|
+
const isLast = idx === steps.length - 1;
|
|
2747
|
+
return /* @__PURE__ */ jsxs16(React15.Fragment, { children: [
|
|
2748
|
+
/* @__PURE__ */ jsxs16(
|
|
2749
|
+
"div",
|
|
2750
|
+
{
|
|
2751
|
+
className: cn(
|
|
2752
|
+
"relative flex items-center justify-center cursor-pointer select-none rounded-lg border transition-shadow duration-300 ease-in-out",
|
|
2753
|
+
"hover:shadow-md hover:z-10",
|
|
2754
|
+
"aspect-[5/1] min-w-[90px] px-4",
|
|
2755
|
+
isActive ? "bg-primary/20 border-2 border-primary shadow-lg font-semibold" : "border-zinc-300"
|
|
2756
|
+
),
|
|
2757
|
+
style: { flex: "1 1 0" },
|
|
2758
|
+
children: [
|
|
2759
|
+
/* @__PURE__ */ jsx26("span", { className: "truncate", children: step }),
|
|
2760
|
+
isActive && /* @__PURE__ */ jsx26("div", { className: "absolute bottom-0 left-0 h-1 w-full animate-pulse rounded-b-lg" })
|
|
2761
|
+
]
|
|
2762
|
+
}
|
|
2763
|
+
),
|
|
2764
|
+
!isLast && /* @__PURE__ */ jsx26("div", { className: "flex items-center px-2 group", children: /* @__PURE__ */ jsx26(ArrowRightIcon, {}) })
|
|
2765
|
+
] }, idx);
|
|
2766
|
+
}) })
|
|
2767
|
+
] });
|
|
2768
|
+
};
|
|
2769
|
+
var ProgressCirclesBase = ({
|
|
2770
|
+
label,
|
|
2771
|
+
steps,
|
|
2772
|
+
currentStep
|
|
2773
|
+
}) => {
|
|
2774
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
2775
|
+
label && /* @__PURE__ */ jsx26("label", { className: "py-2 text-base font-semibold text-gray-700 dark:text-gray-300", children: label }),
|
|
2776
|
+
/* @__PURE__ */ jsxs16("div", { className: "relative flex items-center justify-between w-full", children: [
|
|
2777
|
+
/* @__PURE__ */ jsx26("div", { className: "absolute top-5 left-0 w-full h-1 bg-zinc-200 dark:bg-zinc-700" }),
|
|
2778
|
+
/* @__PURE__ */ jsx26(
|
|
2779
|
+
"div",
|
|
2780
|
+
{
|
|
2781
|
+
className: "absolute top-5 left-0 h-1 bg-primary transition-all duration-300",
|
|
2782
|
+
style: {
|
|
2783
|
+
width: `${currentStep / (steps.length - 1) * 100}%`
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
),
|
|
2787
|
+
steps.map((step, idx) => {
|
|
2788
|
+
const isActive = idx <= currentStep;
|
|
2789
|
+
return /* @__PURE__ */ jsxs16(
|
|
2790
|
+
"div",
|
|
2791
|
+
{
|
|
2792
|
+
className: "relative flex flex-col items-center w-10",
|
|
2793
|
+
style: { zIndex: isActive ? 10 : 1 },
|
|
2794
|
+
children: [
|
|
2795
|
+
/* @__PURE__ */ jsx26(
|
|
2796
|
+
"div",
|
|
2797
|
+
{
|
|
2798
|
+
className: cn(
|
|
2799
|
+
"w-10 h-10 rounded-full flex items-center justify-center font-bold text-sm transition-all duration-300 cursor-pointer select-none",
|
|
2800
|
+
isActive ? "bg-primary text-white dark:text-black shadow-md" : "bg-zinc-200 text-zinc-500 hover:bg-zinc-300 dark:bg-zinc-500 dark:text-black"
|
|
2801
|
+
),
|
|
2802
|
+
children: idx + 1
|
|
2803
|
+
}
|
|
2804
|
+
),
|
|
2805
|
+
/* @__PURE__ */ jsx26("span", { className: "text-xs text-center font-medium mt-1 max-w-[80px] break-words", children: step })
|
|
2806
|
+
]
|
|
2807
|
+
},
|
|
2808
|
+
idx
|
|
2809
|
+
);
|
|
2810
|
+
})
|
|
2811
|
+
] })
|
|
2812
|
+
] });
|
|
2813
|
+
};
|
|
2814
|
+
|
|
2815
|
+
// src/components/ui/ScrollareaBase.tsx
|
|
2816
|
+
import * as React16 from "react";
|
|
2817
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
2818
|
+
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2819
|
+
var ScrollAreaBase = React16.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs17(
|
|
2820
|
+
ScrollAreaPrimitive.Root,
|
|
2821
|
+
{
|
|
2822
|
+
ref,
|
|
2823
|
+
className: cn("relative overflow-hidden", className),
|
|
2824
|
+
...props,
|
|
2825
|
+
children: [
|
|
2826
|
+
/* @__PURE__ */ jsx27(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
2827
|
+
/* @__PURE__ */ jsx27(ScrollBarBase, {}),
|
|
2828
|
+
/* @__PURE__ */ jsx27(ScrollAreaPrimitive.Corner, {})
|
|
2829
|
+
]
|
|
2830
|
+
}
|
|
2831
|
+
));
|
|
2832
|
+
ScrollAreaBase.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
2833
|
+
var ScrollBarBase = React16.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
2834
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
2835
|
+
{
|
|
2836
|
+
ref,
|
|
2837
|
+
orientation,
|
|
2838
|
+
className: cn(
|
|
2839
|
+
"flex touch-none select-none transition-colors",
|
|
2840
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
2841
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
2842
|
+
className
|
|
2843
|
+
),
|
|
2844
|
+
...props,
|
|
2845
|
+
children: /* @__PURE__ */ jsx27(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
2846
|
+
}
|
|
2847
|
+
));
|
|
2848
|
+
ScrollBarBase.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
2849
|
+
|
|
2850
|
+
// src/components/ui/SelectBase.tsx
|
|
2851
|
+
import * as React17 from "react";
|
|
2852
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
2853
|
+
import { Check as Check5, CaretDown as CaretDown3, CaretUp } from "phosphor-react";
|
|
2854
|
+
import { motion as motion4, AnimatePresence as AnimatePresence3 } from "framer-motion";
|
|
2855
|
+
import { Fragment as Fragment2, jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2856
|
+
var SelectBase = SelectPrimitive.Root;
|
|
2857
|
+
var SelectGroupBase = SelectPrimitive.Group;
|
|
2858
|
+
var SelectValueBase = SelectPrimitive.Value;
|
|
2859
|
+
var SelectTriggerBase = React17.forwardRef(({ className, children, open, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
2860
|
+
SelectPrimitive.Trigger,
|
|
2861
|
+
{
|
|
2862
|
+
ref,
|
|
2863
|
+
className: cn(
|
|
2864
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
2865
|
+
className
|
|
2866
|
+
),
|
|
2867
|
+
...props,
|
|
2868
|
+
children: [
|
|
2869
|
+
children,
|
|
2870
|
+
/* @__PURE__ */ jsx28(
|
|
2871
|
+
motion4.span,
|
|
2872
|
+
{
|
|
2873
|
+
animate: { rotate: open ? 180 : 0 },
|
|
2874
|
+
transition: { duration: 0.3 },
|
|
2875
|
+
className: "flex items-center",
|
|
2876
|
+
children: /* @__PURE__ */ jsx28(CaretDown3, { className: "h-4 w-4 opacity-50" })
|
|
2877
|
+
}
|
|
2878
|
+
)
|
|
2879
|
+
]
|
|
2880
|
+
}
|
|
2881
|
+
));
|
|
2882
|
+
SelectTriggerBase.displayName = SelectPrimitive.Trigger.displayName;
|
|
2883
|
+
var SelectScrollUpButtonBase = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
2884
|
+
SelectPrimitive.ScrollUpButton,
|
|
2885
|
+
{
|
|
2886
|
+
ref,
|
|
2887
|
+
className: cn(
|
|
2888
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2889
|
+
className
|
|
2890
|
+
),
|
|
2891
|
+
...props,
|
|
2892
|
+
children: /* @__PURE__ */ jsx28(CaretUp, { className: "h-4 w-4" })
|
|
2893
|
+
}
|
|
2894
|
+
));
|
|
2895
|
+
SelectScrollUpButtonBase.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2896
|
+
var SelectScrollDownButtonBase = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
2897
|
+
SelectPrimitive.ScrollDownButton,
|
|
2898
|
+
{
|
|
2899
|
+
ref,
|
|
2900
|
+
className: cn(
|
|
2901
|
+
"flex cursor-default items-center justify-center py-1",
|
|
2902
|
+
className
|
|
2903
|
+
),
|
|
2904
|
+
...props,
|
|
2905
|
+
children: /* @__PURE__ */ jsx28(CaretDown3, { className: "h-4 w-4" })
|
|
2906
|
+
}
|
|
2907
|
+
));
|
|
2908
|
+
SelectScrollDownButtonBase.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2909
|
+
var SelectContentBase = React17.forwardRef(({ className, children, position = "popper", testid: dataTestId = "select-content", ...props }, ref) => /* @__PURE__ */ jsx28(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx28(AnimatePresence3, { children: /* @__PURE__ */ jsx28(
|
|
2910
|
+
SelectPrimitive.Content,
|
|
2911
|
+
{
|
|
2912
|
+
ref,
|
|
2913
|
+
className: cn(
|
|
2914
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
2915
|
+
className
|
|
2916
|
+
),
|
|
2917
|
+
position,
|
|
2918
|
+
"data-testid": dataTestId,
|
|
2919
|
+
...props,
|
|
2920
|
+
asChild: true,
|
|
2921
|
+
children: /* @__PURE__ */ jsx28(
|
|
2922
|
+
motion4.div,
|
|
2923
|
+
{
|
|
2924
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
2925
|
+
animate: { opacity: 1, scale: 1 },
|
|
2926
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
2927
|
+
transition: { duration: 0.2 },
|
|
2928
|
+
children: /* @__PURE__ */ jsxs18(Fragment2, { children: [
|
|
2929
|
+
/* @__PURE__ */ jsx28(SelectScrollUpButtonBase, {}),
|
|
2930
|
+
/* @__PURE__ */ jsx28(
|
|
2931
|
+
SelectPrimitive.Viewport,
|
|
2932
|
+
{
|
|
2933
|
+
className: cn(
|
|
2934
|
+
"p-1",
|
|
2935
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
2936
|
+
),
|
|
2937
|
+
children
|
|
2938
|
+
}
|
|
2939
|
+
),
|
|
2940
|
+
/* @__PURE__ */ jsx28(SelectScrollDownButtonBase, {})
|
|
2941
|
+
] })
|
|
2942
|
+
}
|
|
2943
|
+
)
|
|
2944
|
+
}
|
|
2945
|
+
) }) }));
|
|
2946
|
+
SelectContentBase.displayName = SelectPrimitive.Content.displayName;
|
|
2947
|
+
var SelectLabelBase = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
2948
|
+
SelectPrimitive.Label,
|
|
2949
|
+
{
|
|
2950
|
+
ref,
|
|
2951
|
+
className: cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
2952
|
+
...props
|
|
2953
|
+
}
|
|
2954
|
+
));
|
|
2955
|
+
SelectLabelBase.displayName = SelectPrimitive.Label.displayName;
|
|
2956
|
+
var SelectItemBase = React17.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs18(
|
|
2957
|
+
SelectPrimitive.Item,
|
|
2958
|
+
{
|
|
2959
|
+
ref,
|
|
2960
|
+
className: cn(
|
|
2961
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
2962
|
+
className
|
|
2963
|
+
),
|
|
2964
|
+
...props,
|
|
2965
|
+
children: [
|
|
2966
|
+
/* @__PURE__ */ jsx28("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx28(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx28(Check5, { className: "h-4 w-4" }) }) }),
|
|
2967
|
+
/* @__PURE__ */ jsx28(SelectPrimitive.ItemText, { children })
|
|
2968
|
+
]
|
|
2969
|
+
}
|
|
2970
|
+
));
|
|
2971
|
+
SelectItemBase.displayName = SelectPrimitive.Item.displayName;
|
|
2972
|
+
var SelectSeparatorBase = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx28(
|
|
2973
|
+
SelectPrimitive.Separator,
|
|
2974
|
+
{
|
|
2975
|
+
ref,
|
|
2976
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
2977
|
+
...props
|
|
2978
|
+
}
|
|
2979
|
+
));
|
|
2980
|
+
SelectSeparatorBase.displayName = SelectPrimitive.Separator.displayName;
|
|
2981
|
+
|
|
2982
|
+
// src/components/ui/SeparatorBase.tsx
|
|
2983
|
+
import * as React18 from "react";
|
|
2984
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
2985
|
+
import { motion as motion5 } from "framer-motion";
|
|
2986
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2987
|
+
var SeparatorBase = React18.forwardRef(
|
|
2988
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
|
|
2989
|
+
const isHorizontal = orientation === "horizontal";
|
|
2990
|
+
return /* @__PURE__ */ jsx29(
|
|
2991
|
+
SeparatorPrimitive.Root,
|
|
2992
|
+
{
|
|
2993
|
+
ref,
|
|
2994
|
+
decorative,
|
|
2995
|
+
orientation,
|
|
2996
|
+
asChild: true,
|
|
2997
|
+
...props,
|
|
2998
|
+
children: /* @__PURE__ */ jsx29(
|
|
2999
|
+
motion5.div,
|
|
3000
|
+
{
|
|
3001
|
+
className: cn(
|
|
3002
|
+
"shrink-0 bg-border",
|
|
3003
|
+
isHorizontal ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
3004
|
+
className
|
|
3005
|
+
),
|
|
3006
|
+
initial: { scaleX: isHorizontal ? 0 : 1, scaleY: isHorizontal ? 1 : 0 },
|
|
3007
|
+
animate: { scaleX: 1, scaleY: 1 },
|
|
3008
|
+
transition: { duration: 0.2, ease: "easeInOut" }
|
|
3009
|
+
}
|
|
3010
|
+
)
|
|
3011
|
+
}
|
|
3012
|
+
);
|
|
3013
|
+
}
|
|
3014
|
+
);
|
|
3015
|
+
SeparatorBase.displayName = SeparatorPrimitive.Root.displayName;
|
|
3016
|
+
|
|
3017
|
+
// src/components/ui/SheetBase.tsx
|
|
3018
|
+
import * as React19 from "react";
|
|
3019
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3020
|
+
import { cva as cva4 } from "class-variance-authority";
|
|
3021
|
+
import { X as X3 } from "phosphor-react";
|
|
3022
|
+
import { jsx as jsx30, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3023
|
+
var SheetBase = SheetPrimitive.Root;
|
|
3024
|
+
var SheetTriggerBase = SheetPrimitive.Trigger;
|
|
3025
|
+
var SheetCloseBase = SheetPrimitive.Close;
|
|
3026
|
+
var SheetPortalBase = SheetPrimitive.Portal;
|
|
3027
|
+
var SheetOverlayBase = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
3028
|
+
SheetPrimitive.Overlay,
|
|
3029
|
+
{
|
|
3030
|
+
className: cn(
|
|
3031
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
3032
|
+
className
|
|
3033
|
+
),
|
|
3034
|
+
...props,
|
|
3035
|
+
ref
|
|
3036
|
+
}
|
|
3037
|
+
));
|
|
3038
|
+
SheetOverlayBase.displayName = SheetPrimitive.Overlay.displayName;
|
|
3039
|
+
var sheetVariants = cva4(
|
|
3040
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
3041
|
+
{
|
|
3042
|
+
variants: {
|
|
3043
|
+
side: {
|
|
3044
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
3045
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
3046
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
3047
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
3048
|
+
}
|
|
3049
|
+
},
|
|
3050
|
+
defaultVariants: {
|
|
3051
|
+
side: "right"
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
);
|
|
3055
|
+
var SheetContentBase = React19.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs19(SheetPortalBase, { children: [
|
|
3056
|
+
/* @__PURE__ */ jsx30(SheetOverlayBase, {}),
|
|
3057
|
+
/* @__PURE__ */ jsxs19(
|
|
3058
|
+
SheetPrimitive.Content,
|
|
3059
|
+
{
|
|
3060
|
+
ref,
|
|
3061
|
+
className: cn(sheetVariants({ side }), className),
|
|
3062
|
+
...props,
|
|
3063
|
+
children: [
|
|
3064
|
+
/* @__PURE__ */ jsxs19(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
3065
|
+
/* @__PURE__ */ jsx30(X3, { className: "h-4 w-4" }),
|
|
3066
|
+
/* @__PURE__ */ jsx30("span", { className: "sr-only", children: "Close" })
|
|
3067
|
+
] }),
|
|
3068
|
+
children
|
|
3069
|
+
]
|
|
3070
|
+
}
|
|
3071
|
+
)
|
|
3072
|
+
] }));
|
|
3073
|
+
SheetContentBase.displayName = SheetPrimitive.Content.displayName;
|
|
3074
|
+
var SheetHeaderBase = ({
|
|
3075
|
+
className,
|
|
3076
|
+
...props
|
|
3077
|
+
}) => /* @__PURE__ */ jsx30(
|
|
3078
|
+
"div",
|
|
3079
|
+
{
|
|
3080
|
+
className: cn(
|
|
3081
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
3082
|
+
className
|
|
3083
|
+
),
|
|
3084
|
+
...props
|
|
3085
|
+
}
|
|
3086
|
+
);
|
|
3087
|
+
SheetHeaderBase.displayName = "SheetHeaderBase";
|
|
3088
|
+
var SheetFooterBase = ({
|
|
3089
|
+
className,
|
|
3090
|
+
...props
|
|
3091
|
+
}) => /* @__PURE__ */ jsx30(
|
|
3092
|
+
"div",
|
|
3093
|
+
{
|
|
3094
|
+
className: cn(
|
|
3095
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
3096
|
+
className
|
|
3097
|
+
),
|
|
3098
|
+
...props
|
|
3099
|
+
}
|
|
3100
|
+
);
|
|
3101
|
+
SheetFooterBase.displayName = "SheetFooterBase";
|
|
3102
|
+
var SheetTitleBase = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
3103
|
+
SheetPrimitive.Title,
|
|
3104
|
+
{
|
|
3105
|
+
ref,
|
|
3106
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
3107
|
+
...props
|
|
3108
|
+
}
|
|
3109
|
+
));
|
|
3110
|
+
SheetTitleBase.displayName = SheetPrimitive.Title.displayName;
|
|
3111
|
+
var SheetDescriptionBase = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
3112
|
+
SheetPrimitive.Description,
|
|
3113
|
+
{
|
|
3114
|
+
ref,
|
|
3115
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
3116
|
+
...props
|
|
3117
|
+
}
|
|
3118
|
+
));
|
|
3119
|
+
SheetDescriptionBase.displayName = SheetPrimitive.Description.displayName;
|
|
3120
|
+
|
|
3121
|
+
// src/components/ui/SidebarBase.tsx
|
|
3122
|
+
import * as React21 from "react";
|
|
3123
|
+
import { Slot as Slot5 } from "@radix-ui/react-slot";
|
|
3124
|
+
import { cva as cva5 } from "class-variance-authority";
|
|
3125
|
+
|
|
3126
|
+
// src/hooks/use-mobile.tsx
|
|
3127
|
+
import * as React20 from "react";
|
|
3128
|
+
var MOBILE_BREAKPOINT = 768;
|
|
3129
|
+
function useIsMobile() {
|
|
3130
|
+
const [isMobile, setIsMobile] = React20.useState(void 0);
|
|
3131
|
+
React20.useEffect(() => {
|
|
3132
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
3133
|
+
const onChange = () => {
|
|
3134
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3135
|
+
};
|
|
3136
|
+
mql.addEventListener("change", onChange);
|
|
3137
|
+
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
3138
|
+
return () => mql.removeEventListener("change", onChange);
|
|
3139
|
+
}, []);
|
|
3140
|
+
return !!isMobile;
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
// src/components/ui/SkeletonBase.tsx
|
|
3144
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3145
|
+
function SkeletonBase({
|
|
3146
|
+
className,
|
|
3147
|
+
...props
|
|
3148
|
+
}) {
|
|
3149
|
+
return /* @__PURE__ */ jsx31(
|
|
3150
|
+
"div",
|
|
3151
|
+
{
|
|
3152
|
+
className: cn("animate-pulse bg-primary/10", className),
|
|
3153
|
+
...props
|
|
3154
|
+
}
|
|
3155
|
+
);
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
// src/components/ui/SidebarBase.tsx
|
|
3159
|
+
import { SidebarSimple } from "phosphor-react";
|
|
3160
|
+
import { jsx as jsx32, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3161
|
+
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
3162
|
+
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
3163
|
+
var SIDEBAR_WIDTH = "16rem";
|
|
3164
|
+
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
3165
|
+
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
3166
|
+
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
3167
|
+
var SidebarContext = React21.createContext(null);
|
|
3168
|
+
function UseSideBarBase() {
|
|
3169
|
+
const context = React21.useContext(SidebarContext);
|
|
3170
|
+
if (!context) {
|
|
3171
|
+
throw new Error(
|
|
3172
|
+
"UseSideBarBase must be used within a SidebarProviderBase."
|
|
3173
|
+
);
|
|
3174
|
+
}
|
|
3175
|
+
return context;
|
|
3176
|
+
}
|
|
3177
|
+
var SidebarProviderBase = React21.forwardRef(
|
|
3178
|
+
({
|
|
3179
|
+
defaultOpen = true,
|
|
3180
|
+
open: openProp,
|
|
3181
|
+
onOpenChange: setOpenProp,
|
|
3182
|
+
className,
|
|
3183
|
+
style,
|
|
3184
|
+
children,
|
|
3185
|
+
...props
|
|
3186
|
+
}, ref) => {
|
|
3187
|
+
const isMobile = useIsMobile();
|
|
3188
|
+
const [openMobile, setOpenMobile] = React21.useState(false);
|
|
3189
|
+
const [_open, _setOpen] = React21.useState(defaultOpen);
|
|
3190
|
+
const open = openProp ?? _open;
|
|
3191
|
+
const setOpen = React21.useCallback(
|
|
3192
|
+
(value) => {
|
|
3193
|
+
const openState = typeof value === "function" ? value(open) : value;
|
|
3194
|
+
if (setOpenProp) {
|
|
3195
|
+
setOpenProp(openState);
|
|
3196
|
+
} else {
|
|
3197
|
+
_setOpen(openState);
|
|
3198
|
+
}
|
|
3199
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
3200
|
+
},
|
|
3201
|
+
[setOpenProp, open]
|
|
3202
|
+
);
|
|
3203
|
+
const toggleSidebar = React21.useCallback(() => {
|
|
3204
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
3205
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
3206
|
+
React21.useEffect(() => {
|
|
3207
|
+
const handleKeyDown = (event) => {
|
|
3208
|
+
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
3209
|
+
event.preventDefault();
|
|
3210
|
+
toggleSidebar();
|
|
3211
|
+
}
|
|
3212
|
+
};
|
|
3213
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
3214
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
3215
|
+
}, [toggleSidebar]);
|
|
3216
|
+
const state = open ? "expanded" : "collapsed";
|
|
3217
|
+
const contextValue = React21.useMemo(
|
|
3218
|
+
() => ({
|
|
3219
|
+
state,
|
|
3220
|
+
open,
|
|
3221
|
+
setOpen,
|
|
3222
|
+
isMobile,
|
|
3223
|
+
openMobile,
|
|
3224
|
+
setOpenMobile,
|
|
3225
|
+
toggleSidebar
|
|
3226
|
+
}),
|
|
3227
|
+
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
3228
|
+
);
|
|
3229
|
+
return /* @__PURE__ */ jsx32(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx32(TooltipProviderBase, { delayDuration: 0, children: /* @__PURE__ */ jsx32(
|
|
3230
|
+
"div",
|
|
3231
|
+
{
|
|
3232
|
+
style: {
|
|
3233
|
+
"--sidebar-width": SIDEBAR_WIDTH,
|
|
3234
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
3235
|
+
...style
|
|
3236
|
+
},
|
|
3237
|
+
className: cn(
|
|
3238
|
+
"group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
3239
|
+
className
|
|
3240
|
+
),
|
|
3241
|
+
ref,
|
|
3242
|
+
...props,
|
|
3243
|
+
children
|
|
3244
|
+
}
|
|
3245
|
+
) }) });
|
|
3246
|
+
}
|
|
3247
|
+
);
|
|
3248
|
+
SidebarProviderBase.displayName = "SidebarProviderBase";
|
|
3249
|
+
var SidebarBase = React21.forwardRef(
|
|
3250
|
+
({
|
|
3251
|
+
side = "left",
|
|
3252
|
+
variant = "sidebar",
|
|
3253
|
+
collapsible = "offcanvas",
|
|
3254
|
+
className,
|
|
3255
|
+
children,
|
|
3256
|
+
...props
|
|
3257
|
+
}, ref) => {
|
|
3258
|
+
const { isMobile, state, openMobile, setOpenMobile } = UseSideBarBase();
|
|
3259
|
+
if (collapsible === "none") {
|
|
3260
|
+
return /* @__PURE__ */ jsx32(
|
|
3261
|
+
"div",
|
|
3262
|
+
{
|
|
3263
|
+
className: cn(
|
|
3264
|
+
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
3265
|
+
className
|
|
3266
|
+
),
|
|
3267
|
+
ref,
|
|
3268
|
+
...props,
|
|
3269
|
+
children
|
|
3270
|
+
}
|
|
3271
|
+
);
|
|
3272
|
+
}
|
|
3273
|
+
if (isMobile) {
|
|
3274
|
+
return /* @__PURE__ */ jsx32(SheetBase, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsx32(
|
|
3275
|
+
SheetContentBase,
|
|
3276
|
+
{
|
|
3277
|
+
"data-sidebar": "sidebar",
|
|
3278
|
+
"data-mobile": "true",
|
|
3279
|
+
className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
|
|
3280
|
+
style: {
|
|
3281
|
+
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
3282
|
+
},
|
|
3283
|
+
side,
|
|
3284
|
+
children: /* @__PURE__ */ jsx32("div", { className: "flex h-full w-full flex-col", children })
|
|
3285
|
+
}
|
|
3286
|
+
) });
|
|
3287
|
+
}
|
|
3288
|
+
return /* @__PURE__ */ jsxs20(
|
|
3289
|
+
"div",
|
|
3290
|
+
{
|
|
3291
|
+
ref,
|
|
3292
|
+
className: "group peer hidden text-sidebar-foreground md:block",
|
|
3293
|
+
"data-state": state,
|
|
3294
|
+
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
3295
|
+
"data-variant": variant,
|
|
3296
|
+
"data-side": side,
|
|
3297
|
+
children: [
|
|
3298
|
+
/* @__PURE__ */ jsx32(
|
|
3299
|
+
"div",
|
|
3300
|
+
{
|
|
3301
|
+
className: cn(
|
|
3302
|
+
"relative h-svh w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear",
|
|
3303
|
+
"group-data-[collapsible=offcanvas]:w-0",
|
|
3304
|
+
"group-data-[side=right]:rotate-180",
|
|
3305
|
+
variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon]"
|
|
3306
|
+
)
|
|
3307
|
+
}
|
|
3308
|
+
),
|
|
3309
|
+
/* @__PURE__ */ jsx32(
|
|
3310
|
+
"div",
|
|
3311
|
+
{
|
|
3312
|
+
className: cn(
|
|
3313
|
+
"fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
3314
|
+
side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
3315
|
+
// Adjust the padding for floating and inset variants.
|
|
3316
|
+
variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : "group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
3317
|
+
className
|
|
3318
|
+
),
|
|
3319
|
+
...props,
|
|
3320
|
+
children: /* @__PURE__ */ jsx32(
|
|
3321
|
+
"div",
|
|
3322
|
+
{
|
|
3323
|
+
"data-sidebar": "sidebar",
|
|
3324
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",
|
|
3325
|
+
children
|
|
3326
|
+
}
|
|
3327
|
+
)
|
|
3328
|
+
}
|
|
3329
|
+
)
|
|
3330
|
+
]
|
|
3331
|
+
}
|
|
3332
|
+
);
|
|
3333
|
+
}
|
|
3334
|
+
);
|
|
3335
|
+
SidebarBase.displayName = "SidebarBase";
|
|
3336
|
+
var SidebarTriggerBase = React21.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
3337
|
+
const { toggleSidebar } = UseSideBarBase();
|
|
3338
|
+
return /* @__PURE__ */ jsx32("div", { children: /* @__PURE__ */ jsxs20(
|
|
3339
|
+
ButtonBase,
|
|
3340
|
+
{
|
|
3341
|
+
ref,
|
|
3342
|
+
"data-sidebar": "trigger",
|
|
3343
|
+
variant: "ghost",
|
|
3344
|
+
size: "icon",
|
|
3345
|
+
className: cn("h-7 w-7", className),
|
|
3346
|
+
onClick: (event) => {
|
|
3347
|
+
onClick?.(event);
|
|
3348
|
+
toggleSidebar();
|
|
3349
|
+
},
|
|
3350
|
+
...props,
|
|
3351
|
+
children: [
|
|
3352
|
+
/* @__PURE__ */ jsx32("span", { className: "sr-only", children: "Toggle SidebarBase" }),
|
|
3353
|
+
/* @__PURE__ */ jsx32(SidebarSimple, {})
|
|
3354
|
+
]
|
|
3355
|
+
}
|
|
3356
|
+
) });
|
|
3357
|
+
});
|
|
3358
|
+
SidebarTriggerBase.displayName = "SidebarTriggerBase";
|
|
3359
|
+
var SidebarRailBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3360
|
+
const { toggleSidebar } = UseSideBarBase();
|
|
3361
|
+
return /* @__PURE__ */ jsx32(
|
|
3362
|
+
"button",
|
|
3363
|
+
{
|
|
3364
|
+
ref,
|
|
3365
|
+
"data-sidebar": "rail",
|
|
3366
|
+
"aria-label": "Toggle SidebarBase",
|
|
3367
|
+
tabIndex: -1,
|
|
3368
|
+
onClick: toggleSidebar,
|
|
3369
|
+
title: "Toggle SidebarBase",
|
|
3370
|
+
className: cn(
|
|
3371
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
3372
|
+
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
3373
|
+
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
3374
|
+
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
|
|
3375
|
+
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
3376
|
+
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
3377
|
+
className
|
|
3378
|
+
),
|
|
3379
|
+
...props
|
|
3380
|
+
}
|
|
3381
|
+
);
|
|
3382
|
+
});
|
|
3383
|
+
SidebarRailBase.displayName = "SidebarRailBase";
|
|
3384
|
+
var SidebarInsetBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3385
|
+
return /* @__PURE__ */ jsx32(
|
|
3386
|
+
"main",
|
|
3387
|
+
{
|
|
3388
|
+
ref,
|
|
3389
|
+
className: cn(
|
|
3390
|
+
"relative flex min-h-svh flex-1 flex-col bg-background",
|
|
3391
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",
|
|
3392
|
+
className
|
|
3393
|
+
),
|
|
3394
|
+
...props
|
|
3395
|
+
}
|
|
3396
|
+
);
|
|
3397
|
+
});
|
|
3398
|
+
SidebarInsetBase.displayName = "SidebarInsetBase";
|
|
3399
|
+
var SidebarInputBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3400
|
+
return /* @__PURE__ */ jsx32(
|
|
3401
|
+
InputBase,
|
|
3402
|
+
{
|
|
3403
|
+
ref,
|
|
3404
|
+
"data-sidebar": "input",
|
|
3405
|
+
className: cn(
|
|
3406
|
+
"h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
3407
|
+
className
|
|
3408
|
+
),
|
|
3409
|
+
...props
|
|
3410
|
+
}
|
|
3411
|
+
);
|
|
3412
|
+
});
|
|
3413
|
+
SidebarInputBase.displayName = "SidebarInputBase";
|
|
3414
|
+
var SidebarHeaderBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3415
|
+
return /* @__PURE__ */ jsx32(
|
|
3416
|
+
"div",
|
|
3417
|
+
{
|
|
3418
|
+
ref,
|
|
3419
|
+
"data-sidebar": "header",
|
|
3420
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
3421
|
+
...props
|
|
3422
|
+
}
|
|
3423
|
+
);
|
|
3424
|
+
});
|
|
3425
|
+
SidebarHeaderBase.displayName = "SidebarHeaderBase";
|
|
3426
|
+
var SidebarFooterBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3427
|
+
return /* @__PURE__ */ jsx32(
|
|
3428
|
+
"div",
|
|
3429
|
+
{
|
|
3430
|
+
ref,
|
|
3431
|
+
"data-sidebar": "footer",
|
|
3432
|
+
className: cn("flex flex-col gap-2 p-2", className),
|
|
3433
|
+
...props
|
|
3434
|
+
}
|
|
3435
|
+
);
|
|
3436
|
+
});
|
|
3437
|
+
SidebarFooterBase.displayName = "SidebarFooterBase";
|
|
3438
|
+
var SidebarSeparatorBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3439
|
+
return /* @__PURE__ */ jsx32(
|
|
3440
|
+
SeparatorBase,
|
|
3441
|
+
{
|
|
3442
|
+
ref,
|
|
3443
|
+
"data-sidebar": "separator",
|
|
3444
|
+
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
3445
|
+
...props
|
|
3446
|
+
}
|
|
3447
|
+
);
|
|
3448
|
+
});
|
|
3449
|
+
SidebarSeparatorBase.displayName = "SidebarSeparatorBase";
|
|
3450
|
+
var SidebarContentBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3451
|
+
return /* @__PURE__ */ jsx32(
|
|
3452
|
+
"div",
|
|
3453
|
+
{
|
|
3454
|
+
ref,
|
|
3455
|
+
"data-sidebar": "content",
|
|
3456
|
+
className: cn(
|
|
3457
|
+
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
3458
|
+
className
|
|
3459
|
+
),
|
|
3460
|
+
...props
|
|
3461
|
+
}
|
|
3462
|
+
);
|
|
3463
|
+
});
|
|
3464
|
+
SidebarContentBase.displayName = "SidebarContentBase";
|
|
3465
|
+
var SidebarGroupBase = React21.forwardRef(({ className, ...props }, ref) => {
|
|
3466
|
+
return /* @__PURE__ */ jsx32(
|
|
3467
|
+
"div",
|
|
3468
|
+
{
|
|
3469
|
+
ref,
|
|
3470
|
+
"data-sidebar": "group",
|
|
3471
|
+
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
3472
|
+
...props
|
|
3473
|
+
}
|
|
3474
|
+
);
|
|
3475
|
+
});
|
|
3476
|
+
SidebarGroupBase.displayName = "SidebarGroupBase";
|
|
3477
|
+
var SidebarGroupLabelBase = React21.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3478
|
+
const Comp = asChild ? Slot5 : "div";
|
|
3479
|
+
return /* @__PURE__ */ jsx32(
|
|
3480
|
+
Comp,
|
|
3481
|
+
{
|
|
3482
|
+
ref,
|
|
3483
|
+
"data-sidebar": "group-label",
|
|
3484
|
+
className: cn(
|
|
3485
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3486
|
+
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
3487
|
+
className
|
|
3488
|
+
),
|
|
3489
|
+
...props
|
|
3490
|
+
}
|
|
3491
|
+
);
|
|
3492
|
+
});
|
|
3493
|
+
SidebarGroupLabelBase.displayName = "SidebarGroupLabelBase";
|
|
3494
|
+
var SidebarGroupActionBase = React21.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
3495
|
+
const Comp = asChild ? Slot5 : "button";
|
|
3496
|
+
return /* @__PURE__ */ jsx32(
|
|
3497
|
+
Comp,
|
|
3498
|
+
{
|
|
3499
|
+
ref,
|
|
3500
|
+
"data-sidebar": "group-action",
|
|
3501
|
+
className: cn(
|
|
3502
|
+
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3503
|
+
// Increases the hit area of the button on mobile.
|
|
3504
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3505
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3506
|
+
className
|
|
3507
|
+
),
|
|
3508
|
+
...props
|
|
3509
|
+
}
|
|
3510
|
+
);
|
|
3511
|
+
});
|
|
3512
|
+
SidebarGroupActionBase.displayName = "SidebarGroupActionBase";
|
|
3513
|
+
var SidebarGroupContentBase = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3514
|
+
"div",
|
|
3515
|
+
{
|
|
3516
|
+
ref,
|
|
3517
|
+
"data-sidebar": "group-content",
|
|
3518
|
+
className: cn("w-full text-sm", className),
|
|
3519
|
+
...props
|
|
3520
|
+
}
|
|
3521
|
+
));
|
|
3522
|
+
SidebarGroupContentBase.displayName = "SidebarGroupContentBase";
|
|
3523
|
+
var SidebarMenuBase = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3524
|
+
"ul",
|
|
3525
|
+
{
|
|
3526
|
+
ref,
|
|
3527
|
+
"data-sidebar": "menu",
|
|
3528
|
+
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
3529
|
+
...props
|
|
3530
|
+
}
|
|
3531
|
+
));
|
|
3532
|
+
SidebarMenuBase.displayName = "SidebarMenuBase";
|
|
3533
|
+
var SidebarMenuItemBase = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3534
|
+
"li",
|
|
3535
|
+
{
|
|
3536
|
+
ref,
|
|
3537
|
+
"data-sidebar": "menu-item",
|
|
3538
|
+
className: cn("group/menu-item relative", className),
|
|
3539
|
+
...props
|
|
3540
|
+
}
|
|
3541
|
+
));
|
|
3542
|
+
SidebarMenuItemBase.displayName = "SidebarMenuItemBase";
|
|
3543
|
+
var sidebarMenuButtonVariants = cva5(
|
|
3544
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3545
|
+
{
|
|
3546
|
+
variants: {
|
|
3547
|
+
variant: {
|
|
3548
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
3549
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
3550
|
+
},
|
|
3551
|
+
size: {
|
|
3552
|
+
default: "h-8 text-sm",
|
|
3553
|
+
sm: "h-7 text-xs",
|
|
3554
|
+
lg: "h-12 text-sm group-data-[collapsible=icon]:!p-0"
|
|
3555
|
+
}
|
|
3556
|
+
},
|
|
3557
|
+
defaultVariants: {
|
|
3558
|
+
variant: "default",
|
|
3559
|
+
size: "default"
|
|
3560
|
+
}
|
|
3561
|
+
}
|
|
3562
|
+
);
|
|
3563
|
+
var SidebarMenuButtonBase = React21.forwardRef(
|
|
3564
|
+
({
|
|
3565
|
+
asChild = false,
|
|
3566
|
+
isActive = false,
|
|
3567
|
+
variant = "default",
|
|
3568
|
+
size = "default",
|
|
3569
|
+
tooltip,
|
|
3570
|
+
className,
|
|
3571
|
+
...props
|
|
3572
|
+
}, ref) => {
|
|
3573
|
+
const Comp = asChild ? Slot5 : "button";
|
|
3574
|
+
const { isMobile, state } = UseSideBarBase();
|
|
3575
|
+
const button = /* @__PURE__ */ jsx32(
|
|
3576
|
+
Comp,
|
|
3577
|
+
{
|
|
3578
|
+
ref,
|
|
3579
|
+
"data-sidebar": "menu-button",
|
|
3580
|
+
"data-size": size,
|
|
3581
|
+
"data-active": isActive,
|
|
3582
|
+
className: cn(sidebarMenuButtonVariants({ variant, size }), className),
|
|
3583
|
+
...props
|
|
3584
|
+
}
|
|
3585
|
+
);
|
|
3586
|
+
if (!tooltip) {
|
|
3587
|
+
return button;
|
|
3588
|
+
}
|
|
3589
|
+
if (typeof tooltip === "string") {
|
|
3590
|
+
tooltip = {
|
|
3591
|
+
children: tooltip
|
|
3592
|
+
};
|
|
3593
|
+
}
|
|
3594
|
+
return /* @__PURE__ */ jsxs20(TooltipBase, { children: [
|
|
3595
|
+
/* @__PURE__ */ jsx32(TooltipTriggerBase, { asChild: true, children: button }),
|
|
3596
|
+
/* @__PURE__ */ jsx32(
|
|
3597
|
+
TooltipContentBase,
|
|
3598
|
+
{
|
|
3599
|
+
side: "right",
|
|
3600
|
+
align: "center",
|
|
3601
|
+
hidden: state !== "collapsed" || isMobile,
|
|
3602
|
+
...tooltip
|
|
3603
|
+
}
|
|
3604
|
+
)
|
|
3605
|
+
] });
|
|
3606
|
+
}
|
|
3607
|
+
);
|
|
3608
|
+
SidebarMenuButtonBase.displayName = "SidebarMenuButtonBase";
|
|
3609
|
+
var SidebarMenuActionBase = React21.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
3610
|
+
const Comp = asChild ? Slot5 : "button";
|
|
3611
|
+
return /* @__PURE__ */ jsx32(
|
|
3612
|
+
Comp,
|
|
3613
|
+
{
|
|
3614
|
+
ref,
|
|
3615
|
+
"data-sidebar": "menu-action",
|
|
3616
|
+
className: cn(
|
|
3617
|
+
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
3618
|
+
// Increases the hit area of the button on mobile.
|
|
3619
|
+
"after:absolute after:-inset-2 after:md:hidden",
|
|
3620
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3621
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3622
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3623
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3624
|
+
showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
3625
|
+
className
|
|
3626
|
+
),
|
|
3627
|
+
...props
|
|
3628
|
+
}
|
|
3629
|
+
);
|
|
3630
|
+
});
|
|
3631
|
+
SidebarMenuActionBase.displayName = "SidebarMenuActionBase";
|
|
3632
|
+
var SidebarMenuBadgeBase = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3633
|
+
"div",
|
|
3634
|
+
{
|
|
3635
|
+
ref,
|
|
3636
|
+
"data-sidebar": "menu-badge",
|
|
3637
|
+
className: cn(
|
|
3638
|
+
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
3639
|
+
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
3640
|
+
"peer-data-[size=sm]/menu-button:top-1",
|
|
3641
|
+
"peer-data-[size=default]/menu-button:top-1.5",
|
|
3642
|
+
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
3643
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3644
|
+
className
|
|
3645
|
+
),
|
|
3646
|
+
...props
|
|
3647
|
+
}
|
|
3648
|
+
));
|
|
3649
|
+
SidebarMenuBadgeBase.displayName = "SidebarMenuBadgeBase";
|
|
3650
|
+
var SidebarMenuSkeletonBase = React21.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
3651
|
+
const width = React21.useMemo(() => {
|
|
3652
|
+
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
3653
|
+
}, []);
|
|
3654
|
+
return /* @__PURE__ */ jsxs20(
|
|
3655
|
+
"div",
|
|
3656
|
+
{
|
|
3657
|
+
ref,
|
|
3658
|
+
"data-sidebar": "menu-skeleton",
|
|
3659
|
+
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
3660
|
+
...props,
|
|
3661
|
+
children: [
|
|
3662
|
+
showIcon && /* @__PURE__ */ jsx32(
|
|
3663
|
+
SkeletonBase,
|
|
3664
|
+
{
|
|
3665
|
+
className: "size-4 rounded-md",
|
|
3666
|
+
"data-sidebar": "menu-skeleton-icon"
|
|
3667
|
+
}
|
|
3668
|
+
),
|
|
3669
|
+
/* @__PURE__ */ jsx32(
|
|
3670
|
+
SkeletonBase,
|
|
3671
|
+
{
|
|
3672
|
+
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
3673
|
+
"data-sidebar": "menu-skeleton-text",
|
|
3674
|
+
style: {
|
|
3675
|
+
"--skeleton-width": width
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
)
|
|
3679
|
+
]
|
|
3680
|
+
}
|
|
3681
|
+
);
|
|
3682
|
+
});
|
|
3683
|
+
SidebarMenuSkeletonBase.displayName = "SidebarMenuSkeletonBase";
|
|
3684
|
+
var SidebarMenuSubBase = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx32(
|
|
3685
|
+
"ul",
|
|
3686
|
+
{
|
|
3687
|
+
ref,
|
|
3688
|
+
"data-sidebar": "menu-sub",
|
|
3689
|
+
className: cn(
|
|
3690
|
+
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
|
|
3691
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3692
|
+
className
|
|
3693
|
+
),
|
|
3694
|
+
...props
|
|
3695
|
+
}
|
|
3696
|
+
));
|
|
3697
|
+
SidebarMenuSubBase.displayName = "SidebarMenuSubBase";
|
|
3698
|
+
var SidebarMenuSubItemBase = React21.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx32("li", { ref, ...props }));
|
|
3699
|
+
SidebarMenuSubItemBase.displayName = "SidebarMenuSubItemBase";
|
|
3700
|
+
var SidebarMenuSubButtonBase = React21.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
3701
|
+
const Comp = asChild ? Slot5 : "a";
|
|
3702
|
+
return /* @__PURE__ */ jsx32(
|
|
3703
|
+
Comp,
|
|
3704
|
+
{
|
|
3705
|
+
ref,
|
|
3706
|
+
"data-sidebar": "menu-sub-button",
|
|
3707
|
+
"data-size": size,
|
|
3708
|
+
"data-active": isActive,
|
|
3709
|
+
className: cn(
|
|
3710
|
+
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",
|
|
3711
|
+
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
3712
|
+
size === "sm" && "text-xs",
|
|
3713
|
+
size === "md" && "text-sm",
|
|
3714
|
+
"group-data-[collapsible=icon]:hidden",
|
|
3715
|
+
className
|
|
3716
|
+
),
|
|
3717
|
+
...props
|
|
3718
|
+
}
|
|
3719
|
+
);
|
|
3720
|
+
});
|
|
3721
|
+
SidebarMenuSubButtonBase.displayName = "SidebarMenuSubButtonBase";
|
|
3722
|
+
|
|
3723
|
+
// src/components/ui/SliderBase.tsx
|
|
3724
|
+
import * as React22 from "react";
|
|
3725
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3726
|
+
import { jsx as jsx33, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3727
|
+
var SlideBase = React22.forwardRef(
|
|
3728
|
+
({
|
|
3729
|
+
className,
|
|
3730
|
+
orientation = "horizontal",
|
|
3731
|
+
label,
|
|
3732
|
+
leftIcon,
|
|
3733
|
+
rightIcon,
|
|
3734
|
+
...props
|
|
3735
|
+
}, ref) => {
|
|
3736
|
+
const isVertical = orientation === "vertical";
|
|
3737
|
+
return /* @__PURE__ */ jsxs21(
|
|
3738
|
+
"div",
|
|
3739
|
+
{
|
|
3740
|
+
className: cn(
|
|
3741
|
+
"flex flex-col gap-1",
|
|
3742
|
+
isVertical ? "h-full " : "w-full"
|
|
3743
|
+
),
|
|
3744
|
+
children: [
|
|
3745
|
+
label && /* @__PURE__ */ jsx33(LabelBase_default, { className: "py-2", children: label }),
|
|
3746
|
+
/* @__PURE__ */ jsxs21(
|
|
3747
|
+
"div",
|
|
3748
|
+
{
|
|
3749
|
+
className: cn(
|
|
3750
|
+
"flex gap-2",
|
|
3751
|
+
isVertical ? "flex-col h-full" : "flex-row items-center w-full"
|
|
3752
|
+
),
|
|
3753
|
+
children: [
|
|
3754
|
+
leftIcon && /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-center", children: leftIcon }),
|
|
3755
|
+
/* @__PURE__ */ jsxs21(
|
|
3756
|
+
SliderPrimitive.Root,
|
|
3757
|
+
{
|
|
3758
|
+
ref,
|
|
3759
|
+
orientation,
|
|
3760
|
+
className: cn(
|
|
3761
|
+
"relative flex touch-none select-none items-center",
|
|
3762
|
+
isVertical ? "flex-col h-full" : "flex-row w-full",
|
|
3763
|
+
className
|
|
3764
|
+
),
|
|
3765
|
+
...props,
|
|
3766
|
+
children: [
|
|
3767
|
+
/* @__PURE__ */ jsx33(
|
|
3768
|
+
SliderPrimitive.Track,
|
|
3769
|
+
{
|
|
3770
|
+
className: cn(
|
|
3771
|
+
"relative overflow-hidden bg-primary/20 rounded-full",
|
|
3772
|
+
isVertical ? "w-1.5 h-full" : "h-1.5 w-full"
|
|
3773
|
+
),
|
|
3774
|
+
children: /* @__PURE__ */ jsx33(
|
|
3775
|
+
SliderPrimitive.Range,
|
|
3776
|
+
{
|
|
3777
|
+
className: cn(
|
|
3778
|
+
"absolute bg-primary",
|
|
3779
|
+
isVertical ? "w-full" : "h-full"
|
|
3780
|
+
)
|
|
3781
|
+
}
|
|
3782
|
+
)
|
|
3783
|
+
}
|
|
3784
|
+
),
|
|
3785
|
+
/* @__PURE__ */ jsx33(
|
|
3786
|
+
SliderPrimitive.Thumb,
|
|
3787
|
+
{
|
|
3788
|
+
className: cn(
|
|
3789
|
+
"block h-4 w-4 rounded-full border border-primary/70 bg-background shadow-md transition-transform",
|
|
3790
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
3791
|
+
"hover:scale-125 active:scale-125"
|
|
3792
|
+
)
|
|
3793
|
+
}
|
|
3794
|
+
)
|
|
3795
|
+
]
|
|
3796
|
+
}
|
|
3797
|
+
),
|
|
3798
|
+
rightIcon && /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-center", children: rightIcon })
|
|
3799
|
+
]
|
|
3800
|
+
}
|
|
3801
|
+
)
|
|
3802
|
+
]
|
|
3803
|
+
}
|
|
3804
|
+
);
|
|
3805
|
+
}
|
|
3806
|
+
);
|
|
3807
|
+
SlideBase.displayName = "SlideBase";
|
|
3808
|
+
|
|
3809
|
+
// src/components/ui/SonnerBase.tsx
|
|
3810
|
+
import {
|
|
3811
|
+
CheckCircle,
|
|
3812
|
+
XCircle,
|
|
3813
|
+
Info,
|
|
3814
|
+
Warning,
|
|
3815
|
+
Spinner
|
|
3816
|
+
} from "phosphor-react";
|
|
3817
|
+
import { Toaster as Sonner, toast as sonnertoast } from "sonner";
|
|
3818
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3819
|
+
var iconBaseClass = "w-5 h-auto";
|
|
3820
|
+
var Toaster = ({ testId, ...props }) => {
|
|
3821
|
+
return /* @__PURE__ */ jsx34(
|
|
3822
|
+
Sonner,
|
|
3823
|
+
{
|
|
3824
|
+
className: "toaster group",
|
|
3825
|
+
position: "top-center",
|
|
3826
|
+
toastOptions: {
|
|
3827
|
+
classNames: {
|
|
3828
|
+
toast: `
|
|
3829
|
+
group toast
|
|
3830
|
+
bg-background
|
|
3831
|
+
text-foreground
|
|
3832
|
+
shadow-lg rounded-md
|
|
3833
|
+
border-l-4
|
|
3834
|
+
border-border
|
|
3835
|
+
flex items-center gap-3
|
|
3836
|
+
data-[type=success]:border-l-green-500 data-[type=success]:bg-green-50 data-[type=success]:text-green-800 data-[type=success]:border-green-500
|
|
3837
|
+
data-[type=error]:border-l-red-500 data-[type=error]:bg-red-50 data-[type=error]:text-red-800 data-[type=error]:border-red-500
|
|
3838
|
+
data-[type=warning]:border-l-yellow-500 data-[type=warning]:bg-yellow-50 data-[type=warning]:text-yellow-800 data-[type=warning]:border-yellow-500
|
|
3839
|
+
data-[type=info]:border-l-blue-500 data-[type=info]:bg-blue-50 data-[type=info]:text-blue-800 data-[type=info]:border-blue-500
|
|
3840
|
+
`,
|
|
3841
|
+
description: `
|
|
3842
|
+
text-sm
|
|
3843
|
+
group-[.toast]:text-neutral-600
|
|
3844
|
+
`,
|
|
3845
|
+
actionButton: `
|
|
3846
|
+
ml-auto
|
|
3847
|
+
rounded-md px-3 py-1 text-sm font-semibold
|
|
3848
|
+
bg-neutral-800 text-white
|
|
3849
|
+
hover:bg-neutral-700
|
|
3850
|
+
transition-colors duration-200
|
|
3851
|
+
`,
|
|
3852
|
+
cancelButton: `
|
|
3853
|
+
ml-2
|
|
3854
|
+
rounded-md px-3 py-1 text-sm font-semibold
|
|
3855
|
+
bg-neutral-100 text-neutral-700
|
|
3856
|
+
hover:bg-neutral-200
|
|
3857
|
+
transition-colors duration-200
|
|
3858
|
+
`
|
|
3859
|
+
}
|
|
3860
|
+
},
|
|
3861
|
+
"data-testid": testId,
|
|
3862
|
+
...props
|
|
3863
|
+
}
|
|
3864
|
+
);
|
|
3865
|
+
};
|
|
3866
|
+
var toast = {
|
|
3867
|
+
success: (message) => sonnertoast.success(message, {
|
|
3868
|
+
icon: /* @__PURE__ */ jsx34(CheckCircle, { className: `${iconBaseClass} text-green-600`, weight: "fill" }),
|
|
3869
|
+
className: "sonner-success"
|
|
3870
|
+
}),
|
|
3871
|
+
error: (message) => sonnertoast.error(message, {
|
|
3872
|
+
icon: /* @__PURE__ */ jsx34(XCircle, { className: `${iconBaseClass} text-red-600`, weight: "fill" }),
|
|
3873
|
+
className: "sonner-error"
|
|
3874
|
+
}),
|
|
3875
|
+
warning: (message) => sonnertoast.warning(message, {
|
|
3876
|
+
icon: /* @__PURE__ */ jsx34(Warning, { className: `${iconBaseClass} text-yellow-600`, weight: "fill" }),
|
|
3877
|
+
className: "sonner-warning"
|
|
3878
|
+
}),
|
|
3879
|
+
info: (message) => sonnertoast.info(message, {
|
|
3880
|
+
icon: /* @__PURE__ */ jsx34(Info, { className: `${iconBaseClass} text-blue-600`, weight: "fill" }),
|
|
3881
|
+
className: "sonner-info"
|
|
3882
|
+
}),
|
|
3883
|
+
loading: (message) => sonnertoast(message, {
|
|
3884
|
+
icon: /* @__PURE__ */ jsx34(Spinner, { className: `${iconBaseClass} animate-spin text-neutral-500`, weight: "fill" }),
|
|
3885
|
+
className: "sonner-loading"
|
|
3886
|
+
})
|
|
3887
|
+
};
|
|
3888
|
+
|
|
3889
|
+
// src/components/ui/SwitchBase.tsx
|
|
3890
|
+
import * as React23 from "react";
|
|
3891
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3892
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3893
|
+
var SwitchBase = React23.forwardRef(({ className, testid: dataTestId = "switch-base", ...props }, ref) => {
|
|
3894
|
+
return /* @__PURE__ */ jsx35(
|
|
3895
|
+
SwitchPrimitives.Root,
|
|
3896
|
+
{
|
|
3897
|
+
...props,
|
|
3898
|
+
ref,
|
|
3899
|
+
className: cn(
|
|
3900
|
+
"peer relative inline-flex w-12 cursor-pointer items-center rounded-full border-2 border-transparent shadow-md transition-colors duration-300 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input data-[state=checked]:shadow-[0_0_15px_4px_var(--tw-shadow-color)] data-[state=checked]:shadow-primary/30",
|
|
3901
|
+
className
|
|
3902
|
+
),
|
|
3903
|
+
"data-testid": dataTestId,
|
|
3904
|
+
children: /* @__PURE__ */ jsx35(
|
|
3905
|
+
SwitchPrimitives.Thumb,
|
|
3906
|
+
{
|
|
3907
|
+
className: cn(
|
|
3908
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-xl ring-0 transition-transform duration-350 ease-out peer-focus:shadow-lg peer-focus:ring-2 peer-focus:ring-primary/70 data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-7 data-[state=checked]:animate-bounce-thumb"
|
|
3909
|
+
),
|
|
3910
|
+
style: {
|
|
3911
|
+
transformOrigin: "center",
|
|
3912
|
+
transition: "transform 350ms cubic-bezier(0.68, -0.55, 0.265, 1.55)"
|
|
3913
|
+
}
|
|
3914
|
+
}
|
|
3915
|
+
)
|
|
3916
|
+
}
|
|
3917
|
+
);
|
|
3918
|
+
});
|
|
3919
|
+
SwitchBase.displayName = SwitchPrimitives.Root.displayName;
|
|
3920
|
+
|
|
3921
|
+
// src/components/ui/TableBase.tsx
|
|
3922
|
+
import * as React24 from "react";
|
|
3923
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3924
|
+
var TableBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx36(
|
|
3925
|
+
"table",
|
|
3926
|
+
{
|
|
3927
|
+
ref,
|
|
3928
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
3929
|
+
...props
|
|
3930
|
+
}
|
|
3931
|
+
) }));
|
|
3932
|
+
TableBase.displayName = "TableBase";
|
|
3933
|
+
var TableHeaderBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
3934
|
+
TableHeaderBase.displayName = "TableHeaderBase";
|
|
3935
|
+
var TableBodyBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3936
|
+
"tbody",
|
|
3937
|
+
{
|
|
3938
|
+
ref,
|
|
3939
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
3940
|
+
...props
|
|
3941
|
+
}
|
|
3942
|
+
));
|
|
3943
|
+
TableBodyBase.displayName = "TableBodyBase";
|
|
3944
|
+
var TableFooterBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3945
|
+
"tfoot",
|
|
3946
|
+
{
|
|
3947
|
+
ref,
|
|
3948
|
+
className: cn(
|
|
3949
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
3950
|
+
className
|
|
3951
|
+
),
|
|
3952
|
+
...props
|
|
3953
|
+
}
|
|
3954
|
+
));
|
|
3955
|
+
TableFooterBase.displayName = "TableFooterBase";
|
|
3956
|
+
var TableRowBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3957
|
+
"tr",
|
|
3958
|
+
{
|
|
3959
|
+
ref,
|
|
3960
|
+
className: cn(
|
|
3961
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
3962
|
+
className
|
|
3963
|
+
),
|
|
3964
|
+
...props
|
|
3965
|
+
}
|
|
3966
|
+
));
|
|
3967
|
+
TableRowBase.displayName = "TableRowBase";
|
|
3968
|
+
var TableHeadBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3969
|
+
"th",
|
|
3970
|
+
{
|
|
3971
|
+
ref,
|
|
3972
|
+
className: cn(
|
|
3973
|
+
"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3974
|
+
className
|
|
3975
|
+
),
|
|
3976
|
+
...props
|
|
3977
|
+
}
|
|
3978
|
+
));
|
|
3979
|
+
TableHeadBase.displayName = "TableHeadBase";
|
|
3980
|
+
var TableCellBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3981
|
+
"td",
|
|
3982
|
+
{
|
|
3983
|
+
ref,
|
|
3984
|
+
className: cn(
|
|
3985
|
+
"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
3986
|
+
className
|
|
3987
|
+
),
|
|
3988
|
+
...props
|
|
3989
|
+
}
|
|
3990
|
+
));
|
|
3991
|
+
TableCellBase.displayName = "TableCellBase";
|
|
3992
|
+
var TableCaptionBase = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx36(
|
|
3993
|
+
"caption",
|
|
3994
|
+
{
|
|
3995
|
+
ref,
|
|
3996
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
3997
|
+
...props
|
|
3998
|
+
}
|
|
3999
|
+
));
|
|
4000
|
+
TableCaptionBase.displayName = "TableCaptionBase";
|
|
4001
|
+
|
|
4002
|
+
// src/components/ui/TabsBase.tsx
|
|
4003
|
+
import * as React25 from "react";
|
|
4004
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4005
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4006
|
+
var TabsBase = TabsPrimitive.Root;
|
|
4007
|
+
var TabsListBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
4008
|
+
TabsPrimitive.List,
|
|
4009
|
+
{
|
|
4010
|
+
ref,
|
|
4011
|
+
className: cn(
|
|
4012
|
+
"relative flex w-full items-center justify-start gap-4 border-b-2 border-border",
|
|
4013
|
+
className
|
|
4014
|
+
),
|
|
4015
|
+
...props
|
|
4016
|
+
}
|
|
4017
|
+
));
|
|
4018
|
+
TabsListBase.displayName = TabsPrimitive.List.displayName;
|
|
4019
|
+
var TabsTriggerBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
4020
|
+
TabsPrimitive.Trigger,
|
|
4021
|
+
{
|
|
4022
|
+
ref,
|
|
4023
|
+
className: cn(
|
|
4024
|
+
"relative inline-flex items-center justify-center whitespace-nowrap px-3 py-2 text-sm font-medium transition-colors",
|
|
4025
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-3",
|
|
4026
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
4027
|
+
"data-[state=active]:text-primary",
|
|
4028
|
+
"after:absolute after:bottom-0 after:left-0 after:h-[1.5px] after:w-full",
|
|
4029
|
+
"after:scale-x-0 after:bg-primary after:origin-left",
|
|
4030
|
+
"after:transition-transform after:duration-300 after:ease-[cubic-bezier(0.65,0,0.35,1)]",
|
|
4031
|
+
"data-[state=active]:after:scale-x-100",
|
|
4032
|
+
className
|
|
4033
|
+
),
|
|
4034
|
+
...props
|
|
4035
|
+
}
|
|
4036
|
+
));
|
|
4037
|
+
var TabsContentBase = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx37(
|
|
4038
|
+
TabsPrimitive.Content,
|
|
4039
|
+
{
|
|
4040
|
+
ref,
|
|
4041
|
+
className: cn(
|
|
4042
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4043
|
+
"animate-fade-in",
|
|
4044
|
+
className
|
|
4045
|
+
),
|
|
4046
|
+
...props
|
|
4047
|
+
}
|
|
4048
|
+
));
|
|
4049
|
+
TabsContentBase.displayName = TabsPrimitive.Content.displayName;
|
|
4050
|
+
|
|
4051
|
+
// src/components/ui/TextAreaBase.tsx
|
|
4052
|
+
import * as React26 from "react";
|
|
4053
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
4054
|
+
var TextAreaBase = React26.forwardRef(({ className, ...props }, ref) => {
|
|
4055
|
+
return /* @__PURE__ */ jsx38(
|
|
4056
|
+
"textarea",
|
|
4057
|
+
{
|
|
4058
|
+
className: cn(
|
|
4059
|
+
"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
4060
|
+
className
|
|
4061
|
+
),
|
|
4062
|
+
ref,
|
|
4063
|
+
...props
|
|
4064
|
+
}
|
|
4065
|
+
);
|
|
4066
|
+
});
|
|
4067
|
+
TextAreaBase.displayName = "TextAreaBase";
|
|
4068
|
+
|
|
4069
|
+
// src/components/mode-toggle.tsx
|
|
4070
|
+
import { Check as Check6, Moon, Sun } from "phosphor-react";
|
|
4071
|
+
|
|
4072
|
+
// src/components/theme-provider.tsx
|
|
4073
|
+
import { createContext as createContext3, useContext as useContext4, useEffect as useEffect5, useState as useState6 } from "react";
|
|
4074
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4075
|
+
var initialState = {
|
|
4076
|
+
theme: "system",
|
|
4077
|
+
setTheme: () => null
|
|
4078
|
+
};
|
|
4079
|
+
var ThemeProviderContext = createContext3(initialState);
|
|
4080
|
+
function ThemeProviderBase({
|
|
4081
|
+
children,
|
|
4082
|
+
defaultTheme = "system",
|
|
4083
|
+
storageKey = "vite-ui-theme",
|
|
4084
|
+
...props
|
|
4085
|
+
}) {
|
|
4086
|
+
const [theme, setTheme] = useState6(() => {
|
|
4087
|
+
return localStorage.getItem(storageKey) || defaultTheme;
|
|
4088
|
+
});
|
|
4089
|
+
useEffect5(() => {
|
|
4090
|
+
const root = window.document.documentElement;
|
|
4091
|
+
root.classList.remove(
|
|
4092
|
+
"light",
|
|
4093
|
+
"light-purple",
|
|
4094
|
+
"light-green",
|
|
4095
|
+
"light-blue",
|
|
4096
|
+
"dark",
|
|
4097
|
+
"dark-purple",
|
|
4098
|
+
"dark-green",
|
|
4099
|
+
"dark-blue",
|
|
4100
|
+
"system"
|
|
4101
|
+
);
|
|
4102
|
+
if (theme === "system") {
|
|
4103
|
+
const systemTheme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
4104
|
+
root.classList.add(systemTheme);
|
|
4105
|
+
document.body.style.backgroundColor = "";
|
|
4106
|
+
document.body.style.color = "";
|
|
4107
|
+
return;
|
|
4108
|
+
}
|
|
4109
|
+
root.classList.add(theme);
|
|
4110
|
+
if (theme.includes("dark")) {
|
|
4111
|
+
document.body.style.backgroundColor = "";
|
|
4112
|
+
document.body.style.color = "";
|
|
4113
|
+
}
|
|
4114
|
+
}, [theme]);
|
|
4115
|
+
const value = {
|
|
4116
|
+
theme,
|
|
4117
|
+
setTheme: (theme2) => {
|
|
4118
|
+
localStorage.setItem(storageKey, theme2);
|
|
4119
|
+
setTheme(theme2);
|
|
4120
|
+
}
|
|
4121
|
+
};
|
|
4122
|
+
return /* @__PURE__ */ jsx39(ThemeProviderContext.Provider, { ...props, value, children });
|
|
4123
|
+
}
|
|
4124
|
+
var useTheme = () => {
|
|
4125
|
+
const context = useContext4(ThemeProviderContext);
|
|
4126
|
+
if (context === void 0)
|
|
4127
|
+
throw new Error("useTheme must be used within a ThemeProvider");
|
|
4128
|
+
return context;
|
|
4129
|
+
};
|
|
4130
|
+
|
|
4131
|
+
// src/components/mode-toggle.tsx
|
|
4132
|
+
import { Fragment as Fragment3, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4133
|
+
var themeLabels = {
|
|
4134
|
+
light: "Light",
|
|
4135
|
+
dark: "Dark",
|
|
4136
|
+
system: "System",
|
|
4137
|
+
"light-purple": "Light Purple",
|
|
4138
|
+
"dark-purple": "Dark Purple",
|
|
4139
|
+
"light-blue": "Light Blue",
|
|
4140
|
+
"dark-blue": "Dark Blue",
|
|
4141
|
+
"light-green": "Light Green",
|
|
4142
|
+
"dark-green": "Dark Green"
|
|
4143
|
+
};
|
|
4144
|
+
function ModeToggleBase({
|
|
4145
|
+
themes = ["light", "dark", "system"]
|
|
4146
|
+
}) {
|
|
4147
|
+
const { setTheme, theme: currentTheme } = useTheme();
|
|
4148
|
+
const isDark = currentTheme?.includes("dark") || currentTheme === "system" && typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
4149
|
+
return /* @__PURE__ */ jsxs22(DropDownMenuBase, { children: [
|
|
4150
|
+
/* @__PURE__ */ jsx40(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs22(
|
|
4151
|
+
ButtonBase,
|
|
4152
|
+
{
|
|
4153
|
+
variant: "ghost",
|
|
4154
|
+
size: "icon",
|
|
4155
|
+
className: "relative overflow-hidden border-transparent",
|
|
4156
|
+
children: [
|
|
4157
|
+
/* @__PURE__ */ jsxs22(Fragment3, { children: [
|
|
4158
|
+
/* @__PURE__ */ jsx40(Sun, { className: `h-[1.2rem] w-[1.2rem] transition-transform duration-300 ${isDark ? "rotate-90 scale-0" : "rotate-0 scale-100"}` }),
|
|
4159
|
+
/* @__PURE__ */ jsx40(Moon, { className: `absolute top-0 left-0 h-[1.2rem] w-[1.2rem] transition-transform duration-300 ${isDark ? "rotate-0 scale-100" : "rotate-90 scale-0"}` })
|
|
4160
|
+
] }),
|
|
4161
|
+
/* @__PURE__ */ jsx40("span", { className: "sr-only", children: "Toggle theme" })
|
|
4162
|
+
]
|
|
4163
|
+
}
|
|
4164
|
+
) }),
|
|
4165
|
+
/* @__PURE__ */ jsx40(DropDownMenuContentBase, { align: "end", className: "border-border bg-popover text-popover-foreground", children: themes.map((theme) => /* @__PURE__ */ jsxs22(
|
|
4166
|
+
DropDownMenuItemBase,
|
|
4167
|
+
{
|
|
4168
|
+
onClick: () => setTheme(theme),
|
|
4169
|
+
className: "flex items-center justify-between hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
4170
|
+
children: [
|
|
4171
|
+
themeLabels[theme],
|
|
4172
|
+
currentTheme === theme && /* @__PURE__ */ jsx40(Check6, { className: "h-4 w-4 opacity-100" })
|
|
4173
|
+
]
|
|
4174
|
+
},
|
|
4175
|
+
theme
|
|
4176
|
+
)) })
|
|
4177
|
+
] });
|
|
4178
|
+
}
|
|
4179
|
+
|
|
4180
|
+
// src/components/date-time-picker/DateTimePicker.tsx
|
|
4181
|
+
import { add, format } from "date-fns";
|
|
4182
|
+
|
|
4183
|
+
// src/components/date-time-picker/calendar.tsx
|
|
4184
|
+
import * as React27 from "react";
|
|
4185
|
+
import { DayPicker as DayPicker2 } from "react-day-picker";
|
|
4186
|
+
import { CaretLeft as CaretLeft2, CaretRight as CaretRight5, X as X4, Calendar } from "phosphor-react";
|
|
4187
|
+
import { motion as motion6 } from "framer-motion";
|
|
4188
|
+
import { jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4189
|
+
var variants = {
|
|
4190
|
+
enter: (direction) => ({
|
|
4191
|
+
opacity: 0,
|
|
4192
|
+
x: direction > 0 ? 30 : -30
|
|
4193
|
+
}),
|
|
4194
|
+
center: {
|
|
4195
|
+
opacity: 1,
|
|
4196
|
+
x: 0
|
|
4197
|
+
},
|
|
4198
|
+
exit: (direction) => ({
|
|
4199
|
+
opacity: 0,
|
|
4200
|
+
x: direction > 0 ? -30 : 30
|
|
4201
|
+
})
|
|
4202
|
+
};
|
|
4203
|
+
function CalendarBase2({
|
|
4204
|
+
className,
|
|
4205
|
+
classNames,
|
|
4206
|
+
showOutsideDays = true,
|
|
4207
|
+
...props
|
|
4208
|
+
}) {
|
|
4209
|
+
const [month, setMonth] = React27.useState(
|
|
4210
|
+
props.month || props.defaultMonth || /* @__PURE__ */ new Date()
|
|
4211
|
+
);
|
|
4212
|
+
const [direction, setDirection] = React27.useState(1);
|
|
4213
|
+
const handleMonthChange = (newMonth) => {
|
|
4214
|
+
const isNext = newMonth > month ? 1 : -1;
|
|
4215
|
+
setDirection(isNext);
|
|
4216
|
+
setMonth(newMonth);
|
|
4217
|
+
props.onMonthChange?.(newMonth);
|
|
4218
|
+
};
|
|
4219
|
+
return /* @__PURE__ */ jsx41(
|
|
4220
|
+
"div",
|
|
4221
|
+
{
|
|
4222
|
+
className: cn(
|
|
4223
|
+
"rounded-xl border bg-background p-3 shadow-sm overflow-hidden",
|
|
4224
|
+
className
|
|
4225
|
+
),
|
|
4226
|
+
children: /* @__PURE__ */ jsx41(
|
|
4227
|
+
motion6.div,
|
|
4228
|
+
{
|
|
4229
|
+
variants,
|
|
4230
|
+
initial: "enter",
|
|
4231
|
+
animate: "center",
|
|
4232
|
+
exit: "exit",
|
|
4233
|
+
custom: direction,
|
|
4234
|
+
transition: { duration: 0.3, ease: "easeInOut" },
|
|
4235
|
+
style: { position: "relative" },
|
|
4236
|
+
children: /* @__PURE__ */ jsx41(
|
|
4237
|
+
DayPicker2,
|
|
4238
|
+
{
|
|
4239
|
+
showOutsideDays,
|
|
4240
|
+
month,
|
|
4241
|
+
onMonthChange: handleMonthChange,
|
|
4242
|
+
className: "w-full",
|
|
4243
|
+
classNames: {
|
|
4244
|
+
months: "flex items-center flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
4245
|
+
month: "space-y-4",
|
|
4246
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
4247
|
+
caption_label: "text-sm font-medium",
|
|
4248
|
+
nav: "space-x-1 flex items-center",
|
|
4249
|
+
nav_button: cn(
|
|
4250
|
+
buttonVariantsBase({ variant: "outline" }),
|
|
4251
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
4252
|
+
),
|
|
4253
|
+
nav_button_previous: "absolute left-1",
|
|
4254
|
+
nav_button_next: "absolute right-1",
|
|
4255
|
+
table: "w-full border-collapse space-y-1",
|
|
4256
|
+
head_row: "flex",
|
|
4257
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
4258
|
+
row: "flex w-full mt-2",
|
|
4259
|
+
cell: cn(
|
|
4260
|
+
"h-9 w-9 text-center text-sm p-0 relative",
|
|
4261
|
+
"[&:has([aria-selected].day-range-end)]:rounded-r-md",
|
|
4262
|
+
"[&:has([aria-selected].day-range-start)]:rounded-l-md",
|
|
4263
|
+
"[&:has([aria-selected].day-outside)]:bg-muted/50",
|
|
4264
|
+
"[&:has([aria-selected])]:bg-muted",
|
|
4265
|
+
"first:[&:has([aria-selected])]:rounded-l-md",
|
|
4266
|
+
"last:[&:has([aria-selected])]:rounded-r-md",
|
|
4267
|
+
"focus-within:relative focus-within:z-20"
|
|
4268
|
+
),
|
|
4269
|
+
day: cn(
|
|
4270
|
+
buttonVariantsBase({ variant: "ghost" }),
|
|
4271
|
+
"h-9 w-9 p-0 font-normal rounded-md",
|
|
4272
|
+
"aria-selected:opacity-100 hover:bg-muted"
|
|
4273
|
+
),
|
|
4274
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90",
|
|
4275
|
+
day_today: "bg-muted text-foreground dark:bg-muted dark:text-foreground",
|
|
4276
|
+
day_outside: "day-outside text-gray-500 opacity-50 aria-selected:bg-muted/50 aria-selected:text-black",
|
|
4277
|
+
day_disabled: "text-gray-500",
|
|
4278
|
+
day_range_middle: "aria-selected:bg-muted aria-selected:text-foreground",
|
|
4279
|
+
day_hidden: "invisible",
|
|
4280
|
+
...classNames
|
|
4281
|
+
},
|
|
4282
|
+
components: {
|
|
4283
|
+
IconLeft: () => /* @__PURE__ */ jsx41(CaretLeft2, { className: "h-4 w-4" }),
|
|
4284
|
+
IconRight: () => /* @__PURE__ */ jsx41(CaretRight5, { className: "h-4 w-4" })
|
|
4285
|
+
},
|
|
4286
|
+
...props
|
|
4287
|
+
}
|
|
4288
|
+
)
|
|
4289
|
+
},
|
|
4290
|
+
month.toISOString()
|
|
4291
|
+
)
|
|
4292
|
+
}
|
|
4293
|
+
);
|
|
4294
|
+
}
|
|
4295
|
+
CalendarBase2.displayName = "CalendarBase";
|
|
4296
|
+
|
|
4297
|
+
// src/components/date-time-picker/DateTimePicker.tsx
|
|
4298
|
+
import { Calendar as Calendar2 } from "phosphor-react";
|
|
4299
|
+
import { ptBR } from "date-fns/locale";
|
|
4300
|
+
import { useEffect as useEffect6, useState as useState8 } from "react";
|
|
4301
|
+
|
|
4302
|
+
// src/components/date-time-picker/TimePicker.tsx
|
|
4303
|
+
import { Clock } from "phosphor-react";
|
|
4304
|
+
import * as React29 from "react";
|
|
4305
|
+
|
|
4306
|
+
// src/components/date-time-picker/TimePickerInput.tsx
|
|
4307
|
+
import React28 from "react";
|
|
4308
|
+
|
|
4309
|
+
// src/components/date-time-picker/time-picker-utils.ts
|
|
4310
|
+
function isValidHour(value) {
|
|
4311
|
+
return /^(0[0-9]|1[0-9]|2[0-3])$/.test(value);
|
|
4312
|
+
}
|
|
4313
|
+
function isValid12Hour(value) {
|
|
4314
|
+
return /^(0[1-9]|1[0-2])$/.test(value);
|
|
4315
|
+
}
|
|
4316
|
+
function isValidMinuteOrSecond(value) {
|
|
4317
|
+
return /^[0-5][0-9]$/.test(value);
|
|
4318
|
+
}
|
|
4319
|
+
function getValidNumber(value, { max, min = 0, loop = false }) {
|
|
4320
|
+
let numericValue = parseInt(value, 10);
|
|
4321
|
+
if (!isNaN(numericValue)) {
|
|
4322
|
+
if (!loop) {
|
|
4323
|
+
if (numericValue > max) numericValue = max;
|
|
4324
|
+
if (numericValue < min) numericValue = min;
|
|
4325
|
+
} else {
|
|
4326
|
+
if (numericValue > max) numericValue = min;
|
|
4327
|
+
if (numericValue < min) numericValue = max;
|
|
4328
|
+
}
|
|
4329
|
+
return numericValue.toString().padStart(2, "0");
|
|
4330
|
+
}
|
|
4331
|
+
return "00";
|
|
4332
|
+
}
|
|
4333
|
+
function getValidHour(value) {
|
|
4334
|
+
if (isValidHour(value)) return value;
|
|
4335
|
+
return getValidNumber(value, { max: 23 });
|
|
4336
|
+
}
|
|
4337
|
+
function getValid12Hour(value) {
|
|
4338
|
+
if (isValid12Hour(value)) return value;
|
|
4339
|
+
return getValidNumber(value, { min: 1, max: 12 });
|
|
4340
|
+
}
|
|
4341
|
+
function getValidMinuteOrSecond(value) {
|
|
4342
|
+
if (isValidMinuteOrSecond(value)) return value;
|
|
4343
|
+
return getValidNumber(value, { max: 59 });
|
|
4344
|
+
}
|
|
4345
|
+
function getValidArrowNumber(value, { min, max, step }) {
|
|
4346
|
+
let numericValue = parseInt(value, 10);
|
|
4347
|
+
if (!isNaN(numericValue)) {
|
|
4348
|
+
numericValue += step;
|
|
4349
|
+
return getValidNumber(String(numericValue), { min, max, loop: true });
|
|
4350
|
+
}
|
|
4351
|
+
return "00";
|
|
4352
|
+
}
|
|
4353
|
+
function getValidArrowHour(value, step) {
|
|
4354
|
+
return getValidArrowNumber(value, { min: 0, max: 23, step });
|
|
4355
|
+
}
|
|
4356
|
+
function getValidArrow12Hour(value, step) {
|
|
4357
|
+
return getValidArrowNumber(value, { min: 1, max: 12, step });
|
|
4358
|
+
}
|
|
4359
|
+
function getValidArrowMinuteOrSecond(value, step) {
|
|
4360
|
+
return getValidArrowNumber(value, { min: 0, max: 59, step });
|
|
4361
|
+
}
|
|
4362
|
+
function setMinutes(date, value) {
|
|
4363
|
+
const minutes = getValidMinuteOrSecond(value);
|
|
4364
|
+
date.setMinutes(parseInt(minutes, 10));
|
|
4365
|
+
return date;
|
|
4366
|
+
}
|
|
4367
|
+
function setSeconds(date, value) {
|
|
4368
|
+
const seconds = getValidMinuteOrSecond(value);
|
|
4369
|
+
date.setSeconds(parseInt(seconds, 10));
|
|
4370
|
+
return date;
|
|
4371
|
+
}
|
|
4372
|
+
function setHours(date, value) {
|
|
4373
|
+
const hours = getValidHour(value);
|
|
4374
|
+
date.setHours(parseInt(hours, 10));
|
|
4375
|
+
return date;
|
|
4376
|
+
}
|
|
4377
|
+
function set12Hours(date, value, period) {
|
|
4378
|
+
const hours = parseInt(getValid12Hour(value), 10);
|
|
4379
|
+
const convertedHours = convert12HourTo24Hour(hours, period);
|
|
4380
|
+
date.setHours(convertedHours);
|
|
4381
|
+
return date;
|
|
4382
|
+
}
|
|
4383
|
+
function setDateByType(date, value, type, period) {
|
|
4384
|
+
switch (type) {
|
|
4385
|
+
case "minutes":
|
|
4386
|
+
return setMinutes(date, value);
|
|
4387
|
+
case "seconds":
|
|
4388
|
+
return setSeconds(date, value);
|
|
4389
|
+
case "hours":
|
|
4390
|
+
return setHours(date, value);
|
|
4391
|
+
case "12hours": {
|
|
4392
|
+
if (!period) return date;
|
|
4393
|
+
return set12Hours(date, value, period);
|
|
4394
|
+
}
|
|
4395
|
+
default:
|
|
4396
|
+
return date;
|
|
4397
|
+
}
|
|
4398
|
+
}
|
|
4399
|
+
function getDateByType(date, type) {
|
|
4400
|
+
switch (type) {
|
|
4401
|
+
case "minutes":
|
|
4402
|
+
return getValidMinuteOrSecond(String(date.getMinutes()));
|
|
4403
|
+
case "seconds":
|
|
4404
|
+
return getValidMinuteOrSecond(String(date.getSeconds()));
|
|
4405
|
+
case "hours":
|
|
4406
|
+
return getValidHour(String(date.getHours()));
|
|
4407
|
+
case "12hours":
|
|
4408
|
+
const hours = display12HourValue(date.getHours());
|
|
4409
|
+
return getValid12Hour(String(hours));
|
|
4410
|
+
default:
|
|
4411
|
+
return "00";
|
|
4412
|
+
}
|
|
4413
|
+
}
|
|
4414
|
+
function getArrowByType(value, step, type) {
|
|
4415
|
+
switch (type) {
|
|
4416
|
+
case "minutes":
|
|
4417
|
+
return getValidArrowMinuteOrSecond(value, step);
|
|
4418
|
+
case "seconds":
|
|
4419
|
+
return getValidArrowMinuteOrSecond(value, step);
|
|
4420
|
+
case "hours":
|
|
4421
|
+
return getValidArrowHour(value, step);
|
|
4422
|
+
case "12hours":
|
|
4423
|
+
return getValidArrow12Hour(value, step);
|
|
4424
|
+
default:
|
|
4425
|
+
return "00";
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
function convert12HourTo24Hour(hour, period) {
|
|
4429
|
+
if (period === "PM") {
|
|
4430
|
+
if (hour <= 11) {
|
|
4431
|
+
return hour + 12;
|
|
4432
|
+
} else {
|
|
4433
|
+
return hour;
|
|
4434
|
+
}
|
|
4435
|
+
} else if (period === "AM") {
|
|
4436
|
+
if (hour === 12) return 0;
|
|
4437
|
+
return hour;
|
|
4438
|
+
}
|
|
4439
|
+
return hour;
|
|
4440
|
+
}
|
|
4441
|
+
function display12HourValue(hours) {
|
|
4442
|
+
if (hours === 0 || hours === 12) return "12";
|
|
4443
|
+
if (hours >= 22) return `${hours - 12}`;
|
|
4444
|
+
if (hours % 12 > 9) return `${hours}`;
|
|
4445
|
+
return `0${hours % 12}`;
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
// src/components/date-time-picker/TimePickerInput.tsx
|
|
4449
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
4450
|
+
var TimePickerInput = React28.forwardRef(
|
|
4451
|
+
({
|
|
4452
|
+
className,
|
|
4453
|
+
type = "tel",
|
|
4454
|
+
value,
|
|
4455
|
+
id,
|
|
4456
|
+
name,
|
|
4457
|
+
date = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0)),
|
|
4458
|
+
setDate,
|
|
4459
|
+
onChange,
|
|
4460
|
+
onKeyDown,
|
|
4461
|
+
picker,
|
|
4462
|
+
period,
|
|
4463
|
+
onLeftFocus,
|
|
4464
|
+
onRightFocus,
|
|
4465
|
+
...props
|
|
4466
|
+
}, ref) => {
|
|
4467
|
+
const [flag, setFlag] = React28.useState(false);
|
|
4468
|
+
const [prevIntKey, setPrevIntKey] = React28.useState("0");
|
|
4469
|
+
React28.useEffect(() => {
|
|
4470
|
+
if (flag) {
|
|
4471
|
+
const timer = setTimeout(() => {
|
|
4472
|
+
setFlag(false);
|
|
4473
|
+
}, 2e3);
|
|
4474
|
+
return () => clearTimeout(timer);
|
|
4475
|
+
}
|
|
4476
|
+
}, [flag]);
|
|
4477
|
+
const calculatedValue = React28.useMemo(() => {
|
|
4478
|
+
return getDateByType(date, picker);
|
|
4479
|
+
}, [date, picker]);
|
|
4480
|
+
const calculateNewValue = (key) => {
|
|
4481
|
+
if (picker === "12hours") {
|
|
4482
|
+
if (flag && calculatedValue.slice(1, 2) === "1" && prevIntKey === "0")
|
|
4483
|
+
return "0" + key;
|
|
4484
|
+
}
|
|
4485
|
+
return !flag ? "0" + key : calculatedValue.slice(1, 2) + key;
|
|
4486
|
+
};
|
|
4487
|
+
const handleKeyDown = (e) => {
|
|
4488
|
+
if (e.key === "Tab") return;
|
|
4489
|
+
e.preventDefault();
|
|
4490
|
+
if (e.key === "ArrowRight") onRightFocus?.();
|
|
4491
|
+
if (e.key === "ArrowLeft") onLeftFocus?.();
|
|
4492
|
+
if (["ArrowUp", "ArrowDown"].includes(e.key)) {
|
|
4493
|
+
const step = e.key === "ArrowUp" ? 1 : -1;
|
|
4494
|
+
const newValue = getArrowByType(calculatedValue, step, picker);
|
|
4495
|
+
if (flag) setFlag(false);
|
|
4496
|
+
const tempDate = new Date(date);
|
|
4497
|
+
setDate(setDateByType(tempDate, newValue, picker, period));
|
|
4498
|
+
}
|
|
4499
|
+
if (e.key >= "0" && e.key <= "9") {
|
|
4500
|
+
if (picker === "12hours") setPrevIntKey(e.key);
|
|
4501
|
+
const newValue = calculateNewValue(e.key);
|
|
4502
|
+
if (flag) onRightFocus?.();
|
|
4503
|
+
setFlag((prev) => !prev);
|
|
4504
|
+
const tempDate = new Date(date);
|
|
4505
|
+
setDate(setDateByType(tempDate, newValue, picker, period));
|
|
4506
|
+
}
|
|
4507
|
+
};
|
|
4508
|
+
return /* @__PURE__ */ jsx42(
|
|
4509
|
+
InputBase,
|
|
4510
|
+
{
|
|
4511
|
+
ref,
|
|
4512
|
+
id: id || picker,
|
|
4513
|
+
name: name || picker,
|
|
4514
|
+
className: cn(
|
|
4515
|
+
"focus:bg-accent focus:text-accent-foreground w-[48px] text-center font-mono text-base tabular-nums caret-transparent [&::-webkit-inner-spin-button]:appearance-none",
|
|
4516
|
+
className
|
|
4517
|
+
),
|
|
4518
|
+
value: value || calculatedValue,
|
|
4519
|
+
onChange: (e) => {
|
|
4520
|
+
e.preventDefault();
|
|
4521
|
+
onChange?.(e);
|
|
4522
|
+
},
|
|
4523
|
+
type,
|
|
4524
|
+
inputMode: "decimal",
|
|
4525
|
+
onKeyDown: (e) => {
|
|
4526
|
+
onKeyDown?.(e);
|
|
4527
|
+
handleKeyDown(e);
|
|
4528
|
+
},
|
|
4529
|
+
...props
|
|
4530
|
+
}
|
|
4531
|
+
);
|
|
4532
|
+
}
|
|
4533
|
+
);
|
|
4534
|
+
TimePickerInput.displayName = "TimePickerInput";
|
|
4535
|
+
|
|
4536
|
+
// src/components/date-time-picker/TimePicker.tsx
|
|
4537
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4538
|
+
function TimePicker({ date, setDate, hideSeconds }) {
|
|
4539
|
+
const minuteRef = React29.useRef(null);
|
|
4540
|
+
const hourRef = React29.useRef(null);
|
|
4541
|
+
const secondRef = React29.useRef(null);
|
|
4542
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex items-end gap-2", children: [
|
|
4543
|
+
/* @__PURE__ */ jsxs24("div", { className: "grid gap-1 text-center", children: [
|
|
4544
|
+
/* @__PURE__ */ jsx43(LabelBase_default, { htmlFor: "hours", className: "text-xs", children: "Horas" }),
|
|
4545
|
+
/* @__PURE__ */ jsx43(
|
|
4546
|
+
TimePickerInput,
|
|
4547
|
+
{
|
|
4548
|
+
picker: "hours",
|
|
4549
|
+
date,
|
|
4550
|
+
setDate,
|
|
4551
|
+
ref: hourRef,
|
|
4552
|
+
onRightFocus: () => minuteRef.current?.focus()
|
|
4553
|
+
}
|
|
4554
|
+
)
|
|
4555
|
+
] }),
|
|
4556
|
+
/* @__PURE__ */ jsxs24("div", { className: "grid gap-1 text-center", children: [
|
|
4557
|
+
/* @__PURE__ */ jsx43(LabelBase_default, { htmlFor: "minutes", className: "text-xs", children: "Minutos" }),
|
|
4558
|
+
/* @__PURE__ */ jsx43(
|
|
4559
|
+
TimePickerInput,
|
|
4560
|
+
{
|
|
4561
|
+
picker: "minutes",
|
|
4562
|
+
date,
|
|
4563
|
+
setDate,
|
|
4564
|
+
ref: minuteRef,
|
|
4565
|
+
onLeftFocus: () => hourRef.current?.focus(),
|
|
4566
|
+
onRightFocus: () => secondRef.current?.focus()
|
|
4567
|
+
}
|
|
4568
|
+
)
|
|
4569
|
+
] }),
|
|
4570
|
+
!hideSeconds && /* @__PURE__ */ jsxs24("div", { className: "grid gap-1 text-center", children: [
|
|
4571
|
+
/* @__PURE__ */ jsx43(LabelBase_default, { htmlFor: "seconds", className: "text-xs", children: "Segundos" }),
|
|
4572
|
+
/* @__PURE__ */ jsx43(
|
|
4573
|
+
TimePickerInput,
|
|
4574
|
+
{
|
|
4575
|
+
picker: "seconds",
|
|
4576
|
+
date,
|
|
4577
|
+
setDate,
|
|
4578
|
+
ref: secondRef,
|
|
4579
|
+
onLeftFocus: () => minuteRef.current?.focus()
|
|
4580
|
+
}
|
|
4581
|
+
)
|
|
4582
|
+
] }),
|
|
4583
|
+
/* @__PURE__ */ jsx43("div", { className: "flex h-10 items-center", children: /* @__PURE__ */ jsx43(Clock, { className: "ml-2 h-4 w-4" }) })
|
|
4584
|
+
] });
|
|
4585
|
+
}
|
|
4586
|
+
|
|
4587
|
+
// src/components/date-time-picker/DateTimePicker.tsx
|
|
4588
|
+
import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4589
|
+
function DateTimePicker({
|
|
4590
|
+
label,
|
|
4591
|
+
date,
|
|
4592
|
+
onChange,
|
|
4593
|
+
hideSeconds,
|
|
4594
|
+
fromDate,
|
|
4595
|
+
toDate,
|
|
4596
|
+
disabled,
|
|
4597
|
+
dialogTitle
|
|
4598
|
+
}) {
|
|
4599
|
+
const [internalDate, setInternalDate] = useState8(date);
|
|
4600
|
+
const handleSelect = (newDay) => {
|
|
4601
|
+
if (!newDay) return;
|
|
4602
|
+
if (!internalDate) {
|
|
4603
|
+
setInternalDate(newDay);
|
|
4604
|
+
return;
|
|
4605
|
+
}
|
|
4606
|
+
const diff = newDay.getTime() - internalDate.getTime();
|
|
4607
|
+
const diffInDays = diff / (1e3 * 60 * 60 * 24);
|
|
4608
|
+
const newDateFull = add(internalDate, { days: Math.ceil(diffInDays) });
|
|
4609
|
+
setInternalDate(newDateFull);
|
|
4610
|
+
};
|
|
4611
|
+
const [open, setOpen] = useState8(false);
|
|
4612
|
+
useEffect6(() => {
|
|
4613
|
+
if (date) {
|
|
4614
|
+
setInternalDate(date);
|
|
4615
|
+
}
|
|
4616
|
+
}, [date, open]);
|
|
4617
|
+
return /* @__PURE__ */ jsxs25(Fragment4, { children: [
|
|
4618
|
+
label && /* @__PURE__ */ jsx44(LabelBase_default, { className: "mb-[-1rem] pl-2", children: label }),
|
|
4619
|
+
/* @__PURE__ */ jsxs25(DialogBase, { open, onOpenChange: setOpen, children: [
|
|
4620
|
+
/* @__PURE__ */ jsx44(DialogTriggerBase, { disabled, asChild: true, children: /* @__PURE__ */ jsxs25(
|
|
4621
|
+
ButtonBase,
|
|
4622
|
+
{
|
|
4623
|
+
variant: "default",
|
|
4624
|
+
size: "lg",
|
|
4625
|
+
className: cn(
|
|
4626
|
+
"w-full justify-start text-left font-normal text-zinc-950",
|
|
4627
|
+
!date && "text-muted-foreground"
|
|
4628
|
+
),
|
|
4629
|
+
children: [
|
|
4630
|
+
date ? format(date, "PPP - HH:mm", { locale: ptBR }) : /* @__PURE__ */ jsx44("span", { className: "text-zinc-400", children: "Pick a date" }),
|
|
4631
|
+
/* @__PURE__ */ jsx44(Calendar2, { className: "ml-auto text-gray-500", size: 24 })
|
|
4632
|
+
]
|
|
4633
|
+
}
|
|
4634
|
+
) }),
|
|
4635
|
+
/* @__PURE__ */ jsxs25(DialogContentBase, { children: [
|
|
4636
|
+
/* @__PURE__ */ jsx44(DialogHeaderBase, { children: /* @__PURE__ */ jsx44(DialogTitleBase, { className: "text-xl font-semibold", children: dialogTitle ?? "Selecione a data" }) }),
|
|
4637
|
+
/* @__PURE__ */ jsx44(
|
|
4638
|
+
CalendarBase2,
|
|
4639
|
+
{
|
|
4640
|
+
mode: "single",
|
|
4641
|
+
locale: ptBR,
|
|
4642
|
+
selected: internalDate,
|
|
4643
|
+
onSelect: (d) => handleSelect(d),
|
|
4644
|
+
initialFocus: true,
|
|
4645
|
+
fromDate,
|
|
4646
|
+
toDate
|
|
4647
|
+
}
|
|
4648
|
+
),
|
|
4649
|
+
/* @__PURE__ */ jsx44("div", { className: "border-border flex justify-center border-t p-3", children: /* @__PURE__ */ jsx44(
|
|
4650
|
+
TimePicker,
|
|
4651
|
+
{
|
|
4652
|
+
setDate: setInternalDate,
|
|
4653
|
+
date: internalDate,
|
|
4654
|
+
hideSeconds
|
|
4655
|
+
}
|
|
4656
|
+
) }),
|
|
4657
|
+
/* @__PURE__ */ jsx44(
|
|
4658
|
+
ButtonBase,
|
|
4659
|
+
{
|
|
4660
|
+
onClick: () => {
|
|
4661
|
+
onChange(internalDate);
|
|
4662
|
+
setOpen(false);
|
|
4663
|
+
},
|
|
4664
|
+
children: "Salvar"
|
|
4665
|
+
}
|
|
4666
|
+
)
|
|
4667
|
+
] })
|
|
4668
|
+
] })
|
|
4669
|
+
] });
|
|
4670
|
+
}
|
|
4671
|
+
|
|
4672
|
+
// src/components/selects/Select.tsx
|
|
4673
|
+
import { Fragment as Fragment5, jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4674
|
+
function Select({
|
|
4675
|
+
items,
|
|
4676
|
+
groupItems,
|
|
4677
|
+
placeholder,
|
|
4678
|
+
onChange,
|
|
4679
|
+
errorMessage,
|
|
4680
|
+
testIds = {}
|
|
4681
|
+
}) {
|
|
4682
|
+
return /* @__PURE__ */ jsxs26("div", { "data-testid": testIds.root ?? "select-root", children: [
|
|
4683
|
+
/* @__PURE__ */ jsxs26(SelectBase, { onValueChange: onChange, "data-testid": testIds.base ?? "select-base", children: [
|
|
4684
|
+
/* @__PURE__ */ jsx45(
|
|
4685
|
+
SelectTriggerBase,
|
|
4686
|
+
{
|
|
4687
|
+
className: cn(
|
|
4688
|
+
"flex h-12 w-full content-start text-lg shadow-md",
|
|
4689
|
+
errorMessage && "border-red-500"
|
|
4690
|
+
),
|
|
4691
|
+
"data-testid": testIds.trigger ?? "select-trigger",
|
|
4692
|
+
children: /* @__PURE__ */ jsx45(
|
|
4693
|
+
SelectValueBase,
|
|
4694
|
+
{
|
|
4695
|
+
placeholder,
|
|
4696
|
+
"data-testid": testIds.value ?? "select-value"
|
|
4697
|
+
}
|
|
4698
|
+
)
|
|
4699
|
+
}
|
|
4700
|
+
),
|
|
4701
|
+
/* @__PURE__ */ jsx45(ScrollAreaBase, { "data-testid": testIds.scrollarea ?? "select-scrollarea", children: /* @__PURE__ */ jsx45(SelectContentBase, { "data-testid": testIds.content ?? "select-content", children: groupItems ? /* @__PURE__ */ jsx45(Fragment5, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */ jsxs26(SelectGroupBase, { "data-testid": testIds.group ?? "select-group", children: [
|
|
4702
|
+
/* @__PURE__ */ jsx45(SelectLabelBase, { "data-testid": testIds.label ?? "select-label", children: key }),
|
|
4703
|
+
groupItems[key].map((item) => /* @__PURE__ */ jsx45(
|
|
4704
|
+
SelectItemBase,
|
|
4705
|
+
{
|
|
4706
|
+
value: item.value,
|
|
4707
|
+
"data-testid": testIds.item?.(item.value) ?? `select-item-${item.value}`,
|
|
4708
|
+
children: item.label
|
|
4709
|
+
},
|
|
4710
|
+
item.value
|
|
4711
|
+
))
|
|
4712
|
+
] }, key)) }) : /* @__PURE__ */ jsx45(SelectGroupBase, { "data-testid": testIds.group ?? "select-group", children: items.map((item) => /* @__PURE__ */ jsx45(
|
|
4713
|
+
SelectItemBase,
|
|
4714
|
+
{
|
|
4715
|
+
value: item.value,
|
|
4716
|
+
"data-testid": testIds.item?.(item.value) ?? `select-item-${item.value}`,
|
|
4717
|
+
children: item.label
|
|
4718
|
+
},
|
|
4719
|
+
item.value
|
|
4720
|
+
)) }) }) })
|
|
4721
|
+
] }),
|
|
4722
|
+
errorMessage && /* @__PURE__ */ jsx45(
|
|
4723
|
+
"p",
|
|
4724
|
+
{
|
|
4725
|
+
className: "text-sm text-red-500",
|
|
4726
|
+
"data-testid": testIds.error ?? "select-error",
|
|
4727
|
+
children: errorMessage
|
|
4728
|
+
}
|
|
4729
|
+
)
|
|
4730
|
+
] });
|
|
4731
|
+
}
|
|
4732
|
+
export {
|
|
4733
|
+
AlertDialogActionBase,
|
|
4734
|
+
AlertDialogBase,
|
|
4735
|
+
AlertDialogCancelBase,
|
|
4736
|
+
AlertDialogContentBase,
|
|
4737
|
+
AlertDialogDescriptionBase,
|
|
4738
|
+
AlertDialogFooterBase,
|
|
4739
|
+
AlertDialogHeaderBase,
|
|
4740
|
+
AlertDialogOverlayBase,
|
|
4741
|
+
AlertDialogPortalBase,
|
|
4742
|
+
AlertDialogTitleBase,
|
|
4743
|
+
AlertDialogTriggerBase,
|
|
4744
|
+
AvatarBase,
|
|
4745
|
+
AvatarFallbackBase,
|
|
4746
|
+
AvatarImageBase,
|
|
4747
|
+
BadgeBase,
|
|
4748
|
+
BreadcrumbBase,
|
|
4749
|
+
BreadcrumbEllipsisBase,
|
|
4750
|
+
BreadcrumbItemBase,
|
|
4751
|
+
BreadcrumbLinkBase,
|
|
4752
|
+
BreadcrumbListBase,
|
|
4753
|
+
BreadcrumbPageBase,
|
|
4754
|
+
BreadcrumbSeparatorBase,
|
|
4755
|
+
ButtonBase,
|
|
4756
|
+
ButtonGroupBase,
|
|
4757
|
+
CalendarBase,
|
|
4758
|
+
CardBase,
|
|
4759
|
+
CardContentBase,
|
|
4760
|
+
CardDescriptionBase,
|
|
4761
|
+
CardFooterBase,
|
|
4762
|
+
CardHeaderBase,
|
|
4763
|
+
CardTitleBase,
|
|
4764
|
+
CarouselBase,
|
|
4765
|
+
CarouselContentBase,
|
|
4766
|
+
CarouselItemBase,
|
|
4767
|
+
CarouselNextBase,
|
|
4768
|
+
CarouselPrevious,
|
|
4769
|
+
CheckboxBase,
|
|
4770
|
+
Combobox,
|
|
4771
|
+
CommandBase,
|
|
4772
|
+
CommandDialogBase,
|
|
4773
|
+
CommandEmptyBase,
|
|
4774
|
+
CommandGroupBase,
|
|
4775
|
+
CommandInputBase,
|
|
4776
|
+
CommandItemBase,
|
|
4777
|
+
CommandListBase,
|
|
4778
|
+
CommandSeparatorBase,
|
|
4779
|
+
CommandShortcutBase,
|
|
4780
|
+
ContextMenuBase,
|
|
4781
|
+
ContextMenuCheckboxItemBase,
|
|
4782
|
+
ContextMenuContentBase,
|
|
4783
|
+
ContextMenuGroupBase,
|
|
4784
|
+
ContextMenuItemBase,
|
|
4785
|
+
ContextMenuLabelBase,
|
|
4786
|
+
ContextMenuPortalBase,
|
|
4787
|
+
ContextMenuRadioGroupBase,
|
|
4788
|
+
ContextMenuRadioItemBase,
|
|
4789
|
+
ContextMenuSeparatorBase,
|
|
4790
|
+
ContextMenuShortcutBase,
|
|
4791
|
+
ContextMenuSubBase,
|
|
4792
|
+
ContextMenuSubContentBase,
|
|
4793
|
+
ContextMenuSubTriggerBase,
|
|
4794
|
+
ContextMenuTriggerBase,
|
|
4795
|
+
DateTimePicker,
|
|
4796
|
+
DialogBase,
|
|
4797
|
+
DialogCloseBase,
|
|
4798
|
+
DialogContentBase,
|
|
4799
|
+
DialogDescriptionBase,
|
|
4800
|
+
DialogFooterBase,
|
|
4801
|
+
DialogHeaderBase,
|
|
4802
|
+
DialogOverlayBase,
|
|
4803
|
+
DialogPortalBase,
|
|
4804
|
+
DialogTitleBase,
|
|
4805
|
+
DialogTriggerBase,
|
|
4806
|
+
DrawerBase,
|
|
4807
|
+
DrawerCloseBase,
|
|
4808
|
+
DrawerContentBase,
|
|
4809
|
+
DrawerDescriptionBase,
|
|
4810
|
+
DrawerFooterBase,
|
|
4811
|
+
DrawerHeaderBase,
|
|
4812
|
+
DrawerOverlayBase,
|
|
4813
|
+
DrawerPortalBase,
|
|
4814
|
+
DrawerTitleBase,
|
|
4815
|
+
DrawerTriggerBase,
|
|
4816
|
+
DropDownMenuBase,
|
|
4817
|
+
DropDownMenuCheckboxItemBase,
|
|
4818
|
+
DropDownMenuContentBase,
|
|
4819
|
+
DropDownMenuGroupBase,
|
|
4820
|
+
DropDownMenuItemBase,
|
|
4821
|
+
DropDownMenuLabelBase,
|
|
4822
|
+
DropDownMenuPortalBase,
|
|
4823
|
+
DropDownMenuRadioGroupBase,
|
|
4824
|
+
DropDownMenuRadioItemBase,
|
|
4825
|
+
DropDownMenuSeparatorBase,
|
|
4826
|
+
DropDownMenuShortcutBase,
|
|
4827
|
+
DropDownMenuSubBase,
|
|
4828
|
+
DropDownMenuSubContentBase,
|
|
4829
|
+
DropDownMenuSubTriggerBase,
|
|
4830
|
+
DropDownMenuTriggerBase,
|
|
4831
|
+
HoverCardBase,
|
|
4832
|
+
HoverCardContentBase,
|
|
4833
|
+
HoverCardTriggerBase,
|
|
4834
|
+
InputBase,
|
|
4835
|
+
InputOTPBase,
|
|
4836
|
+
InputOTPGroupBase,
|
|
4837
|
+
InputOTPSeparatorBase,
|
|
4838
|
+
InputOTPSlotBase,
|
|
4839
|
+
ModeToggleBase,
|
|
4840
|
+
MultiCombobox,
|
|
4841
|
+
NavigationMenuBase,
|
|
4842
|
+
NavigationMenuContentBase,
|
|
4843
|
+
NavigationMenuIndicatorBase,
|
|
4844
|
+
NavigationMenuItemBase,
|
|
4845
|
+
NavigationMenuLinkBase,
|
|
4846
|
+
NavigationMenuListBase,
|
|
4847
|
+
NavigationMenuTriggerBase,
|
|
4848
|
+
NavigationMenuViewportBase,
|
|
4849
|
+
PopoverAnchorBase,
|
|
4850
|
+
PopoverBase,
|
|
4851
|
+
PopoverContentBase,
|
|
4852
|
+
PopoverTriggerBase,
|
|
4853
|
+
ProgressBase,
|
|
4854
|
+
ProgressCirclesBase,
|
|
4855
|
+
ProgressPanelsBase,
|
|
4856
|
+
ProgressSegmentsBase,
|
|
4857
|
+
ScrollAreaBase,
|
|
4858
|
+
ScrollBarBase,
|
|
4859
|
+
Select,
|
|
4860
|
+
SelectBase,
|
|
4861
|
+
SelectContentBase,
|
|
4862
|
+
SelectGroupBase,
|
|
4863
|
+
SelectItemBase,
|
|
4864
|
+
SelectLabelBase,
|
|
4865
|
+
SelectScrollDownButtonBase,
|
|
4866
|
+
SelectScrollUpButtonBase,
|
|
4867
|
+
SelectSeparatorBase,
|
|
4868
|
+
SelectTriggerBase,
|
|
4869
|
+
SelectValueBase,
|
|
4870
|
+
SeparatorBase,
|
|
4871
|
+
SheetBase,
|
|
4872
|
+
SheetCloseBase,
|
|
4873
|
+
SheetContentBase,
|
|
4874
|
+
SheetDescriptionBase,
|
|
4875
|
+
SheetFooterBase,
|
|
4876
|
+
SheetHeaderBase,
|
|
4877
|
+
SheetOverlayBase,
|
|
4878
|
+
SheetPortalBase,
|
|
4879
|
+
SheetTitleBase,
|
|
4880
|
+
SheetTriggerBase,
|
|
4881
|
+
SidebarBase,
|
|
4882
|
+
SidebarContentBase,
|
|
4883
|
+
SidebarFooterBase,
|
|
4884
|
+
SidebarGroupActionBase,
|
|
4885
|
+
SidebarGroupBase,
|
|
4886
|
+
SidebarGroupContentBase,
|
|
4887
|
+
SidebarGroupLabelBase,
|
|
4888
|
+
SidebarHeaderBase,
|
|
4889
|
+
SidebarInputBase,
|
|
4890
|
+
SidebarInsetBase,
|
|
4891
|
+
SidebarMenuActionBase,
|
|
4892
|
+
SidebarMenuBadgeBase,
|
|
4893
|
+
SidebarMenuBase,
|
|
4894
|
+
SidebarMenuButtonBase,
|
|
4895
|
+
SidebarMenuItemBase,
|
|
4896
|
+
SidebarMenuSkeletonBase,
|
|
4897
|
+
SidebarMenuSubBase,
|
|
4898
|
+
SidebarMenuSubButtonBase,
|
|
4899
|
+
SidebarMenuSubItemBase,
|
|
4900
|
+
SidebarProviderBase,
|
|
4901
|
+
SidebarRailBase,
|
|
4902
|
+
SidebarSeparatorBase,
|
|
4903
|
+
SidebarTriggerBase,
|
|
4904
|
+
SkeletonBase,
|
|
4905
|
+
SlideBase,
|
|
4906
|
+
SwitchBase,
|
|
4907
|
+
TableBase,
|
|
4908
|
+
TableBodyBase,
|
|
4909
|
+
TableCaptionBase,
|
|
4910
|
+
TableCellBase,
|
|
4911
|
+
TableFooterBase,
|
|
4912
|
+
TableHeadBase,
|
|
4913
|
+
TableHeaderBase,
|
|
4914
|
+
TableRowBase,
|
|
4915
|
+
TabsBase,
|
|
4916
|
+
TabsContentBase,
|
|
4917
|
+
TabsListBase,
|
|
4918
|
+
TabsTriggerBase,
|
|
4919
|
+
TextAreaBase,
|
|
4920
|
+
ThemeProviderBase,
|
|
4921
|
+
TimePicker,
|
|
4922
|
+
TimePickerInput,
|
|
4923
|
+
Toaster,
|
|
4924
|
+
TooltipBase,
|
|
4925
|
+
TooltipContentBase,
|
|
4926
|
+
TooltipProviderBase,
|
|
4927
|
+
TooltipTriggerBase,
|
|
4928
|
+
UseSideBarBase,
|
|
4929
|
+
badgeVariants,
|
|
4930
|
+
buttonVariantsBase,
|
|
4931
|
+
navigationMenuTriggerStyle,
|
|
4932
|
+
toast,
|
|
4933
|
+
useIsMobile,
|
|
4934
|
+
useTheme
|
|
4935
|
+
};
|