@fea-ui/react 0.1.0-alpha.0 → 0.1.0-alpha.10
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/README.MD +3 -0
- package/dist/index.cjs +1075 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1501 -490
- package/dist/index.d.mts +1501 -490
- package/dist/index.mjs +1052 -220
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ let lucide_react = require("lucide-react");
|
|
|
31
31
|
let react = require("react");
|
|
32
32
|
react = __toESM(react);
|
|
33
33
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
let react_aria_components = require("react-aria-components");
|
|
34
35
|
|
|
35
36
|
//#region src/components/accordion/accordion.context.ts
|
|
36
37
|
const AccordionContext = (0, react.createContext)(null);
|
|
@@ -90,7 +91,7 @@ const AccordionTrigger = ({ className, ...props }) => {
|
|
|
90
91
|
};
|
|
91
92
|
const AccordionTriggerIcon = ({ className, ...props }) => {
|
|
92
93
|
const { slots } = useAccordion();
|
|
93
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.
|
|
94
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideChevronDown, {
|
|
94
95
|
className: (0, tailwind_variants.cn)(className, slots.triggerIcon()),
|
|
95
96
|
...props
|
|
96
97
|
});
|
|
@@ -109,14 +110,214 @@ const AccordionContent = ({ className, ...props }) => {
|
|
|
109
110
|
...props
|
|
110
111
|
});
|
|
111
112
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Accordion
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
var accordion_default = Object.assign(Accordion, {
|
|
114
|
+
Content: AccordionContent,
|
|
115
|
+
Header: AccordionHeader,
|
|
116
|
+
Item: AccordionItem,
|
|
117
|
+
Panel: AccordionPanel,
|
|
118
|
+
Root: Accordion,
|
|
119
|
+
Trigger: AccordionTrigger,
|
|
120
|
+
TriggerIcon: AccordionTriggerIcon
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/components/alert/alert.context.ts
|
|
125
|
+
const AlertContext = (0, react.createContext)(null);
|
|
126
|
+
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region src/components/alert/alert.variants.ts
|
|
129
|
+
const alertVariants = (0, tailwind_variants.tv)({
|
|
130
|
+
defaultVariants: { variant: "info" },
|
|
131
|
+
slots: {
|
|
132
|
+
content: "alert__content",
|
|
133
|
+
description: "alert__description",
|
|
134
|
+
indicator: "alert__indicator",
|
|
135
|
+
root: "alert",
|
|
136
|
+
title: "alert__title"
|
|
137
|
+
},
|
|
138
|
+
variants: { variant: {
|
|
139
|
+
danger: { root: "alert--danger" },
|
|
140
|
+
info: { root: "alert--info" },
|
|
141
|
+
primary: { root: "alert--primary" },
|
|
142
|
+
success: { root: "alert--success" },
|
|
143
|
+
warning: { root: "alert--warning" }
|
|
144
|
+
} }
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/components/alert/use-alert.ts
|
|
149
|
+
const useAlert = () => {
|
|
150
|
+
const context = (0, react.useContext)(AlertContext);
|
|
151
|
+
if (!context) throw new Error("useAlert must be used within a AlertProvider");
|
|
152
|
+
return context;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/components/alert/alert.tsx
|
|
157
|
+
const Alert = ({ className, variant, ...props }) => {
|
|
158
|
+
const slots = (0, react.useMemo)(() => alertVariants({
|
|
159
|
+
className,
|
|
160
|
+
variant
|
|
161
|
+
}), [className, variant]);
|
|
162
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertContext, {
|
|
163
|
+
value: {
|
|
164
|
+
slots,
|
|
165
|
+
variant
|
|
166
|
+
},
|
|
167
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
168
|
+
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
169
|
+
...props
|
|
170
|
+
})
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
const AlertIndicator = ({ className, children, ...props }) => {
|
|
174
|
+
const { slots, variant } = useAlert();
|
|
175
|
+
const IndicatorIcon = ({ children: children$1 }) => {
|
|
176
|
+
if (children$1) return children$1;
|
|
177
|
+
switch (variant) {
|
|
178
|
+
case "danger": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideXCircle, {});
|
|
179
|
+
case "success": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideCheckCircle, {});
|
|
180
|
+
case "warning": return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideAlertTriangle, {});
|
|
181
|
+
default: return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideInfo, {});
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
185
|
+
className: (0, tailwind_variants.cn)(className, slots.indicator()),
|
|
186
|
+
...props,
|
|
187
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IndicatorIcon, { children })
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
const AlertContent = ({ className, ...props }) => {
|
|
191
|
+
const { slots } = useAlert();
|
|
192
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
193
|
+
className: (0, tailwind_variants.cn)(className, slots.content()),
|
|
194
|
+
...props
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
const AlertTitle = ({ className, ...props }) => {
|
|
198
|
+
const { slots } = useAlert();
|
|
199
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
200
|
+
className: (0, tailwind_variants.cn)(className, slots.title()),
|
|
201
|
+
...props
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
const AlertDescription = ({ className, ...props }) => {
|
|
205
|
+
const { slots } = useAlert();
|
|
206
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
207
|
+
className: (0, tailwind_variants.cn)(className, slots.description()),
|
|
208
|
+
...props
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
var alert_default = Object.assign(Alert, {
|
|
212
|
+
Content: AlertContent,
|
|
213
|
+
Description: AlertDescription,
|
|
214
|
+
Indicator: AlertIndicator,
|
|
215
|
+
Root: Alert,
|
|
216
|
+
Title: AlertTitle
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/components/alert-dialog/alert-dialog.context.ts
|
|
221
|
+
const AlertDialogContext = (0, react.createContext)(null);
|
|
222
|
+
|
|
223
|
+
//#endregion
|
|
224
|
+
//#region src/components/alert-dialog/alert-dialog.variants.ts
|
|
225
|
+
const alertDialogVariants = (0, tailwind_variants.tv)({ slots: {
|
|
226
|
+
backdrop: "alert-dialog__backdrop",
|
|
227
|
+
close: "alert-dialog__close",
|
|
228
|
+
description: "alert-dialog__description",
|
|
229
|
+
popup: "alert-dialog__popup",
|
|
230
|
+
portal: "alert-dialog__portal",
|
|
231
|
+
root: "alert-dialog",
|
|
232
|
+
title: "alert-dialog__title",
|
|
233
|
+
trigger: "alert-dialog__trigger",
|
|
234
|
+
viewport: "alert-dialog__viewport"
|
|
235
|
+
} });
|
|
236
|
+
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/components/alert-dialog/use-alert-dialog.ts
|
|
239
|
+
const useAlertDialog = () => {
|
|
240
|
+
const context = (0, react.useContext)(AlertDialogContext);
|
|
241
|
+
if (!context) throw new Error("useAlertDialog must be used within a AlertDialogProvider");
|
|
242
|
+
return context;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/components/alert-dialog/alert-dialog.tsx
|
|
247
|
+
const AlertDialog = ({ ...props }) => {
|
|
248
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogContext, {
|
|
249
|
+
value: { slots: (0, react.useMemo)(() => alertDialogVariants(), []) },
|
|
250
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Root, { ...props })
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
const AlertDialogTrigger = ({ className, ...props }) => {
|
|
254
|
+
const { slots } = useAlertDialog();
|
|
255
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Trigger, {
|
|
256
|
+
className: (0, tailwind_variants.cn)(slots.trigger(), className),
|
|
257
|
+
...props
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
const AlertDialogPortal = ({ className, ...props }) => {
|
|
261
|
+
const { slots } = useAlertDialog();
|
|
262
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Portal, {
|
|
263
|
+
className: (0, tailwind_variants.cn)(slots.portal(), className),
|
|
264
|
+
...props
|
|
265
|
+
});
|
|
266
|
+
};
|
|
267
|
+
const AlertDialogBackdrop = ({ className, ...props }) => {
|
|
268
|
+
const { slots } = useAlertDialog();
|
|
269
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Backdrop, {
|
|
270
|
+
className: (0, tailwind_variants.cn)(slots.backdrop(), className),
|
|
271
|
+
...props
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
const AlertDialogViewport = ({ className, ...props }) => {
|
|
275
|
+
const { slots } = useAlertDialog();
|
|
276
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Viewport, {
|
|
277
|
+
className: (0, tailwind_variants.cn)(slots.viewport(), className),
|
|
278
|
+
...props
|
|
279
|
+
});
|
|
280
|
+
};
|
|
281
|
+
const AlertDialogPopup = ({ className, ...props }) => {
|
|
282
|
+
const { slots } = useAlertDialog();
|
|
283
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Popup, {
|
|
284
|
+
className: (0, tailwind_variants.cn)(slots.popup(), className),
|
|
285
|
+
...props
|
|
286
|
+
});
|
|
287
|
+
};
|
|
288
|
+
const AlertDialogTitle = ({ className, ...props }) => {
|
|
289
|
+
const { slots } = useAlertDialog();
|
|
290
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Title, {
|
|
291
|
+
className: (0, tailwind_variants.cn)(slots.title(), className),
|
|
292
|
+
...props
|
|
293
|
+
});
|
|
294
|
+
};
|
|
295
|
+
const AlertDialogDescription = ({ className, ...props }) => {
|
|
296
|
+
const { slots } = useAlertDialog();
|
|
297
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Description, {
|
|
298
|
+
className: (0, tailwind_variants.cn)(slots.description(), className),
|
|
299
|
+
...props
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
const AlertDialogClose = ({ className, children, ...props }) => {
|
|
303
|
+
const { slots } = useAlertDialog();
|
|
304
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.AlertDialog.Close, {
|
|
305
|
+
className: (0, tailwind_variants.cn)(slots.close(), className),
|
|
306
|
+
...props,
|
|
307
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
var alert_dialog_default = Object.assign(AlertDialog, {
|
|
311
|
+
Backdrop: AlertDialogBackdrop,
|
|
312
|
+
Close: AlertDialogClose,
|
|
313
|
+
Description: AlertDialogDescription,
|
|
314
|
+
Popup: AlertDialogPopup,
|
|
315
|
+
Portal: AlertDialogPortal,
|
|
316
|
+
Root: AlertDialog,
|
|
317
|
+
Title: AlertDialogTitle,
|
|
318
|
+
Trigger: AlertDialogTrigger,
|
|
319
|
+
Viewport: AlertDialogViewport
|
|
320
|
+
});
|
|
120
321
|
|
|
121
322
|
//#endregion
|
|
122
323
|
//#region src/components/avatar/avatar.context.ts
|
|
@@ -172,10 +373,11 @@ const AvatarFallback = ({ className, ...props }) => {
|
|
|
172
373
|
...props
|
|
173
374
|
});
|
|
174
375
|
};
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
376
|
+
var avatar_default = Object.assign(Avatar, {
|
|
377
|
+
Fallback: AvatarFallback,
|
|
378
|
+
Image: AvatarImage,
|
|
379
|
+
Root: Avatar
|
|
380
|
+
});
|
|
179
381
|
|
|
180
382
|
//#endregion
|
|
181
383
|
//#region src/components/button/button.variants.ts
|
|
@@ -206,7 +408,7 @@ const buttonVariants = (0, tailwind_variants.tv)({
|
|
|
206
408
|
//#endregion
|
|
207
409
|
//#region src/components/button/button.tsx
|
|
208
410
|
const Button = ({ className, variant, size, isIconOnly, ...props }) => {
|
|
209
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
411
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
|
|
210
412
|
className: (0, tailwind_variants.cn)(buttonVariants({
|
|
211
413
|
isIconOnly,
|
|
212
414
|
size,
|
|
@@ -310,58 +512,14 @@ const CardDescription = ({ className, ...props }) => {
|
|
|
310
512
|
});
|
|
311
513
|
};
|
|
312
514
|
/** Exports */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
Card
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
//#endregion
|
|
322
|
-
//#region src/components/checkbox/checkbox.context.ts
|
|
323
|
-
const CheckboxContext = (0, react.createContext)(null);
|
|
324
|
-
|
|
325
|
-
//#endregion
|
|
326
|
-
//#region src/components/checkbox/checkbox.variants.ts
|
|
327
|
-
const checkboxVariants = (0, tailwind_variants.tv)({ slots: {
|
|
328
|
-
checkboxIcon: "checkbox__icon",
|
|
329
|
-
indicator: "checkbox__indicator",
|
|
330
|
-
label: "checkbox__label",
|
|
331
|
-
root: "checkbox"
|
|
332
|
-
} });
|
|
333
|
-
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region src/components/checkbox/use-checkbox.ts
|
|
336
|
-
const useCheckbox = () => {
|
|
337
|
-
const ctx = (0, react.useContext)(CheckboxContext);
|
|
338
|
-
if (!ctx) throw new Error("CheckboxContext must be used with in the Checkbox component.");
|
|
339
|
-
return ctx;
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
//#endregion
|
|
343
|
-
//#region src/components/checkbox/checkbox.tsx
|
|
344
|
-
const Checkbox = ({ className, ...props }) => {
|
|
345
|
-
const slots = (0, react.useMemo)(() => checkboxVariants(), []);
|
|
346
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckboxContext.Provider, {
|
|
347
|
-
value: { slots },
|
|
348
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Checkbox.Root, {
|
|
349
|
-
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
350
|
-
...props
|
|
351
|
-
})
|
|
352
|
-
});
|
|
353
|
-
};
|
|
354
|
-
const CheckboxIndicator = ({ className, ...props }) => {
|
|
355
|
-
const { slots } = useCheckbox();
|
|
356
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Checkbox.Indicator, {
|
|
357
|
-
className: (0, tailwind_variants.cn)(className, slots.indicator()),
|
|
358
|
-
...props,
|
|
359
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideCheck, { className: slots.checkboxIcon() })
|
|
360
|
-
});
|
|
361
|
-
};
|
|
362
|
-
Checkbox.Indicator = CheckboxIndicator;
|
|
363
|
-
Checkbox.Root = Checkbox;
|
|
364
|
-
var checkbox_default = Checkbox;
|
|
515
|
+
var card_default = Object.assign(Card, {
|
|
516
|
+
Body: CardBody,
|
|
517
|
+
Description: CardDescription,
|
|
518
|
+
Footer: CardFooter,
|
|
519
|
+
Header: CardHeader,
|
|
520
|
+
Root: Card,
|
|
521
|
+
Title: CardTitle
|
|
522
|
+
});
|
|
365
523
|
|
|
366
524
|
//#endregion
|
|
367
525
|
//#region src/components/checkbox-group/checkbox-group.variants.ts
|
|
@@ -370,7 +528,7 @@ const checkboxGroupVariants = (0, tailwind_variants.tv)({ base: "checkbox-group"
|
|
|
370
528
|
//#endregion
|
|
371
529
|
//#region src/components/checkbox-group/checkbox-group.tsx
|
|
372
530
|
const CheckboxGroup = ({ className, ...props }) => {
|
|
373
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
531
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.CheckboxGroup, {
|
|
374
532
|
className: (0, tailwind_variants.cn)(className, checkboxGroupVariants()),
|
|
375
533
|
...props
|
|
376
534
|
});
|
|
@@ -428,6 +586,22 @@ const Container = ({ className, ...props }) => {
|
|
|
428
586
|
};
|
|
429
587
|
var container_default = Container;
|
|
430
588
|
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region src/components/description/description.variants.ts
|
|
591
|
+
const descriptionVariants = (0, tailwind_variants.tv)({ base: "description" });
|
|
592
|
+
|
|
593
|
+
//#endregion
|
|
594
|
+
//#region src/components/description/description.tsx
|
|
595
|
+
const Description = ({ className, ...props }) => {
|
|
596
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Text, {
|
|
597
|
+
className: (0, tailwind_variants.cn)(className, descriptionVariants()),
|
|
598
|
+
"data-slot": "description",
|
|
599
|
+
slot: "description",
|
|
600
|
+
...props
|
|
601
|
+
});
|
|
602
|
+
};
|
|
603
|
+
var description_default = Description;
|
|
604
|
+
|
|
431
605
|
//#endregion
|
|
432
606
|
//#region src/components/dialog/dialog.context.ts
|
|
433
607
|
const DialogContext = (0, react.createContext)(null);
|
|
@@ -520,93 +694,188 @@ const DialogClose = ({ className, ...props }) => {
|
|
|
520
694
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
|
|
521
695
|
});
|
|
522
696
|
};
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
Dialog
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
697
|
+
var dialog_default = Object.assign(Dialog, {
|
|
698
|
+
Backdrop: DialogBackdrop,
|
|
699
|
+
Close: DialogClose,
|
|
700
|
+
Description: DialogDescription,
|
|
701
|
+
Popup: DialogPopup,
|
|
702
|
+
Portal: DialogPortal,
|
|
703
|
+
Root: Dialog,
|
|
704
|
+
Title: DialogTitle,
|
|
705
|
+
Trigger: DialogTrigger,
|
|
706
|
+
Viewport: DialogViewport
|
|
707
|
+
});
|
|
533
708
|
|
|
534
709
|
//#endregion
|
|
535
|
-
//#region src/components/
|
|
536
|
-
const
|
|
710
|
+
//#region src/components/drawer/drawer.context.ts
|
|
711
|
+
const DrawerContext = (0, react.createContext)(null);
|
|
537
712
|
|
|
538
713
|
//#endregion
|
|
539
|
-
//#region src/components/
|
|
540
|
-
const
|
|
714
|
+
//#region src/components/drawer/drawer.variants.ts
|
|
715
|
+
const drawerVariants = (0, tailwind_variants.tv)({
|
|
716
|
+
defaultVariants: { position: "left" },
|
|
541
717
|
slots: {
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
718
|
+
backdrop: "drawer__backdrop",
|
|
719
|
+
close: "drawer__close",
|
|
720
|
+
description: "drawer__description",
|
|
721
|
+
popup: "drawer__popup",
|
|
722
|
+
portal: "drawer__portal",
|
|
723
|
+
root: "drawer",
|
|
724
|
+
title: "drawer__title",
|
|
725
|
+
trigger: "drawer__trigger",
|
|
726
|
+
viewport: "drawer__viewport"
|
|
547
727
|
},
|
|
548
|
-
variants: {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
728
|
+
variants: { position: {
|
|
729
|
+
bottom: { popup: "drawer--bottom" },
|
|
730
|
+
left: { popup: "drawer--left" },
|
|
731
|
+
right: { popup: "drawer--right" },
|
|
732
|
+
top: { popup: "drawer--top" }
|
|
552
733
|
} }
|
|
553
734
|
});
|
|
554
735
|
|
|
555
736
|
//#endregion
|
|
556
|
-
//#region src/components/
|
|
557
|
-
const
|
|
558
|
-
const
|
|
559
|
-
if (!
|
|
560
|
-
return
|
|
737
|
+
//#region src/components/drawer/use-drawer.ts
|
|
738
|
+
const useDrawer = () => {
|
|
739
|
+
const context = (0, react.useContext)(DrawerContext);
|
|
740
|
+
if (!context) throw new Error("useDrawer must be used within a DrawerProvider");
|
|
741
|
+
return context;
|
|
561
742
|
};
|
|
562
743
|
|
|
563
744
|
//#endregion
|
|
564
|
-
//#region src/components/
|
|
565
|
-
const
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
value: { slots },
|
|
570
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Field.Root, {
|
|
571
|
-
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
572
|
-
...props
|
|
573
|
-
})
|
|
745
|
+
//#region src/components/drawer/drawer.tsx
|
|
746
|
+
const Drawer = ({ position, ...props }) => {
|
|
747
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DrawerContext, {
|
|
748
|
+
value: { slots: (0, react.useMemo)(() => drawerVariants({ position }), [position]) },
|
|
749
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Root, { ...props })
|
|
574
750
|
});
|
|
575
751
|
};
|
|
576
|
-
const
|
|
577
|
-
const { slots } =
|
|
578
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.
|
|
579
|
-
className: (0, tailwind_variants.cn)(
|
|
752
|
+
const DrawerTrigger = ({ className, ...props }) => {
|
|
753
|
+
const { slots } = useDrawer();
|
|
754
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Trigger, {
|
|
755
|
+
className: (0, tailwind_variants.cn)(slots.trigger(), className),
|
|
580
756
|
...props
|
|
581
757
|
});
|
|
582
758
|
};
|
|
583
|
-
const
|
|
584
|
-
const { slots } =
|
|
585
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.
|
|
586
|
-
className: (0, tailwind_variants.cn)(
|
|
759
|
+
const DrawerPortal = ({ className, ...props }) => {
|
|
760
|
+
const { slots } = useDrawer();
|
|
761
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Portal, {
|
|
762
|
+
className: (0, tailwind_variants.cn)(slots.portal(), className),
|
|
587
763
|
...props
|
|
588
764
|
});
|
|
589
765
|
};
|
|
590
|
-
const
|
|
591
|
-
const { slots } =
|
|
592
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.
|
|
593
|
-
className: (0, tailwind_variants.cn)(
|
|
766
|
+
const DrawerBackdrop = ({ className, ...props }) => {
|
|
767
|
+
const { slots } = useDrawer();
|
|
768
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Backdrop, {
|
|
769
|
+
className: (0, tailwind_variants.cn)(slots.backdrop(), className),
|
|
770
|
+
...props
|
|
771
|
+
});
|
|
772
|
+
};
|
|
773
|
+
const DrawerViewport = ({ className, ...props }) => {
|
|
774
|
+
const { slots } = useDrawer();
|
|
775
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Viewport, {
|
|
776
|
+
className: (0, tailwind_variants.cn)(slots.viewport(), className),
|
|
777
|
+
...props
|
|
778
|
+
});
|
|
779
|
+
};
|
|
780
|
+
const DrawerPopup = ({ className, ...props }) => {
|
|
781
|
+
const { slots } = useDrawer();
|
|
782
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Popup, {
|
|
783
|
+
className: (0, tailwind_variants.cn)(slots.popup(), className),
|
|
784
|
+
...props
|
|
785
|
+
});
|
|
786
|
+
};
|
|
787
|
+
const DrawerTitle = ({ className, ...props }) => {
|
|
788
|
+
const { slots } = useDrawer();
|
|
789
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Title, {
|
|
790
|
+
className: (0, tailwind_variants.cn)(slots.title(), className),
|
|
594
791
|
...props
|
|
595
792
|
});
|
|
596
793
|
};
|
|
794
|
+
const DrawerDescription = ({ className, ...props }) => {
|
|
795
|
+
const { slots } = useDrawer();
|
|
796
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Description, {
|
|
797
|
+
className: (0, tailwind_variants.cn)(slots.description(), className),
|
|
798
|
+
...props
|
|
799
|
+
});
|
|
800
|
+
};
|
|
801
|
+
const DrawerClose = ({ className, children, ...props }) => {
|
|
802
|
+
const { slots } = useDrawer();
|
|
803
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Dialog.Close, {
|
|
804
|
+
className: (0, tailwind_variants.cn)(slots.close(), className),
|
|
805
|
+
...props,
|
|
806
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideX, {})
|
|
807
|
+
});
|
|
808
|
+
};
|
|
809
|
+
var drawer_default = Object.assign(Drawer, {
|
|
810
|
+
Backdrop: DrawerBackdrop,
|
|
811
|
+
Close: DrawerClose,
|
|
812
|
+
Description: DrawerDescription,
|
|
813
|
+
Popup: DrawerPopup,
|
|
814
|
+
Portal: DrawerPortal,
|
|
815
|
+
Root: Drawer,
|
|
816
|
+
Title: DrawerTitle,
|
|
817
|
+
Trigger: DrawerTrigger,
|
|
818
|
+
Viewport: DrawerViewport
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region src/components/field-error/field-error.variants.ts
|
|
823
|
+
const fieldErrorVariants = (0, tailwind_variants.tv)({ base: "field-error" });
|
|
824
|
+
|
|
825
|
+
//#endregion
|
|
826
|
+
//#region src/components/field-error/field-error.tsx
|
|
597
827
|
const FieldError = ({ className, ...props }) => {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
828
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.FieldError, {
|
|
829
|
+
className: (0, tailwind_variants.cn)(className, fieldErrorVariants()),
|
|
830
|
+
"data-slot": "field-error",
|
|
831
|
+
"data-visible": true,
|
|
601
832
|
...props
|
|
602
833
|
});
|
|
603
834
|
};
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
835
|
+
var field_error_default = FieldError;
|
|
836
|
+
|
|
837
|
+
//#endregion
|
|
838
|
+
//#region src/components/fieldset/fieldset.context.ts
|
|
839
|
+
const FieldsetContext = (0, react.createContext)(null);
|
|
840
|
+
|
|
841
|
+
//#endregion
|
|
842
|
+
//#region src/components/fieldset/fieldset.variants.ts
|
|
843
|
+
const fieldsetVariants = (0, tailwind_variants.tv)({ slots: {
|
|
844
|
+
legend: "fieldset__legend",
|
|
845
|
+
root: "fieldset"
|
|
846
|
+
} });
|
|
847
|
+
|
|
848
|
+
//#endregion
|
|
849
|
+
//#region src/components/fieldset/use-fieldset.ts
|
|
850
|
+
const useFieldset = () => {
|
|
851
|
+
const context = (0, react.useContext)(FieldsetContext);
|
|
852
|
+
if (!context) throw new Error("useFieldset must be used within a FieldsetProvider");
|
|
853
|
+
return context;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
//#endregion
|
|
857
|
+
//#region src/components/fieldset/fieldset.tsx
|
|
858
|
+
const Fieldset = ({ className, ...props }) => {
|
|
859
|
+
const slots = (0, react.useMemo)(() => fieldsetVariants(), []);
|
|
860
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldsetContext, {
|
|
861
|
+
value: { slots },
|
|
862
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Fieldset.Root, {
|
|
863
|
+
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
864
|
+
...props
|
|
865
|
+
})
|
|
866
|
+
});
|
|
867
|
+
};
|
|
868
|
+
const FieldsetLegend = ({ className, ...props }) => {
|
|
869
|
+
const { slots } = useFieldset();
|
|
870
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Fieldset.Legend, {
|
|
871
|
+
className: (0, tailwind_variants.cn)(slots.legend(), className),
|
|
872
|
+
...props
|
|
873
|
+
});
|
|
874
|
+
};
|
|
875
|
+
var fieldset_default = Object.assign(Fieldset, {
|
|
876
|
+
Legend: FieldsetLegend,
|
|
877
|
+
Root: Fieldset
|
|
878
|
+
});
|
|
610
879
|
|
|
611
880
|
//#endregion
|
|
612
881
|
//#region src/components/form/form.variants.ts
|
|
@@ -615,7 +884,7 @@ const formVariants = (0, tailwind_variants.tv)({ base: "form" });
|
|
|
615
884
|
//#endregion
|
|
616
885
|
//#region src/components/form/form.tsx
|
|
617
886
|
const Form = ({ className, ...props }) => {
|
|
618
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
887
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Form, {
|
|
619
888
|
className: (0, tailwind_variants.cn)(className, formVariants()),
|
|
620
889
|
...props
|
|
621
890
|
});
|
|
@@ -623,21 +892,36 @@ const Form = ({ className, ...props }) => {
|
|
|
623
892
|
var form_default = Form;
|
|
624
893
|
|
|
625
894
|
//#endregion
|
|
626
|
-
//#region src/components/
|
|
627
|
-
const
|
|
628
|
-
base: "
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
md: "input--md",
|
|
632
|
-
sm: "input--sm"
|
|
633
|
-
} }
|
|
895
|
+
//#region src/components/icon-button/icon-button.variants.ts
|
|
896
|
+
const iconButtonVariants = (0, tailwind_variants.tv)({
|
|
897
|
+
base: "icon-button",
|
|
898
|
+
defaultVariants: { isIconOnly: true },
|
|
899
|
+
extend: buttonVariants
|
|
634
900
|
});
|
|
635
901
|
|
|
902
|
+
//#endregion
|
|
903
|
+
//#region src/components/icon-button/icon-button.tsx
|
|
904
|
+
const IconButton = ({ className, variant, size, isIconOnly, ...props }) => {
|
|
905
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(button_default, {
|
|
906
|
+
className: (0, tailwind_variants.cn)(className, iconButtonVariants({
|
|
907
|
+
isIconOnly,
|
|
908
|
+
size,
|
|
909
|
+
variant
|
|
910
|
+
})),
|
|
911
|
+
...props
|
|
912
|
+
});
|
|
913
|
+
};
|
|
914
|
+
var icon_button_default = IconButton;
|
|
915
|
+
|
|
916
|
+
//#endregion
|
|
917
|
+
//#region src/components/input/input.variants.ts
|
|
918
|
+
const inputVariants = (0, tailwind_variants.tv)({ base: "input" });
|
|
919
|
+
|
|
636
920
|
//#endregion
|
|
637
921
|
//#region src/components/input/input.tsx
|
|
638
|
-
const Input = ({ className,
|
|
639
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
640
|
-
className: (0, tailwind_variants.cn)(className, inputVariants(
|
|
922
|
+
const Input = ({ className, ...props }) => {
|
|
923
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Input, {
|
|
924
|
+
className: (0, tailwind_variants.cn)(className, inputVariants()),
|
|
641
925
|
...props
|
|
642
926
|
});
|
|
643
927
|
};
|
|
@@ -650,7 +934,7 @@ const labelVariants = (0, tailwind_variants.tv)({ base: "label" });
|
|
|
650
934
|
//#endregion
|
|
651
935
|
//#region src/components/label/label.tsx
|
|
652
936
|
const Label = ({ className, ...props }) => {
|
|
653
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
937
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Label, {
|
|
654
938
|
className: (0, tailwind_variants.cn)(className, labelVariants()),
|
|
655
939
|
...props
|
|
656
940
|
});
|
|
@@ -716,9 +1000,10 @@ const ListItem = ({ className, ...props }) => {
|
|
|
716
1000
|
...props
|
|
717
1001
|
});
|
|
718
1002
|
};
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
1003
|
+
var list_default = Object.assign(List, {
|
|
1004
|
+
Item: ListItem,
|
|
1005
|
+
Root: List
|
|
1006
|
+
});
|
|
722
1007
|
|
|
723
1008
|
//#endregion
|
|
724
1009
|
//#region src/components/menu/menu.context.ts
|
|
@@ -797,11 +1082,12 @@ const MenuPopup = ({ className, ...props }) => {
|
|
|
797
1082
|
...props
|
|
798
1083
|
});
|
|
799
1084
|
};
|
|
800
|
-
const MenuArrow = ({ className, ...props }) => {
|
|
1085
|
+
const MenuArrow = ({ className, children, ...props }) => {
|
|
801
1086
|
const { slots } = useMenu();
|
|
802
1087
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Menu.Arrow, {
|
|
803
1088
|
className: (0, tailwind_variants.cn)(slots.arrow(), className),
|
|
804
|
-
...props
|
|
1089
|
+
...props,
|
|
1090
|
+
children: children ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucideChevronUp, {})
|
|
805
1091
|
});
|
|
806
1092
|
};
|
|
807
1093
|
const MenuItem = ({ className, ...props }) => {
|
|
@@ -863,23 +1149,24 @@ const MenuSubmenuTrigger = ({ className, ...props }) => {
|
|
|
863
1149
|
...props
|
|
864
1150
|
});
|
|
865
1151
|
};
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
Menu
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
1152
|
+
var menu_default = Object.assign(Menu, {
|
|
1153
|
+
Arrow: MenuArrow,
|
|
1154
|
+
Backdrop: MenuBackdrop,
|
|
1155
|
+
CheckboxItem: MenuCheckboxItem,
|
|
1156
|
+
Group: MenuGroup,
|
|
1157
|
+
GroupLabel: MenuGroupLabel,
|
|
1158
|
+
Item: MenuItem,
|
|
1159
|
+
Popup: MenuPopup,
|
|
1160
|
+
Portal: MenuPortal,
|
|
1161
|
+
Positioner: MenuPositioner,
|
|
1162
|
+
RadioGroup: MenuRadioGroup,
|
|
1163
|
+
RadioItem: MenuRadioItem,
|
|
1164
|
+
Root: Menu,
|
|
1165
|
+
Separator: MenuSeparator,
|
|
1166
|
+
Submenu: MenuSubmenu,
|
|
1167
|
+
SubmenuTrigger: MenuSubmenuTrigger,
|
|
1168
|
+
Trigger: MenuTrigger
|
|
1169
|
+
});
|
|
883
1170
|
|
|
884
1171
|
//#endregion
|
|
885
1172
|
//#region src/components/meter/meter.context.ts
|
|
@@ -961,12 +1248,34 @@ const MeterIndicator = ({ className, ...props }) => {
|
|
|
961
1248
|
...props
|
|
962
1249
|
});
|
|
963
1250
|
};
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
Meter
|
|
968
|
-
|
|
969
|
-
|
|
1251
|
+
var meter_default = Object.assign(Meter, {
|
|
1252
|
+
Indicator: MeterIndicator,
|
|
1253
|
+
Label: MeterLabel,
|
|
1254
|
+
Root: Meter,
|
|
1255
|
+
Track: MeterTrack,
|
|
1256
|
+
Value: MeterValue
|
|
1257
|
+
});
|
|
1258
|
+
|
|
1259
|
+
//#endregion
|
|
1260
|
+
//#region src/components/separator/separator.variants.ts
|
|
1261
|
+
const separatorVariants = (0, tailwind_variants.tv)({
|
|
1262
|
+
base: "separator",
|
|
1263
|
+
defaultVariants: { orientation: "horizontal" },
|
|
1264
|
+
variants: { orientation: {
|
|
1265
|
+
horizontal: "separator--horizontal",
|
|
1266
|
+
vertical: "separator--vertical"
|
|
1267
|
+
} }
|
|
1268
|
+
});
|
|
1269
|
+
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region src/components/separator/separator.tsx
|
|
1272
|
+
const Separator = ({ className, orientation, ...props }) => {
|
|
1273
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Separator, {
|
|
1274
|
+
className: (0, tailwind_variants.cn)(className, separatorVariants({ orientation })),
|
|
1275
|
+
...props
|
|
1276
|
+
});
|
|
1277
|
+
};
|
|
1278
|
+
var separator_default = Separator;
|
|
970
1279
|
|
|
971
1280
|
//#endregion
|
|
972
1281
|
//#region src/components/navbar/navbar.context.ts
|
|
@@ -1053,12 +1362,20 @@ const NavbarToggle = ({ className, ...props }) => {
|
|
|
1053
1362
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "size-5" })
|
|
1054
1363
|
});
|
|
1055
1364
|
};
|
|
1056
|
-
const NavbarMenu = ({ className, ...props }) => {
|
|
1057
|
-
const { slots, isOpen } = useNavbar();
|
|
1058
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1365
|
+
const NavbarMenu = ({ className, header, ...props }) => {
|
|
1366
|
+
const { slots, isOpen, onOpenChange } = useNavbar();
|
|
1367
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default, {
|
|
1368
|
+
onOpenChange,
|
|
1369
|
+
open: isOpen,
|
|
1370
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(drawer_default.Portal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default.Backdrop, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default.Viewport, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(drawer_default.Popup, { children: [
|
|
1371
|
+
header,
|
|
1372
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(drawer_default.Close, {}),
|
|
1373
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(separator_default, {}),
|
|
1374
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
|
|
1375
|
+
className: (0, tailwind_variants.cn)(slots.menu(), className),
|
|
1376
|
+
...props
|
|
1377
|
+
})
|
|
1378
|
+
] }) })] })
|
|
1062
1379
|
});
|
|
1063
1380
|
};
|
|
1064
1381
|
const NavbarMenuItem = ({ className, ...props }) => {
|
|
@@ -1068,36 +1385,450 @@ const NavbarMenuItem = ({ className, ...props }) => {
|
|
|
1068
1385
|
...props
|
|
1069
1386
|
});
|
|
1070
1387
|
};
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
Navbar
|
|
1079
|
-
|
|
1388
|
+
var navbar_default = Object.assign(Navbar, {
|
|
1389
|
+
Container: NavbarContainer,
|
|
1390
|
+
Content: NavbarContent,
|
|
1391
|
+
List: NavbarList,
|
|
1392
|
+
ListItem: NavbarListItem,
|
|
1393
|
+
Menu: NavbarMenu,
|
|
1394
|
+
MenuItem: NavbarMenuItem,
|
|
1395
|
+
Root: Navbar,
|
|
1396
|
+
Toggle: NavbarToggle
|
|
1397
|
+
});
|
|
1080
1398
|
|
|
1081
1399
|
//#endregion
|
|
1082
|
-
//#region src/components/
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1400
|
+
//#region src/components/overlay-trigger/overlay-trigger.tsx
|
|
1401
|
+
const OverlayTrigger = ({ ...props }) => {
|
|
1402
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.DialogTrigger, { ...props });
|
|
1403
|
+
};
|
|
1404
|
+
var overlay_trigger_default = OverlayTrigger;
|
|
1405
|
+
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region src/components/popover/popover.variants.ts
|
|
1408
|
+
const popoverVariants = (0, tailwind_variants.tv)({ base: "popover" });
|
|
1409
|
+
|
|
1410
|
+
//#endregion
|
|
1411
|
+
//#region src/components/popover/popover.tsx
|
|
1412
|
+
const Popover = ({ ...props }) => {
|
|
1413
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Popover, {
|
|
1414
|
+
className: (0, tailwind_variants.cn)(popoverVariants()),
|
|
1415
|
+
...props
|
|
1416
|
+
});
|
|
1417
|
+
};
|
|
1418
|
+
var popover_default = Popover;
|
|
1419
|
+
|
|
1420
|
+
//#endregion
|
|
1421
|
+
//#region src/components/progress/progress.context.ts
|
|
1422
|
+
const ProgressContext = (0, react.createContext)(null);
|
|
1423
|
+
|
|
1424
|
+
//#endregion
|
|
1425
|
+
//#region src/components/progress/progress.variants.ts
|
|
1426
|
+
const progressVariants = (0, tailwind_variants.tv)({
|
|
1427
|
+
defaultVariants: {
|
|
1428
|
+
size: "md",
|
|
1429
|
+
variant: "primary"
|
|
1430
|
+
},
|
|
1431
|
+
slots: {
|
|
1432
|
+
indicator: "progress__indicator",
|
|
1433
|
+
label: "progress__label",
|
|
1434
|
+
root: "progress",
|
|
1435
|
+
track: "progress__track",
|
|
1436
|
+
value: "progress__value"
|
|
1437
|
+
},
|
|
1438
|
+
variants: {
|
|
1439
|
+
size: {
|
|
1440
|
+
lg: { root: "progress--lg" },
|
|
1441
|
+
md: { root: "progress--md" },
|
|
1442
|
+
sm: { root: "progress--sm" }
|
|
1443
|
+
},
|
|
1444
|
+
variant: {
|
|
1445
|
+
danger: { root: "progress--danger" },
|
|
1446
|
+
primary: { root: "progress--primary" },
|
|
1447
|
+
secondary: { root: "progress--secondary" },
|
|
1448
|
+
success: { root: "progress--success" }
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1090
1451
|
});
|
|
1091
1452
|
|
|
1092
1453
|
//#endregion
|
|
1093
|
-
//#region src/components/
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
|
|
1454
|
+
//#region src/components/progress/use-progress.ts
|
|
1455
|
+
const useProgress = () => {
|
|
1456
|
+
const context = (0, react.useContext)(ProgressContext);
|
|
1457
|
+
if (!context) throw new Error("useProgress must be used within a ProgressProvider");
|
|
1458
|
+
return context;
|
|
1459
|
+
};
|
|
1460
|
+
|
|
1461
|
+
//#endregion
|
|
1462
|
+
//#region src/components/progress/progress.tsx
|
|
1463
|
+
const Progress = ({ className, variant, size, ...props }) => {
|
|
1464
|
+
const slots = (0, react.useMemo)(() => progressVariants({
|
|
1465
|
+
size,
|
|
1466
|
+
variant
|
|
1467
|
+
}), [variant, size]);
|
|
1468
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressContext, {
|
|
1469
|
+
value: { slots },
|
|
1470
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Root, {
|
|
1471
|
+
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
1472
|
+
...props
|
|
1473
|
+
})
|
|
1474
|
+
});
|
|
1475
|
+
};
|
|
1476
|
+
const ProgressLabel = ({ className, ...props }) => {
|
|
1477
|
+
const { slots } = useProgress();
|
|
1478
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Label, {
|
|
1479
|
+
className: (0, tailwind_variants.cn)(className, slots.label()),
|
|
1097
1480
|
...props
|
|
1098
1481
|
});
|
|
1099
1482
|
};
|
|
1100
|
-
|
|
1483
|
+
const ProgressValue = ({ className, ...props }) => {
|
|
1484
|
+
const { slots } = useProgress();
|
|
1485
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Value, {
|
|
1486
|
+
className: (0, tailwind_variants.cn)(className, slots.value()),
|
|
1487
|
+
...props
|
|
1488
|
+
});
|
|
1489
|
+
};
|
|
1490
|
+
const ProgressTrack = ({ className, ...props }) => {
|
|
1491
|
+
const { slots } = useProgress();
|
|
1492
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Track, {
|
|
1493
|
+
className: (0, tailwind_variants.cn)(className, slots.track()),
|
|
1494
|
+
...props
|
|
1495
|
+
});
|
|
1496
|
+
};
|
|
1497
|
+
const ProgressIndicator = ({ className, ...props }) => {
|
|
1498
|
+
const { slots } = useProgress();
|
|
1499
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Progress.Indicator, {
|
|
1500
|
+
className: (0, tailwind_variants.cn)(className, slots.indicator()),
|
|
1501
|
+
...props
|
|
1502
|
+
});
|
|
1503
|
+
};
|
|
1504
|
+
var progress_default = Object.assign(Progress, {
|
|
1505
|
+
Indicator: ProgressIndicator,
|
|
1506
|
+
Label: ProgressLabel,
|
|
1507
|
+
Root: Progress,
|
|
1508
|
+
Track: ProgressTrack,
|
|
1509
|
+
Value: ProgressValue
|
|
1510
|
+
});
|
|
1511
|
+
|
|
1512
|
+
//#endregion
|
|
1513
|
+
//#region src/components/radio/radio.context.ts
|
|
1514
|
+
const RadioContext = (0, react.createContext)(null);
|
|
1515
|
+
|
|
1516
|
+
//#endregion
|
|
1517
|
+
//#region src/components/radio/radio.variants.ts
|
|
1518
|
+
const radioVariants = (0, tailwind_variants.tv)({ slots: {
|
|
1519
|
+
indicator: "radio__indicator",
|
|
1520
|
+
root: "radio"
|
|
1521
|
+
} });
|
|
1522
|
+
|
|
1523
|
+
//#endregion
|
|
1524
|
+
//#region src/components/radio/use-radio.ts
|
|
1525
|
+
const useRadio = () => {
|
|
1526
|
+
const context = (0, react.useContext)(RadioContext);
|
|
1527
|
+
if (!context) throw new Error("useRadio must be used within a RadioProvider");
|
|
1528
|
+
return context;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
//#endregion
|
|
1532
|
+
//#region src/components/radio/radio.tsx
|
|
1533
|
+
const Radio = ({ className, ...props }) => {
|
|
1534
|
+
const slots = (0, react.useMemo)(() => radioVariants({}), []);
|
|
1535
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioContext, {
|
|
1536
|
+
value: { slots },
|
|
1537
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Radio.Root, {
|
|
1538
|
+
className: (0, tailwind_variants.cn)(slots.root(), className),
|
|
1539
|
+
...props
|
|
1540
|
+
})
|
|
1541
|
+
});
|
|
1542
|
+
};
|
|
1543
|
+
const RadioIndicator = ({ className, ...props }) => {
|
|
1544
|
+
const { slots } = useRadio();
|
|
1545
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Radio.Indicator, {
|
|
1546
|
+
className: (0, tailwind_variants.cn)(slots.indicator(), className),
|
|
1547
|
+
...props
|
|
1548
|
+
});
|
|
1549
|
+
};
|
|
1550
|
+
var radio_default = Object.assign(Radio, {
|
|
1551
|
+
Indicator: RadioIndicator,
|
|
1552
|
+
Root: Radio
|
|
1553
|
+
});
|
|
1554
|
+
|
|
1555
|
+
//#endregion
|
|
1556
|
+
//#region src/components/radio-group/radio-group.variants.ts
|
|
1557
|
+
const radioGroupVariants = (0, tailwind_variants.tv)({ base: "radio-group" });
|
|
1558
|
+
|
|
1559
|
+
//#endregion
|
|
1560
|
+
//#region src/components/radio-group/radio-group.tsx
|
|
1561
|
+
const RadioGroup = ({ className, ...props }) => {
|
|
1562
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.RadioGroup, {
|
|
1563
|
+
className: (0, tailwind_variants.cn)(className, (0, react.useMemo)(() => radioGroupVariants(), [])),
|
|
1564
|
+
...props
|
|
1565
|
+
});
|
|
1566
|
+
};
|
|
1567
|
+
var radio_group_default = RadioGroup;
|
|
1568
|
+
|
|
1569
|
+
//#endregion
|
|
1570
|
+
//#region src/components/select/select.context.ts
|
|
1571
|
+
const SelectContext = (0, react.createContext)(null);
|
|
1572
|
+
|
|
1573
|
+
//#endregion
|
|
1574
|
+
//#region src/components/select/select.variants.ts
|
|
1575
|
+
const selectVariants = (0, tailwind_variants.tv)({ slots: {
|
|
1576
|
+
control: "select__control",
|
|
1577
|
+
description: "select__description",
|
|
1578
|
+
error: "select__error",
|
|
1579
|
+
label: "select__label",
|
|
1580
|
+
option: "select__option",
|
|
1581
|
+
root: "select"
|
|
1582
|
+
} });
|
|
1583
|
+
|
|
1584
|
+
//#endregion
|
|
1585
|
+
//#region src/components/select/use-select.ts
|
|
1586
|
+
const useSelect = () => {
|
|
1587
|
+
const context = (0, react.useContext)(SelectContext);
|
|
1588
|
+
if (!context) throw new Error("useSelect must be used within a SelectProvider");
|
|
1589
|
+
return context;
|
|
1590
|
+
};
|
|
1591
|
+
|
|
1592
|
+
//#endregion
|
|
1593
|
+
//#region src/components/select/select.tsx
|
|
1594
|
+
const Select = ({ className, ...props }) => {
|
|
1595
|
+
const slots = (0, react.useMemo)(() => selectVariants(), []);
|
|
1596
|
+
const generatedId = (0, react.useId)();
|
|
1597
|
+
const inputId = props.id || generatedId;
|
|
1598
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectContext.Provider, {
|
|
1599
|
+
value: {
|
|
1600
|
+
id: inputId,
|
|
1601
|
+
slots
|
|
1602
|
+
},
|
|
1603
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1604
|
+
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
1605
|
+
...props
|
|
1606
|
+
})
|
|
1607
|
+
});
|
|
1608
|
+
};
|
|
1609
|
+
const SelectLabel = ({ className, ...props }) => {
|
|
1610
|
+
const { slots, id } = useSelect();
|
|
1611
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
|
|
1612
|
+
className: (0, tailwind_variants.cn)(className, slots.label()),
|
|
1613
|
+
htmlFor: id,
|
|
1614
|
+
...props
|
|
1615
|
+
});
|
|
1616
|
+
};
|
|
1617
|
+
const SelectControl = ({ className, ...props }) => {
|
|
1618
|
+
const { slots, id } = useSelect();
|
|
1619
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
1620
|
+
className: (0, tailwind_variants.cn)(className, slots.control()),
|
|
1621
|
+
id,
|
|
1622
|
+
...props
|
|
1623
|
+
});
|
|
1624
|
+
};
|
|
1625
|
+
const SelectOption = ({ className, ...props }) => {
|
|
1626
|
+
const { slots } = useSelect();
|
|
1627
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
1628
|
+
className: (0, tailwind_variants.cn)(className, slots.option()),
|
|
1629
|
+
...props
|
|
1630
|
+
});
|
|
1631
|
+
};
|
|
1632
|
+
const SelectDescription = ({ className, ...props }) => {
|
|
1633
|
+
const { slots } = useSelect();
|
|
1634
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1635
|
+
className: (0, tailwind_variants.cn)(className, slots.description()),
|
|
1636
|
+
...props
|
|
1637
|
+
});
|
|
1638
|
+
};
|
|
1639
|
+
const SelectError = ({ className, ...props }) => {
|
|
1640
|
+
const { slots } = useSelect();
|
|
1641
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
1642
|
+
className: (0, tailwind_variants.cn)(className, slots.error()),
|
|
1643
|
+
...props
|
|
1644
|
+
});
|
|
1645
|
+
};
|
|
1646
|
+
var select_default = Object.assign(Select, {
|
|
1647
|
+
Control: SelectControl,
|
|
1648
|
+
Description: SelectDescription,
|
|
1649
|
+
Error: SelectError,
|
|
1650
|
+
Label: SelectLabel,
|
|
1651
|
+
Option: SelectOption,
|
|
1652
|
+
Root: Select
|
|
1653
|
+
});
|
|
1654
|
+
|
|
1655
|
+
//#endregion
|
|
1656
|
+
//#region src/components/sidebar/sidebar.context.ts
|
|
1657
|
+
const SidebarContext = (0, react.createContext)(null);
|
|
1658
|
+
|
|
1659
|
+
//#endregion
|
|
1660
|
+
//#region src/components/sidebar/sidebar.variants.ts
|
|
1661
|
+
const sidebarVariants = (0, tailwind_variants.tv)({ slots: {
|
|
1662
|
+
content: "sidebar__content",
|
|
1663
|
+
footer: "sidebar__footer",
|
|
1664
|
+
header: "sidebar__header",
|
|
1665
|
+
outlet: "sidebar__outlet",
|
|
1666
|
+
panel: "sidebar__panel",
|
|
1667
|
+
root: "sidebar",
|
|
1668
|
+
trigger: "sidebar__trigger"
|
|
1669
|
+
} });
|
|
1670
|
+
|
|
1671
|
+
//#endregion
|
|
1672
|
+
//#region src/components/sidebar/use-sidebar.ts
|
|
1673
|
+
const useSidebar = () => {
|
|
1674
|
+
const context = (0, react.useContext)(SidebarContext);
|
|
1675
|
+
if (!context) throw new Error("useSidebar must be used within a SidebarProvider");
|
|
1676
|
+
return context;
|
|
1677
|
+
};
|
|
1678
|
+
|
|
1679
|
+
//#endregion
|
|
1680
|
+
//#region src/components/sidebar/sidebar.tsx
|
|
1681
|
+
const Sidebar = ({ className, isOpen, onOpenChange, ...props }) => {
|
|
1682
|
+
const [internalIsOpen, setInternalIsOpen] = react.default.useState(false);
|
|
1683
|
+
const isOpenState = isOpen !== void 0 ? isOpen : internalIsOpen;
|
|
1684
|
+
const handleOpenChange = onOpenChange || setInternalIsOpen;
|
|
1685
|
+
const slots = (0, react.useMemo)(() => sidebarVariants({ className }), [className]);
|
|
1686
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarContext, {
|
|
1687
|
+
value: {
|
|
1688
|
+
isOpen: isOpenState,
|
|
1689
|
+
onOpenChange: handleOpenChange,
|
|
1690
|
+
slots
|
|
1691
|
+
},
|
|
1692
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1693
|
+
className: slots.root(),
|
|
1694
|
+
"data-open": isOpenState,
|
|
1695
|
+
...props
|
|
1696
|
+
})
|
|
1697
|
+
});
|
|
1698
|
+
};
|
|
1699
|
+
const SidebarPanel = ({ className, ...props }) => {
|
|
1700
|
+
const { slots } = useSidebar();
|
|
1701
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", {
|
|
1702
|
+
className: (0, tailwind_variants.cn)(slots.panel(), className),
|
|
1703
|
+
...props
|
|
1704
|
+
});
|
|
1705
|
+
};
|
|
1706
|
+
const SidebarHeader = ({ className, ...props }) => {
|
|
1707
|
+
const { slots } = useSidebar();
|
|
1708
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
|
|
1709
|
+
className: (0, tailwind_variants.cn)(slots.header(), className),
|
|
1710
|
+
...props
|
|
1711
|
+
});
|
|
1712
|
+
};
|
|
1713
|
+
const SidebarContent = ({ className, ...props }) => {
|
|
1714
|
+
const { slots } = useSidebar();
|
|
1715
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1716
|
+
className: (0, tailwind_variants.cn)(slots.content(), className),
|
|
1717
|
+
...props
|
|
1718
|
+
});
|
|
1719
|
+
};
|
|
1720
|
+
const SidebarFooter = ({ className, ...props }) => {
|
|
1721
|
+
const { slots } = useSidebar();
|
|
1722
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", {
|
|
1723
|
+
className: (0, tailwind_variants.cn)(slots.footer(), className),
|
|
1724
|
+
...props
|
|
1725
|
+
});
|
|
1726
|
+
};
|
|
1727
|
+
const SidebarTrigger = ({ className, children, ...props }) => {
|
|
1728
|
+
const { slots, isOpen, onOpenChange } = useSidebar();
|
|
1729
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1730
|
+
"aria-expanded": isOpen,
|
|
1731
|
+
className: (0, tailwind_variants.cn)(slots.trigger(), className),
|
|
1732
|
+
onClick: () => onOpenChange(!isOpen),
|
|
1733
|
+
...props,
|
|
1734
|
+
children: children ?? (isOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucidePanelLeftClose, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LucidePanelLeftOpen, {}))
|
|
1735
|
+
});
|
|
1736
|
+
};
|
|
1737
|
+
const SidebarOutlet = ({ className, ...props }) => {
|
|
1738
|
+
const { slots } = useSidebar();
|
|
1739
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1740
|
+
className: (0, tailwind_variants.cn)(slots.outlet(), className),
|
|
1741
|
+
...props
|
|
1742
|
+
});
|
|
1743
|
+
};
|
|
1744
|
+
var sidebar_default = Object.assign(Sidebar, {
|
|
1745
|
+
Content: SidebarContent,
|
|
1746
|
+
Footer: SidebarFooter,
|
|
1747
|
+
Header: SidebarHeader,
|
|
1748
|
+
Outlet: SidebarOutlet,
|
|
1749
|
+
Panel: SidebarPanel,
|
|
1750
|
+
Root: Sidebar,
|
|
1751
|
+
Trigger: SidebarTrigger
|
|
1752
|
+
});
|
|
1753
|
+
|
|
1754
|
+
//#endregion
|
|
1755
|
+
//#region src/components/slider/slider.context.ts
|
|
1756
|
+
const SliderContext = (0, react.createContext)(null);
|
|
1757
|
+
|
|
1758
|
+
//#endregion
|
|
1759
|
+
//#region src/components/slider/slider.variants.ts
|
|
1760
|
+
const sliderVariants = (0, tailwind_variants.tv)({ slots: {
|
|
1761
|
+
control: "slider__control",
|
|
1762
|
+
indicator: "slider__indicator",
|
|
1763
|
+
root: "slider",
|
|
1764
|
+
thumb: "slider__thumb",
|
|
1765
|
+
track: "slider__track",
|
|
1766
|
+
value: "slider__value"
|
|
1767
|
+
} });
|
|
1768
|
+
|
|
1769
|
+
//#endregion
|
|
1770
|
+
//#region src/components/slider/use-slider.tsx
|
|
1771
|
+
const useSlider = () => {
|
|
1772
|
+
const context = (0, react.useContext)(SliderContext);
|
|
1773
|
+
if (!context) throw new Error("useSlider must be used within a SliderProvider");
|
|
1774
|
+
return context;
|
|
1775
|
+
};
|
|
1776
|
+
|
|
1777
|
+
//#endregion
|
|
1778
|
+
//#region src/components/slider/slider.tsx
|
|
1779
|
+
const Slider = ({ className, ...props }) => {
|
|
1780
|
+
const slots = (0, react.useMemo)(() => sliderVariants(), []);
|
|
1781
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SliderContext, {
|
|
1782
|
+
value: { slots },
|
|
1783
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Root, {
|
|
1784
|
+
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
1785
|
+
...props
|
|
1786
|
+
})
|
|
1787
|
+
});
|
|
1788
|
+
};
|
|
1789
|
+
const SliderValue = ({ className, ...props }) => {
|
|
1790
|
+
const { slots } = useSlider();
|
|
1791
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Value, {
|
|
1792
|
+
className: (0, tailwind_variants.cn)(className, slots.value()),
|
|
1793
|
+
...props
|
|
1794
|
+
});
|
|
1795
|
+
};
|
|
1796
|
+
const SliderControl = ({ className, ...props }) => {
|
|
1797
|
+
const { slots } = useSlider();
|
|
1798
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Control, {
|
|
1799
|
+
className: (0, tailwind_variants.cn)(className, slots.control()),
|
|
1800
|
+
...props
|
|
1801
|
+
});
|
|
1802
|
+
};
|
|
1803
|
+
const SliderTrack = ({ className, ...props }) => {
|
|
1804
|
+
const { slots } = useSlider();
|
|
1805
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Track, {
|
|
1806
|
+
className: (0, tailwind_variants.cn)(className, slots.track()),
|
|
1807
|
+
...props
|
|
1808
|
+
});
|
|
1809
|
+
};
|
|
1810
|
+
const SliderIndicator = ({ className, ...props }) => {
|
|
1811
|
+
const { slots } = useSlider();
|
|
1812
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Indicator, {
|
|
1813
|
+
className: (0, tailwind_variants.cn)(className, slots.indicator()),
|
|
1814
|
+
...props
|
|
1815
|
+
});
|
|
1816
|
+
};
|
|
1817
|
+
const SliderThumb = ({ className, ...props }) => {
|
|
1818
|
+
const { slots } = useSlider();
|
|
1819
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react.Slider.Thumb, {
|
|
1820
|
+
className: (0, tailwind_variants.cn)(className, slots.thumb()),
|
|
1821
|
+
...props
|
|
1822
|
+
});
|
|
1823
|
+
};
|
|
1824
|
+
var slider_default = Object.assign(Slider, {
|
|
1825
|
+
Control: SliderControl,
|
|
1826
|
+
Indicator: SliderIndicator,
|
|
1827
|
+
Root: Slider,
|
|
1828
|
+
Thumb: SliderThumb,
|
|
1829
|
+
Track: SliderTrack,
|
|
1830
|
+
Value: SliderValue
|
|
1831
|
+
});
|
|
1101
1832
|
|
|
1102
1833
|
//#endregion
|
|
1103
1834
|
//#region src/components/switch/switch.context.ts
|
|
@@ -1145,9 +1876,98 @@ const SwitchThumb = ({ className, ...props }) => {
|
|
|
1145
1876
|
...props
|
|
1146
1877
|
});
|
|
1147
1878
|
};
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1879
|
+
var switch_default = Object.assign(Switch, {
|
|
1880
|
+
Root: Switch,
|
|
1881
|
+
Thumb: SwitchThumb
|
|
1882
|
+
});
|
|
1883
|
+
|
|
1884
|
+
//#endregion
|
|
1885
|
+
//#region src/components/table/table.context.ts
|
|
1886
|
+
const TableContext = (0, react.createContext)(null);
|
|
1887
|
+
|
|
1888
|
+
//#endregion
|
|
1889
|
+
//#region src/components/table/table.variants.ts
|
|
1890
|
+
const tableVariants = (0, tailwind_variants.tv)({ slots: {
|
|
1891
|
+
root: "table",
|
|
1892
|
+
tbody: "table__tbody",
|
|
1893
|
+
td: "table__td",
|
|
1894
|
+
tfoot: "table__tfoot",
|
|
1895
|
+
th: "table__th",
|
|
1896
|
+
thead: "table__thead",
|
|
1897
|
+
tr: "table__tr"
|
|
1898
|
+
} });
|
|
1899
|
+
|
|
1900
|
+
//#endregion
|
|
1901
|
+
//#region src/components/table/use-table.ts
|
|
1902
|
+
const useTable = () => {
|
|
1903
|
+
const context = (0, react.useContext)(TableContext);
|
|
1904
|
+
if (!context) throw new Error("useTable must be used within a TableProvider");
|
|
1905
|
+
return context;
|
|
1906
|
+
};
|
|
1907
|
+
|
|
1908
|
+
//#endregion
|
|
1909
|
+
//#region src/components/table/table.tsx
|
|
1910
|
+
const Table = ({ className, ...props }) => {
|
|
1911
|
+
const slots = (0, react.useMemo)(() => tableVariants(), []);
|
|
1912
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableContext, {
|
|
1913
|
+
value: { slots },
|
|
1914
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("table", {
|
|
1915
|
+
className: (0, tailwind_variants.cn)(className, slots.root()),
|
|
1916
|
+
...props
|
|
1917
|
+
})
|
|
1918
|
+
});
|
|
1919
|
+
};
|
|
1920
|
+
const TableHead = ({ className, ...props }) => {
|
|
1921
|
+
const { slots } = useTable();
|
|
1922
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", {
|
|
1923
|
+
className: (0, tailwind_variants.cn)(className, slots.thead()),
|
|
1924
|
+
...props
|
|
1925
|
+
});
|
|
1926
|
+
};
|
|
1927
|
+
const TableRow = ({ className, ...props }) => {
|
|
1928
|
+
const { slots } = useTable();
|
|
1929
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", {
|
|
1930
|
+
className: (0, tailwind_variants.cn)(className, slots.tr()),
|
|
1931
|
+
...props
|
|
1932
|
+
});
|
|
1933
|
+
};
|
|
1934
|
+
const TableHeaderCell = ({ className, ...props }) => {
|
|
1935
|
+
const { slots } = useTable();
|
|
1936
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", {
|
|
1937
|
+
className: (0, tailwind_variants.cn)(className, slots.th()),
|
|
1938
|
+
...props
|
|
1939
|
+
});
|
|
1940
|
+
};
|
|
1941
|
+
const TableBody = ({ className, ...props }) => {
|
|
1942
|
+
const { slots } = useTable();
|
|
1943
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
1944
|
+
className: (0, tailwind_variants.cn)(className, slots.tbody()),
|
|
1945
|
+
...props
|
|
1946
|
+
});
|
|
1947
|
+
};
|
|
1948
|
+
const TableDataCell = ({ className, ...props }) => {
|
|
1949
|
+
const { slots } = useTable();
|
|
1950
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
1951
|
+
className: (0, tailwind_variants.cn)(className, slots.td()),
|
|
1952
|
+
...props
|
|
1953
|
+
});
|
|
1954
|
+
};
|
|
1955
|
+
const TableFooter = ({ className, ...props }) => {
|
|
1956
|
+
const { slots } = useTable();
|
|
1957
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", {
|
|
1958
|
+
className: (0, tailwind_variants.cn)(className, slots.tfoot()),
|
|
1959
|
+
...props
|
|
1960
|
+
});
|
|
1961
|
+
};
|
|
1962
|
+
var table_default = Object.assign(Table, {
|
|
1963
|
+
Body: TableBody,
|
|
1964
|
+
DataCell: TableDataCell,
|
|
1965
|
+
Footer: TableFooter,
|
|
1966
|
+
Head: TableHead,
|
|
1967
|
+
HeaderCell: TableHeaderCell,
|
|
1968
|
+
Root: Table,
|
|
1969
|
+
Row: TableRow
|
|
1970
|
+
});
|
|
1151
1971
|
|
|
1152
1972
|
//#endregion
|
|
1153
1973
|
//#region src/components/tabs/tabs.context.ts
|
|
@@ -1211,12 +2031,13 @@ const TabsPanel = ({ className, ...props }) => {
|
|
|
1211
2031
|
...props
|
|
1212
2032
|
});
|
|
1213
2033
|
};
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
2034
|
+
var tabs_default = Object.assign(Tabs, {
|
|
2035
|
+
Indicator: TabsIndicator,
|
|
2036
|
+
List: TabsList,
|
|
2037
|
+
Panel: TabsPanel,
|
|
2038
|
+
Root: Tabs,
|
|
2039
|
+
Tab: TabsTab
|
|
2040
|
+
});
|
|
1220
2041
|
|
|
1221
2042
|
//#endregion
|
|
1222
2043
|
//#region src/components/text/text.variants.ts
|
|
@@ -1225,7 +2046,7 @@ const textVariants = (0, tailwind_variants.tv)({ base: "text" });
|
|
|
1225
2046
|
//#endregion
|
|
1226
2047
|
//#region src/components/text/text.tsx
|
|
1227
2048
|
const Text = ({ className, ...props }) => {
|
|
1228
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2049
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Text, {
|
|
1229
2050
|
className: (0, tailwind_variants.cn)(textVariants(), className),
|
|
1230
2051
|
"data-slot": "text",
|
|
1231
2052
|
...props
|
|
@@ -1233,17 +2054,28 @@ const Text = ({ className, ...props }) => {
|
|
|
1233
2054
|
};
|
|
1234
2055
|
var text_default = Text;
|
|
1235
2056
|
|
|
2057
|
+
//#endregion
|
|
2058
|
+
//#region src/components/text-field/text-field.variants.ts
|
|
2059
|
+
const textFieldVariants = (0, tailwind_variants.tv)({ base: "text-field" });
|
|
2060
|
+
|
|
2061
|
+
//#endregion
|
|
2062
|
+
//#region src/components/text-field/text-field.tsx
|
|
2063
|
+
const TextField = ({ className, ...props }) => {
|
|
2064
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.TextField, {
|
|
2065
|
+
className: (0, tailwind_variants.cn)(className, textFieldVariants()),
|
|
2066
|
+
...props
|
|
2067
|
+
});
|
|
2068
|
+
};
|
|
2069
|
+
var text_field_default = TextField;
|
|
2070
|
+
|
|
1236
2071
|
//#endregion
|
|
1237
2072
|
//#region src/components/textarea/textarea.variants.ts
|
|
1238
|
-
const textareaVariants = (0, tailwind_variants.tv)({
|
|
1239
|
-
base: "textarea",
|
|
1240
|
-
extend: inputVariants
|
|
1241
|
-
});
|
|
2073
|
+
const textareaVariants = (0, tailwind_variants.tv)({ base: "textarea" });
|
|
1242
2074
|
|
|
1243
2075
|
//#endregion
|
|
1244
2076
|
//#region src/components/textarea/textarea.tsx
|
|
1245
2077
|
const Textarea = ({ className, ...props }) => {
|
|
1246
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
2078
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.TextArea, {
|
|
1247
2079
|
className: (0, tailwind_variants.cn)(className, textareaVariants()),
|
|
1248
2080
|
...props
|
|
1249
2081
|
});
|
|
@@ -1272,17 +2104,22 @@ var toggle_button_default = ToggleButton;
|
|
|
1272
2104
|
|
|
1273
2105
|
//#endregion
|
|
1274
2106
|
exports.Accordion = accordion_default;
|
|
2107
|
+
exports.Alert = alert_default;
|
|
2108
|
+
exports.AlertDialog = alert_dialog_default;
|
|
1275
2109
|
exports.Avatar = avatar_default;
|
|
1276
2110
|
exports.Button = button_default;
|
|
1277
2111
|
exports.ButtonGroup = button_group_default;
|
|
1278
2112
|
exports.Card = card_default;
|
|
1279
|
-
exports.Checkbox = checkbox_default;
|
|
1280
2113
|
exports.CheckboxGroup = checkbox_group_default;
|
|
1281
2114
|
exports.Chip = chip_default;
|
|
1282
2115
|
exports.Container = container_default;
|
|
2116
|
+
exports.Description = description_default;
|
|
1283
2117
|
exports.Dialog = dialog_default;
|
|
1284
|
-
exports.
|
|
2118
|
+
exports.Drawer = drawer_default;
|
|
2119
|
+
exports.FieldError = field_error_default;
|
|
2120
|
+
exports.Fieldset = fieldset_default;
|
|
1285
2121
|
exports.Form = form_default;
|
|
2122
|
+
exports.IconButton = icon_button_default;
|
|
1286
2123
|
exports.Input = input_default;
|
|
1287
2124
|
exports.Label = label_default;
|
|
1288
2125
|
exports.Link = link_default;
|
|
@@ -1290,19 +2127,30 @@ exports.List = list_default;
|
|
|
1290
2127
|
exports.Menu = menu_default;
|
|
1291
2128
|
exports.Meter = meter_default;
|
|
1292
2129
|
exports.Navbar = navbar_default;
|
|
2130
|
+
exports.OverlayTrigger = overlay_trigger_default;
|
|
2131
|
+
exports.Popover = popover_default;
|
|
2132
|
+
exports.Progress = progress_default;
|
|
2133
|
+
exports.Radio = radio_default;
|
|
2134
|
+
exports.RadioGroup = radio_group_default;
|
|
2135
|
+
exports.Select = select_default;
|
|
1293
2136
|
exports.Separator = separator_default;
|
|
2137
|
+
exports.Sidebar = sidebar_default;
|
|
2138
|
+
exports.Slider = slider_default;
|
|
1294
2139
|
exports.Switch = switch_default;
|
|
2140
|
+
exports.Table = table_default;
|
|
1295
2141
|
exports.Tabs = tabs_default;
|
|
1296
2142
|
exports.Text = text_default;
|
|
2143
|
+
exports.TextField = text_field_default;
|
|
1297
2144
|
exports.Textarea = textarea_default;
|
|
1298
2145
|
exports.ToggleButton = toggle_button_default;
|
|
1299
2146
|
exports.accordionVariants = accordionVariants;
|
|
2147
|
+
exports.alertDialogVariants = alertDialogVariants;
|
|
2148
|
+
exports.alertVariants = alertVariants;
|
|
1300
2149
|
exports.avatarVariants = avatarVariants;
|
|
1301
2150
|
exports.buttonGroupVariants = buttonGroupVariants;
|
|
1302
2151
|
exports.buttonVariants = buttonVariants;
|
|
1303
2152
|
exports.cardVariants = cardVariants;
|
|
1304
2153
|
exports.checkboxGroupVariants = checkboxGroupVariants;
|
|
1305
|
-
exports.checkboxVariants = checkboxVariants;
|
|
1306
2154
|
exports.chipVariants = chipVariants;
|
|
1307
2155
|
Object.defineProperty(exports, 'cn', {
|
|
1308
2156
|
enumerable: true,
|
|
@@ -1311,9 +2159,13 @@ Object.defineProperty(exports, 'cn', {
|
|
|
1311
2159
|
}
|
|
1312
2160
|
});
|
|
1313
2161
|
exports.containerVariants = containerVariants;
|
|
2162
|
+
exports.descriptionVariants = descriptionVariants;
|
|
1314
2163
|
exports.dialogVariants = dialogVariants;
|
|
1315
|
-
exports.
|
|
2164
|
+
exports.drawerVariants = drawerVariants;
|
|
2165
|
+
exports.fieldErrorVariants = fieldErrorVariants;
|
|
2166
|
+
exports.fieldsetVariants = fieldsetVariants;
|
|
1316
2167
|
exports.formVariants = formVariants;
|
|
2168
|
+
exports.iconButtonVariants = iconButtonVariants;
|
|
1317
2169
|
exports.inputVariants = inputVariants;
|
|
1318
2170
|
exports.labelVariants = labelVariants;
|
|
1319
2171
|
exports.linkVariants = linkVariants;
|
|
@@ -1321,9 +2173,18 @@ exports.listVariants = listVariants;
|
|
|
1321
2173
|
exports.menuVariants = menuVariants;
|
|
1322
2174
|
exports.meterVariants = meterVariants;
|
|
1323
2175
|
exports.navbarVariants = navbarVariants;
|
|
2176
|
+
exports.popoverVariants = popoverVariants;
|
|
2177
|
+
exports.progressVariants = progressVariants;
|
|
2178
|
+
exports.radioGroupVariants = radioGroupVariants;
|
|
2179
|
+
exports.radioVariants = radioVariants;
|
|
2180
|
+
exports.selectVariants = selectVariants;
|
|
1324
2181
|
exports.separatorVariants = separatorVariants;
|
|
2182
|
+
exports.sidebarVariants = sidebarVariants;
|
|
2183
|
+
exports.sliderVariants = sliderVariants;
|
|
1325
2184
|
exports.switchVariants = switchVariants;
|
|
2185
|
+
exports.tableVariants = tableVariants;
|
|
1326
2186
|
exports.tabsVariants = tabsVariants;
|
|
2187
|
+
exports.textFieldVariants = textFieldVariants;
|
|
1327
2188
|
exports.textVariants = textVariants;
|
|
1328
2189
|
exports.textareaVariants = textareaVariants;
|
|
1329
2190
|
exports.toggleButtonVariants = toggleButtonVariants;
|