@underverse-ui/underverse 2.0.5 → 2.0.7

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
@@ -4,7 +4,7 @@ import {
4
4
  extractImageSrcsFromHtml,
5
5
  normalizeImageUrl,
6
6
  prepareUEditorContentForSave
7
- } from "./chunk-2UQ7H5GR.js";
7
+ } from "./chunk-XE3RJHVX.js";
8
8
  import {
9
9
  EmojiPicker_default
10
10
  } from "./chunk-A7XL4RDV.js";
@@ -16,7 +16,7 @@ import {
16
16
  import "./chunk-4TYW5K4J.js";
17
17
  import {
18
18
  Modal_default
19
- } from "./chunk-OZH3EDGZ.js";
19
+ } from "./chunk-JINSMREP.js";
20
20
  import {
21
21
  DropdownMenuItem,
22
22
  DropdownMenuSeparator,
@@ -25,6 +25,7 @@ import {
25
25
  SelectDropdown,
26
26
  UnderverseConfigProvider,
27
27
  formControlFixedClass,
28
+ formControlLabelClass,
28
29
  formControlSizeStyles,
29
30
  formControlValueClass,
30
31
  getAnimationStyles,
@@ -34,7 +35,7 @@ import {
34
35
  shadcnAnimationStyles,
35
36
  useShadCNAnimations,
36
37
  useUnderverseUIConfig
37
- } from "./chunk-JXE7JBQV.js";
38
+ } from "./chunk-TETMVVUP.js";
38
39
  import {
39
40
  ForceInternalTranslationsProvider,
40
41
  NextIntlAdapter,
@@ -591,7 +592,7 @@ var Checkbox = React3.forwardRef(
591
592
  children: isChecked && /* @__PURE__ */ jsx4(Check, { className: "w-4 h-4" })
592
593
  }
593
594
  ),
594
- label && /* @__PURE__ */ jsx4("span", { className: cn("text-sm text-foreground", labelClassName), children: label })
595
+ label && /* @__PURE__ */ jsx4("span", { className: cn("text-sm text-foreground", formControlLabelClass, labelClassName), children: label })
595
596
  ] });
596
597
  }
597
598
  );
@@ -975,7 +976,8 @@ var Input = forwardRef3(
975
976
  className: cn(
976
977
  // Label size follows input size
977
978
  sizeStyles7[size].label,
978
- "font-medium transition-colors duration-200",
979
+ formControlLabelClass,
980
+ "transition-colors duration-200",
979
981
  // default color and highlight while any descendant focused
980
982
  disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
981
983
  errMsg && "text-destructive",
@@ -1393,7 +1395,8 @@ var Textarea = forwardRef3(
1393
1395
  "label",
1394
1396
  {
1395
1397
  className: cn(
1396
- "text-sm font-medium transition-colors duration-200",
1398
+ "text-sm transition-colors duration-200",
1399
+ formControlLabelClass,
1397
1400
  isFocused ? "text-primary" : "text-foreground",
1398
1401
  error && "text-destructive",
1399
1402
  labelClassName
@@ -2344,7 +2347,8 @@ var TagInput = forwardRef4(
2344
2347
  {
2345
2348
  htmlFor: inputId,
2346
2349
  className: cn(
2347
- "block font-medium transition-colors duration-200",
2350
+ "block transition-colors duration-200",
2351
+ formControlLabelClass,
2348
2352
  formControlSizeStyles[size].label,
2349
2353
  disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
2350
2354
  labelClassName
@@ -2618,7 +2622,7 @@ var Switch = ({
2618
2622
  ]
2619
2623
  }
2620
2624
  ),
2621
- label && /* @__PURE__ */ jsx10("span", { className: cn("text-sm font-medium text-foreground transition-colors", disabled && "text-muted-foreground", labelClassName), children: label })
2625
+ label && /* @__PURE__ */ jsx10("span", { className: cn("text-sm text-foreground transition-colors", formControlLabelClass, disabled && "text-muted-foreground", labelClassName), children: label })
2622
2626
  ] });
2623
2627
  };
2624
2628
  Switch.displayName = "Switch";
@@ -2629,7 +2633,7 @@ import * as React10 from "react";
2629
2633
  import { cva } from "class-variance-authority";
2630
2634
  import { jsx as jsx11 } from "react/jsx-runtime";
2631
2635
  var labelVariants = cva(
2632
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2636
+ `text-sm ${formControlLabelClass} leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`
2633
2637
  );
2634
2638
  var Label = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx11(
2635
2639
  "label",
@@ -4957,7 +4961,7 @@ var Combobox = ({
4957
4961
  variantStyles5[variant],
4958
4962
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
4959
4963
  "disabled:cursor-not-allowed disabled:opacity-50",
4960
- open && "ring-2 ring-primary/20 border-primary",
4964
+ open && "border-primary",
4961
4965
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30",
4962
4966
  className
4963
4967
  )
@@ -5021,7 +5025,8 @@ var Combobox = ({
5021
5025
  onClick: () => triggerRef.current?.focus(),
5022
5026
  className: cn(
5023
5027
  labelSize,
5024
- "font-medium transition-colors duration-200",
5028
+ formControlLabelClass,
5029
+ "transition-colors duration-200",
5025
5030
  disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
5026
5031
  effectiveError && "text-destructive",
5027
5032
  labelClassName
@@ -6289,7 +6294,8 @@ var DatePicker = ({
6289
6294
  onClick: () => inputRef.current?.focus(),
6290
6295
  className: cn(
6291
6296
  labelSize,
6292
- "font-semibold transition-colors duration-300 cursor-pointer",
6297
+ formControlLabelClass,
6298
+ "transition-colors duration-300 cursor-pointer",
6293
6299
  disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary",
6294
6300
  effectiveError && "text-destructive",
6295
6301
  labelClassName
@@ -6347,11 +6353,11 @@ var DatePicker = ({
6347
6353
  formControlSizeStyles[requestedSize].control,
6348
6354
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
6349
6355
  "border-border/60 hover:border-primary/40",
6350
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
6351
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
6356
+ "focus-within:border-primary focus-within:ring-0",
6357
+ "hover:bg-accent/10"
6352
6358
  ],
6353
6359
  "transition-all duration-300 ease-out",
6354
- isOpen && !isFocused && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
6360
+ isOpen && !isFocused && "border-primary shadow-lg shadow-primary/10",
6355
6361
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5",
6356
6362
  className
6357
6363
  ),
@@ -7048,7 +7054,8 @@ var DateRangePicker = ({
7048
7054
  onClick: () => inputRef.current?.focus(),
7049
7055
  className: cn(
7050
7056
  size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
7051
- "font-medium transition-colors duration-300",
7057
+ formControlLabelClass,
7058
+ "transition-colors duration-300",
7052
7059
  disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground group-focus-within:text-primary hover:text-primary cursor-pointer",
7053
7060
  effectiveError && "text-destructive",
7054
7061
  labelClassName
@@ -7105,11 +7112,11 @@ var DateRangePicker = ({
7105
7112
  formControlSizeStyles[requestedSize].control,
7106
7113
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
7107
7114
  "border-border/60 hover:border-primary/40",
7108
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
7109
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
7115
+ "focus-within:border-primary focus-within:ring-0",
7116
+ "hover:bg-accent/10"
7110
7117
  ],
7111
7118
  "transition-all duration-300 ease-out",
7112
- isOpen && !isFocused && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
7119
+ isOpen && !isFocused && "border-primary shadow-lg shadow-primary/10",
7113
7120
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
7114
7121
  ),
7115
7122
  children: [
@@ -7986,7 +7993,8 @@ var LunarDatePicker = ({
7986
7993
  onClick: () => inputRef.current?.focus(),
7987
7994
  className: cn(
7988
7995
  labelSize,
7989
- "font-semibold transition-colors duration-300 cursor-pointer",
7996
+ formControlLabelClass,
7997
+ "transition-colors duration-300 cursor-pointer",
7990
7998
  disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary hover:text-primary",
7991
7999
  effectiveError && "text-destructive",
7992
8000
  labelClassName
@@ -8044,11 +8052,11 @@ var LunarDatePicker = ({
8044
8052
  formControlSizeStyles[requestedSize].control,
8045
8053
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
8046
8054
  "border-border/60 hover:border-primary/40",
8047
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
8048
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
8055
+ "focus-within:border-primary focus-within:ring-0",
8056
+ "hover:bg-accent/10"
8049
8057
  ],
8050
8058
  "transition-all duration-300 ease-out",
8051
- isOpen && !isFocused && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
8059
+ isOpen && !isFocused && "border-primary shadow-lg shadow-primary/10",
8052
8060
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5",
8053
8061
  className
8054
8062
  ),
@@ -8615,7 +8623,8 @@ var LunarDateRangePicker = ({
8615
8623
  onClick: () => setIsOpen(true),
8616
8624
  className: cn(
8617
8625
  size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
8618
- "font-medium transition-colors duration-300",
8626
+ formControlLabelClass,
8627
+ "transition-colors duration-300",
8619
8628
  disabled ? "text-muted-foreground cursor-not-allowed" : "text-foreground group-focus-within:text-primary hover:text-primary cursor-pointer",
8620
8629
  effectiveError && "text-destructive",
8621
8630
  labelClassName
@@ -8683,11 +8692,11 @@ var LunarDateRangePicker = ({
8683
8692
  formControlSizeStyles[requestedSize].control,
8684
8693
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
8685
8694
  "border-border/60 hover:border-primary/40",
8686
- "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
8687
- "hover:bg-accent/10 hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5"
8695
+ "focus-within:border-primary focus-within:ring-0",
8696
+ "hover:bg-accent/10"
8688
8697
  ],
8689
8698
  "transition-all duration-300 ease-out text-left",
8690
- isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
8699
+ isOpen && "border-primary shadow-lg shadow-primary/10",
8691
8700
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
8692
8701
  ),
8693
8702
  children: [
@@ -9378,8 +9387,7 @@ function MonthYearPicker({
9378
9387
  effectiveError && "border-destructive/60 focus-visible:ring-destructive/50 bg-destructive/5",
9379
9388
  success && !effectiveError && "border-success/60 focus-visible:ring-success/50 bg-success/5",
9380
9389
  !effectiveError && !success && "border-border/60 hover:border-primary/40 hover:bg-accent/10",
9381
- animate && !disabled && "hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
9382
- open && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
9390
+ open && "border-primary shadow-lg shadow-primary/10",
9383
9391
  className
9384
9392
  ),
9385
9393
  children: [
@@ -9524,7 +9532,7 @@ function MonthYearPicker({
9524
9532
  ] });
9525
9533
  if (variant === "inline") {
9526
9534
  return /* @__PURE__ */ jsxs22("div", { className: cn("w-full", className), ...rest, children: [
9527
- label && /* @__PURE__ */ jsxs22("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80", effectiveError && "text-destructive", labelClassName), children: [
9535
+ label && /* @__PURE__ */ jsxs22("label", { className: cn(sz.label, "block mb-1.5 text-foreground/80", formControlLabelClass, effectiveError && "text-destructive", labelClassName), children: [
9528
9536
  label,
9529
9537
  required && /* @__PURE__ */ jsx29("span", { className: "text-destructive ml-0.5", children: "*" })
9530
9538
  ] }),
@@ -9561,7 +9569,7 @@ function MonthYearPicker({
9561
9569
  ] });
9562
9570
  }
9563
9571
  return /* @__PURE__ */ jsxs22("div", { className: cn("w-full", className), ...rest, children: [
9564
- label && /* @__PURE__ */ jsxs22("label", { className: cn(sz.label, "block mb-1.5 font-medium text-foreground/80", effectiveError && "text-destructive", labelClassName), children: [
9572
+ label && /* @__PURE__ */ jsxs22("label", { className: cn(sz.label, "block mb-1.5 text-foreground/80", formControlLabelClass, effectiveError && "text-destructive", labelClassName), children: [
9565
9573
  label,
9566
9574
  required && /* @__PURE__ */ jsx29("span", { className: "text-destructive ml-0.5", children: "*" })
9567
9575
  ] }),
@@ -11094,8 +11102,7 @@ function TimePicker({
11094
11102
  effectiveError && "border-destructive/60 focus-visible:ring-destructive/50 bg-destructive/5",
11095
11103
  success && !effectiveError && "border-success/60 focus-visible:ring-success/50 bg-success/5",
11096
11104
  !effectiveError && !success && "border-border/60 hover:border-primary/40 hover:bg-accent/10",
11097
- animate && !disabled && "hover:shadow-lg hover:shadow-primary/5 hover:-translate-y-0.5",
11098
- open && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
11105
+ open && "border-primary shadow-lg shadow-primary/10",
11099
11106
  className
11100
11107
  ),
11101
11108
  children: [
@@ -11437,7 +11444,7 @@ function TimePicker({
11437
11444
  "label",
11438
11445
  {
11439
11446
  id: labelId,
11440
- className: cn(sz.label, "font-semibold", disabled ? "text-muted-foreground" : "text-foreground", effectiveError && "text-destructive"),
11447
+ className: cn(sz.label, formControlLabelClass, disabled ? "text-muted-foreground" : "text-foreground", effectiveError && "text-destructive"),
11441
11448
  children: [
11442
11449
  label,
11443
11450
  required && /* @__PURE__ */ jsx31("span", { className: "text-destructive ml-1", children: "*" })
@@ -11485,7 +11492,7 @@ function TimePicker({
11485
11492
  htmlFor: triggerId,
11486
11493
  className: cn(
11487
11494
  sz.label,
11488
- "font-semibold",
11495
+ formControlLabelClass,
11489
11496
  disabled ? "text-muted-foreground" : "text-foreground",
11490
11497
  effectiveError && "text-destructive",
11491
11498
  "cursor-pointer transition-colors hover:text-primary"
@@ -11726,7 +11733,13 @@ var DateTimePicker = ({
11726
11733
  {
11727
11734
  id: labelId,
11728
11735
  htmlFor: triggerId,
11729
- className: cn(sizeStyles7[size].label, "font-medium text-foreground flex items-center gap-1", effectiveError && "text-destructive", labelClassName),
11736
+ className: cn(
11737
+ sizeStyles7[size].label,
11738
+ formControlLabelClass,
11739
+ "text-foreground flex items-center gap-1",
11740
+ effectiveError && "text-destructive",
11741
+ labelClassName
11742
+ ),
11730
11743
  children: [
11731
11744
  label,
11732
11745
  " ",
@@ -15254,7 +15267,7 @@ var MultiCombobox = ({
15254
15267
  variantStyles5[variant],
15255
15268
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",
15256
15269
  "disabled:cursor-not-allowed disabled:opacity-50",
15257
- open && "ring-2 ring-primary/20 border-primary",
15270
+ open && "border-primary",
15258
15271
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30"
15259
15272
  ),
15260
15273
  children: [
@@ -15340,7 +15353,8 @@ var MultiCombobox = ({
15340
15353
  {
15341
15354
  className: cn(
15342
15355
  size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
15343
- "font-medium transition-colors duration-200",
15356
+ formControlLabelClass,
15357
+ "transition-colors duration-200",
15344
15358
  disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
15345
15359
  effectiveError && "text-destructive",
15346
15360
  labelClassName
@@ -15358,7 +15372,8 @@ var MultiCombobox = ({
15358
15372
  onClick: () => triggerRef.current?.focus(),
15359
15373
  className: cn(
15360
15374
  labelSize,
15361
- "font-medium transition-colors duration-200",
15375
+ formControlLabelClass,
15376
+ "transition-colors duration-200",
15362
15377
  disabled ? "text-muted-foreground" : "text-foreground group-focus-within:text-primary",
15363
15378
  effectiveError && "text-destructive",
15364
15379
  labelClassName
@@ -15576,7 +15591,7 @@ var RadioGroupItem = React36.forwardRef(
15576
15591
  /* @__PURE__ */ jsxs33("div", { className: "flex-1 min-w-0", children: [
15577
15592
  /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
15578
15593
  Icon && /* @__PURE__ */ jsx40(Icon, { className: "h-4 w-4 text-foreground" }),
15579
- /* @__PURE__ */ jsx40("label", { htmlFor: radioId, className: cn("font-medium text-foreground cursor-pointer", sizeStyles6[size].text, labelClassName), children: label || children })
15594
+ /* @__PURE__ */ jsx40("label", { htmlFor: radioId, className: cn(formControlLabelClass, "text-foreground cursor-pointer", sizeStyles6[size].text, labelClassName), children: label || children })
15580
15595
  ] }),
15581
15596
  description && /* @__PURE__ */ jsx40("p", { className: "text-muted-foreground mt-1 text-xs", children: description })
15582
15597
  ] })
@@ -15611,7 +15626,8 @@ var RadioGroupItem = React36.forwardRef(
15611
15626
  id: radioId,
15612
15627
  disabled: isDisabled,
15613
15628
  className: cn(
15614
- "inline-flex items-center justify-center gap-2 border font-medium transition-all duration-200",
15629
+ "inline-flex items-center justify-center gap-2 border transition-all duration-200",
15630
+ formControlLabelClass,
15615
15631
  getBorderRadiusClass(borderMode ?? "lg"),
15616
15632
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
15617
15633
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -15669,7 +15685,8 @@ var RadioGroupItem = React36.forwardRef(
15669
15685
  {
15670
15686
  htmlFor: radioId,
15671
15687
  className: cn(
15672
- "font-medium text-foreground cursor-pointer flex-1",
15688
+ formControlLabelClass,
15689
+ "text-foreground cursor-pointer flex-1",
15673
15690
  "disabled:cursor-not-allowed disabled:opacity-50",
15674
15691
  sizeStyles6[size].text,
15675
15692
  isDisabled && "cursor-not-allowed opacity-50",
@@ -16074,7 +16091,7 @@ var Slider = React37.forwardRef(
16074
16091
  }
16075
16092
  return /* @__PURE__ */ jsxs34("div", { className: cn("w-full space-y-2", containerClassName), children: [
16076
16093
  (label || showValue) && /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between", children: [
16077
- label && /* @__PURE__ */ jsx41("label", { className: cn("text-sm font-medium text-foreground", labelClassName), children: label }),
16094
+ label && /* @__PURE__ */ jsx41("label", { className: cn("text-sm text-foreground", formControlLabelClass, labelClassName), children: label }),
16078
16095
  showValue && /* @__PURE__ */ jsx41("span", { className: cn("text-xs font-mono text-muted-foreground min-w-8 text-right", valueClassName), children: displayValue })
16079
16096
  ] }),
16080
16097
  /* @__PURE__ */ jsxs34(
@@ -17614,7 +17631,7 @@ function CategoryTreeSelect(props) {
17614
17631
  triggerVariantStyles[variant],
17615
17632
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
17616
17633
  disabled && "opacity-50 cursor-not-allowed hover:transform-none hover:shadow-none",
17617
- isOpen && "ring-2 ring-primary/30 border-primary/50 shadow-lg shadow-primary/10",
17634
+ isOpen && "border-primary shadow-lg shadow-primary/10",
17618
17635
  effectiveError && "border-destructive focus-visible:ring-destructive/30"
17619
17636
  ),
17620
17637
  children: [