@underverse-ui/underverse 1.0.16 → 1.0.18
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/index.cjs +177 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -8
- package/dist/index.d.ts +38 -8
- package/dist/index.js +177 -105
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -933,6 +933,7 @@ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
|
933
933
|
var Input = forwardRef3(
|
|
934
934
|
({
|
|
935
935
|
label,
|
|
936
|
+
labelClassName,
|
|
936
937
|
error,
|
|
937
938
|
description,
|
|
938
939
|
className,
|
|
@@ -1062,7 +1063,8 @@ var Input = forwardRef3(
|
|
|
1062
1063
|
"font-medium transition-colors duration-200",
|
|
1063
1064
|
// default color and highlight while any descendant focused
|
|
1064
1065
|
disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
|
|
1065
|
-
errMsg && "text-destructive"
|
|
1066
|
+
errMsg && "text-destructive",
|
|
1067
|
+
labelClassName
|
|
1066
1068
|
),
|
|
1067
1069
|
children: [
|
|
1068
1070
|
label,
|
|
@@ -1403,7 +1405,20 @@ var NumberInput = forwardRef3(
|
|
|
1403
1405
|
);
|
|
1404
1406
|
NumberInput.displayName = "NumberInput";
|
|
1405
1407
|
var Textarea = forwardRef3(
|
|
1406
|
-
({
|
|
1408
|
+
({
|
|
1409
|
+
label,
|
|
1410
|
+
labelClassName,
|
|
1411
|
+
error,
|
|
1412
|
+
description,
|
|
1413
|
+
variant = "default",
|
|
1414
|
+
resize = "vertical",
|
|
1415
|
+
counter = false,
|
|
1416
|
+
className,
|
|
1417
|
+
required,
|
|
1418
|
+
value,
|
|
1419
|
+
maxLength,
|
|
1420
|
+
...props
|
|
1421
|
+
}, ref) => {
|
|
1407
1422
|
const [isFocused, setIsFocused] = useState4(false);
|
|
1408
1423
|
const charCount = typeof value === "string" ? value.length : 0;
|
|
1409
1424
|
const variantStyles6 = {
|
|
@@ -1426,7 +1441,8 @@ var Textarea = forwardRef3(
|
|
|
1426
1441
|
className: cn(
|
|
1427
1442
|
"text-sm font-medium transition-colors duration-200",
|
|
1428
1443
|
isFocused ? "text-primary" : "text-foreground",
|
|
1429
|
-
error && "text-destructive"
|
|
1444
|
+
error && "text-destructive",
|
|
1445
|
+
labelClassName
|
|
1430
1446
|
),
|
|
1431
1447
|
children: [
|
|
1432
1448
|
label,
|
|
@@ -1498,6 +1514,7 @@ var TagInput = forwardRef4(
|
|
|
1498
1514
|
placeholder,
|
|
1499
1515
|
placeholderWithTags,
|
|
1500
1516
|
label,
|
|
1517
|
+
labelClassName,
|
|
1501
1518
|
hideSearchButton = false,
|
|
1502
1519
|
hideClearButton = false,
|
|
1503
1520
|
className,
|
|
@@ -1535,14 +1552,14 @@ var TagInput = forwardRef4(
|
|
|
1535
1552
|
input: "text-sm",
|
|
1536
1553
|
tag: "px-2 py-1 text-sm gap-1.5 rounded-full",
|
|
1537
1554
|
tagIcon: "h-3.5 w-3.5",
|
|
1538
|
-
button: "h-
|
|
1555
|
+
button: "h-9 text-sm px-3"
|
|
1539
1556
|
},
|
|
1540
1557
|
lg: {
|
|
1541
1558
|
container: "min-h-12 p-2.5 gap-2 rounded-full",
|
|
1542
1559
|
input: "text-base",
|
|
1543
1560
|
tag: "px-2.5 py-1.5 text-base gap-2 rounded-full",
|
|
1544
1561
|
tagIcon: "h-4 w-4",
|
|
1545
|
-
button: "h-
|
|
1562
|
+
button: "h-11 text-base px-4"
|
|
1546
1563
|
}
|
|
1547
1564
|
};
|
|
1548
1565
|
const addTag = (tagValue) => {
|
|
@@ -1610,7 +1627,8 @@ var TagInput = forwardRef4(
|
|
|
1610
1627
|
className: cn(
|
|
1611
1628
|
"block font-medium transition-colors duration-200",
|
|
1612
1629
|
size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
|
|
1613
|
-
disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground"
|
|
1630
|
+
disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
|
|
1631
|
+
labelClassName
|
|
1614
1632
|
),
|
|
1615
1633
|
children: [
|
|
1616
1634
|
label,
|
|
@@ -1872,6 +1890,7 @@ var Switch = ({
|
|
|
1872
1890
|
checked,
|
|
1873
1891
|
onCheckedChange,
|
|
1874
1892
|
label,
|
|
1893
|
+
labelClassName,
|
|
1875
1894
|
size = "md",
|
|
1876
1895
|
variant = "default",
|
|
1877
1896
|
disabled = false,
|
|
@@ -1914,79 +1933,60 @@ var Switch = ({
|
|
|
1914
1933
|
inactive: "bg-input border-input"
|
|
1915
1934
|
}
|
|
1916
1935
|
};
|
|
1917
|
-
return /* @__PURE__ */ jsxs8(
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
"div",
|
|
1928
|
-
{
|
|
1929
|
-
className: cn(
|
|
1930
|
-
"relative inline-flex rounded-full align-middle",
|
|
1931
|
-
sizeClasses2[size].track,
|
|
1932
|
-
// Focus ring styled like shadcn (via peer-visible)
|
|
1933
|
-
"peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background",
|
|
1934
|
-
disabled && "opacity-50"
|
|
1935
|
-
),
|
|
1936
|
-
children: [
|
|
1937
|
-
/* @__PURE__ */ jsx9(
|
|
1938
|
-
"input",
|
|
1939
|
-
{
|
|
1940
|
-
type: "checkbox",
|
|
1941
|
-
className: "sr-only peer",
|
|
1942
|
-
checked,
|
|
1943
|
-
disabled,
|
|
1944
|
-
onChange: (e) => !disabled && onCheckedChange(e.target.checked),
|
|
1945
|
-
...props
|
|
1946
|
-
}
|
|
1947
|
-
),
|
|
1948
|
-
/* @__PURE__ */ jsx9(
|
|
1949
|
-
"div",
|
|
1950
|
-
{
|
|
1951
|
-
className: cn(
|
|
1952
|
-
"block w-full h-full rounded-full transition-colors duration-200 ease-out border",
|
|
1953
|
-
checked ? variantClasses2[variant].active : variantClasses2[variant].inactive
|
|
1954
|
-
)
|
|
1955
|
-
}
|
|
1956
|
-
),
|
|
1957
|
-
/* @__PURE__ */ jsx9(
|
|
1958
|
-
"div",
|
|
1959
|
-
{
|
|
1960
|
-
className: cn(
|
|
1961
|
-
"absolute top-0.5 left-0.5 rounded-full transition-transform duration-200 ease-out shadow-sm",
|
|
1962
|
-
sizeClasses2[size].handle,
|
|
1963
|
-
"bg-background border border-border",
|
|
1964
|
-
checked ? sizeClasses2[size].translate : "translate-x-0",
|
|
1965
|
-
!disabled && "hover:scale-[1.02]",
|
|
1966
|
-
isPressed && "scale-95",
|
|
1967
|
-
disabled && "opacity-70"
|
|
1968
|
-
),
|
|
1969
|
-
onMouseDown: () => !disabled && setIsPressed(true),
|
|
1970
|
-
onMouseUp: () => setIsPressed(false),
|
|
1971
|
-
onMouseLeave: () => setIsPressed(false)
|
|
1972
|
-
}
|
|
1973
|
-
)
|
|
1974
|
-
]
|
|
1975
|
-
}
|
|
1936
|
+
return /* @__PURE__ */ jsxs8("label", { className: cn("inline-flex items-center gap-3 cursor-pointer select-none", disabled && "cursor-not-allowed opacity-50", className), children: [
|
|
1937
|
+
/* @__PURE__ */ jsxs8(
|
|
1938
|
+
"div",
|
|
1939
|
+
{
|
|
1940
|
+
className: cn(
|
|
1941
|
+
"relative inline-flex rounded-full align-middle",
|
|
1942
|
+
sizeClasses2[size].track,
|
|
1943
|
+
// Focus ring styled like shadcn (via peer-visible)
|
|
1944
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background",
|
|
1945
|
+
disabled && "opacity-50"
|
|
1976
1946
|
),
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1947
|
+
children: [
|
|
1948
|
+
/* @__PURE__ */ jsx9(
|
|
1949
|
+
"input",
|
|
1950
|
+
{
|
|
1951
|
+
type: "checkbox",
|
|
1952
|
+
className: "sr-only peer",
|
|
1953
|
+
checked,
|
|
1954
|
+
disabled,
|
|
1955
|
+
onChange: (e) => !disabled && onCheckedChange(e.target.checked),
|
|
1956
|
+
...props
|
|
1957
|
+
}
|
|
1958
|
+
),
|
|
1959
|
+
/* @__PURE__ */ jsx9(
|
|
1960
|
+
"div",
|
|
1961
|
+
{
|
|
1962
|
+
className: cn(
|
|
1963
|
+
"block w-full h-full rounded-full transition-colors duration-200 ease-out border",
|
|
1964
|
+
checked ? variantClasses2[variant].active : variantClasses2[variant].inactive
|
|
1965
|
+
)
|
|
1966
|
+
}
|
|
1967
|
+
),
|
|
1968
|
+
/* @__PURE__ */ jsx9(
|
|
1969
|
+
"div",
|
|
1970
|
+
{
|
|
1971
|
+
className: cn(
|
|
1972
|
+
"absolute top-0.5 left-0.5 rounded-full transition-transform duration-200 ease-out shadow-sm",
|
|
1973
|
+
sizeClasses2[size].handle,
|
|
1974
|
+
"bg-background border border-border",
|
|
1975
|
+
checked ? sizeClasses2[size].translate : "translate-x-0",
|
|
1976
|
+
!disabled && "hover:scale-[1.02]",
|
|
1977
|
+
isPressed && "scale-95",
|
|
1978
|
+
disabled && "opacity-70"
|
|
1979
|
+
),
|
|
1980
|
+
onMouseDown: () => !disabled && setIsPressed(true),
|
|
1981
|
+
onMouseUp: () => setIsPressed(false),
|
|
1982
|
+
onMouseLeave: () => setIsPressed(false)
|
|
1983
|
+
}
|
|
1984
|
+
)
|
|
1985
|
+
]
|
|
1986
|
+
}
|
|
1987
|
+
),
|
|
1988
|
+
label && /* @__PURE__ */ jsx9("span", { className: cn("text-sm font-medium text-foreground transition-colors", disabled && "text-muted-foreground", labelClassName), children: label })
|
|
1989
|
+
] });
|
|
1990
1990
|
};
|
|
1991
1991
|
Switch.displayName = "Switch";
|
|
1992
1992
|
var Switch_default = Switch;
|
|
@@ -4830,6 +4830,7 @@ var Combobox = ({
|
|
|
4830
4830
|
allowClear = false,
|
|
4831
4831
|
usePortal = true,
|
|
4832
4832
|
label,
|
|
4833
|
+
labelClassName,
|
|
4833
4834
|
required,
|
|
4834
4835
|
fontBold = false,
|
|
4835
4836
|
loading: loading2 = false,
|
|
@@ -5171,7 +5172,8 @@ var Combobox = ({
|
|
|
5171
5172
|
className: cn(
|
|
5172
5173
|
labelSize,
|
|
5173
5174
|
"font-medium transition-colors duration-200",
|
|
5174
|
-
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary"
|
|
5175
|
+
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
|
|
5176
|
+
labelClassName
|
|
5175
5177
|
),
|
|
5176
5178
|
children: [
|
|
5177
5179
|
label,
|
|
@@ -5659,6 +5661,7 @@ var DatePicker = ({
|
|
|
5659
5661
|
disabled = false,
|
|
5660
5662
|
size = "md",
|
|
5661
5663
|
label,
|
|
5664
|
+
labelClassName,
|
|
5662
5665
|
required,
|
|
5663
5666
|
todayLabel,
|
|
5664
5667
|
clearLabel,
|
|
@@ -5716,7 +5719,7 @@ var DatePicker = ({
|
|
|
5716
5719
|
footerMargin: "mt-3 pt-2 gap-1.5"
|
|
5717
5720
|
},
|
|
5718
5721
|
md: {
|
|
5719
|
-
trigger: "px-3 py-2.5 text-sm h-
|
|
5722
|
+
trigger: "px-3 py-2.5 text-sm h-10",
|
|
5720
5723
|
dayCell: "w-8 h-8 text-sm",
|
|
5721
5724
|
monthCell: "w-8 h-8 text-sm",
|
|
5722
5725
|
navButton: "p-2",
|
|
@@ -5733,7 +5736,7 @@ var DatePicker = ({
|
|
|
5733
5736
|
footerMargin: "mt-4 pt-3 gap-2"
|
|
5734
5737
|
},
|
|
5735
5738
|
lg: {
|
|
5736
|
-
trigger: "px-4 py-3 text-base h-
|
|
5739
|
+
trigger: "px-4 py-3 text-base h-12",
|
|
5737
5740
|
dayCell: "w-10 h-10 text-base",
|
|
5738
5741
|
monthCell: "w-10 h-10 text-base",
|
|
5739
5742
|
navButton: "p-2.5",
|
|
@@ -6062,7 +6065,8 @@ var DatePicker = ({
|
|
|
6062
6065
|
className: cn(
|
|
6063
6066
|
labelSize,
|
|
6064
6067
|
"font-semibold transition-colors duration-300 cursor-pointer",
|
|
6065
|
-
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary"
|
|
6068
|
+
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary",
|
|
6069
|
+
labelClassName
|
|
6066
6070
|
),
|
|
6067
6071
|
children: [
|
|
6068
6072
|
label,
|
|
@@ -6197,7 +6201,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
6197
6201
|
footerMargin: "mt-3 pt-2 gap-1.5"
|
|
6198
6202
|
},
|
|
6199
6203
|
md: {
|
|
6200
|
-
trigger: "px-3 py-2.5 text-sm h-
|
|
6204
|
+
trigger: "px-3 py-2.5 text-sm h-10",
|
|
6201
6205
|
dayCell: "w-8 h-8 text-sm",
|
|
6202
6206
|
monthCell: "w-8 h-8 text-sm",
|
|
6203
6207
|
navButton: "p-2",
|
|
@@ -6214,7 +6218,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
|
|
|
6214
6218
|
footerMargin: "mt-4 pt-3 gap-2"
|
|
6215
6219
|
},
|
|
6216
6220
|
lg: {
|
|
6217
|
-
trigger: "px-4 py-3 text-base h-
|
|
6221
|
+
trigger: "px-4 py-3 text-base h-12",
|
|
6218
6222
|
dayCell: "w-10 h-10 text-base",
|
|
6219
6223
|
monthCell: "w-10 h-10 text-base",
|
|
6220
6224
|
navButton: "p-2.5",
|
|
@@ -6964,6 +6968,7 @@ function MonthYearPicker({
|
|
|
6964
6968
|
disabled = false,
|
|
6965
6969
|
size = "md",
|
|
6966
6970
|
label,
|
|
6971
|
+
labelClassName,
|
|
6967
6972
|
required,
|
|
6968
6973
|
clearable = true,
|
|
6969
6974
|
variant = "default",
|
|
@@ -7275,7 +7280,7 @@ function MonthYearPicker({
|
|
|
7275
7280
|
] });
|
|
7276
7281
|
if (variant === "inline") {
|
|
7277
7282
|
return /* @__PURE__ */ jsxs25("div", { className: cn("w-full", className), ...rest, children: [
|
|
7278
|
-
label && /* @__PURE__ */ jsxs25("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80"), children: [
|
|
7283
|
+
label && /* @__PURE__ */ jsxs25("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80", labelClassName), children: [
|
|
7279
7284
|
label,
|
|
7280
7285
|
required && /* @__PURE__ */ jsx30("span", { className: "text-destructive ml-0.5", children: "*" })
|
|
7281
7286
|
] }),
|
|
@@ -7284,7 +7289,7 @@ function MonthYearPicker({
|
|
|
7284
7289
|
] });
|
|
7285
7290
|
}
|
|
7286
7291
|
return /* @__PURE__ */ jsxs25("div", { className: cn("w-full", className), ...rest, children: [
|
|
7287
|
-
label && /* @__PURE__ */ jsxs25("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80"), children: [
|
|
7292
|
+
label && /* @__PURE__ */ jsxs25("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80", labelClassName), children: [
|
|
7288
7293
|
label,
|
|
7289
7294
|
required && /* @__PURE__ */ jsx30("span", { className: "text-destructive ml-0.5", children: "*" })
|
|
7290
7295
|
] }),
|
|
@@ -9076,6 +9081,7 @@ var DateTimePicker = ({
|
|
|
9076
9081
|
format = "24",
|
|
9077
9082
|
includeSeconds = false,
|
|
9078
9083
|
label,
|
|
9084
|
+
labelClassName,
|
|
9079
9085
|
required,
|
|
9080
9086
|
doneLabel,
|
|
9081
9087
|
clearLabel,
|
|
@@ -9214,7 +9220,7 @@ var DateTimePicker = ({
|
|
|
9214
9220
|
};
|
|
9215
9221
|
const weekdays = getWeekdays(locale);
|
|
9216
9222
|
return /* @__PURE__ */ jsxs28("div", { className: cn("space-y-1.5", className), children: [
|
|
9217
|
-
label && /* @__PURE__ */ jsxs28("label", { className: cn(sizeStyles8[size].label, "font-medium text-foreground flex items-center gap-1"), children: [
|
|
9223
|
+
label && /* @__PURE__ */ jsxs28("label", { className: cn(sizeStyles8[size].label, "font-medium text-foreground flex items-center gap-1", labelClassName), children: [
|
|
9218
9224
|
label,
|
|
9219
9225
|
" ",
|
|
9220
9226
|
required && /* @__PURE__ */ jsx33("span", { className: "text-destructive", children: "*" })
|
|
@@ -12057,6 +12063,7 @@ var MultiCombobox = ({
|
|
|
12057
12063
|
size = "md",
|
|
12058
12064
|
variant = "default",
|
|
12059
12065
|
label,
|
|
12066
|
+
labelClassName,
|
|
12060
12067
|
title,
|
|
12061
12068
|
required,
|
|
12062
12069
|
displayFormat = (option) => option.label,
|
|
@@ -12348,7 +12355,7 @@ var MultiCombobox = ({
|
|
|
12348
12355
|
!!error && "border-destructive focus-visible:ring-destructive/30"
|
|
12349
12356
|
),
|
|
12350
12357
|
children: [
|
|
12351
|
-
/* @__PURE__ */ jsx40("div", { className: cn("flex items-center gap-1.5 flex-
|
|
12358
|
+
/* @__PURE__ */ jsx40("div", { className: cn("flex items-center gap-1.5 flex-1 overflow-hidden", size === "sm" ? "min-h-4" : size === "lg" ? "min-h-8" : "min-h-6"), children: value.length > 0 ? showTags ? /* @__PURE__ */ jsxs35(Fragment13, { children: [
|
|
12352
12359
|
visibleTags.map((option) => {
|
|
12353
12360
|
if (renderTag) {
|
|
12354
12361
|
return /* @__PURE__ */ jsx40(React34.Fragment, { children: renderTag(option, () => handleRemove(option.value)) }, option.value);
|
|
@@ -12357,7 +12364,7 @@ var MultiCombobox = ({
|
|
|
12357
12364
|
"span",
|
|
12358
12365
|
{
|
|
12359
12366
|
className: cn(
|
|
12360
|
-
"inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200",
|
|
12367
|
+
"inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200 shrink-0",
|
|
12361
12368
|
"hover:bg-primary/20",
|
|
12362
12369
|
sizeStyles8[size].tag
|
|
12363
12370
|
),
|
|
@@ -12391,7 +12398,7 @@ var MultiCombobox = ({
|
|
|
12391
12398
|
option.value
|
|
12392
12399
|
);
|
|
12393
12400
|
}),
|
|
12394
|
-
hiddenCount > 0 && /* @__PURE__ */ jsxs35("span", { className: cn("inline-flex items-center bg-muted text-muted-foreground rounded-lg", sizeStyles8[size].tag), children: [
|
|
12401
|
+
hiddenCount > 0 && /* @__PURE__ */ jsxs35("span", { className: cn("inline-flex items-center bg-muted text-muted-foreground rounded-lg shrink-0", sizeStyles8[size].tag), children: [
|
|
12395
12402
|
"+",
|
|
12396
12403
|
hiddenCount,
|
|
12397
12404
|
" more"
|
|
@@ -12440,7 +12447,8 @@ var MultiCombobox = ({
|
|
|
12440
12447
|
className: cn(
|
|
12441
12448
|
size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
|
|
12442
12449
|
"font-medium transition-colors duration-200",
|
|
12443
|
-
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary"
|
|
12450
|
+
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
|
|
12451
|
+
labelClassName
|
|
12444
12452
|
),
|
|
12445
12453
|
children: [
|
|
12446
12454
|
title,
|
|
@@ -12456,7 +12464,8 @@ var MultiCombobox = ({
|
|
|
12456
12464
|
className: cn(
|
|
12457
12465
|
labelSize,
|
|
12458
12466
|
"font-medium transition-colors duration-200",
|
|
12459
|
-
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary"
|
|
12467
|
+
disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
|
|
12468
|
+
labelClassName
|
|
12460
12469
|
),
|
|
12461
12470
|
children: [
|
|
12462
12471
|
label,
|
|
@@ -12588,7 +12597,7 @@ var sizeStyles7 = {
|
|
|
12588
12597
|
}
|
|
12589
12598
|
};
|
|
12590
12599
|
var RadioGroupItem = React35.forwardRef(
|
|
12591
|
-
({ value, id, disabled, className, children, label, description, icon }, ref) => {
|
|
12600
|
+
({ value, id, disabled, className, children, label, labelClassName, description, icon }, ref) => {
|
|
12592
12601
|
const { value: selectedValue, onValueChange, name, disabled: groupDisabled, size = "md", variant = "default" } = useRadioGroup();
|
|
12593
12602
|
const isDisabled = disabled || groupDisabled;
|
|
12594
12603
|
const isSelected = selectedValue === value;
|
|
@@ -12639,7 +12648,7 @@ var RadioGroupItem = React35.forwardRef(
|
|
|
12639
12648
|
/* @__PURE__ */ jsxs36("div", { className: "flex-1 min-w-0", children: [
|
|
12640
12649
|
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
12641
12650
|
Icon && /* @__PURE__ */ jsx41(Icon, { className: "h-4 w-4 text-foreground" }),
|
|
12642
|
-
/* @__PURE__ */ jsx41("label", { htmlFor: radioId, className: cn("font-medium text-foreground cursor-pointer", sizeStyles7[size].text), children: label || children })
|
|
12651
|
+
/* @__PURE__ */ jsx41("label", { htmlFor: radioId, className: cn("font-medium text-foreground cursor-pointer", sizeStyles7[size].text, labelClassName), children: label || children })
|
|
12643
12652
|
] }),
|
|
12644
12653
|
description && /* @__PURE__ */ jsx41("p", { className: "text-muted-foreground mt-1 text-xs", children: description })
|
|
12645
12654
|
] })
|
|
@@ -12734,7 +12743,8 @@ var RadioGroupItem = React35.forwardRef(
|
|
|
12734
12743
|
"font-medium text-foreground cursor-pointer flex-1",
|
|
12735
12744
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
12736
12745
|
sizeStyles7[size].text,
|
|
12737
|
-
isDisabled && "cursor-not-allowed opacity-50"
|
|
12746
|
+
isDisabled && "cursor-not-allowed opacity-50",
|
|
12747
|
+
labelClassName
|
|
12738
12748
|
),
|
|
12739
12749
|
children: [
|
|
12740
12750
|
/* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
@@ -17221,6 +17231,7 @@ function LineChart({
|
|
|
17221
17231
|
curved = true,
|
|
17222
17232
|
formatValue,
|
|
17223
17233
|
referenceLines = [],
|
|
17234
|
+
labelClassName,
|
|
17224
17235
|
className = ""
|
|
17225
17236
|
}) {
|
|
17226
17237
|
const svgRef = useRef21(null);
|
|
@@ -17288,7 +17299,18 @@ function LineChart({
|
|
|
17288
17299
|
/* @__PURE__ */ jsx56("defs", { children: /* @__PURE__ */ jsx56("clipPath", { id: clipId, children: /* @__PURE__ */ jsx56("rect", { x: padding.left, y: padding.top, width: chartWidth, height: chartHeight }) }) }),
|
|
17289
17300
|
showGrid && /* @__PURE__ */ jsx56("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ jsxs51("g", { children: [
|
|
17290
17301
|
/* @__PURE__ */ jsx56("line", { x1: padding.left, y1: line.y, x2: width - padding.right, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
|
|
17291
|
-
/* @__PURE__ */ jsx56(
|
|
17302
|
+
/* @__PURE__ */ jsx56(
|
|
17303
|
+
"text",
|
|
17304
|
+
{
|
|
17305
|
+
x: padding.left - 8,
|
|
17306
|
+
y: line.y + 4,
|
|
17307
|
+
textAnchor: "end",
|
|
17308
|
+
fontSize: "10",
|
|
17309
|
+
fill: "currentColor",
|
|
17310
|
+
className: labelClassName || "text-muted-foreground",
|
|
17311
|
+
children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
|
|
17312
|
+
}
|
|
17313
|
+
)
|
|
17292
17314
|
] }, i)) }),
|
|
17293
17315
|
/* @__PURE__ */ jsxs51("g", { clipPath: `url(#${clipId})`, children: [
|
|
17294
17316
|
processedSeries.map(
|
|
@@ -17409,7 +17431,19 @@ function LineChart({
|
|
|
17409
17431
|
) }),
|
|
17410
17432
|
showLabels && labels.map((lbl, i) => {
|
|
17411
17433
|
const x = padding.left + i / (labels.length - 1 || 1) * chartWidth;
|
|
17412
|
-
return /* @__PURE__ */ jsx56(
|
|
17434
|
+
return /* @__PURE__ */ jsx56(
|
|
17435
|
+
"text",
|
|
17436
|
+
{
|
|
17437
|
+
x,
|
|
17438
|
+
y: height - 10,
|
|
17439
|
+
textAnchor: "middle",
|
|
17440
|
+
fontSize: "10",
|
|
17441
|
+
className: labelClassName || "text-muted-foreground",
|
|
17442
|
+
fill: "currentColor",
|
|
17443
|
+
children: lbl
|
|
17444
|
+
},
|
|
17445
|
+
i
|
|
17446
|
+
);
|
|
17413
17447
|
}),
|
|
17414
17448
|
/* @__PURE__ */ jsx56("style", { children: `
|
|
17415
17449
|
@keyframes drawLine {
|
|
@@ -17471,6 +17505,7 @@ function BarChart({
|
|
|
17471
17505
|
barRadius = 4,
|
|
17472
17506
|
barGap = 0.3,
|
|
17473
17507
|
formatValue,
|
|
17508
|
+
labelClassName,
|
|
17474
17509
|
className = ""
|
|
17475
17510
|
}) {
|
|
17476
17511
|
const svgRef = useRef22(null);
|
|
@@ -17599,10 +17634,32 @@ function BarChart({
|
|
|
17599
17634
|
/* @__PURE__ */ jsxs52("svg", { ref: svgRef, width, height, className: `overflow-visible ${className}`, style: { fontFamily: "inherit" }, children: [
|
|
17600
17635
|
showGrid && /* @__PURE__ */ jsx57("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ jsx57("g", { children: horizontal ? /* @__PURE__ */ jsxs52(Fragment24, { children: [
|
|
17601
17636
|
/* @__PURE__ */ jsx57("line", { x1: line.x, y1: line.y1, x2: line.x, y2: line.y2, stroke: "currentColor", strokeDasharray: "4 4" }),
|
|
17602
|
-
/* @__PURE__ */ jsx57(
|
|
17637
|
+
/* @__PURE__ */ jsx57(
|
|
17638
|
+
"text",
|
|
17639
|
+
{
|
|
17640
|
+
x: line.x,
|
|
17641
|
+
y: height - 8,
|
|
17642
|
+
textAnchor: "middle",
|
|
17643
|
+
fontSize: "10",
|
|
17644
|
+
className: labelClassName || "text-muted-foreground",
|
|
17645
|
+
fill: "currentColor",
|
|
17646
|
+
children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
|
|
17647
|
+
}
|
|
17648
|
+
)
|
|
17603
17649
|
] }) : /* @__PURE__ */ jsxs52(Fragment24, { children: [
|
|
17604
17650
|
/* @__PURE__ */ jsx57("line", { x1: line.x1, y1: line.y, x2: line.x2, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
|
|
17605
|
-
/* @__PURE__ */ jsx57(
|
|
17651
|
+
/* @__PURE__ */ jsx57(
|
|
17652
|
+
"text",
|
|
17653
|
+
{
|
|
17654
|
+
x: padding.left - 8,
|
|
17655
|
+
y: line.y + 4,
|
|
17656
|
+
textAnchor: "end",
|
|
17657
|
+
fontSize: "10",
|
|
17658
|
+
className: labelClassName || "text-muted-foreground",
|
|
17659
|
+
fill: "currentColor",
|
|
17660
|
+
children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
|
|
17661
|
+
}
|
|
17662
|
+
)
|
|
17606
17663
|
] }) }, i)) }),
|
|
17607
17664
|
barGroups.map((group, gi) => /* @__PURE__ */ jsxs52("g", { children: [
|
|
17608
17665
|
group.bars.map((bar, bi) => {
|
|
@@ -17678,7 +17735,7 @@ function BarChart({
|
|
|
17678
17735
|
y: horizontal ? padding.top + (gi + 0.5) * (chartHeight / barGroups.length) + 4 : height - 10,
|
|
17679
17736
|
textAnchor: horizontal ? "end" : "middle",
|
|
17680
17737
|
fontSize: "10",
|
|
17681
|
-
className: "text-muted-foreground",
|
|
17738
|
+
className: labelClassName || "text-muted-foreground",
|
|
17682
17739
|
fill: "currentColor",
|
|
17683
17740
|
children: group.label
|
|
17684
17741
|
}
|
|
@@ -17732,6 +17789,7 @@ function PieChart({
|
|
|
17732
17789
|
startAngle = -90,
|
|
17733
17790
|
renderCenter,
|
|
17734
17791
|
formatValue,
|
|
17792
|
+
labelClassName,
|
|
17735
17793
|
className = ""
|
|
17736
17794
|
}) {
|
|
17737
17795
|
const containerRef = useRef23(null);
|
|
@@ -17824,7 +17882,7 @@ function PieChart({
|
|
|
17824
17882
|
y: seg.labelY,
|
|
17825
17883
|
textAnchor: seg.labelX > center ? "start" : "end",
|
|
17826
17884
|
fontSize: "10",
|
|
17827
|
-
className: "text-foreground",
|
|
17885
|
+
className: labelClassName || "text-foreground",
|
|
17828
17886
|
fill: "currentColor",
|
|
17829
17887
|
style: animated ? { opacity: 0, animation: `fadeIn 0.3s ease-out ${i * 0.1 + 0.3}s forwards` } : void 0,
|
|
17830
17888
|
children: showPercentage ? `${(seg.percentage * 100).toFixed(0)}%` : formatValue ? formatValue(seg.value) : seg.value
|
|
@@ -17900,6 +17958,7 @@ function AreaChart({
|
|
|
17900
17958
|
curved = true,
|
|
17901
17959
|
formatValue,
|
|
17902
17960
|
emptyText = "No data",
|
|
17961
|
+
labelClassName,
|
|
17903
17962
|
className = ""
|
|
17904
17963
|
}) {
|
|
17905
17964
|
const containerRef = useRef24(null);
|
|
@@ -17990,7 +18049,18 @@ function AreaChart({
|
|
|
17990
18049
|
/* @__PURE__ */ jsx59("defs", { children: /* @__PURE__ */ jsx59("clipPath", { id: clipId, children: /* @__PURE__ */ jsx59("rect", { x: padding.left, y: padding.top, width: chartWidth, height: chartHeight }) }) }),
|
|
17991
18050
|
showGrid && /* @__PURE__ */ jsx59("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ jsxs54("g", { children: [
|
|
17992
18051
|
/* @__PURE__ */ jsx59("line", { x1: padding.left, y1: line.y, x2: width - padding.right, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
|
|
17993
|
-
/* @__PURE__ */ jsx59(
|
|
18052
|
+
/* @__PURE__ */ jsx59(
|
|
18053
|
+
"text",
|
|
18054
|
+
{
|
|
18055
|
+
x: padding.left - 8,
|
|
18056
|
+
y: line.y + 4,
|
|
18057
|
+
textAnchor: "end",
|
|
18058
|
+
fontSize: "10",
|
|
18059
|
+
className: labelClassName || "text-muted-foreground",
|
|
18060
|
+
fill: "currentColor",
|
|
18061
|
+
children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
|
|
18062
|
+
}
|
|
18063
|
+
)
|
|
17994
18064
|
] }, i)) }),
|
|
17995
18065
|
/* @__PURE__ */ jsx59("g", { clipPath: `url(#${clipId})`, children: [...processedSeries].reverse().map((s, i) => /* @__PURE__ */ jsx59(
|
|
17996
18066
|
"path",
|
|
@@ -18067,7 +18137,7 @@ function AreaChart({
|
|
|
18067
18137
|
`dot-${seriesIdx}-${i}`
|
|
18068
18138
|
))
|
|
18069
18139
|
),
|
|
18070
|
-
showLabels && /* @__PURE__ */ jsx59("g", { className: "text-muted-foreground", children: labels.map((label, i) => {
|
|
18140
|
+
showLabels && /* @__PURE__ */ jsx59("g", { className: labelClassName || "text-muted-foreground", children: labels.map((label, i) => {
|
|
18071
18141
|
const x = padding.left + i / (labels.length - 1) * chartWidth;
|
|
18072
18142
|
return /* @__PURE__ */ jsx59("text", { x, y: height - 10, textAnchor: "middle", fontSize: "10", fill: "currentColor", children: label }, i);
|
|
18073
18143
|
}) }),
|
|
@@ -18275,6 +18345,7 @@ function RadarChart({
|
|
|
18275
18345
|
showValues = false,
|
|
18276
18346
|
animated = true,
|
|
18277
18347
|
formatValue,
|
|
18348
|
+
labelClassName,
|
|
18278
18349
|
className = ""
|
|
18279
18350
|
}) {
|
|
18280
18351
|
const containerRef = useRef25(null);
|
|
@@ -18421,7 +18492,7 @@ function RadarChart({
|
|
|
18421
18492
|
))
|
|
18422
18493
|
] }, i)
|
|
18423
18494
|
),
|
|
18424
|
-
showLabels && /* @__PURE__ */ jsx61("g", { className: "text-muted-foreground", children: axes.map((axis, i) => /* @__PURE__ */ jsx61("text", { x: axis.labelX, y: axis.labelY, textAnchor: "middle", dominantBaseline: "middle", fontSize: "11", fill: "currentColor", children: axis.label }, i)) }),
|
|
18495
|
+
showLabels && /* @__PURE__ */ jsx61("g", { className: labelClassName || "text-muted-foreground", children: axes.map((axis, i) => /* @__PURE__ */ jsx61("text", { x: axis.labelX, y: axis.labelY, textAnchor: "middle", dominantBaseline: "middle", fontSize: "11", fill: "currentColor", children: axis.label }, i)) }),
|
|
18425
18496
|
/* @__PURE__ */ jsx61("style", { children: `
|
|
18426
18497
|
@keyframes radarPop {
|
|
18427
18498
|
from {
|
|
@@ -18501,6 +18572,7 @@ function GaugeChart({
|
|
|
18501
18572
|
endAngle = 135,
|
|
18502
18573
|
zones,
|
|
18503
18574
|
formatValue,
|
|
18575
|
+
labelClassName,
|
|
18504
18576
|
className = ""
|
|
18505
18577
|
}) {
|
|
18506
18578
|
const center = size / 2;
|
|
@@ -18587,7 +18659,7 @@ function GaugeChart({
|
|
|
18587
18659
|
]
|
|
18588
18660
|
}
|
|
18589
18661
|
),
|
|
18590
|
-
showMinMax && /* @__PURE__ */ jsxs57("g", { className: "text-muted-foreground", children: [
|
|
18662
|
+
showMinMax && /* @__PURE__ */ jsxs57("g", { className: labelClassName || "text-muted-foreground", children: [
|
|
18591
18663
|
/* @__PURE__ */ jsx62(
|
|
18592
18664
|
"text",
|
|
18593
18665
|
{
|