@fluid-app/ui-primitives 0.1.5 → 0.1.6
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.cjs +1541 -2374
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +767 -293
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +817 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +1573 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +4 -4
- package/dist/index.d.ts +0 -343
- package/dist/index.js +0 -2408
- package/dist/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2444 +1,1611 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
|
+
get: ((k) => from[k]).bind(null, key),
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
20
|
+
value: mod,
|
|
21
|
+
enumerable: true
|
|
22
|
+
}) : target, mod));
|
|
23
|
+
//#endregion
|
|
24
|
+
let clsx = require("clsx");
|
|
25
|
+
let tailwind_merge = require("tailwind-merge");
|
|
26
|
+
let _hookform_resolvers_zod = require("@hookform/resolvers/zod");
|
|
27
|
+
let react_hook_form = require("react-hook-form");
|
|
28
|
+
let react = require("react");
|
|
29
|
+
react = __toESM(react);
|
|
30
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
+
let _radix_ui_react_accordion = require("@radix-ui/react-accordion");
|
|
32
|
+
_radix_ui_react_accordion = __toESM(_radix_ui_react_accordion);
|
|
33
|
+
let lucide_react = require("lucide-react");
|
|
34
|
+
let class_variance_authority = require("class-variance-authority");
|
|
35
|
+
let radix_ui = require("radix-ui");
|
|
36
|
+
let _radix_ui_react_slot = require("@radix-ui/react-slot");
|
|
37
|
+
let react_day_picker = require("react-day-picker");
|
|
38
|
+
let recharts = require("recharts");
|
|
39
|
+
recharts = __toESM(recharts);
|
|
40
|
+
let _radix_ui_react_collapsible = require("@radix-ui/react-collapsible");
|
|
41
|
+
_radix_ui_react_collapsible = __toESM(_radix_ui_react_collapsible);
|
|
42
|
+
let _radix_ui_react_popover = require("@radix-ui/react-popover");
|
|
43
|
+
_radix_ui_react_popover = __toESM(_radix_ui_react_popover);
|
|
44
|
+
let _radix_ui_react_dialog = require("@radix-ui/react-dialog");
|
|
45
|
+
_radix_ui_react_dialog = __toESM(_radix_ui_react_dialog);
|
|
46
|
+
let _radix_ui_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
47
|
+
_radix_ui_react_dropdown_menu = __toESM(_radix_ui_react_dropdown_menu);
|
|
48
|
+
let _radix_ui_react_label = require("@radix-ui/react-label");
|
|
49
|
+
_radix_ui_react_label = __toESM(_radix_ui_react_label);
|
|
50
|
+
let _radix_ui_react_toggle = require("@radix-ui/react-toggle");
|
|
51
|
+
_radix_ui_react_toggle = __toESM(_radix_ui_react_toggle);
|
|
52
|
+
let _radix_ui_react_select = require("@radix-ui/react-select");
|
|
53
|
+
_radix_ui_react_select = __toESM(_radix_ui_react_select);
|
|
54
|
+
let _radix_ui_react_separator = require("@radix-ui/react-separator");
|
|
55
|
+
_radix_ui_react_separator = __toESM(_radix_ui_react_separator);
|
|
56
|
+
let _radix_ui_react_slider = require("@radix-ui/react-slider");
|
|
57
|
+
_radix_ui_react_slider = __toESM(_radix_ui_react_slider);
|
|
58
|
+
let sonner = require("sonner");
|
|
59
|
+
let _radix_ui_react_switch = require("@radix-ui/react-switch");
|
|
60
|
+
_radix_ui_react_switch = __toESM(_radix_ui_react_switch);
|
|
61
|
+
let _radix_ui_react_tabs = require("@radix-ui/react-tabs");
|
|
62
|
+
_radix_ui_react_tabs = __toESM(_radix_ui_react_tabs);
|
|
63
|
+
let _radix_ui_react_toggle_group = require("@radix-ui/react-toggle-group");
|
|
64
|
+
_radix_ui_react_toggle_group = __toESM(_radix_ui_react_toggle_group);
|
|
65
|
+
let _radix_ui_react_tooltip = require("@radix-ui/react-tooltip");
|
|
66
|
+
_radix_ui_react_tooltip = __toESM(_radix_ui_react_tooltip);
|
|
67
|
+
//#region src/lib/utils.ts
|
|
67
68
|
function cn(...inputs) {
|
|
68
|
-
|
|
69
|
-
}
|
|
69
|
+
return (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/hooks/use-zod-form.ts
|
|
73
|
+
/**
|
|
74
|
+
* A typed wrapper around useForm that uses zodResolver.
|
|
75
|
+
* Breaks the TypeScript inference chain that causes TS2589
|
|
76
|
+
* "Type instantiation is excessively deep" errors with complex Zod schemas.
|
|
77
|
+
*/
|
|
70
78
|
function useZodForm(schema, options) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
"use no memo";
|
|
80
|
+
const resolver = (0, _hookform_resolvers_zod.zodResolver)(schema);
|
|
81
|
+
return (0, react_hook_form.useForm)({
|
|
82
|
+
...options,
|
|
83
|
+
resolver
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/contexts/PortalContainerContext.tsx
|
|
88
|
+
const PortalContainerContext = (0, react.createContext)(void 0);
|
|
89
|
+
/**
|
|
90
|
+
* Provides a custom container element for Radix UI portals.
|
|
91
|
+
* When set, portal-using components (Popover, Select, DropdownMenu, etc.)
|
|
92
|
+
* will render into this container instead of document.body,
|
|
93
|
+
* preserving CSS theme variable inheritance.
|
|
94
|
+
*/
|
|
95
|
+
function PortalContainerProvider({ children, container }) {
|
|
96
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PortalContainerContext.Provider, {
|
|
97
|
+
value: container ?? void 0,
|
|
98
|
+
children
|
|
99
|
+
});
|
|
84
100
|
}
|
|
85
101
|
function usePortalContainer() {
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
"data-slot": "accordion-content",
|
|
144
|
-
className: "cn-accordion-content overflow-hidden",
|
|
145
|
-
...props,
|
|
146
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
147
|
-
"div",
|
|
148
|
-
{
|
|
149
|
-
className: cn(
|
|
150
|
-
"cn-accordion-content-inner [&_a]:hover:text-foreground h-(--radix-accordion-content-height) [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4",
|
|
151
|
-
className
|
|
152
|
-
),
|
|
153
|
-
children
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
}
|
|
157
|
-
);
|
|
158
|
-
}
|
|
159
|
-
var alertVariants = classVarianceAuthority.cva(
|
|
160
|
-
"relative grid h-full w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
161
|
-
{
|
|
162
|
-
variants: {
|
|
163
|
-
variant: {
|
|
164
|
-
default: "bg-card text-card-foreground",
|
|
165
|
-
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
defaultVariants: {
|
|
169
|
-
variant: "default"
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
function Alert({
|
|
174
|
-
className,
|
|
175
|
-
variant,
|
|
176
|
-
...props
|
|
177
|
-
}) {
|
|
178
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
179
|
-
"div",
|
|
180
|
-
{
|
|
181
|
-
"data-slot": "alert",
|
|
182
|
-
role: "alert",
|
|
183
|
-
className: cn(alertVariants({ variant }), className),
|
|
184
|
-
...props
|
|
185
|
-
}
|
|
186
|
-
);
|
|
102
|
+
return (0, react.useContext)(PortalContainerContext);
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
105
|
+
//#region src/components/Accordion.tsx
|
|
106
|
+
function Accordion({ className, ...props }) {
|
|
107
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Root, {
|
|
108
|
+
"data-slot": "accordion",
|
|
109
|
+
className: cn("cn-accordion flex w-full flex-col", className),
|
|
110
|
+
...props
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
function AccordionItem({ className, ...props }) {
|
|
114
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Item, {
|
|
115
|
+
"data-slot": "accordion-item",
|
|
116
|
+
className: cn("cn-accordion-item", className),
|
|
117
|
+
...props
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
121
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Header, {
|
|
122
|
+
className: "flex",
|
|
123
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_accordion.Trigger, {
|
|
124
|
+
"data-slot": "accordion-trigger",
|
|
125
|
+
className: cn("cn-accordion-trigger group/accordion-trigger relative flex flex-1 items-start justify-between border border-transparent transition-all outline-none disabled:pointer-events-none disabled:opacity-50", className),
|
|
126
|
+
...props,
|
|
127
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { className: "cn-accordion-trigger-icon pointer-events-none shrink-0 transition-transform duration-200 group-aria-expanded/accordion-trigger:rotate-180" })]
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function AccordionContent({ className, children, ...props }) {
|
|
132
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_accordion.Content, {
|
|
133
|
+
"data-slot": "accordion-content",
|
|
134
|
+
className: "cn-accordion-content overflow-hidden",
|
|
135
|
+
...props,
|
|
136
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
137
|
+
className: cn("cn-accordion-content-inner [&_a]:hover:text-foreground h-(--radix-accordion-content-height) [&_a]:underline [&_a]:underline-offset-3 [&_p:not(:last-child)]:mb-4", className),
|
|
138
|
+
children
|
|
139
|
+
})
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region src/components/Alert.tsx
|
|
144
|
+
const alertVariants = (0, class_variance_authority.cva)("relative grid h-full w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
|
|
145
|
+
variants: { variant: {
|
|
146
|
+
default: "bg-card text-card-foreground",
|
|
147
|
+
destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"
|
|
148
|
+
} },
|
|
149
|
+
defaultVariants: { variant: "default" }
|
|
150
|
+
});
|
|
151
|
+
function Alert({ className, variant, ...props }) {
|
|
152
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
153
|
+
"data-slot": "alert",
|
|
154
|
+
role: "alert",
|
|
155
|
+
className: cn(alertVariants({ variant }), className),
|
|
156
|
+
...props
|
|
157
|
+
});
|
|
187
158
|
}
|
|
188
159
|
function AlertTitle({ className, ...props }) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
function
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
function
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
radixUi.AlertDialog.Title,
|
|
361
|
-
{
|
|
362
|
-
"data-slot": "alert-dialog-title",
|
|
363
|
-
className: cn(
|
|
364
|
-
"text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
|
|
365
|
-
className
|
|
366
|
-
),
|
|
367
|
-
...props
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
|
-
function AlertDialogDescription({
|
|
372
|
-
className,
|
|
373
|
-
...props
|
|
374
|
-
}) {
|
|
375
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
376
|
-
radixUi.AlertDialog.Description,
|
|
377
|
-
{
|
|
378
|
-
"data-slot": "alert-dialog-description",
|
|
379
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
380
|
-
...props
|
|
381
|
-
}
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
function AlertDialogMedia({
|
|
385
|
-
className,
|
|
386
|
-
...props
|
|
387
|
-
}) {
|
|
388
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
389
|
-
"div",
|
|
390
|
-
{
|
|
391
|
-
"data-slot": "alert-dialog-media",
|
|
392
|
-
className: cn(
|
|
393
|
-
"bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
|
|
394
|
-
className
|
|
395
|
-
),
|
|
396
|
-
...props
|
|
397
|
-
}
|
|
398
|
-
);
|
|
399
|
-
}
|
|
400
|
-
function AlertDialogAction({
|
|
401
|
-
className,
|
|
402
|
-
variant = "default",
|
|
403
|
-
size = "default",
|
|
404
|
-
...props
|
|
405
|
-
}) {
|
|
406
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
407
|
-
radixUi.AlertDialog.Action,
|
|
408
|
-
{
|
|
409
|
-
"data-slot": "alert-dialog-action",
|
|
410
|
-
className: cn(className),
|
|
411
|
-
...props
|
|
412
|
-
}
|
|
413
|
-
) });
|
|
414
|
-
}
|
|
415
|
-
function AlertDialogCancel({
|
|
416
|
-
className,
|
|
417
|
-
variant = "outline",
|
|
418
|
-
size = "default",
|
|
419
|
-
...props
|
|
420
|
-
}) {
|
|
421
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Button, { variant, size, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
422
|
-
radixUi.AlertDialog.Cancel,
|
|
423
|
-
{
|
|
424
|
-
"data-slot": "alert-dialog-cancel",
|
|
425
|
-
className: cn(className),
|
|
426
|
-
...props
|
|
427
|
-
}
|
|
428
|
-
) });
|
|
429
|
-
}
|
|
430
|
-
function Avatar({
|
|
431
|
-
className,
|
|
432
|
-
size = "default",
|
|
433
|
-
...props
|
|
434
|
-
}) {
|
|
435
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
436
|
-
radixUi.Avatar.Root,
|
|
437
|
-
{
|
|
438
|
-
"data-slot": "avatar",
|
|
439
|
-
"data-size": size,
|
|
440
|
-
className: cn(
|
|
441
|
-
"group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
442
|
-
className
|
|
443
|
-
),
|
|
444
|
-
...props
|
|
445
|
-
}
|
|
446
|
-
);
|
|
447
|
-
}
|
|
448
|
-
function AvatarImage({
|
|
449
|
-
className,
|
|
450
|
-
...props
|
|
451
|
-
}) {
|
|
452
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
453
|
-
radixUi.Avatar.Image,
|
|
454
|
-
{
|
|
455
|
-
"data-slot": "avatar-image",
|
|
456
|
-
className: cn("aspect-square size-full", className),
|
|
457
|
-
...props
|
|
458
|
-
}
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
|
-
function AvatarFallback({
|
|
462
|
-
className,
|
|
463
|
-
...props
|
|
464
|
-
}) {
|
|
465
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
466
|
-
radixUi.Avatar.Fallback,
|
|
467
|
-
{
|
|
468
|
-
"data-slot": "avatar-fallback",
|
|
469
|
-
className: cn(
|
|
470
|
-
"bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",
|
|
471
|
-
className
|
|
472
|
-
),
|
|
473
|
-
...props
|
|
474
|
-
}
|
|
475
|
-
);
|
|
160
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
161
|
+
"data-slot": "alert-title",
|
|
162
|
+
className: cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className),
|
|
163
|
+
...props
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function AlertDescription({ className, ...props }) {
|
|
167
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
168
|
+
"data-slot": "alert-description",
|
|
169
|
+
className: cn("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed", className),
|
|
170
|
+
...props
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/components/Button.tsx
|
|
175
|
+
const buttonVariants = (0, class_variance_authority.cva)("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
176
|
+
variants: {
|
|
177
|
+
variant: {
|
|
178
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
179
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
|
|
180
|
+
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 border shadow-xs",
|
|
181
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
182
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
183
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
184
|
+
},
|
|
185
|
+
size: {
|
|
186
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
187
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
188
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
189
|
+
xl: "h-11 rounded-md px-8 has-[>svg]:px-5",
|
|
190
|
+
icon: "size-9",
|
|
191
|
+
"icon-xs": "size-6",
|
|
192
|
+
"icon-sm": "size-8",
|
|
193
|
+
"icon-lg": "size-10"
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
defaultVariants: {
|
|
197
|
+
variant: "default",
|
|
198
|
+
size: "default"
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
function Button({ className, variant, size, asChild = false, ...props }) {
|
|
202
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? _radix_ui_react_slot.Slot : "button", {
|
|
203
|
+
"data-slot": "button",
|
|
204
|
+
className: cn(buttonVariants({
|
|
205
|
+
variant,
|
|
206
|
+
size,
|
|
207
|
+
className
|
|
208
|
+
})),
|
|
209
|
+
...props
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/components/AlertDialog.tsx
|
|
214
|
+
function AlertDialog({ ...props }) {
|
|
215
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Root, {
|
|
216
|
+
"data-slot": "alert-dialog",
|
|
217
|
+
...props
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function AlertDialogTrigger({ ...props }) {
|
|
221
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Trigger, {
|
|
222
|
+
"data-slot": "alert-dialog-trigger",
|
|
223
|
+
...props
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
function AlertDialogPortal({ ...props }) {
|
|
227
|
+
const portalContainer = usePortalContainer();
|
|
228
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Portal, {
|
|
229
|
+
"data-slot": "alert-dialog-portal",
|
|
230
|
+
container: portalContainer,
|
|
231
|
+
...props
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
235
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Overlay, {
|
|
236
|
+
"data-slot": "alert-dialog-overlay",
|
|
237
|
+
className: cn("data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className),
|
|
238
|
+
...props
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
function AlertDialogContent({ className, size = "default", ...props }) {
|
|
242
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AlertDialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Content, {
|
|
243
|
+
"data-slot": "alert-dialog-content",
|
|
244
|
+
"data-size": size,
|
|
245
|
+
className: cn("group/alert-dialog-content bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg", className),
|
|
246
|
+
...props
|
|
247
|
+
})] });
|
|
248
|
+
}
|
|
249
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
250
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
251
|
+
"data-slot": "alert-dialog-header",
|
|
252
|
+
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
253
|
+
...props
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
257
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
258
|
+
"data-slot": "alert-dialog-footer",
|
|
259
|
+
className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
260
|
+
...props
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
264
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Title, {
|
|
265
|
+
"data-slot": "alert-dialog-title",
|
|
266
|
+
className: cn("text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
267
|
+
...props
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
271
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Description, {
|
|
272
|
+
"data-slot": "alert-dialog-description",
|
|
273
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
274
|
+
...props
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
function AlertDialogMedia({ className, ...props }) {
|
|
278
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
279
|
+
"data-slot": "alert-dialog-media",
|
|
280
|
+
className: cn("bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8", className),
|
|
281
|
+
...props
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
function AlertDialogAction({ className, variant = "default", size = "default", ...props }) {
|
|
285
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
286
|
+
variant,
|
|
287
|
+
size,
|
|
288
|
+
asChild: true,
|
|
289
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Action, {
|
|
290
|
+
"data-slot": "alert-dialog-action",
|
|
291
|
+
className: cn(className),
|
|
292
|
+
...props
|
|
293
|
+
})
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
function AlertDialogCancel({ className, variant = "outline", size = "default", ...props }) {
|
|
297
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
298
|
+
variant,
|
|
299
|
+
size,
|
|
300
|
+
asChild: true,
|
|
301
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.AlertDialog.Cancel, {
|
|
302
|
+
"data-slot": "alert-dialog-cancel",
|
|
303
|
+
className: cn(className),
|
|
304
|
+
...props
|
|
305
|
+
})
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region src/components/Avatar.tsx
|
|
310
|
+
function Avatar({ className, size = "default", ...props }) {
|
|
311
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Avatar.Root, {
|
|
312
|
+
"data-slot": "avatar",
|
|
313
|
+
"data-size": size,
|
|
314
|
+
className: cn("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6", className),
|
|
315
|
+
...props
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
function AvatarImage({ className, ...props }) {
|
|
319
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Avatar.Image, {
|
|
320
|
+
"data-slot": "avatar-image",
|
|
321
|
+
className: cn("aspect-square size-full", className),
|
|
322
|
+
...props
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
function AvatarFallback({ className, ...props }) {
|
|
326
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Avatar.Fallback, {
|
|
327
|
+
"data-slot": "avatar-fallback",
|
|
328
|
+
className: cn("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs", className),
|
|
329
|
+
...props
|
|
330
|
+
});
|
|
476
331
|
}
|
|
477
332
|
function AvatarBadge({ className, ...props }) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
"bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none",
|
|
484
|
-
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
485
|
-
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
486
|
-
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
487
|
-
className
|
|
488
|
-
),
|
|
489
|
-
...props
|
|
490
|
-
}
|
|
491
|
-
);
|
|
333
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
334
|
+
"data-slot": "avatar-badge",
|
|
335
|
+
className: cn("bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", className),
|
|
336
|
+
...props
|
|
337
|
+
});
|
|
492
338
|
}
|
|
493
339
|
function AvatarGroup({ className, ...props }) {
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
})
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
month: "space-y-4",
|
|
571
|
-
caption: "flex justify-center pt-1 relative items-center",
|
|
572
|
-
caption_label: "text-sm font-medium",
|
|
573
|
-
nav: "space-x-1 flex items-center",
|
|
574
|
-
nav_button: cn(
|
|
575
|
-
buttonVariants({ variant: "ghost" }),
|
|
576
|
-
"h-7 w-7 justify-center bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
577
|
-
),
|
|
578
|
-
nav_button_previous: "absolute left-1",
|
|
579
|
-
nav_button_next: "absolute right-1",
|
|
580
|
-
table: "w-full border-collapse space-y-1",
|
|
581
|
-
head_row: "flex",
|
|
582
|
-
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
583
|
-
row: "flex w-full mt-2",
|
|
584
|
-
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-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
585
|
-
day: cn(
|
|
586
|
-
buttonVariants({ variant: "ghost" }),
|
|
587
|
-
"h-9 w-9 justify-center p-0 font-normal aria-selected:opacity-100"
|
|
588
|
-
),
|
|
589
|
-
day_range_end: "day-range-end",
|
|
590
|
-
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
591
|
-
day_today: "bg-accent text-accent-foreground",
|
|
592
|
-
day_outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
593
|
-
day_disabled: "text-muted-foreground opacity-50",
|
|
594
|
-
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
595
|
-
day_hidden: "invisible",
|
|
596
|
-
...classNames
|
|
597
|
-
},
|
|
598
|
-
components: {
|
|
599
|
-
IconLeft: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
600
|
-
lucideReact.ChevronLeft,
|
|
601
|
-
{
|
|
602
|
-
className: cn("h-4 w-4", iconClassName),
|
|
603
|
-
...iconProps
|
|
604
|
-
}
|
|
605
|
-
),
|
|
606
|
-
IconRight: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
607
|
-
lucideReact.ChevronRight,
|
|
608
|
-
{
|
|
609
|
-
className: cn("h-4 w-4", iconClassName),
|
|
610
|
-
...iconProps
|
|
611
|
-
}
|
|
612
|
-
)
|
|
613
|
-
},
|
|
614
|
-
...props
|
|
615
|
-
}
|
|
616
|
-
);
|
|
340
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
341
|
+
"data-slot": "avatar-group",
|
|
342
|
+
className: cn("group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2 *:data-[slot=avatar]:ring-2", className),
|
|
343
|
+
...props
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
347
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
348
|
+
"data-slot": "avatar-group-count",
|
|
349
|
+
className: cn("bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className),
|
|
350
|
+
...props
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
//#endregion
|
|
354
|
+
//#region src/components/Badge.tsx
|
|
355
|
+
const badgeVariants = (0, class_variance_authority.cva)("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3", {
|
|
356
|
+
variants: { variant: {
|
|
357
|
+
default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
358
|
+
secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
359
|
+
destructive: "bg-destructive focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90 text-white",
|
|
360
|
+
outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
361
|
+
ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
|
|
362
|
+
link: "text-primary underline-offset-4 [a&]:hover:underline"
|
|
363
|
+
} },
|
|
364
|
+
defaultVariants: { variant: "default" }
|
|
365
|
+
});
|
|
366
|
+
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
367
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? radix_ui.Slot.Root : "span", {
|
|
368
|
+
"data-slot": "badge",
|
|
369
|
+
"data-variant": variant,
|
|
370
|
+
className: cn(badgeVariants({ variant }), className),
|
|
371
|
+
...props
|
|
372
|
+
});
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region src/components/Calendar.tsx
|
|
376
|
+
function Calendar({ className, classNames, showOutsideDays = true, ...props }) {
|
|
377
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_day_picker.DayPicker, {
|
|
378
|
+
showOutsideDays,
|
|
379
|
+
className: cn("p-3", className),
|
|
380
|
+
classNames: {
|
|
381
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
382
|
+
month: "space-y-4",
|
|
383
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
384
|
+
caption_label: "text-sm font-medium",
|
|
385
|
+
nav: "space-x-1 flex items-center",
|
|
386
|
+
nav_button: cn(buttonVariants({ variant: "ghost" }), "h-7 w-7 justify-center bg-transparent p-0 opacity-50 hover:opacity-100"),
|
|
387
|
+
nav_button_previous: "absolute left-1",
|
|
388
|
+
nav_button_next: "absolute right-1",
|
|
389
|
+
table: "w-full border-collapse space-y-1",
|
|
390
|
+
head_row: "flex",
|
|
391
|
+
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
392
|
+
row: "flex w-full mt-2",
|
|
393
|
+
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-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
394
|
+
day: cn(buttonVariants({ variant: "ghost" }), "h-9 w-9 justify-center p-0 font-normal aria-selected:opacity-100"),
|
|
395
|
+
day_range_end: "day-range-end",
|
|
396
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
397
|
+
day_today: "bg-accent text-accent-foreground",
|
|
398
|
+
day_outside: "day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",
|
|
399
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
400
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
401
|
+
day_hidden: "invisible",
|
|
402
|
+
...classNames
|
|
403
|
+
},
|
|
404
|
+
components: {
|
|
405
|
+
IconLeft: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeft, {
|
|
406
|
+
className: cn("h-4 w-4", iconClassName),
|
|
407
|
+
...iconProps
|
|
408
|
+
}),
|
|
409
|
+
IconRight: ({ className: iconClassName, ...iconProps }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, {
|
|
410
|
+
className: cn("h-4 w-4", iconClassName),
|
|
411
|
+
...iconProps
|
|
412
|
+
})
|
|
413
|
+
},
|
|
414
|
+
...props
|
|
415
|
+
});
|
|
617
416
|
}
|
|
618
417
|
Calendar.displayName = "Calendar";
|
|
418
|
+
//#endregion
|
|
419
|
+
//#region src/components/Card.tsx
|
|
619
420
|
function Card({ className, ...props }) {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
"bg-card text-card-foreground flex h-full flex-col gap-6 rounded-xl border py-6 shadow-sm",
|
|
626
|
-
className
|
|
627
|
-
),
|
|
628
|
-
...props
|
|
629
|
-
}
|
|
630
|
-
);
|
|
421
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
422
|
+
"data-slot": "card",
|
|
423
|
+
className: cn("bg-card text-card-foreground flex h-full flex-col gap-6 rounded-xl border py-6 shadow-sm", className),
|
|
424
|
+
...props
|
|
425
|
+
});
|
|
631
426
|
}
|
|
632
427
|
function CardHeader({ className, ...props }) {
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
|
|
639
|
-
className
|
|
640
|
-
),
|
|
641
|
-
...props
|
|
642
|
-
}
|
|
643
|
-
);
|
|
428
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
429
|
+
"data-slot": "card-header",
|
|
430
|
+
className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className),
|
|
431
|
+
...props
|
|
432
|
+
});
|
|
644
433
|
}
|
|
645
434
|
function CardTitle({ className, ...props }) {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
...props
|
|
652
|
-
}
|
|
653
|
-
);
|
|
435
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
436
|
+
"data-slot": "card-title",
|
|
437
|
+
className: cn("leading-none font-semibold", className),
|
|
438
|
+
...props
|
|
439
|
+
});
|
|
654
440
|
}
|
|
655
441
|
function CardDescription({ className, ...props }) {
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
...props
|
|
662
|
-
}
|
|
663
|
-
);
|
|
442
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
443
|
+
"data-slot": "card-description",
|
|
444
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
445
|
+
...props
|
|
446
|
+
});
|
|
664
447
|
}
|
|
665
448
|
function CardAction({ className, ...props }) {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
672
|
-
className
|
|
673
|
-
),
|
|
674
|
-
...props
|
|
675
|
-
}
|
|
676
|
-
);
|
|
449
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
450
|
+
"data-slot": "card-action",
|
|
451
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
452
|
+
...props
|
|
453
|
+
});
|
|
677
454
|
}
|
|
678
455
|
function CardContent({ className, ...props }) {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
...props
|
|
685
|
-
}
|
|
686
|
-
);
|
|
456
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
457
|
+
"data-slot": "card-content",
|
|
458
|
+
className: cn("px-6", className),
|
|
459
|
+
...props
|
|
460
|
+
});
|
|
687
461
|
}
|
|
688
462
|
function CardFooter({ className, ...props }) {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
463
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
464
|
+
"data-slot": "card-footer",
|
|
465
|
+
className: cn("flex items-center px-6 [.border-t]:pt-6", className),
|
|
466
|
+
...props
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region src/components/Chart.tsx
|
|
471
|
+
const THEMES = {
|
|
472
|
+
light: "",
|
|
473
|
+
dark: ".dark"
|
|
474
|
+
};
|
|
475
|
+
const ChartContext = react.createContext(null);
|
|
700
476
|
function useChart() {
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
children: [
|
|
727
|
-
/* @__PURE__ */ jsxRuntime.jsx(ChartStyle, { id: chartId, config }),
|
|
728
|
-
/* @__PURE__ */ jsxRuntime.jsx(RechartsPrimitive__namespace.ResponsiveContainer, { children })
|
|
729
|
-
]
|
|
730
|
-
}
|
|
731
|
-
) });
|
|
732
|
-
}
|
|
733
|
-
var ChartStyle = ({ id, config }) => {
|
|
734
|
-
const colorConfig = Object.entries(config).filter(
|
|
735
|
-
([, cfg]) => cfg.theme || cfg.color
|
|
736
|
-
);
|
|
737
|
-
if (!colorConfig.length) {
|
|
738
|
-
return null;
|
|
739
|
-
}
|
|
740
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
741
|
-
"style",
|
|
742
|
-
{
|
|
743
|
-
dangerouslySetInnerHTML: {
|
|
744
|
-
__html: Object.entries(THEMES).map(
|
|
745
|
-
([theme, prefix]) => `
|
|
477
|
+
const context = react.useContext(ChartContext);
|
|
478
|
+
if (!context) throw new Error("useChart must be used within a <ChartContainer />");
|
|
479
|
+
return context;
|
|
480
|
+
}
|
|
481
|
+
function ChartContainer({ id, className, children, config, ...props }) {
|
|
482
|
+
const uniqueId = react.useId();
|
|
483
|
+
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
484
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChartContext.Provider, {
|
|
485
|
+
value: { config },
|
|
486
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
487
|
+
"data-slot": "chart",
|
|
488
|
+
"data-chart": chartId,
|
|
489
|
+
className: cn("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
|
|
490
|
+
...props,
|
|
491
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChartStyle, {
|
|
492
|
+
id: chartId,
|
|
493
|
+
config
|
|
494
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ResponsiveContainer, { children })]
|
|
495
|
+
})
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
const ChartStyle = ({ id, config }) => {
|
|
499
|
+
const colorConfig = Object.entries(config).filter(([, cfg]) => cfg.theme || cfg.color);
|
|
500
|
+
if (!colorConfig.length) return null;
|
|
501
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: Object.entries(THEMES).map(([theme, prefix]) => `
|
|
746
502
|
${prefix} [data-chart=${id}] {
|
|
747
503
|
${colorConfig.map(([key, itemConfig]) => {
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
}
|
|
752
|
-
`
|
|
753
|
-
).join("\n")
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
);
|
|
504
|
+
const color = itemConfig.theme?.[theme] || itemConfig.color;
|
|
505
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
506
|
+
}).join("\n")}
|
|
507
|
+
}
|
|
508
|
+
`).join("\n") } });
|
|
757
509
|
};
|
|
758
|
-
|
|
759
|
-
function ChartTooltipContent({
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
),
|
|
842
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
843
|
-
"div",
|
|
844
|
-
{
|
|
845
|
-
className: cn(
|
|
846
|
-
"flex flex-1 justify-between leading-none",
|
|
847
|
-
nestLabel ? "items-end" : "items-center"
|
|
848
|
-
),
|
|
849
|
-
children: [
|
|
850
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-1.5", children: [
|
|
851
|
-
nestLabel ? tooltipLabel : null,
|
|
852
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: itemConfig?.label || item.name })
|
|
853
|
-
] }),
|
|
854
|
-
item.value && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground font-mono font-medium tabular-nums", children: item.value.toLocaleString() })
|
|
855
|
-
]
|
|
856
|
-
}
|
|
857
|
-
)
|
|
858
|
-
] })
|
|
859
|
-
},
|
|
860
|
-
item.dataKey
|
|
861
|
-
);
|
|
862
|
-
}) })
|
|
863
|
-
]
|
|
864
|
-
}
|
|
865
|
-
);
|
|
866
|
-
}
|
|
867
|
-
var ChartLegend = RechartsPrimitive__namespace.Legend;
|
|
868
|
-
function ChartLegendContent({
|
|
869
|
-
className,
|
|
870
|
-
hideIcon = false,
|
|
871
|
-
payload,
|
|
872
|
-
verticalAlign = "bottom",
|
|
873
|
-
nameKey
|
|
874
|
-
}) {
|
|
875
|
-
const { config } = useChart();
|
|
876
|
-
if (!payload?.length) {
|
|
877
|
-
return null;
|
|
878
|
-
}
|
|
879
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
880
|
-
"div",
|
|
881
|
-
{
|
|
882
|
-
className: cn(
|
|
883
|
-
"flex items-center justify-center gap-4",
|
|
884
|
-
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
885
|
-
className
|
|
886
|
-
),
|
|
887
|
-
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
888
|
-
const key = `${nameKey || item.dataKey || "value"}`;
|
|
889
|
-
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
890
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
891
|
-
"div",
|
|
892
|
-
{
|
|
893
|
-
className: cn(
|
|
894
|
-
"[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"
|
|
895
|
-
),
|
|
896
|
-
children: [
|
|
897
|
-
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsxRuntime.jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
898
|
-
"div",
|
|
899
|
-
{
|
|
900
|
-
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
901
|
-
style: { backgroundColor: item.color }
|
|
902
|
-
}
|
|
903
|
-
),
|
|
904
|
-
itemConfig?.label
|
|
905
|
-
]
|
|
906
|
-
},
|
|
907
|
-
item.value
|
|
908
|
-
);
|
|
909
|
-
})
|
|
910
|
-
}
|
|
911
|
-
);
|
|
510
|
+
const ChartTooltip = recharts.Tooltip;
|
|
511
|
+
function ChartTooltipContent({ active, payload, className, indicator = "dot", hideLabel = false, hideIndicator = false, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey }) {
|
|
512
|
+
const { config } = useChart();
|
|
513
|
+
const tooltipLabel = react.useMemo(() => {
|
|
514
|
+
if (hideLabel || !payload?.length) return null;
|
|
515
|
+
const [item] = payload;
|
|
516
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, `${labelKey || item?.dataKey || item?.name || "value"}`);
|
|
517
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label || label : itemConfig?.label;
|
|
518
|
+
if (labelFormatter) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
519
|
+
className: cn("font-medium", labelClassName),
|
|
520
|
+
children: labelFormatter(value, payload)
|
|
521
|
+
});
|
|
522
|
+
if (!value) return null;
|
|
523
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
524
|
+
className: cn("font-medium", labelClassName),
|
|
525
|
+
children: value
|
|
526
|
+
});
|
|
527
|
+
}, [
|
|
528
|
+
label,
|
|
529
|
+
labelFormatter,
|
|
530
|
+
payload,
|
|
531
|
+
hideLabel,
|
|
532
|
+
labelClassName,
|
|
533
|
+
config,
|
|
534
|
+
labelKey
|
|
535
|
+
]);
|
|
536
|
+
if (!active || !payload?.length) return null;
|
|
537
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
538
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
539
|
+
className: cn("border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl", className),
|
|
540
|
+
children: [!nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
541
|
+
className: "grid gap-1.5",
|
|
542
|
+
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
543
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey || item.name || item.dataKey || "value"}`);
|
|
544
|
+
const indicatorColor = color || item.payload.fill || item.color;
|
|
545
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
546
|
+
className: cn("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5", indicator === "dot" && "items-center"),
|
|
547
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [itemConfig?.icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
548
|
+
className: cn("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)", {
|
|
549
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
550
|
+
"w-1": indicator === "line",
|
|
551
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
552
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
553
|
+
}),
|
|
554
|
+
style: {
|
|
555
|
+
"--color-bg": indicatorColor,
|
|
556
|
+
"--color-border": indicatorColor
|
|
557
|
+
}
|
|
558
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
559
|
+
className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
|
|
560
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
561
|
+
className: "grid gap-1.5",
|
|
562
|
+
children: [nestLabel ? tooltipLabel : null, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
563
|
+
className: "text-muted-foreground",
|
|
564
|
+
children: itemConfig?.label || item.name
|
|
565
|
+
})]
|
|
566
|
+
}), item.value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
567
|
+
className: "text-foreground font-mono font-medium tabular-nums",
|
|
568
|
+
children: item.value.toLocaleString()
|
|
569
|
+
})]
|
|
570
|
+
})] })
|
|
571
|
+
}, item.dataKey);
|
|
572
|
+
})
|
|
573
|
+
})]
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
const ChartLegend = recharts.Legend;
|
|
577
|
+
function ChartLegendContent({ className, hideIcon = false, payload, verticalAlign = "bottom", nameKey }) {
|
|
578
|
+
const { config } = useChart();
|
|
579
|
+
if (!payload?.length) return null;
|
|
580
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
581
|
+
className: cn("flex items-center justify-center gap-4", verticalAlign === "top" ? "pb-3" : "pt-3", className),
|
|
582
|
+
children: payload.filter((item) => item.type !== "none").map((item) => {
|
|
583
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, `${nameKey || item.dataKey || "value"}`);
|
|
584
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
585
|
+
className: cn("[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3"),
|
|
586
|
+
children: [itemConfig?.icon && !hideIcon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(itemConfig.icon, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
587
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
588
|
+
style: { backgroundColor: item.color }
|
|
589
|
+
}), itemConfig?.label]
|
|
590
|
+
}, item.value);
|
|
591
|
+
})
|
|
592
|
+
});
|
|
912
593
|
}
|
|
913
594
|
function getPayloadConfigFromPayload(config, payload, key) {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
})
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
}) {
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}) {
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
"data-slot": "popover-content",
|
|
974
|
-
align,
|
|
975
|
-
sideOffset,
|
|
976
|
-
className: cn(
|
|
977
|
-
"cn-popover-content z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden",
|
|
978
|
-
className
|
|
979
|
-
),
|
|
980
|
-
...props
|
|
981
|
-
}
|
|
982
|
-
) });
|
|
983
|
-
}
|
|
984
|
-
function PopoverAnchor({
|
|
985
|
-
...props
|
|
986
|
-
}) {
|
|
987
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
595
|
+
if (typeof payload !== "object" || payload === null) return;
|
|
596
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
597
|
+
let configLabelKey = key;
|
|
598
|
+
if (key in payload && typeof payload[key] === "string") configLabelKey = payload[key];
|
|
599
|
+
else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") configLabelKey = payloadPayload[key];
|
|
600
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/components/Collapsible.tsx
|
|
604
|
+
function Collapsible({ ...props }) {
|
|
605
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_collapsible.Root, {
|
|
606
|
+
"data-slot": "collapsible",
|
|
607
|
+
...props
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function CollapsibleTrigger({ ...props }) {
|
|
611
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_collapsible.CollapsibleTrigger, {
|
|
612
|
+
"data-slot": "collapsible-trigger",
|
|
613
|
+
...props
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
function CollapsibleContent({ ...props }) {
|
|
617
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_collapsible.CollapsibleContent, {
|
|
618
|
+
"data-slot": "collapsible-content",
|
|
619
|
+
...props
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
//#endregion
|
|
623
|
+
//#region src/components/Popover.tsx
|
|
624
|
+
function Popover({ ...props }) {
|
|
625
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Root, {
|
|
626
|
+
"data-slot": "popover",
|
|
627
|
+
...props
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
function PopoverTrigger({ ...props }) {
|
|
631
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Trigger, {
|
|
632
|
+
"data-slot": "popover-trigger",
|
|
633
|
+
...props
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
function PopoverContent({ className, align = "center", sideOffset = 4, ...props }) {
|
|
637
|
+
const portalContainer = usePortalContainer();
|
|
638
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Portal, {
|
|
639
|
+
container: portalContainer,
|
|
640
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Content, {
|
|
641
|
+
"data-slot": "popover-content",
|
|
642
|
+
align,
|
|
643
|
+
sideOffset,
|
|
644
|
+
className: cn("cn-popover-content z-50 w-72 origin-(--radix-popover-content-transform-origin) outline-hidden", className),
|
|
645
|
+
...props
|
|
646
|
+
})
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
function PopoverAnchor({ ...props }) {
|
|
650
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_popover.Anchor, {
|
|
651
|
+
"data-slot": "popover-anchor",
|
|
652
|
+
...props
|
|
653
|
+
});
|
|
988
654
|
}
|
|
989
655
|
function PopoverHeader({ className, ...props }) {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
...props
|
|
996
|
-
}
|
|
997
|
-
);
|
|
656
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
657
|
+
"data-slot": "popover-header",
|
|
658
|
+
className: cn("cn-popover-header", className),
|
|
659
|
+
...props
|
|
660
|
+
});
|
|
998
661
|
}
|
|
999
662
|
function PopoverTitle({ className, ...props }) {
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
}
|
|
1020
|
-
);
|
|
1021
|
-
}
|
|
1022
|
-
var defaultFormatDate = (date) => new Intl.DateTimeFormat(void 0, {
|
|
1023
|
-
month: "long",
|
|
1024
|
-
day: "numeric",
|
|
1025
|
-
year: "numeric"
|
|
663
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
664
|
+
"data-slot": "popover-title",
|
|
665
|
+
className: cn("cn-popover-title", className),
|
|
666
|
+
...props
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
function PopoverDescription({ className, ...props }) {
|
|
670
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
671
|
+
"data-slot": "popover-description",
|
|
672
|
+
className: cn("cn-popover-description", className),
|
|
673
|
+
...props
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
//#endregion
|
|
677
|
+
//#region src/components/DatePicker.tsx
|
|
678
|
+
const defaultFormatDate = (date) => new Intl.DateTimeFormat(void 0, {
|
|
679
|
+
month: "long",
|
|
680
|
+
day: "numeric",
|
|
681
|
+
year: "numeric"
|
|
1026
682
|
}).format(date);
|
|
1027
|
-
function DatePicker({
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
})
|
|
1078
|
-
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
}) {
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
),
|
|
1110
|
-
...props
|
|
1111
|
-
}
|
|
1112
|
-
);
|
|
1113
|
-
}
|
|
1114
|
-
function DialogContent({
|
|
1115
|
-
className,
|
|
1116
|
-
children,
|
|
1117
|
-
showCloseButton = true,
|
|
1118
|
-
overlayClassName,
|
|
1119
|
-
...props
|
|
1120
|
-
}) {
|
|
1121
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
1122
|
-
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, { className: overlayClassName }),
|
|
1123
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1124
|
-
SheetPrimitive__namespace.Content,
|
|
1125
|
-
{
|
|
1126
|
-
"data-slot": "dialog-content",
|
|
1127
|
-
className: cn(
|
|
1128
|
-
"bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
1129
|
-
className
|
|
1130
|
-
),
|
|
1131
|
-
...props,
|
|
1132
|
-
children: [
|
|
1133
|
-
children,
|
|
1134
|
-
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1135
|
-
SheetPrimitive__namespace.Close,
|
|
1136
|
-
{
|
|
1137
|
-
"data-slot": "dialog-close",
|
|
1138
|
-
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1139
|
-
children: [
|
|
1140
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}),
|
|
1141
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1142
|
-
]
|
|
1143
|
-
}
|
|
1144
|
-
)
|
|
1145
|
-
]
|
|
1146
|
-
}
|
|
1147
|
-
)
|
|
1148
|
-
] });
|
|
683
|
+
function DatePicker({ value, onChange, placeholder = "Pick a date", formatDate = defaultFormatDate, disabled, className, calendarProps }) {
|
|
684
|
+
const [open, setOpen] = react.useState(false);
|
|
685
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Popover, {
|
|
686
|
+
open,
|
|
687
|
+
onOpenChange: setOpen,
|
|
688
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverTrigger, {
|
|
689
|
+
asChild: true,
|
|
690
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Button, {
|
|
691
|
+
"data-slot": "date-picker",
|
|
692
|
+
variant: "outline",
|
|
693
|
+
disabled,
|
|
694
|
+
className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
|
|
695
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CalendarIcon, { className: "mr-2 size-4" }), value ? formatDate(value) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: placeholder })]
|
|
696
|
+
})
|
|
697
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopoverContent, {
|
|
698
|
+
className: "w-auto p-0",
|
|
699
|
+
align: "start",
|
|
700
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Calendar, {
|
|
701
|
+
mode: "single",
|
|
702
|
+
selected: value,
|
|
703
|
+
onSelect: (date) => {
|
|
704
|
+
onChange?.(date);
|
|
705
|
+
setOpen(false);
|
|
706
|
+
},
|
|
707
|
+
initialFocus: true,
|
|
708
|
+
...calendarProps
|
|
709
|
+
})
|
|
710
|
+
})]
|
|
711
|
+
});
|
|
712
|
+
}
|
|
713
|
+
//#endregion
|
|
714
|
+
//#region src/components/Dialog.tsx
|
|
715
|
+
function Dialog({ ...props }) {
|
|
716
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Root, {
|
|
717
|
+
"data-slot": "dialog",
|
|
718
|
+
...props
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
function DialogTrigger({ ...props }) {
|
|
722
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Trigger, {
|
|
723
|
+
"data-slot": "dialog-trigger",
|
|
724
|
+
...props
|
|
725
|
+
});
|
|
726
|
+
}
|
|
727
|
+
function DialogPortal({ ...props }) {
|
|
728
|
+
const portalContainer = usePortalContainer();
|
|
729
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Portal, {
|
|
730
|
+
"data-slot": "dialog-portal",
|
|
731
|
+
container: portalContainer,
|
|
732
|
+
...props
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
function DialogClose({ ...props }) {
|
|
736
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Close, {
|
|
737
|
+
"data-slot": "dialog-close",
|
|
738
|
+
...props
|
|
739
|
+
});
|
|
740
|
+
}
|
|
741
|
+
function DialogOverlay({ className, ...props }) {
|
|
742
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, {
|
|
743
|
+
"data-slot": "dialog-overlay",
|
|
744
|
+
className: cn("data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-gray-900/70 backdrop-blur-sm", className),
|
|
745
|
+
...props
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
function DialogContent({ className, children, showCloseButton = true, overlayClassName, ...props }) {
|
|
749
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogPortal, {
|
|
750
|
+
"data-slot": "dialog-portal",
|
|
751
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogOverlay, { className: overlayClassName }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Content, {
|
|
752
|
+
"data-slot": "dialog-content",
|
|
753
|
+
className: cn("bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-6 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
|
|
754
|
+
...props,
|
|
755
|
+
children: [children, showCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Close, {
|
|
756
|
+
"data-slot": "dialog-close",
|
|
757
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
758
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
759
|
+
className: "sr-only",
|
|
760
|
+
children: "Close"
|
|
761
|
+
})]
|
|
762
|
+
})]
|
|
763
|
+
})]
|
|
764
|
+
});
|
|
1149
765
|
}
|
|
1150
766
|
function DialogHeader({ className, ...props }) {
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
...props
|
|
1157
|
-
}
|
|
1158
|
-
);
|
|
767
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
768
|
+
"data-slot": "dialog-header",
|
|
769
|
+
className: cn("flex flex-col gap-2 text-center sm:text-left", className),
|
|
770
|
+
...props
|
|
771
|
+
});
|
|
1159
772
|
}
|
|
1160
773
|
function DialogFooter({ className, ...props }) {
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
}) {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
}) {
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
})
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
}
|
|
1239
|
-
function
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
}
|
|
1264
|
-
function
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
className,
|
|
1319
|
-
inset,
|
|
1320
|
-
...props
|
|
1321
|
-
}) {
|
|
1322
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1323
|
-
DropdownMenuPrimitive__namespace.Label,
|
|
1324
|
-
{
|
|
1325
|
-
"data-slot": "dropdown-menu-label",
|
|
1326
|
-
"data-inset": inset,
|
|
1327
|
-
className: cn(
|
|
1328
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
1329
|
-
className
|
|
1330
|
-
),
|
|
1331
|
-
...props
|
|
1332
|
-
}
|
|
1333
|
-
);
|
|
1334
|
-
}
|
|
1335
|
-
function DropdownMenuSeparator({
|
|
1336
|
-
className,
|
|
1337
|
-
...props
|
|
1338
|
-
}) {
|
|
1339
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1340
|
-
DropdownMenuPrimitive__namespace.Separator,
|
|
1341
|
-
{
|
|
1342
|
-
"data-slot": "dropdown-menu-separator",
|
|
1343
|
-
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
1344
|
-
...props
|
|
1345
|
-
}
|
|
1346
|
-
);
|
|
1347
|
-
}
|
|
1348
|
-
function DropdownMenuShortcut({
|
|
1349
|
-
className,
|
|
1350
|
-
...props
|
|
1351
|
-
}) {
|
|
1352
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1353
|
-
"span",
|
|
1354
|
-
{
|
|
1355
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
1356
|
-
className: cn(
|
|
1357
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
1358
|
-
className
|
|
1359
|
-
),
|
|
1360
|
-
...props
|
|
1361
|
-
}
|
|
1362
|
-
);
|
|
1363
|
-
}
|
|
1364
|
-
function DropdownMenuSub({
|
|
1365
|
-
...props
|
|
1366
|
-
}) {
|
|
1367
|
-
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1368
|
-
}
|
|
1369
|
-
function DropdownMenuSubTrigger({
|
|
1370
|
-
className,
|
|
1371
|
-
inset,
|
|
1372
|
-
children,
|
|
1373
|
-
...props
|
|
1374
|
-
}) {
|
|
1375
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1376
|
-
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
1377
|
-
{
|
|
1378
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
1379
|
-
"data-inset": inset,
|
|
1380
|
-
className: cn(
|
|
1381
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1382
|
-
className
|
|
1383
|
-
),
|
|
1384
|
-
...props,
|
|
1385
|
-
children: [
|
|
1386
|
-
children,
|
|
1387
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "ml-auto size-4" })
|
|
1388
|
-
]
|
|
1389
|
-
}
|
|
1390
|
-
);
|
|
1391
|
-
}
|
|
1392
|
-
function DropdownMenuSubContent({
|
|
1393
|
-
className,
|
|
1394
|
-
...props
|
|
1395
|
-
}) {
|
|
1396
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1397
|
-
DropdownMenuPrimitive__namespace.SubContent,
|
|
1398
|
-
{
|
|
1399
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
1400
|
-
className: cn(
|
|
1401
|
-
"bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
1402
|
-
className
|
|
1403
|
-
),
|
|
1404
|
-
...props
|
|
1405
|
-
}
|
|
1406
|
-
);
|
|
1407
|
-
}
|
|
1408
|
-
function Label2({
|
|
1409
|
-
className,
|
|
1410
|
-
...props
|
|
1411
|
-
}) {
|
|
1412
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1413
|
-
LabelPrimitive__namespace.Root,
|
|
1414
|
-
{
|
|
1415
|
-
"data-slot": "label",
|
|
1416
|
-
className: cn(
|
|
1417
|
-
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
1418
|
-
className
|
|
1419
|
-
),
|
|
1420
|
-
...props
|
|
1421
|
-
}
|
|
1422
|
-
);
|
|
1423
|
-
}
|
|
1424
|
-
var Form = reactHookForm.FormProvider;
|
|
1425
|
-
var FormFieldContext = React15__namespace.createContext(
|
|
1426
|
-
{}
|
|
1427
|
-
);
|
|
1428
|
-
var FormField = ({
|
|
1429
|
-
...props
|
|
1430
|
-
}) => {
|
|
1431
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
|
|
774
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
775
|
+
"data-slot": "dialog-footer",
|
|
776
|
+
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
777
|
+
...props
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
function DialogTitle({ className, ...props }) {
|
|
781
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Title, {
|
|
782
|
+
"data-slot": "dialog-title",
|
|
783
|
+
className: cn("text-lg leading-none font-semibold", className),
|
|
784
|
+
...props
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
function DialogDescription({ className, ...props }) {
|
|
788
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, {
|
|
789
|
+
"data-slot": "dialog-description",
|
|
790
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
791
|
+
...props
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
//#endregion
|
|
795
|
+
//#region src/components/DropdownMenu.tsx
|
|
796
|
+
function DropdownMenu({ ...props }) {
|
|
797
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Root, {
|
|
798
|
+
"data-slot": "dropdown-menu",
|
|
799
|
+
...props
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
function DropdownMenuPortal({ ...props }) {
|
|
803
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Portal, {
|
|
804
|
+
"data-slot": "dropdown-menu-portal",
|
|
805
|
+
...props
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
809
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Trigger, {
|
|
810
|
+
"data-slot": "dropdown-menu-trigger",
|
|
811
|
+
...props
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
function DropdownMenuContent({ className, sideOffset = 4, ...props }) {
|
|
815
|
+
const portalContainer = usePortalContainer();
|
|
816
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Portal, {
|
|
817
|
+
container: portalContainer,
|
|
818
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Content, {
|
|
819
|
+
"data-slot": "dropdown-menu-content",
|
|
820
|
+
sideOffset,
|
|
821
|
+
className: cn("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md", className),
|
|
822
|
+
...props
|
|
823
|
+
})
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
function DropdownMenuGroup({ ...props }) {
|
|
827
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Group, {
|
|
828
|
+
"data-slot": "dropdown-menu-group",
|
|
829
|
+
...props
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
833
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Item, {
|
|
834
|
+
"data-slot": "dropdown-menu-item",
|
|
835
|
+
"data-inset": inset,
|
|
836
|
+
"data-variant": variant,
|
|
837
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
838
|
+
...props
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
function DropdownMenuCheckboxItem({ className, children, ...props }) {
|
|
842
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.CheckboxItem, {
|
|
843
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
844
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
845
|
+
...props,
|
|
846
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
847
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
848
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { className: "size-4" }) })
|
|
849
|
+
}), children]
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
853
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.RadioGroup, {
|
|
854
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
855
|
+
...props
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
859
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.RadioItem, {
|
|
860
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
861
|
+
className: cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
862
|
+
...props,
|
|
863
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
864
|
+
className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",
|
|
865
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Circle, { className: "size-2 fill-current" }) })
|
|
866
|
+
}), children]
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
870
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Label, {
|
|
871
|
+
"data-slot": "dropdown-menu-label",
|
|
872
|
+
"data-inset": inset,
|
|
873
|
+
className: cn("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8", className),
|
|
874
|
+
...props
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
878
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Separator, {
|
|
879
|
+
"data-slot": "dropdown-menu-separator",
|
|
880
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
881
|
+
...props
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
885
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
886
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
887
|
+
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
888
|
+
...props
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
function DropdownMenuSub({ ...props }) {
|
|
892
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.Sub, {
|
|
893
|
+
"data-slot": "dropdown-menu-sub",
|
|
894
|
+
...props
|
|
895
|
+
});
|
|
896
|
+
}
|
|
897
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
898
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dropdown_menu.SubTrigger, {
|
|
899
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
900
|
+
"data-inset": inset,
|
|
901
|
+
className: cn("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
902
|
+
...props,
|
|
903
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRight, { className: "ml-auto size-4" })]
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
907
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dropdown_menu.SubContent, {
|
|
908
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
909
|
+
className: cn("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg", className),
|
|
910
|
+
...props
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/components/Label.tsx
|
|
915
|
+
function Label({ className, ...props }) {
|
|
916
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_label.Root, {
|
|
917
|
+
"data-slot": "label",
|
|
918
|
+
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
919
|
+
...props
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
//#endregion
|
|
923
|
+
//#region src/components/Form.tsx
|
|
924
|
+
const Form = react_hook_form.FormProvider;
|
|
925
|
+
const FormFieldContext = react.createContext({});
|
|
926
|
+
const FormField = ({ ...props }) => {
|
|
927
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FormFieldContext.Provider, {
|
|
928
|
+
value: { name: props.name },
|
|
929
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_hook_form.Controller, { ...props })
|
|
930
|
+
});
|
|
1432
931
|
};
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
formDescriptionId: `${id}-form-item-description`,
|
|
1451
|
-
formMessageId: `${id}-form-item-message`,
|
|
1452
|
-
...fieldState
|
|
1453
|
-
};
|
|
932
|
+
const useFormField = () => {
|
|
933
|
+
const fieldContext = react.useContext(FormFieldContext);
|
|
934
|
+
const itemContext = react.useContext(FormItemContext);
|
|
935
|
+
const { getFieldState } = (0, react_hook_form.useFormContext)();
|
|
936
|
+
const formState = (0, react_hook_form.useFormState)({ name: fieldContext.name });
|
|
937
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
938
|
+
if (!fieldContext.name) throw new Error("useFormField should be used within <FormField>");
|
|
939
|
+
const { id } = itemContext;
|
|
940
|
+
if (!id) throw new Error("useFormField should be used within <FormItem>");
|
|
941
|
+
return {
|
|
942
|
+
id,
|
|
943
|
+
name: fieldContext.name,
|
|
944
|
+
formItemId: `${id}-form-item`,
|
|
945
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
946
|
+
formMessageId: `${id}-form-item-message`,
|
|
947
|
+
...fieldState
|
|
948
|
+
};
|
|
1454
949
|
};
|
|
1455
|
-
|
|
1456
|
-
{}
|
|
1457
|
-
);
|
|
950
|
+
const FormItemContext = react.createContext({});
|
|
1458
951
|
function FormItem({ className, ...props }) {
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}
|
|
1469
|
-
function FormLabel({
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
"data-error": !!error,
|
|
1479
|
-
className: cn("data-[error=true]:text-destructive", className),
|
|
1480
|
-
htmlFor: formItemId,
|
|
1481
|
-
...props
|
|
1482
|
-
}
|
|
1483
|
-
);
|
|
952
|
+
const id = react.useId();
|
|
953
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FormItemContext.Provider, {
|
|
954
|
+
value: { id },
|
|
955
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
956
|
+
"data-slot": "form-item",
|
|
957
|
+
className: cn("grid gap-2", className),
|
|
958
|
+
...props
|
|
959
|
+
})
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
function FormLabel({ className, ...props }) {
|
|
963
|
+
const { error, formItemId } = useFormField();
|
|
964
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label, {
|
|
965
|
+
"data-slot": "form-label",
|
|
966
|
+
"data-error": !!error,
|
|
967
|
+
className: cn("data-[error=true]:text-destructive", className),
|
|
968
|
+
htmlFor: formItemId,
|
|
969
|
+
...props
|
|
970
|
+
});
|
|
1484
971
|
}
|
|
1485
972
|
function FormControl({ ...props }) {
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
...props
|
|
1495
|
-
}
|
|
1496
|
-
);
|
|
973
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
974
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.Slot.Root, {
|
|
975
|
+
"data-slot": "form-control",
|
|
976
|
+
id: formItemId,
|
|
977
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
978
|
+
"aria-invalid": !!error,
|
|
979
|
+
...props
|
|
980
|
+
});
|
|
1497
981
|
}
|
|
1498
982
|
function FormDescription({ className, ...props }) {
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
...props
|
|
1507
|
-
}
|
|
1508
|
-
);
|
|
983
|
+
const { formDescriptionId } = useFormField();
|
|
984
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
985
|
+
"data-slot": "form-description",
|
|
986
|
+
id: formDescriptionId,
|
|
987
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
988
|
+
...props
|
|
989
|
+
});
|
|
1509
990
|
}
|
|
1510
991
|
function FormMessage({ className, ...props }) {
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
)
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
})
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
"data-slot": "toggle",
|
|
1585
|
-
className: cn(toggleVariants({ variant, size, className })),
|
|
1586
|
-
...props
|
|
1587
|
-
}
|
|
1588
|
-
);
|
|
1589
|
-
}
|
|
1590
|
-
function IconToggle({
|
|
1591
|
-
icon: Icon2,
|
|
1592
|
-
variant = "ghost",
|
|
1593
|
-
size = "icon",
|
|
1594
|
-
...props
|
|
1595
|
-
}) {
|
|
1596
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Toggle, { variant, size, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, {}) });
|
|
1597
|
-
}
|
|
992
|
+
const { error, formMessageId } = useFormField();
|
|
993
|
+
const body = error ? String(error?.message ?? "") : props.children;
|
|
994
|
+
if (!body) return null;
|
|
995
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
996
|
+
"data-slot": "form-message",
|
|
997
|
+
id: formMessageId,
|
|
998
|
+
className: cn("text-destructive text-sm", className),
|
|
999
|
+
...props,
|
|
1000
|
+
children: body
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
//#endregion
|
|
1004
|
+
//#region src/components/IconButton.tsx
|
|
1005
|
+
function IconButton({ icon: Icon, className, variant = "ghost", size = "icon", isActive, ...props }) {
|
|
1006
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
1007
|
+
variant,
|
|
1008
|
+
size,
|
|
1009
|
+
"data-active": isActive,
|
|
1010
|
+
className: cn(isActive && "bg-accent text-accent-foreground", className),
|
|
1011
|
+
...props,
|
|
1012
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {})
|
|
1013
|
+
});
|
|
1014
|
+
}
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region src/components/Toggle.tsx
|
|
1017
|
+
const toggleVariants = (0, class_variance_authority.cva)("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
1018
|
+
variants: {
|
|
1019
|
+
variant: {
|
|
1020
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
1021
|
+
destructive: "bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 text-white",
|
|
1022
|
+
outline: "bg-background hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 border shadow-xs",
|
|
1023
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
1024
|
+
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
1025
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
1026
|
+
},
|
|
1027
|
+
size: {
|
|
1028
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
1029
|
+
sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
|
|
1030
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
1031
|
+
icon: "size-9",
|
|
1032
|
+
"icon-xs": "size-6",
|
|
1033
|
+
"icon-sm": "size-8",
|
|
1034
|
+
"icon-lg": "size-10"
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
defaultVariants: {
|
|
1038
|
+
variant: "default",
|
|
1039
|
+
size: "default"
|
|
1040
|
+
}
|
|
1041
|
+
});
|
|
1042
|
+
function Toggle({ className, variant = "default", size = "default", ...props }) {
|
|
1043
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_toggle.Root, {
|
|
1044
|
+
"data-slot": "toggle",
|
|
1045
|
+
className: cn(toggleVariants({
|
|
1046
|
+
variant,
|
|
1047
|
+
size,
|
|
1048
|
+
className
|
|
1049
|
+
})),
|
|
1050
|
+
...props
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
//#endregion
|
|
1054
|
+
//#region src/components/IconToggle.tsx
|
|
1055
|
+
function IconToggle({ icon: Icon, variant = "ghost", size = "icon", ...props }) {
|
|
1056
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Toggle, {
|
|
1057
|
+
variant,
|
|
1058
|
+
size,
|
|
1059
|
+
...props,
|
|
1060
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {})
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
//#endregion
|
|
1064
|
+
//#region src/components/Input.tsx
|
|
1598
1065
|
function Input({ className, type, ...props }) {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
className
|
|
1609
|
-
),
|
|
1610
|
-
...props
|
|
1611
|
-
}
|
|
1612
|
-
);
|
|
1613
|
-
}
|
|
1066
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1067
|
+
type,
|
|
1068
|
+
"data-slot": "input",
|
|
1069
|
+
className: cn("border-input selection:bg-primary selection:text-primary-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40", className),
|
|
1070
|
+
...props
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
//#endregion
|
|
1074
|
+
//#region src/components/Pagination.tsx
|
|
1614
1075
|
function Pagination({ className, ...props }) {
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
}) {
|
|
1629
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1630
|
-
"ul",
|
|
1631
|
-
{
|
|
1632
|
-
"data-slot": "pagination-content",
|
|
1633
|
-
className: cn("flex flex-row items-center gap-1", className),
|
|
1634
|
-
...props
|
|
1635
|
-
}
|
|
1636
|
-
);
|
|
1076
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
1077
|
+
"aria-label": "pagination",
|
|
1078
|
+
"data-slot": "pagination",
|
|
1079
|
+
className: cn("mx-auto flex w-full justify-center", className),
|
|
1080
|
+
...props
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
function PaginationContent({ className, ...props }) {
|
|
1084
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
1085
|
+
"data-slot": "pagination-content",
|
|
1086
|
+
className: cn("flex flex-row items-center gap-1", className),
|
|
1087
|
+
...props
|
|
1088
|
+
});
|
|
1637
1089
|
}
|
|
1638
1090
|
function PaginationItem({ ...props }) {
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
}) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
}
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
}
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
}
|
|
1824
|
-
),
|
|
1825
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
1826
|
-
]
|
|
1827
|
-
}
|
|
1828
|
-
) });
|
|
1829
|
-
}
|
|
1830
|
-
function SelectLabel({
|
|
1831
|
-
className,
|
|
1832
|
-
...props
|
|
1833
|
-
}) {
|
|
1834
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1835
|
-
SelectPrimitive__namespace.Label,
|
|
1836
|
-
{
|
|
1837
|
-
"data-slot": "select-label",
|
|
1838
|
-
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1839
|
-
...props
|
|
1840
|
-
}
|
|
1841
|
-
);
|
|
1842
|
-
}
|
|
1843
|
-
function SelectItem({
|
|
1844
|
-
className,
|
|
1845
|
-
children,
|
|
1846
|
-
...props
|
|
1847
|
-
}) {
|
|
1848
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1849
|
-
SelectPrimitive__namespace.Item,
|
|
1850
|
-
{
|
|
1851
|
-
"data-slot": "select-item",
|
|
1852
|
-
className: cn(
|
|
1853
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
1854
|
-
className
|
|
1855
|
-
),
|
|
1856
|
-
...props,
|
|
1857
|
-
children: [
|
|
1858
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1859
|
-
"span",
|
|
1860
|
-
{
|
|
1861
|
-
"data-slot": "select-item-indicator",
|
|
1862
|
-
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1863
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-4" }) })
|
|
1864
|
-
}
|
|
1865
|
-
),
|
|
1866
|
-
/* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.ItemText, { children })
|
|
1867
|
-
]
|
|
1868
|
-
}
|
|
1869
|
-
);
|
|
1870
|
-
}
|
|
1871
|
-
function SelectSeparator({
|
|
1872
|
-
className,
|
|
1873
|
-
...props
|
|
1874
|
-
}) {
|
|
1875
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1876
|
-
SelectPrimitive__namespace.Separator,
|
|
1877
|
-
{
|
|
1878
|
-
"data-slot": "select-separator",
|
|
1879
|
-
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1880
|
-
...props
|
|
1881
|
-
}
|
|
1882
|
-
);
|
|
1883
|
-
}
|
|
1884
|
-
function SelectScrollUpButton({
|
|
1885
|
-
className,
|
|
1886
|
-
...props
|
|
1887
|
-
}) {
|
|
1888
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1889
|
-
SelectPrimitive__namespace.ScrollUpButton,
|
|
1890
|
-
{
|
|
1891
|
-
"data-slot": "select-scroll-up-button",
|
|
1892
|
-
className: cn(
|
|
1893
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1894
|
-
className
|
|
1895
|
-
),
|
|
1896
|
-
...props,
|
|
1897
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "size-4" })
|
|
1898
|
-
}
|
|
1899
|
-
);
|
|
1900
|
-
}
|
|
1901
|
-
function SelectScrollDownButton({
|
|
1902
|
-
className,
|
|
1903
|
-
...props
|
|
1904
|
-
}) {
|
|
1905
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1906
|
-
SelectPrimitive__namespace.ScrollDownButton,
|
|
1907
|
-
{
|
|
1908
|
-
"data-slot": "select-scroll-down-button",
|
|
1909
|
-
className: cn(
|
|
1910
|
-
"flex cursor-default items-center justify-center py-1",
|
|
1911
|
-
className
|
|
1912
|
-
),
|
|
1913
|
-
...props,
|
|
1914
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
1915
|
-
}
|
|
1916
|
-
);
|
|
1917
|
-
}
|
|
1918
|
-
var Separator3 = React15__namespace.forwardRef(
|
|
1919
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1920
|
-
SeparatorPrimitive__namespace.Root,
|
|
1921
|
-
{
|
|
1922
|
-
ref,
|
|
1923
|
-
decorative,
|
|
1924
|
-
orientation,
|
|
1925
|
-
className: cn(
|
|
1926
|
-
"shrink-0 bg-gray-200",
|
|
1927
|
-
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
1928
|
-
className
|
|
1929
|
-
),
|
|
1930
|
-
...props
|
|
1931
|
-
}
|
|
1932
|
-
)
|
|
1933
|
-
);
|
|
1934
|
-
Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
1935
|
-
var Sheet = SheetPrimitive__namespace.Root;
|
|
1936
|
-
var SheetTrigger = SheetPrimitive__namespace.Trigger;
|
|
1937
|
-
var SheetClose = SheetPrimitive__namespace.Close;
|
|
1091
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", {
|
|
1092
|
+
"data-slot": "pagination-item",
|
|
1093
|
+
...props
|
|
1094
|
+
});
|
|
1095
|
+
}
|
|
1096
|
+
function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
1097
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
1098
|
+
"aria-current": isActive ? "page" : void 0,
|
|
1099
|
+
"data-slot": "pagination-link",
|
|
1100
|
+
"data-active": isActive,
|
|
1101
|
+
className: cn(buttonVariants({
|
|
1102
|
+
variant: isActive ? "outline" : "ghost",
|
|
1103
|
+
size
|
|
1104
|
+
}), className),
|
|
1105
|
+
...props
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
function PaginationPrevious({ className, ...props }) {
|
|
1109
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PaginationLink, {
|
|
1110
|
+
"aria-label": "Go to previous page",
|
|
1111
|
+
size: "default",
|
|
1112
|
+
className: cn("gap-1 px-2.5 sm:pl-2.5", className),
|
|
1113
|
+
...props,
|
|
1114
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronLeftIcon, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1115
|
+
className: "hidden sm:block",
|
|
1116
|
+
children: "Previous"
|
|
1117
|
+
})]
|
|
1118
|
+
});
|
|
1119
|
+
}
|
|
1120
|
+
function PaginationNext({ className, ...props }) {
|
|
1121
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(PaginationLink, {
|
|
1122
|
+
"aria-label": "Go to next page",
|
|
1123
|
+
size: "default",
|
|
1124
|
+
className: cn("gap-1 px-2.5 sm:pr-2.5", className),
|
|
1125
|
+
...props,
|
|
1126
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1127
|
+
className: "hidden sm:block",
|
|
1128
|
+
children: "Next"
|
|
1129
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronRightIcon, {})]
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
function PaginationEllipsis({ className, ...props }) {
|
|
1133
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1134
|
+
"aria-hidden": true,
|
|
1135
|
+
"data-slot": "pagination-ellipsis",
|
|
1136
|
+
className: cn("flex size-9 items-center justify-center", className),
|
|
1137
|
+
...props,
|
|
1138
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.MoreHorizontalIcon, { className: "size-4" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1139
|
+
className: "sr-only",
|
|
1140
|
+
children: "More pages"
|
|
1141
|
+
})]
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
//#endregion
|
|
1145
|
+
//#region src/components/RadioGroup.tsx
|
|
1146
|
+
function RadioGroup({ className, ...props }) {
|
|
1147
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.RadioGroup.Root, {
|
|
1148
|
+
"data-slot": "radio-group",
|
|
1149
|
+
className: cn("grid gap-3", className),
|
|
1150
|
+
...props
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
function RadioGroupItem({ className, ...props }) {
|
|
1154
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.RadioGroup.Item, {
|
|
1155
|
+
"data-slot": "radio-group-item",
|
|
1156
|
+
className: cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
1157
|
+
...props,
|
|
1158
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(radix_ui.RadioGroup.Indicator, {
|
|
1159
|
+
"data-slot": "radio-group-indicator",
|
|
1160
|
+
className: "relative flex items-center justify-center",
|
|
1161
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
1162
|
+
})
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
//#endregion
|
|
1166
|
+
//#region src/components/Select.tsx
|
|
1167
|
+
function Select({ ...props }) {
|
|
1168
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Root, {
|
|
1169
|
+
"data-slot": "select",
|
|
1170
|
+
...props
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
function SelectGroup({ ...props }) {
|
|
1174
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Group, {
|
|
1175
|
+
"data-slot": "select-group",
|
|
1176
|
+
...props
|
|
1177
|
+
});
|
|
1178
|
+
}
|
|
1179
|
+
function SelectValue({ ...props }) {
|
|
1180
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Value, {
|
|
1181
|
+
"data-slot": "select-value",
|
|
1182
|
+
...props
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
1186
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Trigger, {
|
|
1187
|
+
"data-slot": "select-trigger",
|
|
1188
|
+
"data-size": size,
|
|
1189
|
+
className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1190
|
+
...props,
|
|
1191
|
+
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Icon, {
|
|
1192
|
+
asChild: true,
|
|
1193
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
1194
|
+
})]
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
1198
|
+
const portalContainer = usePortalContainer();
|
|
1199
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Portal, {
|
|
1200
|
+
container: portalContainer,
|
|
1201
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Content, {
|
|
1202
|
+
"data-slot": "select-content",
|
|
1203
|
+
className: cn("bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
1204
|
+
position,
|
|
1205
|
+
align,
|
|
1206
|
+
...props,
|
|
1207
|
+
children: [
|
|
1208
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollUpButton, {}),
|
|
1209
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Viewport, {
|
|
1210
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
1211
|
+
children
|
|
1212
|
+
}),
|
|
1213
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectScrollDownButton, {})
|
|
1214
|
+
]
|
|
1215
|
+
})
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
function SelectLabel({ className, ...props }) {
|
|
1219
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Label, {
|
|
1220
|
+
"data-slot": "select-label",
|
|
1221
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1222
|
+
...props
|
|
1223
|
+
});
|
|
1224
|
+
}
|
|
1225
|
+
function SelectItem({ className, children, ...props }) {
|
|
1226
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_select.Item, {
|
|
1227
|
+
"data-slot": "select-item",
|
|
1228
|
+
className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
1229
|
+
...props,
|
|
1230
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1231
|
+
"data-slot": "select-item-indicator",
|
|
1232
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
1233
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ItemIndicator, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, { className: "size-4" }) })
|
|
1234
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ItemText, { children })]
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
function SelectSeparator({ className, ...props }) {
|
|
1238
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.Separator, {
|
|
1239
|
+
"data-slot": "select-separator",
|
|
1240
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
1241
|
+
...props
|
|
1242
|
+
});
|
|
1243
|
+
}
|
|
1244
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
1245
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ScrollUpButton, {
|
|
1246
|
+
"data-slot": "select-scroll-up-button",
|
|
1247
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1248
|
+
...props,
|
|
1249
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronUpIcon, { className: "size-4" })
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
1253
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_select.ScrollDownButton, {
|
|
1254
|
+
"data-slot": "select-scroll-down-button",
|
|
1255
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
1256
|
+
...props,
|
|
1257
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDownIcon, { className: "size-4" })
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
//#endregion
|
|
1261
|
+
//#region src/components/Separator.tsx
|
|
1262
|
+
const Separator = react.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_separator.Root, {
|
|
1263
|
+
ref,
|
|
1264
|
+
decorative,
|
|
1265
|
+
orientation,
|
|
1266
|
+
className: cn("shrink-0 bg-gray-200", orientation === "horizontal" ? "h-px w-full" : "h-full w-px", className),
|
|
1267
|
+
...props
|
|
1268
|
+
}));
|
|
1269
|
+
Separator.displayName = _radix_ui_react_separator.Root.displayName;
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region src/components/Sheet.tsx
|
|
1272
|
+
const Sheet = _radix_ui_react_dialog.Root;
|
|
1273
|
+
const SheetTrigger = _radix_ui_react_dialog.Trigger;
|
|
1274
|
+
const SheetClose = _radix_ui_react_dialog.Close;
|
|
1938
1275
|
function SheetPortal(props) {
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
)
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
SheetPrimitive__namespace.Content,
|
|
1974
|
-
{
|
|
1975
|
-
ref,
|
|
1976
|
-
className: cn(sheetVariants({ side }), className),
|
|
1977
|
-
...props,
|
|
1978
|
-
children: [
|
|
1979
|
-
/* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", children: [
|
|
1980
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, {}),
|
|
1981
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
1982
|
-
] }),
|
|
1983
|
-
children
|
|
1984
|
-
]
|
|
1985
|
-
}
|
|
1986
|
-
)
|
|
1987
|
-
] }));
|
|
1988
|
-
SheetContent.displayName = SheetPrimitive__namespace.Content.displayName;
|
|
1276
|
+
const portalContainer = usePortalContainer();
|
|
1277
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Portal, {
|
|
1278
|
+
container: portalContainer,
|
|
1279
|
+
...props
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
const SheetOverlay = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Overlay, {
|
|
1283
|
+
className: cn("data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-[1040] bg-black/80", className),
|
|
1284
|
+
...props,
|
|
1285
|
+
ref
|
|
1286
|
+
}));
|
|
1287
|
+
SheetOverlay.displayName = _radix_ui_react_dialog.Overlay.displayName;
|
|
1288
|
+
const sheetVariants = (0, class_variance_authority.cva)("bg-background data-[state=closed]:animate-out data-[state=open]:animate-in fixed z-[1050] gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", {
|
|
1289
|
+
variants: { side: {
|
|
1290
|
+
top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b",
|
|
1291
|
+
bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t",
|
|
1292
|
+
left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-full border-r sm:max-w-sm",
|
|
1293
|
+
right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"
|
|
1294
|
+
} },
|
|
1295
|
+
defaultVariants: { side: "right" }
|
|
1296
|
+
});
|
|
1297
|
+
const SheetContent = react.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SheetPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SheetOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Content, {
|
|
1298
|
+
ref,
|
|
1299
|
+
className: cn(sheetVariants({ side }), className),
|
|
1300
|
+
...props,
|
|
1301
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_dialog.Close, {
|
|
1302
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
1303
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.X, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1304
|
+
className: "sr-only",
|
|
1305
|
+
children: "Close"
|
|
1306
|
+
})]
|
|
1307
|
+
}), children]
|
|
1308
|
+
})] }));
|
|
1309
|
+
SheetContent.displayName = _radix_ui_react_dialog.Content.displayName;
|
|
1989
1310
|
function SheetHeader({ className, ...props }) {
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
"flex flex-col space-y-2 text-center sm:text-left",
|
|
1995
|
-
className
|
|
1996
|
-
),
|
|
1997
|
-
...props
|
|
1998
|
-
}
|
|
1999
|
-
);
|
|
1311
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1312
|
+
className: cn("flex flex-col space-y-2 text-center sm:text-left", className),
|
|
1313
|
+
...props
|
|
1314
|
+
});
|
|
2000
1315
|
}
|
|
2001
1316
|
function SheetFooter({ className, ...props }) {
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
))
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
);
|
|
2042
|
-
}
|
|
2043
|
-
var Slider = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2044
|
-
SliderPrimitive__namespace.Root,
|
|
2045
|
-
{
|
|
2046
|
-
ref,
|
|
2047
|
-
className: cn(
|
|
2048
|
-
"relative flex w-full touch-none items-center select-none",
|
|
2049
|
-
className
|
|
2050
|
-
),
|
|
2051
|
-
...props,
|
|
2052
|
-
children: [
|
|
2053
|
-
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-gray-200", children: /* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Range, { className: "bg-primary absolute h-full" }) }),
|
|
2054
|
-
/* @__PURE__ */ jsxRuntime.jsx(SliderPrimitive__namespace.Thumb, { className: "border-primary bg-background ring-offset-background focus-visible:ring-ring block h-5 w-5 rounded-full border-2 transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50" })
|
|
2055
|
-
]
|
|
2056
|
-
}
|
|
2057
|
-
));
|
|
2058
|
-
Slider.displayName = SliderPrimitive__namespace.Root.displayName;
|
|
1317
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1318
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
|
|
1319
|
+
...props
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1322
|
+
const SheetTitle = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Title, {
|
|
1323
|
+
ref,
|
|
1324
|
+
className: cn("text-foreground text-lg font-semibold", className),
|
|
1325
|
+
...props
|
|
1326
|
+
}));
|
|
1327
|
+
SheetTitle.displayName = _radix_ui_react_dialog.Title.displayName;
|
|
1328
|
+
const SheetDescription = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, {
|
|
1329
|
+
ref,
|
|
1330
|
+
className: cn("text-muted-foreground text-sm", className),
|
|
1331
|
+
...props
|
|
1332
|
+
}));
|
|
1333
|
+
SheetDescription.displayName = _radix_ui_react_dialog.Description.displayName;
|
|
1334
|
+
//#endregion
|
|
1335
|
+
//#region src/components/Skeleton.tsx
|
|
1336
|
+
function Skeleton({ className, ...props }) {
|
|
1337
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1338
|
+
className: cn("bg-muted animate-pulse rounded-md", className),
|
|
1339
|
+
...props
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1342
|
+
//#endregion
|
|
1343
|
+
//#region src/components/Slider.tsx
|
|
1344
|
+
const Slider = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_radix_ui_react_slider.Root, {
|
|
1345
|
+
ref,
|
|
1346
|
+
className: cn("relative flex w-full touch-none items-center select-none", className),
|
|
1347
|
+
...props,
|
|
1348
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slider.Track, {
|
|
1349
|
+
className: "relative h-2 w-full grow overflow-hidden rounded-full bg-gray-200",
|
|
1350
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slider.Range, { className: "bg-primary absolute h-full" })
|
|
1351
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_slider.Thumb, { className: "border-primary bg-background ring-offset-background focus-visible:ring-ring block h-5 w-5 rounded-full border-2 transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50" })]
|
|
1352
|
+
}));
|
|
1353
|
+
Slider.displayName = _radix_ui_react_slider.Root.displayName;
|
|
1354
|
+
//#endregion
|
|
1355
|
+
//#region src/components/Sonner.tsx
|
|
2059
1356
|
function Toaster({ theme = "system", ...props }) {
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
}
|
|
1357
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(sonner.Toaster, {
|
|
1358
|
+
theme,
|
|
1359
|
+
className: "toaster group",
|
|
1360
|
+
icons: {
|
|
1361
|
+
success: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CircleCheckIcon, { className: "size-4" }),
|
|
1362
|
+
info: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.InfoIcon, { className: "size-4" }),
|
|
1363
|
+
warning: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.TriangleAlertIcon, { className: "size-4" }),
|
|
1364
|
+
error: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.OctagonXIcon, { className: "size-4" }),
|
|
1365
|
+
loading: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Loader2Icon, { className: "size-4 animate-spin" })
|
|
1366
|
+
},
|
|
1367
|
+
style: {
|
|
1368
|
+
"--normal-bg": "var(--popover)",
|
|
1369
|
+
"--normal-text": "var(--popover-foreground)",
|
|
1370
|
+
"--normal-border": "var(--border)",
|
|
1371
|
+
"--success-bg": "var(--popover)",
|
|
1372
|
+
"--success-text": "var(--popover-foreground)",
|
|
1373
|
+
"--success-border": "var(--border)",
|
|
1374
|
+
"--error-bg": "var(--popover)",
|
|
1375
|
+
"--error-text": "var(--popover-foreground)",
|
|
1376
|
+
"--error-border": "var(--border)",
|
|
1377
|
+
"--warning-bg": "var(--popover)",
|
|
1378
|
+
"--warning-text": "var(--popover-foreground)",
|
|
1379
|
+
"--warning-border": "var(--border)",
|
|
1380
|
+
"--info-bg": "var(--popover)",
|
|
1381
|
+
"--info-text": "var(--popover-foreground)",
|
|
1382
|
+
"--info-border": "var(--border)",
|
|
1383
|
+
"--border-radius": "var(--radius)"
|
|
1384
|
+
},
|
|
1385
|
+
...props
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
//#endregion
|
|
1389
|
+
//#region src/components/Spinner.tsx
|
|
2094
1390
|
function Spinner({ className, ...props }) {
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
}
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
}
|
|
2152
|
-
) }),
|
|
2153
|
-
text && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-center text-sm leading-tight font-medium text-slate-700", children: text })
|
|
2154
|
-
] })
|
|
2155
|
-
}
|
|
2156
|
-
);
|
|
2157
|
-
}
|
|
2158
|
-
var Switch = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2159
|
-
SwitchPrimitive__namespace.Root,
|
|
2160
|
-
{
|
|
2161
|
-
className: cn(
|
|
2162
|
-
"peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-200",
|
|
2163
|
-
className
|
|
2164
|
-
),
|
|
2165
|
-
...props,
|
|
2166
|
-
ref,
|
|
2167
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2168
|
-
SwitchPrimitive__namespace.Thumb,
|
|
2169
|
-
{
|
|
2170
|
-
className: cn(
|
|
2171
|
-
"pointer-events-none absolute left-0 block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
|
2172
|
-
)
|
|
2173
|
-
}
|
|
2174
|
-
)
|
|
2175
|
-
}
|
|
2176
|
-
));
|
|
2177
|
-
Switch.displayName = SwitchPrimitive__namespace.Root.displayName;
|
|
1391
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LoaderIcon, {
|
|
1392
|
+
"data-slot": "spinner",
|
|
1393
|
+
role: "status",
|
|
1394
|
+
"aria-label": "Loading",
|
|
1395
|
+
className: cn("size-4 animate-spin", className),
|
|
1396
|
+
...props
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1399
|
+
//#endregion
|
|
1400
|
+
//#region src/components/SpinnerWithText.tsx
|
|
1401
|
+
function SpinnerWithText({ text = "Loading...", variant = "inline", className }) {
|
|
1402
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1403
|
+
className: cn("flex items-center justify-center self-stretch py-10", variant === "page" && "h-[60vh]", className),
|
|
1404
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1405
|
+
className: "flex flex-col items-center justify-start gap-4",
|
|
1406
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1407
|
+
className: "relative h-8 w-8",
|
|
1408
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
1409
|
+
width: "32",
|
|
1410
|
+
height: "33",
|
|
1411
|
+
viewBox: "0 0 32 33",
|
|
1412
|
+
fill: "none",
|
|
1413
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1414
|
+
className: "animate-spin",
|
|
1415
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
1416
|
+
d: "M30 16.5C30 18.3385 29.6379 20.159 28.9343 21.8576C28.2308 23.5561 27.1995 25.0995 25.8995 26.3995C24.5995 27.6995 23.0561 28.7307 21.3576 29.4343C19.659 30.1379 17.8385 30.5 16 30.5C14.1615 30.5 12.341 30.1379 10.6424 29.4343C8.94387 28.7307 7.40052 27.6995 6.1005 26.3995C4.80048 25.0995 3.76925 23.5561 3.06569 21.8576C2.36212 20.159 2 18.3385 2 16.5C2 14.6615 2.36212 12.841 3.06569 11.1424C3.76926 9.44387 4.80049 7.90052 6.10051 6.6005C7.40053 5.30048 8.94388 4.26925 10.6424 3.56568C12.341 2.86212 14.1615 2.5 16 2.5C17.8385 2.5 19.659 2.86212 21.3576 3.56569C23.0561 4.26925 24.5995 5.30049 25.8995 6.60051C27.1995 7.90053 28.2308 9.44388 28.9343 11.1424C29.6379 12.841 30 14.6615 30 16.5L30 16.5Z",
|
|
1417
|
+
stroke: "#F5F6F9",
|
|
1418
|
+
strokeWidth: "4",
|
|
1419
|
+
strokeLinecap: "round",
|
|
1420
|
+
strokeLinejoin: "round"
|
|
1421
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
1422
|
+
d: "M16 2.5C17.8385 2.5 19.659 2.86212 21.3576 3.56569C23.0561 4.26925 24.5995 5.30049 25.8995 6.60051C27.1995 7.90053 28.2308 9.44388 28.9343 11.1424C29.6379 12.841 30 14.6615 30 16.5",
|
|
1423
|
+
stroke: "#155DFC",
|
|
1424
|
+
strokeWidth: "4",
|
|
1425
|
+
strokeLinecap: "round",
|
|
1426
|
+
strokeLinejoin: "round"
|
|
1427
|
+
})]
|
|
1428
|
+
})
|
|
1429
|
+
}), text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1430
|
+
className: "text-center text-sm leading-tight font-medium text-slate-700",
|
|
1431
|
+
children: text
|
|
1432
|
+
})]
|
|
1433
|
+
})
|
|
1434
|
+
});
|
|
1435
|
+
}
|
|
1436
|
+
//#endregion
|
|
1437
|
+
//#region src/components/Switch.tsx
|
|
1438
|
+
const Switch = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_switch.Root, {
|
|
1439
|
+
className: cn("peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-200", className),
|
|
1440
|
+
...props,
|
|
1441
|
+
ref,
|
|
1442
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_switch.Thumb, { className: cn("pointer-events-none absolute left-0 block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform duration-200 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0") })
|
|
1443
|
+
}));
|
|
1444
|
+
Switch.displayName = _radix_ui_react_switch.Root.displayName;
|
|
1445
|
+
//#endregion
|
|
1446
|
+
//#region src/components/Table.tsx
|
|
2178
1447
|
function Table({ className, ...props }) {
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
className: cn("w-full caption-bottom text-sm", className),
|
|
2189
|
-
...props
|
|
2190
|
-
}
|
|
2191
|
-
)
|
|
2192
|
-
}
|
|
2193
|
-
);
|
|
1448
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1449
|
+
"data-slot": "table-container",
|
|
1450
|
+
className: "relative w-full overflow-x-auto",
|
|
1451
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
|
|
1452
|
+
"data-slot": "table",
|
|
1453
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
1454
|
+
...props
|
|
1455
|
+
})
|
|
1456
|
+
});
|
|
2194
1457
|
}
|
|
2195
1458
|
function TableHeader({ className, ...props }) {
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
...props
|
|
2202
|
-
}
|
|
2203
|
-
);
|
|
1459
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
|
|
1460
|
+
"data-slot": "table-header",
|
|
1461
|
+
className: cn("[&_tr]:border-b", className),
|
|
1462
|
+
...props
|
|
1463
|
+
});
|
|
2204
1464
|
}
|
|
2205
1465
|
function TableBody({ className, ...props }) {
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
...props
|
|
2212
|
-
}
|
|
2213
|
-
);
|
|
1466
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
1467
|
+
"data-slot": "table-body",
|
|
1468
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
1469
|
+
...props
|
|
1470
|
+
});
|
|
2214
1471
|
}
|
|
2215
1472
|
function TableFooter({ className, ...props }) {
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
2222
|
-
className
|
|
2223
|
-
),
|
|
2224
|
-
...props
|
|
2225
|
-
}
|
|
2226
|
-
);
|
|
1473
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", {
|
|
1474
|
+
"data-slot": "table-footer",
|
|
1475
|
+
className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", className),
|
|
1476
|
+
...props
|
|
1477
|
+
});
|
|
2227
1478
|
}
|
|
2228
1479
|
function TableRow({ className, ...props }) {
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
2235
|
-
className
|
|
2236
|
-
),
|
|
2237
|
-
...props
|
|
2238
|
-
}
|
|
2239
|
-
);
|
|
1480
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
1481
|
+
"data-slot": "table-row",
|
|
1482
|
+
className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", className),
|
|
1483
|
+
...props
|
|
1484
|
+
});
|
|
2240
1485
|
}
|
|
2241
1486
|
function TableHead({ className, ...props }) {
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
2248
|
-
className
|
|
2249
|
-
),
|
|
2250
|
-
...props
|
|
2251
|
-
}
|
|
2252
|
-
);
|
|
1487
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1488
|
+
"data-slot": "table-head",
|
|
1489
|
+
className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
1490
|
+
...props
|
|
1491
|
+
});
|
|
2253
1492
|
}
|
|
2254
1493
|
function TableCell({ className, ...props }) {
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
}) {
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
}
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
})
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
"data-slot": "tabs-list",
|
|
2301
|
-
className: cn(
|
|
2302
|
-
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
2303
|
-
className
|
|
2304
|
-
),
|
|
2305
|
-
...props
|
|
2306
|
-
}
|
|
2307
|
-
);
|
|
2308
|
-
}
|
|
2309
|
-
function TabsTrigger({
|
|
2310
|
-
className,
|
|
2311
|
-
...props
|
|
2312
|
-
}) {
|
|
2313
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2314
|
-
TabsPrimitive__namespace.Trigger,
|
|
2315
|
-
{
|
|
2316
|
-
"data-slot": "tabs-trigger",
|
|
2317
|
-
className: cn(
|
|
2318
|
-
"text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring data-[state=active]:bg-background dark:text-muted-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2319
|
-
className
|
|
2320
|
-
),
|
|
2321
|
-
...props
|
|
2322
|
-
}
|
|
2323
|
-
);
|
|
2324
|
-
}
|
|
2325
|
-
function TabsContent({
|
|
2326
|
-
className,
|
|
2327
|
-
...props
|
|
2328
|
-
}) {
|
|
2329
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2330
|
-
TabsPrimitive__namespace.Content,
|
|
2331
|
-
{
|
|
2332
|
-
"data-slot": "tabs-content",
|
|
2333
|
-
className: cn("flex-1 outline-none", className),
|
|
2334
|
-
...props
|
|
2335
|
-
}
|
|
2336
|
-
);
|
|
2337
|
-
}
|
|
1494
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1495
|
+
"data-slot": "table-cell",
|
|
1496
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
1497
|
+
...props
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
function TableCaption({ className, ...props }) {
|
|
1501
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("caption", {
|
|
1502
|
+
"data-slot": "table-caption",
|
|
1503
|
+
className: cn("text-muted-foreground mt-4 text-sm", className),
|
|
1504
|
+
...props
|
|
1505
|
+
});
|
|
1506
|
+
}
|
|
1507
|
+
//#endregion
|
|
1508
|
+
//#region src/components/Tabs.tsx
|
|
1509
|
+
function Tabs({ className, ...props }) {
|
|
1510
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.Root, {
|
|
1511
|
+
"data-slot": "tabs",
|
|
1512
|
+
className: cn("flex flex-col gap-2", className),
|
|
1513
|
+
...props
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1516
|
+
function TabsList({ className, ...props }) {
|
|
1517
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.List, {
|
|
1518
|
+
"data-slot": "tabs-list",
|
|
1519
|
+
className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", className),
|
|
1520
|
+
...props
|
|
1521
|
+
});
|
|
1522
|
+
}
|
|
1523
|
+
function TabsTrigger({ className, ...props }) {
|
|
1524
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.Trigger, {
|
|
1525
|
+
"data-slot": "tabs-trigger",
|
|
1526
|
+
className: cn("text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring data-[state=active]:bg-background dark:text-muted-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1527
|
+
...props
|
|
1528
|
+
});
|
|
1529
|
+
}
|
|
1530
|
+
function TabsContent({ className, ...props }) {
|
|
1531
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tabs.Content, {
|
|
1532
|
+
"data-slot": "tabs-content",
|
|
1533
|
+
className: cn("flex-1 outline-none", className),
|
|
1534
|
+
...props
|
|
1535
|
+
});
|
|
1536
|
+
}
|
|
1537
|
+
//#endregion
|
|
1538
|
+
//#region src/components/Textarea.tsx
|
|
2338
1539
|
function Textarea({ className, ...props }) {
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
size: "default",
|
|
2353
|
-
variant: "default",
|
|
2354
|
-
spacing: 0,
|
|
2355
|
-
orientation: "horizontal"
|
|
1540
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
|
|
1541
|
+
"data-slot": "textarea",
|
|
1542
|
+
className: cn("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
1543
|
+
...props
|
|
1544
|
+
});
|
|
1545
|
+
}
|
|
1546
|
+
//#endregion
|
|
1547
|
+
//#region src/components/ToggleGroup.tsx
|
|
1548
|
+
const ToggleGroupContext = react.createContext({
|
|
1549
|
+
size: "default",
|
|
1550
|
+
variant: "default",
|
|
1551
|
+
spacing: 0,
|
|
1552
|
+
orientation: "horizontal"
|
|
2356
1553
|
});
|
|
2357
|
-
function ToggleGroup({
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
),
|
|
2413
|
-
...props,
|
|
2414
|
-
children
|
|
2415
|
-
}
|
|
2416
|
-
);
|
|
2417
|
-
}
|
|
2418
|
-
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
2419
|
-
function Tooltip2(props) {
|
|
2420
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Root, { ...props });
|
|
2421
|
-
}
|
|
2422
|
-
var TooltipTrigger = TooltipPrimitive__namespace.Trigger;
|
|
2423
|
-
function TooltipContent({
|
|
2424
|
-
className,
|
|
2425
|
-
sideOffset = 4,
|
|
2426
|
-
...props
|
|
2427
|
-
}) {
|
|
2428
|
-
const portalContainer = usePortalContainer();
|
|
2429
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TooltipPrimitive__namespace.Portal, { container: portalContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2430
|
-
TooltipPrimitive__namespace.Content,
|
|
2431
|
-
{
|
|
2432
|
-
sideOffset,
|
|
2433
|
-
className: cn(
|
|
2434
|
-
"animate-in bg-popover text-popover-foreground fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md",
|
|
2435
|
-
className
|
|
2436
|
-
),
|
|
2437
|
-
...props
|
|
2438
|
-
}
|
|
2439
|
-
) });
|
|
2440
|
-
}
|
|
2441
|
-
|
|
1554
|
+
function ToggleGroup({ className, variant, size, spacing = 0, orientation = "horizontal", children, ...props }) {
|
|
1555
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_toggle_group.Root, {
|
|
1556
|
+
"data-slot": "toggle-group",
|
|
1557
|
+
"data-variant": variant,
|
|
1558
|
+
"data-size": size,
|
|
1559
|
+
"data-spacing": spacing,
|
|
1560
|
+
"data-orientation": orientation,
|
|
1561
|
+
style: { "--gap": spacing },
|
|
1562
|
+
className: cn("cn-toggle-group group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", className),
|
|
1563
|
+
...props,
|
|
1564
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleGroupContext.Provider, {
|
|
1565
|
+
value: {
|
|
1566
|
+
variant,
|
|
1567
|
+
size,
|
|
1568
|
+
spacing,
|
|
1569
|
+
orientation
|
|
1570
|
+
},
|
|
1571
|
+
children
|
|
1572
|
+
})
|
|
1573
|
+
});
|
|
1574
|
+
}
|
|
1575
|
+
function ToggleGroupItem({ className, children, variant = "default", size = "default", ...props }) {
|
|
1576
|
+
const context = react.useContext(ToggleGroupContext);
|
|
1577
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_toggle_group.Item, {
|
|
1578
|
+
"data-slot": "toggle-group-item",
|
|
1579
|
+
"data-variant": context.variant || variant,
|
|
1580
|
+
"data-size": context.size || size,
|
|
1581
|
+
"data-spacing": context.spacing,
|
|
1582
|
+
className: cn("cn-toggle-group-item shrink-0 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t", toggleVariants({
|
|
1583
|
+
variant: context.variant || variant,
|
|
1584
|
+
size: context.size || size
|
|
1585
|
+
}), className),
|
|
1586
|
+
...props,
|
|
1587
|
+
children
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
//#endregion
|
|
1591
|
+
//#region src/components/Tooltip.tsx
|
|
1592
|
+
const TooltipProvider = _radix_ui_react_tooltip.Provider;
|
|
1593
|
+
function Tooltip(props) {
|
|
1594
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tooltip.Root, { ...props });
|
|
1595
|
+
}
|
|
1596
|
+
const TooltipTrigger = _radix_ui_react_tooltip.Trigger;
|
|
1597
|
+
function TooltipContent({ className, sideOffset = 4, ...props }) {
|
|
1598
|
+
const portalContainer = usePortalContainer();
|
|
1599
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tooltip.Portal, {
|
|
1600
|
+
container: portalContainer,
|
|
1601
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_tooltip.Content, {
|
|
1602
|
+
sideOffset,
|
|
1603
|
+
className: cn("animate-in bg-popover text-popover-foreground fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md", className),
|
|
1604
|
+
...props
|
|
1605
|
+
})
|
|
1606
|
+
});
|
|
1607
|
+
}
|
|
1608
|
+
//#endregion
|
|
2442
1609
|
exports.Accordion = Accordion;
|
|
2443
1610
|
exports.AccordionContent = AccordionContent;
|
|
2444
1611
|
exports.AccordionItem = AccordionItem;
|
|
@@ -2481,8 +1648,8 @@ exports.ChartStyle = ChartStyle;
|
|
|
2481
1648
|
exports.ChartTooltip = ChartTooltip;
|
|
2482
1649
|
exports.ChartTooltipContent = ChartTooltipContent;
|
|
2483
1650
|
exports.Collapsible = Collapsible;
|
|
2484
|
-
exports.CollapsibleContent =
|
|
2485
|
-
exports.CollapsibleTrigger =
|
|
1651
|
+
exports.CollapsibleContent = CollapsibleContent;
|
|
1652
|
+
exports.CollapsibleTrigger = CollapsibleTrigger;
|
|
2486
1653
|
exports.DatePicker = DatePicker;
|
|
2487
1654
|
exports.Dialog = Dialog;
|
|
2488
1655
|
exports.DialogClose = DialogClose;
|
|
@@ -2519,7 +1686,7 @@ exports.FormMessage = FormMessage;
|
|
|
2519
1686
|
exports.IconButton = IconButton;
|
|
2520
1687
|
exports.IconToggle = IconToggle;
|
|
2521
1688
|
exports.Input = Input;
|
|
2522
|
-
exports.Label =
|
|
1689
|
+
exports.Label = Label;
|
|
2523
1690
|
exports.Pagination = Pagination;
|
|
2524
1691
|
exports.PaginationContent = PaginationContent;
|
|
2525
1692
|
exports.PaginationEllipsis = PaginationEllipsis;
|
|
@@ -2535,7 +1702,7 @@ exports.PopoverHeader = PopoverHeader;
|
|
|
2535
1702
|
exports.PopoverTitle = PopoverTitle;
|
|
2536
1703
|
exports.PopoverTrigger = PopoverTrigger;
|
|
2537
1704
|
exports.PortalContainerProvider = PortalContainerProvider;
|
|
2538
|
-
exports.RadioGroup =
|
|
1705
|
+
exports.RadioGroup = RadioGroup;
|
|
2539
1706
|
exports.RadioGroupItem = RadioGroupItem;
|
|
2540
1707
|
exports.Select = Select;
|
|
2541
1708
|
exports.SelectContent = SelectContent;
|
|
@@ -2547,7 +1714,7 @@ exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
|
2547
1714
|
exports.SelectSeparator = SelectSeparator;
|
|
2548
1715
|
exports.SelectTrigger = SelectTrigger;
|
|
2549
1716
|
exports.SelectValue = SelectValue;
|
|
2550
|
-
exports.Separator =
|
|
1717
|
+
exports.Separator = Separator;
|
|
2551
1718
|
exports.Sheet = Sheet;
|
|
2552
1719
|
exports.SheetClose = SheetClose;
|
|
2553
1720
|
exports.SheetContent = SheetContent;
|
|
@@ -2580,7 +1747,7 @@ exports.Toaster = Toaster;
|
|
|
2580
1747
|
exports.Toggle = Toggle;
|
|
2581
1748
|
exports.ToggleGroup = ToggleGroup;
|
|
2582
1749
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
2583
|
-
exports.Tooltip =
|
|
1750
|
+
exports.Tooltip = Tooltip;
|
|
2584
1751
|
exports.TooltipContent = TooltipContent;
|
|
2585
1752
|
exports.TooltipProvider = TooltipProvider;
|
|
2586
1753
|
exports.TooltipTrigger = TooltipTrigger;
|
|
@@ -2590,5 +1757,5 @@ exports.cn = cn;
|
|
|
2590
1757
|
exports.toggleVariants = toggleVariants;
|
|
2591
1758
|
exports.useFormField = useFormField;
|
|
2592
1759
|
exports.useZodForm = useZodForm;
|
|
2593
|
-
|
|
1760
|
+
|
|
2594
1761
|
//# sourceMappingURL=index.cjs.map
|