@easyvision/easyvision-ui 1.3.9 → 1.4.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/EasyVisionTable.css +337 -11
- package/dist/easyvision.css +1333 -20
- package/dist/index.cjs +304 -492
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +304 -492
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,10 +30,7 @@ var Input = React8.forwardRef(
|
|
|
30
30
|
"input",
|
|
31
31
|
{
|
|
32
32
|
type,
|
|
33
|
-
className: cn(
|
|
34
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
35
|
-
className
|
|
36
|
-
),
|
|
33
|
+
className: cn("ev-input", className),
|
|
37
34
|
ref,
|
|
38
35
|
...props
|
|
39
36
|
}
|
|
@@ -190,34 +187,47 @@ function EasyVisionInput({
|
|
|
190
187
|
}
|
|
191
188
|
}, [debounced, onChange]);
|
|
192
189
|
const isInvalid = mandatory && slice.value.trim().length === 0;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
190
|
+
const hasIcon = icon === "search";
|
|
191
|
+
const hasClear = Boolean(showClearButton && slice.value && !disabled);
|
|
192
|
+
return /* @__PURE__ */ jsxs(
|
|
193
|
+
"div",
|
|
194
|
+
{
|
|
195
|
+
className: [
|
|
196
|
+
"ev-input-comp",
|
|
197
|
+
hasIcon ? "has-icon" : "",
|
|
198
|
+
hasClear ? "has-clear" : "",
|
|
199
|
+
className ?? ""
|
|
200
|
+
].filter(Boolean).join(" "),
|
|
201
|
+
children: [
|
|
202
|
+
label && /* @__PURE__ */ jsxs("span", { className: "ev-input-comp-label", children: [
|
|
203
|
+
label,
|
|
204
|
+
mandatory && /* @__PURE__ */ jsx("span", { className: "ev-input-comp-required", children: "*" })
|
|
205
|
+
] }),
|
|
206
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-input-comp-wrap", children: [
|
|
207
|
+
hasIcon && /* @__PURE__ */ jsx(Search, { className: "ev-input-comp-icon" }),
|
|
208
|
+
/* @__PURE__ */ jsx(
|
|
209
|
+
Input,
|
|
210
|
+
{
|
|
211
|
+
className: isInvalid ? "is-invalid" : void 0,
|
|
212
|
+
placeholder,
|
|
213
|
+
value: slice.value,
|
|
214
|
+
onChange: (e) => patch({ value: e.target.value }),
|
|
215
|
+
disabled
|
|
216
|
+
}
|
|
217
|
+
),
|
|
218
|
+
hasClear && /* @__PURE__ */ jsx(
|
|
219
|
+
"button",
|
|
220
|
+
{
|
|
221
|
+
type: "button",
|
|
222
|
+
onClick: () => patch({ value: "" }),
|
|
223
|
+
className: "ev-input-comp-clear",
|
|
224
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
] })
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
);
|
|
221
231
|
}
|
|
222
232
|
var Select = SelectPrimitive.Root;
|
|
223
233
|
var SelectValue = SelectPrimitive.Value;
|
|
@@ -225,14 +235,11 @@ var SelectTrigger = React8.forwardRef(({ className, children, ...props }, ref) =
|
|
|
225
235
|
SelectPrimitive.Trigger,
|
|
226
236
|
{
|
|
227
237
|
ref,
|
|
228
|
-
className: cn(
|
|
229
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
230
|
-
className
|
|
231
|
-
),
|
|
238
|
+
className: cn("ev-select-trigger", className),
|
|
232
239
|
...props,
|
|
233
240
|
children: [
|
|
234
241
|
children,
|
|
235
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "
|
|
242
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "ev-select-trigger-icon" }) })
|
|
236
243
|
]
|
|
237
244
|
}
|
|
238
245
|
));
|
|
@@ -241,12 +248,9 @@ var SelectScrollUpButton = React8.forwardRef(({ className, ...props }, ref) => /
|
|
|
241
248
|
SelectPrimitive.ScrollUpButton,
|
|
242
249
|
{
|
|
243
250
|
ref,
|
|
244
|
-
className: cn(
|
|
245
|
-
"flex cursor-default items-center justify-center py-1",
|
|
246
|
-
className
|
|
247
|
-
),
|
|
251
|
+
className: cn("ev-select-scroll-button", className),
|
|
248
252
|
...props,
|
|
249
|
-
children: /* @__PURE__ */ jsx(ChevronUp, {
|
|
253
|
+
children: /* @__PURE__ */ jsx(ChevronUp, {})
|
|
250
254
|
}
|
|
251
255
|
));
|
|
252
256
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
@@ -254,12 +258,9 @@ var SelectScrollDownButton = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
254
258
|
SelectPrimitive.ScrollDownButton,
|
|
255
259
|
{
|
|
256
260
|
ref,
|
|
257
|
-
className: cn(
|
|
258
|
-
"flex cursor-default items-center justify-center py-1",
|
|
259
|
-
className
|
|
260
|
-
),
|
|
261
|
+
className: cn("ev-select-scroll-button", className),
|
|
261
262
|
...props,
|
|
262
|
-
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
263
|
+
children: /* @__PURE__ */ jsx(ChevronDown, {})
|
|
263
264
|
}
|
|
264
265
|
));
|
|
265
266
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
@@ -267,11 +268,7 @@ var SelectContent = React8.forwardRef(({ className, children, position = "popper
|
|
|
267
268
|
SelectPrimitive.Content,
|
|
268
269
|
{
|
|
269
270
|
ref,
|
|
270
|
-
className: cn(
|
|
271
|
-
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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-select-content-transform-origin]",
|
|
272
|
-
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",
|
|
273
|
-
className
|
|
274
|
-
),
|
|
271
|
+
className: cn("ev-select-content", className),
|
|
275
272
|
position,
|
|
276
273
|
...props,
|
|
277
274
|
children: [
|
|
@@ -280,8 +277,8 @@ var SelectContent = React8.forwardRef(({ className, children, position = "popper
|
|
|
280
277
|
SelectPrimitive.Viewport,
|
|
281
278
|
{
|
|
282
279
|
className: cn(
|
|
283
|
-
"
|
|
284
|
-
position === "popper" && "
|
|
280
|
+
"ev-select-viewport",
|
|
281
|
+
position === "popper" && "ev-select-viewport-popper"
|
|
285
282
|
),
|
|
286
283
|
children
|
|
287
284
|
}
|
|
@@ -295,7 +292,7 @@ var SelectLabel = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
295
292
|
SelectPrimitive.Label,
|
|
296
293
|
{
|
|
297
294
|
ref,
|
|
298
|
-
className: cn("
|
|
295
|
+
className: cn("ev-select-label", className),
|
|
299
296
|
...props
|
|
300
297
|
}
|
|
301
298
|
));
|
|
@@ -304,13 +301,10 @@ var SelectItem = React8.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
304
301
|
SelectPrimitive.Item,
|
|
305
302
|
{
|
|
306
303
|
ref,
|
|
307
|
-
className: cn(
|
|
308
|
-
"relative flex w-full cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
309
|
-
className
|
|
310
|
-
),
|
|
304
|
+
className: cn("ev-select-item", className),
|
|
311
305
|
...props,
|
|
312
306
|
children: [
|
|
313
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
307
|
+
/* @__PURE__ */ jsx("span", { className: "ev-select-item-indicator", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, {}) }) }),
|
|
314
308
|
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
315
309
|
]
|
|
316
310
|
}
|
|
@@ -320,36 +314,33 @@ var SelectSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
320
314
|
SelectPrimitive.Separator,
|
|
321
315
|
{
|
|
322
316
|
ref,
|
|
323
|
-
className: cn("-
|
|
317
|
+
className: cn("ev-select-separator", className),
|
|
324
318
|
...props
|
|
325
319
|
}
|
|
326
320
|
));
|
|
327
321
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
328
|
-
var buttonVariants = cva(
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
338
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
339
|
-
},
|
|
340
|
-
size: {
|
|
341
|
-
default: "h-10 px-4 py-2",
|
|
342
|
-
sm: "h-9 rounded-md px-3",
|
|
343
|
-
lg: "h-11 rounded-md px-8",
|
|
344
|
-
icon: "h-10 w-10"
|
|
345
|
-
}
|
|
322
|
+
var buttonVariants = cva("ev-btn", {
|
|
323
|
+
variants: {
|
|
324
|
+
variant: {
|
|
325
|
+
default: "ev-btn-default",
|
|
326
|
+
destructive: "ev-btn-destructive",
|
|
327
|
+
outline: "ev-btn-outline",
|
|
328
|
+
secondary: "ev-btn-secondary",
|
|
329
|
+
ghost: "ev-btn-ghost",
|
|
330
|
+
link: "ev-btn-link"
|
|
346
331
|
},
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
332
|
+
size: {
|
|
333
|
+
default: "ev-btn-size-default",
|
|
334
|
+
sm: "ev-btn-size-sm",
|
|
335
|
+
lg: "ev-btn-size-lg",
|
|
336
|
+
icon: "ev-btn-size-icon"
|
|
350
337
|
}
|
|
338
|
+
},
|
|
339
|
+
defaultVariants: {
|
|
340
|
+
variant: "default",
|
|
341
|
+
size: "default"
|
|
351
342
|
}
|
|
352
|
-
);
|
|
343
|
+
});
|
|
353
344
|
var Button = React8.forwardRef(
|
|
354
345
|
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
355
346
|
const Comp = asChild ? Slot : "button";
|
|
@@ -372,10 +363,7 @@ var PopoverContent = React8.forwardRef(({ className, align = "center", sideOffse
|
|
|
372
363
|
ref,
|
|
373
364
|
align,
|
|
374
365
|
sideOffset,
|
|
375
|
-
className: cn(
|
|
376
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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-popover-content-transform-origin]",
|
|
377
|
-
className
|
|
378
|
-
),
|
|
366
|
+
className: cn("ev-popover-content", className),
|
|
379
367
|
...props
|
|
380
368
|
}
|
|
381
369
|
) }));
|
|
@@ -384,24 +372,18 @@ var Command = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
384
372
|
Command$1,
|
|
385
373
|
{
|
|
386
374
|
ref,
|
|
387
|
-
className: cn(
|
|
388
|
-
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
389
|
-
className
|
|
390
|
-
),
|
|
375
|
+
className: cn("ev-cmd", className),
|
|
391
376
|
...props
|
|
392
377
|
}
|
|
393
378
|
));
|
|
394
379
|
Command.displayName = Command$1.displayName;
|
|
395
|
-
var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "
|
|
396
|
-
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "
|
|
380
|
+
var CommandInput = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "ev-cmd-input-wrapper", "cmdk-input-wrapper": "", children: [
|
|
381
|
+
/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "ev-cmd-input-icon" }),
|
|
397
382
|
/* @__PURE__ */ jsx(
|
|
398
383
|
Command$1.Input,
|
|
399
384
|
{
|
|
400
385
|
ref,
|
|
401
|
-
className: cn(
|
|
402
|
-
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
403
|
-
className
|
|
404
|
-
),
|
|
386
|
+
className: cn("ev-cmd-input", className),
|
|
405
387
|
...props
|
|
406
388
|
}
|
|
407
389
|
)
|
|
@@ -411,7 +393,7 @@ var CommandList = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
411
393
|
Command$1.List,
|
|
412
394
|
{
|
|
413
395
|
ref,
|
|
414
|
-
className: cn("
|
|
396
|
+
className: cn("ev-cmd-list", className),
|
|
415
397
|
...props
|
|
416
398
|
}
|
|
417
399
|
));
|
|
@@ -420,7 +402,7 @@ var CommandEmpty = React8.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
420
402
|
Command$1.Empty,
|
|
421
403
|
{
|
|
422
404
|
ref,
|
|
423
|
-
className: "
|
|
405
|
+
className: "ev-cmd-empty",
|
|
424
406
|
...props
|
|
425
407
|
}
|
|
426
408
|
));
|
|
@@ -429,10 +411,7 @@ var CommandGroup = React8.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
429
411
|
Command$1.Group,
|
|
430
412
|
{
|
|
431
413
|
ref,
|
|
432
|
-
className: cn(
|
|
433
|
-
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
434
|
-
className
|
|
435
|
-
),
|
|
414
|
+
className: cn("ev-cmd-group", className),
|
|
436
415
|
...props
|
|
437
416
|
}
|
|
438
417
|
));
|
|
@@ -441,7 +420,7 @@ var CommandSeparator = React8.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
441
420
|
Command$1.Separator,
|
|
442
421
|
{
|
|
443
422
|
ref,
|
|
444
|
-
className: cn("-
|
|
423
|
+
className: cn("ev-cmd-separator", className),
|
|
445
424
|
...props
|
|
446
425
|
}
|
|
447
426
|
));
|
|
@@ -450,10 +429,7 @@ var CommandItem = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
450
429
|
Command$1.Item,
|
|
451
430
|
{
|
|
452
431
|
ref,
|
|
453
|
-
className: cn(
|
|
454
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
|
455
|
-
className
|
|
456
|
-
),
|
|
432
|
+
className: cn("ev-cmd-item", className),
|
|
457
433
|
...props
|
|
458
434
|
}
|
|
459
435
|
));
|
|
@@ -505,13 +481,16 @@ function EasyVisionSelector({
|
|
|
505
481
|
}, [value, onChange]);
|
|
506
482
|
const isInvalid = mandatory && (value === void 0 || value === "");
|
|
507
483
|
const commit = (v) => patch({ value: v });
|
|
508
|
-
const
|
|
484
|
+
const triggerExtraClasses = [
|
|
485
|
+
isInvalid ? "ev-selector-trigger-invalid" : "",
|
|
486
|
+
className ?? ""
|
|
487
|
+
].filter(Boolean).join(" ");
|
|
509
488
|
if (searchable) {
|
|
510
489
|
const labelOf = (v) => opts.find((o) => o.value === v)?.label ?? "";
|
|
511
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
512
|
-
label && /* @__PURE__ */ jsxs("span", { className: "
|
|
490
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-selector", children: [
|
|
491
|
+
label && /* @__PURE__ */ jsxs("span", { className: "ev-selector-label", children: [
|
|
513
492
|
label,
|
|
514
|
-
mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
493
|
+
mandatory && /* @__PURE__ */ jsx("span", { className: "ev-selector-required", children: "*" })
|
|
515
494
|
] }),
|
|
516
495
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
517
496
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
@@ -520,14 +499,14 @@ function EasyVisionSelector({
|
|
|
520
499
|
variant: "outline",
|
|
521
500
|
role: "combobox",
|
|
522
501
|
disabled,
|
|
523
|
-
className:
|
|
502
|
+
className: ["ev-selector-combo-trigger", triggerExtraClasses].filter(Boolean).join(" "),
|
|
524
503
|
children: [
|
|
525
|
-
value !== void 0 && value !== "" ? labelOf(value) : /* @__PURE__ */ jsx("span", { className: "
|
|
526
|
-
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "
|
|
504
|
+
value !== void 0 && value !== "" ? labelOf(value) : /* @__PURE__ */ jsx("span", { className: "ev-selector-combo-placeholder", children: placeholder }),
|
|
505
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "ev-selector-combo-icon" })
|
|
527
506
|
]
|
|
528
507
|
}
|
|
529
508
|
) }),
|
|
530
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "
|
|
509
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "ev-selector-combo-popover", align: "start", children: /* @__PURE__ */ jsxs(Command, { children: [
|
|
531
510
|
/* @__PURE__ */ jsx(CommandInput, { placeholder: "Buscar..." }),
|
|
532
511
|
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
533
512
|
/* @__PURE__ */ jsx(CommandEmpty, { children: "Sin resultados" }),
|
|
@@ -537,7 +516,7 @@ function EasyVisionSelector({
|
|
|
537
516
|
value: o.label,
|
|
538
517
|
onSelect: () => commit(o.value),
|
|
539
518
|
children: [
|
|
540
|
-
/* @__PURE__ */ jsx(Check, { className:
|
|
519
|
+
/* @__PURE__ */ jsx(Check, { className: ["ev-selector-item-check", value === o.value ? "" : "is-hidden"].filter(Boolean).join(" ") }),
|
|
541
520
|
o.label
|
|
542
521
|
]
|
|
543
522
|
},
|
|
@@ -560,14 +539,14 @@ function EasyVisionSelector({
|
|
|
560
539
|
if (confirmMode) setPending(next);
|
|
561
540
|
else commit(next);
|
|
562
541
|
};
|
|
563
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
564
|
-
label && /* @__PURE__ */ jsxs("span", { className: "
|
|
542
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-selector", children: [
|
|
543
|
+
label && /* @__PURE__ */ jsxs("span", { className: "ev-selector-label", children: [
|
|
565
544
|
label,
|
|
566
|
-
mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
545
|
+
mandatory && /* @__PURE__ */ jsx("span", { className: "ev-selector-required", children: "*" })
|
|
567
546
|
] }),
|
|
568
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
547
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-selector-row", children: [
|
|
569
548
|
/* @__PURE__ */ jsxs(Select, { value: selectValue, onValueChange, disabled, children: [
|
|
570
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className:
|
|
549
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: triggerExtraClasses || void 0, children: /* @__PURE__ */ jsx(SelectValue, { placeholder }) }),
|
|
571
550
|
/* @__PURE__ */ jsx(SelectContent, { children: opts.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
|
|
572
551
|
] }),
|
|
573
552
|
!mandatory && value !== void 0 && value !== "" && !disabled && /* @__PURE__ */ jsx(
|
|
@@ -575,9 +554,9 @@ function EasyVisionSelector({
|
|
|
575
554
|
{
|
|
576
555
|
type: "button",
|
|
577
556
|
onClick: () => confirmMode ? setPending(void 0) : commit(void 0),
|
|
578
|
-
className: "
|
|
557
|
+
className: "ev-selector-clear",
|
|
579
558
|
"aria-label": "Limpiar",
|
|
580
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
559
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
581
560
|
}
|
|
582
561
|
),
|
|
583
562
|
confirmMode && pending !== value && /* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => commit(pending), children: confirmLabel })
|
|
@@ -585,16 +564,16 @@ function EasyVisionSelector({
|
|
|
585
564
|
] });
|
|
586
565
|
}
|
|
587
566
|
function TextWidget({ definition, value, onChange, onRemove }) {
|
|
588
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
589
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
567
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
568
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
590
569
|
definition.label,
|
|
591
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
570
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
592
571
|
":"
|
|
593
572
|
] }),
|
|
594
573
|
/* @__PURE__ */ jsx(
|
|
595
574
|
Input,
|
|
596
575
|
{
|
|
597
|
-
className: "
|
|
576
|
+
className: "ev-mf-chip-input",
|
|
598
577
|
placeholder: definition.placeholder,
|
|
599
578
|
value: value ?? "",
|
|
600
579
|
onChange: (e) => onChange(e.target.value)
|
|
@@ -605,8 +584,8 @@ function TextWidget({ definition, value, onChange, onRemove }) {
|
|
|
605
584
|
{
|
|
606
585
|
type: "button",
|
|
607
586
|
onClick: onRemove,
|
|
608
|
-
className: "
|
|
609
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
587
|
+
className: "ev-mf-chip-remove",
|
|
588
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
610
589
|
}
|
|
611
590
|
)
|
|
612
591
|
] });
|
|
@@ -625,10 +604,10 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
625
604
|
}, [definition.options, resolved]);
|
|
626
605
|
const opts = resolved ?? [];
|
|
627
606
|
const selectValue = value === void 0 || value === "" ? SENTINEL : String(value);
|
|
628
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
629
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
607
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
608
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
630
609
|
definition.label,
|
|
631
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
610
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
632
611
|
":"
|
|
633
612
|
] }),
|
|
634
613
|
/* @__PURE__ */ jsxs(
|
|
@@ -643,7 +622,7 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
643
622
|
}
|
|
644
623
|
},
|
|
645
624
|
children: [
|
|
646
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "
|
|
625
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "ev-mf-chip-select-trigger", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: definition.placeholder ?? "Seleccionar" }) }),
|
|
647
626
|
/* @__PURE__ */ jsx(SelectContent, { children: opts.map((o) => /* @__PURE__ */ jsx(SelectItem, { value: String(o.value), children: o.label }, String(o.value))) })
|
|
648
627
|
]
|
|
649
628
|
}
|
|
@@ -653,8 +632,8 @@ function SelectorWidget({ definition, value, onChange, onRemove }) {
|
|
|
653
632
|
{
|
|
654
633
|
type: "button",
|
|
655
634
|
onClick: onRemove,
|
|
656
|
-
className: "
|
|
657
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
635
|
+
className: "ev-mf-chip-remove",
|
|
636
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
658
637
|
}
|
|
659
638
|
)
|
|
660
639
|
] });
|
|
@@ -663,18 +642,9 @@ var Checkbox = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
663
642
|
CheckboxPrimitive.Root,
|
|
664
643
|
{
|
|
665
644
|
ref,
|
|
666
|
-
className: cn(
|
|
667
|
-
"peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground flex items-center justify-center",
|
|
668
|
-
className
|
|
669
|
-
),
|
|
645
|
+
className: cn("ev-checkbox", className),
|
|
670
646
|
...props,
|
|
671
|
-
children: /* @__PURE__ */ jsx(
|
|
672
|
-
CheckboxPrimitive.Indicator,
|
|
673
|
-
{
|
|
674
|
-
className: cn("flex items-center justify-center text-current w-full h-full"),
|
|
675
|
-
children: /* @__PURE__ */ jsx(Check, { className: "h-3 w-3" })
|
|
676
|
-
}
|
|
677
|
-
)
|
|
647
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: "ev-checkbox-indicator", children: /* @__PURE__ */ jsx(Check, {}) })
|
|
678
648
|
}
|
|
679
649
|
));
|
|
680
650
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
@@ -706,69 +676,48 @@ function MultiSelectWidget({
|
|
|
706
676
|
};
|
|
707
677
|
const removeOne = (v) => onChange(selected.filter((x) => x !== v));
|
|
708
678
|
const labelOf = (v) => opts.find((o) => o.value === v)?.label ?? String(v);
|
|
709
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
710
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
679
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip is-wrap", children: [
|
|
680
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
711
681
|
definition.label,
|
|
712
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
682
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
713
683
|
":"
|
|
714
684
|
] }),
|
|
715
|
-
selected.map((v) => /* @__PURE__ */ jsxs(
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
className: "inline-flex items-center gap-1 bg-primary/10 text-primary text-xs px-2 py-0.5 rounded-md",
|
|
719
|
-
children: [
|
|
720
|
-
labelOf(v),
|
|
721
|
-
/* @__PURE__ */ jsx(
|
|
722
|
-
"button",
|
|
723
|
-
{
|
|
724
|
-
type: "button",
|
|
725
|
-
onClick: () => removeOne(v),
|
|
726
|
-
className: "p-0.5 hover:bg-muted rounded",
|
|
727
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
728
|
-
}
|
|
729
|
-
)
|
|
730
|
-
]
|
|
731
|
-
},
|
|
732
|
-
String(v)
|
|
733
|
-
)),
|
|
734
|
-
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
735
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
685
|
+
selected.map((v) => /* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-badge", children: [
|
|
686
|
+
labelOf(v),
|
|
687
|
+
/* @__PURE__ */ jsx(
|
|
736
688
|
"button",
|
|
737
689
|
{
|
|
738
690
|
type: "button",
|
|
739
|
-
|
|
740
|
-
|
|
691
|
+
onClick: () => removeOne(v),
|
|
692
|
+
className: "ev-mf-chip-badge-x",
|
|
693
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
741
694
|
}
|
|
742
|
-
)
|
|
743
|
-
|
|
695
|
+
)
|
|
696
|
+
] }, String(v))),
|
|
697
|
+
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
698
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx("button", { type: "button", className: "ev-mf-chip-caret", children: /* @__PURE__ */ jsx(ChevronDown, {}) }) }),
|
|
699
|
+
/* @__PURE__ */ jsxs(PopoverContent, { className: "ev-mf-ms-popover", align: "start", children: [
|
|
744
700
|
/* @__PURE__ */ jsx(
|
|
745
701
|
Input,
|
|
746
702
|
{
|
|
747
|
-
className: "
|
|
703
|
+
className: "ev-mf-ms-search",
|
|
748
704
|
placeholder: "Buscar...",
|
|
749
705
|
value: search,
|
|
750
706
|
onChange: (e) => setSearch(e.target.value)
|
|
751
707
|
}
|
|
752
708
|
),
|
|
753
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
754
|
-
filtered.map((o) => /* @__PURE__ */ jsxs(
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
),
|
|
766
|
-
o.label
|
|
767
|
-
]
|
|
768
|
-
},
|
|
769
|
-
String(o.value)
|
|
770
|
-
)),
|
|
771
|
-
filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: "Sin opciones" })
|
|
709
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-mf-ms-list", children: [
|
|
710
|
+
filtered.map((o) => /* @__PURE__ */ jsxs("label", { className: "ev-mf-ms-option", children: [
|
|
711
|
+
/* @__PURE__ */ jsx(
|
|
712
|
+
Checkbox,
|
|
713
|
+
{
|
|
714
|
+
checked: selected.includes(o.value),
|
|
715
|
+
onCheckedChange: () => toggle(o.value)
|
|
716
|
+
}
|
|
717
|
+
),
|
|
718
|
+
o.label
|
|
719
|
+
] }, String(o.value))),
|
|
720
|
+
filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "ev-mf-ms-empty", children: "Sin opciones" })
|
|
772
721
|
] })
|
|
773
722
|
] })
|
|
774
723
|
] }),
|
|
@@ -777,8 +726,8 @@ function MultiSelectWidget({
|
|
|
777
726
|
{
|
|
778
727
|
type: "button",
|
|
779
728
|
onClick: onRemove,
|
|
780
|
-
className: "
|
|
781
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
729
|
+
className: "ev-mf-chip-remove",
|
|
730
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
782
731
|
}
|
|
783
732
|
)
|
|
784
733
|
] });
|
|
@@ -793,40 +742,37 @@ function Calendar({
|
|
|
793
742
|
DayPicker,
|
|
794
743
|
{
|
|
795
744
|
showOutsideDays,
|
|
796
|
-
className: cn("
|
|
745
|
+
className: cn("ev-cal", className),
|
|
797
746
|
classNames: {
|
|
798
|
-
months: "
|
|
799
|
-
month: "
|
|
800
|
-
caption: "
|
|
801
|
-
caption_label: "
|
|
802
|
-
nav: "
|
|
747
|
+
months: "ev-cal-months",
|
|
748
|
+
month: "ev-cal-month",
|
|
749
|
+
caption: "ev-cal-caption",
|
|
750
|
+
caption_label: "ev-cal-caption-label",
|
|
751
|
+
nav: "ev-cal-nav",
|
|
803
752
|
nav_button: cn(
|
|
804
753
|
buttonVariants({ variant: "outline" }),
|
|
805
|
-
"
|
|
806
|
-
),
|
|
807
|
-
nav_button_previous: "absolute left-1",
|
|
808
|
-
nav_button_next: "absolute right-1",
|
|
809
|
-
table: "w-full border-collapse space-y-1",
|
|
810
|
-
head_row: "flex",
|
|
811
|
-
head_cell: "text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",
|
|
812
|
-
row: "flex w-full mt-2",
|
|
813
|
-
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
814
|
-
day: cn(
|
|
815
|
-
buttonVariants({ variant: "ghost" }),
|
|
816
|
-
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
754
|
+
"ev-cal-nav-button"
|
|
817
755
|
),
|
|
756
|
+
nav_button_previous: "ev-cal-nav-button-previous",
|
|
757
|
+
nav_button_next: "ev-cal-nav-button-next",
|
|
758
|
+
table: "ev-cal-table",
|
|
759
|
+
head_row: "ev-cal-head-row",
|
|
760
|
+
head_cell: "ev-cal-head-cell",
|
|
761
|
+
row: "ev-cal-row",
|
|
762
|
+
cell: "ev-cal-cell",
|
|
763
|
+
day: cn(buttonVariants({ variant: "ghost" }), "ev-cal-day"),
|
|
818
764
|
day_range_end: "day-range-end",
|
|
819
|
-
day_selected: "
|
|
820
|
-
day_today: "
|
|
821
|
-
day_outside: "day-outside
|
|
822
|
-
day_disabled: "
|
|
823
|
-
day_range_middle: "
|
|
824
|
-
day_hidden: "
|
|
765
|
+
day_selected: "ev-cal-day-selected",
|
|
766
|
+
day_today: "ev-cal-day-today",
|
|
767
|
+
day_outside: "day-outside ev-cal-day-outside",
|
|
768
|
+
day_disabled: "ev-cal-day-disabled",
|
|
769
|
+
day_range_middle: "ev-cal-day-range-middle",
|
|
770
|
+
day_hidden: "ev-cal-day-hidden",
|
|
825
771
|
...classNames
|
|
826
772
|
},
|
|
827
773
|
components: {
|
|
828
|
-
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronLeft, { className: cn("
|
|
829
|
-
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronRight, { className: cn("
|
|
774
|
+
IconLeft: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronLeft, { className: cn("ev-cal-icon", className2), ...props2 }),
|
|
775
|
+
IconRight: ({ className: className2, ...props2 }) => /* @__PURE__ */ jsx(ChevronRight, { className: cn("ev-cal-icon", className2), ...props2 })
|
|
830
776
|
},
|
|
831
777
|
...props
|
|
832
778
|
}
|
|
@@ -848,25 +794,18 @@ function DateRangeWidget({
|
|
|
848
794
|
if (range.to) return `Hasta ${format(range.to, "dd/MM/yy", { locale: es })}`;
|
|
849
795
|
return definition.placeholder ?? "Seleccionar rango";
|
|
850
796
|
})();
|
|
851
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
852
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
797
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
798
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
853
799
|
definition.label,
|
|
854
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
800
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
855
801
|
":"
|
|
856
802
|
] }),
|
|
857
803
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
858
|
-
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
859
|
-
|
|
860
|
-
{
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
children: [
|
|
864
|
-
/* @__PURE__ */ jsx(Calendar$1, { className: "h-3.5 w-3.5" }),
|
|
865
|
-
/* @__PURE__ */ jsx("span", { children: label })
|
|
866
|
-
]
|
|
867
|
-
}
|
|
868
|
-
) }),
|
|
869
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsx(
|
|
804
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("button", { type: "button", className: "ev-mf-chip-trigger-btn", children: [
|
|
805
|
+
/* @__PURE__ */ jsx(Calendar$1, {}),
|
|
806
|
+
/* @__PURE__ */ jsx("span", { children: label })
|
|
807
|
+
] }) }),
|
|
808
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "ev-mf-daterange-popover", align: "start", children: /* @__PURE__ */ jsx(
|
|
870
809
|
Calendar,
|
|
871
810
|
{
|
|
872
811
|
mode: "range",
|
|
@@ -882,8 +821,8 @@ function DateRangeWidget({
|
|
|
882
821
|
{
|
|
883
822
|
type: "button",
|
|
884
823
|
onClick: onRemove,
|
|
885
|
-
className: "
|
|
886
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
824
|
+
className: "ev-mf-chip-remove",
|
|
825
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
887
826
|
}
|
|
888
827
|
)
|
|
889
828
|
] });
|
|
@@ -895,28 +834,28 @@ function NumberRangeWidget({
|
|
|
895
834
|
onRemove
|
|
896
835
|
}) {
|
|
897
836
|
const range = value ?? {};
|
|
898
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
899
|
-
/* @__PURE__ */ jsxs("span", { className: "
|
|
837
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-chip", children: [
|
|
838
|
+
/* @__PURE__ */ jsxs("span", { className: "ev-mf-chip-label", children: [
|
|
900
839
|
definition.label,
|
|
901
|
-
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "
|
|
840
|
+
definition.mandatory && /* @__PURE__ */ jsx("span", { className: "ev-mf-chip-required", children: "*" }),
|
|
902
841
|
":"
|
|
903
842
|
] }),
|
|
904
843
|
/* @__PURE__ */ jsx(
|
|
905
844
|
Input,
|
|
906
845
|
{
|
|
907
846
|
type: "number",
|
|
908
|
-
className: "
|
|
847
|
+
className: "ev-mf-chip-number",
|
|
909
848
|
placeholder: "Min",
|
|
910
849
|
value: range.min ?? "",
|
|
911
850
|
onChange: (e) => onChange({ ...range, min: e.target.value ? Number(e.target.value) : void 0 })
|
|
912
851
|
}
|
|
913
852
|
),
|
|
914
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
853
|
+
/* @__PURE__ */ jsx("span", { className: "ev-mf-chip-dash", children: "\u2014" }),
|
|
915
854
|
/* @__PURE__ */ jsx(
|
|
916
855
|
Input,
|
|
917
856
|
{
|
|
918
857
|
type: "number",
|
|
919
|
-
className: "
|
|
858
|
+
className: "ev-mf-chip-number",
|
|
920
859
|
placeholder: "Max",
|
|
921
860
|
value: range.max ?? "",
|
|
922
861
|
onChange: (e) => onChange({ ...range, max: e.target.value ? Number(e.target.value) : void 0 })
|
|
@@ -927,8 +866,8 @@ function NumberRangeWidget({
|
|
|
927
866
|
{
|
|
928
867
|
type: "button",
|
|
929
868
|
onClick: onRemove,
|
|
930
|
-
className: "
|
|
931
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
869
|
+
className: "ev-mf-chip-remove",
|
|
870
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
932
871
|
}
|
|
933
872
|
)
|
|
934
873
|
] });
|
|
@@ -1400,37 +1339,30 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1400
1339
|
const renderField = (f) => {
|
|
1401
1340
|
if (f.type === "multifilter") {
|
|
1402
1341
|
const removable2 = editable && !f.pinned && !f.locked;
|
|
1403
|
-
return /* @__PURE__ */ jsxs(
|
|
1404
|
-
"div",
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
labels: labelOverrides
|
|
1428
|
-
}
|
|
1429
|
-
)
|
|
1430
|
-
]
|
|
1431
|
-
},
|
|
1432
|
-
f.id
|
|
1433
|
-
);
|
|
1342
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-mf-nested", children: [
|
|
1343
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-mf-nested-header", children: [
|
|
1344
|
+
/* @__PURE__ */ jsx("span", { className: "ev-mf-nested-label", children: f.label }),
|
|
1345
|
+
removable2 && /* @__PURE__ */ jsx(
|
|
1346
|
+
"button",
|
|
1347
|
+
{
|
|
1348
|
+
type: "button",
|
|
1349
|
+
onClick: () => removeField(f.id),
|
|
1350
|
+
className: "ev-mf-nested-remove",
|
|
1351
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
1352
|
+
}
|
|
1353
|
+
)
|
|
1354
|
+
] }),
|
|
1355
|
+
/* @__PURE__ */ jsx(
|
|
1356
|
+
EasyVisionMultifilter2,
|
|
1357
|
+
{
|
|
1358
|
+
id: f.id,
|
|
1359
|
+
config: f.config,
|
|
1360
|
+
editable,
|
|
1361
|
+
performButton: false,
|
|
1362
|
+
labels: labelOverrides
|
|
1363
|
+
}
|
|
1364
|
+
)
|
|
1365
|
+
] }, f.id);
|
|
1434
1366
|
}
|
|
1435
1367
|
const removable = editable && !f.pinned && !f.locked;
|
|
1436
1368
|
return /* @__PURE__ */ jsx(
|
|
@@ -1444,18 +1376,18 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1444
1376
|
f.id
|
|
1445
1377
|
);
|
|
1446
1378
|
};
|
|
1447
|
-
return /* @__PURE__ */ jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsxs("div", { className: "
|
|
1448
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1379
|
+
return /* @__PURE__ */ jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsx("div", { className, children: /* @__PURE__ */ jsxs("div", { className: "ev-mf-panel", children: [
|
|
1380
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-mf-row", children: [
|
|
1449
1381
|
prominentSlots.map(({ def, removable, isLegacySearchField }) => /* @__PURE__ */ jsxs(
|
|
1450
1382
|
"div",
|
|
1451
1383
|
{
|
|
1452
|
-
className: "
|
|
1384
|
+
className: "ev-mf-search-slot",
|
|
1453
1385
|
children: [
|
|
1454
|
-
/* @__PURE__ */ jsx(Search, { className: "
|
|
1386
|
+
/* @__PURE__ */ jsx(Search, { className: "ev-mf-search-icon" }),
|
|
1455
1387
|
/* @__PURE__ */ jsx(
|
|
1456
|
-
|
|
1388
|
+
"input",
|
|
1457
1389
|
{
|
|
1458
|
-
className:
|
|
1390
|
+
className: ["ev-mf-search-input", removable ? "has-clear" : "no-clear"].filter(Boolean).join(" "),
|
|
1459
1391
|
placeholder: def.placeholder ?? def.label ?? labels.searchPlaceholder,
|
|
1460
1392
|
value: values[def.id] ?? "",
|
|
1461
1393
|
onChange: (e) => updateValue(def.id, e.target.value),
|
|
@@ -1472,8 +1404,8 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1472
1404
|
type: "button",
|
|
1473
1405
|
onClick: () => removeField(def.id),
|
|
1474
1406
|
"aria-label": labels.clear,
|
|
1475
|
-
className: "
|
|
1476
|
-
children: /* @__PURE__ */ jsx(X, {
|
|
1407
|
+
className: "ev-mf-search-clear",
|
|
1408
|
+
children: /* @__PURE__ */ jsx(X, {})
|
|
1477
1409
|
}
|
|
1478
1410
|
)
|
|
1479
1411
|
]
|
|
@@ -1486,19 +1418,19 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1486
1418
|
{
|
|
1487
1419
|
variant: "outline",
|
|
1488
1420
|
size: "sm",
|
|
1489
|
-
className: "
|
|
1421
|
+
className: "ev-mf-add-btn",
|
|
1490
1422
|
"aria-label": labels.addFilter,
|
|
1491
|
-
children: /* @__PURE__ */ jsx(Plus, {
|
|
1423
|
+
children: /* @__PURE__ */ jsx(Plus, {})
|
|
1492
1424
|
}
|
|
1493
1425
|
) }),
|
|
1494
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "
|
|
1426
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "ev-mf-add-popover", align: "start", children: /* @__PURE__ */ jsx("div", { className: "ev-mf-add-list", children: availableToAdd.map((f) => /* @__PURE__ */ jsxs(
|
|
1495
1427
|
"button",
|
|
1496
1428
|
{
|
|
1497
1429
|
type: "button",
|
|
1498
1430
|
onClick: () => addField(f.id),
|
|
1499
|
-
className: "
|
|
1431
|
+
className: "ev-mf-add-item",
|
|
1500
1432
|
children: [
|
|
1501
|
-
/* @__PURE__ */ jsx(Plus, {
|
|
1433
|
+
/* @__PURE__ */ jsx(Plus, {}),
|
|
1502
1434
|
f.label
|
|
1503
1435
|
]
|
|
1504
1436
|
},
|
|
@@ -1511,9 +1443,9 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1511
1443
|
size: "sm",
|
|
1512
1444
|
onClick: performAction,
|
|
1513
1445
|
disabled: !performEnabled,
|
|
1514
|
-
className: "
|
|
1446
|
+
className: "ev-mf-perform",
|
|
1515
1447
|
children: [
|
|
1516
|
-
performIcon ?? /* @__PURE__ */ jsx(Search, {
|
|
1448
|
+
performIcon ?? /* @__PURE__ */ jsx(Search, {}),
|
|
1517
1449
|
performLabelText
|
|
1518
1450
|
]
|
|
1519
1451
|
}
|
|
@@ -1524,25 +1456,25 @@ var EasyVisionMultifilter = forwardRef(function EasyVisionMultifilter2(props, re
|
|
|
1524
1456
|
variant: "ghost",
|
|
1525
1457
|
size: "sm",
|
|
1526
1458
|
onClick: clearAll,
|
|
1527
|
-
className: "
|
|
1459
|
+
className: "ev-mf-clear",
|
|
1528
1460
|
children: [
|
|
1529
|
-
/* @__PURE__ */ jsx(X, {
|
|
1461
|
+
/* @__PURE__ */ jsx(X, {}),
|
|
1530
1462
|
labels.clear
|
|
1531
1463
|
]
|
|
1532
1464
|
}
|
|
1533
1465
|
)
|
|
1534
1466
|
] }),
|
|
1535
|
-
pinnedFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "
|
|
1536
|
-
chipFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "
|
|
1537
|
-
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsx("div", { className: "
|
|
1467
|
+
pinnedFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "ev-mf-row", children: pinnedFields.map(renderField) }),
|
|
1468
|
+
chipFields.length > 0 && /* @__PURE__ */ jsx("div", { className: "ev-mf-row", children: chipFields.map(renderField) }),
|
|
1469
|
+
performButton && performPosition === "belowRow" && /* @__PURE__ */ jsx("div", { className: "ev-mf-below-row", children: /* @__PURE__ */ jsxs(
|
|
1538
1470
|
Button,
|
|
1539
1471
|
{
|
|
1540
1472
|
size: "sm",
|
|
1541
1473
|
onClick: performAction,
|
|
1542
1474
|
disabled: !performEnabled,
|
|
1543
|
-
className: "
|
|
1475
|
+
className: "ev-mf-perform",
|
|
1544
1476
|
children: [
|
|
1545
|
-
performIcon ?? /* @__PURE__ */ jsx(Search, {
|
|
1477
|
+
performIcon ?? /* @__PURE__ */ jsx(Search, {}),
|
|
1546
1478
|
performLabelText
|
|
1547
1479
|
]
|
|
1548
1480
|
}
|
|
@@ -1601,133 +1533,33 @@ function buildChildQueryDirect(field, values) {
|
|
|
1601
1533
|
return Object.keys(where).length > 0 ? { where } : {};
|
|
1602
1534
|
}
|
|
1603
1535
|
var join = (...parts) => parts.filter(Boolean).join(" ");
|
|
1604
|
-
var EasyVisionCard = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1605
|
-
"div",
|
|
1606
|
-
{
|
|
1607
|
-
ref,
|
|
1608
|
-
className: join(
|
|
1609
|
-
"rounded-md border border-border bg-card text-card-foreground shadow-sm",
|
|
1610
|
-
className
|
|
1611
|
-
),
|
|
1612
|
-
...props
|
|
1613
|
-
}
|
|
1614
|
-
));
|
|
1536
|
+
var EasyVisionCard = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card", className), ...props }));
|
|
1615
1537
|
EasyVisionCard.displayName = "EasyVisionCard";
|
|
1616
|
-
var EasyVisionCardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1617
|
-
"div",
|
|
1618
|
-
{
|
|
1619
|
-
ref,
|
|
1620
|
-
className: join("flex flex-col space-y-1.5 p-6", className),
|
|
1621
|
-
...props
|
|
1622
|
-
}
|
|
1623
|
-
));
|
|
1538
|
+
var EasyVisionCardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card-header", className), ...props }));
|
|
1624
1539
|
EasyVisionCardHeader.displayName = "EasyVisionCardHeader";
|
|
1625
|
-
var EasyVisionCardTitle = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1626
|
-
"h3",
|
|
1627
|
-
{
|
|
1628
|
-
ref,
|
|
1629
|
-
className: join(
|
|
1630
|
-
"text-2xl font-semibold leading-none tracking-tight",
|
|
1631
|
-
className
|
|
1632
|
-
),
|
|
1633
|
-
...props,
|
|
1634
|
-
children
|
|
1635
|
-
}
|
|
1636
|
-
));
|
|
1540
|
+
var EasyVisionCardTitle = React8.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: join("ev-card-title", className), ...props, children }));
|
|
1637
1541
|
EasyVisionCardTitle.displayName = "EasyVisionCardTitle";
|
|
1638
|
-
var EasyVisionCardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1639
|
-
"p",
|
|
1640
|
-
{
|
|
1641
|
-
ref,
|
|
1642
|
-
className: join("text-sm text-muted-foreground", className),
|
|
1643
|
-
...props
|
|
1644
|
-
}
|
|
1645
|
-
));
|
|
1542
|
+
var EasyVisionCardDescription = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: join("ev-card-description", className), ...props }));
|
|
1646
1543
|
EasyVisionCardDescription.displayName = "EasyVisionCardDescription";
|
|
1647
|
-
var EasyVisionCardContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("
|
|
1544
|
+
var EasyVisionCardContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card-content", className), ...props }));
|
|
1648
1545
|
EasyVisionCardContent.displayName = "EasyVisionCardContent";
|
|
1649
|
-
var EasyVisionCardFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1650
|
-
"div",
|
|
1651
|
-
{
|
|
1652
|
-
ref,
|
|
1653
|
-
className: join("flex items-center p-6 pt-0", className),
|
|
1654
|
-
...props
|
|
1655
|
-
}
|
|
1656
|
-
));
|
|
1546
|
+
var EasyVisionCardFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: join("ev-card-footer", className), ...props }));
|
|
1657
1547
|
EasyVisionCardFooter.displayName = "EasyVisionCardFooter";
|
|
1658
|
-
var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("
|
|
1659
|
-
"table",
|
|
1660
|
-
{
|
|
1661
|
-
ref,
|
|
1662
|
-
className: cn("w-full caption-bottom text-sm", className),
|
|
1663
|
-
...props
|
|
1664
|
-
}
|
|
1665
|
-
) }));
|
|
1548
|
+
var Table = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("table", { ref, className: cn("ev-table", className), ...props }));
|
|
1666
1549
|
Table.displayName = "Table";
|
|
1667
|
-
var TableHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className
|
|
1550
|
+
var TableHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className, ...props }));
|
|
1668
1551
|
TableHeader.displayName = "TableHeader";
|
|
1669
|
-
var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1670
|
-
"tbody",
|
|
1671
|
-
{
|
|
1672
|
-
ref,
|
|
1673
|
-
className: cn("[&_tr:last-child]:border-0", className),
|
|
1674
|
-
...props
|
|
1675
|
-
}
|
|
1676
|
-
));
|
|
1552
|
+
var TableBody = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className, ...props }));
|
|
1677
1553
|
TableBody.displayName = "TableBody";
|
|
1678
|
-
var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1679
|
-
"tfoot",
|
|
1680
|
-
{
|
|
1681
|
-
ref,
|
|
1682
|
-
className: cn(
|
|
1683
|
-
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
1684
|
-
className
|
|
1685
|
-
),
|
|
1686
|
-
...props
|
|
1687
|
-
}
|
|
1688
|
-
));
|
|
1554
|
+
var TableFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", { ref, className, ...props }));
|
|
1689
1555
|
TableFooter.displayName = "TableFooter";
|
|
1690
|
-
var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1691
|
-
"tr",
|
|
1692
|
-
{
|
|
1693
|
-
ref,
|
|
1694
|
-
className: cn(
|
|
1695
|
-
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
1696
|
-
className
|
|
1697
|
-
),
|
|
1698
|
-
...props
|
|
1699
|
-
}
|
|
1700
|
-
));
|
|
1556
|
+
var TableRow = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", { ref, className, ...props }));
|
|
1701
1557
|
TableRow.displayName = "TableRow";
|
|
1702
|
-
var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1703
|
-
"th",
|
|
1704
|
-
{
|
|
1705
|
-
ref,
|
|
1706
|
-
className: cn(
|
|
1707
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
1708
|
-
className
|
|
1709
|
-
),
|
|
1710
|
-
...props
|
|
1711
|
-
}
|
|
1712
|
-
));
|
|
1558
|
+
var TableHead = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", { ref, className, ...props }));
|
|
1713
1559
|
TableHead.displayName = "TableHead";
|
|
1714
|
-
var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1715
|
-
"td",
|
|
1716
|
-
{
|
|
1717
|
-
ref,
|
|
1718
|
-
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
1719
|
-
...props
|
|
1720
|
-
}
|
|
1721
|
-
));
|
|
1560
|
+
var TableCell = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", { ref, className, ...props }));
|
|
1722
1561
|
TableCell.displayName = "TableCell";
|
|
1723
|
-
var TableCaption = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1724
|
-
"caption",
|
|
1725
|
-
{
|
|
1726
|
-
ref,
|
|
1727
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1728
|
-
...props
|
|
1729
|
-
}
|
|
1730
|
-
));
|
|
1562
|
+
var TableCaption = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className, ...props }));
|
|
1731
1563
|
TableCaption.displayName = "TableCaption";
|
|
1732
1564
|
var isNestedField = (field) => field.includes(".");
|
|
1733
1565
|
var resolvePath = (obj, path) => path.split(".").reduce(
|
|
@@ -1862,14 +1694,14 @@ var DropdownMenuSubTrigger = React8.forwardRef(({ className, inset, children, ..
|
|
|
1862
1694
|
{
|
|
1863
1695
|
ref,
|
|
1864
1696
|
className: cn(
|
|
1865
|
-
"
|
|
1866
|
-
inset && "
|
|
1697
|
+
"ev-dropdown-sub-trigger",
|
|
1698
|
+
inset && "ev-dropdown-inset",
|
|
1867
1699
|
className
|
|
1868
1700
|
),
|
|
1869
1701
|
...props,
|
|
1870
1702
|
children: [
|
|
1871
1703
|
children,
|
|
1872
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "
|
|
1704
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ev-dropdown-sub-trigger-chevron" })
|
|
1873
1705
|
]
|
|
1874
1706
|
}
|
|
1875
1707
|
));
|
|
@@ -1878,10 +1710,7 @@ var DropdownMenuSubContent = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
1878
1710
|
DropdownMenuPrimitive.SubContent,
|
|
1879
1711
|
{
|
|
1880
1712
|
ref,
|
|
1881
|
-
className: cn(
|
|
1882
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground 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]",
|
|
1883
|
-
className
|
|
1884
|
-
),
|
|
1713
|
+
className: cn("ev-dropdown-sub-content", className),
|
|
1885
1714
|
...props
|
|
1886
1715
|
}
|
|
1887
1716
|
));
|
|
@@ -1891,10 +1720,7 @@ var DropdownMenuContent = React8.forwardRef(({ className, sideOffset = 4, ...pro
|
|
|
1891
1720
|
{
|
|
1892
1721
|
ref,
|
|
1893
1722
|
sideOffset,
|
|
1894
|
-
className: cn(
|
|
1895
|
-
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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]",
|
|
1896
|
-
className
|
|
1897
|
-
),
|
|
1723
|
+
className: cn("ev-dropdown-content", className),
|
|
1898
1724
|
...props
|
|
1899
1725
|
}
|
|
1900
1726
|
) }));
|
|
@@ -1904,8 +1730,8 @@ var DropdownMenuItem = React8.forwardRef(({ className, inset, ...props }, ref) =
|
|
|
1904
1730
|
{
|
|
1905
1731
|
ref,
|
|
1906
1732
|
className: cn(
|
|
1907
|
-
"
|
|
1908
|
-
inset && "
|
|
1733
|
+
"ev-dropdown-item",
|
|
1734
|
+
inset && "ev-dropdown-inset",
|
|
1909
1735
|
className
|
|
1910
1736
|
),
|
|
1911
1737
|
...props
|
|
@@ -1916,14 +1742,11 @@ var DropdownMenuCheckboxItem = React8.forwardRef(({ className, children, checked
|
|
|
1916
1742
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1917
1743
|
{
|
|
1918
1744
|
ref,
|
|
1919
|
-
className: cn(
|
|
1920
|
-
"relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1921
|
-
className
|
|
1922
|
-
),
|
|
1745
|
+
className: cn("ev-dropdown-checkbox-item", className),
|
|
1923
1746
|
checked,
|
|
1924
1747
|
...props,
|
|
1925
1748
|
children: [
|
|
1926
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
1749
|
+
/* @__PURE__ */ jsx("span", { className: "ev-dropdown-item-indicator", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, {}) }) }),
|
|
1927
1750
|
children
|
|
1928
1751
|
]
|
|
1929
1752
|
}
|
|
@@ -1933,13 +1756,10 @@ var DropdownMenuRadioItem = React8.forwardRef(({ className, children, ...props }
|
|
|
1933
1756
|
DropdownMenuPrimitive.RadioItem,
|
|
1934
1757
|
{
|
|
1935
1758
|
ref,
|
|
1936
|
-
className: cn(
|
|
1937
|
-
"relative flex cursor-default select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1938
|
-
className
|
|
1939
|
-
),
|
|
1759
|
+
className: cn("ev-dropdown-radio-item", className),
|
|
1940
1760
|
...props,
|
|
1941
1761
|
children: [
|
|
1942
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
1762
|
+
/* @__PURE__ */ jsx("span", { className: "ev-dropdown-item-indicator ev-dropdown-radio-indicator", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Circle, {}) }) }),
|
|
1943
1763
|
children
|
|
1944
1764
|
]
|
|
1945
1765
|
}
|
|
@@ -1950,8 +1770,8 @@ var DropdownMenuLabel = React8.forwardRef(({ className, inset, ...props }, ref)
|
|
|
1950
1770
|
{
|
|
1951
1771
|
ref,
|
|
1952
1772
|
className: cn(
|
|
1953
|
-
"
|
|
1954
|
-
inset && "
|
|
1773
|
+
"ev-dropdown-label",
|
|
1774
|
+
inset && "ev-dropdown-inset",
|
|
1955
1775
|
className
|
|
1956
1776
|
),
|
|
1957
1777
|
...props
|
|
@@ -1962,7 +1782,7 @@ var DropdownMenuSeparator = React8.forwardRef(({ className, ...props }, ref) =>
|
|
|
1962
1782
|
DropdownMenuPrimitive.Separator,
|
|
1963
1783
|
{
|
|
1964
1784
|
ref,
|
|
1965
|
-
className: cn("-
|
|
1785
|
+
className: cn("ev-dropdown-separator", className),
|
|
1966
1786
|
...props
|
|
1967
1787
|
}
|
|
1968
1788
|
));
|
|
@@ -1975,7 +1795,7 @@ function SelectAllControl({
|
|
|
1975
1795
|
onScopeChange,
|
|
1976
1796
|
labels
|
|
1977
1797
|
}) {
|
|
1978
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
1798
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-sa-control", children: [
|
|
1979
1799
|
/* @__PURE__ */ jsx(
|
|
1980
1800
|
Checkbox,
|
|
1981
1801
|
{
|
|
@@ -1989,9 +1809,9 @@ function SelectAllControl({
|
|
|
1989
1809
|
"button",
|
|
1990
1810
|
{
|
|
1991
1811
|
type: "button",
|
|
1992
|
-
className: "
|
|
1812
|
+
className: "ev-sa-toggle",
|
|
1993
1813
|
"aria-label": "Toggle select-all scope",
|
|
1994
|
-
children: /* @__PURE__ */ jsx(ChevronDown, { className: "
|
|
1814
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "ev-sa-toggle-icon" })
|
|
1995
1815
|
}
|
|
1996
1816
|
) }),
|
|
1997
1817
|
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", children: /* @__PURE__ */ jsxs(
|
|
@@ -2018,8 +1838,8 @@ function PaginationFooter({
|
|
|
2018
1838
|
labels
|
|
2019
1839
|
}) {
|
|
2020
1840
|
const totalPages = Math.max(1, Math.ceil(totalCount / itemsPerPage));
|
|
2021
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
2022
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1841
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-table-footer", children: [
|
|
1842
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2023
1843
|
/* @__PURE__ */ jsx("span", { children: labels.rowsPerPage }),
|
|
2024
1844
|
/* @__PURE__ */ jsxs(
|
|
2025
1845
|
Select,
|
|
@@ -2027,7 +1847,7 @@ function PaginationFooter({
|
|
|
2027
1847
|
value: String(itemsPerPage),
|
|
2028
1848
|
onValueChange: (v) => onItemsPerPageChange(Number(v)),
|
|
2029
1849
|
children: [
|
|
2030
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "
|
|
1850
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "ev-table-footer-ipp", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
2031
1851
|
/* @__PURE__ */ jsx(SelectContent, { children: itemsPerPageOptions.map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: String(opt), children: opt }, opt)) })
|
|
2032
1852
|
]
|
|
2033
1853
|
}
|
|
@@ -2038,7 +1858,7 @@ function PaginationFooter({
|
|
|
2038
1858
|
labels.results
|
|
2039
1859
|
] })
|
|
2040
1860
|
] }),
|
|
2041
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1861
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-footer-section", children: [
|
|
2042
1862
|
/* @__PURE__ */ jsx("span", { children: labels.page }),
|
|
2043
1863
|
/* @__PURE__ */ jsxs(
|
|
2044
1864
|
Select,
|
|
@@ -2046,7 +1866,7 @@ function PaginationFooter({
|
|
|
2046
1866
|
value: String(currentPage),
|
|
2047
1867
|
onValueChange: (v) => onPageChange(Number(v)),
|
|
2048
1868
|
children: [
|
|
2049
|
-
/* @__PURE__ */ jsx(SelectTrigger, { className: "
|
|
1869
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "ev-table-footer-pg", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
|
|
2050
1870
|
/* @__PURE__ */ jsx(SelectContent, { children: Array.from({ length: totalPages }, (_, i) => i + 1).map((p) => /* @__PURE__ */ jsx(SelectItem, { value: String(p), children: p }, p)) })
|
|
2051
1871
|
]
|
|
2052
1872
|
}
|
|
@@ -2056,16 +1876,16 @@ function PaginationFooter({
|
|
|
2056
1876
|
" ",
|
|
2057
1877
|
totalPages
|
|
2058
1878
|
] }),
|
|
2059
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
1879
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-footer-nav", children: [
|
|
2060
1880
|
/* @__PURE__ */ jsx(
|
|
2061
1881
|
Button,
|
|
2062
1882
|
{
|
|
2063
1883
|
variant: "ghost",
|
|
2064
1884
|
size: "icon",
|
|
2065
|
-
className: "
|
|
1885
|
+
className: "ev-table-footer-nav-btn",
|
|
2066
1886
|
disabled: currentPage <= 1,
|
|
2067
1887
|
onClick: () => onPageChange(currentPage - 1),
|
|
2068
|
-
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "
|
|
1888
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "ev-table-footer-nav-icon" })
|
|
2069
1889
|
}
|
|
2070
1890
|
),
|
|
2071
1891
|
/* @__PURE__ */ jsx(
|
|
@@ -2073,10 +1893,10 @@ function PaginationFooter({
|
|
|
2073
1893
|
{
|
|
2074
1894
|
variant: "ghost",
|
|
2075
1895
|
size: "icon",
|
|
2076
|
-
className: "
|
|
1896
|
+
className: "ev-table-footer-nav-btn",
|
|
2077
1897
|
disabled: currentPage >= totalPages,
|
|
2078
1898
|
onClick: () => onPageChange(currentPage + 1),
|
|
2079
|
-
children: /* @__PURE__ */ jsx(ChevronRight, { className: "
|
|
1899
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "ev-table-footer-nav-icon" })
|
|
2080
1900
|
}
|
|
2081
1901
|
)
|
|
2082
1902
|
] })
|
|
@@ -2086,10 +1906,10 @@ function PaginationFooter({
|
|
|
2086
1906
|
function ColumnVisibilityMenu({ table, label }) {
|
|
2087
1907
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2088
1908
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", children: [
|
|
2089
|
-
/* @__PURE__ */ jsx(Settings2, { className: "
|
|
1909
|
+
/* @__PURE__ */ jsx(Settings2, { className: "ev-cv-icon" }),
|
|
2090
1910
|
label
|
|
2091
1911
|
] }) }),
|
|
2092
|
-
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "
|
|
1912
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "ev-cv-menu", children: table.getAllColumns().filter((col) => col.getCanHide() && col.id !== "_select").map((col) => {
|
|
2093
1913
|
const rawHeader = col.columnDef.header;
|
|
2094
1914
|
const headerLabel = typeof rawHeader === "string" && rawHeader.trim().length > 0 ? rawHeader : col.id;
|
|
2095
1915
|
return /* @__PURE__ */ jsx(
|
|
@@ -2097,7 +1917,7 @@ function ColumnVisibilityMenu({ table, label }) {
|
|
|
2097
1917
|
{
|
|
2098
1918
|
checked: col.getIsVisible(),
|
|
2099
1919
|
onCheckedChange: (v) => col.toggleVisibility(!!v),
|
|
2100
|
-
className: "
|
|
1920
|
+
className: "ev-cv-item",
|
|
2101
1921
|
children: headerLabel
|
|
2102
1922
|
},
|
|
2103
1923
|
col.id
|
|
@@ -2707,7 +2527,7 @@ function EasyVisionTable(props) {
|
|
|
2707
2527
|
}
|
|
2708
2528
|
}, [totalCount, itemsPerPage, page, paginationMode, patch, isApi]);
|
|
2709
2529
|
return /* @__PURE__ */ jsx(NamespaceProvider, { fullId, children: /* @__PURE__ */ jsxs("div", { className, children: [
|
|
2710
|
-
multifilter && /* @__PURE__ */ jsx("div", { className: "
|
|
2530
|
+
multifilter && /* @__PURE__ */ jsx("div", { className: "ev-table-multifilter", children: /* @__PURE__ */ jsx(
|
|
2711
2531
|
EasyVisionMultifilter,
|
|
2712
2532
|
{
|
|
2713
2533
|
...multifilter,
|
|
@@ -2715,9 +2535,9 @@ function EasyVisionTable(props) {
|
|
|
2715
2535
|
onPerform: handlePerform
|
|
2716
2536
|
}
|
|
2717
2537
|
) }),
|
|
2718
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
2719
|
-
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxs("div", { className: "
|
|
2720
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
2538
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-card", children: [
|
|
2539
|
+
(toolbarLeft || toolbarRight || enableRowSelection || showColumnVisibility) && /* @__PURE__ */ jsxs("div", { className: "ev-table-toolbar", children: [
|
|
2540
|
+
/* @__PURE__ */ jsx("div", { className: "ev-table-toolbar-section", children: toolbarLeft }),
|
|
2721
2541
|
enableRowSelection && (() => {
|
|
2722
2542
|
const isAllScope = selection.scope === "all";
|
|
2723
2543
|
const pageCount = isAllScope ? 0 : Object.keys(selection.ids ?? {}).length;
|
|
@@ -2727,25 +2547,25 @@ function EasyVisionTable(props) {
|
|
|
2727
2547
|
) : null;
|
|
2728
2548
|
const allCount = isAllScope ? eagerCount ?? Math.max(0, totalCount - Object.keys(selection.exceptIds ?? {}).length) : 0;
|
|
2729
2549
|
if (!isAllScope && pageCount === 0) return null;
|
|
2730
|
-
return /* @__PURE__ */ jsxs("div", { className: "
|
|
2731
|
-
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsx(Loader2, { className: "
|
|
2732
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
2550
|
+
return /* @__PURE__ */ jsxs("div", { className: "ev-table-sel-banner", children: [
|
|
2551
|
+
isEagerWildcard && isResolvingEager && /* @__PURE__ */ jsx(Loader2, { className: "ev-table-sel-banner-spinner" }),
|
|
2552
|
+
/* @__PURE__ */ jsx("span", { className: "ev-table-sel-banner-text", children: isAllScope ? isEagerWildcard && isResolvingEager ? `${labels.loading}\u2026` : labels.selectedAllBanner(allCount) : labels.selectedCountBanner(pageCount) }),
|
|
2733
2553
|
/* @__PURE__ */ jsxs(
|
|
2734
2554
|
Button,
|
|
2735
2555
|
{
|
|
2736
2556
|
variant: "ghost",
|
|
2737
2557
|
size: "sm",
|
|
2738
2558
|
onClick: () => onScopeChange("page"),
|
|
2739
|
-
className: "
|
|
2559
|
+
className: "ev-table-clear-btn",
|
|
2740
2560
|
children: [
|
|
2741
|
-
/* @__PURE__ */ jsx(X, { className: "
|
|
2561
|
+
/* @__PURE__ */ jsx(X, { className: "ev-table-clear-icon" }),
|
|
2742
2562
|
labels.clearSelection
|
|
2743
2563
|
]
|
|
2744
2564
|
}
|
|
2745
2565
|
)
|
|
2746
2566
|
] });
|
|
2747
2567
|
})(),
|
|
2748
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
2568
|
+
/* @__PURE__ */ jsxs("div", { className: "ev-table-toolbar-section", children: [
|
|
2749
2569
|
toolbarRight,
|
|
2750
2570
|
showColumnVisibility && /* @__PURE__ */ jsx(ColumnVisibilityMenu, { table: tableInstance, label: labels.customizeColumns })
|
|
2751
2571
|
] })
|
|
@@ -2753,18 +2573,18 @@ function EasyVisionTable(props) {
|
|
|
2753
2573
|
/* @__PURE__ */ jsx(
|
|
2754
2574
|
"div",
|
|
2755
2575
|
{
|
|
2756
|
-
className: "easyvision-table-scroll
|
|
2576
|
+
className: "easyvision-table-scroll",
|
|
2757
2577
|
style: maxBodyHeight !== void 0 ? {
|
|
2758
2578
|
maxHeight: typeof maxBodyHeight === "number" ? `${maxBodyHeight}px` : maxBodyHeight
|
|
2759
2579
|
} : void 0,
|
|
2760
|
-
children: /* @__PURE__ */ jsxs("table", { className: "
|
|
2580
|
+
children: /* @__PURE__ */ jsxs("table", { className: "ev-table", children: [
|
|
2761
2581
|
/* @__PURE__ */ jsx(
|
|
2762
2582
|
TableHeader,
|
|
2763
2583
|
{
|
|
2764
|
-
className: maxBodyHeight !== void 0 ? "
|
|
2584
|
+
className: maxBodyHeight !== void 0 ? "ev-table-thead-sticky" : void 0,
|
|
2765
2585
|
children: tableInstance.getHeaderGroups().map((hg) => /* @__PURE__ */ jsx(TableRow, { children: hg.headers.map((header) => {
|
|
2766
2586
|
if (header.column.id === "_select" && enableRowSelection) {
|
|
2767
|
-
return /* @__PURE__ */ jsx(TableHead, { className: "
|
|
2587
|
+
return /* @__PURE__ */ jsx(TableHead, { className: "ev-table-th-checkbox", children: /* @__PURE__ */ jsx(
|
|
2768
2588
|
SelectAllControl,
|
|
2769
2589
|
{
|
|
2770
2590
|
scope: selection.scope,
|
|
@@ -2789,19 +2609,17 @@ function EasyVisionTable(props) {
|
|
|
2789
2609
|
TableHead,
|
|
2790
2610
|
{
|
|
2791
2611
|
style: headerWidthStyle,
|
|
2792
|
-
className:
|
|
2793
|
-
"relative",
|
|
2794
|
-
colMeta.largeScreensOnly ? "hidden lg:table-cell" : ""
|
|
2795
|
-
].filter(Boolean).join(" "),
|
|
2612
|
+
className: colMeta.largeScreensOnly ? "ev-table-large-only" : void 0,
|
|
2796
2613
|
children: [
|
|
2797
2614
|
header.isPlaceholder ? null : sortable ? /* @__PURE__ */ jsxs(
|
|
2798
2615
|
"button",
|
|
2799
2616
|
{
|
|
2800
|
-
|
|
2617
|
+
type: "button",
|
|
2618
|
+
className: "ev-table-sort-btn",
|
|
2801
2619
|
onClick: header.column.getToggleSortingHandler(),
|
|
2802
2620
|
children: [
|
|
2803
2621
|
flexRender(header.column.columnDef.header, header.getContext()),
|
|
2804
|
-
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "
|
|
2622
|
+
header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "ev-table-sort-icon" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { className: "ev-table-sort-icon" }) : /* @__PURE__ */ jsx(ArrowUpDown, { className: "ev-table-sort-icon ev-table-sort-icon-inactive" })
|
|
2805
2623
|
]
|
|
2806
2624
|
}
|
|
2807
2625
|
) : flexRender(header.column.columnDef.header, header.getContext()),
|
|
@@ -2815,11 +2633,8 @@ function EasyVisionTable(props) {
|
|
|
2815
2633
|
"aria-orientation": "vertical",
|
|
2816
2634
|
"aria-label": "Resize column",
|
|
2817
2635
|
className: [
|
|
2818
|
-
"
|
|
2819
|
-
|
|
2820
|
-
"after:h-1/2 after:w-px after:bg-border after:transition-all",
|
|
2821
|
-
"hover:after:w-1.5 hover:after:h-full hover:after:top-0 hover:after:translate-y-0 hover:after:bg-primary/30",
|
|
2822
|
-
header.column.getIsResizing() ? "after:!w-1.5 after:!h-full after:!top-0 after:!translate-y-0 after:!bg-primary/60" : ""
|
|
2636
|
+
"ev-resize-handle",
|
|
2637
|
+
header.column.getIsResizing() ? "is-resizing" : ""
|
|
2823
2638
|
].filter(Boolean).join(" ")
|
|
2824
2639
|
}
|
|
2825
2640
|
)
|
|
@@ -2830,8 +2645,8 @@ function EasyVisionTable(props) {
|
|
|
2830
2645
|
}) }, hg.id))
|
|
2831
2646
|
}
|
|
2832
2647
|
),
|
|
2833
|
-
/* @__PURE__ */ jsx(TableBody, { children: isLoading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: allColumns.length, className: "
|
|
2834
|
-
/* @__PURE__ */ jsx("p", { className: "
|
|
2648
|
+
/* @__PURE__ */ jsx(TableBody, { children: isLoading ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: allColumns.length, className: "ev-table-empty-cell", children: /* @__PURE__ */ jsx("div", { className: "ev-table-spinner-wrapper", children: /* @__PURE__ */ jsx(Loader2, { className: "ev-table-loading-spinner" }) }) }) }) : tableInstance.getRowModel().rows.length === 0 ? /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(TableCell, { colSpan: allColumns.length, className: "ev-table-empty-cell", children: /* @__PURE__ */ jsxs("div", { className: "ev-table-empty-state", children: [
|
|
2649
|
+
/* @__PURE__ */ jsx("p", { className: "ev-table-empty-text", children: emptyMessage ?? labels.noData }),
|
|
2835
2650
|
emptyAction
|
|
2836
2651
|
] }) }) }) : tableInstance.getRowModel().rows.map((row) => {
|
|
2837
2652
|
const rid = rowIdOf(row.original);
|
|
@@ -2842,10 +2657,7 @@ function EasyVisionTable(props) {
|
|
|
2842
2657
|
{
|
|
2843
2658
|
"data-state": row.getIsSelected() || isAllSelected ? "selected" : void 0,
|
|
2844
2659
|
"data-highlighted": highlighted ? "true" : void 0,
|
|
2845
|
-
className:
|
|
2846
|
-
onRowClick ? "cursor-pointer" : "",
|
|
2847
|
-
highlighted ? "bg-muted/50" : ""
|
|
2848
|
-
].filter(Boolean).join(" "),
|
|
2660
|
+
className: onRowClick ? "ev-table-row-clickable" : void 0,
|
|
2849
2661
|
onClick: () => onRowClick?.(row.original),
|
|
2850
2662
|
children: row.getVisibleCells().map((cell) => {
|
|
2851
2663
|
if (cell.column.id === "_select" && selection.scope === "all") {
|
|
@@ -2885,13 +2697,13 @@ function EasyVisionTable(props) {
|
|
|
2885
2697
|
{
|
|
2886
2698
|
style: cellWidthStyle,
|
|
2887
2699
|
className: [
|
|
2888
|
-
cellMeta.largeScreensOnly ? "
|
|
2889
|
-
cellMeta.truncate ? "
|
|
2890
|
-
].filter(Boolean).join(" "),
|
|
2700
|
+
cellMeta.largeScreensOnly ? "ev-table-large-only" : "",
|
|
2701
|
+
cellMeta.truncate ? "ev-table-cell-truncate" : ""
|
|
2702
|
+
].filter(Boolean).join(" ") || void 0,
|
|
2891
2703
|
children: cellMeta.truncate ? /* @__PURE__ */ jsx(
|
|
2892
2704
|
"div",
|
|
2893
2705
|
{
|
|
2894
|
-
className: "truncate",
|
|
2706
|
+
className: "ev-table-cell-truncate-inner",
|
|
2895
2707
|
title: titleAttr,
|
|
2896
2708
|
children: rendered
|
|
2897
2709
|
}
|