@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 CHANGED
@@ -1113,6 +1113,7 @@ var import_jsx_runtime6 = require("react/jsx-runtime");
1113
1113
  var Input = (0, import_react3.forwardRef)(
1114
1114
  ({
1115
1115
  label,
1116
+ labelClassName,
1116
1117
  error,
1117
1118
  description,
1118
1119
  className,
@@ -1242,7 +1243,8 @@ var Input = (0, import_react3.forwardRef)(
1242
1243
  "font-medium transition-colors duration-200",
1243
1244
  // default color and highlight while any descendant focused
1244
1245
  disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
1245
- errMsg && "text-destructive"
1246
+ errMsg && "text-destructive",
1247
+ labelClassName
1246
1248
  ),
1247
1249
  children: [
1248
1250
  label,
@@ -1583,7 +1585,20 @@ var NumberInput = (0, import_react3.forwardRef)(
1583
1585
  );
1584
1586
  NumberInput.displayName = "NumberInput";
1585
1587
  var Textarea = (0, import_react3.forwardRef)(
1586
- ({ label, error, description, variant = "default", resize = "vertical", counter = false, className, required, value, maxLength, ...props }, ref) => {
1588
+ ({
1589
+ label,
1590
+ labelClassName,
1591
+ error,
1592
+ description,
1593
+ variant = "default",
1594
+ resize = "vertical",
1595
+ counter = false,
1596
+ className,
1597
+ required,
1598
+ value,
1599
+ maxLength,
1600
+ ...props
1601
+ }, ref) => {
1587
1602
  const [isFocused, setIsFocused] = (0, import_react3.useState)(false);
1588
1603
  const charCount = typeof value === "string" ? value.length : 0;
1589
1604
  const variantStyles6 = {
@@ -1606,7 +1621,8 @@ var Textarea = (0, import_react3.forwardRef)(
1606
1621
  className: cn(
1607
1622
  "text-sm font-medium transition-colors duration-200",
1608
1623
  isFocused ? "text-primary" : "text-foreground",
1609
- error && "text-destructive"
1624
+ error && "text-destructive",
1625
+ labelClassName
1610
1626
  ),
1611
1627
  children: [
1612
1628
  label,
@@ -1678,6 +1694,7 @@ var TagInput = (0, import_react4.forwardRef)(
1678
1694
  placeholder,
1679
1695
  placeholderWithTags,
1680
1696
  label,
1697
+ labelClassName,
1681
1698
  hideSearchButton = false,
1682
1699
  hideClearButton = false,
1683
1700
  className,
@@ -1715,14 +1732,14 @@ var TagInput = (0, import_react4.forwardRef)(
1715
1732
  input: "text-sm",
1716
1733
  tag: "px-2 py-1 text-sm gap-1.5 rounded-full",
1717
1734
  tagIcon: "h-3.5 w-3.5",
1718
- button: "h-8 text-sm px-3"
1735
+ button: "h-9 text-sm px-3"
1719
1736
  },
1720
1737
  lg: {
1721
1738
  container: "min-h-12 p-2.5 gap-2 rounded-full",
1722
1739
  input: "text-base",
1723
1740
  tag: "px-2.5 py-1.5 text-base gap-2 rounded-full",
1724
1741
  tagIcon: "h-4 w-4",
1725
- button: "h-9 text-base px-4"
1742
+ button: "h-11 text-base px-4"
1726
1743
  }
1727
1744
  };
1728
1745
  const addTag = (tagValue) => {
@@ -1790,7 +1807,8 @@ var TagInput = (0, import_react4.forwardRef)(
1790
1807
  className: cn(
1791
1808
  "block font-medium transition-colors duration-200",
1792
1809
  size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
1793
- disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground"
1810
+ disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
1811
+ labelClassName
1794
1812
  ),
1795
1813
  children: [
1796
1814
  label,
@@ -2052,6 +2070,7 @@ var Switch = ({
2052
2070
  checked,
2053
2071
  onCheckedChange,
2054
2072
  label,
2073
+ labelClassName,
2055
2074
  size = "md",
2056
2075
  variant = "default",
2057
2076
  disabled = false,
@@ -2094,79 +2113,60 @@ var Switch = ({
2094
2113
  inactive: "bg-input border-input"
2095
2114
  }
2096
2115
  };
2097
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2098
- "label",
2099
- {
2100
- className: cn(
2101
- "inline-flex items-center gap-3 cursor-pointer select-none",
2102
- disabled && "cursor-not-allowed opacity-50",
2103
- className
2104
- ),
2105
- children: [
2106
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2107
- "div",
2108
- {
2109
- className: cn(
2110
- "relative inline-flex rounded-full align-middle",
2111
- sizeClasses2[size].track,
2112
- // Focus ring styled like shadcn (via peer-visible)
2113
- "peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background",
2114
- disabled && "opacity-50"
2115
- ),
2116
- children: [
2117
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2118
- "input",
2119
- {
2120
- type: "checkbox",
2121
- className: "sr-only peer",
2122
- checked,
2123
- disabled,
2124
- onChange: (e) => !disabled && onCheckedChange(e.target.checked),
2125
- ...props
2126
- }
2127
- ),
2128
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2129
- "div",
2130
- {
2131
- className: cn(
2132
- "block w-full h-full rounded-full transition-colors duration-200 ease-out border",
2133
- checked ? variantClasses2[variant].active : variantClasses2[variant].inactive
2134
- )
2135
- }
2136
- ),
2137
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2138
- "div",
2139
- {
2140
- className: cn(
2141
- "absolute top-0.5 left-0.5 rounded-full transition-transform duration-200 ease-out shadow-sm",
2142
- sizeClasses2[size].handle,
2143
- "bg-background border border-border",
2144
- checked ? sizeClasses2[size].translate : "translate-x-0",
2145
- !disabled && "hover:scale-[1.02]",
2146
- isPressed && "scale-95",
2147
- disabled && "opacity-70"
2148
- ),
2149
- onMouseDown: () => !disabled && setIsPressed(true),
2150
- onMouseUp: () => setIsPressed(false),
2151
- onMouseLeave: () => setIsPressed(false)
2152
- }
2153
- )
2154
- ]
2155
- }
2116
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("label", { className: cn("inline-flex items-center gap-3 cursor-pointer select-none", disabled && "cursor-not-allowed opacity-50", className), children: [
2117
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2118
+ "div",
2119
+ {
2120
+ className: cn(
2121
+ "relative inline-flex rounded-full align-middle",
2122
+ sizeClasses2[size].track,
2123
+ // Focus ring styled like shadcn (via peer-visible)
2124
+ "peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-background",
2125
+ disabled && "opacity-50"
2156
2126
  ),
2157
- label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2158
- "span",
2159
- {
2160
- className: cn(
2161
- "text-sm font-medium text-foreground transition-colors",
2162
- disabled && "text-muted-foreground"
2163
- ),
2164
- children: label
2165
- }
2166
- )
2167
- ]
2168
- }
2169
- );
2127
+ children: [
2128
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2129
+ "input",
2130
+ {
2131
+ type: "checkbox",
2132
+ className: "sr-only peer",
2133
+ checked,
2134
+ disabled,
2135
+ onChange: (e) => !disabled && onCheckedChange(e.target.checked),
2136
+ ...props
2137
+ }
2138
+ ),
2139
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2140
+ "div",
2141
+ {
2142
+ className: cn(
2143
+ "block w-full h-full rounded-full transition-colors duration-200 ease-out border",
2144
+ checked ? variantClasses2[variant].active : variantClasses2[variant].inactive
2145
+ )
2146
+ }
2147
+ ),
2148
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2149
+ "div",
2150
+ {
2151
+ className: cn(
2152
+ "absolute top-0.5 left-0.5 rounded-full transition-transform duration-200 ease-out shadow-sm",
2153
+ sizeClasses2[size].handle,
2154
+ "bg-background border border-border",
2155
+ checked ? sizeClasses2[size].translate : "translate-x-0",
2156
+ !disabled && "hover:scale-[1.02]",
2157
+ isPressed && "scale-95",
2158
+ disabled && "opacity-70"
2159
+ ),
2160
+ onMouseDown: () => !disabled && setIsPressed(true),
2161
+ onMouseUp: () => setIsPressed(false),
2162
+ onMouseLeave: () => setIsPressed(false)
2163
+ }
2164
+ )
2165
+ ]
2166
+ }
2167
+ ),
2168
+ label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: cn("text-sm font-medium text-foreground transition-colors", disabled && "text-muted-foreground", labelClassName), children: label })
2169
+ ] });
2170
2170
  };
2171
2171
  Switch.displayName = "Switch";
2172
2172
  var Switch_default = Switch;
@@ -5010,6 +5010,7 @@ var Combobox = ({
5010
5010
  allowClear = false,
5011
5011
  usePortal = true,
5012
5012
  label,
5013
+ labelClassName,
5013
5014
  required,
5014
5015
  fontBold = false,
5015
5016
  loading: loading2 = false,
@@ -5351,7 +5352,8 @@ var Combobox = ({
5351
5352
  className: cn(
5352
5353
  labelSize,
5353
5354
  "font-medium transition-colors duration-200",
5354
- disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary"
5355
+ disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
5356
+ labelClassName
5355
5357
  ),
5356
5358
  children: [
5357
5359
  label,
@@ -5839,6 +5841,7 @@ var DatePicker = ({
5839
5841
  disabled = false,
5840
5842
  size = "md",
5841
5843
  label,
5844
+ labelClassName,
5842
5845
  required,
5843
5846
  todayLabel,
5844
5847
  clearLabel,
@@ -5896,7 +5899,7 @@ var DatePicker = ({
5896
5899
  footerMargin: "mt-3 pt-2 gap-1.5"
5897
5900
  },
5898
5901
  md: {
5899
- trigger: "px-3 py-2.5 text-sm h-11",
5902
+ trigger: "px-3 py-2.5 text-sm h-10",
5900
5903
  dayCell: "w-8 h-8 text-sm",
5901
5904
  monthCell: "w-8 h-8 text-sm",
5902
5905
  navButton: "p-2",
@@ -5913,7 +5916,7 @@ var DatePicker = ({
5913
5916
  footerMargin: "mt-4 pt-3 gap-2"
5914
5917
  },
5915
5918
  lg: {
5916
- trigger: "px-4 py-3 text-base h-14",
5919
+ trigger: "px-4 py-3 text-base h-12",
5917
5920
  dayCell: "w-10 h-10 text-base",
5918
5921
  monthCell: "w-10 h-10 text-base",
5919
5922
  navButton: "p-2.5",
@@ -6242,7 +6245,8 @@ var DatePicker = ({
6242
6245
  className: cn(
6243
6246
  labelSize,
6244
6247
  "font-semibold transition-colors duration-300 cursor-pointer",
6245
- disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary"
6248
+ disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary",
6249
+ labelClassName
6246
6250
  ),
6247
6251
  children: [
6248
6252
  label,
@@ -6377,7 +6381,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
6377
6381
  footerMargin: "mt-3 pt-2 gap-1.5"
6378
6382
  },
6379
6383
  md: {
6380
- trigger: "px-3 py-2.5 text-sm h-11",
6384
+ trigger: "px-3 py-2.5 text-sm h-10",
6381
6385
  dayCell: "w-8 h-8 text-sm",
6382
6386
  monthCell: "w-8 h-8 text-sm",
6383
6387
  navButton: "p-2",
@@ -6394,7 +6398,7 @@ var DateRangePicker = ({ startDate, endDate, onChange, placeholder = "Select dat
6394
6398
  footerMargin: "mt-4 pt-3 gap-2"
6395
6399
  },
6396
6400
  lg: {
6397
- trigger: "px-4 py-3 text-base h-14",
6401
+ trigger: "px-4 py-3 text-base h-12",
6398
6402
  dayCell: "w-10 h-10 text-base",
6399
6403
  monthCell: "w-10 h-10 text-base",
6400
6404
  navButton: "p-2.5",
@@ -7144,6 +7148,7 @@ function MonthYearPicker({
7144
7148
  disabled = false,
7145
7149
  size = "md",
7146
7150
  label,
7151
+ labelClassName,
7147
7152
  required,
7148
7153
  clearable = true,
7149
7154
  variant = "default",
@@ -7455,7 +7460,7 @@ function MonthYearPicker({
7455
7460
  ] });
7456
7461
  if (variant === "inline") {
7457
7462
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("w-full", className), ...rest, children: [
7458
- label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80"), children: [
7463
+ label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80", labelClassName), children: [
7459
7464
  label,
7460
7465
  required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-destructive ml-0.5", children: "*" })
7461
7466
  ] }),
@@ -7464,7 +7469,7 @@ function MonthYearPicker({
7464
7469
  ] });
7465
7470
  }
7466
7471
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("w-full", className), ...rest, children: [
7467
- label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80"), children: [
7472
+ label && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80", labelClassName), children: [
7468
7473
  label,
7469
7474
  required && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-destructive ml-0.5", children: "*" })
7470
7475
  ] }),
@@ -9256,6 +9261,7 @@ var DateTimePicker = ({
9256
9261
  format = "24",
9257
9262
  includeSeconds = false,
9258
9263
  label,
9264
+ labelClassName,
9259
9265
  required,
9260
9266
  doneLabel,
9261
9267
  clearLabel,
@@ -9394,7 +9400,7 @@ var DateTimePicker = ({
9394
9400
  };
9395
9401
  const weekdays = getWeekdays(locale);
9396
9402
  return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("space-y-1.5", className), children: [
9397
- label && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { className: cn(sizeStyles8[size].label, "font-medium text-foreground flex items-center gap-1"), children: [
9403
+ label && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("label", { className: cn(sizeStyles8[size].label, "font-medium text-foreground flex items-center gap-1", labelClassName), children: [
9398
9404
  label,
9399
9405
  " ",
9400
9406
  required && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-destructive", children: "*" })
@@ -12237,6 +12243,7 @@ var MultiCombobox = ({
12237
12243
  size = "md",
12238
12244
  variant = "default",
12239
12245
  label,
12246
+ labelClassName,
12240
12247
  title,
12241
12248
  required,
12242
12249
  displayFormat = (option) => option.label,
@@ -12528,7 +12535,7 @@ var MultiCombobox = ({
12528
12535
  !!error && "border-destructive focus-visible:ring-destructive/30"
12529
12536
  ),
12530
12537
  children: [
12531
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("flex items-center gap-1.5 flex-wrap flex-1", size === "sm" ? "min-h-4" : size === "lg" ? "min-h-8" : "min-h-6"), children: value.length > 0 ? showTags ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
12538
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("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__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
12532
12539
  visibleTags.map((option) => {
12533
12540
  if (renderTag) {
12534
12541
  return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(React34.Fragment, { children: renderTag(option, () => handleRemove(option.value)) }, option.value);
@@ -12537,7 +12544,7 @@ var MultiCombobox = ({
12537
12544
  "span",
12538
12545
  {
12539
12546
  className: cn(
12540
- "inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200",
12547
+ "inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200 shrink-0",
12541
12548
  "hover:bg-primary/20",
12542
12549
  sizeStyles8[size].tag
12543
12550
  ),
@@ -12571,7 +12578,7 @@ var MultiCombobox = ({
12571
12578
  option.value
12572
12579
  );
12573
12580
  }),
12574
- hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: cn("inline-flex items-center bg-muted text-muted-foreground rounded-lg", sizeStyles8[size].tag), children: [
12581
+ hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: cn("inline-flex items-center bg-muted text-muted-foreground rounded-lg shrink-0", sizeStyles8[size].tag), children: [
12575
12582
  "+",
12576
12583
  hiddenCount,
12577
12584
  " more"
@@ -12620,7 +12627,8 @@ var MultiCombobox = ({
12620
12627
  className: cn(
12621
12628
  size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
12622
12629
  "font-medium transition-colors duration-200",
12623
- disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary"
12630
+ disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
12631
+ labelClassName
12624
12632
  ),
12625
12633
  children: [
12626
12634
  title,
@@ -12636,7 +12644,8 @@ var MultiCombobox = ({
12636
12644
  className: cn(
12637
12645
  labelSize,
12638
12646
  "font-medium transition-colors duration-200",
12639
- disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary"
12647
+ disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
12648
+ labelClassName
12640
12649
  ),
12641
12650
  children: [
12642
12651
  label,
@@ -12768,7 +12777,7 @@ var sizeStyles7 = {
12768
12777
  }
12769
12778
  };
12770
12779
  var RadioGroupItem = React35.forwardRef(
12771
- ({ value, id, disabled, className, children, label, description, icon }, ref) => {
12780
+ ({ value, id, disabled, className, children, label, labelClassName, description, icon }, ref) => {
12772
12781
  const { value: selectedValue, onValueChange, name, disabled: groupDisabled, size = "md", variant = "default" } = useRadioGroup();
12773
12782
  const isDisabled = disabled || groupDisabled;
12774
12783
  const isSelected = selectedValue === value;
@@ -12819,7 +12828,7 @@ var RadioGroupItem = React35.forwardRef(
12819
12828
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex-1 min-w-0", children: [
12820
12829
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
12821
12830
  Icon && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Icon, { className: "h-4 w-4 text-foreground" }),
12822
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("label", { htmlFor: radioId, className: cn("font-medium text-foreground cursor-pointer", sizeStyles7[size].text), children: label || children })
12831
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("label", { htmlFor: radioId, className: cn("font-medium text-foreground cursor-pointer", sizeStyles7[size].text, labelClassName), children: label || children })
12823
12832
  ] }),
12824
12833
  description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-muted-foreground mt-1 text-xs", children: description })
12825
12834
  ] })
@@ -12914,7 +12923,8 @@ var RadioGroupItem = React35.forwardRef(
12914
12923
  "font-medium text-foreground cursor-pointer flex-1",
12915
12924
  "disabled:cursor-not-allowed disabled:opacity-50",
12916
12925
  sizeStyles7[size].text,
12917
- isDisabled && "cursor-not-allowed opacity-50"
12926
+ isDisabled && "cursor-not-allowed opacity-50",
12927
+ labelClassName
12918
12928
  ),
12919
12929
  children: [
12920
12930
  /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", children: [
@@ -17385,6 +17395,7 @@ function LineChart({
17385
17395
  curved = true,
17386
17396
  formatValue,
17387
17397
  referenceLines = [],
17398
+ labelClassName,
17388
17399
  className = ""
17389
17400
  }) {
17390
17401
  const svgRef = (0, import_react25.useRef)(null);
@@ -17452,7 +17463,18 @@ function LineChart({
17452
17463
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("rect", { x: padding.left, y: padding.top, width: chartWidth, height: chartHeight }) }) }),
17453
17464
  showGrid && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("g", { children: [
17454
17465
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("line", { x1: padding.left, y1: line.y, x2: width - padding.right, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
17455
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("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) })
17466
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
17467
+ "text",
17468
+ {
17469
+ x: padding.left - 8,
17470
+ y: line.y + 4,
17471
+ textAnchor: "end",
17472
+ fontSize: "10",
17473
+ fill: "currentColor",
17474
+ className: labelClassName || "text-muted-foreground",
17475
+ children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
17476
+ }
17477
+ )
17456
17478
  ] }, i)) }),
17457
17479
  /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("g", { clipPath: `url(#${clipId})`, children: [
17458
17480
  processedSeries.map(
@@ -17573,7 +17595,19 @@ function LineChart({
17573
17595
  ) }),
17574
17596
  showLabels && labels.map((lbl, i) => {
17575
17597
  const x = padding.left + i / (labels.length - 1 || 1) * chartWidth;
17576
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("text", { x, y: height - 10, textAnchor: "middle", fontSize: "10", className: "text-muted-foreground", fill: "currentColor", children: lbl }, i);
17598
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
17599
+ "text",
17600
+ {
17601
+ x,
17602
+ y: height - 10,
17603
+ textAnchor: "middle",
17604
+ fontSize: "10",
17605
+ className: labelClassName || "text-muted-foreground",
17606
+ fill: "currentColor",
17607
+ children: lbl
17608
+ },
17609
+ i
17610
+ );
17577
17611
  }),
17578
17612
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("style", { children: `
17579
17613
  @keyframes drawLine {
@@ -17635,6 +17669,7 @@ function BarChart({
17635
17669
  barRadius = 4,
17636
17670
  barGap = 0.3,
17637
17671
  formatValue,
17672
+ labelClassName,
17638
17673
  className = ""
17639
17674
  }) {
17640
17675
  const svgRef = (0, import_react26.useRef)(null);
@@ -17763,10 +17798,32 @@ function BarChart({
17763
17798
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("svg", { ref: svgRef, width, height, className: `overflow-visible ${className}`, style: { fontFamily: "inherit" }, children: [
17764
17799
  showGrid && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("g", { children: horizontal ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
17765
17800
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("line", { x1: line.x, y1: line.y1, x2: line.x, y2: line.y2, stroke: "currentColor", strokeDasharray: "4 4" }),
17766
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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) })
17801
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
17802
+ "text",
17803
+ {
17804
+ x: line.x,
17805
+ y: height - 8,
17806
+ textAnchor: "middle",
17807
+ fontSize: "10",
17808
+ className: labelClassName || "text-muted-foreground",
17809
+ fill: "currentColor",
17810
+ children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
17811
+ }
17812
+ )
17767
17813
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
17768
17814
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("line", { x1: line.x1, y1: line.y, x2: line.x2, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
17769
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("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) })
17815
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
17816
+ "text",
17817
+ {
17818
+ x: padding.left - 8,
17819
+ y: line.y + 4,
17820
+ textAnchor: "end",
17821
+ fontSize: "10",
17822
+ className: labelClassName || "text-muted-foreground",
17823
+ fill: "currentColor",
17824
+ children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
17825
+ }
17826
+ )
17770
17827
  ] }) }, i)) }),
17771
17828
  barGroups.map((group, gi) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("g", { children: [
17772
17829
  group.bars.map((bar, bi) => {
@@ -17842,7 +17899,7 @@ function BarChart({
17842
17899
  y: horizontal ? padding.top + (gi + 0.5) * (chartHeight / barGroups.length) + 4 : height - 10,
17843
17900
  textAnchor: horizontal ? "end" : "middle",
17844
17901
  fontSize: "10",
17845
- className: "text-muted-foreground",
17902
+ className: labelClassName || "text-muted-foreground",
17846
17903
  fill: "currentColor",
17847
17904
  children: group.label
17848
17905
  }
@@ -17896,6 +17953,7 @@ function PieChart({
17896
17953
  startAngle = -90,
17897
17954
  renderCenter,
17898
17955
  formatValue,
17956
+ labelClassName,
17899
17957
  className = ""
17900
17958
  }) {
17901
17959
  const containerRef = (0, import_react27.useRef)(null);
@@ -17988,7 +18046,7 @@ function PieChart({
17988
18046
  y: seg.labelY,
17989
18047
  textAnchor: seg.labelX > center ? "start" : "end",
17990
18048
  fontSize: "10",
17991
- className: "text-foreground",
18049
+ className: labelClassName || "text-foreground",
17992
18050
  fill: "currentColor",
17993
18051
  style: animated ? { opacity: 0, animation: `fadeIn 0.3s ease-out ${i * 0.1 + 0.3}s forwards` } : void 0,
17994
18052
  children: showPercentage ? `${(seg.percentage * 100).toFixed(0)}%` : formatValue ? formatValue(seg.value) : seg.value
@@ -18064,6 +18122,7 @@ function AreaChart({
18064
18122
  curved = true,
18065
18123
  formatValue,
18066
18124
  emptyText = "No data",
18125
+ labelClassName,
18067
18126
  className = ""
18068
18127
  }) {
18069
18128
  const containerRef = (0, import_react28.useRef)(null);
@@ -18154,7 +18213,18 @@ function AreaChart({
18154
18213
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("clipPath", { id: clipId, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("rect", { x: padding.left, y: padding.top, width: chartWidth, height: chartHeight }) }) }),
18155
18214
  showGrid && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("g", { className: "text-muted-foreground/20", children: gridLines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("g", { children: [
18156
18215
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("line", { x1: padding.left, y1: line.y, x2: width - padding.right, y2: line.y, stroke: "currentColor", strokeDasharray: "4 4" }),
18157
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("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) })
18216
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
18217
+ "text",
18218
+ {
18219
+ x: padding.left - 8,
18220
+ y: line.y + 4,
18221
+ textAnchor: "end",
18222
+ fontSize: "10",
18223
+ className: labelClassName || "text-muted-foreground",
18224
+ fill: "currentColor",
18225
+ children: formatValue ? formatValue(line.value) : line.value.toFixed(0)
18226
+ }
18227
+ )
18158
18228
  ] }, i)) }),
18159
18229
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("g", { clipPath: `url(#${clipId})`, children: [...processedSeries].reverse().map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
18160
18230
  "path",
@@ -18231,7 +18301,7 @@ function AreaChart({
18231
18301
  `dot-${seriesIdx}-${i}`
18232
18302
  ))
18233
18303
  ),
18234
- showLabels && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("g", { className: "text-muted-foreground", children: labels.map((label, i) => {
18304
+ showLabels && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("g", { className: labelClassName || "text-muted-foreground", children: labels.map((label, i) => {
18235
18305
  const x = padding.left + i / (labels.length - 1) * chartWidth;
18236
18306
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("text", { x, y: height - 10, textAnchor: "middle", fontSize: "10", fill: "currentColor", children: label }, i);
18237
18307
  }) }),
@@ -18439,6 +18509,7 @@ function RadarChart({
18439
18509
  showValues = false,
18440
18510
  animated = true,
18441
18511
  formatValue,
18512
+ labelClassName,
18442
18513
  className = ""
18443
18514
  }) {
18444
18515
  const containerRef = (0, import_react30.useRef)(null);
@@ -18585,7 +18656,7 @@ function RadarChart({
18585
18656
  ))
18586
18657
  ] }, i)
18587
18658
  ),
18588
- showLabels && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("g", { className: "text-muted-foreground", children: axes.map((axis, i) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("text", { x: axis.labelX, y: axis.labelY, textAnchor: "middle", dominantBaseline: "middle", fontSize: "11", fill: "currentColor", children: axis.label }, i)) }),
18659
+ showLabels && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("g", { className: labelClassName || "text-muted-foreground", children: axes.map((axis, i) => /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("text", { x: axis.labelX, y: axis.labelY, textAnchor: "middle", dominantBaseline: "middle", fontSize: "11", fill: "currentColor", children: axis.label }, i)) }),
18589
18660
  /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("style", { children: `
18590
18661
  @keyframes radarPop {
18591
18662
  from {
@@ -18665,6 +18736,7 @@ function GaugeChart({
18665
18736
  endAngle = 135,
18666
18737
  zones,
18667
18738
  formatValue,
18739
+ labelClassName,
18668
18740
  className = ""
18669
18741
  }) {
18670
18742
  const center = size / 2;
@@ -18751,7 +18823,7 @@ function GaugeChart({
18751
18823
  ]
18752
18824
  }
18753
18825
  ),
18754
- showMinMax && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("g", { className: "text-muted-foreground", children: [
18826
+ showMinMax && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("g", { className: labelClassName || "text-muted-foreground", children: [
18755
18827
  /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
18756
18828
  "text",
18757
18829
  {