@pos-360/horizon 0.15.0 → 0.17.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-6YUIM6WB.mjs → chunk-2PPZNXOQ.mjs} +268 -167
- package/dist/chunk-2PPZNXOQ.mjs.map +1 -0
- package/dist/{chunk-A4QVL4JL.mjs → chunk-DWMWKMZL.mjs} +29 -33
- package/dist/chunk-DWMWKMZL.mjs.map +1 -0
- package/dist/{chunk-YO72COII.js → chunk-ED6X5VKQ.js} +71 -7
- package/dist/chunk-ED6X5VKQ.js.map +1 -0
- package/dist/{chunk-AJP6WOSY.js → chunk-M3MFFZNO.js} +345 -244
- package/dist/chunk-M3MFFZNO.js.map +1 -0
- package/dist/{chunk-6CAMHXUV.js → chunk-YYVNGWHZ.js} +104 -108
- package/dist/chunk-YYVNGWHZ.js.map +1 -0
- package/dist/{chunk-E3UN74IA.mjs → chunk-ZI4BTIPU.mjs} +71 -9
- package/dist/chunk-ZI4BTIPU.mjs.map +1 -0
- package/dist/enhanced.d.mts +3 -0
- package/dist/enhanced.d.ts +3 -0
- package/dist/enhanced.js +28 -28
- package/dist/enhanced.mjs +2 -2
- package/dist/index.d.mts +3 -9
- package/dist/index.d.ts +3 -9
- package/dist/index.js +145 -141
- package/dist/index.mjs +3 -3
- package/dist/primitives.d.mts +38 -20
- package/dist/primitives.d.ts +38 -20
- package/dist/primitives.js +117 -113
- package/dist/primitives.mjs +2 -2
- package/dist/tooltip-wUBttbwG.d.mts +25 -0
- package/dist/tooltip-wUBttbwG.d.ts +25 -0
- package/package.json +1 -1
- package/dist/chunk-6CAMHXUV.js.map +0 -1
- package/dist/chunk-6YUIM6WB.mjs.map +0 -1
- package/dist/chunk-A4QVL4JL.mjs.map +0 -1
- package/dist/chunk-AJP6WOSY.js.map +0 -1
- package/dist/chunk-E3UN74IA.mjs.map +0 -1
- package/dist/chunk-YO72COII.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkED6X5VKQ_js = require('./chunk-ED6X5VKQ.js');
|
|
4
|
+
var React10 = require('react');
|
|
5
5
|
var reactSlot = require('@radix-ui/react-slot');
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -35,7 +35,7 @@ function _interopNamespace(e) {
|
|
|
35
35
|
return Object.freeze(n);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var React10__namespace = /*#__PURE__*/_interopNamespace(React10);
|
|
39
39
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
40
40
|
var DialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(DialogPrimitive);
|
|
41
41
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
@@ -71,7 +71,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
);
|
|
74
|
-
var Button =
|
|
74
|
+
var Button = React10__namespace.forwardRef(
|
|
75
75
|
({
|
|
76
76
|
className,
|
|
77
77
|
variant,
|
|
@@ -87,7 +87,7 @@ var Button = React9__namespace.forwardRef(
|
|
|
87
87
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
88
88
|
Comp,
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
90
|
+
className: chunkED6X5VKQ_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: chunkED6X5VKQ_js.cn(buttonVariants({ variant, size, className })),
|
|
102
102
|
ref,
|
|
103
103
|
...props,
|
|
104
104
|
children: [
|
|
@@ -111,11 +111,11 @@ var Button = React9__namespace.forwardRef(
|
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
Button.displayName = "Button";
|
|
114
|
-
var Card =
|
|
114
|
+
var Card = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
ref,
|
|
118
|
-
className:
|
|
118
|
+
className: chunkED6X5VKQ_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
|
),
|
|
@@ -123,56 +123,56 @@ var Card = React9__namespace.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
123
123
|
}
|
|
124
124
|
));
|
|
125
125
|
Card.displayName = "Card";
|
|
126
|
-
var CardHeader =
|
|
126
|
+
var CardHeader = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
129
|
ref,
|
|
130
|
-
className:
|
|
130
|
+
className: chunkED6X5VKQ_js.cn("flex flex-col space-y-1.5 p-4", className),
|
|
131
131
|
...props
|
|
132
132
|
}
|
|
133
133
|
));
|
|
134
134
|
CardHeader.displayName = "CardHeader";
|
|
135
|
-
var CardTitle =
|
|
135
|
+
var CardTitle = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
136
136
|
"div",
|
|
137
137
|
{
|
|
138
138
|
ref,
|
|
139
|
-
className:
|
|
139
|
+
className: chunkED6X5VKQ_js.cn("font-semibold leading-none tracking-tight", className),
|
|
140
140
|
...props
|
|
141
141
|
}
|
|
142
142
|
));
|
|
143
143
|
CardTitle.displayName = "CardTitle";
|
|
144
|
-
var CardDescription =
|
|
144
|
+
var CardDescription = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
147
147
|
ref,
|
|
148
|
-
className:
|
|
148
|
+
className: chunkED6X5VKQ_js.cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
149
149
|
...props
|
|
150
150
|
}
|
|
151
151
|
));
|
|
152
152
|
CardDescription.displayName = "CardDescription";
|
|
153
|
-
var CardContent =
|
|
153
|
+
var CardContent = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
154
154
|
"div",
|
|
155
155
|
{
|
|
156
156
|
ref,
|
|
157
|
-
className:
|
|
157
|
+
className: chunkED6X5VKQ_js.cn("p-4 pt-0", className),
|
|
158
158
|
...props
|
|
159
159
|
}
|
|
160
160
|
));
|
|
161
161
|
CardContent.displayName = "CardContent";
|
|
162
|
-
var CardFooter =
|
|
162
|
+
var CardFooter = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
163
163
|
"div",
|
|
164
164
|
{
|
|
165
165
|
ref,
|
|
166
|
-
className:
|
|
166
|
+
className: chunkED6X5VKQ_js.cn("flex items-center p-4 pt-0", className),
|
|
167
167
|
...props
|
|
168
168
|
}
|
|
169
169
|
));
|
|
170
170
|
CardFooter.displayName = "CardFooter";
|
|
171
|
-
var Checkbox =
|
|
171
|
+
var Checkbox = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
172
172
|
CheckboxPrimitive__namespace.Root,
|
|
173
173
|
{
|
|
174
174
|
ref,
|
|
175
|
-
className:
|
|
175
|
+
className: chunkED6X5VKQ_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: chunkED6X5VKQ_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
|
)
|
|
@@ -191,11 +191,11 @@ var Dialog = DialogPrimitive__namespace.Root;
|
|
|
191
191
|
var DialogTrigger = DialogPrimitive__namespace.Trigger;
|
|
192
192
|
var DialogPortal = DialogPrimitive__namespace.Portal;
|
|
193
193
|
var DialogClose = DialogPrimitive__namespace.Close;
|
|
194
|
-
var DialogOverlay =
|
|
194
|
+
var DialogOverlay = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
195
195
|
DialogPrimitive__namespace.Overlay,
|
|
196
196
|
{
|
|
197
197
|
ref,
|
|
198
|
-
className:
|
|
198
|
+
className: chunkED6X5VKQ_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
|
),
|
|
@@ -203,13 +203,13 @@ var DialogOverlay = React9__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
203
203
|
}
|
|
204
204
|
));
|
|
205
205
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
206
|
-
var DialogContent =
|
|
206
|
+
var DialogContent = React10__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
207
207
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
208
208
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
209
209
|
DialogPrimitive__namespace.Content,
|
|
210
210
|
{
|
|
211
211
|
ref,
|
|
212
|
-
className:
|
|
212
|
+
className: chunkED6X5VKQ_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: chunkED6X5VKQ_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: chunkED6X5VKQ_js.cn(
|
|
249
249
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
250
250
|
className
|
|
251
251
|
),
|
|
@@ -253,11 +253,11 @@ var DialogFooter = ({
|
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
DialogFooter.displayName = "DialogFooter";
|
|
256
|
-
var DialogTitle =
|
|
256
|
+
var DialogTitle = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
257
257
|
DialogPrimitive__namespace.Title,
|
|
258
258
|
{
|
|
259
259
|
ref,
|
|
260
|
-
className:
|
|
260
|
+
className: chunkED6X5VKQ_js.cn(
|
|
261
261
|
"text-lg font-semibold leading-none tracking-tight text-gray-900 dark:text-gray-100",
|
|
262
262
|
className
|
|
263
263
|
),
|
|
@@ -265,11 +265,11 @@ var DialogTitle = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
265
265
|
}
|
|
266
266
|
));
|
|
267
267
|
DialogTitle.displayName = DialogPrimitive__namespace.Title.displayName;
|
|
268
|
-
var DialogDescription =
|
|
268
|
+
var DialogDescription = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
269
269
|
DialogPrimitive__namespace.Description,
|
|
270
270
|
{
|
|
271
271
|
ref,
|
|
272
|
-
className:
|
|
272
|
+
className: chunkED6X5VKQ_js.cn("text-sm text-gray-500 dark:text-gray-400", className),
|
|
273
273
|
...props
|
|
274
274
|
}
|
|
275
275
|
));
|
|
@@ -280,11 +280,11 @@ var DropdownMenuGroup = DropdownMenuPrimitive__namespace.Group;
|
|
|
280
280
|
var DropdownMenuPortal = DropdownMenuPrimitive__namespace.Portal;
|
|
281
281
|
var DropdownMenuSub = DropdownMenuPrimitive__namespace.Sub;
|
|
282
282
|
var DropdownMenuRadioGroup = DropdownMenuPrimitive__namespace.RadioGroup;
|
|
283
|
-
var DropdownMenuSubTrigger =
|
|
283
|
+
var DropdownMenuSubTrigger = React10__namespace.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
284
284
|
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
285
285
|
{
|
|
286
286
|
ref,
|
|
287
|
-
className:
|
|
287
|
+
className: chunkED6X5VKQ_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
|
|
@@ -297,11 +297,11 @@ var DropdownMenuSubTrigger = React9__namespace.forwardRef(({ className, inset, c
|
|
|
297
297
|
}
|
|
298
298
|
));
|
|
299
299
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive__namespace.SubTrigger.displayName;
|
|
300
|
-
var DropdownMenuSubContent =
|
|
300
|
+
var DropdownMenuSubContent = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
301
301
|
DropdownMenuPrimitive__namespace.SubContent,
|
|
302
302
|
{
|
|
303
303
|
ref,
|
|
304
|
-
className:
|
|
304
|
+
className: chunkED6X5VKQ_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
|
),
|
|
@@ -309,12 +309,12 @@ var DropdownMenuSubContent = React9__namespace.forwardRef(({ className, ...props
|
|
|
309
309
|
}
|
|
310
310
|
));
|
|
311
311
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive__namespace.SubContent.displayName;
|
|
312
|
-
var DropdownMenuContent =
|
|
312
|
+
var DropdownMenuContent = React10__namespace.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
313
313
|
DropdownMenuPrimitive__namespace.Content,
|
|
314
314
|
{
|
|
315
315
|
ref,
|
|
316
316
|
sideOffset,
|
|
317
|
-
className:
|
|
317
|
+
className: chunkED6X5VKQ_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
|
|
@@ -323,11 +323,11 @@ var DropdownMenuContent = React9__namespace.forwardRef(({ className, sideOffset
|
|
|
323
323
|
}
|
|
324
324
|
) }));
|
|
325
325
|
DropdownMenuContent.displayName = DropdownMenuPrimitive__namespace.Content.displayName;
|
|
326
|
-
var DropdownMenuItem =
|
|
326
|
+
var DropdownMenuItem = React10__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
327
327
|
DropdownMenuPrimitive__namespace.Item,
|
|
328
328
|
{
|
|
329
329
|
ref,
|
|
330
|
-
className:
|
|
330
|
+
className: chunkED6X5VKQ_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
|
|
@@ -336,11 +336,11 @@ var DropdownMenuItem = React9__namespace.forwardRef(({ className, inset, ...prop
|
|
|
336
336
|
}
|
|
337
337
|
));
|
|
338
338
|
DropdownMenuItem.displayName = DropdownMenuPrimitive__namespace.Item.displayName;
|
|
339
|
-
var DropdownMenuCheckboxItem =
|
|
339
|
+
var DropdownMenuCheckboxItem = React10__namespace.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
340
340
|
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
341
341
|
{
|
|
342
342
|
ref,
|
|
343
|
-
className:
|
|
343
|
+
className: chunkED6X5VKQ_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
|
),
|
|
@@ -353,11 +353,11 @@ var DropdownMenuCheckboxItem = React9__namespace.forwardRef(({ className, childr
|
|
|
353
353
|
}
|
|
354
354
|
));
|
|
355
355
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive__namespace.CheckboxItem.displayName;
|
|
356
|
-
var DropdownMenuRadioItem =
|
|
356
|
+
var DropdownMenuRadioItem = React10__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
357
357
|
DropdownMenuPrimitive__namespace.RadioItem,
|
|
358
358
|
{
|
|
359
359
|
ref,
|
|
360
|
-
className:
|
|
360
|
+
className: chunkED6X5VKQ_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
|
),
|
|
@@ -369,11 +369,11 @@ var DropdownMenuRadioItem = React9__namespace.forwardRef(({ className, children,
|
|
|
369
369
|
}
|
|
370
370
|
));
|
|
371
371
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive__namespace.RadioItem.displayName;
|
|
372
|
-
var DropdownMenuLabel =
|
|
372
|
+
var DropdownMenuLabel = React10__namespace.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
373
373
|
DropdownMenuPrimitive__namespace.Label,
|
|
374
374
|
{
|
|
375
375
|
ref,
|
|
376
|
-
className:
|
|
376
|
+
className: chunkED6X5VKQ_js.cn(
|
|
377
377
|
"px-2 py-1.5 text-sm font-semibold",
|
|
378
378
|
inset && "pl-8",
|
|
379
379
|
className
|
|
@@ -382,11 +382,11 @@ var DropdownMenuLabel = React9__namespace.forwardRef(({ className, inset, ...pro
|
|
|
382
382
|
}
|
|
383
383
|
));
|
|
384
384
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive__namespace.Label.displayName;
|
|
385
|
-
var DropdownMenuSeparator =
|
|
385
|
+
var DropdownMenuSeparator = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
386
386
|
DropdownMenuPrimitive__namespace.Separator,
|
|
387
387
|
{
|
|
388
388
|
ref,
|
|
389
|
-
className:
|
|
389
|
+
className: chunkED6X5VKQ_js.cn("-mx-1 my-1 h-px bg-gray-100 dark:bg-neutral-700", className),
|
|
390
390
|
...props
|
|
391
391
|
}
|
|
392
392
|
));
|
|
@@ -398,25 +398,25 @@ var DropdownMenuShortcut = ({
|
|
|
398
398
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
399
399
|
"span",
|
|
400
400
|
{
|
|
401
|
-
className:
|
|
401
|
+
className: chunkED6X5VKQ_js.cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
402
402
|
...props
|
|
403
403
|
}
|
|
404
404
|
);
|
|
405
405
|
};
|
|
406
406
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
407
|
-
var FormContext =
|
|
407
|
+
var FormContext = React10__namespace.createContext(null);
|
|
408
408
|
function useFormContext() {
|
|
409
|
-
const context =
|
|
409
|
+
const context = React10__namespace.useContext(FormContext);
|
|
410
410
|
if (!context) {
|
|
411
411
|
throw new Error("useFormContext must be used within a Form component");
|
|
412
412
|
}
|
|
413
413
|
return context;
|
|
414
414
|
}
|
|
415
|
-
var FormFieldContext =
|
|
415
|
+
var FormFieldContext = React10__namespace.createContext(
|
|
416
416
|
null
|
|
417
417
|
);
|
|
418
418
|
function useFormFieldContext() {
|
|
419
|
-
const context =
|
|
419
|
+
const context = React10__namespace.useContext(FormFieldContext);
|
|
420
420
|
if (!context) {
|
|
421
421
|
throw new Error(
|
|
422
422
|
"useFormFieldContext must be used within a FormField component"
|
|
@@ -424,24 +424,24 @@ function useFormFieldContext() {
|
|
|
424
424
|
}
|
|
425
425
|
return context;
|
|
426
426
|
}
|
|
427
|
-
var Form =
|
|
427
|
+
var Form = React10__namespace.forwardRef(
|
|
428
428
|
({ className, children, onFormSubmit, ...props }, ref) => {
|
|
429
|
-
const [errors, setErrors] =
|
|
430
|
-
const [isSubmitting, setIsSubmitting] =
|
|
431
|
-
const setError =
|
|
429
|
+
const [errors, setErrors] = React10__namespace.useState({});
|
|
430
|
+
const [isSubmitting, setIsSubmitting] = React10__namespace.useState(false);
|
|
431
|
+
const setError = React10__namespace.useCallback(
|
|
432
432
|
(name, message) => {
|
|
433
433
|
setErrors((prev) => ({ ...prev, [name]: message }));
|
|
434
434
|
},
|
|
435
435
|
[]
|
|
436
436
|
);
|
|
437
|
-
const clearError =
|
|
437
|
+
const clearError = React10__namespace.useCallback((name) => {
|
|
438
438
|
setErrors((prev) => {
|
|
439
439
|
const next = { ...prev };
|
|
440
440
|
delete next[name];
|
|
441
441
|
return next;
|
|
442
442
|
});
|
|
443
443
|
}, []);
|
|
444
|
-
const clearAllErrors =
|
|
444
|
+
const clearAllErrors = React10__namespace.useCallback(() => {
|
|
445
445
|
setErrors({});
|
|
446
446
|
}, []);
|
|
447
447
|
const isValid = Object.keys(errors).length === 0;
|
|
@@ -460,7 +460,7 @@ var Form = React9__namespace.forwardRef(
|
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
};
|
|
463
|
-
const contextValue =
|
|
463
|
+
const contextValue = React10__namespace.useMemo(
|
|
464
464
|
() => ({
|
|
465
465
|
errors,
|
|
466
466
|
setError,
|
|
@@ -475,7 +475,7 @@ var Form = React9__namespace.forwardRef(
|
|
|
475
475
|
"form",
|
|
476
476
|
{
|
|
477
477
|
ref,
|
|
478
|
-
className:
|
|
478
|
+
className: chunkED6X5VKQ_js.cn("space-y-6", className),
|
|
479
479
|
onSubmit: handleSubmit,
|
|
480
480
|
...props,
|
|
481
481
|
children
|
|
@@ -484,36 +484,36 @@ var Form = React9__namespace.forwardRef(
|
|
|
484
484
|
}
|
|
485
485
|
);
|
|
486
486
|
Form.displayName = "Form";
|
|
487
|
-
var FormField =
|
|
487
|
+
var FormField = React10__namespace.forwardRef(
|
|
488
488
|
({ className, name, children, ...props }, ref) => {
|
|
489
489
|
const { errors } = useFormContext();
|
|
490
|
-
const id =
|
|
490
|
+
const id = React10__namespace.useId();
|
|
491
491
|
const error = errors[name];
|
|
492
|
-
const contextValue =
|
|
492
|
+
const contextValue = React10__namespace.useMemo(
|
|
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: chunkED6X5VKQ_js.cn("space-y-2", className), ...props, children }) });
|
|
497
497
|
}
|
|
498
498
|
);
|
|
499
499
|
FormField.displayName = "FormField";
|
|
500
|
-
var FormLabel =
|
|
500
|
+
var FormLabel = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
501
501
|
const { id, error } = useFormFieldContext();
|
|
502
502
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
503
|
-
|
|
503
|
+
chunkED6X5VKQ_js.Label,
|
|
504
504
|
{
|
|
505
505
|
ref,
|
|
506
506
|
htmlFor: id,
|
|
507
|
-
className:
|
|
507
|
+
className: chunkED6X5VKQ_js.cn(error && "text-rose-500 dark:text-rose-400", className),
|
|
508
508
|
...props
|
|
509
509
|
}
|
|
510
510
|
);
|
|
511
511
|
});
|
|
512
512
|
FormLabel.displayName = "FormLabel";
|
|
513
|
-
var FormControl =
|
|
513
|
+
var FormControl = React10__namespace.forwardRef(
|
|
514
514
|
({ children, ...props }, ref) => {
|
|
515
515
|
const { id, error, name } = useFormFieldContext();
|
|
516
|
-
const child =
|
|
516
|
+
const child = React10__namespace.cloneElement(children, {
|
|
517
517
|
id,
|
|
518
518
|
name,
|
|
519
519
|
"aria-invalid": !!error,
|
|
@@ -524,13 +524,13 @@ var FormControl = React9__namespace.forwardRef(
|
|
|
524
524
|
}
|
|
525
525
|
);
|
|
526
526
|
FormControl.displayName = "FormControl";
|
|
527
|
-
var FormDescription =
|
|
527
|
+
var FormDescription = React10__namespace.forwardRef(
|
|
528
528
|
({ className, ...props }, ref) => {
|
|
529
529
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
530
530
|
"span",
|
|
531
531
|
{
|
|
532
532
|
ref,
|
|
533
|
-
className:
|
|
533
|
+
className: chunkED6X5VKQ_js.cn(
|
|
534
534
|
"block text-sm text-neutral-500 dark:text-neutral-400",
|
|
535
535
|
className
|
|
536
536
|
),
|
|
@@ -540,9 +540,9 @@ var FormDescription = React9__namespace.forwardRef(
|
|
|
540
540
|
}
|
|
541
541
|
);
|
|
542
542
|
FormDescription.displayName = "FormDescription";
|
|
543
|
-
var FormMessage =
|
|
543
|
+
var FormMessage = React10__namespace.forwardRef(
|
|
544
544
|
({ className, children, error: errorProp, ...props }, ref) => {
|
|
545
|
-
const fieldContext =
|
|
545
|
+
const fieldContext = React10__namespace.useContext(FormFieldContext);
|
|
546
546
|
const error = errorProp ?? fieldContext?.error;
|
|
547
547
|
const id = fieldContext?.id;
|
|
548
548
|
if (!error && !children) {
|
|
@@ -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: chunkED6X5VKQ_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
|
|
@@ -566,14 +566,14 @@ var FormMessage = React9__namespace.forwardRef(
|
|
|
566
566
|
}
|
|
567
567
|
);
|
|
568
568
|
FormMessage.displayName = "FormMessage";
|
|
569
|
-
var PopoverContext =
|
|
569
|
+
var PopoverContext = React10__namespace.createContext({ open: false });
|
|
570
570
|
var Popover = ({
|
|
571
571
|
children,
|
|
572
572
|
open: controlledOpen,
|
|
573
573
|
onOpenChange,
|
|
574
574
|
...props
|
|
575
575
|
}) => {
|
|
576
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
576
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React10__namespace.useState(false);
|
|
577
577
|
const isControlled = controlledOpen !== void 0;
|
|
578
578
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
579
579
|
const handleOpenChange = (newOpen) => {
|
|
@@ -594,8 +594,8 @@ var Popover = ({
|
|
|
594
594
|
};
|
|
595
595
|
var PopoverTrigger = PopoverPrimitive__namespace.Trigger;
|
|
596
596
|
var PopoverAnchor = PopoverPrimitive__namespace.Anchor;
|
|
597
|
-
var PopoverContent =
|
|
598
|
-
const { open } =
|
|
597
|
+
var PopoverContent = React10__namespace.forwardRef(({ className, align = "center", sideOffset = 4, children, ...props }, ref) => {
|
|
598
|
+
const { open } = React10__namespace.useContext(PopoverContext);
|
|
599
599
|
const {
|
|
600
600
|
onOpenAutoFocus,
|
|
601
601
|
onCloseAutoFocus,
|
|
@@ -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: chunkED6X5VKQ_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
|
),
|
|
@@ -655,15 +655,15 @@ var PopoverContent = React9__namespace.forwardRef(({ className, align = "center"
|
|
|
655
655
|
) }) });
|
|
656
656
|
});
|
|
657
657
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
658
|
-
var SelectContext =
|
|
659
|
-
var SelectSearchContext =
|
|
658
|
+
var SelectContext = React10__namespace.createContext({ open: false });
|
|
659
|
+
var SelectSearchContext = React10__namespace.createContext("");
|
|
660
660
|
var Select = ({
|
|
661
661
|
children,
|
|
662
662
|
open: controlledOpen,
|
|
663
663
|
onOpenChange,
|
|
664
664
|
...props
|
|
665
665
|
}) => {
|
|
666
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
666
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React10__namespace.useState(false);
|
|
667
667
|
const isControlled = controlledOpen !== void 0;
|
|
668
668
|
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
669
669
|
const handleOpenChange = (newOpen) => {
|
|
@@ -683,13 +683,13 @@ var Select = ({
|
|
|
683
683
|
) });
|
|
684
684
|
};
|
|
685
685
|
var SelectGroup = SelectPrimitive__namespace.Group;
|
|
686
|
-
var SelectValue =
|
|
686
|
+
var SelectValue = React10__namespace.forwardRef(({ children, placeholder, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Value, { ref, placeholder, ...props, children }));
|
|
687
687
|
SelectValue.displayName = SelectPrimitive__namespace.Value.displayName;
|
|
688
|
-
var SelectTrigger =
|
|
688
|
+
var SelectTrigger = React10__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
689
689
|
SelectPrimitive__namespace.Trigger,
|
|
690
690
|
{
|
|
691
691
|
ref,
|
|
692
|
-
className:
|
|
692
|
+
className: chunkED6X5VKQ_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
|
),
|
|
@@ -701,11 +701,11 @@ var SelectTrigger = React9__namespace.forwardRef(({ className, children, ...prop
|
|
|
701
701
|
}
|
|
702
702
|
));
|
|
703
703
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
704
|
-
var SelectScrollUpButton =
|
|
704
|
+
var SelectScrollUpButton = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
705
705
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
706
706
|
{
|
|
707
707
|
ref,
|
|
708
|
-
className:
|
|
708
|
+
className: chunkED6X5VKQ_js.cn(
|
|
709
709
|
"flex cursor-default items-center justify-center py-1",
|
|
710
710
|
className
|
|
711
711
|
),
|
|
@@ -714,11 +714,11 @@ var SelectScrollUpButton = React9__namespace.forwardRef(({ className, ...props }
|
|
|
714
714
|
}
|
|
715
715
|
));
|
|
716
716
|
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
717
|
-
var SelectScrollDownButton =
|
|
717
|
+
var SelectScrollDownButton = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
718
718
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
719
719
|
{
|
|
720
720
|
ref,
|
|
721
|
-
className:
|
|
721
|
+
className: chunkED6X5VKQ_js.cn(
|
|
722
722
|
"flex cursor-default items-center justify-center py-1",
|
|
723
723
|
className
|
|
724
724
|
),
|
|
@@ -727,11 +727,11 @@ var SelectScrollDownButton = React9__namespace.forwardRef(({ className, ...props
|
|
|
727
727
|
}
|
|
728
728
|
));
|
|
729
729
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
730
|
-
var SelectContent =
|
|
731
|
-
const { open } =
|
|
732
|
-
const [search, setSearch] =
|
|
733
|
-
const searchInputRef =
|
|
734
|
-
|
|
730
|
+
var SelectContent = React10__namespace.forwardRef(({ className, children, position = "popper", searchable = false, searchPlaceholder = "Search...", ...props }, ref) => {
|
|
731
|
+
const { open } = React10__namespace.useContext(SelectContext);
|
|
732
|
+
const [search, setSearch] = React10__namespace.useState("");
|
|
733
|
+
const searchInputRef = React10__namespace.useRef(null);
|
|
734
|
+
React10__namespace.useEffect(() => {
|
|
735
735
|
if (open && searchable) {
|
|
736
736
|
const frame = requestAnimationFrame(() => {
|
|
737
737
|
searchInputRef.current?.focus();
|
|
@@ -757,6 +757,7 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
757
757
|
} = props;
|
|
758
758
|
const ForceMountPortal = SelectPrimitive__namespace.Portal;
|
|
759
759
|
const ForceMountContent = SelectPrimitive__namespace.Content;
|
|
760
|
+
const AnimatedContent = React10__namespace.useMemo(() => React10__namespace.forwardRef(({ forceMount: _, ...props2 }, ref2) => /* @__PURE__ */ jsxRuntime.jsx(framerMotion.motion.div, { ref: ref2, ...props2 })), []);
|
|
760
761
|
return /* @__PURE__ */ jsxRuntime.jsx(ForceMountPortal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
761
762
|
ForceMountContent,
|
|
762
763
|
{
|
|
@@ -778,7 +779,7 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
778
779
|
asChild: true,
|
|
779
780
|
...{ forceMount: true },
|
|
780
781
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
781
|
-
|
|
782
|
+
AnimatedContent,
|
|
782
783
|
{
|
|
783
784
|
initial: false,
|
|
784
785
|
animate: open ? { opacity: 1, scale: 1, y: 0, pointerEvents: "auto" } : { opacity: 0, scale: 0.96, y: -8, pointerEvents: "none" },
|
|
@@ -788,7 +789,7 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
788
789
|
damping: 25,
|
|
789
790
|
mass: 0.8
|
|
790
791
|
},
|
|
791
|
-
className:
|
|
792
|
+
className: chunkED6X5VKQ_js.cn(
|
|
792
793
|
"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]",
|
|
793
794
|
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",
|
|
794
795
|
className
|
|
@@ -813,7 +814,7 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
813
814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
814
815
|
SelectPrimitive__namespace.Viewport,
|
|
815
816
|
{
|
|
816
|
-
className:
|
|
817
|
+
className: chunkED6X5VKQ_js.cn(
|
|
817
818
|
"p-1",
|
|
818
819
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
819
820
|
),
|
|
@@ -829,17 +830,17 @@ var SelectContent = React9__namespace.forwardRef(({ className, children, positio
|
|
|
829
830
|
) });
|
|
830
831
|
});
|
|
831
832
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
832
|
-
var SelectLabel =
|
|
833
|
+
var SelectLabel = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
833
834
|
SelectPrimitive__namespace.Label,
|
|
834
835
|
{
|
|
835
836
|
ref,
|
|
836
|
-
className:
|
|
837
|
+
className: chunkED6X5VKQ_js.cn("px-2 py-1.5 text-sm font-semibold", className),
|
|
837
838
|
...props
|
|
838
839
|
}
|
|
839
840
|
));
|
|
840
841
|
SelectLabel.displayName = SelectPrimitive__namespace.Label.displayName;
|
|
841
|
-
var SelectItem =
|
|
842
|
-
const search =
|
|
842
|
+
var SelectItem = React10__namespace.forwardRef(({ className, children, textValue, ...props }, ref) => {
|
|
843
|
+
const search = React10__namespace.useContext(SelectSearchContext);
|
|
843
844
|
const itemText = textValue ?? (typeof children === "string" ? children : "");
|
|
844
845
|
if (search && itemText && !itemText.toLowerCase().includes(search.toLowerCase())) {
|
|
845
846
|
return null;
|
|
@@ -849,7 +850,7 @@ var SelectItem = React9__namespace.forwardRef(({ className, children, textValue,
|
|
|
849
850
|
{
|
|
850
851
|
ref,
|
|
851
852
|
textValue,
|
|
852
|
-
className:
|
|
853
|
+
className: chunkED6X5VKQ_js.cn(
|
|
853
854
|
"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",
|
|
854
855
|
className
|
|
855
856
|
),
|
|
@@ -862,11 +863,11 @@ var SelectItem = React9__namespace.forwardRef(({ className, children, textValue,
|
|
|
862
863
|
);
|
|
863
864
|
});
|
|
864
865
|
SelectItem.displayName = SelectPrimitive__namespace.Item.displayName;
|
|
865
|
-
var SelectSeparator =
|
|
866
|
+
var SelectSeparator = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
866
867
|
SelectPrimitive__namespace.Separator,
|
|
867
868
|
{
|
|
868
869
|
ref,
|
|
869
|
-
className:
|
|
870
|
+
className: chunkED6X5VKQ_js.cn("-mx-1 my-1 h-px bg-gray-200/50 dark:bg-neutral-700/50", className),
|
|
870
871
|
...props
|
|
871
872
|
}
|
|
872
873
|
));
|
|
@@ -893,7 +894,7 @@ function Separator3({
|
|
|
893
894
|
{
|
|
894
895
|
role: decorative ? "none" : "separator",
|
|
895
896
|
"aria-orientation": decorative ? void 0 : orientation ?? void 0,
|
|
896
|
-
className:
|
|
897
|
+
className: chunkED6X5VKQ_js.cn(separatorVariants({ orientation }), className),
|
|
897
898
|
...props
|
|
898
899
|
}
|
|
899
900
|
);
|
|
@@ -902,7 +903,7 @@ function Skeleton({ className }) {
|
|
|
902
903
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
903
904
|
"div",
|
|
904
905
|
{
|
|
905
|
-
className:
|
|
906
|
+
className: chunkED6X5VKQ_js.cn(
|
|
906
907
|
"animate-pulse rounded-hz-md bg-neutral-200 dark:bg-neutral-800",
|
|
907
908
|
className
|
|
908
909
|
)
|
|
@@ -910,28 +911,28 @@ function Skeleton({ className }) {
|
|
|
910
911
|
);
|
|
911
912
|
}
|
|
912
913
|
function SkeletonText({ className }) {
|
|
913
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
914
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("h-4", className) });
|
|
914
915
|
}
|
|
915
916
|
function SkeletonTitle({ className }) {
|
|
916
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
917
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("h-6 w-48", className) });
|
|
917
918
|
}
|
|
918
919
|
function SkeletonSubtitle({ className }) {
|
|
919
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
920
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("h-3 w-64", className) });
|
|
920
921
|
}
|
|
921
922
|
function SkeletonAvatar({ className }) {
|
|
922
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
923
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("w-10 h-10 rounded", className) });
|
|
923
924
|
}
|
|
924
925
|
function SkeletonBadge({ className }) {
|
|
925
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
926
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("h-6 w-24", className) });
|
|
926
927
|
}
|
|
927
928
|
function SkeletonIcon({ className }) {
|
|
928
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
929
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("w-6 h-6 rounded", className) });
|
|
929
930
|
}
|
|
930
931
|
function SkeletonButton({ className }) {
|
|
931
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
932
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("h-10 w-24 rounded-hz-md", className) });
|
|
932
933
|
}
|
|
933
934
|
function SkeletonInput({ className }) {
|
|
934
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className:
|
|
935
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: chunkED6X5VKQ_js.cn("h-10 w-full rounded-hz-md", className) });
|
|
935
936
|
}
|
|
936
937
|
function SkeletonTableRow({
|
|
937
938
|
columns = 4,
|
|
@@ -949,7 +950,7 @@ function SkeletonCard({ className }) {
|
|
|
949
950
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
950
951
|
"div",
|
|
951
952
|
{
|
|
952
|
-
className:
|
|
953
|
+
className: chunkED6X5VKQ_js.cn(
|
|
953
954
|
"rounded-hz-lg border bg-card p-6 space-y-4",
|
|
954
955
|
className
|
|
955
956
|
),
|
|
@@ -965,12 +966,75 @@ function SkeletonCard({ className }) {
|
|
|
965
966
|
}
|
|
966
967
|
);
|
|
967
968
|
}
|
|
968
|
-
|
|
969
|
+
function BulkEditPopover({ column, onApply }) {
|
|
970
|
+
const [value, setValue] = React10__namespace.useState("");
|
|
971
|
+
const [open, setOpen] = React10__namespace.useState(false);
|
|
972
|
+
const { bulkEdit } = column;
|
|
973
|
+
if (!bulkEdit) return null;
|
|
974
|
+
const isValid = bulkEdit.kind === "input" ? !!value.trim() : !!value;
|
|
975
|
+
const headingLabel = bulkEdit.label ?? column.label;
|
|
976
|
+
const handleApply = () => {
|
|
977
|
+
if (!isValid) return;
|
|
978
|
+
onApply(value);
|
|
979
|
+
setValue("");
|
|
980
|
+
setOpen(false);
|
|
981
|
+
};
|
|
982
|
+
const handleOpenChange = (next) => {
|
|
983
|
+
setOpen(next);
|
|
984
|
+
if (!next) setValue("");
|
|
985
|
+
};
|
|
986
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkED6X5VKQ_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: [
|
|
987
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
988
|
+
"button",
|
|
989
|
+
{
|
|
990
|
+
type: "button",
|
|
991
|
+
onFocus: (e) => e.stopPropagation(),
|
|
992
|
+
className: "ml-1 rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-100 dark:hover:text-gray-300 dark:hover:bg-neutral-700 transition-colors",
|
|
993
|
+
"aria-label": `Edit all ${column.label} values`,
|
|
994
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PenLine, { className: "h-3.5 w-3.5" })
|
|
995
|
+
}
|
|
996
|
+
) }),
|
|
997
|
+
/* @__PURE__ */ jsxRuntime.jsxs(PopoverContent, { align: "start", className: "w-64 p-3 space-y-3", children: [
|
|
998
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide", children: [
|
|
999
|
+
"Apply to all \u2014 ",
|
|
1000
|
+
headingLabel
|
|
1001
|
+
] }),
|
|
1002
|
+
bulkEdit.kind === "input" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1003
|
+
bulkEdit.leadingDecorator && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-y-0 left-0 pl-3 flex items-center text-sm text-neutral-400 pointer-events-none", children: bulkEdit.leadingDecorator }),
|
|
1004
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1005
|
+
"input",
|
|
1006
|
+
{
|
|
1007
|
+
type: bulkEdit.type ?? "text",
|
|
1008
|
+
placeholder: bulkEdit.placeholder,
|
|
1009
|
+
value,
|
|
1010
|
+
onChange: (e) => setValue(e.target.value),
|
|
1011
|
+
onKeyDown: (e) => {
|
|
1012
|
+
if (e.key === "Enter") {
|
|
1013
|
+
e.preventDefault();
|
|
1014
|
+
handleApply();
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
autoFocus: true,
|
|
1018
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1019
|
+
"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",
|
|
1020
|
+
bulkEdit.leadingDecorator ? "pl-7 pr-3" : "px-3"
|
|
1021
|
+
)
|
|
1022
|
+
}
|
|
1023
|
+
)
|
|
1024
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(Select, { value, onValueChange: setValue, children: [
|
|
1025
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { placeholder: bulkEdit.placeholder ?? "Select a value" }) }),
|
|
1026
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: bulkEdit.options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value)) })
|
|
1027
|
+
] }),
|
|
1028
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { size: "sm", className: "w-full", onClick: handleApply, disabled: !isValid, children: "Apply All" })
|
|
1029
|
+
] })
|
|
1030
|
+
] }) }) });
|
|
1031
|
+
}
|
|
1032
|
+
var TableContext = React10__namespace.createContext(null);
|
|
969
1033
|
var useTableContext = () => {
|
|
970
|
-
const context =
|
|
1034
|
+
const context = React10__namespace.useContext(TableContext);
|
|
971
1035
|
return context;
|
|
972
1036
|
};
|
|
973
|
-
var TableInner =
|
|
1037
|
+
var TableInner = React10__namespace.forwardRef(
|
|
974
1038
|
({
|
|
975
1039
|
className,
|
|
976
1040
|
selectable = false,
|
|
@@ -984,28 +1048,28 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
984
1048
|
visibleColumns,
|
|
985
1049
|
showDividers = false,
|
|
986
1050
|
highlightMode = "row",
|
|
1051
|
+
onBulkEdit,
|
|
987
1052
|
children,
|
|
988
1053
|
...props
|
|
989
1054
|
}, ref) => {
|
|
990
|
-
const [internalSelectedRows, setInternalSelectedRows] =
|
|
991
|
-
const [registeredRowIds, setRegisteredRowIds] =
|
|
992
|
-
const
|
|
993
|
-
const [hoveredRowIndex, setHoveredRowIndex] = React9__namespace.useState(null);
|
|
1055
|
+
const [internalSelectedRows, setInternalSelectedRows] = React10__namespace.useState(/* @__PURE__ */ new Set());
|
|
1056
|
+
const [registeredRowIds, setRegisteredRowIds] = React10__namespace.useState(/* @__PURE__ */ new Set());
|
|
1057
|
+
const wrapperRef = React10__namespace.useRef(null);
|
|
994
1058
|
const isControlled = controlledSelectedRows !== void 0;
|
|
995
1059
|
const selectedRowsSet = isControlled ? new Set(controlledSelectedRows) : internalSelectedRows;
|
|
996
|
-
const defaultGetRowId =
|
|
1060
|
+
const defaultGetRowId = React10__namespace.useCallback((row) => {
|
|
997
1061
|
if (typeof row === "string") return row;
|
|
998
1062
|
if (typeof row === "object" && row?.id) return String(row.id);
|
|
999
1063
|
return String(row);
|
|
1000
1064
|
}, []);
|
|
1001
1065
|
const finalGetRowId = getRowId || defaultGetRowId;
|
|
1002
|
-
const allRowIds =
|
|
1066
|
+
const allRowIds = React10__namespace.useMemo(() => {
|
|
1003
1067
|
if (rows) {
|
|
1004
1068
|
return new Set(rows.map(finalGetRowId));
|
|
1005
1069
|
}
|
|
1006
1070
|
return registeredRowIds;
|
|
1007
1071
|
}, [rows, finalGetRowId, registeredRowIds]);
|
|
1008
|
-
const registerRowId =
|
|
1072
|
+
const registerRowId = React10__namespace.useCallback((rowId) => {
|
|
1009
1073
|
if (rowId) {
|
|
1010
1074
|
setRegisteredRowIds((prev) => {
|
|
1011
1075
|
if (prev.has(rowId)) return prev;
|
|
@@ -1013,7 +1077,7 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1013
1077
|
});
|
|
1014
1078
|
}
|
|
1015
1079
|
}, []);
|
|
1016
|
-
const unregisterRowId =
|
|
1080
|
+
const unregisterRowId = React10__namespace.useCallback((rowId) => {
|
|
1017
1081
|
if (rowId) {
|
|
1018
1082
|
setRegisteredRowIds((prev) => {
|
|
1019
1083
|
if (!prev.has(rowId)) return prev;
|
|
@@ -1023,7 +1087,7 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1023
1087
|
});
|
|
1024
1088
|
}
|
|
1025
1089
|
}, []);
|
|
1026
|
-
const toggleRow =
|
|
1090
|
+
const toggleRow = React10__namespace.useCallback(
|
|
1027
1091
|
(rowId) => {
|
|
1028
1092
|
if (!selectable) return;
|
|
1029
1093
|
const next = new Set(selectedRowsSet);
|
|
@@ -1048,7 +1112,7 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1048
1112
|
},
|
|
1049
1113
|
[selectable, selectionMode, selectedRowsSet, isControlled, onSelectionChange]
|
|
1050
1114
|
);
|
|
1051
|
-
const selectAll =
|
|
1115
|
+
const selectAll = React10__namespace.useCallback(() => {
|
|
1052
1116
|
if (!selectable || selectionMode !== "multiple" || allRowIds.size === 0) return;
|
|
1053
1117
|
const next = new Set(allRowIds);
|
|
1054
1118
|
if (isControlled) {
|
|
@@ -1058,7 +1122,7 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1058
1122
|
onSelectionChange?.(Array.from(next));
|
|
1059
1123
|
}
|
|
1060
1124
|
}, [selectable, selectionMode, allRowIds, isControlled, onSelectionChange]);
|
|
1061
|
-
const deselectAll =
|
|
1125
|
+
const deselectAll = React10__namespace.useCallback(() => {
|
|
1062
1126
|
if (!selectable) return;
|
|
1063
1127
|
const next = /* @__PURE__ */ new Set();
|
|
1064
1128
|
if (isControlled) {
|
|
@@ -1068,19 +1132,19 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1068
1132
|
onSelectionChange?.(Array.from(next));
|
|
1069
1133
|
}
|
|
1070
1134
|
}, [selectable, isControlled, onSelectionChange]);
|
|
1071
|
-
const isRowSelected =
|
|
1135
|
+
const isRowSelected = React10__namespace.useCallback(
|
|
1072
1136
|
(rowId) => selectedRowsSet.has(rowId),
|
|
1073
1137
|
[selectedRowsSet]
|
|
1074
1138
|
);
|
|
1075
|
-
const isAllSelected =
|
|
1139
|
+
const isAllSelected = React10__namespace.useMemo(() => {
|
|
1076
1140
|
if (!selectable || allRowIds.size === 0) return false;
|
|
1077
1141
|
return allRowIds.size > 0 && Array.from(allRowIds).every((id) => selectedRowsSet.has(id));
|
|
1078
1142
|
}, [selectable, allRowIds, selectedRowsSet]);
|
|
1079
|
-
const isSomeSelected =
|
|
1143
|
+
const isSomeSelected = React10__namespace.useMemo(() => {
|
|
1080
1144
|
if (!selectable) return false;
|
|
1081
1145
|
return selectedRowsSet.size > 0 && !isAllSelected;
|
|
1082
1146
|
}, [selectable, selectedRowsSet.size, isAllSelected]);
|
|
1083
|
-
const contextValue =
|
|
1147
|
+
const contextValue = React10__namespace.useMemo(() => ({
|
|
1084
1148
|
selectable,
|
|
1085
1149
|
selectionMode,
|
|
1086
1150
|
selectedRows: selectedRowsSet,
|
|
@@ -1107,69 +1171,105 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1107
1171
|
registerRowId,
|
|
1108
1172
|
unregisterRowId
|
|
1109
1173
|
]);
|
|
1174
|
+
React10__namespace.useEffect(() => {
|
|
1175
|
+
const wrapper = wrapperRef.current;
|
|
1176
|
+
if (!wrapper || highlightMode === "none") return;
|
|
1177
|
+
let prevCell = null;
|
|
1178
|
+
let highlighted = [];
|
|
1179
|
+
const getHighlightBg = () => document.documentElement.classList.contains("dark") ? "rgba(38, 38, 38, 0.5)" : "rgb(249, 250, 251)";
|
|
1180
|
+
const clearHighlight = () => {
|
|
1181
|
+
for (const el of highlighted) el.style.removeProperty("background-color");
|
|
1182
|
+
highlighted = [];
|
|
1183
|
+
};
|
|
1184
|
+
const handleMouseMove = (e) => {
|
|
1185
|
+
const cell = e.target.closest("td, th");
|
|
1186
|
+
if (cell === prevCell) return;
|
|
1187
|
+
prevCell = cell;
|
|
1188
|
+
clearHighlight();
|
|
1189
|
+
if (!cell) return;
|
|
1190
|
+
const next = [];
|
|
1191
|
+
const tr = cell.closest("tr");
|
|
1192
|
+
const colKey = cell.getAttribute("data-col-key");
|
|
1193
|
+
if ((highlightMode === "row" || highlightMode === "cross") && tr) {
|
|
1194
|
+
next.push(...Array.from(tr.querySelectorAll("td, th")));
|
|
1195
|
+
}
|
|
1196
|
+
if ((highlightMode === "column" || highlightMode === "cross") && colKey) {
|
|
1197
|
+
for (const el of Array.from(wrapper.querySelectorAll(`[data-col-key="${colKey}"]`))) {
|
|
1198
|
+
if (!next.includes(el)) next.push(el);
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
const bg = getHighlightBg();
|
|
1202
|
+
for (const el of next) el.style.setProperty("background-color", bg, "important");
|
|
1203
|
+
highlighted = next;
|
|
1204
|
+
};
|
|
1205
|
+
const handleMouseLeave = () => {
|
|
1206
|
+
prevCell = null;
|
|
1207
|
+
clearHighlight();
|
|
1208
|
+
};
|
|
1209
|
+
wrapper.addEventListener("mousemove", handleMouseMove, { passive: true });
|
|
1210
|
+
wrapper.addEventListener("mouseleave", handleMouseLeave);
|
|
1211
|
+
return () => {
|
|
1212
|
+
wrapper.removeEventListener("mousemove", handleMouseMove);
|
|
1213
|
+
wrapper.removeEventListener("mouseleave", handleMouseLeave);
|
|
1214
|
+
clearHighlight();
|
|
1215
|
+
};
|
|
1216
|
+
}, [highlightMode]);
|
|
1110
1217
|
return /* @__PURE__ */ jsxRuntime.jsx(TableContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1111
1218
|
"div",
|
|
1112
1219
|
{
|
|
1220
|
+
ref: wrapperRef,
|
|
1113
1221
|
className: "relative w-full overflow-auto",
|
|
1114
|
-
onMouseLeave: () => {
|
|
1115
|
-
setHoveredCol(null);
|
|
1116
|
-
setHoveredRowIndex(null);
|
|
1117
|
-
},
|
|
1118
1222
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1119
1223
|
"table",
|
|
1120
1224
|
{
|
|
1121
1225
|
ref,
|
|
1122
|
-
className:
|
|
1226
|
+
className: chunkED6X5VKQ_js.cn("w-full caption-bottom text-sm", className),
|
|
1123
1227
|
...props,
|
|
1124
1228
|
children: columns && data ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: (() => {
|
|
1125
1229
|
const visibleCols = columns.filter(
|
|
1126
1230
|
(col) => col.sticky || !visibleColumns || visibleColumns.includes(col.key)
|
|
1127
1231
|
);
|
|
1128
1232
|
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
|
-
|
|
1131
|
-
|
|
1132
|
-
"
|
|
1133
|
-
{
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1233
|
+
/* @__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) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1234
|
+
"th",
|
|
1235
|
+
{
|
|
1236
|
+
"data-col-key": col.key,
|
|
1237
|
+
style: col.minWidth ? { minWidth: col.minWidth } : void 0,
|
|
1238
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1239
|
+
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400",
|
|
1240
|
+
col.sticky && "sticky left-0 z-20 bg-white dark:bg-neutral-900",
|
|
1241
|
+
showDividers && "border-r border-gray-200 dark:border-neutral-700"
|
|
1242
|
+
),
|
|
1243
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1244
|
+
col.label,
|
|
1245
|
+
col.bulkEdit && onBulkEdit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1246
|
+
BulkEditPopover,
|
|
1247
|
+
{
|
|
1248
|
+
column: col,
|
|
1249
|
+
onApply: (value) => onBulkEdit(col.key, value)
|
|
1250
|
+
}
|
|
1251
|
+
)
|
|
1252
|
+
] })
|
|
1253
|
+
},
|
|
1254
|
+
col.key
|
|
1255
|
+
)) }) }),
|
|
1148
1256
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "[&_tr:last-child]:border-0", children: data.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1149
1257
|
"tr",
|
|
1150
1258
|
{
|
|
1151
1259
|
className: "border-b border-gray-200 transition-colors dark:border-neutral-700",
|
|
1152
|
-
children: visibleCols.map((col) =>
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
col.sticky ? chunkYO72COII_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
|
-
})
|
|
1260
|
+
children: visibleCols.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1261
|
+
"td",
|
|
1262
|
+
{
|
|
1263
|
+
"data-col-key": col.key,
|
|
1264
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1265
|
+
"p-4 align-middle",
|
|
1266
|
+
col.sticky && "sticky left-0 z-20 bg-white dark:bg-neutral-900",
|
|
1267
|
+
showDividers && "border-r border-gray-200 dark:border-neutral-700"
|
|
1268
|
+
),
|
|
1269
|
+
children: col.cell(row)
|
|
1270
|
+
},
|
|
1271
|
+
col.key
|
|
1272
|
+
))
|
|
1173
1273
|
},
|
|
1174
1274
|
finalGetRowId ? finalGetRowId(row) : rowIndex
|
|
1175
1275
|
)) })
|
|
@@ -1183,29 +1283,29 @@ var TableInner = React9__namespace.forwardRef(
|
|
|
1183
1283
|
);
|
|
1184
1284
|
TableInner.displayName = "Table";
|
|
1185
1285
|
var Table = TableInner;
|
|
1186
|
-
var TableHeader =
|
|
1286
|
+
var TableHeader = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1187
1287
|
"thead",
|
|
1188
1288
|
{
|
|
1189
1289
|
ref,
|
|
1190
|
-
className:
|
|
1290
|
+
className: chunkED6X5VKQ_js.cn("[&_tr]:border-b [&_tr]:border-gray-200 dark:[&_tr]:border-gray-700", className),
|
|
1191
1291
|
...props
|
|
1192
1292
|
}
|
|
1193
1293
|
));
|
|
1194
1294
|
TableHeader.displayName = "TableHeader";
|
|
1195
|
-
var TableBody =
|
|
1295
|
+
var TableBody = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1196
1296
|
"tbody",
|
|
1197
1297
|
{
|
|
1198
1298
|
ref,
|
|
1199
|
-
className:
|
|
1299
|
+
className: chunkED6X5VKQ_js.cn("[&_tr:last-child]:border-0", className),
|
|
1200
1300
|
...props
|
|
1201
1301
|
}
|
|
1202
1302
|
));
|
|
1203
1303
|
TableBody.displayName = "TableBody";
|
|
1204
|
-
var TableFooter =
|
|
1304
|
+
var TableFooter = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1205
1305
|
"tfoot",
|
|
1206
1306
|
{
|
|
1207
1307
|
ref,
|
|
1208
|
-
className:
|
|
1308
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1209
1309
|
"border-t border-gray-200 bg-gray-50 font-medium dark:border-neutral-700 dark:bg-neutral-800/50 [&>tr]:last:border-b-0",
|
|
1210
1310
|
className
|
|
1211
1311
|
),
|
|
@@ -1213,19 +1313,19 @@ var TableFooter = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1213
1313
|
}
|
|
1214
1314
|
));
|
|
1215
1315
|
TableFooter.displayName = "TableFooter";
|
|
1216
|
-
var TableRow =
|
|
1316
|
+
var TableRow = React10__namespace.forwardRef(
|
|
1217
1317
|
({ className, rowId, rowData, onClick, ...props }, ref) => {
|
|
1218
1318
|
const context = useTableContext();
|
|
1219
1319
|
const getRowId = context?.getRowId;
|
|
1220
1320
|
const selectable = context?.selectable;
|
|
1221
1321
|
const registerRowId = context?.registerRowId;
|
|
1222
1322
|
const unregisterRowId = context?.unregisterRowId;
|
|
1223
|
-
const finalRowId =
|
|
1323
|
+
const finalRowId = React10__namespace.useMemo(() => {
|
|
1224
1324
|
if (rowId) return rowId;
|
|
1225
1325
|
if (rowData && getRowId) return getRowId(rowData);
|
|
1226
1326
|
return props.id || void 0;
|
|
1227
1327
|
}, [rowId, rowData, getRowId, props.id]);
|
|
1228
|
-
|
|
1328
|
+
React10__namespace.useEffect(() => {
|
|
1229
1329
|
if (finalRowId && selectable) {
|
|
1230
1330
|
registerRowId?.(finalRowId);
|
|
1231
1331
|
return () => {
|
|
@@ -1234,7 +1334,7 @@ var TableRow = React9__namespace.forwardRef(
|
|
|
1234
1334
|
}
|
|
1235
1335
|
}, [finalRowId, selectable, registerRowId, unregisterRowId]);
|
|
1236
1336
|
const isSelected = finalRowId ? context?.isRowSelected(finalRowId) : false;
|
|
1237
|
-
const handleClick =
|
|
1337
|
+
const handleClick = React10__namespace.useCallback(
|
|
1238
1338
|
(e) => {
|
|
1239
1339
|
onClick?.(e);
|
|
1240
1340
|
},
|
|
@@ -1246,7 +1346,7 @@ var TableRow = React9__namespace.forwardRef(
|
|
|
1246
1346
|
ref,
|
|
1247
1347
|
"data-state": isSelected ? "selected" : void 0,
|
|
1248
1348
|
"data-row-id": finalRowId,
|
|
1249
|
-
className:
|
|
1349
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1250
1350
|
"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",
|
|
1251
1351
|
className
|
|
1252
1352
|
),
|
|
@@ -1257,11 +1357,11 @@ var TableRow = React9__namespace.forwardRef(
|
|
|
1257
1357
|
}
|
|
1258
1358
|
);
|
|
1259
1359
|
TableRow.displayName = "TableRow";
|
|
1260
|
-
var TableHead =
|
|
1360
|
+
var TableHead = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1261
1361
|
"th",
|
|
1262
1362
|
{
|
|
1263
1363
|
ref,
|
|
1264
|
-
className:
|
|
1364
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1265
1365
|
"h-12 px-4 text-left align-middle font-medium text-gray-500 dark:text-gray-400 [&:has([role=checkbox])]:pr-0",
|
|
1266
1366
|
className
|
|
1267
1367
|
),
|
|
@@ -1269,12 +1369,12 @@ var TableHead = React9__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
1269
1369
|
}
|
|
1270
1370
|
));
|
|
1271
1371
|
TableHead.displayName = "TableHead";
|
|
1272
|
-
var TableCell =
|
|
1372
|
+
var TableCell = React10__namespace.forwardRef(
|
|
1273
1373
|
({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1274
1374
|
"td",
|
|
1275
1375
|
{
|
|
1276
1376
|
ref,
|
|
1277
|
-
className:
|
|
1377
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1278
1378
|
"align-middle [&:has([role=checkbox])]:pr-0",
|
|
1279
1379
|
variant === "embed" ? "p-1.5" : "p-4",
|
|
1280
1380
|
className
|
|
@@ -1284,16 +1384,16 @@ var TableCell = React9__namespace.forwardRef(
|
|
|
1284
1384
|
)
|
|
1285
1385
|
);
|
|
1286
1386
|
TableCell.displayName = "TableCell";
|
|
1287
|
-
var TableCaption =
|
|
1387
|
+
var TableCaption = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1288
1388
|
"caption",
|
|
1289
1389
|
{
|
|
1290
1390
|
ref,
|
|
1291
|
-
className:
|
|
1391
|
+
className: chunkED6X5VKQ_js.cn("mt-4 text-sm text-gray-500 dark:text-gray-400", className),
|
|
1292
1392
|
...props
|
|
1293
1393
|
}
|
|
1294
1394
|
));
|
|
1295
1395
|
TableCaption.displayName = "TableCaption";
|
|
1296
|
-
var TableSelectAll =
|
|
1396
|
+
var TableSelectAll = React10__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1297
1397
|
const context = useTableContext();
|
|
1298
1398
|
if (!context?.selectable || context.selectionMode !== "multiple") {
|
|
1299
1399
|
return null;
|
|
@@ -1316,13 +1416,13 @@ var TableSelectAll = React9__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1316
1416
|
) });
|
|
1317
1417
|
});
|
|
1318
1418
|
TableSelectAll.displayName = "TableSelectAll";
|
|
1319
|
-
var TableRowCheckbox =
|
|
1419
|
+
var TableRowCheckbox = React10__namespace.forwardRef(({ rowId, rowData, className, ...props }, ref) => {
|
|
1320
1420
|
const context = useTableContext();
|
|
1321
1421
|
const getRowId = context?.getRowId;
|
|
1322
1422
|
if (!context?.selectable) {
|
|
1323
1423
|
return null;
|
|
1324
1424
|
}
|
|
1325
|
-
const finalRowId =
|
|
1425
|
+
const finalRowId = React10__namespace.useMemo(() => {
|
|
1326
1426
|
if (rowId) return rowId;
|
|
1327
1427
|
if (rowData && getRowId) return getRowId(rowData);
|
|
1328
1428
|
return void 0;
|
|
@@ -1360,7 +1460,7 @@ function getDefaultColumns(columns, isMobile) {
|
|
|
1360
1460
|
}
|
|
1361
1461
|
function useColumnVisibility(columns, options = {}) {
|
|
1362
1462
|
const { storageKey } = options;
|
|
1363
|
-
const [visibleColumns, setVisibleColumnsState] =
|
|
1463
|
+
const [visibleColumns, setVisibleColumnsState] = React10.useState(() => {
|
|
1364
1464
|
if (storageKey && typeof window !== "undefined") {
|
|
1365
1465
|
try {
|
|
1366
1466
|
const saved = localStorage.getItem(storageKey);
|
|
@@ -1374,7 +1474,7 @@ function useColumnVisibility(columns, options = {}) {
|
|
|
1374
1474
|
}
|
|
1375
1475
|
return getDefaultColumns(columns, false);
|
|
1376
1476
|
});
|
|
1377
|
-
|
|
1477
|
+
React10.useEffect(() => {
|
|
1378
1478
|
if (storageKey) {
|
|
1379
1479
|
try {
|
|
1380
1480
|
const saved = localStorage.getItem(storageKey);
|
|
@@ -1387,7 +1487,7 @@ function useColumnVisibility(columns, options = {}) {
|
|
|
1387
1487
|
setVisibleColumnsState(getDefaultColumns(columns, true));
|
|
1388
1488
|
}
|
|
1389
1489
|
}, []);
|
|
1390
|
-
const setVisibleColumns =
|
|
1490
|
+
const setVisibleColumns = React10.useCallback((cols) => {
|
|
1391
1491
|
const stickyKeys = columns.filter((c) => c.sticky).map((c) => c.key);
|
|
1392
1492
|
const merged = Array.from(/* @__PURE__ */ new Set([...stickyKeys, ...cols]));
|
|
1393
1493
|
setVisibleColumnsState(merged);
|
|
@@ -1400,13 +1500,14 @@ function useColumnVisibility(columns, options = {}) {
|
|
|
1400
1500
|
}, [columns, storageKey]);
|
|
1401
1501
|
return { visibleColumns, setVisibleColumns };
|
|
1402
1502
|
}
|
|
1403
|
-
function
|
|
1503
|
+
function ColumnSelection({
|
|
1404
1504
|
columns,
|
|
1405
1505
|
visibleColumns,
|
|
1406
1506
|
onVisibleColumnsChange,
|
|
1407
|
-
triggerLabel = "
|
|
1507
|
+
triggerLabel = "Manage Columns",
|
|
1508
|
+
trigger
|
|
1408
1509
|
}) {
|
|
1409
|
-
const handleToggle =
|
|
1510
|
+
const handleToggle = React10__namespace.useCallback((key, checked) => {
|
|
1410
1511
|
if (checked) {
|
|
1411
1512
|
if (!visibleColumns.includes(key)) {
|
|
1412
1513
|
onVisibleColumnsChange([...visibleColumns, key]);
|
|
@@ -1416,7 +1517,7 @@ function ColumnPicker({
|
|
|
1416
1517
|
}
|
|
1417
1518
|
}, [visibleColumns, onVisibleColumnsChange]);
|
|
1418
1519
|
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
|
|
1419
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
1520
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsxRuntime.jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
1420
1521
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.SlidersHorizontal, { className: "h-4 w-4", "aria-hidden": "true" }),
|
|
1421
1522
|
triggerLabel
|
|
1422
1523
|
] }) }),
|
|
@@ -1428,7 +1529,7 @@ function ColumnPicker({
|
|
|
1428
1529
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1429
1530
|
"label",
|
|
1430
1531
|
{
|
|
1431
|
-
className:
|
|
1532
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1432
1533
|
"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",
|
|
1433
1534
|
isSticky && "opacity-50 cursor-not-allowed"
|
|
1434
1535
|
),
|
|
@@ -1453,33 +1554,33 @@ function ColumnPicker({
|
|
|
1453
1554
|
] })
|
|
1454
1555
|
] });
|
|
1455
1556
|
}
|
|
1456
|
-
var TabsContext =
|
|
1557
|
+
var TabsContext = React10__namespace.createContext(null);
|
|
1457
1558
|
var useTabsContext = () => {
|
|
1458
|
-
const context =
|
|
1559
|
+
const context = React10__namespace.useContext(TabsContext);
|
|
1459
1560
|
if (!context) {
|
|
1460
1561
|
throw new Error("Tabs components must be used within a Tabs provider");
|
|
1461
1562
|
}
|
|
1462
1563
|
return context;
|
|
1463
1564
|
};
|
|
1464
|
-
var TabsListContext =
|
|
1465
|
-
var useTabsListContext = () =>
|
|
1466
|
-
var Tabs =
|
|
1467
|
-
const [activeTab, setActiveTabState] =
|
|
1468
|
-
const tabRefs =
|
|
1469
|
-
const listRef =
|
|
1470
|
-
const setActiveTab =
|
|
1565
|
+
var TabsListContext = React10__namespace.createContext({ variant: "pill" });
|
|
1566
|
+
var useTabsListContext = () => React10__namespace.useContext(TabsListContext);
|
|
1567
|
+
var Tabs = React10__namespace.forwardRef(({ defaultValue, value, onValueChange, children, ...props }, ref) => {
|
|
1568
|
+
const [activeTab, setActiveTabState] = React10__namespace.useState(value ?? defaultValue);
|
|
1569
|
+
const tabRefs = React10__namespace.useRef(/* @__PURE__ */ new Map()).current;
|
|
1570
|
+
const listRef = React10__namespace.useRef(null);
|
|
1571
|
+
const setActiveTab = React10__namespace.useCallback(
|
|
1471
1572
|
(newValue) => {
|
|
1472
1573
|
setActiveTabState(newValue);
|
|
1473
1574
|
onValueChange?.(newValue);
|
|
1474
1575
|
},
|
|
1475
1576
|
[onValueChange]
|
|
1476
1577
|
);
|
|
1477
|
-
|
|
1578
|
+
React10__namespace.useEffect(() => {
|
|
1478
1579
|
if (value !== void 0) {
|
|
1479
1580
|
setActiveTabState(value);
|
|
1480
1581
|
}
|
|
1481
1582
|
}, [value]);
|
|
1482
|
-
const registerTab =
|
|
1583
|
+
const registerTab = React10__namespace.useCallback(
|
|
1483
1584
|
(tabValue, element) => {
|
|
1484
1585
|
tabRefs.set(tabValue, element);
|
|
1485
1586
|
},
|
|
@@ -1504,10 +1605,10 @@ var Tabs = React9__namespace.forwardRef(({ defaultValue, value, onValueChange, c
|
|
|
1504
1605
|
);
|
|
1505
1606
|
});
|
|
1506
1607
|
Tabs.displayName = "Tabs";
|
|
1507
|
-
var TabsList =
|
|
1608
|
+
var TabsList = React10__namespace.forwardRef(({ className, children, variant = "pill", ...props }, ref) => {
|
|
1508
1609
|
const { activeTab, tabRefs, listRef } = useTabsContext();
|
|
1509
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
1510
|
-
|
|
1610
|
+
const [indicatorStyle, setIndicatorStyle] = React10__namespace.useState(null);
|
|
1611
|
+
React10__namespace.useEffect(() => {
|
|
1511
1612
|
if (variant !== "pill") return;
|
|
1512
1613
|
const updateIndicator = () => {
|
|
1513
1614
|
if (!activeTab || !listRef.current) return;
|
|
@@ -1532,7 +1633,7 @@ var TabsList = React9__namespace.forwardRef(({ className, children, variant = "p
|
|
|
1532
1633
|
else if (ref) ref.current = node;
|
|
1533
1634
|
listRef.current = node;
|
|
1534
1635
|
},
|
|
1535
|
-
className:
|
|
1636
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1536
1637
|
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",
|
|
1537
1638
|
className
|
|
1538
1639
|
),
|
|
@@ -1560,11 +1661,11 @@ var TabsList = React9__namespace.forwardRef(({ className, children, variant = "p
|
|
|
1560
1661
|
) });
|
|
1561
1662
|
});
|
|
1562
1663
|
TabsList.displayName = TabsPrimitive__namespace.List.displayName;
|
|
1563
|
-
var TabsTrigger =
|
|
1664
|
+
var TabsTrigger = React10__namespace.forwardRef(({ className, value, icon, children, ...props }, ref) => {
|
|
1564
1665
|
const { registerTab, activeTab } = useTabsContext();
|
|
1565
1666
|
const { variant } = useTabsListContext();
|
|
1566
|
-
const triggerRef =
|
|
1567
|
-
|
|
1667
|
+
const triggerRef = React10__namespace.useRef(null);
|
|
1668
|
+
React10__namespace.useEffect(() => {
|
|
1568
1669
|
registerTab(value, triggerRef.current);
|
|
1569
1670
|
return () => registerTab(value, null);
|
|
1570
1671
|
}, [value, registerTab]);
|
|
@@ -1578,12 +1679,12 @@ var TabsTrigger = React9__namespace.forwardRef(({ className, value, icon, childr
|
|
|
1578
1679
|
else if (ref) ref.current = node;
|
|
1579
1680
|
},
|
|
1580
1681
|
value,
|
|
1581
|
-
className:
|
|
1682
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1582
1683
|
"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",
|
|
1583
|
-
variant === "pill" ?
|
|
1684
|
+
variant === "pill" ? chunkED6X5VKQ_js.cn(
|
|
1584
1685
|
"relative z-10 justify-center rounded-hz-md px-3 py-1.5 transition-colors",
|
|
1585
1686
|
isActive ? "text-gray-900 dark:text-gray-100" : "text-gray-500 dark:text-gray-400"
|
|
1586
|
-
) :
|
|
1687
|
+
) : chunkED6X5VKQ_js.cn(
|
|
1587
1688
|
"pb-3 border-b-2 transition-colors",
|
|
1588
1689
|
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"
|
|
1589
1690
|
),
|
|
@@ -1598,11 +1699,11 @@ var TabsTrigger = React9__namespace.forwardRef(({ className, value, icon, childr
|
|
|
1598
1699
|
);
|
|
1599
1700
|
});
|
|
1600
1701
|
TabsTrigger.displayName = TabsPrimitive__namespace.Trigger.displayName;
|
|
1601
|
-
var TabsContent =
|
|
1702
|
+
var TabsContent = React10__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1602
1703
|
TabsPrimitive__namespace.Content,
|
|
1603
1704
|
{
|
|
1604
1705
|
ref,
|
|
1605
|
-
className:
|
|
1706
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1606
1707
|
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",
|
|
1607
1708
|
className
|
|
1608
1709
|
),
|
|
@@ -1610,12 +1711,12 @@ var TabsContent = React9__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1610
1711
|
}
|
|
1611
1712
|
));
|
|
1612
1713
|
TabsContent.displayName = TabsPrimitive__namespace.Content.displayName;
|
|
1613
|
-
var Textarea =
|
|
1714
|
+
var Textarea = React10__namespace.forwardRef(
|
|
1614
1715
|
({ className, ...props }, ref) => {
|
|
1615
1716
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1616
1717
|
"textarea",
|
|
1617
1718
|
{
|
|
1618
|
-
className:
|
|
1719
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1619
1720
|
"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",
|
|
1620
1721
|
className
|
|
1621
1722
|
),
|
|
@@ -1694,7 +1795,7 @@ function Toggle({
|
|
|
1694
1795
|
...props,
|
|
1695
1796
|
type: "multiple",
|
|
1696
1797
|
...value !== void 0 ? { value, onValueChange: onChange } : {},
|
|
1697
|
-
className:
|
|
1798
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1698
1799
|
toggleGroupVariants({ size }),
|
|
1699
1800
|
containerRadiusClass[radius],
|
|
1700
1801
|
className
|
|
@@ -1707,7 +1808,7 @@ function Toggle({
|
|
|
1707
1808
|
value: option.value,
|
|
1708
1809
|
disabled: option.disabled,
|
|
1709
1810
|
"aria-label": iconOnly ? option.ariaLabel ?? option.value : void 0,
|
|
1710
|
-
className:
|
|
1811
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1711
1812
|
toggleItemVariants({ size, iconOnly }),
|
|
1712
1813
|
itemRadiusClass[radius],
|
|
1713
1814
|
"border border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
@@ -1783,7 +1884,7 @@ function SegmentedControl({
|
|
|
1783
1884
|
{
|
|
1784
1885
|
...props,
|
|
1785
1886
|
...value !== void 0 ? { value, onValueChange: onChange } : {},
|
|
1786
|
-
className:
|
|
1887
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1787
1888
|
segmentedControlVariants({ size }),
|
|
1788
1889
|
containerRadiusClass2[radius],
|
|
1789
1890
|
className
|
|
@@ -1793,7 +1894,7 @@ function SegmentedControl({
|
|
|
1793
1894
|
{
|
|
1794
1895
|
value: option.value,
|
|
1795
1896
|
disabled: option.disabled,
|
|
1796
|
-
className:
|
|
1897
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1797
1898
|
segmentedControlItemVariants({ size }),
|
|
1798
1899
|
itemRadiusClass2[radius],
|
|
1799
1900
|
"border border-transparent text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200",
|
|
@@ -1852,8 +1953,8 @@ var switchLabelVariants = classVarianceAuthority.cva("select-none", {
|
|
|
1852
1953
|
size: "default"
|
|
1853
1954
|
}
|
|
1854
1955
|
});
|
|
1855
|
-
var Switch =
|
|
1856
|
-
const generatedId =
|
|
1956
|
+
var Switch = React10__namespace.forwardRef(({ className, size, label, labelPosition = "right", ...props }, ref) => {
|
|
1957
|
+
const generatedId = React10__namespace.useId();
|
|
1857
1958
|
const switchId = props.id ?? generatedId;
|
|
1858
1959
|
const switchEl = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1859
1960
|
SwitchPrimitive__namespace.Root,
|
|
@@ -1861,7 +1962,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1861
1962
|
...props,
|
|
1862
1963
|
id: switchId,
|
|
1863
1964
|
ref,
|
|
1864
|
-
className:
|
|
1965
|
+
className: chunkED6X5VKQ_js.cn(switchTrackVariants({ size }), className),
|
|
1865
1966
|
children: /* @__PURE__ */ jsxRuntime.jsx(SwitchPrimitive__namespace.Thumb, { className: switchThumbVariants({ size }) })
|
|
1866
1967
|
}
|
|
1867
1968
|
);
|
|
@@ -1869,7 +1970,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1869
1970
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1870
1971
|
"div",
|
|
1871
1972
|
{
|
|
1872
|
-
className:
|
|
1973
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1873
1974
|
"inline-flex items-center gap-2",
|
|
1874
1975
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1875
1976
|
),
|
|
@@ -1878,7 +1979,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1878
1979
|
"label",
|
|
1879
1980
|
{
|
|
1880
1981
|
htmlFor: switchId,
|
|
1881
|
-
className:
|
|
1982
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1882
1983
|
switchLabelVariants({ size }),
|
|
1883
1984
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1884
1985
|
),
|
|
@@ -1890,7 +1991,7 @@ var Switch = React9__namespace.forwardRef(({ className, size, label, labelPositi
|
|
|
1890
1991
|
"label",
|
|
1891
1992
|
{
|
|
1892
1993
|
htmlFor: switchId,
|
|
1893
|
-
className:
|
|
1994
|
+
className: chunkED6X5VKQ_js.cn(
|
|
1894
1995
|
switchLabelVariants({ size }),
|
|
1895
1996
|
props.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1896
1997
|
),
|
|
@@ -1911,7 +2012,7 @@ exports.CardFooter = CardFooter;
|
|
|
1911
2012
|
exports.CardHeader = CardHeader;
|
|
1912
2013
|
exports.CardTitle = CardTitle;
|
|
1913
2014
|
exports.Checkbox = Checkbox;
|
|
1914
|
-
exports.
|
|
2015
|
+
exports.ColumnSelection = ColumnSelection;
|
|
1915
2016
|
exports.Dialog = Dialog;
|
|
1916
2017
|
exports.DialogClose = DialogClose;
|
|
1917
2018
|
exports.DialogContent = DialogContent;
|
|
@@ -2001,5 +2102,5 @@ exports.useColumnVisibility = useColumnVisibility;
|
|
|
2001
2102
|
exports.useFormContext = useFormContext;
|
|
2002
2103
|
exports.useFormFieldContext = useFormFieldContext;
|
|
2003
2104
|
exports.useTableSelection = useTableSelection;
|
|
2004
|
-
//# sourceMappingURL=chunk-
|
|
2005
|
-
//# sourceMappingURL=chunk-
|
|
2105
|
+
//# sourceMappingURL=chunk-M3MFFZNO.js.map
|
|
2106
|
+
//# sourceMappingURL=chunk-M3MFFZNO.js.map
|