@pos-360/horizon 0.14.0 → 0.16.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-YO72COII.js → chunk-7WVGPVSG.js} +10 -3
- package/dist/chunk-7WVGPVSG.js.map +1 -0
- package/dist/{chunk-A4QVL4JL.mjs → chunk-G36NTARE.mjs} +3 -3
- package/dist/{chunk-A4QVL4JL.mjs.map → chunk-G36NTARE.mjs.map} +1 -1
- package/dist/{chunk-US6BPM62.mjs → chunk-KQYOZC7B.mjs} +194 -15
- package/dist/chunk-KQYOZC7B.mjs.map +1 -0
- package/dist/{chunk-6CAMHXUV.js → chunk-QCQOCLJH.js} +77 -77
- package/dist/{chunk-6CAMHXUV.js.map → chunk-QCQOCLJH.js.map} +1 -1
- package/dist/{chunk-E3UN74IA.mjs → chunk-THQLVDXH.mjs} +10 -3
- package/dist/chunk-THQLVDXH.mjs.map +1 -0
- package/dist/{chunk-BVQVZKMM.js → chunk-UWBZTH6L.js} +265 -85
- package/dist/chunk-UWBZTH6L.js.map +1 -0
- package/dist/enhanced.d.mts +1 -0
- package/dist/enhanced.d.ts +1 -0
- package/dist/enhanced.js +28 -28
- package/dist/enhanced.mjs +2 -2
- package/dist/index.d.mts +1 -8
- package/dist/index.d.ts +1 -8
- package/dist/index.js +146 -138
- package/dist/index.mjs +3 -3
- package/dist/primitives.d.mts +54 -19
- package/dist/primitives.d.ts +54 -19
- package/dist/primitives.js +118 -110
- package/dist/primitives.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-BVQVZKMM.js.map +0 -1
- package/dist/chunk-E3UN74IA.mjs.map +0 -1
- package/dist/chunk-US6BPM62.mjs.map +0 -1
- package/dist/chunk-YO72COII.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7WVGPVSG_js = require('./chunk-7WVGPVSG.js');
|
|
4
4
|
var React9 = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -87,7 +87,7 @@ var Button = React9__namespace.forwardRef(
|
|
|
87
87
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
88
|
Comp,
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
90
|
+
className: chunk7WVGPVSG_js.cn(buttonVariants({ variant, size, className })),
|
|
91
91
|
ref,
|
|
92
92
|
...props,
|
|
93
93
|
children
|
|
@@ -98,7 +98,7 @@ var Button = React9__namespace.forwardRef(
|
|
|
98
98
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
99
99
|
Comp,
|
|
100
100
|
{
|
|
101
|
-
className:
|
|
101
|
+
className: chunk7WVGPVSG_js.cn(buttonVariants({ variant, size, className })),
|
|
102
102
|
ref,
|
|
103
103
|
...props,
|
|
104
104
|
children: [
|
|
@@ -115,7 +115,7 @@ var Card = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
ref,
|
|
118
|
-
className:
|
|
118
|
+
className: chunk7WVGPVSG_js.cn(
|
|
119
119
|
"rounded-hz-lg border border-gray-200 bg-white text-gray-900 shadow dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-100",
|
|
120
120
|
className
|
|
121
121
|
),
|
|
@@ -127,7 +127,7 @@ var CardHeader = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
129
|
ref,
|
|
130
|
-
className:
|
|
130
|
+
className: chunk7WVGPVSG_js.cn("flex flex-col space-y-1.5 p-4", className),
|
|
131
131
|
...props
|
|
132
132
|
}
|
|
133
133
|
));
|
|
@@ -136,7 +136,7 @@ var CardTitle = React9__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
136
136
|
"div",
|
|
137
137
|
{
|
|
138
138
|
ref,
|
|
139
|
-
className:
|
|
139
|
+
className: chunk7WVGPVSG_js.cn("font-semibold leading-none tracking-tight", className),
|
|
140
140
|
...props
|
|
141
141
|
}
|
|
142
142
|
));
|
|
@@ -145,7 +145,7 @@ var CardDescription = React9__namespace.forwardRef(({ className, ...props }, ref
|
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
147
147
|
ref,
|
|
148
|
-
className:
|
|
148
|
+
className: chunk7WVGPVSG_js.cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
149
149
|
...props
|
|
150
150
|
}
|
|
151
151
|
));
|
|
@@ -154,7 +154,7 @@ var CardContent = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
154
154
|
"div",
|
|
155
155
|
{
|
|
156
156
|
ref,
|
|
157
|
-
className:
|
|
157
|
+
className: chunk7WVGPVSG_js.cn("p-4 pt-0", className),
|
|
158
158
|
...props
|
|
159
159
|
}
|
|
160
160
|
));
|
|
@@ -163,7 +163,7 @@ var CardFooter = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
163
163
|
"div",
|
|
164
164
|
{
|
|
165
165
|
ref,
|
|
166
|
-
className:
|
|
166
|
+
className: chunk7WVGPVSG_js.cn("flex items-center p-4 pt-0", className),
|
|
167
167
|
...props
|
|
168
168
|
}
|
|
169
169
|
));
|
|
@@ -172,7 +172,7 @@ var Checkbox = React9__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
172
172
|
CheckboxPrimitive__namespace.Root,
|
|
173
173
|
{
|
|
174
174
|
ref,
|
|
175
|
-
className:
|
|
175
|
+
className: chunk7WVGPVSG_js.cn(
|
|
176
176
|
"peer h-4 w-4 shrink-0 rounded-hz-sm border border-gray-300 bg-transparent shadow focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 data-[state=checked]:text-white dark:border-neutral-600 dark:data-[state=checked]:bg-blue-600",
|
|
177
177
|
className
|
|
178
178
|
),
|
|
@@ -180,7 +180,7 @@ var Checkbox = React9__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
180
180
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
181
181
|
CheckboxPrimitive__namespace.Indicator,
|
|
182
182
|
{
|
|
183
|
-
className:
|
|
183
|
+
className: chunk7WVGPVSG_js.cn("flex items-center justify-center text-current"),
|
|
184
184
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5", strokeWidth: 3 })
|
|
185
185
|
}
|
|
186
186
|
)
|
|
@@ -195,7 +195,7 @@ var DialogOverlay = React9__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
195
195
|
DialogPrimitive__namespace.Overlay,
|
|
196
196
|
{
|
|
197
197
|
ref,
|
|
198
|
-
className:
|
|
198
|
+
className: chunk7WVGPVSG_js.cn(
|
|
199
199
|
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
200
200
|
className
|
|
201
201
|
),
|
|
@@ -209,7 +209,7 @@ var DialogContent = React9__namespace.forwardRef(({ className, children, ...prop
|
|
|
209
209
|
DialogPrimitive__namespace.Content,
|
|
210
210
|
{
|
|
211
211
|
ref,
|
|
212
|
-
className:
|
|
212
|
+
className: chunk7WVGPVSG_js.cn(
|
|
213
213
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-gray-200 bg-white p-6 shadow-lg duration-hz-normal data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-hz-lg dark:border-neutral-700 dark:bg-neutral-800",
|
|
214
214
|
className
|
|
215
215
|
),
|
|
@@ -231,7 +231,7 @@ var DialogHeader = ({
|
|
|
231
231
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
232
232
|
"div",
|
|
233
233
|
{
|
|
234
|
-
className:
|
|
234
|
+
className: chunk7WVGPVSG_js.cn(
|
|
235
235
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
236
236
|
className
|
|
237
237
|
),
|
|
@@ -245,7 +245,7 @@ var DialogFooter = ({
|
|
|
245
245
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
246
246
|
"div",
|
|
247
247
|
{
|
|
248
|
-
className:
|
|
248
|
+
className: chunk7WVGPVSG_js.cn(
|
|
249
249
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
250
250
|
className
|
|
251
251
|
),
|
|
@@ -257,7 +257,7 @@ var DialogTitle = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
257
257
|
DialogPrimitive__namespace.Title,
|
|
258
258
|
{
|
|
259
259
|
ref,
|
|
260
|
-
className:
|
|
260
|
+
className: chunk7WVGPVSG_js.cn(
|
|
261
261
|
"text-lg font-semibold leading-none tracking-tight text-gray-900 dark:text-gray-100",
|
|
262
262
|
className
|
|
263
263
|
),
|
|
@@ -269,7 +269,7 @@ var DialogDescription = React9__namespace.forwardRef(({ className, ...props }, r
|
|
|
269
269
|
DialogPrimitive__namespace.Description,
|
|
270
270
|
{
|
|
271
271
|
ref,
|
|
272
|
-
className:
|
|
272
|
+
className: chunk7WVGPVSG_js.cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
273
273
|
...props
|
|
274
274
|
}
|
|
275
275
|
));
|
|
@@ -284,7 +284,7 @@ var DropdownMenuSubTrigger = React9__namespace.forwardRef(({ className, inset, c
|
|
|
284
284
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
285
285
|
{
|
|
286
286
|
ref,
|
|
287
|
-
className:
|
|
287
|
+
className: chunk7WVGPVSG_js.cn(
|
|
288
288
|
"flex cursor-default select-none items-center gap-2 rounded-hz-sm px-2 py-1.5 text-sm outline-none focus:bg-gray-100 data-[state=open]:bg-gray-100 dark:focus:bg-gray-700 dark:data-[state=open]:bg-gray-700 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
289
289
|
inset && "pl-8",
|
|
290
290
|
className
|
|
@@ -301,7 +301,7 @@ var DropdownMenuSubContent = React9__namespace.forwardRef(({ className, ...props
|
|
|
301
301
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
302
302
|
{
|
|
303
303
|
ref,
|
|
304
|
-
className:
|
|
304
|
+
className: chunk7WVGPVSG_js.cn(
|
|
305
305
|
"z-50 min-w-[8rem] overflow-hidden rounded-hz-md border border-gray-200 bg-white p-1 text-gray-900 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin] dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-100",
|
|
306
306
|
className
|
|
307
307
|
),
|
|
@@ -314,7 +314,7 @@ var DropdownMenuContent = React9__namespace.forwardRef(({ className, sideOffset
|
|
|
314
314
|
{
|
|
315
315
|
ref,
|
|
316
316
|
sideOffset,
|
|
317
|
-
className:
|
|
317
|
+
className: chunk7WVGPVSG_js.cn(
|
|
318
318
|
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-hz-md border border-gray-200 bg-white p-1 text-gray-900 shadow-md dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-100",
|
|
319
319
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",
|
|
320
320
|
className
|
|
@@ -327,7 +327,7 @@ var DropdownMenuItem = React9__namespace.forwardRef(({ className, inset, ...prop
|
|
|
327
327
|
DropdownMenuPrimitive__namespace.Item,
|
|
328
328
|
{
|
|
329
329
|
ref,
|
|
330
|
-
className:
|
|
330
|
+
className: chunk7WVGPVSG_js.cn(
|
|
331
331
|
"relative flex cursor-default select-none items-center gap-2 rounded-hz-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-700 dark:focus:text-gray-100 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
332
332
|
inset && "pl-8",
|
|
333
333
|
className
|
|
@@ -340,7 +340,7 @@ var DropdownMenuCheckboxItem = React9__namespace.forwardRef(({ className, childr
|
|
|
340
340
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
341
341
|
{
|
|
342
342
|
ref,
|
|
343
|
-
className:
|
|
343
|
+
className: chunk7WVGPVSG_js.cn(
|
|
344
344
|
"relative flex cursor-default select-none items-center rounded-hz-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-700 dark:focus:text-gray-100",
|
|
345
345
|
className
|
|
346
346
|
),
|
|
@@ -357,7 +357,7 @@ var DropdownMenuRadioItem = React9__namespace.forwardRef(({ className, children,
|
|
|
357
357
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
358
358
|
{
|
|
359
359
|
ref,
|
|
360
|
-
className:
|
|
360
|
+
className: chunk7WVGPVSG_js.cn(
|
|
361
361
|
"relative flex cursor-default select-none items-center rounded-hz-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-gray-100 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-gray-700 dark:focus:text-gray-100",
|
|
362
362
|
className
|
|
363
363
|
),
|
|
@@ -373,7 +373,7 @@ var DropdownMenuLabel = React9__namespace.forwardRef(({ className, inset, ...pro
|
|
|
373
373
|
DropdownMenuPrimitive__namespace.Label,
|
|
374
374
|
{
|
|
375
375
|
ref,
|
|
376
|
-
className:
|
|
376
|
+
className: chunk7WVGPVSG_js.cn(
|
|
377
377
|
"px-2 py-1.5 text-sm font-semibold",
|
|
378
378
|
inset && "pl-8",
|
|
379
379
|
className
|
|
@@ -386,7 +386,7 @@ var DropdownMenuSeparator = React9__namespace.forwardRef(({ className, ...props
|
|
|
386
386
|
DropdownMenuPrimitive__namespace.Separator,
|
|
387
387
|
{
|
|
388
388
|
ref,
|
|
389
|
-
className:
|
|
389
|
+
className: chunk7WVGPVSG_js.cn("-mx-1 my-1 h-px bg-gray-100 dark:bg-neutral-700", className),
|
|
390
390
|
...props
|
|
391
391
|
}
|
|
392
392
|
));
|
|
@@ -398,7 +398,7 @@ var DropdownMenuShortcut = ({
|
|
|
398
398
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
399
399
|
"span",
|
|
400
400
|
{
|
|
401
|
-
className:
|
|
401
|
+
className: chunk7WVGPVSG_js.cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
402
402
|
...props
|
|
403
403
|
}
|
|
404
404
|
);
|
|
@@ -475,7 +475,7 @@ var Form = React9__namespace.forwardRef(
|
|
|
475
475
|
"form",
|
|
476
476
|
{
|
|
477
477
|
ref,
|
|
478
|
-
className:
|
|
478
|
+
className: chunk7WVGPVSG_js.cn("space-y-6", className),
|
|
479
479
|
onSubmit: handleSubmit,
|
|
480
480
|
...props,
|
|
481
481
|
children
|
|
@@ -493,18 +493,18 @@ var FormField = React9__namespace.forwardRef(
|
|
|
493
493
|
() => ({ name, error, id }),
|
|
494
494
|
[name, error, id]
|
|
495
495
|
);
|
|
496
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className:
|
|
496
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: chunk7WVGPVSG_js.cn("space-y-2", className), ...props, children }) });
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
499
|
FormField.displayName = "FormField";
|
|
500
500
|
var FormLabel = React9__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
501
501
|
const { id, error } = useFormFieldContext();
|
|
502
502
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
503
|
-
|
|
503
|
+
chunk7WVGPVSG_js.Label,
|
|
504
504
|
{
|
|
505
505
|
ref,
|
|
506
506
|
htmlFor: id,
|
|
507
|
-
className:
|
|
507
|
+
className: chunk7WVGPVSG_js.cn(error && "text-rose-500 dark:text-rose-400", className),
|
|
508
508
|
...props
|
|
509
509
|
}
|
|
510
510
|
);
|
|
@@ -530,7 +530,7 @@ var FormDescription = React9__namespace.forwardRef(
|
|
|
530
530
|
"span",
|
|
531
531
|
{
|
|
532
532
|
ref,
|
|
533
|
-
className:
|
|
533
|
+
className: chunk7WVGPVSG_js.cn(
|
|
534
534
|
"block text-sm text-neutral-500 dark:text-neutral-400",
|
|
535
535
|
className
|
|
536
536
|
),
|
|
@@ -553,7 +553,7 @@ var FormMessage = React9__namespace.forwardRef(
|
|
|
553
553
|
{
|
|
554
554
|
ref,
|
|
555
555
|
id: id ? `${id}-error` : void 0,
|
|
556
|
-
className:
|
|
556
|
+
className: chunk7WVGPVSG_js.cn(
|
|
557
557
|
"text-sm font-medium",
|
|
558
558
|
error ? "text-rose-500 dark:text-rose-400" : "text-neutral-600 dark:text-neutral-400",
|
|
559
559
|
className
|
|
@@ -644,7 +644,7 @@ var PopoverContent = React9__namespace.forwardRef(({ className, align = "center"
|
|
|
644
644
|
damping: 25,
|
|
645
645
|
mass: 0.8
|
|
646
646
|
},
|
|
647
|
-
className:
|
|
647
|
+
className: chunk7WVGPVSG_js.cn(
|
|
648
648
|
"z-50 w-72 rounded-hz-lg border border-white/20 bg-white/80 backdrop-blur-xl p-4 text-gray-900 shadow-lg outline-none dark:border-neutral-700/50 dark:bg-neutral-900/80 dark:text-neutral-100 origin-[--radix-popover-content-transform-origin]",
|
|
649
649
|
className
|
|
650
650
|
),
|
|
@@ -689,7 +689,7 @@ var SelectTrigger = React9__namespace.forwardRef(({ className, children, ...prop
|
|
|
689
689
|
SelectPrimitive__namespace.Trigger,
|
|
690
690
|
{
|
|
691
691
|
ref,
|
|
692
|
-
className:
|
|
692
|
+
className: chunk7WVGPVSG_js.cn(
|
|
693
693
|
"flex h-[52px] w-full items-center justify-between rounded-hz-md border border-gray-300 bg-white px-4 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 dark:placeholder:text-gray-500 [&>span]:line-clamp-1",
|
|
694
694
|
className
|
|
695
695
|
),
|
|
@@ -705,7 +705,7 @@ var SelectScrollUpButton = React9__namespace.forwardRef(({ className, ...props }
|
|
|
705
705
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
706
706
|
{
|
|
707
707
|
ref,
|
|
708
|
-
className:
|
|
708
|
+
className: chunk7WVGPVSG_js.cn(
|
|
709
709
|
"flex cursor-default items-center justify-center py-1",
|
|
710
710
|
className
|
|
711
711
|
),
|
|
@@ -718,7 +718,7 @@ var SelectScrollDownButton = React9__namespace.forwardRef(({ className, ...props
|
|
|
718
718
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
719
719
|
{
|
|
720
720
|
ref,
|
|
721
|
-
className:
|
|
721
|
+
className: chunk7WVGPVSG_js.cn(
|
|
722
722
|
"flex cursor-default items-center justify-center py-1",
|
|
723
723
|
className
|
|
724
724
|
),
|
|
@@ -755,8 +755,10 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
755
755
|
sticky,
|
|
756
756
|
hideWhenDetached
|
|
757
757
|
} = props;
|
|
758
|
-
|
|
759
|
-
|
|
758
|
+
const ForceMountPortal = SelectPrimitive__namespace.Portal;
|
|
759
|
+
const ForceMountContent = SelectPrimitive__namespace.Content;
|
|
760
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ForceMountPortal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
761
|
+
ForceMountContent,
|
|
760
762
|
{
|
|
761
763
|
ref,
|
|
762
764
|
position,
|
|
@@ -786,7 +788,7 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
786
788
|
damping: 25,
|
|
787
789
|
mass: 0.8
|
|
788
790
|
},
|
|
789
|
-
className:
|
|
791
|
+
className: chunk7WVGPVSG_js.cn(
|
|
790
792
|
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-hidden rounded-hz-lg border border-white/20 bg-white/80 backdrop-blur-xl text-gray-900 shadow-lg dark:border-neutral-700/50 dark:bg-neutral-900/80 dark:text-gray-100 origin-[--radix-select-content-transform-origin]",
|
|
791
793
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
792
794
|
className
|
|
@@ -811,7 +813,7 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
811
813
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
812
814
|
SelectPrimitive__namespace.Viewport,
|
|
813
815
|
{
|
|
814
|
-
className:
|
|
816
|
+
className: chunk7WVGPVSG_js.cn(
|
|
815
817
|
"p-1",
|
|
816
818
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
817
819
|
),
|
|
@@ -831,7 +833,7 @@ var SelectLabel = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
831
833
|
SelectPrimitive__namespace.Label,
|
|
832
834
|
{
|
|
833
835
|
ref,
|
|
834
|
-
className:
|
|
836
|
+
className: chunk7WVGPVSG_js.cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
835
837
|
...props
|
|
836
838
|
}
|
|
837
839
|
));
|
|
@@ -847,7 +849,7 @@ var SelectItem = React9__namespace.forwardRef(({ className, children, textValue,
|
|
|
847
849
|
{
|
|
848
850
|
ref,
|
|
849
851
|
textValue,
|
|
850
|
-
className:
|
|
852
|
+
className: chunk7WVGPVSG_js.cn(
|
|
851
853
|
"relative flex w-full cursor-default select-none items-center rounded-hz-md py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-black/5 focus:text-gray-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-white/10 dark:focus:text-gray-100 transition-colors",
|
|
852
854
|
className
|
|
853
855
|
),
|
|
@@ -864,7 +866,7 @@ var SelectSeparator = React9__namespace.forwardRef(({ className, ...props }, ref
|
|
|
864
866
|
SelectPrimitive__namespace.Separator,
|
|
865
867
|
{
|
|
866
868
|
ref,
|
|
867
|
-
className:
|
|
869
|
+
className: chunk7WVGPVSG_js.cn("-mx-1 my-1 h-px bg-gray-200/50 dark:bg-neutral-700/50", className),
|
|
868
870
|
...props
|
|
869
871
|
}
|
|
870
872
|
));
|
|
@@ -891,7 +893,7 @@ function Separator3({
|
|
|
891
893
|
{
|
|
892
894
|
role: decorative ? "none" : "separator",
|
|
893
895
|
"aria-orientation": decorative ? void 0 : orientation ?? void 0,
|
|
894
|
-
className:
|
|
896
|
+
className: chunk7WVGPVSG_js.cn(separatorVariants({ orientation }), className),
|
|
895
897
|
...props
|
|
896
898
|
}
|
|
897
899
|
);
|
|
@@ -900,7 +902,7 @@ function Skeleton({ className }) {
|
|
|
900
902
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
901
903
|
"div",
|
|
902
904
|
{
|
|
903
|
-
className:
|
|
905
|
+
className: chunk7WVGPVSG_js.cn(
|
|
904
906
|
"animate-pulse rounded-hz-md bg-neutral-200 dark:bg-neutral-800",
|
|
905
907
|
className
|
|
906
908
|
)
|
|
@@ -908,28 +910,28 @@ function Skeleton({ className }) {
|
|
|
908
910
|
);
|
|
909
911
|
}
|
|
910
912
|
function SkeletonText({ className }) {
|
|
911
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
913
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("h-4", className) });
|
|
912
914
|
}
|
|
913
915
|
function SkeletonTitle({ className }) {
|
|
914
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
916
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("h-6 w-48", className) });
|
|
915
917
|
}
|
|
916
918
|
function SkeletonSubtitle({ className }) {
|
|
917
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
919
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("h-3 w-64", className) });
|
|
918
920
|
}
|
|
919
921
|
function SkeletonAvatar({ className }) {
|
|
920
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
922
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("w-10 h-10 rounded", className) });
|
|
921
923
|
}
|
|
922
924
|
function SkeletonBadge({ className }) {
|
|
923
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
925
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("h-6 w-24", className) });
|
|
924
926
|
}
|
|
925
927
|
function SkeletonIcon({ className }) {
|
|
926
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
928
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("w-6 h-6 rounded", className) });
|
|
927
929
|
}
|
|
928
930
|
function SkeletonButton({ className }) {
|
|
929
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
931
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("h-10 w-24 rounded-hz-md", className) });
|
|
930
932
|
}
|
|
931
933
|
function SkeletonInput({ className }) {
|
|
932
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk7WVGPVSG_js.cn("h-10 w-full rounded-hz-md", className) });
|
|
933
935
|
}
|
|
934
936
|
function SkeletonTableRow({
|
|
935
937
|
columns = 4,
|
|
@@ -947,7 +949,7 @@ function SkeletonCard({ className }) {
|
|
|
947
949
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
948
950
|
"div",
|
|
949
951
|
{
|
|
950
|
-
className:
|
|
952
|
+
className: chunk7WVGPVSG_js.cn(
|
|
951
953
|
"rounded-hz-lg border bg-card p-6 space-y-4",
|
|
952
954
|
className
|
|
953
955
|
),
|
|
@@ -968,7 +970,7 @@ var useTableContext = () => {
|
|
|
968
970
|
const context = React9__namespace.useContext(TableContext);
|
|
969
971
|
return context;
|
|
970
972
|
};
|
|
971
|
-
var
|
|
973
|
+
var TableInner = React9__namespace.forwardRef(
|
|
972
974
|
({
|
|
973
975
|
className,
|
|
974
976
|
selectable = false,
|
|
@@ -977,10 +979,18 @@ var Table = React9__namespace.forwardRef(
|
|
|
977
979
|
onSelectionChange,
|
|
978
980
|
getRowId,
|
|
979
981
|
rows,
|
|
982
|
+
columns,
|
|
983
|
+
data,
|
|
984
|
+
visibleColumns,
|
|
985
|
+
showDividers = false,
|
|
986
|
+
highlightMode = "row",
|
|
987
|
+
children,
|
|
980
988
|
...props
|
|
981
989
|
}, ref) => {
|
|
982
990
|
const [internalSelectedRows, setInternalSelectedRows] = React9__namespace.useState(/* @__PURE__ */ new Set());
|
|
983
991
|
const [registeredRowIds, setRegisteredRowIds] = React9__namespace.useState(/* @__PURE__ */ new Set());
|
|
992
|
+
const [hoveredCol, setHoveredCol] = React9__namespace.useState(null);
|
|
993
|
+
const [hoveredRowIndex, setHoveredRowIndex] = React9__namespace.useState(null);
|
|
984
994
|
const isControlled = controlledSelectedRows !== void 0;
|
|
985
995
|
const selectedRowsSet = isControlled ? new Set(controlledSelectedRows) : internalSelectedRows;
|
|
986
996
|
const defaultGetRowId = React9__namespace.useCallback((row) => {
|
|
@@ -1097,22 +1107,87 @@ var Table = React9__namespace.forwardRef(
|
|
|
1097
1107
|
registerRowId,
|
|
1098
1108
|
unregisterRowId
|
|
1099
1109
|
]);
|
|
1100
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1101
|
-
"
|
|
1110
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1111
|
+
"div",
|
|
1102
1112
|
{
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1113
|
+
className: "relative w-full overflow-auto",
|
|
1114
|
+
onMouseLeave: () => {
|
|
1115
|
+
setHoveredCol(null);
|
|
1116
|
+
setHoveredRowIndex(null);
|
|
1117
|
+
},
|
|
1118
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1119
|
+
"table",
|
|
1120
|
+
{
|
|
1121
|
+
ref,
|
|
1122
|
+
className: chunk7WVGPVSG_js.cn("w-full caption-bottom text-sm", className),
|
|
1123
|
+
...props,
|
|
1124
|
+
children: columns && data ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (() => {
|
|
1125
|
+
const visibleCols = columns.filter(
|
|
1126
|
+
(col) => col.sticky || !visibleColumns || visibleColumns.includes(col.key)
|
|
1127
|
+
);
|
|
1128
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1129
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "[&_tr]:border-b [&_tr]:border-gray-200 dark:[&_tr]:border-gray-700", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-gray-200 transition-colors dark:border-neutral-700", children: visibleCols.map((col) => {
|
|
1130
|
+
const isColHovered = (highlightMode === "column" || highlightMode === "cross") && hoveredCol === col.key;
|
|
1131
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1132
|
+
"th",
|
|
1133
|
+
{
|
|
1134
|
+
style: col.minWidth ? { minWidth: col.minWidth } : void 0,
|
|
1135
|
+
onMouseEnter: () => {
|
|
1136
|
+
if (highlightMode === "column" || highlightMode === "cross") setHoveredCol(col.key);
|
|
1137
|
+
},
|
|
1138
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1139
|
+
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400 transition-colors",
|
|
1140
|
+
col.sticky ? chunk7WVGPVSG_js.cn("sticky left-0 z-20", isColHovered ? "bg-gray-50 dark:bg-neutral-800/50" : "bg-white dark:bg-neutral-900") : isColHovered ? "bg-gray-50 dark:bg-neutral-800/50" : void 0,
|
|
1141
|
+
showDividers && "border-r border-gray-200 dark:border-neutral-700"
|
|
1142
|
+
),
|
|
1143
|
+
children: col.label
|
|
1144
|
+
},
|
|
1145
|
+
col.key
|
|
1146
|
+
);
|
|
1147
|
+
}) }) }),
|
|
1148
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "[&_tr:last-child]:border-0", children: data.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
|
+
"tr",
|
|
1150
|
+
{
|
|
1151
|
+
className: "border-b border-gray-200 transition-colors dark:border-neutral-700",
|
|
1152
|
+
children: visibleCols.map((col) => {
|
|
1153
|
+
const isRowHovered = (highlightMode === "row" || highlightMode === "cross") && rowIndex === hoveredRowIndex;
|
|
1154
|
+
const isColHovered = (highlightMode === "column" || highlightMode === "cross") && hoveredCol === col.key;
|
|
1155
|
+
const isHighlighted = isRowHovered || isColHovered;
|
|
1156
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1157
|
+
"td",
|
|
1158
|
+
{
|
|
1159
|
+
onMouseEnter: () => {
|
|
1160
|
+
if (highlightMode === "column" || highlightMode === "cross") setHoveredCol(col.key);
|
|
1161
|
+
if (highlightMode === "row" || highlightMode === "cross") setHoveredRowIndex(rowIndex);
|
|
1162
|
+
},
|
|
1163
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1164
|
+
"p-4 align-middle transition-colors",
|
|
1165
|
+
col.sticky ? chunk7WVGPVSG_js.cn("sticky left-0 z-20", isHighlighted ? "bg-gray-50 dark:bg-neutral-800/50" : "bg-white dark:bg-neutral-900") : isHighlighted ? "bg-gray-50 dark:bg-neutral-800/50" : void 0,
|
|
1166
|
+
showDividers && "border-r border-gray-200 dark:border-neutral-700"
|
|
1167
|
+
),
|
|
1168
|
+
children: col.cell(row)
|
|
1169
|
+
},
|
|
1170
|
+
col.key
|
|
1171
|
+
);
|
|
1172
|
+
})
|
|
1173
|
+
},
|
|
1174
|
+
finalGetRowId ? finalGetRowId(row) : rowIndex
|
|
1175
|
+
)) })
|
|
1176
|
+
] });
|
|
1177
|
+
})() }) : children
|
|
1178
|
+
}
|
|
1179
|
+
)
|
|
1106
1180
|
}
|
|
1107
|
-
) })
|
|
1181
|
+
) });
|
|
1108
1182
|
}
|
|
1109
1183
|
);
|
|
1110
|
-
|
|
1184
|
+
TableInner.displayName = "Table";
|
|
1185
|
+
var Table = TableInner;
|
|
1111
1186
|
var TableHeader = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1112
1187
|
"thead",
|
|
1113
1188
|
{
|
|
1114
1189
|
ref,
|
|
1115
|
-
className:
|
|
1190
|
+
className: chunk7WVGPVSG_js.cn("[&_tr]:border-b [&_tr]:border-gray-200 dark:[&_tr]:border-gray-700", className),
|
|
1116
1191
|
...props
|
|
1117
1192
|
}
|
|
1118
1193
|
));
|
|
@@ -1121,7 +1196,7 @@ var TableBody = React9__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
1121
1196
|
"tbody",
|
|
1122
1197
|
{
|
|
1123
1198
|
ref,
|
|
1124
|
-
className:
|
|
1199
|
+
className: chunk7WVGPVSG_js.cn("[&_tr:last-child]:border-0", className),
|
|
1125
1200
|
...props
|
|
1126
1201
|
}
|
|
1127
1202
|
));
|
|
@@ -1130,7 +1205,7 @@ var TableFooter = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1130
1205
|
"tfoot",
|
|
1131
1206
|
{
|
|
1132
1207
|
ref,
|
|
1133
|
-
className:
|
|
1208
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1134
1209
|
"border-t border-gray-200 bg-gray-50 font-medium dark:border-neutral-700 dark:bg-neutral-800/50 [&>tr]:last:border-b-0",
|
|
1135
1210
|
className
|
|
1136
1211
|
),
|
|
@@ -1171,7 +1246,7 @@ var TableRow = React9__namespace.forwardRef(
|
|
|
1171
1246
|
ref,
|
|
1172
1247
|
"data-state": isSelected ? "selected" : void 0,
|
|
1173
1248
|
"data-row-id": finalRowId,
|
|
1174
|
-
className:
|
|
1249
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1175
1250
|
"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",
|
|
1176
1251
|
className
|
|
1177
1252
|
),
|
|
@@ -1186,7 +1261,7 @@ var TableHead = React9__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
1186
1261
|
"th",
|
|
1187
1262
|
{
|
|
1188
1263
|
ref,
|
|
1189
|
-
className:
|
|
1264
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1190
1265
|
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400 [&:has([role=checkbox])]:pr-0",
|
|
1191
1266
|
className
|
|
1192
1267
|
),
|
|
@@ -1199,7 +1274,7 @@ var TableCell = React9__namespace.forwardRef(
|
|
|
1199
1274
|
"td",
|
|
1200
1275
|
{
|
|
1201
1276
|
ref,
|
|
1202
|
-
className:
|
|
1277
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1203
1278
|
"align-middle [&:has([role=checkbox])]:pr-0",
|
|
1204
1279
|
variant === "embed" ? "p-1.5" : "p-4",
|
|
1205
1280
|
className
|
|
@@ -1213,7 +1288,7 @@ var TableCaption = React9__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1213
1288
|
"caption",
|
|
1214
1289
|
{
|
|
1215
1290
|
ref,
|
|
1216
|
-
className:
|
|
1291
|
+
className: chunk7WVGPVSG_js.cn("mt-4 text-sm text-gray-500 dark:text-gray-400", className),
|
|
1217
1292
|
...props
|
|
1218
1293
|
}
|
|
1219
1294
|
));
|
|
@@ -1276,6 +1351,109 @@ var useTableSelection = () => {
|
|
|
1276
1351
|
}
|
|
1277
1352
|
return context;
|
|
1278
1353
|
};
|
|
1354
|
+
function getDefaultColumns(columns, isMobile) {
|
|
1355
|
+
return columns.filter((col) => {
|
|
1356
|
+
if (col.sticky) return true;
|
|
1357
|
+
if (isMobile) return col.mobileVisible === true;
|
|
1358
|
+
return col.defaultVisible !== false;
|
|
1359
|
+
}).map((col) => col.key);
|
|
1360
|
+
}
|
|
1361
|
+
function useColumnVisibility(columns, options = {}) {
|
|
1362
|
+
const { storageKey } = options;
|
|
1363
|
+
const [visibleColumns, setVisibleColumnsState] = React9.useState(() => {
|
|
1364
|
+
if (storageKey && typeof window !== "undefined") {
|
|
1365
|
+
try {
|
|
1366
|
+
const saved = localStorage.getItem(storageKey);
|
|
1367
|
+
if (saved) {
|
|
1368
|
+
const parsed = JSON.parse(saved);
|
|
1369
|
+
const stickyKeys = columns.filter((c) => c.sticky).map((c) => c.key);
|
|
1370
|
+
return Array.from(/* @__PURE__ */ new Set([...stickyKeys, ...parsed]));
|
|
1371
|
+
}
|
|
1372
|
+
} catch {
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
return getDefaultColumns(columns, false);
|
|
1376
|
+
});
|
|
1377
|
+
React9.useEffect(() => {
|
|
1378
|
+
if (storageKey) {
|
|
1379
|
+
try {
|
|
1380
|
+
const saved = localStorage.getItem(storageKey);
|
|
1381
|
+
if (saved) return;
|
|
1382
|
+
} catch {
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
const isMobile = window.innerWidth < 768;
|
|
1386
|
+
if (isMobile) {
|
|
1387
|
+
setVisibleColumnsState(getDefaultColumns(columns, true));
|
|
1388
|
+
}
|
|
1389
|
+
}, []);
|
|
1390
|
+
const setVisibleColumns = React9.useCallback((cols) => {
|
|
1391
|
+
const stickyKeys = columns.filter((c) => c.sticky).map((c) => c.key);
|
|
1392
|
+
const merged = Array.from(/* @__PURE__ */ new Set([...stickyKeys, ...cols]));
|
|
1393
|
+
setVisibleColumnsState(merged);
|
|
1394
|
+
if (storageKey) {
|
|
1395
|
+
try {
|
|
1396
|
+
localStorage.setItem(storageKey, JSON.stringify(merged));
|
|
1397
|
+
} catch {
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}, [columns, storageKey]);
|
|
1401
|
+
return { visibleColumns, setVisibleColumns };
|
|
1402
|
+
}
|
|
1403
|
+
function ColumnSelection({
|
|
1404
|
+
columns,
|
|
1405
|
+
visibleColumns,
|
|
1406
|
+
onVisibleColumnsChange,
|
|
1407
|
+
triggerLabel = "Columns",
|
|
1408
|
+
trigger
|
|
1409
|
+
}) {
|
|
1410
|
+
const handleToggle = React9__namespace.useCallback((key, checked) => {
|
|
1411
|
+
if (checked) {
|
|
1412
|
+
if (!visibleColumns.includes(key)) {
|
|
1413
|
+
onVisibleColumnsChange([...visibleColumns, key]);
|
|
1414
|
+
}
|
|
1415
|
+
} else {
|
|
1416
|
+
onVisibleColumnsChange(visibleColumns.filter((k) => k !== key));
|
|
1417
|
+
}
|
|
1418
|
+
}, [visibleColumns, onVisibleColumnsChange]);
|
|
1419
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
1420
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
1421
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SlidersHorizontal, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
1422
|
+
triggerLabel
|
|
1423
|
+
] }) }),
|
|
1424
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { align: "end", className: "w-56 p-2", children: [
|
|
1425
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 py-1.5 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide", children: "Columns" }),
|
|
1426
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1 mt-1", children: columns.map((col) => {
|
|
1427
|
+
const isSticky = !!col.sticky;
|
|
1428
|
+
const isChecked = isSticky || visibleColumns.includes(col.key);
|
|
1429
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1430
|
+
"label",
|
|
1431
|
+
{
|
|
1432
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1433
|
+
"flex items-center gap-2.5 rounded-hz-md px-2 py-1.5 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-neutral-800",
|
|
1434
|
+
isSticky && "opacity-50 cursor-not-allowed"
|
|
1435
|
+
),
|
|
1436
|
+
children: [
|
|
1437
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1438
|
+
Checkbox,
|
|
1439
|
+
{
|
|
1440
|
+
"aria-label": col.label,
|
|
1441
|
+
checked: isChecked,
|
|
1442
|
+
disabled: isSticky,
|
|
1443
|
+
onCheckedChange: (checked) => {
|
|
1444
|
+
if (!isSticky) handleToggle(col.key, !!checked);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
),
|
|
1448
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-700 dark:text-gray-300", children: col.label })
|
|
1449
|
+
]
|
|
1450
|
+
},
|
|
1451
|
+
col.key
|
|
1452
|
+
);
|
|
1453
|
+
}) })
|
|
1454
|
+
] })
|
|
1455
|
+
] });
|
|
1456
|
+
}
|
|
1279
1457
|
var TabsContext = React9__namespace.createContext(null);
|
|
1280
1458
|
var useTabsContext = () => {
|
|
1281
1459
|
const context = React9__namespace.useContext(TabsContext);
|
|
@@ -1355,7 +1533,7 @@ var TabsList = React9__namespace.forwardRef(({ className, children, variant = "p
|
|
|
1355
1533
|
else if (ref) ref.current = node;
|
|
1356
1534
|
listRef.current = node;
|
|
1357
1535
|
},
|
|
1358
|
-
className:
|
|
1536
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1359
1537
|
variant === "pill" ? "relative inline-flex h-10 items-center justify-center rounded-hz-lg p-1 bg-gray-100 text-gray-500 dark:bg-neutral-700 dark:text-gray-400" : "flex gap-4 border-b border-gray-200 dark:border-neutral-800",
|
|
1360
1538
|
className
|
|
1361
1539
|
),
|
|
@@ -1401,12 +1579,12 @@ var TabsTrigger = React9__namespace.forwardRef(({ className, value, icon, childr
|
|
|
1401
1579
|
else if (ref) ref.current = node;
|
|
1402
1580
|
},
|
|
1403
1581
|
value,
|
|
1404
|
-
className:
|
|
1582
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1405
1583
|
"inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
1406
|
-
variant === "pill" ?
|
|
1584
|
+
variant === "pill" ? chunk7WVGPVSG_js.cn(
|
|
1407
1585
|
"relative z-10 justify-center rounded-hz-md px-3 py-1.5 transition-colors",
|
|
1408
1586
|
isActive ? "text-gray-900 dark:text-gray-100" : "text-gray-500 dark:text-gray-400"
|
|
1409
|
-
) :
|
|
1587
|
+
) : chunk7WVGPVSG_js.cn(
|
|
1410
1588
|
"pb-3 border-b-2 transition-colors",
|
|
1411
1589
|
isActive ? "border-blue-600 text-blue-600 dark:border-blue-400 dark:text-blue-400" : "border-transparent text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300 hover:border-gray-300 dark:hover:border-gray-600"
|
|
1412
1590
|
),
|
|
@@ -1425,7 +1603,7 @@ var TabsContent = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1425
1603
|
TabsPrimitive__namespace.Content,
|
|
1426
1604
|
{
|
|
1427
1605
|
ref,
|
|
1428
|
-
className:
|
|
1606
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1429
1607
|
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
|
|
1430
1608
|
className
|
|
1431
1609
|
),
|
|
@@ -1438,7 +1616,7 @@ var Textarea = React9__namespace.forwardRef(
|
|
|
1438
1616
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1439
1617
|
"textarea",
|
|
1440
1618
|
{
|
|
1441
|
-
className:
|
|
1619
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1442
1620
|
"flex min-h-[80px] w-full rounded-hz-md border border-gray-300 bg-white px-3 py-2 text-sm text-gray-900 placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 dark:placeholder:text-gray-500",
|
|
1443
1621
|
className
|
|
1444
1622
|
),
|
|
@@ -1517,7 +1695,7 @@ function Toggle({
|
|
|
1517
1695
|
...props,
|
|
1518
1696
|
type: "multiple",
|
|
1519
1697
|
...value !== void 0 ? { value, onValueChange: onChange } : {},
|
|
1520
|
-
className:
|
|
1698
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1521
1699
|
toggleGroupVariants({ size }),
|
|
1522
1700
|
containerRadiusClass[radius],
|
|
1523
1701
|
className
|
|
@@ -1530,7 +1708,7 @@ function Toggle({
|
|
|
1530
1708
|
value: option.value,
|
|
1531
1709
|
disabled: option.disabled,
|
|
1532
1710
|
"aria-label": iconOnly ? option.ariaLabel ?? option.value : void 0,
|
|
1533
|
-
className:
|
|
1711
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1534
1712
|
toggleItemVariants({ size, iconOnly }),
|
|
1535
1713
|
itemRadiusClass[radius],
|
|
1536
1714
|
"border border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
@@ -1606,7 +1784,7 @@ function SegmentedControl({
|
|
|
1606
1784
|
{
|
|
1607
1785
|
...props,
|
|
1608
1786
|
...value !== void 0 ? { value, onValueChange: onChange } : {},
|
|
1609
|
-
className:
|
|
1787
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1610
1788
|
segmentedControlVariants({ size }),
|
|
1611
1789
|
containerRadiusClass2[radius],
|
|
1612
1790
|
className
|
|
@@ -1616,7 +1794,7 @@ function SegmentedControl({
|
|
|
1616
1794
|
{
|
|
1617
1795
|
value: option.value,
|
|
1618
1796
|
disabled: option.disabled,
|
|
1619
|
-
className:
|
|
1797
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1620
1798
|
segmentedControlItemVariants({ size }),
|
|
1621
1799
|
itemRadiusClass2[radius],
|
|
1622
1800
|
"border border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
@@ -1684,7 +1862,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1684
1862
|
...props,
|
|
1685
1863
|
id: switchId,
|
|
1686
1864
|
ref,
|
|
1687
|
-
className:
|
|
1865
|
+
className: chunk7WVGPVSG_js.cn(switchTrackVariants({ size }), className),
|
|
1688
1866
|
children: /* @__PURE__ */ jsxRuntime.jsx(SwitchPrimitive__namespace.Thumb, { className: switchThumbVariants({ size }) })
|
|
1689
1867
|
}
|
|
1690
1868
|
);
|
|
@@ -1692,7 +1870,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1692
1870
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1693
1871
|
"div",
|
|
1694
1872
|
{
|
|
1695
|
-
className:
|
|
1873
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1696
1874
|
"inline-flex items-center gap-2",
|
|
1697
1875
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1698
1876
|
),
|
|
@@ -1701,7 +1879,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1701
1879
|
"label",
|
|
1702
1880
|
{
|
|
1703
1881
|
htmlFor: switchId,
|
|
1704
|
-
className:
|
|
1882
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1705
1883
|
switchLabelVariants({ size }),
|
|
1706
1884
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1707
1885
|
),
|
|
@@ -1713,7 +1891,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1713
1891
|
"label",
|
|
1714
1892
|
{
|
|
1715
1893
|
htmlFor: switchId,
|
|
1716
|
-
className:
|
|
1894
|
+
className: chunk7WVGPVSG_js.cn(
|
|
1717
1895
|
switchLabelVariants({ size }),
|
|
1718
1896
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1719
1897
|
),
|
|
@@ -1734,6 +1912,7 @@ exports.CardFooter = CardFooter;
|
|
|
1734
1912
|
exports.CardHeader = CardHeader;
|
|
1735
1913
|
exports.CardTitle = CardTitle;
|
|
1736
1914
|
exports.Checkbox = Checkbox;
|
|
1915
|
+
exports.ColumnSelection = ColumnSelection;
|
|
1737
1916
|
exports.Dialog = Dialog;
|
|
1738
1917
|
exports.DialogClose = DialogClose;
|
|
1739
1918
|
exports.DialogContent = DialogContent;
|
|
@@ -1819,8 +1998,9 @@ exports.switchThumbVariants = switchThumbVariants;
|
|
|
1819
1998
|
exports.switchTrackVariants = switchTrackVariants;
|
|
1820
1999
|
exports.toggleGroupVariants = toggleGroupVariants;
|
|
1821
2000
|
exports.toggleItemVariants = toggleItemVariants;
|
|
2001
|
+
exports.useColumnVisibility = useColumnVisibility;
|
|
1822
2002
|
exports.useFormContext = useFormContext;
|
|
1823
2003
|
exports.useFormFieldContext = useFormFieldContext;
|
|
1824
2004
|
exports.useTableSelection = useTableSelection;
|
|
1825
|
-
//# sourceMappingURL=chunk-
|
|
1826
|
-
//# sourceMappingURL=chunk-
|
|
2005
|
+
//# sourceMappingURL=chunk-UWBZTH6L.js.map
|
|
2006
|
+
//# sourceMappingURL=chunk-UWBZTH6L.js.map
|