@pos-360/horizon 0.6.1 → 0.7.0
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/{chunk-FQAGXP5O.js → chunk-4GEUF55E.js} +6 -6
- package/dist/chunk-4GEUF55E.js.map +1 -0
- package/dist/{chunk-MB2CYZNV.mjs → chunk-PEL2DCBC.mjs} +301 -97
- package/dist/chunk-PEL2DCBC.mjs.map +1 -0
- package/dist/{chunk-RLWM76LJ.js → chunk-T6DNK3SI.js} +304 -97
- package/dist/chunk-T6DNK3SI.js.map +1 -0
- package/dist/{chunk-EBJJNTPC.mjs → chunk-WLBF2GR6.mjs} +6 -6
- package/dist/chunk-WLBF2GR6.mjs.map +1 -0
- package/dist/enhanced.d.mts +1 -1
- package/dist/enhanced.d.ts +1 -1
- package/dist/enhanced.js +27 -27
- package/dist/enhanced.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +121 -109
- package/dist/index.mjs +2 -2
- package/dist/primitives.d.mts +41 -3
- package/dist/primitives.d.ts +41 -3
- package/dist/primitives.js +94 -82
- package/dist/primitives.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-EBJJNTPC.mjs.map +0 -1
- package/dist/chunk-FQAGXP5O.js.map +0 -1
- package/dist/chunk-MB2CYZNV.mjs.map +0 -1
- package/dist/chunk-RLWM76LJ.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkYO72COII_js = require('./chunk-YO72COII.js');
|
|
4
|
-
var
|
|
4
|
+
var React9 = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -32,7 +32,7 @@ function _interopNamespace(e) {
|
|
|
32
32
|
return Object.freeze(n);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var React9__namespace = /*#__PURE__*/_interopNamespace(React9);
|
|
36
36
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
37
37
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
38
38
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
@@ -65,7 +65,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
);
|
|
68
|
-
var Button =
|
|
68
|
+
var Button = React9__namespace.forwardRef(
|
|
69
69
|
({
|
|
70
70
|
className,
|
|
71
71
|
variant,
|
|
@@ -105,7 +105,7 @@ var Button = React6__namespace.forwardRef(
|
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
Button.displayName = "Button";
|
|
108
|
-
var Card =
|
|
108
|
+
var Card = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
109
109
|
"div",
|
|
110
110
|
{
|
|
111
111
|
ref,
|
|
@@ -117,7 +117,7 @@ var Card = React6__namespace.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
117
117
|
}
|
|
118
118
|
));
|
|
119
119
|
Card.displayName = "Card";
|
|
120
|
-
var CardHeader =
|
|
120
|
+
var CardHeader = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
123
123
|
ref,
|
|
@@ -126,7 +126,7 @@ var CardHeader = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
126
126
|
}
|
|
127
127
|
));
|
|
128
128
|
CardHeader.displayName = "CardHeader";
|
|
129
|
-
var CardTitle =
|
|
129
|
+
var CardTitle = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
130
130
|
"div",
|
|
131
131
|
{
|
|
132
132
|
ref,
|
|
@@ -135,7 +135,7 @@ var CardTitle = React6__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
135
135
|
}
|
|
136
136
|
));
|
|
137
137
|
CardTitle.displayName = "CardTitle";
|
|
138
|
-
var CardDescription =
|
|
138
|
+
var CardDescription = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
139
139
|
"div",
|
|
140
140
|
{
|
|
141
141
|
ref,
|
|
@@ -144,7 +144,7 @@ var CardDescription = React6__namespace.forwardRef(({ className, ...props }, ref
|
|
|
144
144
|
}
|
|
145
145
|
));
|
|
146
146
|
CardDescription.displayName = "CardDescription";
|
|
147
|
-
var CardContent =
|
|
147
|
+
var CardContent = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
148
148
|
"div",
|
|
149
149
|
{
|
|
150
150
|
ref,
|
|
@@ -153,7 +153,7 @@ var CardContent = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
153
153
|
}
|
|
154
154
|
));
|
|
155
155
|
CardContent.displayName = "CardContent";
|
|
156
|
-
var CardFooter =
|
|
156
|
+
var CardFooter = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
157
157
|
"div",
|
|
158
158
|
{
|
|
159
159
|
ref,
|
|
@@ -162,7 +162,7 @@ var CardFooter = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
162
162
|
}
|
|
163
163
|
));
|
|
164
164
|
CardFooter.displayName = "CardFooter";
|
|
165
|
-
var Checkbox =
|
|
165
|
+
var Checkbox = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
166
166
|
CheckboxPrimitive__namespace.Root,
|
|
167
167
|
{
|
|
168
168
|
ref,
|
|
@@ -185,7 +185,7 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
185
185
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
186
186
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
187
187
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
188
|
-
var DialogOverlay =
|
|
188
|
+
var DialogOverlay = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
189
189
|
DialogPrimitive__namespace.Overlay,
|
|
190
190
|
{
|
|
191
191
|
ref,
|
|
@@ -197,7 +197,7 @@ var DialogOverlay = React6__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
197
197
|
}
|
|
198
198
|
));
|
|
199
199
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
200
|
-
var DialogContent =
|
|
200
|
+
var DialogContent = React9__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
201
201
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
202
202
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
203
203
|
DialogPrimitive__namespace.Content,
|
|
@@ -247,7 +247,7 @@ var DialogFooter = ({
|
|
|
247
247
|
}
|
|
248
248
|
);
|
|
249
249
|
DialogFooter.displayName = "DialogFooter";
|
|
250
|
-
var DialogTitle =
|
|
250
|
+
var DialogTitle = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
251
251
|
DialogPrimitive__namespace.Title,
|
|
252
252
|
{
|
|
253
253
|
ref,
|
|
@@ -259,7 +259,7 @@ var DialogTitle = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
259
259
|
}
|
|
260
260
|
));
|
|
261
261
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
262
|
-
var DialogDescription =
|
|
262
|
+
var DialogDescription = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
263
263
|
DialogPrimitive__namespace.Description,
|
|
264
264
|
{
|
|
265
265
|
ref,
|
|
@@ -274,7 +274,7 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
274
274
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
275
275
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
276
276
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
277
|
-
var DropdownMenuSubTrigger =
|
|
277
|
+
var DropdownMenuSubTrigger = React9__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
278
278
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
279
279
|
{
|
|
280
280
|
ref,
|
|
@@ -291,7 +291,7 @@ var DropdownMenuSubTrigger = React6__namespace.forwardRef(({ className, inset, c
|
|
|
291
291
|
}
|
|
292
292
|
));
|
|
293
293
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
294
|
-
var DropdownMenuSubContent =
|
|
294
|
+
var DropdownMenuSubContent = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
295
295
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
296
296
|
{
|
|
297
297
|
ref,
|
|
@@ -303,7 +303,7 @@ var DropdownMenuSubContent = React6__namespace.forwardRef(({ className, ...props
|
|
|
303
303
|
}
|
|
304
304
|
));
|
|
305
305
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
306
|
-
var DropdownMenuContent =
|
|
306
|
+
var DropdownMenuContent = React9__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
307
307
|
DropdownMenuPrimitive__namespace.Content,
|
|
308
308
|
{
|
|
309
309
|
ref,
|
|
@@ -317,7 +317,7 @@ var DropdownMenuContent = React6__namespace.forwardRef(({ className, sideOffset
|
|
|
317
317
|
}
|
|
318
318
|
) }));
|
|
319
319
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
320
|
-
var DropdownMenuItem =
|
|
320
|
+
var DropdownMenuItem = React9__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
321
321
|
DropdownMenuPrimitive__namespace.Item,
|
|
322
322
|
{
|
|
323
323
|
ref,
|
|
@@ -330,7 +330,7 @@ var DropdownMenuItem = React6__namespace.forwardRef(({ className, inset, ...prop
|
|
|
330
330
|
}
|
|
331
331
|
));
|
|
332
332
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
333
|
-
var DropdownMenuCheckboxItem =
|
|
333
|
+
var DropdownMenuCheckboxItem = React9__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
334
334
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
335
335
|
{
|
|
336
336
|
ref,
|
|
@@ -347,7 +347,7 @@ var DropdownMenuCheckboxItem = React6__namespace.forwardRef(({ className, childr
|
|
|
347
347
|
}
|
|
348
348
|
));
|
|
349
349
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
350
|
-
var DropdownMenuRadioItem =
|
|
350
|
+
var DropdownMenuRadioItem = React9__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
351
351
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
352
352
|
{
|
|
353
353
|
ref,
|
|
@@ -363,7 +363,7 @@ var DropdownMenuRadioItem = React6__namespace.forwardRef(({ className, children,
|
|
|
363
363
|
}
|
|
364
364
|
));
|
|
365
365
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
366
|
-
var DropdownMenuLabel =
|
|
366
|
+
var DropdownMenuLabel = React9__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
367
367
|
DropdownMenuPrimitive__namespace.Label,
|
|
368
368
|
{
|
|
369
369
|
ref,
|
|
@@ -376,7 +376,7 @@ var DropdownMenuLabel = React6__namespace.forwardRef(({ className, inset, ...pro
|
|
|
376
376
|
}
|
|
377
377
|
));
|
|
378
378
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
379
|
-
var DropdownMenuSeparator =
|
|
379
|
+
var DropdownMenuSeparator = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
380
380
|
DropdownMenuPrimitive__namespace.Separator,
|
|
381
381
|
{
|
|
382
382
|
ref,
|
|
@@ -398,19 +398,19 @@ var DropdownMenuShortcut = ({
|
|
|
398
398
|
);
|
|
399
399
|
};
|
|
400
400
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
401
|
-
var FormContext =
|
|
401
|
+
var FormContext = React9__namespace.createContext(null);
|
|
402
402
|
function useFormContext() {
|
|
403
|
-
const context =
|
|
403
|
+
const context = React9__namespace.useContext(FormContext);
|
|
404
404
|
if (!context) {
|
|
405
405
|
throw new Error("useFormContext must be used within a Form component");
|
|
406
406
|
}
|
|
407
407
|
return context;
|
|
408
408
|
}
|
|
409
|
-
var FormFieldContext =
|
|
409
|
+
var FormFieldContext = React9__namespace.createContext(
|
|
410
410
|
null
|
|
411
411
|
);
|
|
412
412
|
function useFormFieldContext() {
|
|
413
|
-
const context =
|
|
413
|
+
const context = React9__namespace.useContext(FormFieldContext);
|
|
414
414
|
if (!context) {
|
|
415
415
|
throw new Error(
|
|
416
416
|
"useFormFieldContext must be used within a FormField component"
|
|
@@ -418,24 +418,24 @@ function useFormFieldContext() {
|
|
|
418
418
|
}
|
|
419
419
|
return context;
|
|
420
420
|
}
|
|
421
|
-
var Form =
|
|
421
|
+
var Form = React9__namespace.forwardRef(
|
|
422
422
|
({ className, children, onFormSubmit, ...props }, ref) => {
|
|
423
|
-
const [errors, setErrors] =
|
|
424
|
-
const [isSubmitting, setIsSubmitting] =
|
|
425
|
-
const setError =
|
|
423
|
+
const [errors, setErrors] = React9__namespace.useState({});
|
|
424
|
+
const [isSubmitting, setIsSubmitting] = React9__namespace.useState(false);
|
|
425
|
+
const setError = React9__namespace.useCallback(
|
|
426
426
|
(name, message) => {
|
|
427
427
|
setErrors((prev) => ({ ...prev, [name]: message }));
|
|
428
428
|
},
|
|
429
429
|
[]
|
|
430
430
|
);
|
|
431
|
-
const clearError =
|
|
431
|
+
const clearError = React9__namespace.useCallback((name) => {
|
|
432
432
|
setErrors((prev) => {
|
|
433
433
|
const next = { ...prev };
|
|
434
434
|
delete next[name];
|
|
435
435
|
return next;
|
|
436
436
|
});
|
|
437
437
|
}, []);
|
|
438
|
-
const clearAllErrors =
|
|
438
|
+
const clearAllErrors = React9__namespace.useCallback(() => {
|
|
439
439
|
setErrors({});
|
|
440
440
|
}, []);
|
|
441
441
|
const isValid = Object.keys(errors).length === 0;
|
|
@@ -454,7 +454,7 @@ var Form = React6__namespace.forwardRef(
|
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
};
|
|
457
|
-
const contextValue =
|
|
457
|
+
const contextValue = React9__namespace.useMemo(
|
|
458
458
|
() => ({
|
|
459
459
|
errors,
|
|
460
460
|
setError,
|
|
@@ -478,12 +478,12 @@ var Form = React6__namespace.forwardRef(
|
|
|
478
478
|
}
|
|
479
479
|
);
|
|
480
480
|
Form.displayName = "Form";
|
|
481
|
-
var FormField =
|
|
481
|
+
var FormField = React9__namespace.forwardRef(
|
|
482
482
|
({ className, name, children, ...props }, ref) => {
|
|
483
483
|
const { errors } = useFormContext();
|
|
484
|
-
const id =
|
|
484
|
+
const id = React9__namespace.useId();
|
|
485
485
|
const error = errors[name];
|
|
486
|
-
const contextValue =
|
|
486
|
+
const contextValue = React9__namespace.useMemo(
|
|
487
487
|
() => ({ name, error, id }),
|
|
488
488
|
[name, error, id]
|
|
489
489
|
);
|
|
@@ -491,7 +491,7 @@ var FormField = React6__namespace.forwardRef(
|
|
|
491
491
|
}
|
|
492
492
|
);
|
|
493
493
|
FormField.displayName = "FormField";
|
|
494
|
-
var FormLabel =
|
|
494
|
+
var FormLabel = React9__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
495
495
|
const { id, error } = useFormFieldContext();
|
|
496
496
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
497
497
|
chunkYO72COII_js.Label,
|
|
@@ -504,10 +504,10 @@ var FormLabel = React6__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
|
504
504
|
);
|
|
505
505
|
});
|
|
506
506
|
FormLabel.displayName = "FormLabel";
|
|
507
|
-
var FormControl =
|
|
507
|
+
var FormControl = React9__namespace.forwardRef(
|
|
508
508
|
({ children, ...props }, ref) => {
|
|
509
509
|
const { id, error, name } = useFormFieldContext();
|
|
510
|
-
const child =
|
|
510
|
+
const child = React9__namespace.cloneElement(children, {
|
|
511
511
|
id,
|
|
512
512
|
name,
|
|
513
513
|
"aria-invalid": !!error,
|
|
@@ -518,7 +518,7 @@ var FormControl = React6__namespace.forwardRef(
|
|
|
518
518
|
}
|
|
519
519
|
);
|
|
520
520
|
FormControl.displayName = "FormControl";
|
|
521
|
-
var FormDescription =
|
|
521
|
+
var FormDescription = React9__namespace.forwardRef(
|
|
522
522
|
({ className, ...props }, ref) => {
|
|
523
523
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
524
524
|
"span",
|
|
@@ -534,9 +534,9 @@ var FormDescription = React6__namespace.forwardRef(
|
|
|
534
534
|
}
|
|
535
535
|
);
|
|
536
536
|
FormDescription.displayName = "FormDescription";
|
|
537
|
-
var FormMessage =
|
|
537
|
+
var FormMessage = React9__namespace.forwardRef(
|
|
538
538
|
({ className, children, error: errorProp, ...props }, ref) => {
|
|
539
|
-
const fieldContext =
|
|
539
|
+
const fieldContext = React9__namespace.useContext(FormFieldContext);
|
|
540
540
|
const error = errorProp ?? fieldContext?.error;
|
|
541
541
|
const id = fieldContext?.id;
|
|
542
542
|
if (!error && !children) {
|
|
@@ -560,14 +560,14 @@ var FormMessage = React6__namespace.forwardRef(
|
|
|
560
560
|
}
|
|
561
561
|
);
|
|
562
562
|
FormMessage.displayName = "FormMessage";
|
|
563
|
-
var PopoverContext =
|
|
563
|
+
var PopoverContext = React9__namespace.createContext({ open: false });
|
|
564
564
|
var Popover = ({
|
|
565
565
|
children,
|
|
566
566
|
open: controlledOpen,
|
|
567
567
|
onOpenChange,
|
|
568
568
|
...props
|
|
569
569
|
}) => {
|
|
570
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
570
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React9__namespace.useState(false);
|
|
571
571
|
const isControlled = controlledOpen !== void 0;
|
|
572
572
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
573
573
|
const handleOpenChange = (newOpen) => {
|
|
@@ -588,8 +588,8 @@ var Popover = ({
|
|
|
588
588
|
};
|
|
589
589
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
590
590
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
591
|
-
var PopoverContent =
|
|
592
|
-
const { open } =
|
|
591
|
+
var PopoverContent = React9__namespace.forwardRef(({ className, align = "center", sideOffset = 4, children, ...props }, ref) => {
|
|
592
|
+
const { open } = React9__namespace.useContext(PopoverContext);
|
|
593
593
|
const {
|
|
594
594
|
onOpenAutoFocus,
|
|
595
595
|
onCloseAutoFocus,
|
|
@@ -649,14 +649,14 @@ var PopoverContent = React6__namespace.forwardRef(({ className, align = "center"
|
|
|
649
649
|
) }) });
|
|
650
650
|
});
|
|
651
651
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
652
|
-
var SelectContext =
|
|
652
|
+
var SelectContext = React9__namespace.createContext({ open: false });
|
|
653
653
|
var Select = ({
|
|
654
654
|
children,
|
|
655
655
|
open: controlledOpen,
|
|
656
656
|
onOpenChange,
|
|
657
657
|
...props
|
|
658
658
|
}) => {
|
|
659
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
659
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React9__namespace.useState(false);
|
|
660
660
|
const isControlled = controlledOpen !== void 0;
|
|
661
661
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
662
662
|
const handleOpenChange = (newOpen) => {
|
|
@@ -677,7 +677,7 @@ var Select = ({
|
|
|
677
677
|
};
|
|
678
678
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
679
679
|
var SelectValue = SelectPrimitive__namespace.Value;
|
|
680
|
-
var SelectTrigger =
|
|
680
|
+
var SelectTrigger = React9__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
681
681
|
SelectPrimitive__namespace.Trigger,
|
|
682
682
|
{
|
|
683
683
|
ref,
|
|
@@ -693,7 +693,7 @@ var SelectTrigger = React6__namespace.forwardRef(({ className, children, ...prop
|
|
|
693
693
|
}
|
|
694
694
|
));
|
|
695
695
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
696
|
-
var SelectScrollUpButton =
|
|
696
|
+
var SelectScrollUpButton = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
697
697
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
698
698
|
{
|
|
699
699
|
ref,
|
|
@@ -706,7 +706,7 @@ var SelectScrollUpButton = React6__namespace.forwardRef(({ className, ...props }
|
|
|
706
706
|
}
|
|
707
707
|
));
|
|
708
708
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
709
|
-
var SelectScrollDownButton =
|
|
709
|
+
var SelectScrollDownButton = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
710
710
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
711
711
|
{
|
|
712
712
|
ref,
|
|
@@ -719,8 +719,8 @@ var SelectScrollDownButton = React6__namespace.forwardRef(({ className, ...props
|
|
|
719
719
|
}
|
|
720
720
|
));
|
|
721
721
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
722
|
-
var SelectContent =
|
|
723
|
-
const { open } =
|
|
722
|
+
var SelectContent = React9__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => {
|
|
723
|
+
const { open } = React9__namespace.useContext(SelectContext);
|
|
724
724
|
const {
|
|
725
725
|
onCloseAutoFocus,
|
|
726
726
|
onEscapeKeyDown,
|
|
@@ -792,7 +792,7 @@ var SelectContent = React6__namespace.forwardRef(({ className, children, positio
|
|
|
792
792
|
) }) });
|
|
793
793
|
});
|
|
794
794
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
795
|
-
var SelectLabel =
|
|
795
|
+
var SelectLabel = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
796
796
|
SelectPrimitive__namespace.Label,
|
|
797
797
|
{
|
|
798
798
|
ref,
|
|
@@ -801,7 +801,7 @@ var SelectLabel = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
801
801
|
}
|
|
802
802
|
));
|
|
803
803
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
804
|
-
var SelectItem =
|
|
804
|
+
var SelectItem = React9__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
805
805
|
SelectPrimitive__namespace.Item,
|
|
806
806
|
{
|
|
807
807
|
ref,
|
|
@@ -817,7 +817,7 @@ var SelectItem = React6__namespace.forwardRef(({ className, children, ...props }
|
|
|
817
817
|
}
|
|
818
818
|
));
|
|
819
819
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
820
|
-
var SelectSeparator =
|
|
820
|
+
var SelectSeparator = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
821
821
|
SelectPrimitive__namespace.Separator,
|
|
822
822
|
{
|
|
823
823
|
ref,
|
|
@@ -893,16 +893,135 @@ function SkeletonCard({ className }) {
|
|
|
893
893
|
}
|
|
894
894
|
);
|
|
895
895
|
}
|
|
896
|
-
var
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
896
|
+
var TableContext = React9__namespace.createContext(null);
|
|
897
|
+
var useTableContext = () => {
|
|
898
|
+
const context = React9__namespace.useContext(TableContext);
|
|
899
|
+
return context;
|
|
900
|
+
};
|
|
901
|
+
var Table = React9__namespace.forwardRef(
|
|
902
|
+
({
|
|
903
|
+
className,
|
|
904
|
+
selectable = false,
|
|
905
|
+
selectionMode = "multiple",
|
|
906
|
+
selectedRows: controlledSelectedRows,
|
|
907
|
+
onSelectionChange,
|
|
908
|
+
getRowId,
|
|
909
|
+
rows,
|
|
901
910
|
...props
|
|
911
|
+
}, ref) => {
|
|
912
|
+
const [internalSelectedRows, setInternalSelectedRows] = React9__namespace.useState(/* @__PURE__ */ new Set());
|
|
913
|
+
const [registeredRowIds, setRegisteredRowIds] = React9__namespace.useState(/* @__PURE__ */ new Set());
|
|
914
|
+
const isControlled = controlledSelectedRows !== void 0;
|
|
915
|
+
const selectedRowsSet = isControlled ? new Set(controlledSelectedRows) : internalSelectedRows;
|
|
916
|
+
const defaultGetRowId = React9__namespace.useCallback((row) => {
|
|
917
|
+
if (typeof row === "string") return row;
|
|
918
|
+
if (typeof row === "object" && row?.id) return String(row.id);
|
|
919
|
+
return String(row);
|
|
920
|
+
}, []);
|
|
921
|
+
const finalGetRowId = getRowId || defaultGetRowId;
|
|
922
|
+
const allRowIds = React9__namespace.useMemo(() => {
|
|
923
|
+
if (rows) {
|
|
924
|
+
return new Set(rows.map(finalGetRowId));
|
|
925
|
+
}
|
|
926
|
+
return registeredRowIds;
|
|
927
|
+
}, [rows, finalGetRowId, registeredRowIds]);
|
|
928
|
+
const registerRowId = React9__namespace.useCallback((rowId) => {
|
|
929
|
+
if (rowId) {
|
|
930
|
+
setRegisteredRowIds((prev) => new Set(prev).add(rowId));
|
|
931
|
+
}
|
|
932
|
+
}, []);
|
|
933
|
+
const unregisterRowId = React9__namespace.useCallback((rowId) => {
|
|
934
|
+
if (rowId) {
|
|
935
|
+
setRegisteredRowIds((prev) => {
|
|
936
|
+
const next = new Set(prev);
|
|
937
|
+
next.delete(rowId);
|
|
938
|
+
return next;
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
}, []);
|
|
942
|
+
const toggleRow = React9__namespace.useCallback(
|
|
943
|
+
(rowId) => {
|
|
944
|
+
if (!selectable) return;
|
|
945
|
+
const next = new Set(selectedRowsSet);
|
|
946
|
+
if (selectionMode === "single") {
|
|
947
|
+
next.clear();
|
|
948
|
+
if (!next.has(rowId)) {
|
|
949
|
+
next.add(rowId);
|
|
950
|
+
}
|
|
951
|
+
} else {
|
|
952
|
+
if (next.has(rowId)) {
|
|
953
|
+
next.delete(rowId);
|
|
954
|
+
} else {
|
|
955
|
+
next.add(rowId);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
if (isControlled) {
|
|
959
|
+
onSelectionChange?.(Array.from(next));
|
|
960
|
+
} else {
|
|
961
|
+
setInternalSelectedRows(next);
|
|
962
|
+
onSelectionChange?.(Array.from(next));
|
|
963
|
+
}
|
|
964
|
+
},
|
|
965
|
+
[selectable, selectionMode, selectedRowsSet, isControlled, onSelectionChange]
|
|
966
|
+
);
|
|
967
|
+
const selectAll = React9__namespace.useCallback(() => {
|
|
968
|
+
if (!selectable || selectionMode !== "multiple" || allRowIds.size === 0) return;
|
|
969
|
+
const next = new Set(allRowIds);
|
|
970
|
+
if (isControlled) {
|
|
971
|
+
onSelectionChange?.(Array.from(next));
|
|
972
|
+
} else {
|
|
973
|
+
setInternalSelectedRows(next);
|
|
974
|
+
onSelectionChange?.(Array.from(next));
|
|
975
|
+
}
|
|
976
|
+
}, [selectable, selectionMode, allRowIds, isControlled, onSelectionChange]);
|
|
977
|
+
const deselectAll = React9__namespace.useCallback(() => {
|
|
978
|
+
if (!selectable) return;
|
|
979
|
+
const next = /* @__PURE__ */ new Set();
|
|
980
|
+
if (isControlled) {
|
|
981
|
+
onSelectionChange?.(Array.from(next));
|
|
982
|
+
} else {
|
|
983
|
+
setInternalSelectedRows(next);
|
|
984
|
+
onSelectionChange?.(Array.from(next));
|
|
985
|
+
}
|
|
986
|
+
}, [selectable, isControlled, onSelectionChange]);
|
|
987
|
+
const isRowSelected = React9__namespace.useCallback(
|
|
988
|
+
(rowId) => selectedRowsSet.has(rowId),
|
|
989
|
+
[selectedRowsSet]
|
|
990
|
+
);
|
|
991
|
+
const isAllSelected = React9__namespace.useMemo(() => {
|
|
992
|
+
if (!selectable || allRowIds.size === 0) return false;
|
|
993
|
+
return allRowIds.size > 0 && Array.from(allRowIds).every((id) => selectedRowsSet.has(id));
|
|
994
|
+
}, [selectable, allRowIds, selectedRowsSet]);
|
|
995
|
+
const isSomeSelected = React9__namespace.useMemo(() => {
|
|
996
|
+
if (!selectable) return false;
|
|
997
|
+
return selectedRowsSet.size > 0 && !isAllSelected;
|
|
998
|
+
}, [selectable, selectedRowsSet.size, isAllSelected]);
|
|
999
|
+
const contextValue = {
|
|
1000
|
+
selectable,
|
|
1001
|
+
selectionMode,
|
|
1002
|
+
selectedRows: selectedRowsSet,
|
|
1003
|
+
toggleRow,
|
|
1004
|
+
isRowSelected,
|
|
1005
|
+
selectAll,
|
|
1006
|
+
deselectAll,
|
|
1007
|
+
isAllSelected,
|
|
1008
|
+
isSomeSelected,
|
|
1009
|
+
getRowId: finalGetRowId,
|
|
1010
|
+
registerRowId,
|
|
1011
|
+
unregisterRowId
|
|
1012
|
+
};
|
|
1013
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1014
|
+
"table",
|
|
1015
|
+
{
|
|
1016
|
+
ref,
|
|
1017
|
+
className: chunkYO72COII_js.cn("w-full caption-bottom text-sm", className),
|
|
1018
|
+
...props
|
|
1019
|
+
}
|
|
1020
|
+
) }) });
|
|
902
1021
|
}
|
|
903
|
-
)
|
|
1022
|
+
);
|
|
904
1023
|
Table.displayName = "Table";
|
|
905
|
-
var TableHeader =
|
|
1024
|
+
var TableHeader = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
906
1025
|
"thead",
|
|
907
1026
|
{
|
|
908
1027
|
ref,
|
|
@@ -911,7 +1030,7 @@ var TableHeader = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
911
1030
|
}
|
|
912
1031
|
));
|
|
913
1032
|
TableHeader.displayName = "TableHeader";
|
|
914
|
-
var TableBody =
|
|
1033
|
+
var TableBody = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
915
1034
|
"tbody",
|
|
916
1035
|
{
|
|
917
1036
|
ref,
|
|
@@ -920,7 +1039,7 @@ var TableBody = React6__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
920
1039
|
}
|
|
921
1040
|
));
|
|
922
1041
|
TableBody.displayName = "TableBody";
|
|
923
|
-
var TableFooter =
|
|
1042
|
+
var TableFooter = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
924
1043
|
"tfoot",
|
|
925
1044
|
{
|
|
926
1045
|
ref,
|
|
@@ -932,19 +1051,47 @@ var TableFooter = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
932
1051
|
}
|
|
933
1052
|
));
|
|
934
1053
|
TableFooter.displayName = "TableFooter";
|
|
935
|
-
var TableRow =
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
)
|
|
943
|
-
|
|
1054
|
+
var TableRow = React9__namespace.forwardRef(
|
|
1055
|
+
({ className, rowId, rowData, onClick, ...props }, ref) => {
|
|
1056
|
+
const context = useTableContext();
|
|
1057
|
+
const finalRowId = React9__namespace.useMemo(() => {
|
|
1058
|
+
if (rowId) return rowId;
|
|
1059
|
+
if (rowData && context?.getRowId) return context.getRowId(rowData);
|
|
1060
|
+
return props.id || void 0;
|
|
1061
|
+
}, [rowId, rowData, context, props.id]);
|
|
1062
|
+
React9__namespace.useEffect(() => {
|
|
1063
|
+
if (finalRowId && context?.selectable) {
|
|
1064
|
+
context.registerRowId(finalRowId);
|
|
1065
|
+
return () => {
|
|
1066
|
+
context.unregisterRowId(finalRowId);
|
|
1067
|
+
};
|
|
1068
|
+
}
|
|
1069
|
+
}, [finalRowId, context]);
|
|
1070
|
+
const isSelected = finalRowId ? context?.isRowSelected(finalRowId) : false;
|
|
1071
|
+
const handleClick = React9__namespace.useCallback(
|
|
1072
|
+
(e) => {
|
|
1073
|
+
onClick?.(e);
|
|
1074
|
+
},
|
|
1075
|
+
[onClick]
|
|
1076
|
+
);
|
|
1077
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1078
|
+
"tr",
|
|
1079
|
+
{
|
|
1080
|
+
ref,
|
|
1081
|
+
"data-state": isSelected ? "selected" : void 0,
|
|
1082
|
+
"data-row-id": finalRowId,
|
|
1083
|
+
className: chunkYO72COII_js.cn(
|
|
1084
|
+
"border-b border-gray-200 transition-colors hover:bg-gray-50 data-[state=selected]:bg-blue-50 dark:border-neutral-700 dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-blue-900/20",
|
|
1085
|
+
className
|
|
1086
|
+
),
|
|
1087
|
+
onClick: handleClick,
|
|
1088
|
+
...props
|
|
1089
|
+
}
|
|
1090
|
+
);
|
|
944
1091
|
}
|
|
945
|
-
)
|
|
1092
|
+
);
|
|
946
1093
|
TableRow.displayName = "TableRow";
|
|
947
|
-
var TableHead =
|
|
1094
|
+
var TableHead = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
1095
|
"th",
|
|
949
1096
|
{
|
|
950
1097
|
ref,
|
|
@@ -956,7 +1103,7 @@ var TableHead = React6__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
956
1103
|
}
|
|
957
1104
|
));
|
|
958
1105
|
TableHead.displayName = "TableHead";
|
|
959
|
-
var TableCell =
|
|
1106
|
+
var TableCell = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
960
1107
|
"td",
|
|
961
1108
|
{
|
|
962
1109
|
ref,
|
|
@@ -965,7 +1112,7 @@ var TableCell = React6__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
965
1112
|
}
|
|
966
1113
|
));
|
|
967
1114
|
TableCell.displayName = "TableCell";
|
|
968
|
-
var TableCaption =
|
|
1115
|
+
var TableCaption = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
969
1116
|
"caption",
|
|
970
1117
|
{
|
|
971
1118
|
ref,
|
|
@@ -974,31 +1121,88 @@ var TableCaption = React6__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
974
1121
|
}
|
|
975
1122
|
));
|
|
976
1123
|
TableCaption.displayName = "TableCaption";
|
|
977
|
-
var
|
|
1124
|
+
var TableSelectAll = React9__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1125
|
+
const context = useTableContext();
|
|
1126
|
+
if (!context?.selectable || context.selectionMode !== "multiple") {
|
|
1127
|
+
return null;
|
|
1128
|
+
}
|
|
1129
|
+
const handleCheckedChange = (checked) => {
|
|
1130
|
+
if (checked) {
|
|
1131
|
+
context.selectAll();
|
|
1132
|
+
} else {
|
|
1133
|
+
context.deselectAll();
|
|
1134
|
+
}
|
|
1135
|
+
};
|
|
1136
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1137
|
+
Checkbox,
|
|
1138
|
+
{
|
|
1139
|
+
checked: context.isAllSelected,
|
|
1140
|
+
onCheckedChange: handleCheckedChange,
|
|
1141
|
+
"aria-label": "Select all rows",
|
|
1142
|
+
...context.isSomeSelected && { "data-state": "indeterminate" }
|
|
1143
|
+
}
|
|
1144
|
+
) });
|
|
1145
|
+
});
|
|
1146
|
+
TableSelectAll.displayName = "TableSelectAll";
|
|
1147
|
+
var TableRowCheckbox = React9__namespace.forwardRef(({ rowId, rowData, className, ...props }, ref) => {
|
|
1148
|
+
const context = useTableContext();
|
|
1149
|
+
if (!context?.selectable) {
|
|
1150
|
+
return null;
|
|
1151
|
+
}
|
|
1152
|
+
const finalRowId = React9__namespace.useMemo(() => {
|
|
1153
|
+
if (rowId) return rowId;
|
|
1154
|
+
if (rowData && context?.getRowId) return context.getRowId(rowData);
|
|
1155
|
+
return void 0;
|
|
1156
|
+
}, [rowId, rowData, context]);
|
|
1157
|
+
if (!finalRowId) {
|
|
1158
|
+
return null;
|
|
1159
|
+
}
|
|
1160
|
+
const isSelected = context.isRowSelected(finalRowId);
|
|
1161
|
+
const handleCheckedChange = () => {
|
|
1162
|
+
context.toggleRow(finalRowId);
|
|
1163
|
+
};
|
|
1164
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className, ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
+
Checkbox,
|
|
1166
|
+
{
|
|
1167
|
+
checked: isSelected,
|
|
1168
|
+
onCheckedChange: handleCheckedChange,
|
|
1169
|
+
"aria-label": `Select row ${finalRowId}`
|
|
1170
|
+
}
|
|
1171
|
+
) });
|
|
1172
|
+
});
|
|
1173
|
+
TableRowCheckbox.displayName = "TableRowCheckbox";
|
|
1174
|
+
var useTableSelection = () => {
|
|
1175
|
+
const context = useTableContext();
|
|
1176
|
+
if (!context) {
|
|
1177
|
+
throw new Error("useTableSelection must be used within a Table component with selectable prop");
|
|
1178
|
+
}
|
|
1179
|
+
return context;
|
|
1180
|
+
};
|
|
1181
|
+
var TabsContext = React9__namespace.createContext(null);
|
|
978
1182
|
var useTabsContext = () => {
|
|
979
|
-
const context =
|
|
1183
|
+
const context = React9__namespace.useContext(TabsContext);
|
|
980
1184
|
if (!context) {
|
|
981
1185
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
982
1186
|
}
|
|
983
1187
|
return context;
|
|
984
1188
|
};
|
|
985
|
-
var Tabs =
|
|
986
|
-
const [activeTab, setActiveTabState] =
|
|
987
|
-
const tabRefs =
|
|
988
|
-
const listRef =
|
|
989
|
-
const setActiveTab =
|
|
1189
|
+
var Tabs = React9__namespace.forwardRef(({ defaultValue, value, onValueChange, children, ...props }, ref) => {
|
|
1190
|
+
const [activeTab, setActiveTabState] = React9__namespace.useState(value ?? defaultValue);
|
|
1191
|
+
const tabRefs = React9__namespace.useRef(/* @__PURE__ */ new Map()).current;
|
|
1192
|
+
const listRef = React9__namespace.useRef(null);
|
|
1193
|
+
const setActiveTab = React9__namespace.useCallback(
|
|
990
1194
|
(newValue) => {
|
|
991
1195
|
setActiveTabState(newValue);
|
|
992
1196
|
onValueChange?.(newValue);
|
|
993
1197
|
},
|
|
994
1198
|
[onValueChange]
|
|
995
1199
|
);
|
|
996
|
-
|
|
1200
|
+
React9__namespace.useEffect(() => {
|
|
997
1201
|
if (value !== void 0) {
|
|
998
1202
|
setActiveTabState(value);
|
|
999
1203
|
}
|
|
1000
1204
|
}, [value]);
|
|
1001
|
-
const registerTab =
|
|
1205
|
+
const registerTab = React9__namespace.useCallback(
|
|
1002
1206
|
(tabValue, element) => {
|
|
1003
1207
|
tabRefs.set(tabValue, element);
|
|
1004
1208
|
},
|
|
@@ -1023,10 +1227,10 @@ var Tabs = React6__namespace.forwardRef(({ defaultValue, value, onValueChange, c
|
|
|
1023
1227
|
);
|
|
1024
1228
|
});
|
|
1025
1229
|
Tabs.displayName = "Tabs";
|
|
1026
|
-
var TabsList =
|
|
1230
|
+
var TabsList = React9__namespace.forwardRef(({ className, children, ...props }, ref) => {
|
|
1027
1231
|
const { activeTab, tabRefs, listRef } = useTabsContext();
|
|
1028
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
1029
|
-
|
|
1232
|
+
const [indicatorStyle, setIndicatorStyle] = React9__namespace.useState(null);
|
|
1233
|
+
React9__namespace.useEffect(() => {
|
|
1030
1234
|
const updateIndicator = () => {
|
|
1031
1235
|
if (!activeTab || !listRef.current) return;
|
|
1032
1236
|
const activeElement = tabRefs.get(activeTab);
|
|
@@ -1078,10 +1282,10 @@ var TabsList = React6__namespace.forwardRef(({ className, children, ...props },
|
|
|
1078
1282
|
);
|
|
1079
1283
|
});
|
|
1080
1284
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
1081
|
-
var TabsTrigger =
|
|
1285
|
+
var TabsTrigger = React9__namespace.forwardRef(({ className, value, ...props }, ref) => {
|
|
1082
1286
|
const { registerTab, activeTab } = useTabsContext();
|
|
1083
|
-
const triggerRef =
|
|
1084
|
-
|
|
1287
|
+
const triggerRef = React9__namespace.useRef(null);
|
|
1288
|
+
React9__namespace.useEffect(() => {
|
|
1085
1289
|
registerTab(value, triggerRef.current);
|
|
1086
1290
|
return () => registerTab(value, null);
|
|
1087
1291
|
}, [value, registerTab]);
|
|
@@ -1105,7 +1309,7 @@ var TabsTrigger = React6__namespace.forwardRef(({ className, value, ...props },
|
|
|
1105
1309
|
);
|
|
1106
1310
|
});
|
|
1107
1311
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
1108
|
-
var TabsContent =
|
|
1312
|
+
var TabsContent = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1109
1313
|
TabsPrimitive__namespace.Content,
|
|
1110
1314
|
{
|
|
1111
1315
|
ref,
|
|
@@ -1117,7 +1321,7 @@ var TabsContent = React6__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1117
1321
|
}
|
|
1118
1322
|
));
|
|
1119
1323
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
1120
|
-
var Textarea =
|
|
1324
|
+
var Textarea = React9__namespace.forwardRef(
|
|
1121
1325
|
({ className, ...props }, ref) => {
|
|
1122
1326
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1123
1327
|
"textarea",
|
|
@@ -1207,6 +1411,8 @@ exports.TableFooter = TableFooter;
|
|
|
1207
1411
|
exports.TableHead = TableHead;
|
|
1208
1412
|
exports.TableHeader = TableHeader;
|
|
1209
1413
|
exports.TableRow = TableRow;
|
|
1414
|
+
exports.TableRowCheckbox = TableRowCheckbox;
|
|
1415
|
+
exports.TableSelectAll = TableSelectAll;
|
|
1210
1416
|
exports.Tabs = Tabs;
|
|
1211
1417
|
exports.TabsContent = TabsContent;
|
|
1212
1418
|
exports.TabsList = TabsList;
|
|
@@ -1215,5 +1421,6 @@ exports.Textarea = Textarea;
|
|
|
1215
1421
|
exports.buttonVariants = buttonVariants;
|
|
1216
1422
|
exports.useFormContext = useFormContext;
|
|
1217
1423
|
exports.useFormFieldContext = useFormFieldContext;
|
|
1218
|
-
|
|
1219
|
-
//# sourceMappingURL=chunk-
|
|
1424
|
+
exports.useTableSelection = useTableSelection;
|
|
1425
|
+
//# sourceMappingURL=chunk-T6DNK3SI.js.map
|
|
1426
|
+
//# sourceMappingURL=chunk-T6DNK3SI.js.map
|