@underverse-ui/underverse 1.0.15 → 1.0.17

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.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
- ({ label, error, description, variant = "default", resize = "vertical", counter = false, className, required, value, maxLength, ...props }, ref) => {
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-8 text-sm px-3"
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-9 text-base px-4"
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
- "label",
1919
- {
1920
- className: cn(
1921
- "inline-flex items-center gap-3 cursor-pointer select-none",
1922
- disabled && "cursor-not-allowed opacity-50",
1923
- className
1924
- ),
1925
- children: [
1926
- /* @__PURE__ */ jsxs8(
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
- label && /* @__PURE__ */ jsx9(
1978
- "span",
1979
- {
1980
- className: cn(
1981
- "text-sm font-medium text-foreground transition-colors",
1982
- disabled && "text-muted-foreground"
1983
- ),
1984
- children: label
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-11",
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-14",
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-11",
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-14",
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,
@@ -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,9 +17231,11 @@ 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);
17238
+ const clipId = useRef21(`line-clip-${Math.random().toString(36).slice(2, 8)}`).current;
17227
17239
  const padding = { top: 20, right: 20, bottom: 40, left: 40 };
17228
17240
  const chartWidth = width - padding.left - padding.right;
17229
17241
  const chartHeight = height - padding.top - padding.bottom;
@@ -17284,42 +17296,56 @@ function LineChart({
17284
17296
  }, [minValue, maxValue, chartHeight, padding.top]);
17285
17297
  return /* @__PURE__ */ jsxs51(Fragment23, { children: [
17286
17298
  /* @__PURE__ */ jsxs51("svg", { ref: svgRef, width, height, className: `overflow-visible ${className}`, style: { fontFamily: "inherit" }, children: [
17299
+ /* @__PURE__ */ jsx56("defs", { children: /* @__PURE__ */ jsx56("clipPath", { id: clipId, children: /* @__PURE__ */ jsx56("rect", { x: padding.left, y: padding.top, width: chartWidth, height: chartHeight }) }) }),
17287
17300
  showGrid && /* @__PURE__ */ jsx56("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ jsxs51("g", { children: [
17288
17301
  /* @__PURE__ */ jsx56("line", { x1: padding.left, y1: line.y, x2: width - padding.right, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
17289
- /* @__PURE__ */ jsx56("text", { x: padding.left - 8, y: line.y + 4, textAnchor: "end", fontSize: "10", fill: "currentColor", className: "text-muted-foreground", children: formatValue ? formatValue(line.value) : line.value.toFixed(0) })
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
+ )
17290
17314
  ] }, i)) }),
17291
- processedSeries.map(
17292
- (s, si) => s.fillColor && s.areaPath && /* @__PURE__ */ jsx56(
17315
+ /* @__PURE__ */ jsxs51("g", { clipPath: `url(#${clipId})`, children: [
17316
+ processedSeries.map(
17317
+ (s, si) => s.fillColor && s.areaPath && /* @__PURE__ */ jsx56(
17318
+ "path",
17319
+ {
17320
+ d: s.areaPath,
17321
+ fill: s.fillColor,
17322
+ className: "transition-opacity duration-300",
17323
+ opacity: hiddenSeries.has(s.name) ? 0 : 0.15,
17324
+ style: animated ? { opacity: 0, animation: `fadeIn 0.6s ease-out ${si * 0.1}s forwards` } : void 0
17325
+ },
17326
+ `area-${si}`
17327
+ )
17328
+ ),
17329
+ processedSeries.map((s, si) => /* @__PURE__ */ jsx56(
17293
17330
  "path",
17294
17331
  {
17295
- d: s.areaPath,
17296
- fill: s.fillColor,
17332
+ d: s.linePath,
17333
+ fill: "none",
17334
+ stroke: s.color,
17335
+ strokeWidth: 2,
17336
+ strokeLinecap: "round",
17337
+ strokeLinejoin: "round",
17297
17338
  className: "transition-opacity duration-300",
17298
- opacity: hiddenSeries.has(s.name) ? 0 : 0.15,
17299
- style: animated ? { opacity: 0, animation: `fadeIn 0.6s ease-out ${si * 0.1}s forwards` } : void 0
17339
+ opacity: hiddenSeries.has(s.name) ? 0 : 1,
17340
+ style: animated ? {
17341
+ strokeDasharray: s.lineLength,
17342
+ strokeDashoffset: s.lineLength,
17343
+ animation: `drawLine 1s ease-out ${si * 0.15}s forwards`
17344
+ } : void 0
17300
17345
  },
17301
- `area-${si}`
17302
- )
17303
- ),
17304
- processedSeries.map((s, si) => /* @__PURE__ */ jsx56(
17305
- "path",
17306
- {
17307
- d: s.linePath,
17308
- fill: "none",
17309
- stroke: s.color,
17310
- strokeWidth: 2,
17311
- strokeLinecap: "round",
17312
- strokeLinejoin: "round",
17313
- className: "transition-opacity duration-300",
17314
- opacity: hiddenSeries.has(s.name) ? 0 : 1,
17315
- style: animated ? {
17316
- strokeDasharray: s.lineLength,
17317
- strokeDashoffset: s.lineLength,
17318
- animation: `drawLine 1s ease-out ${si * 0.15}s forwards`
17319
- } : void 0
17320
- },
17321
- `line-${si}`
17322
- )),
17346
+ `line-${si}`
17347
+ ))
17348
+ ] }),
17323
17349
  showDots && processedSeries.map(
17324
17350
  (s, si) => !hiddenSeries.has(s.name) && s.points.map((point, i) => /* @__PURE__ */ jsxs51(
17325
17351
  "g",
@@ -17405,7 +17431,19 @@ function LineChart({
17405
17431
  ) }),
17406
17432
  showLabels && labels.map((lbl, i) => {
17407
17433
  const x = padding.left + i / (labels.length - 1 || 1) * chartWidth;
17408
- return /* @__PURE__ */ jsx56("text", { x, y: height - 10, textAnchor: "middle", fontSize: "10", className: "text-muted-foreground", fill: "currentColor", children: lbl }, i);
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
+ );
17409
17447
  }),
17410
17448
  /* @__PURE__ */ jsx56("style", { children: `
17411
17449
  @keyframes drawLine {
@@ -17467,6 +17505,7 @@ function BarChart({
17467
17505
  barRadius = 4,
17468
17506
  barGap = 0.3,
17469
17507
  formatValue,
17508
+ labelClassName,
17470
17509
  className = ""
17471
17510
  }) {
17472
17511
  const svgRef = useRef22(null);
@@ -17595,10 +17634,32 @@ function BarChart({
17595
17634
  /* @__PURE__ */ jsxs52("svg", { ref: svgRef, width, height, className: `overflow-visible ${className}`, style: { fontFamily: "inherit" }, children: [
17596
17635
  showGrid && /* @__PURE__ */ jsx57("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ jsx57("g", { children: horizontal ? /* @__PURE__ */ jsxs52(Fragment24, { children: [
17597
17636
  /* @__PURE__ */ jsx57("line", { x1: line.x, y1: line.y1, x2: line.x, y2: line.y2, stroke: "currentColor", strokeDasharray: "4 4" }),
17598
- /* @__PURE__ */ jsx57("text", { x: line.x, y: height - 8, textAnchor: "middle", fontSize: "10", className: "text-muted-foreground", fill: "currentColor", children: formatValue ? formatValue(line.value) : line.value.toFixed(0) })
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
+ )
17599
17649
  ] }) : /* @__PURE__ */ jsxs52(Fragment24, { children: [
17600
17650
  /* @__PURE__ */ jsx57("line", { x1: line.x1, y1: line.y, x2: line.x2, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
17601
- /* @__PURE__ */ jsx57("text", { x: padding.left - 8, y: line.y + 4, textAnchor: "end", fontSize: "10", className: "text-muted-foreground", fill: "currentColor", children: formatValue ? formatValue(line.value) : line.value.toFixed(0) })
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
+ )
17602
17663
  ] }) }, i)) }),
17603
17664
  barGroups.map((group, gi) => /* @__PURE__ */ jsxs52("g", { children: [
17604
17665
  group.bars.map((bar, bi) => {
@@ -17674,7 +17735,7 @@ function BarChart({
17674
17735
  y: horizontal ? padding.top + (gi + 0.5) * (chartHeight / barGroups.length) + 4 : height - 10,
17675
17736
  textAnchor: horizontal ? "end" : "middle",
17676
17737
  fontSize: "10",
17677
- className: "text-muted-foreground",
17738
+ className: labelClassName || "text-muted-foreground",
17678
17739
  fill: "currentColor",
17679
17740
  children: group.label
17680
17741
  }
@@ -17728,6 +17789,7 @@ function PieChart({
17728
17789
  startAngle = -90,
17729
17790
  renderCenter,
17730
17791
  formatValue,
17792
+ labelClassName,
17731
17793
  className = ""
17732
17794
  }) {
17733
17795
  const containerRef = useRef23(null);
@@ -17820,7 +17882,7 @@ function PieChart({
17820
17882
  y: seg.labelY,
17821
17883
  textAnchor: seg.labelX > center ? "start" : "end",
17822
17884
  fontSize: "10",
17823
- className: "text-foreground",
17885
+ className: labelClassName || "text-foreground",
17824
17886
  fill: "currentColor",
17825
17887
  style: animated ? { opacity: 0, animation: `fadeIn 0.3s ease-out ${i * 0.1 + 0.3}s forwards` } : void 0,
17826
17888
  children: showPercentage ? `${(seg.percentage * 100).toFixed(0)}%` : formatValue ? formatValue(seg.value) : seg.value
@@ -17896,9 +17958,11 @@ function AreaChart({
17896
17958
  curved = true,
17897
17959
  formatValue,
17898
17960
  emptyText = "No data",
17961
+ labelClassName,
17899
17962
  className = ""
17900
17963
  }) {
17901
17964
  const containerRef = useRef24(null);
17965
+ const clipId = useRef24(`area-clip-${Math.random().toString(36).slice(2, 8)}`).current;
17902
17966
  const padding = { top: 20, right: 20, bottom: 40, left: 50 };
17903
17967
  const chartWidth = width - padding.left - padding.right;
17904
17968
  const chartHeight = height - padding.top - padding.bottom;
@@ -17982,11 +18046,23 @@ function AreaChart({
17982
18046
  }, [series, chartWidth, chartHeight, padding, stacked, curved]);
17983
18047
  return /* @__PURE__ */ jsxs54("div", { ref: containerRef, className: `relative flex flex-col gap-4 ${className}`, children: [
17984
18048
  /* @__PURE__ */ jsxs54("svg", { width, height, className: "overflow-visible", style: { fontFamily: "inherit" }, children: [
18049
+ /* @__PURE__ */ jsx59("defs", { children: /* @__PURE__ */ jsx59("clipPath", { id: clipId, children: /* @__PURE__ */ jsx59("rect", { x: padding.left, y: padding.top, width: chartWidth, height: chartHeight }) }) }),
17985
18050
  showGrid && /* @__PURE__ */ jsx59("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ jsxs54("g", { children: [
17986
18051
  /* @__PURE__ */ jsx59("line", { x1: padding.left, y1: line.y, x2: width - padding.right, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
17987
- /* @__PURE__ */ jsx59("text", { x: padding.left - 8, y: line.y + 4, textAnchor: "end", fontSize: "10", className: "text-muted-foreground", fill: "currentColor", children: formatValue ? formatValue(line.value) : line.value.toFixed(0) })
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
+ )
17988
18064
  ] }, i)) }),
17989
- [...processedSeries].reverse().map((s, i) => /* @__PURE__ */ jsx59(
18065
+ /* @__PURE__ */ jsx59("g", { clipPath: `url(#${clipId})`, children: [...processedSeries].reverse().map((s, i) => /* @__PURE__ */ jsx59(
17990
18066
  "path",
17991
18067
  {
17992
18068
  d: s.areaPath,
@@ -17999,8 +18075,8 @@ function AreaChart({
17999
18075
  } : void 0
18000
18076
  },
18001
18077
  `area-${i}`
18002
- )),
18003
- processedSeries.map((s, i) => /* @__PURE__ */ jsx59(
18078
+ )) }),
18079
+ /* @__PURE__ */ jsx59("g", { clipPath: `url(#${clipId})`, children: processedSeries.map((s, i) => /* @__PURE__ */ jsx59(
18004
18080
  "path",
18005
18081
  {
18006
18082
  d: s.linePath,
@@ -18018,7 +18094,7 @@ function AreaChart({
18018
18094
  } : void 0
18019
18095
  },
18020
18096
  `line-${i}`
18021
- )),
18097
+ )) }),
18022
18098
  showDots && processedSeries.map(
18023
18099
  (s, seriesIdx) => !hiddenSeries.has(s.name) && s.points.map((point, i) => /* @__PURE__ */ jsxs54(
18024
18100
  "g",
@@ -18061,7 +18137,7 @@ function AreaChart({
18061
18137
  `dot-${seriesIdx}-${i}`
18062
18138
  ))
18063
18139
  ),
18064
- 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) => {
18065
18141
  const x = padding.left + i / (labels.length - 1) * chartWidth;
18066
18142
  return /* @__PURE__ */ jsx59("text", { x, y: height - 10, textAnchor: "middle", fontSize: "10", fill: "currentColor", children: label }, i);
18067
18143
  }) }),
@@ -18269,6 +18345,7 @@ function RadarChart({
18269
18345
  showValues = false,
18270
18346
  animated = true,
18271
18347
  formatValue,
18348
+ labelClassName,
18272
18349
  className = ""
18273
18350
  }) {
18274
18351
  const containerRef = useRef25(null);
@@ -18415,7 +18492,7 @@ function RadarChart({
18415
18492
  ))
18416
18493
  ] }, i)
18417
18494
  ),
18418
- 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)) }),
18419
18496
  /* @__PURE__ */ jsx61("style", { children: `
18420
18497
  @keyframes radarPop {
18421
18498
  from {
@@ -18495,6 +18572,7 @@ function GaugeChart({
18495
18572
  endAngle = 135,
18496
18573
  zones,
18497
18574
  formatValue,
18575
+ labelClassName,
18498
18576
  className = ""
18499
18577
  }) {
18500
18578
  const center = size / 2;
@@ -18581,7 +18659,7 @@ function GaugeChart({
18581
18659
  ]
18582
18660
  }
18583
18661
  ),
18584
- showMinMax && /* @__PURE__ */ jsxs57("g", { className: "text-muted-foreground", children: [
18662
+ showMinMax && /* @__PURE__ */ jsxs57("g", { className: labelClassName || "text-muted-foreground", children: [
18585
18663
  /* @__PURE__ */ jsx62(
18586
18664
  "text",
18587
18665
  {