@pos-360/horizon 0.27.1 → 0.28.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-5XF7Y25B.js → chunk-23BJPJOK.js} +14 -2
- package/dist/chunk-23BJPJOK.js.map +1 -0
- package/dist/{chunk-BFDGIY6V.mjs → chunk-6O2HW4YY.mjs} +3 -3
- package/dist/{chunk-BFDGIY6V.mjs.map → chunk-6O2HW4YY.mjs.map} +1 -1
- package/dist/{chunk-JP5BJYYD.js → chunk-BKMHL4FM.js} +451 -99
- package/dist/chunk-BKMHL4FM.js.map +1 -0
- package/dist/{chunk-UQ66UPWH.mjs → chunk-EZDGMHS7.mjs} +14 -3
- package/dist/chunk-EZDGMHS7.mjs.map +1 -0
- package/dist/{chunk-2LATCE3V.mjs → chunk-SJJ6KXCU.mjs} +362 -11
- package/dist/chunk-SJJ6KXCU.mjs.map +1 -0
- package/dist/{chunk-3LLPK34Q.js → chunk-U2XUN4SS.js} +83 -83
- package/dist/{chunk-3LLPK34Q.js.map → chunk-U2XUN4SS.js.map} +1 -1
- package/dist/enhanced.js +32 -32
- package/dist/enhanced.mjs +2 -2
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +157 -149
- package/dist/index.mjs +3 -3
- package/dist/primitives.d.mts +18 -2
- package/dist/primitives.d.ts +18 -2
- package/dist/primitives.js +121 -117
- package/dist/primitives.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-2LATCE3V.mjs.map +0 -1
- package/dist/chunk-5XF7Y25B.js.map +0 -1
- package/dist/chunk-JP5BJYYD.js.map +0 -1
- package/dist/chunk-UQ66UPWH.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk23BJPJOK_js = require('./chunk-23BJPJOK.js');
|
|
4
4
|
var React10 = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
@@ -88,7 +88,7 @@ var Button = React10__namespace.forwardRef(
|
|
|
88
88
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
89
89
|
Comp,
|
|
90
90
|
{
|
|
91
|
-
className:
|
|
91
|
+
className: chunk23BJPJOK_js.cn(buttonVariants({ variant, size, className })),
|
|
92
92
|
ref,
|
|
93
93
|
...props,
|
|
94
94
|
children
|
|
@@ -99,7 +99,7 @@ var Button = React10__namespace.forwardRef(
|
|
|
99
99
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
100
100
|
Comp,
|
|
101
101
|
{
|
|
102
|
-
className:
|
|
102
|
+
className: chunk23BJPJOK_js.cn(buttonVariants({ variant, size, className })),
|
|
103
103
|
ref,
|
|
104
104
|
...props,
|
|
105
105
|
children: [
|
|
@@ -116,7 +116,7 @@ var Card = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
118
|
ref,
|
|
119
|
-
className:
|
|
119
|
+
className: chunk23BJPJOK_js.cn(
|
|
120
120
|
"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",
|
|
121
121
|
className
|
|
122
122
|
),
|
|
@@ -128,7 +128,7 @@ var CardHeader = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
128
128
|
"div",
|
|
129
129
|
{
|
|
130
130
|
ref,
|
|
131
|
-
className:
|
|
131
|
+
className: chunk23BJPJOK_js.cn("flex flex-col space-y-1.5 p-4", className),
|
|
132
132
|
...props
|
|
133
133
|
}
|
|
134
134
|
));
|
|
@@ -137,7 +137,7 @@ var CardTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
137
137
|
"div",
|
|
138
138
|
{
|
|
139
139
|
ref,
|
|
140
|
-
className:
|
|
140
|
+
className: chunk23BJPJOK_js.cn("font-semibold leading-none tracking-tight", className),
|
|
141
141
|
...props
|
|
142
142
|
}
|
|
143
143
|
));
|
|
@@ -146,7 +146,7 @@ var CardDescription = React10__namespace.forwardRef(({ className, ...props }, re
|
|
|
146
146
|
"div",
|
|
147
147
|
{
|
|
148
148
|
ref,
|
|
149
|
-
className:
|
|
149
|
+
className: chunk23BJPJOK_js.cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
150
150
|
...props
|
|
151
151
|
}
|
|
152
152
|
));
|
|
@@ -155,7 +155,7 @@ var CardContent = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
155
155
|
"div",
|
|
156
156
|
{
|
|
157
157
|
ref,
|
|
158
|
-
className:
|
|
158
|
+
className: chunk23BJPJOK_js.cn("p-4 pt-0", className),
|
|
159
159
|
...props
|
|
160
160
|
}
|
|
161
161
|
));
|
|
@@ -164,7 +164,7 @@ var CardFooter = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
164
164
|
"div",
|
|
165
165
|
{
|
|
166
166
|
ref,
|
|
167
|
-
className:
|
|
167
|
+
className: chunk23BJPJOK_js.cn("flex items-center p-4 pt-0", className),
|
|
168
168
|
...props
|
|
169
169
|
}
|
|
170
170
|
));
|
|
@@ -173,7 +173,7 @@ var Checkbox = React10__namespace.forwardRef(({ className, indicatorIcon, ...pro
|
|
|
173
173
|
CheckboxPrimitive__namespace.Root,
|
|
174
174
|
{
|
|
175
175
|
ref,
|
|
176
|
-
className:
|
|
176
|
+
className: chunk23BJPJOK_js.cn(
|
|
177
177
|
"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",
|
|
178
178
|
className
|
|
179
179
|
),
|
|
@@ -181,7 +181,7 @@ var Checkbox = React10__namespace.forwardRef(({ className, indicatorIcon, ...pro
|
|
|
181
181
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
182
182
|
CheckboxPrimitive__namespace.Indicator,
|
|
183
183
|
{
|
|
184
|
-
className:
|
|
184
|
+
className: chunk23BJPJOK_js.cn("flex items-center justify-center text-current"),
|
|
185
185
|
children: indicatorIcon ?? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-3.5 w-3.5", strokeWidth: 3 })
|
|
186
186
|
}
|
|
187
187
|
)
|
|
@@ -196,7 +196,7 @@ var DialogOverlay = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
196
196
|
DialogPrimitive__namespace.Overlay,
|
|
197
197
|
{
|
|
198
198
|
ref,
|
|
199
|
-
className:
|
|
199
|
+
className: chunk23BJPJOK_js.cn(
|
|
200
200
|
"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",
|
|
201
201
|
className
|
|
202
202
|
),
|
|
@@ -210,7 +210,7 @@ var DialogContent = React10__namespace.forwardRef(({ className, children, ...pro
|
|
|
210
210
|
DialogPrimitive__namespace.Content,
|
|
211
211
|
{
|
|
212
212
|
ref,
|
|
213
|
-
className:
|
|
213
|
+
className: chunk23BJPJOK_js.cn(
|
|
214
214
|
"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",
|
|
215
215
|
className
|
|
216
216
|
),
|
|
@@ -232,7 +232,7 @@ var DialogHeader = ({
|
|
|
232
232
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
233
233
|
"div",
|
|
234
234
|
{
|
|
235
|
-
className:
|
|
235
|
+
className: chunk23BJPJOK_js.cn(
|
|
236
236
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
|
237
237
|
className
|
|
238
238
|
),
|
|
@@ -246,7 +246,7 @@ var DialogFooter = ({
|
|
|
246
246
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
247
|
"div",
|
|
248
248
|
{
|
|
249
|
-
className:
|
|
249
|
+
className: chunk23BJPJOK_js.cn(
|
|
250
250
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
251
251
|
className
|
|
252
252
|
),
|
|
@@ -258,7 +258,7 @@ var DialogTitle = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
258
258
|
DialogPrimitive__namespace.Title,
|
|
259
259
|
{
|
|
260
260
|
ref,
|
|
261
|
-
className:
|
|
261
|
+
className: chunk23BJPJOK_js.cn(
|
|
262
262
|
"text-lg font-semibold leading-none tracking-tight text-gray-900 dark:text-gray-100",
|
|
263
263
|
className
|
|
264
264
|
),
|
|
@@ -270,7 +270,7 @@ var DialogDescription = React10__namespace.forwardRef(({ className, ...props },
|
|
|
270
270
|
DialogPrimitive__namespace.Description,
|
|
271
271
|
{
|
|
272
272
|
ref,
|
|
273
|
-
className:
|
|
273
|
+
className: chunk23BJPJOK_js.cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
274
274
|
...props
|
|
275
275
|
}
|
|
276
276
|
));
|
|
@@ -285,7 +285,7 @@ var DropdownMenuSubTrigger = React10__namespace.forwardRef(({ className, inset,
|
|
|
285
285
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
286
286
|
{
|
|
287
287
|
ref,
|
|
288
|
-
className:
|
|
288
|
+
className: chunk23BJPJOK_js.cn(
|
|
289
289
|
"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",
|
|
290
290
|
inset && "pl-8",
|
|
291
291
|
className
|
|
@@ -302,7 +302,7 @@ var DropdownMenuSubContent = React10__namespace.forwardRef(({ className, ...prop
|
|
|
302
302
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
303
303
|
{
|
|
304
304
|
ref,
|
|
305
|
-
className:
|
|
305
|
+
className: chunk23BJPJOK_js.cn(
|
|
306
306
|
"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",
|
|
307
307
|
className
|
|
308
308
|
),
|
|
@@ -315,7 +315,7 @@ var DropdownMenuContent = React10__namespace.forwardRef(({ className, sideOffset
|
|
|
315
315
|
{
|
|
316
316
|
ref,
|
|
317
317
|
sideOffset,
|
|
318
|
-
className:
|
|
318
|
+
className: chunk23BJPJOK_js.cn(
|
|
319
319
|
"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",
|
|
320
320
|
"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]",
|
|
321
321
|
className
|
|
@@ -328,7 +328,7 @@ var DropdownMenuItem = React10__namespace.forwardRef(({ className, inset, ...pro
|
|
|
328
328
|
DropdownMenuPrimitive__namespace.Item,
|
|
329
329
|
{
|
|
330
330
|
ref,
|
|
331
|
-
className:
|
|
331
|
+
className: chunk23BJPJOK_js.cn(
|
|
332
332
|
"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",
|
|
333
333
|
inset && "pl-8",
|
|
334
334
|
className
|
|
@@ -341,7 +341,7 @@ var DropdownMenuCheckboxItem = React10__namespace.forwardRef(({ className, child
|
|
|
341
341
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
342
342
|
{
|
|
343
343
|
ref,
|
|
344
|
-
className:
|
|
344
|
+
className: chunk23BJPJOK_js.cn(
|
|
345
345
|
"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",
|
|
346
346
|
className
|
|
347
347
|
),
|
|
@@ -358,7 +358,7 @@ var DropdownMenuRadioItem = React10__namespace.forwardRef(({ className, children
|
|
|
358
358
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
359
359
|
{
|
|
360
360
|
ref,
|
|
361
|
-
className:
|
|
361
|
+
className: chunk23BJPJOK_js.cn(
|
|
362
362
|
"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",
|
|
363
363
|
className
|
|
364
364
|
),
|
|
@@ -374,7 +374,7 @@ var DropdownMenuLabel = React10__namespace.forwardRef(({ className, inset, ...pr
|
|
|
374
374
|
DropdownMenuPrimitive__namespace.Label,
|
|
375
375
|
{
|
|
376
376
|
ref,
|
|
377
|
-
className:
|
|
377
|
+
className: chunk23BJPJOK_js.cn(
|
|
378
378
|
"px-2 py-1.5 text-sm font-semibold",
|
|
379
379
|
inset && "pl-8",
|
|
380
380
|
className
|
|
@@ -387,7 +387,7 @@ var DropdownMenuSeparator = React10__namespace.forwardRef(({ className, ...props
|
|
|
387
387
|
DropdownMenuPrimitive__namespace.Separator,
|
|
388
388
|
{
|
|
389
389
|
ref,
|
|
390
|
-
className:
|
|
390
|
+
className: chunk23BJPJOK_js.cn("-mx-1 my-1 h-px bg-gray-100 dark:bg-neutral-700", className),
|
|
391
391
|
...props
|
|
392
392
|
}
|
|
393
393
|
));
|
|
@@ -399,7 +399,7 @@ var DropdownMenuShortcut = ({
|
|
|
399
399
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
400
400
|
"span",
|
|
401
401
|
{
|
|
402
|
-
className:
|
|
402
|
+
className: chunk23BJPJOK_js.cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
403
403
|
...props
|
|
404
404
|
}
|
|
405
405
|
);
|
|
@@ -476,7 +476,7 @@ var Form = React10__namespace.forwardRef(
|
|
|
476
476
|
"form",
|
|
477
477
|
{
|
|
478
478
|
ref,
|
|
479
|
-
className:
|
|
479
|
+
className: chunk23BJPJOK_js.cn("space-y-6", className),
|
|
480
480
|
onSubmit: handleSubmit,
|
|
481
481
|
...props,
|
|
482
482
|
children
|
|
@@ -494,18 +494,18 @@ var FormField = React10__namespace.forwardRef(
|
|
|
494
494
|
() => ({ name, error, id }),
|
|
495
495
|
[name, error, id]
|
|
496
496
|
);
|
|
497
|
-
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className:
|
|
497
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: chunk23BJPJOK_js.cn("space-y-2", className), ...props, children }) });
|
|
498
498
|
}
|
|
499
499
|
);
|
|
500
500
|
FormField.displayName = "FormField";
|
|
501
501
|
var FormLabel = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
502
502
|
const { id, error } = useFormFieldContext();
|
|
503
503
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
504
|
-
|
|
504
|
+
chunk23BJPJOK_js.Label,
|
|
505
505
|
{
|
|
506
506
|
ref,
|
|
507
507
|
htmlFor: id,
|
|
508
|
-
className:
|
|
508
|
+
className: chunk23BJPJOK_js.cn(error && "text-rose-500 dark:text-rose-400", className),
|
|
509
509
|
...props
|
|
510
510
|
}
|
|
511
511
|
);
|
|
@@ -531,7 +531,7 @@ var FormDescription = React10__namespace.forwardRef(
|
|
|
531
531
|
"span",
|
|
532
532
|
{
|
|
533
533
|
ref,
|
|
534
|
-
className:
|
|
534
|
+
className: chunk23BJPJOK_js.cn(
|
|
535
535
|
"block text-sm text-neutral-500 dark:text-neutral-400",
|
|
536
536
|
className
|
|
537
537
|
),
|
|
@@ -554,7 +554,7 @@ var FormMessage = React10__namespace.forwardRef(
|
|
|
554
554
|
{
|
|
555
555
|
ref,
|
|
556
556
|
id: id ? `${id}-error` : void 0,
|
|
557
|
-
className:
|
|
557
|
+
className: chunk23BJPJOK_js.cn(
|
|
558
558
|
"text-sm font-medium",
|
|
559
559
|
error ? "text-rose-500 dark:text-rose-400" : "text-neutral-600 dark:text-neutral-400",
|
|
560
560
|
className
|
|
@@ -645,7 +645,7 @@ var PopoverContent = React10__namespace.forwardRef(({ className, align = "center
|
|
|
645
645
|
damping: 25,
|
|
646
646
|
mass: 0.8
|
|
647
647
|
},
|
|
648
|
-
className:
|
|
648
|
+
className: chunk23BJPJOK_js.cn(
|
|
649
649
|
"z-50 w-72 rounded-md 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]",
|
|
650
650
|
className
|
|
651
651
|
),
|
|
@@ -690,7 +690,7 @@ var SelectTrigger = React10__namespace.forwardRef(({ className, children, ...pro
|
|
|
690
690
|
SelectPrimitive__namespace.Trigger,
|
|
691
691
|
{
|
|
692
692
|
ref,
|
|
693
|
-
className:
|
|
693
|
+
className: chunk23BJPJOK_js.cn(
|
|
694
694
|
"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",
|
|
695
695
|
className
|
|
696
696
|
),
|
|
@@ -706,7 +706,7 @@ var SelectScrollUpButton = React10__namespace.forwardRef(({ className, ...props
|
|
|
706
706
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
707
707
|
{
|
|
708
708
|
ref,
|
|
709
|
-
className:
|
|
709
|
+
className: chunk23BJPJOK_js.cn(
|
|
710
710
|
"flex cursor-default items-center justify-center py-1",
|
|
711
711
|
className
|
|
712
712
|
),
|
|
@@ -719,7 +719,7 @@ var SelectScrollDownButton = React10__namespace.forwardRef(({ className, ...prop
|
|
|
719
719
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
720
720
|
{
|
|
721
721
|
ref,
|
|
722
|
-
className:
|
|
722
|
+
className: chunk23BJPJOK_js.cn(
|
|
723
723
|
"flex cursor-default items-center justify-center py-1",
|
|
724
724
|
className
|
|
725
725
|
),
|
|
@@ -790,7 +790,7 @@ var SelectContent = React10__namespace.forwardRef(({ className, children, positi
|
|
|
790
790
|
damping: 25,
|
|
791
791
|
mass: 0.8
|
|
792
792
|
},
|
|
793
|
-
className:
|
|
793
|
+
className: chunk23BJPJOK_js.cn(
|
|
794
794
|
"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]",
|
|
795
795
|
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",
|
|
796
796
|
className
|
|
@@ -815,7 +815,7 @@ var SelectContent = React10__namespace.forwardRef(({ className, children, positi
|
|
|
815
815
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
816
816
|
SelectPrimitive__namespace.Viewport,
|
|
817
817
|
{
|
|
818
|
-
className:
|
|
818
|
+
className: chunk23BJPJOK_js.cn(
|
|
819
819
|
"p-1",
|
|
820
820
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
821
821
|
),
|
|
@@ -835,7 +835,7 @@ var SelectLabel = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
835
835
|
SelectPrimitive__namespace.Label,
|
|
836
836
|
{
|
|
837
837
|
ref,
|
|
838
|
-
className:
|
|
838
|
+
className: chunk23BJPJOK_js.cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
839
839
|
...props
|
|
840
840
|
}
|
|
841
841
|
));
|
|
@@ -851,7 +851,7 @@ var SelectItem = React10__namespace.forwardRef(({ className, children, textValue
|
|
|
851
851
|
{
|
|
852
852
|
ref,
|
|
853
853
|
textValue,
|
|
854
|
-
className:
|
|
854
|
+
className: chunk23BJPJOK_js.cn(
|
|
855
855
|
"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",
|
|
856
856
|
className
|
|
857
857
|
),
|
|
@@ -868,7 +868,7 @@ var SelectSeparator = React10__namespace.forwardRef(({ className, ...props }, re
|
|
|
868
868
|
SelectPrimitive__namespace.Separator,
|
|
869
869
|
{
|
|
870
870
|
ref,
|
|
871
|
-
className:
|
|
871
|
+
className: chunk23BJPJOK_js.cn("-mx-1 my-1 h-px bg-gray-200/50 dark:bg-neutral-700/50", className),
|
|
872
872
|
...props
|
|
873
873
|
}
|
|
874
874
|
));
|
|
@@ -895,7 +895,7 @@ function Separator3({
|
|
|
895
895
|
{
|
|
896
896
|
role: decorative ? "none" : "separator",
|
|
897
897
|
"aria-orientation": decorative ? void 0 : orientation ?? void 0,
|
|
898
|
-
className:
|
|
898
|
+
className: chunk23BJPJOK_js.cn(separatorVariants({ orientation }), className),
|
|
899
899
|
...props
|
|
900
900
|
}
|
|
901
901
|
);
|
|
@@ -904,7 +904,7 @@ function Skeleton({ className }) {
|
|
|
904
904
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
905
905
|
"div",
|
|
906
906
|
{
|
|
907
|
-
className:
|
|
907
|
+
className: chunk23BJPJOK_js.cn(
|
|
908
908
|
"animate-pulse rounded-hz-md bg-neutral-200 dark:bg-neutral-800",
|
|
909
909
|
className
|
|
910
910
|
)
|
|
@@ -912,28 +912,28 @@ function Skeleton({ className }) {
|
|
|
912
912
|
);
|
|
913
913
|
}
|
|
914
914
|
function SkeletonText({ className }) {
|
|
915
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
915
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("h-4", className) });
|
|
916
916
|
}
|
|
917
917
|
function SkeletonTitle({ className }) {
|
|
918
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
918
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("h-6 w-48", className) });
|
|
919
919
|
}
|
|
920
920
|
function SkeletonSubtitle({ className }) {
|
|
921
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
921
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("h-3 w-64", className) });
|
|
922
922
|
}
|
|
923
923
|
function SkeletonAvatar({ className }) {
|
|
924
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
924
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("w-10 h-10 rounded", className) });
|
|
925
925
|
}
|
|
926
926
|
function SkeletonBadge({ className }) {
|
|
927
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
927
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("h-6 w-24", className) });
|
|
928
928
|
}
|
|
929
929
|
function SkeletonIcon({ className }) {
|
|
930
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
930
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("w-6 h-6 rounded", className) });
|
|
931
931
|
}
|
|
932
932
|
function SkeletonButton({ className }) {
|
|
933
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
933
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("h-10 w-24 rounded-hz-md", className) });
|
|
934
934
|
}
|
|
935
935
|
function SkeletonInput({ className }) {
|
|
936
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
936
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunk23BJPJOK_js.cn("h-10 w-full rounded-hz-md", className) });
|
|
937
937
|
}
|
|
938
938
|
function SkeletonTableRow({
|
|
939
939
|
columns = 4,
|
|
@@ -951,7 +951,7 @@ function SkeletonCard({ className }) {
|
|
|
951
951
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
952
952
|
"div",
|
|
953
953
|
{
|
|
954
|
-
className:
|
|
954
|
+
className: chunk23BJPJOK_js.cn(
|
|
955
955
|
"rounded-hz-lg border bg-card p-6 space-y-4",
|
|
956
956
|
className
|
|
957
957
|
),
|
|
@@ -1025,7 +1025,7 @@ function SegmentedControl({
|
|
|
1025
1025
|
{
|
|
1026
1026
|
...props,
|
|
1027
1027
|
...value !== void 0 ? { value, onValueChange: onChange } : {},
|
|
1028
|
-
className:
|
|
1028
|
+
className: chunk23BJPJOK_js.cn(
|
|
1029
1029
|
segmentedControlVariants({ size }),
|
|
1030
1030
|
containerRadiusClass[radius],
|
|
1031
1031
|
className
|
|
@@ -1035,7 +1035,7 @@ function SegmentedControl({
|
|
|
1035
1035
|
{
|
|
1036
1036
|
value: option.value,
|
|
1037
1037
|
disabled: option.disabled,
|
|
1038
|
-
className:
|
|
1038
|
+
className: chunk23BJPJOK_js.cn(
|
|
1039
1039
|
segmentedControlItemVariants({ size }),
|
|
1040
1040
|
itemRadiusClass[radius],
|
|
1041
1041
|
"border border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
@@ -1072,7 +1072,7 @@ function BulkEditPopover({ column, onApply }) {
|
|
|
1072
1072
|
}
|
|
1073
1073
|
if (!next) setValue("");
|
|
1074
1074
|
};
|
|
1075
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1075
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk23BJPJOK_js.Tooltip, { content: `Apply to all ${headingLabel}`, side: "top", disabled: open, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex", children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: handleOpenChange, children: [
|
|
1076
1076
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1077
1077
|
"button",
|
|
1078
1078
|
{
|
|
@@ -1083,7 +1083,7 @@ function BulkEditPopover({ column, onApply }) {
|
|
|
1083
1083
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PenLine, { className: "h-3.5 w-3.5" })
|
|
1084
1084
|
}
|
|
1085
1085
|
) }),
|
|
1086
|
-
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { align: "start", className:
|
|
1086
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { align: "start", className: chunk23BJPJOK_js.cn("p-3 space-y-3", bulkEdit.kind === "segmented-control" ? "w-auto" : "w-64"), children: [
|
|
1087
1087
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide", children: [
|
|
1088
1088
|
"Apply to all \u2014 ",
|
|
1089
1089
|
headingLabel
|
|
@@ -1104,7 +1104,7 @@ function BulkEditPopover({ column, onApply }) {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
},
|
|
1106
1106
|
autoFocus: true,
|
|
1107
|
-
className:
|
|
1107
|
+
className: chunk23BJPJOK_js.cn(
|
|
1108
1108
|
"w-full rounded-hz-md border border-gray-300 bg-white py-2 text-sm text-gray-900 placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-blue-500/50 dark:border-neutral-600 dark:bg-neutral-800 dark:text-gray-100 dark:placeholder:text-gray-500",
|
|
1109
1109
|
bulkEdit.leadingDecorator ? "pl-7 pr-3" : "px-3"
|
|
1110
1110
|
)
|
|
@@ -1335,12 +1335,12 @@ var TableInner = React10__namespace.forwardRef(
|
|
|
1335
1335
|
"div",
|
|
1336
1336
|
{
|
|
1337
1337
|
ref: wrapperRef,
|
|
1338
|
-
className:
|
|
1338
|
+
className: chunk23BJPJOK_js.cn("relative w-full overflow-auto scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-neutral-600 scrollbar-track-transparent", rounded && "rounded-lg", containerClassName),
|
|
1339
1339
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1340
1340
|
"table",
|
|
1341
1341
|
{
|
|
1342
1342
|
ref,
|
|
1343
|
-
className:
|
|
1343
|
+
className: chunk23BJPJOK_js.cn("w-full caption-bottom text-sm", className),
|
|
1344
1344
|
...props,
|
|
1345
1345
|
children: columns && data ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (() => {
|
|
1346
1346
|
const filteredCols = columns.filter(
|
|
@@ -1393,7 +1393,7 @@ var TableInner = React10__namespace.forwardRef(
|
|
|
1393
1393
|
...col.stickyXHeader ? { left: stickyOffsets[col.key] } : {},
|
|
1394
1394
|
...col.stickyXHeader && stickyYHeader ? { boxShadow: xyShadow } : col.stickyXHeader ? { boxShadow: xShadow } : stickyYHeader ? { boxShadow: yShadow } : {}
|
|
1395
1395
|
},
|
|
1396
|
-
className:
|
|
1396
|
+
className: chunk23BJPJOK_js.cn(
|
|
1397
1397
|
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400",
|
|
1398
1398
|
stickyYHeader && "sticky top-0 z-20 bg-gray-50 dark:bg-neutral-800",
|
|
1399
1399
|
col.stickyXHeader && "sticky z-20 bg-gray-50 dark:bg-neutral-800",
|
|
@@ -1420,7 +1420,7 @@ var TableInner = React10__namespace.forwardRef(
|
|
|
1420
1420
|
"tr",
|
|
1421
1421
|
{
|
|
1422
1422
|
"data-state": isSelected ? "selected" : void 0,
|
|
1423
|
-
className:
|
|
1423
|
+
className: chunk23BJPJOK_js.cn(
|
|
1424
1424
|
"border-b border-gray-200 transition-colors dark:border-neutral-700",
|
|
1425
1425
|
isSelected ? "bg-blue-50 dark:bg-blue-900/20" : (highlightMode === "row" || highlightMode === "cross") && "hover:bg-gray-50 dark:hover:bg-neutral-800/50",
|
|
1426
1426
|
onRowClick && "cursor-pointer"
|
|
@@ -1442,9 +1442,9 @@ var TableInner = React10__namespace.forwardRef(
|
|
|
1442
1442
|
}
|
|
1443
1443
|
contextValue.toggleRow(rowId);
|
|
1444
1444
|
} : col.key === "__delete__" ? (e) => e.stopPropagation() : void 0,
|
|
1445
|
-
className:
|
|
1445
|
+
className: chunk23BJPJOK_js.cn(
|
|
1446
1446
|
"p-4 align-middle",
|
|
1447
|
-
col.stickyXHeader &&
|
|
1447
|
+
col.stickyXHeader && chunk23BJPJOK_js.cn("sticky z-20", isSelected ? "bg-blue-50 dark:bg-[#242a3a]" : "bg-gray-50 dark:bg-neutral-800"),
|
|
1448
1448
|
showDividers && "border-r border-gray-200 dark:border-neutral-700",
|
|
1449
1449
|
typeof col.cellClassName === "function" ? col.cellClassName(row) : col.cellClassName
|
|
1450
1450
|
),
|
|
@@ -1470,7 +1470,7 @@ var TableHeader = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1470
1470
|
"thead",
|
|
1471
1471
|
{
|
|
1472
1472
|
ref,
|
|
1473
|
-
className:
|
|
1473
|
+
className: chunk23BJPJOK_js.cn("[&_tr]:border-b [&_tr]:border-gray-200 dark:[&_tr]:border-gray-700", className),
|
|
1474
1474
|
...props
|
|
1475
1475
|
}
|
|
1476
1476
|
));
|
|
@@ -1479,7 +1479,7 @@ var TableBody = React10__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1479
1479
|
"tbody",
|
|
1480
1480
|
{
|
|
1481
1481
|
ref,
|
|
1482
|
-
className:
|
|
1482
|
+
className: chunk23BJPJOK_js.cn("[&_tr:last-child]:border-0", className),
|
|
1483
1483
|
...props
|
|
1484
1484
|
}
|
|
1485
1485
|
));
|
|
@@ -1488,7 +1488,7 @@ var TableFooter = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1488
1488
|
"tfoot",
|
|
1489
1489
|
{
|
|
1490
1490
|
ref,
|
|
1491
|
-
className:
|
|
1491
|
+
className: chunk23BJPJOK_js.cn(
|
|
1492
1492
|
"border-t border-gray-200 bg-gray-50 font-medium dark:border-neutral-700 dark:bg-neutral-800/50 [&>tr]:last:border-b-0",
|
|
1493
1493
|
className
|
|
1494
1494
|
),
|
|
@@ -1529,7 +1529,7 @@ var TableRow = React10__namespace.forwardRef(
|
|
|
1529
1529
|
ref,
|
|
1530
1530
|
"data-state": isSelected ? "selected" : void 0,
|
|
1531
1531
|
"data-row-id": finalRowId,
|
|
1532
|
-
className:
|
|
1532
|
+
className: chunk23BJPJOK_js.cn(
|
|
1533
1533
|
"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",
|
|
1534
1534
|
className
|
|
1535
1535
|
),
|
|
@@ -1549,7 +1549,7 @@ var TableHead = React10__namespace.forwardRef(({ className, style, ...props }, r
|
|
|
1549
1549
|
{
|
|
1550
1550
|
ref,
|
|
1551
1551
|
style: context?.stickyHeader ? { boxShadow: yShadow, ...style } : style,
|
|
1552
|
-
className:
|
|
1552
|
+
className: chunk23BJPJOK_js.cn(
|
|
1553
1553
|
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400 [&:has([role=checkbox])]:pr-0",
|
|
1554
1554
|
context?.stickyHeader && "sticky top-0 z-20 bg-gray-50 dark:bg-neutral-800",
|
|
1555
1555
|
className
|
|
@@ -1564,7 +1564,7 @@ var TableCell = React10__namespace.forwardRef(
|
|
|
1564
1564
|
"td",
|
|
1565
1565
|
{
|
|
1566
1566
|
ref,
|
|
1567
|
-
className:
|
|
1567
|
+
className: chunk23BJPJOK_js.cn(
|
|
1568
1568
|
"align-middle [&:has([role=checkbox])]:pr-0",
|
|
1569
1569
|
variant === "embed" ? "p-1.5" : "p-4",
|
|
1570
1570
|
className
|
|
@@ -1578,7 +1578,7 @@ var TableCaption = React10__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1578
1578
|
"caption",
|
|
1579
1579
|
{
|
|
1580
1580
|
ref,
|
|
1581
|
-
className:
|
|
1581
|
+
className: chunk23BJPJOK_js.cn("mt-4 text-sm text-gray-500 dark:text-gray-400", className),
|
|
1582
1582
|
...props
|
|
1583
1583
|
}
|
|
1584
1584
|
));
|
|
@@ -1720,7 +1720,7 @@ function ColumnSelection({
|
|
|
1720
1720
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1721
1721
|
"label",
|
|
1722
1722
|
{
|
|
1723
|
-
className:
|
|
1723
|
+
className: chunk23BJPJOK_js.cn(
|
|
1724
1724
|
"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",
|
|
1725
1725
|
isSticky && "opacity-50 cursor-not-allowed"
|
|
1726
1726
|
),
|
|
@@ -1824,7 +1824,7 @@ var TabsList = React10__namespace.forwardRef(({ className, children, variant = "
|
|
|
1824
1824
|
else if (ref) ref.current = node;
|
|
1825
1825
|
listRef.current = node;
|
|
1826
1826
|
},
|
|
1827
|
-
className:
|
|
1827
|
+
className: chunk23BJPJOK_js.cn(
|
|
1828
1828
|
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",
|
|
1829
1829
|
className
|
|
1830
1830
|
),
|
|
@@ -1870,12 +1870,12 @@ var TabsTrigger = React10__namespace.forwardRef(({ className, value, icon, child
|
|
|
1870
1870
|
else if (ref) ref.current = node;
|
|
1871
1871
|
},
|
|
1872
1872
|
value,
|
|
1873
|
-
className:
|
|
1873
|
+
className: chunk23BJPJOK_js.cn(
|
|
1874
1874
|
"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",
|
|
1875
|
-
variant === "pill" ?
|
|
1875
|
+
variant === "pill" ? chunk23BJPJOK_js.cn(
|
|
1876
1876
|
"relative z-10 justify-center rounded-hz-md px-3 py-1.5 transition-colors",
|
|
1877
1877
|
isActive ? "text-gray-900 dark:text-gray-100" : "text-gray-500 dark:text-gray-400"
|
|
1878
|
-
) :
|
|
1878
|
+
) : chunk23BJPJOK_js.cn(
|
|
1879
1879
|
"pb-3 border-b-2 transition-colors",
|
|
1880
1880
|
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"
|
|
1881
1881
|
),
|
|
@@ -1894,7 +1894,7 @@ var TabsContent = React10__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1894
1894
|
TabsPrimitive__namespace.Content,
|
|
1895
1895
|
{
|
|
1896
1896
|
ref,
|
|
1897
|
-
className:
|
|
1897
|
+
className: chunk23BJPJOK_js.cn(
|
|
1898
1898
|
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
|
|
1899
1899
|
className
|
|
1900
1900
|
),
|
|
@@ -1907,7 +1907,7 @@ var Textarea = React10__namespace.forwardRef(
|
|
|
1907
1907
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1908
1908
|
"textarea",
|
|
1909
1909
|
{
|
|
1910
|
-
className:
|
|
1910
|
+
className: chunk23BJPJOK_js.cn(
|
|
1911
1911
|
"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",
|
|
1912
1912
|
className
|
|
1913
1913
|
),
|
|
@@ -1986,7 +1986,7 @@ function Toggle({
|
|
|
1986
1986
|
...props,
|
|
1987
1987
|
type: "multiple",
|
|
1988
1988
|
...value !== void 0 ? { value, onValueChange: onChange } : {},
|
|
1989
|
-
className:
|
|
1989
|
+
className: chunk23BJPJOK_js.cn(
|
|
1990
1990
|
toggleGroupVariants({ size }),
|
|
1991
1991
|
containerRadiusClass2[radius],
|
|
1992
1992
|
className
|
|
@@ -1999,7 +1999,7 @@ function Toggle({
|
|
|
1999
1999
|
value: option.value,
|
|
2000
2000
|
disabled: option.disabled,
|
|
2001
2001
|
"aria-label": iconOnly ? option.ariaLabel ?? option.value : void 0,
|
|
2002
|
-
className:
|
|
2002
|
+
className: chunk23BJPJOK_js.cn(
|
|
2003
2003
|
toggleItemVariants({ size, iconOnly }),
|
|
2004
2004
|
itemRadiusClass2[radius],
|
|
2005
2005
|
"border border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
@@ -2068,7 +2068,7 @@ var Switch = React10__namespace.forwardRef(({ className, size, label, labelPosit
|
|
|
2068
2068
|
...props,
|
|
2069
2069
|
id: switchId,
|
|
2070
2070
|
ref,
|
|
2071
|
-
className:
|
|
2071
|
+
className: chunk23BJPJOK_js.cn(switchTrackVariants({ size }), className),
|
|
2072
2072
|
children: /* @__PURE__ */ jsxRuntime.jsx(SwitchPrimitive__namespace.Thumb, { className: switchThumbVariants({ size }) })
|
|
2073
2073
|
}
|
|
2074
2074
|
);
|
|
@@ -2076,7 +2076,7 @@ var Switch = React10__namespace.forwardRef(({ className, size, label, labelPosit
|
|
|
2076
2076
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2077
2077
|
"div",
|
|
2078
2078
|
{
|
|
2079
|
-
className:
|
|
2079
|
+
className: chunk23BJPJOK_js.cn(
|
|
2080
2080
|
"inline-flex items-center gap-2",
|
|
2081
2081
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
2082
2082
|
),
|
|
@@ -2085,7 +2085,7 @@ var Switch = React10__namespace.forwardRef(({ className, size, label, labelPosit
|
|
|
2085
2085
|
"label",
|
|
2086
2086
|
{
|
|
2087
2087
|
htmlFor: switchId,
|
|
2088
|
-
className:
|
|
2088
|
+
className: chunk23BJPJOK_js.cn(
|
|
2089
2089
|
switchLabelVariants({ size }),
|
|
2090
2090
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
2091
2091
|
),
|
|
@@ -2097,7 +2097,7 @@ var Switch = React10__namespace.forwardRef(({ className, size, label, labelPosit
|
|
|
2097
2097
|
"label",
|
|
2098
2098
|
{
|
|
2099
2099
|
htmlFor: switchId,
|
|
2100
|
-
className:
|
|
2100
|
+
className: chunk23BJPJOK_js.cn(
|
|
2101
2101
|
switchLabelVariants({ size }),
|
|
2102
2102
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
2103
2103
|
),
|
|
@@ -2109,6 +2109,311 @@ var Switch = React10__namespace.forwardRef(({ className, size, label, labelPosit
|
|
|
2109
2109
|
);
|
|
2110
2110
|
});
|
|
2111
2111
|
Switch.displayName = "Switch";
|
|
2112
|
+
var DEFAULT_TIME_RANGE = {
|
|
2113
|
+
from: { hour: null, minute: null },
|
|
2114
|
+
to: { hour: null, minute: null }
|
|
2115
|
+
};
|
|
2116
|
+
function isTimeSet(tv) {
|
|
2117
|
+
return tv.hour !== null && tv.minute !== null;
|
|
2118
|
+
}
|
|
2119
|
+
function to12Hour(hour24) {
|
|
2120
|
+
if (hour24 === null) return { hour12: null, period: "AM" };
|
|
2121
|
+
const period = hour24 >= 12 ? "PM" : "AM";
|
|
2122
|
+
const hour12 = hour24 % 12 || 12;
|
|
2123
|
+
return { hour12, period };
|
|
2124
|
+
}
|
|
2125
|
+
function to24Hour(hour12, period) {
|
|
2126
|
+
if (period === "AM") return hour12 === 12 ? 0 : hour12;
|
|
2127
|
+
return hour12 === 12 ? 12 : hour12 + 12;
|
|
2128
|
+
}
|
|
2129
|
+
function pad(n) {
|
|
2130
|
+
return n.toString().padStart(2, "0");
|
|
2131
|
+
}
|
|
2132
|
+
function clamp(val, min, max) {
|
|
2133
|
+
return Math.max(min, Math.min(max, val));
|
|
2134
|
+
}
|
|
2135
|
+
function TimeInput({
|
|
2136
|
+
value,
|
|
2137
|
+
min,
|
|
2138
|
+
max,
|
|
2139
|
+
onChange,
|
|
2140
|
+
onComplete,
|
|
2141
|
+
inputRef,
|
|
2142
|
+
disabled = false,
|
|
2143
|
+
"aria-label": ariaLabel
|
|
2144
|
+
}) {
|
|
2145
|
+
const [editValue, setEditValue] = React10__namespace.useState(null);
|
|
2146
|
+
const internalRef = React10__namespace.useRef(null);
|
|
2147
|
+
const committedRef = React10__namespace.useRef(false);
|
|
2148
|
+
const setRefs = React10__namespace.useCallback(chunk23BJPJOK_js.mergeRefs(internalRef, inputRef), [inputRef]);
|
|
2149
|
+
const handleChange = (e) => {
|
|
2150
|
+
const raw = e.target.value.replace(/\D/g, "").slice(0, 2);
|
|
2151
|
+
if (raw === "") {
|
|
2152
|
+
setEditValue(raw);
|
|
2153
|
+
return;
|
|
2154
|
+
}
|
|
2155
|
+
const parsed = parseInt(raw, 10);
|
|
2156
|
+
const clamped = clamp(parsed, min, max);
|
|
2157
|
+
const display = parsed !== clamped ? pad(clamped) : raw;
|
|
2158
|
+
setEditValue(display);
|
|
2159
|
+
if (raw.length === 2) {
|
|
2160
|
+
committedRef.current = true;
|
|
2161
|
+
onChange(clamped);
|
|
2162
|
+
setEditValue(null);
|
|
2163
|
+
onComplete?.();
|
|
2164
|
+
}
|
|
2165
|
+
};
|
|
2166
|
+
const commit = () => {
|
|
2167
|
+
if (committedRef.current) {
|
|
2168
|
+
committedRef.current = false;
|
|
2169
|
+
setEditValue(null);
|
|
2170
|
+
return;
|
|
2171
|
+
}
|
|
2172
|
+
if (editValue === null) return;
|
|
2173
|
+
if (editValue === "") {
|
|
2174
|
+
setEditValue(null);
|
|
2175
|
+
return;
|
|
2176
|
+
}
|
|
2177
|
+
const parsed = parseInt(editValue, 10);
|
|
2178
|
+
if (!isNaN(parsed)) {
|
|
2179
|
+
onChange(clamp(parsed, min, max));
|
|
2180
|
+
}
|
|
2181
|
+
setEditValue(null);
|
|
2182
|
+
};
|
|
2183
|
+
const handleKeyDown = (e) => {
|
|
2184
|
+
if (e.key === "Enter") {
|
|
2185
|
+
commit();
|
|
2186
|
+
internalRef.current?.blur();
|
|
2187
|
+
} else if (e.key === "Escape") {
|
|
2188
|
+
setEditValue(null);
|
|
2189
|
+
internalRef.current?.blur();
|
|
2190
|
+
} else if (e.key === "ArrowUp") {
|
|
2191
|
+
e.preventDefault();
|
|
2192
|
+
const curr = value ?? min;
|
|
2193
|
+
const next = curr >= max ? min : curr + 1;
|
|
2194
|
+
onChange(next);
|
|
2195
|
+
setEditValue(pad(next));
|
|
2196
|
+
} else if (e.key === "ArrowDown") {
|
|
2197
|
+
e.preventDefault();
|
|
2198
|
+
const curr = value ?? max;
|
|
2199
|
+
const next = curr <= min ? max : curr - 1;
|
|
2200
|
+
onChange(next);
|
|
2201
|
+
setEditValue(pad(next));
|
|
2202
|
+
}
|
|
2203
|
+
};
|
|
2204
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2205
|
+
"input",
|
|
2206
|
+
{
|
|
2207
|
+
ref: setRefs,
|
|
2208
|
+
type: "text",
|
|
2209
|
+
inputMode: "numeric",
|
|
2210
|
+
"aria-label": ariaLabel,
|
|
2211
|
+
disabled,
|
|
2212
|
+
value: editValue ?? (value === null ? "--" : pad(value)),
|
|
2213
|
+
onChange: handleChange,
|
|
2214
|
+
onFocus: (e) => {
|
|
2215
|
+
setEditValue("");
|
|
2216
|
+
requestAnimationFrame(() => e.target.select());
|
|
2217
|
+
},
|
|
2218
|
+
onBlur: () => commit(),
|
|
2219
|
+
onKeyDown: handleKeyDown,
|
|
2220
|
+
className: chunk23BJPJOK_js.cn(
|
|
2221
|
+
"w-9 h-8 rounded-md border text-center text-sm tabular-nums font-medium outline-none transition-colors",
|
|
2222
|
+
"bg-white border-gray-200 text-gray-600",
|
|
2223
|
+
"focus:border-blue-500 focus:ring-1 focus:ring-blue-500/30 focus:text-gray-700",
|
|
2224
|
+
"dark:bg-neutral-800 dark:border-neutral-600 dark:text-gray-100",
|
|
2225
|
+
"dark:focus:border-blue-400 dark:focus:ring-blue-400/30",
|
|
2226
|
+
disabled && "opacity-40 cursor-not-allowed bg-gray-50 dark:bg-neutral-900"
|
|
2227
|
+
)
|
|
2228
|
+
}
|
|
2229
|
+
);
|
|
2230
|
+
}
|
|
2231
|
+
function PeriodToggle({ value, onChange, disabled = false }) {
|
|
2232
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2233
|
+
"div",
|
|
2234
|
+
{
|
|
2235
|
+
className: chunk23BJPJOK_js.cn(
|
|
2236
|
+
"inline-flex rounded-md border overflow-hidden",
|
|
2237
|
+
disabled && "opacity-40 cursor-not-allowed",
|
|
2238
|
+
"border-gray-200 dark:border-neutral-600"
|
|
2239
|
+
),
|
|
2240
|
+
children: ["AM", "PM"].map((p) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2241
|
+
"button",
|
|
2242
|
+
{
|
|
2243
|
+
type: "button",
|
|
2244
|
+
disabled,
|
|
2245
|
+
onClick: () => onChange(p),
|
|
2246
|
+
className: chunk23BJPJOK_js.cn(
|
|
2247
|
+
"px-2 h-8 text-xs font-semibold tracking-wide transition-colors",
|
|
2248
|
+
"disabled:pointer-events-none",
|
|
2249
|
+
value === p ? "!bg-blue-600 !text-white dark:!bg-blue-500" : "bg-white text-gray-500 hover:bg-gray-50 hover:text-gray-600 dark:bg-neutral-800 dark:text-gray-400 dark:hover:bg-neutral-700"
|
|
2250
|
+
),
|
|
2251
|
+
children: p
|
|
2252
|
+
},
|
|
2253
|
+
p
|
|
2254
|
+
))
|
|
2255
|
+
}
|
|
2256
|
+
);
|
|
2257
|
+
}
|
|
2258
|
+
function TimeField({
|
|
2259
|
+
label,
|
|
2260
|
+
value,
|
|
2261
|
+
onChange,
|
|
2262
|
+
hourRef,
|
|
2263
|
+
minuteRef,
|
|
2264
|
+
onMinuteComplete,
|
|
2265
|
+
disabled = false
|
|
2266
|
+
}) {
|
|
2267
|
+
const { hour12, period } = to12Hour(value.hour);
|
|
2268
|
+
const minuteInputRef = React10__namespace.useRef(null);
|
|
2269
|
+
const mergedMinuteRef = React10__namespace.useCallback(chunk23BJPJOK_js.mergeRefs(minuteInputRef, minuteRef), [minuteRef]);
|
|
2270
|
+
const handleHourChange = (newHour12) => {
|
|
2271
|
+
onChange({ ...value, hour: to24Hour(newHour12, period) });
|
|
2272
|
+
};
|
|
2273
|
+
const handleMinuteChange = (newMinute) => {
|
|
2274
|
+
onChange({ ...value, minute: newMinute });
|
|
2275
|
+
};
|
|
2276
|
+
const handlePeriodChange = (newPeriod) => {
|
|
2277
|
+
if (hour12 === null) return;
|
|
2278
|
+
onChange({ ...value, hour: to24Hour(hour12, newPeriod) });
|
|
2279
|
+
};
|
|
2280
|
+
const focusMinute = () => {
|
|
2281
|
+
minuteInputRef.current?.focus();
|
|
2282
|
+
};
|
|
2283
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2284
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2285
|
+
"span",
|
|
2286
|
+
{
|
|
2287
|
+
className: chunk23BJPJOK_js.cn(
|
|
2288
|
+
"text-xs font-semibold uppercase tracking-wider",
|
|
2289
|
+
disabled ? "text-gray-300 dark:text-gray-600" : "text-gray-400 dark:text-gray-500"
|
|
2290
|
+
),
|
|
2291
|
+
children: label
|
|
2292
|
+
}
|
|
2293
|
+
),
|
|
2294
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2295
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2296
|
+
TimeInput,
|
|
2297
|
+
{
|
|
2298
|
+
value: hour12,
|
|
2299
|
+
min: 1,
|
|
2300
|
+
max: 12,
|
|
2301
|
+
onChange: handleHourChange,
|
|
2302
|
+
onComplete: focusMinute,
|
|
2303
|
+
inputRef: hourRef,
|
|
2304
|
+
disabled,
|
|
2305
|
+
"aria-label": `${label} hour`
|
|
2306
|
+
}
|
|
2307
|
+
),
|
|
2308
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2309
|
+
"span",
|
|
2310
|
+
{
|
|
2311
|
+
className: chunk23BJPJOK_js.cn(
|
|
2312
|
+
"text-sm font-bold select-none",
|
|
2313
|
+
disabled ? "text-gray-300 dark:text-gray-600" : "text-gray-400 dark:text-gray-500"
|
|
2314
|
+
),
|
|
2315
|
+
children: ":"
|
|
2316
|
+
}
|
|
2317
|
+
),
|
|
2318
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2319
|
+
TimeInput,
|
|
2320
|
+
{
|
|
2321
|
+
value: value.minute,
|
|
2322
|
+
min: 0,
|
|
2323
|
+
max: 59,
|
|
2324
|
+
onChange: handleMinuteChange,
|
|
2325
|
+
onComplete: onMinuteComplete,
|
|
2326
|
+
inputRef: mergedMinuteRef,
|
|
2327
|
+
disabled,
|
|
2328
|
+
"aria-label": `${label} minute`
|
|
2329
|
+
}
|
|
2330
|
+
),
|
|
2331
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2332
|
+
PeriodToggle,
|
|
2333
|
+
{
|
|
2334
|
+
value: period,
|
|
2335
|
+
onChange: handlePeriodChange,
|
|
2336
|
+
disabled
|
|
2337
|
+
}
|
|
2338
|
+
)
|
|
2339
|
+
] })
|
|
2340
|
+
] });
|
|
2341
|
+
}
|
|
2342
|
+
function TimePickerRow({ value, onChange, disabled = false }) {
|
|
2343
|
+
const toHourRef = React10__namespace.useRef(null);
|
|
2344
|
+
const fromSet = isTimeSet(value.from);
|
|
2345
|
+
const toSet = isTimeSet(value.to);
|
|
2346
|
+
const bothSet = fromSet && toSet;
|
|
2347
|
+
const fromMinutes = (value.from.hour ?? 0) * 60 + (value.from.minute ?? 0);
|
|
2348
|
+
const toMinutes = (value.to.hour ?? 0) * 60 + (value.to.minute ?? 0);
|
|
2349
|
+
const bothEqual = fromMinutes === toMinutes;
|
|
2350
|
+
const isOvernight = bothSet && toMinutes < fromMinutes;
|
|
2351
|
+
const durationMinutes = bothSet && !bothEqual ? isOvernight ? 24 * 60 - fromMinutes + toMinutes : toMinutes - fromMinutes : 0;
|
|
2352
|
+
const durationHours = Math.floor(durationMinutes / 60);
|
|
2353
|
+
const durationRemaining = durationMinutes % 60;
|
|
2354
|
+
const showDuration = bothSet && !bothEqual;
|
|
2355
|
+
const durationLabel = durationRemaining > 0 ? `${durationHours}h ${durationRemaining}m window${isOvernight ? " (overnight)" : ""}` : `${durationHours}h window${isOvernight ? " (overnight)" : ""}`;
|
|
2356
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2357
|
+
"div",
|
|
2358
|
+
{
|
|
2359
|
+
className: chunk23BJPJOK_js.cn(
|
|
2360
|
+
"flex flex-col px-4 pt-2 pb-3 gap-1",
|
|
2361
|
+
"border-t border-gray-100 dark:border-neutral-700"
|
|
2362
|
+
),
|
|
2363
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
|
|
2364
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-1", children: [
|
|
2365
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2366
|
+
lucideReact.Clock,
|
|
2367
|
+
{
|
|
2368
|
+
className: chunk23BJPJOK_js.cn(
|
|
2369
|
+
"w-4 h-4 shrink-0",
|
|
2370
|
+
disabled ? "text-gray-300 dark:text-gray-600" : "text-gray-400 dark:text-gray-500"
|
|
2371
|
+
)
|
|
2372
|
+
}
|
|
2373
|
+
),
|
|
2374
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[9px] font-medium text-gray-300 dark:text-gray-600 tracking-wide", children: "OPT" })
|
|
2375
|
+
] }),
|
|
2376
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 flex-1", children: [
|
|
2377
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-5", children: [
|
|
2378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2379
|
+
TimeField,
|
|
2380
|
+
{
|
|
2381
|
+
label: "From",
|
|
2382
|
+
value: value.from,
|
|
2383
|
+
onChange: (from) => onChange({ ...value, from }),
|
|
2384
|
+
onMinuteComplete: () => toHourRef.current?.focus(),
|
|
2385
|
+
disabled
|
|
2386
|
+
}
|
|
2387
|
+
),
|
|
2388
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2389
|
+
"div",
|
|
2390
|
+
{
|
|
2391
|
+
className: chunk23BJPJOK_js.cn(
|
|
2392
|
+
"w-4 h-px",
|
|
2393
|
+
disabled ? "bg-gray-200 dark:bg-neutral-700" : "bg-gray-300 dark:bg-neutral-600"
|
|
2394
|
+
)
|
|
2395
|
+
}
|
|
2396
|
+
),
|
|
2397
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2398
|
+
TimeField,
|
|
2399
|
+
{
|
|
2400
|
+
label: "To",
|
|
2401
|
+
value: value.to,
|
|
2402
|
+
onChange: (to) => onChange({ ...value, to }),
|
|
2403
|
+
hourRef: toHourRef,
|
|
2404
|
+
disabled
|
|
2405
|
+
}
|
|
2406
|
+
)
|
|
2407
|
+
] }),
|
|
2408
|
+
showDuration && /* @__PURE__ */ jsxRuntime.jsx("span", { className: chunk23BJPJOK_js.cn(
|
|
2409
|
+
"text-[10px] font-medium pl-0.5",
|
|
2410
|
+
isOvernight ? "text-amber-500 dark:text-amber-400" : "text-gray-400 dark:text-gray-500"
|
|
2411
|
+
), children: durationLabel })
|
|
2412
|
+
] })
|
|
2413
|
+
] })
|
|
2414
|
+
}
|
|
2415
|
+
);
|
|
2416
|
+
}
|
|
2112
2417
|
var WEEKDAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
2113
2418
|
function getCalendarDays(month) {
|
|
2114
2419
|
const start = dateFns.startOfWeek(dateFns.startOfMonth(month), { weekStartsOn: 0 });
|
|
@@ -2155,7 +2460,7 @@ function CalendarMonth({
|
|
|
2155
2460
|
"button",
|
|
2156
2461
|
{
|
|
2157
2462
|
onClick: onPrevMonth,
|
|
2158
|
-
className:
|
|
2463
|
+
className: chunk23BJPJOK_js.cn(
|
|
2159
2464
|
"p-1 rounded-md transition-colors",
|
|
2160
2465
|
showPrevNav ? "hover:bg-gray-100 dark:hover:bg-neutral-700 text-gray-500 dark:text-gray-400" : "invisible pointer-events-none"
|
|
2161
2466
|
),
|
|
@@ -2167,7 +2472,7 @@ function CalendarMonth({
|
|
|
2167
2472
|
"button",
|
|
2168
2473
|
{
|
|
2169
2474
|
onClick: onNextMonth,
|
|
2170
|
-
className:
|
|
2475
|
+
className: chunk23BJPJOK_js.cn(
|
|
2171
2476
|
"p-1 rounded-md transition-colors",
|
|
2172
2477
|
showNextNav ? "hover:bg-gray-100 dark:hover:bg-neutral-700 text-gray-500 dark:text-gray-400" : "invisible pointer-events-none"
|
|
2173
2478
|
),
|
|
@@ -2197,7 +2502,7 @@ function CalendarMonth({
|
|
|
2197
2502
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2198
2503
|
"div",
|
|
2199
2504
|
{
|
|
2200
|
-
className:
|
|
2505
|
+
className: chunk23BJPJOK_js.cn(
|
|
2201
2506
|
"h-9 flex items-center justify-center",
|
|
2202
2507
|
(inRange || rangeStart || rangeEnd) && "bg-blue-50 dark:bg-blue-950/40",
|
|
2203
2508
|
rangeStart && !rangeEnd && "rounded-l-full",
|
|
@@ -2210,7 +2515,7 @@ function CalendarMonth({
|
|
|
2210
2515
|
onClick: () => !outside && onDayClick(day),
|
|
2211
2516
|
onMouseEnter: () => !outside && onDayHover(day),
|
|
2212
2517
|
tabIndex: outside ? -1 : 0,
|
|
2213
|
-
className:
|
|
2518
|
+
className: chunk23BJPJOK_js.cn(
|
|
2214
2519
|
"w-8 h-8 rounded-full text-sm flex items-center justify-center transition-colors",
|
|
2215
2520
|
outside && "text-gray-300 dark:text-gray-600 pointer-events-none",
|
|
2216
2521
|
!outside && !rangeStart && !rangeEnd && "text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-neutral-700",
|
|
@@ -2276,16 +2581,25 @@ var DEFAULT_PRESETS = [
|
|
|
2276
2581
|
}
|
|
2277
2582
|
}
|
|
2278
2583
|
];
|
|
2279
|
-
function
|
|
2584
|
+
function formatTime(tv) {
|
|
2585
|
+
if (tv.hour === null || tv.minute === null) return "--:--";
|
|
2586
|
+
const period = tv.hour >= 12 ? "PM" : "AM";
|
|
2587
|
+
const h = tv.hour % 12 || 12;
|
|
2588
|
+
const m = tv.minute.toString().padStart(2, "0");
|
|
2589
|
+
return `${h}:${m} ${period}`;
|
|
2590
|
+
}
|
|
2591
|
+
function formatDateRange(range, placeholder, time) {
|
|
2280
2592
|
if (!range?.from) return placeholder;
|
|
2593
|
+
const timeActive = time && time.from.hour !== null && time.to.hour !== null;
|
|
2594
|
+
const timeSuffix = timeActive ? ` ${formatTime(time.from)} \u2013 ${formatTime(time.to)}` : "";
|
|
2281
2595
|
if (!range.to || dateFns.isSameDay(range.from, range.to)) {
|
|
2282
|
-
return dateFns.format(range.from, "MMM d, yyyy");
|
|
2596
|
+
return dateFns.format(range.from, "MMM d, yyyy") + timeSuffix;
|
|
2283
2597
|
}
|
|
2284
2598
|
const sameYear = range.from.getFullYear() === range.to.getFullYear();
|
|
2285
2599
|
if (sameYear) {
|
|
2286
|
-
return `${dateFns.format(range.from, "MMM d")} \u2013 ${dateFns.format(range.to, "MMM d, yyyy")}`;
|
|
2600
|
+
return `${dateFns.format(range.from, "MMM d")} \u2013 ${dateFns.format(range.to, "MMM d, yyyy")}${timeSuffix}`;
|
|
2287
2601
|
}
|
|
2288
|
-
return `${dateFns.format(range.from, "MMM d, yyyy")} \u2013 ${dateFns.format(range.to, "MMM d, yyyy")}`;
|
|
2602
|
+
return `${dateFns.format(range.from, "MMM d, yyyy")} \u2013 ${dateFns.format(range.to, "MMM d, yyyy")}${timeSuffix}`;
|
|
2289
2603
|
}
|
|
2290
2604
|
function DateRangePicker({
|
|
2291
2605
|
value,
|
|
@@ -2295,7 +2609,10 @@ function DateRangePicker({
|
|
|
2295
2609
|
placeholder = "Select date range",
|
|
2296
2610
|
disabled = false,
|
|
2297
2611
|
align = "start",
|
|
2298
|
-
className
|
|
2612
|
+
className,
|
|
2613
|
+
showTimePicker = false,
|
|
2614
|
+
timeValue,
|
|
2615
|
+
onTimeChange
|
|
2299
2616
|
}) {
|
|
2300
2617
|
const [open, setOpen] = React10__namespace.useState(false);
|
|
2301
2618
|
const [internalRange, setInternalRange] = React10__namespace.useState({
|
|
@@ -2311,11 +2628,19 @@ function DateRangePicker({
|
|
|
2311
2628
|
() => dateFns.startOfMonth(value?.from ?? /* @__PURE__ */ new Date())
|
|
2312
2629
|
);
|
|
2313
2630
|
const [activePreset, setActivePreset] = React10__namespace.useState();
|
|
2631
|
+
const [internalTime, setInternalTime] = React10__namespace.useState(DEFAULT_TIME_RANGE);
|
|
2314
2632
|
const committedRange = value ?? internalRange;
|
|
2633
|
+
const currentTime = timeValue ?? internalTime;
|
|
2634
|
+
const handleTimeChange = (newTime) => {
|
|
2635
|
+
if (onTimeChange) onTimeChange(newTime);
|
|
2636
|
+
else setInternalTime(newTime);
|
|
2637
|
+
};
|
|
2638
|
+
const timeVisible = !!(draft.from && draft.to);
|
|
2315
2639
|
const handleOpenChange = (newOpen) => {
|
|
2316
2640
|
if (newOpen) {
|
|
2317
2641
|
setDraft(committedRange);
|
|
2318
2642
|
if (committedRange.from) setLeftMonth(dateFns.startOfMonth(committedRange.from));
|
|
2643
|
+
if (!onTimeChange) setInternalTime(currentTime);
|
|
2319
2644
|
}
|
|
2320
2645
|
setOpen(newOpen);
|
|
2321
2646
|
};
|
|
@@ -2348,6 +2673,7 @@ function DateRangePicker({
|
|
|
2348
2673
|
const handleClear = () => {
|
|
2349
2674
|
setDraft({ from: void 0, to: void 0 });
|
|
2350
2675
|
setActivePreset(void 0);
|
|
2676
|
+
if (showTimePicker) handleTimeChange(DEFAULT_TIME_RANGE);
|
|
2351
2677
|
};
|
|
2352
2678
|
const canClear = !!(draft.from || committedRange.from);
|
|
2353
2679
|
const canApply = !(draft.from && !draft.to) && !!(draft.from || committedRange.from);
|
|
@@ -2357,7 +2683,7 @@ function DateRangePicker({
|
|
|
2357
2683
|
"button",
|
|
2358
2684
|
{
|
|
2359
2685
|
disabled,
|
|
2360
|
-
className:
|
|
2686
|
+
className: chunk23BJPJOK_js.cn(
|
|
2361
2687
|
"inline-flex items-center gap-2 rounded-md border border-gray-300 bg-white px-3 py-2 text-sm shadow-sm transition-colors",
|
|
2362
2688
|
"hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
|
|
2363
2689
|
"dark:border-neutral-600 dark:bg-neutral-800 dark:hover:bg-neutral-700",
|
|
@@ -2367,7 +2693,11 @@ function DateRangePicker({
|
|
|
2367
2693
|
),
|
|
2368
2694
|
children: [
|
|
2369
2695
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "w-4 h-4 shrink-0 text-gray-400 dark:text-gray-500" }),
|
|
2370
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDateRange(
|
|
2696
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDateRange(
|
|
2697
|
+
committedRange,
|
|
2698
|
+
placeholder,
|
|
2699
|
+
showTimePicker ? currentTime : void 0
|
|
2700
|
+
) })
|
|
2371
2701
|
]
|
|
2372
2702
|
}
|
|
2373
2703
|
) }),
|
|
@@ -2379,7 +2709,7 @@ function DateRangePicker({
|
|
|
2379
2709
|
"button",
|
|
2380
2710
|
{
|
|
2381
2711
|
onClick: () => handlePreset(preset),
|
|
2382
|
-
className:
|
|
2712
|
+
className: chunk23BJPJOK_js.cn(
|
|
2383
2713
|
"w-full text-left px-2 py-1.5 rounded-md text-sm transition-colors",
|
|
2384
2714
|
activePreset === preset.label ? "bg-blue-50 text-blue-600 font-medium dark:bg-blue-950/50 dark:text-blue-400" : "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-neutral-700"
|
|
2385
2715
|
),
|
|
@@ -2418,13 +2748,34 @@ function DateRangePicker({
|
|
|
2418
2748
|
}
|
|
2419
2749
|
)
|
|
2420
2750
|
] }),
|
|
2751
|
+
showTimePicker && /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: timeVisible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2752
|
+
framerMotion.motion.div,
|
|
2753
|
+
{
|
|
2754
|
+
initial: { height: 0, opacity: 0 },
|
|
2755
|
+
animate: { height: "auto", opacity: 1 },
|
|
2756
|
+
exit: { height: 0, opacity: 0 },
|
|
2757
|
+
transition: {
|
|
2758
|
+
height: { type: "spring", stiffness: 400, damping: 30, mass: 0.8 },
|
|
2759
|
+
opacity: { duration: 0.2 }
|
|
2760
|
+
},
|
|
2761
|
+
className: "overflow-hidden",
|
|
2762
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2763
|
+
TimePickerRow,
|
|
2764
|
+
{
|
|
2765
|
+
value: currentTime,
|
|
2766
|
+
onChange: handleTimeChange
|
|
2767
|
+
}
|
|
2768
|
+
)
|
|
2769
|
+
},
|
|
2770
|
+
"time-picker"
|
|
2771
|
+
) }),
|
|
2421
2772
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-end gap-2 px-4 py-3 border-t border-gray-100 dark:border-neutral-700", children: [
|
|
2422
2773
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2423
2774
|
"button",
|
|
2424
2775
|
{
|
|
2425
2776
|
onClick: handleClear,
|
|
2426
2777
|
disabled: !canClear,
|
|
2427
|
-
className:
|
|
2778
|
+
className: chunk23BJPJOK_js.cn(
|
|
2428
2779
|
"px-3 py-1.5 rounded-md text-sm transition-colors",
|
|
2429
2780
|
canClear ? "text-gray-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-neutral-700" : "text-gray-300 dark:text-gray-600 cursor-not-allowed"
|
|
2430
2781
|
),
|
|
@@ -2436,7 +2787,7 @@ function DateRangePicker({
|
|
|
2436
2787
|
{
|
|
2437
2788
|
onClick: handleApply,
|
|
2438
2789
|
disabled: !canApply,
|
|
2439
|
-
className:
|
|
2790
|
+
className: chunk23BJPJOK_js.cn(
|
|
2440
2791
|
"px-3 py-1.5 rounded-md text-sm font-medium transition-colors",
|
|
2441
2792
|
canApply ? "bg-blue-600 text-white hover:bg-blue-700 dark:hover:bg-blue-500" : "bg-blue-100 text-blue-300 cursor-not-allowed dark:bg-blue-950/30 dark:text-blue-800"
|
|
2442
2793
|
),
|
|
@@ -2535,6 +2886,7 @@ exports.Checkbox = Checkbox;
|
|
|
2535
2886
|
exports.ColumnSelection = ColumnSelection;
|
|
2536
2887
|
exports.DEFAULT_COMPARISON_PERIODS = DEFAULT_COMPARISON_PERIODS;
|
|
2537
2888
|
exports.DEFAULT_PRESETS = DEFAULT_PRESETS;
|
|
2889
|
+
exports.DEFAULT_TIME_RANGE = DEFAULT_TIME_RANGE;
|
|
2538
2890
|
exports.DateRangePicker = DateRangePicker;
|
|
2539
2891
|
exports.Dialog = Dialog;
|
|
2540
2892
|
exports.DialogClose = DialogClose;
|
|
@@ -2626,5 +2978,5 @@ exports.useColumnVisibility = useColumnVisibility;
|
|
|
2626
2978
|
exports.useFormContext = useFormContext;
|
|
2627
2979
|
exports.useFormFieldContext = useFormFieldContext;
|
|
2628
2980
|
exports.useTableSelection = useTableSelection;
|
|
2629
|
-
//# sourceMappingURL=chunk-
|
|
2630
|
-
//# sourceMappingURL=chunk-
|
|
2981
|
+
//# sourceMappingURL=chunk-BKMHL4FM.js.map
|
|
2982
|
+
//# sourceMappingURL=chunk-BKMHL4FM.js.map
|