@structyl/styled 1.0.0 → 1.1.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/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/index.cjs +216 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -33
- package/dist/index.d.ts +43 -33
- package/dist/index.mjs +216 -96
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -6
package/dist/index.mjs
CHANGED
|
@@ -284,25 +284,30 @@ var buttonVariants = tv({
|
|
|
284
284
|
],
|
|
285
285
|
defaultVariants: { variant: "default", size: "default" }
|
|
286
286
|
});
|
|
287
|
-
var ButtonSpinner =
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
className: cn("animate-spin", className),
|
|
291
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
292
|
-
fill: "none",
|
|
293
|
-
viewBox: "0 0 24 24",
|
|
294
|
-
"aria-hidden": true
|
|
295
|
-
},
|
|
296
|
-
/* @__PURE__ */ React44.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
297
|
-
/* @__PURE__ */ React44.createElement(
|
|
298
|
-
"path",
|
|
287
|
+
var ButtonSpinner = React44.forwardRef(
|
|
288
|
+
({ className, ...props }, ref) => /* @__PURE__ */ React44.createElement(
|
|
289
|
+
"svg",
|
|
299
290
|
{
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
291
|
+
ref,
|
|
292
|
+
className: cn("animate-spin", className),
|
|
293
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
294
|
+
fill: "none",
|
|
295
|
+
viewBox: "0 0 24 24",
|
|
296
|
+
"aria-hidden": true,
|
|
297
|
+
...props
|
|
298
|
+
},
|
|
299
|
+
/* @__PURE__ */ React44.createElement("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
300
|
+
/* @__PURE__ */ React44.createElement(
|
|
301
|
+
"path",
|
|
302
|
+
{
|
|
303
|
+
className: "opacity-75",
|
|
304
|
+
fill: "currentColor",
|
|
305
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
|
|
306
|
+
}
|
|
307
|
+
)
|
|
304
308
|
)
|
|
305
309
|
);
|
|
310
|
+
ButtonSpinner.displayName = "ButtonSpinner";
|
|
306
311
|
var Button = React44.forwardRef(
|
|
307
312
|
({ className, variant, size, color, asChild = false, loading = false, loadingText, leftIcon, rightIcon, disabled, children, ...props }, ref) => {
|
|
308
313
|
const isDisabled = disabled || loading;
|
|
@@ -871,19 +876,27 @@ var skeletonVariants = tv({
|
|
|
871
876
|
var Skeleton = React44.forwardRef(
|
|
872
877
|
({ className, variant, shape, width, height, lines, style, ...props }, ref) => {
|
|
873
878
|
if (lines && lines > 1) {
|
|
874
|
-
return /* @__PURE__ */ React44.createElement(
|
|
879
|
+
return /* @__PURE__ */ React44.createElement(
|
|
875
880
|
"div",
|
|
876
881
|
{
|
|
877
|
-
|
|
878
|
-
"
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
882
|
+
ref,
|
|
883
|
+
className: cn("flex flex-col gap-2", className),
|
|
884
|
+
style,
|
|
885
|
+
...props
|
|
886
|
+
},
|
|
887
|
+
Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ React44.createElement(
|
|
888
|
+
"div",
|
|
889
|
+
{
|
|
890
|
+
key: i,
|
|
891
|
+
"aria-hidden": true,
|
|
892
|
+
className: cn(
|
|
893
|
+
skeletonVariants({ variant, shape: "text" }),
|
|
894
|
+
i === lines - 1 && "w-4/5"
|
|
895
|
+
),
|
|
896
|
+
style: { width: i === lines - 1 ? void 0 : width, height }
|
|
897
|
+
}
|
|
898
|
+
))
|
|
899
|
+
);
|
|
887
900
|
}
|
|
888
901
|
return /* @__PURE__ */ React44.createElement(
|
|
889
902
|
"div",
|
|
@@ -2066,7 +2079,8 @@ var Pagination = React44.forwardRef(
|
|
|
2066
2079
|
onPageSizeChange,
|
|
2067
2080
|
pageSizeOptions = [10, 25, 50, 100],
|
|
2068
2081
|
showTotalRows = true,
|
|
2069
|
-
className
|
|
2082
|
+
className,
|
|
2083
|
+
...rest
|
|
2070
2084
|
}, ref) => {
|
|
2071
2085
|
const totalPages = Math.max(pageCount, 1);
|
|
2072
2086
|
const canPrev = page > 1;
|
|
@@ -2086,7 +2100,8 @@ var Pagination = React44.forwardRef(
|
|
|
2086
2100
|
className: cn(
|
|
2087
2101
|
"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",
|
|
2088
2102
|
className
|
|
2089
|
-
)
|
|
2103
|
+
),
|
|
2104
|
+
...rest
|
|
2090
2105
|
},
|
|
2091
2106
|
/* @__PURE__ */ React44.createElement("div", { className: "text-muted-foreground flex flex-wrap items-center gap-4 text-sm" }, showTotalRows && totalRows !== void 0 && /* @__PURE__ */ React44.createElement("span", { className: "tabular-nums" }, totalRows, " total rows"), onPageSizeChange && /* @__PURE__ */ React44.createElement("label", { className: "flex items-center gap-2" }, /* @__PURE__ */ React44.createElement("span", { className: "whitespace-nowrap" }, "Rows per page"), /* @__PURE__ */ React44.createElement(
|
|
2092
2107
|
Root12,
|
|
@@ -2636,10 +2651,11 @@ var Tooltip = ({
|
|
|
2636
2651
|
variant,
|
|
2637
2652
|
maxWidth,
|
|
2638
2653
|
arrow,
|
|
2639
|
-
disabled
|
|
2654
|
+
disabled,
|
|
2655
|
+
...triggerProps
|
|
2640
2656
|
}) => {
|
|
2641
2657
|
if (disabled) return /* @__PURE__ */ React44.createElement(React44.Fragment, null, children);
|
|
2642
|
-
return /* @__PURE__ */ React44.createElement(Tooltip$1.Provider, { delayDuration, skipDelayDuration }, /* @__PURE__ */ React44.createElement(Root18, null, /* @__PURE__ */ React44.createElement(Trigger10, { asChild: true }, children), /* @__PURE__ */ React44.createElement(Content12, { side, align, variant, maxWidth, arrow }, label)));
|
|
2658
|
+
return /* @__PURE__ */ React44.createElement(Tooltip$1.Provider, { delayDuration, skipDelayDuration }, /* @__PURE__ */ React44.createElement(Root18, null, /* @__PURE__ */ React44.createElement(Trigger10, { asChild: true, ...triggerProps }, children), /* @__PURE__ */ React44.createElement(Content12, { side, align, variant, maxWidth, arrow }, label)));
|
|
2643
2659
|
};
|
|
2644
2660
|
Tooltip.displayName = "Tooltip";
|
|
2645
2661
|
|
|
@@ -2901,7 +2917,8 @@ function Toaster({
|
|
|
2901
2917
|
horizontal: defaultH = "right",
|
|
2902
2918
|
vertical: defaultV = "bottom",
|
|
2903
2919
|
maxToasts = 5,
|
|
2904
|
-
className
|
|
2920
|
+
className,
|
|
2921
|
+
...props
|
|
2905
2922
|
}) {
|
|
2906
2923
|
const { toasts, remove: remove2 } = useToast();
|
|
2907
2924
|
const groups = React44.useMemo(() => {
|
|
@@ -2945,6 +2962,7 @@ function Toaster({
|
|
|
2945
2962
|
}), /* @__PURE__ */ React44.createElement(
|
|
2946
2963
|
Toast.Viewport,
|
|
2947
2964
|
{
|
|
2965
|
+
...props,
|
|
2948
2966
|
className: cn(
|
|
2949
2967
|
"fixed z-[100] flex max-h-screen w-full p-4 md:max-w-[420px] gap-2",
|
|
2950
2968
|
getViewportClasses(h, v),
|
|
@@ -5438,8 +5456,10 @@ var DatePickerRoot = React44.forwardRef(
|
|
|
5438
5456
|
loading,
|
|
5439
5457
|
showOutsideDays,
|
|
5440
5458
|
showDaysOutsideCurrentMonth,
|
|
5459
|
+
rootProps,
|
|
5441
5460
|
...props
|
|
5442
5461
|
}, ref) => {
|
|
5462
|
+
const { className: rootClassName, ...restRootProps } = rootProps ?? {};
|
|
5443
5463
|
const generatedId = React44.useId();
|
|
5444
5464
|
const triggerId = id ?? generatedId;
|
|
5445
5465
|
const helperId = helperText ? `${triggerId}-helper` : void 0;
|
|
@@ -5453,36 +5473,46 @@ var DatePickerRoot = React44.forwardRef(
|
|
|
5453
5473
|
locale,
|
|
5454
5474
|
loading
|
|
5455
5475
|
},
|
|
5456
|
-
/* @__PURE__ */ React44.createElement(
|
|
5457
|
-
|
|
5476
|
+
/* @__PURE__ */ React44.createElement(
|
|
5477
|
+
"div",
|
|
5458
5478
|
{
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
autoFocus,
|
|
5463
|
-
"aria-invalid": error || void 0,
|
|
5464
|
-
"aria-describedby": helperId,
|
|
5465
|
-
"aria-label": labelText ?? "Choose date",
|
|
5466
|
-
className: triggerClassName
|
|
5479
|
+
...restRootProps,
|
|
5480
|
+
ref,
|
|
5481
|
+
className: cn("grid w-fit gap-1.5", className, rootClassName)
|
|
5467
5482
|
},
|
|
5483
|
+
label ? /* @__PURE__ */ React44.createElement("label", { className: "text-sm font-medium text-foreground", htmlFor: triggerId }, label, required ? /* @__PURE__ */ React44.createElement("span", { "aria-hidden": "true" }, " *") : null) : null,
|
|
5468
5484
|
/* @__PURE__ */ React44.createElement(
|
|
5469
|
-
|
|
5485
|
+
Trigger17,
|
|
5470
5486
|
{
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5487
|
+
id: triggerId,
|
|
5488
|
+
name,
|
|
5489
|
+
disabled: disabled || disableOpenPicker,
|
|
5490
|
+
autoFocus,
|
|
5491
|
+
"aria-invalid": error || void 0,
|
|
5492
|
+
"aria-describedby": helperId,
|
|
5493
|
+
"aria-label": labelText ?? "Choose date",
|
|
5494
|
+
className: triggerClassName
|
|
5495
|
+
},
|
|
5496
|
+
/* @__PURE__ */ React44.createElement(
|
|
5497
|
+
DatePicker$1.Value,
|
|
5498
|
+
{
|
|
5499
|
+
locale,
|
|
5500
|
+
format,
|
|
5501
|
+
formatDensity,
|
|
5502
|
+
placeholder: placeholder ?? "MM/DD/YYYY"
|
|
5503
|
+
}
|
|
5504
|
+
)
|
|
5505
|
+
),
|
|
5506
|
+
helperText ? /* @__PURE__ */ React44.createElement(
|
|
5507
|
+
Typography2,
|
|
5508
|
+
{
|
|
5509
|
+
id: helperId,
|
|
5510
|
+
variant: "muted",
|
|
5511
|
+
className: cn("text-xs", error && "text-destructive")
|
|
5512
|
+
},
|
|
5513
|
+
helperText
|
|
5514
|
+
) : null
|
|
5515
|
+
),
|
|
5486
5516
|
/* @__PURE__ */ React44.createElement(Content20, { className: contentClassName }, loading ? /* @__PURE__ */ React44.createElement("div", { className: "p-4 text-sm text-muted-foreground" }, /* @__PURE__ */ React44.createElement(Loading2, null)) : /* @__PURE__ */ React44.createElement(
|
|
5487
5517
|
Calendar2,
|
|
5488
5518
|
{
|
|
@@ -5531,7 +5561,9 @@ var Segment = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
5531
5561
|
));
|
|
5532
5562
|
Segment.displayName = "TimePicker.Segment";
|
|
5533
5563
|
var Value4 = TimePicker$1.Value;
|
|
5534
|
-
var Separator10 =
|
|
5564
|
+
var Separator10 = React44.forwardRef(
|
|
5565
|
+
({ className, children = ":", ...props }, ref) => /* @__PURE__ */ React44.createElement("span", { ref, className: cn("text-muted-foreground", className), ...props }, children)
|
|
5566
|
+
);
|
|
5535
5567
|
Separator10.displayName = "TimePicker.Separator";
|
|
5536
5568
|
var TimePickerPanel = React44.forwardRef(
|
|
5537
5569
|
({
|
|
@@ -5849,8 +5881,10 @@ var TimePickerRoot = React44.forwardRef(
|
|
|
5849
5881
|
locale,
|
|
5850
5882
|
referenceDate,
|
|
5851
5883
|
views,
|
|
5884
|
+
rootProps,
|
|
5852
5885
|
...props
|
|
5853
5886
|
}, ref) => {
|
|
5887
|
+
const { className: rootClassName, ...restRootProps } = rootProps ?? {};
|
|
5854
5888
|
const generatedId = React44.useId();
|
|
5855
5889
|
const triggerId = id ?? generatedId;
|
|
5856
5890
|
const helperId = helperText ? `${triggerId}-helper` : void 0;
|
|
@@ -5900,7 +5934,7 @@ var TimePickerRoot = React44.forwardRef(
|
|
|
5900
5934
|
shouldDisableTime
|
|
5901
5935
|
]
|
|
5902
5936
|
);
|
|
5903
|
-
return /* @__PURE__ */ React44.createElement(Root17, { open, onOpenChange: setOpen }, /* @__PURE__ */ React44.createElement("div", { ref, className: cn("grid w-fit gap-1.5", className) }, label ? /* @__PURE__ */ React44.createElement("label", { className: "text-sm font-medium text-foreground", htmlFor: triggerId, suppressHydrationWarning: true }, label, required ? /* @__PURE__ */ React44.createElement("span", { "aria-hidden": "true" }, " *") : null) : null, /* @__PURE__ */ React44.createElement(Trigger9, { asChild: true }, /* @__PURE__ */ React44.createElement(
|
|
5937
|
+
return /* @__PURE__ */ React44.createElement(Root17, { open, onOpenChange: setOpen }, /* @__PURE__ */ React44.createElement("div", { ...restRootProps, ref, className: cn("grid w-fit gap-1.5", className, rootClassName) }, label ? /* @__PURE__ */ React44.createElement("label", { className: "text-sm font-medium text-foreground", htmlFor: triggerId, suppressHydrationWarning: true }, label, required ? /* @__PURE__ */ React44.createElement("span", { "aria-hidden": "true" }, " *") : null) : null, /* @__PURE__ */ React44.createElement(Trigger9, { asChild: true }, /* @__PURE__ */ React44.createElement(
|
|
5904
5938
|
Button,
|
|
5905
5939
|
{
|
|
5906
5940
|
id: triggerId,
|
|
@@ -6380,42 +6414,53 @@ var DateRangePickerRoot = React44.forwardRef(
|
|
|
6380
6414
|
shortcutsClassName,
|
|
6381
6415
|
showOutsideDays,
|
|
6382
6416
|
showDaysOutsideCurrentMonth,
|
|
6417
|
+
rootProps,
|
|
6383
6418
|
...props
|
|
6384
6419
|
}, ref) => {
|
|
6385
6420
|
const generatedId = React44.useId();
|
|
6386
6421
|
const triggerId = id ?? generatedId;
|
|
6387
6422
|
const helperId = helperText ? `${triggerId}-helper` : void 0;
|
|
6388
6423
|
const labelText = typeof label === "string" ? label : void 0;
|
|
6389
|
-
return /* @__PURE__ */ React44.createElement(Root33, { ...props, disabled, readOnly, locale, loading }, /* @__PURE__ */ React44.createElement(
|
|
6390
|
-
|
|
6424
|
+
return /* @__PURE__ */ React44.createElement(Root33, { ...props, disabled, readOnly, locale, loading }, /* @__PURE__ */ React44.createElement(
|
|
6425
|
+
"div",
|
|
6391
6426
|
{
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
"aria-invalid": error || void 0,
|
|
6396
|
-
"aria-describedby": helperId,
|
|
6397
|
-
"aria-label": labelText ?? "Choose date range",
|
|
6398
|
-
className: triggerClassName
|
|
6427
|
+
ref,
|
|
6428
|
+
...rootProps,
|
|
6429
|
+
className: cn("grid w-fit gap-1.5", className, rootProps?.className)
|
|
6399
6430
|
},
|
|
6431
|
+
label ? /* @__PURE__ */ React44.createElement("label", { className: "text-sm font-medium text-foreground", htmlFor: triggerId }, label, required ? /* @__PURE__ */ React44.createElement("span", { "aria-hidden": "true" }, " *") : null) : null,
|
|
6400
6432
|
/* @__PURE__ */ React44.createElement(
|
|
6401
|
-
|
|
6433
|
+
Trigger18,
|
|
6402
6434
|
{
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6435
|
+
id: triggerId,
|
|
6436
|
+
name,
|
|
6437
|
+
disabled,
|
|
6438
|
+
"aria-invalid": error || void 0,
|
|
6439
|
+
"aria-describedby": helperId,
|
|
6440
|
+
"aria-label": labelText ?? "Choose date range",
|
|
6441
|
+
className: triggerClassName
|
|
6442
|
+
},
|
|
6443
|
+
/* @__PURE__ */ React44.createElement(
|
|
6444
|
+
DateRangePicker$1.Value,
|
|
6445
|
+
{
|
|
6446
|
+
locale,
|
|
6447
|
+
format,
|
|
6448
|
+
formatDensity,
|
|
6449
|
+
separator,
|
|
6450
|
+
placeholder: placeholder ?? "MM/DD/YYYY - MM/DD/YYYY"
|
|
6451
|
+
}
|
|
6452
|
+
)
|
|
6453
|
+
),
|
|
6454
|
+
helperText ? /* @__PURE__ */ React44.createElement(
|
|
6455
|
+
Typography2,
|
|
6456
|
+
{
|
|
6457
|
+
id: helperId,
|
|
6458
|
+
variant: "muted",
|
|
6459
|
+
className: cn("text-xs", error && "text-destructive")
|
|
6460
|
+
},
|
|
6461
|
+
helperText
|
|
6462
|
+
) : null
|
|
6463
|
+
), /* @__PURE__ */ React44.createElement(
|
|
6419
6464
|
Content21,
|
|
6420
6465
|
{
|
|
6421
6466
|
calendars,
|
|
@@ -6497,7 +6542,9 @@ var Segment2 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6497
6542
|
}
|
|
6498
6543
|
));
|
|
6499
6544
|
Segment2.displayName = "DateTimePicker.Segment";
|
|
6500
|
-
var Separator11 =
|
|
6545
|
+
var Separator11 = React44.forwardRef(
|
|
6546
|
+
({ className, children = ":", ...props }, ref) => /* @__PURE__ */ React44.createElement("span", { ref, className: cn("text-muted-foreground", className), ...props }, children)
|
|
6547
|
+
);
|
|
6501
6548
|
Separator11.displayName = "DateTimePicker.Separator";
|
|
6502
6549
|
var Trigger19 = React44.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React44.createElement(
|
|
6503
6550
|
DateTimePicker$1.Trigger,
|
|
@@ -6585,6 +6632,64 @@ var Content22 = React44.forwardRef(
|
|
|
6585
6632
|
))
|
|
6586
6633
|
);
|
|
6587
6634
|
Content22.displayName = "DateTimePicker.Content";
|
|
6635
|
+
var DATE_TIME_PICKER_ROOT_CONFIG_KEYS = [
|
|
6636
|
+
"value",
|
|
6637
|
+
"defaultValue",
|
|
6638
|
+
"onChange",
|
|
6639
|
+
"onValueChange",
|
|
6640
|
+
"onAccept",
|
|
6641
|
+
"onError",
|
|
6642
|
+
"open",
|
|
6643
|
+
"defaultOpen",
|
|
6644
|
+
"onOpenChange",
|
|
6645
|
+
"onOpen",
|
|
6646
|
+
"onClose",
|
|
6647
|
+
"closeOnSelect",
|
|
6648
|
+
"minDate",
|
|
6649
|
+
"maxDate",
|
|
6650
|
+
"minDateTime",
|
|
6651
|
+
"maxDateTime",
|
|
6652
|
+
"disablePast",
|
|
6653
|
+
"disableFuture",
|
|
6654
|
+
"disabledDays",
|
|
6655
|
+
"shouldDisableDate",
|
|
6656
|
+
"shouldDisableMonth",
|
|
6657
|
+
"shouldDisableYear",
|
|
6658
|
+
"weekStartsOn",
|
|
6659
|
+
"ampmInClock",
|
|
6660
|
+
"dayOfWeekFormatter",
|
|
6661
|
+
"desktopModeMediaQuery",
|
|
6662
|
+
"disableHighlightToday",
|
|
6663
|
+
"disableIgnoringDatePartForTimeValidation",
|
|
6664
|
+
"displayWeekNumber",
|
|
6665
|
+
"fixedWeekNumber",
|
|
6666
|
+
"formatDensity",
|
|
6667
|
+
"inputRef",
|
|
6668
|
+
"keepOpenDuringFieldFocus",
|
|
6669
|
+
"localeText",
|
|
6670
|
+
"monthsPerRow",
|
|
6671
|
+
"onMonthChange",
|
|
6672
|
+
"onSelectedSectionsChange",
|
|
6673
|
+
"onViewChange",
|
|
6674
|
+
"onYearChange",
|
|
6675
|
+
"openTo",
|
|
6676
|
+
"orientation",
|
|
6677
|
+
"reduceAnimations",
|
|
6678
|
+
"referenceDate",
|
|
6679
|
+
"renderLoading",
|
|
6680
|
+
"selectedSections",
|
|
6681
|
+
"defaultSelectedSections",
|
|
6682
|
+
"slotProps",
|
|
6683
|
+
"slots",
|
|
6684
|
+
"sx",
|
|
6685
|
+
"thresholdToRenderTimeInASingleColumn",
|
|
6686
|
+
"timezone",
|
|
6687
|
+
"view",
|
|
6688
|
+
"defaultView",
|
|
6689
|
+
"viewRenderers",
|
|
6690
|
+
"yearsOrder",
|
|
6691
|
+
"yearsPerRow"
|
|
6692
|
+
];
|
|
6588
6693
|
var DateTimePickerRoot = React44.forwardRef(
|
|
6589
6694
|
({
|
|
6590
6695
|
className,
|
|
@@ -6622,10 +6727,20 @@ var DateTimePickerRoot = React44.forwardRef(
|
|
|
6622
6727
|
const helperId = helperText ? `${triggerId}-helper` : void 0;
|
|
6623
6728
|
const labelText = typeof label === "string" ? label : void 0;
|
|
6624
6729
|
const withSeconds = (timeSteps?.seconds ?? 0) > 0;
|
|
6730
|
+
const rootConfigKeys = new Set(DATE_TIME_PICKER_ROOT_CONFIG_KEYS);
|
|
6731
|
+
const rootConfigProps = {};
|
|
6732
|
+
const nativeDivProps = {};
|
|
6733
|
+
for (const [key, value] of Object.entries(props)) {
|
|
6734
|
+
if (rootConfigKeys.has(key)) {
|
|
6735
|
+
rootConfigProps[key] = value;
|
|
6736
|
+
} else {
|
|
6737
|
+
nativeDivProps[key] = value;
|
|
6738
|
+
}
|
|
6739
|
+
}
|
|
6625
6740
|
return /* @__PURE__ */ React44.createElement(
|
|
6626
6741
|
Root34,
|
|
6627
6742
|
{
|
|
6628
|
-
...
|
|
6743
|
+
...rootConfigProps,
|
|
6629
6744
|
disabled,
|
|
6630
6745
|
readOnly,
|
|
6631
6746
|
locale,
|
|
@@ -6639,7 +6754,7 @@ var DateTimePickerRoot = React44.forwardRef(
|
|
|
6639
6754
|
timeSteps,
|
|
6640
6755
|
views
|
|
6641
6756
|
},
|
|
6642
|
-
/* @__PURE__ */ React44.createElement("div", { ref, className: cn("grid w-fit gap-1.5", className) }, label ? /* @__PURE__ */ React44.createElement("label", { className: "text-sm font-medium text-foreground", htmlFor: triggerId, suppressHydrationWarning: true }, label, required ? /* @__PURE__ */ React44.createElement("span", { "aria-hidden": "true" }, " *") : null) : null, /* @__PURE__ */ React44.createElement(
|
|
6757
|
+
/* @__PURE__ */ React44.createElement("div", { ...nativeDivProps, ref, className: cn("grid w-fit gap-1.5", className) }, label ? /* @__PURE__ */ React44.createElement("label", { className: "text-sm font-medium text-foreground", htmlFor: triggerId, suppressHydrationWarning: true }, label, required ? /* @__PURE__ */ React44.createElement("span", { "aria-hidden": "true" }, " *") : null) : null, /* @__PURE__ */ React44.createElement(
|
|
6643
6758
|
Trigger19,
|
|
6644
6759
|
{
|
|
6645
6760
|
id: triggerId,
|
|
@@ -6808,7 +6923,7 @@ var Trigger20 = FileUpload.Trigger;
|
|
|
6808
6923
|
var Clear = FileUpload.Clear;
|
|
6809
6924
|
var List6 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React44.createElement(FileUpload.List, { ref, className: cn("mt-2 space-y-1", className), ...props }));
|
|
6810
6925
|
List6.displayName = "FileUpload.List";
|
|
6811
|
-
var Item13 = ({ file }) => /* @__PURE__ */ React44.createElement(FileUpload.Item, { file }, /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between gap-2 rounded-md border border-border bg-bg px-3 py-2 text-sm" }, /* @__PURE__ */ React44.createElement("span", { className: "truncate" }, file.name), /* @__PURE__ */ React44.createElement("span", { className: "text-muted-foreground" }, Math.round(file.size / 1024), " KB")));
|
|
6926
|
+
var Item13 = React44.forwardRef(({ file, children, ...props }, ref) => /* @__PURE__ */ React44.createElement(FileUpload.Item, { file, ref, ...props }, children ?? /* @__PURE__ */ React44.createElement("div", { className: "flex items-center justify-between gap-2 rounded-md border border-border bg-bg px-3 py-2 text-sm" }, /* @__PURE__ */ React44.createElement("span", { className: "truncate" }, file.name), /* @__PURE__ */ React44.createElement("span", { className: "text-muted-foreground" }, Math.round(file.size / 1024), " KB"))));
|
|
6812
6927
|
Item13.displayName = "FileUpload.Item";
|
|
6813
6928
|
var colorClassMap = {
|
|
6814
6929
|
primary: "text-primary",
|
|
@@ -7237,7 +7352,7 @@ var Input9 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
7237
7352
|
}
|
|
7238
7353
|
));
|
|
7239
7354
|
Input9.displayName = "TagsInput.Input";
|
|
7240
|
-
var Tag = ({ index, tag }) => /* @__PURE__ */ React44.createElement(TagsInput.Tag, { index }, /* @__PURE__ */ React44.createElement("span", { className: "inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs" }, tag, /* @__PURE__ */ React44.createElement(
|
|
7355
|
+
var Tag = ({ index, tag, ...rest }) => /* @__PURE__ */ React44.createElement(TagsInput.Tag, { index, ...rest }, /* @__PURE__ */ React44.createElement("span", { className: "inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-1 text-xs" }, tag, /* @__PURE__ */ React44.createElement(
|
|
7241
7356
|
"button",
|
|
7242
7357
|
{
|
|
7243
7358
|
type: "button",
|
|
@@ -7274,11 +7389,12 @@ var Textarea2 = React44.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
7274
7389
|
}
|
|
7275
7390
|
));
|
|
7276
7391
|
Textarea2.displayName = "Mentions.Textarea";
|
|
7277
|
-
var Suggestions = React44.forwardRef(({ className, children, ...
|
|
7392
|
+
var Suggestions = React44.forwardRef(({ items, container, className, children, ...rest }, ref) => /* @__PURE__ */ React44.createElement(Mentions.Suggestions, { items, container, disablePortal: true }, /* @__PURE__ */ React44.createElement(
|
|
7278
7393
|
"div",
|
|
7279
7394
|
{
|
|
7280
7395
|
ref,
|
|
7281
|
-
className: cn("absolute left-0 top-full z-50 mt-1 min-w-[8rem]", className)
|
|
7396
|
+
className: cn("absolute left-0 top-full z-50 mt-1 min-w-[8rem]", className),
|
|
7397
|
+
...rest
|
|
7282
7398
|
},
|
|
7283
7399
|
children
|
|
7284
7400
|
)));
|
|
@@ -7827,7 +7943,7 @@ var trendVariants = tv({
|
|
|
7827
7943
|
}
|
|
7828
7944
|
}
|
|
7829
7945
|
});
|
|
7830
|
-
var TrendBadge = ({ value, direction = "neutral", className }) => /* @__PURE__ */ React44.createElement("span", { className: cn(trendVariants({ direction }), className) }, direction === "up" && /* @__PURE__ */ React44.createElement("span", { "aria-hidden": true }, "\u2191"), direction === "down" && /* @__PURE__ */ React44.createElement("span", { "aria-hidden": true }, "\u2193"), direction === "neutral" && /* @__PURE__ */ React44.createElement("span", { "aria-hidden": true }, "\u2192"), value);
|
|
7946
|
+
var TrendBadge = ({ value, direction = "neutral", className, ...props }) => /* @__PURE__ */ React44.createElement("span", { className: cn(trendVariants({ direction }), className), ...props }, direction === "up" && /* @__PURE__ */ React44.createElement("span", { "aria-hidden": true }, "\u2191"), direction === "down" && /* @__PURE__ */ React44.createElement("span", { "aria-hidden": true }, "\u2193"), direction === "neutral" && /* @__PURE__ */ React44.createElement("span", { "aria-hidden": true }, "\u2192"), value);
|
|
7831
7947
|
var highlightClasses = {
|
|
7832
7948
|
primary: "border-primary/30 bg-primary/5",
|
|
7833
7949
|
secondary: "border-secondary/30 bg-secondary/5",
|
|
@@ -8135,7 +8251,9 @@ var Popconfirm = ({
|
|
|
8135
8251
|
disabled = false,
|
|
8136
8252
|
side = "top",
|
|
8137
8253
|
align = "center",
|
|
8138
|
-
loading = false
|
|
8254
|
+
loading = false,
|
|
8255
|
+
className,
|
|
8256
|
+
...rest
|
|
8139
8257
|
}) => {
|
|
8140
8258
|
const titleId = React44.useId();
|
|
8141
8259
|
const [internalOpen, setInternalOpen] = React44.useState(false);
|
|
@@ -8157,6 +8275,7 @@ var Popconfirm = ({
|
|
|
8157
8275
|
return /* @__PURE__ */ React44.createElement(Popover.Root, { open, onOpenChange: setOpen }, /* @__PURE__ */ React44.createElement(Popover.Trigger, { asChild: true }, children), /* @__PURE__ */ React44.createElement(Popover.Portal, null, /* @__PURE__ */ React44.createElement(
|
|
8158
8276
|
Popover.Content,
|
|
8159
8277
|
{
|
|
8278
|
+
...rest,
|
|
8160
8279
|
side,
|
|
8161
8280
|
align,
|
|
8162
8281
|
sideOffset: 8,
|
|
@@ -8165,7 +8284,8 @@ var Popconfirm = ({
|
|
|
8165
8284
|
"animate-in fade-in-0 zoom-in-95 duration-100",
|
|
8166
8285
|
"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
|
|
8167
8286
|
"data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1",
|
|
8168
|
-
"data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1"
|
|
8287
|
+
"data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
|
8288
|
+
className
|
|
8169
8289
|
),
|
|
8170
8290
|
"aria-labelledby": titleId,
|
|
8171
8291
|
onOpenAutoFocus: (e) => e.preventDefault()
|