@underverse-ui/underverse 1.0.197 → 1.0.199

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
@@ -2915,6 +2915,39 @@ function useOverlayScrollbarTarget(targetRef, options = {}) {
2915
2915
  }
2916
2916
  var OverlayScrollbarProvider_default = OverlayScrollbarProvider;
2917
2917
 
2918
+ // src/components/form-control-size.ts
2919
+ var formControlSizeStyles = {
2920
+ sm: {
2921
+ control: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
2922
+ compactControl: "h-8 px-2.5 text-sm leading-none md:h-7 md:text-xs",
2923
+ input: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
2924
+ label: "text-xs",
2925
+ icon: "h-4 w-4 md:h-3.5 md:w-3.5",
2926
+ iconButton: "h-7 w-7 md:h-6 md:w-6",
2927
+ tag: "h-5 max-w-24 px-2 text-[10px] leading-none"
2928
+ },
2929
+ md: {
2930
+ control: "h-10 px-3 text-sm leading-none",
2931
+ compactControl: "h-10 px-3 text-sm leading-none",
2932
+ input: "h-10 px-4 text-sm leading-none",
2933
+ label: "text-sm",
2934
+ icon: "h-4 w-4",
2935
+ iconButton: "h-8 w-8",
2936
+ tag: "h-6 max-w-28 px-2 text-xs leading-none"
2937
+ },
2938
+ lg: {
2939
+ control: "h-12 px-4 text-base leading-none",
2940
+ compactControl: "h-12 px-4 text-base leading-none",
2941
+ input: "h-12 px-5 text-base leading-none",
2942
+ label: "text-base",
2943
+ icon: "h-5 w-5",
2944
+ iconButton: "h-10 w-10",
2945
+ tag: "h-7 max-w-32 px-2.5 text-sm leading-none"
2946
+ }
2947
+ };
2948
+ var formControlFixedClass = "min-h-0 overflow-hidden";
2949
+ var formControlValueClass = "max-h-full min-w-0 flex-1 truncate whitespace-nowrap";
2950
+
2918
2951
  // src/components/Input.tsx
2919
2952
  import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
2920
2953
  var Input = forwardRef3(
@@ -2978,23 +3011,7 @@ var Input = forwardRef3(
2978
3011
  error: "border-destructive focus-visible:outline-none focus-visible:border-destructive"
2979
3012
  }
2980
3013
  };
2981
- const sizeStyles8 = {
2982
- sm: {
2983
- input: "px-3 py-1.5 text-sm h-8 md:h-7 md:py-1 md:text-xs",
2984
- icon: "w-4 h-4",
2985
- button: "h-7 w-7"
2986
- },
2987
- md: {
2988
- input: "px-4 py-2 text-sm h-10",
2989
- icon: "w-5 h-5",
2990
- button: "h-8 w-8"
2991
- },
2992
- lg: {
2993
- input: "px-5 py-4 text-base h-12",
2994
- icon: "w-6 h-6",
2995
- button: "h-10 w-10"
2996
- }
2997
- };
3014
+ const sizeStyles8 = formControlSizeStyles;
2998
3015
  const getErrorKey = (v) => {
2999
3016
  if (v.valueMissing) return "required";
3000
3017
  if (v.typeMismatch) return "typeMismatch";
@@ -3053,7 +3070,7 @@ var Input = forwardRef3(
3053
3070
  htmlFor: resolvedId,
3054
3071
  className: cn(
3055
3072
  // Label size follows input size
3056
- size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
3073
+ sizeStyles8[size].label,
3057
3074
  "font-medium transition-colors duration-200",
3058
3075
  // default color and highlight while any descendant focused
3059
3076
  disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
@@ -3087,7 +3104,7 @@ var Input = forwardRef3(
3087
3104
  "div",
3088
3105
  {
3089
3106
  className: cn(
3090
- "absolute left-3 top-1/2 -translate-y-1/2 z-10",
3107
+ "absolute left-3 top-1/2 -translate-y-1/2 z-10 flex max-h-full items-center overflow-hidden",
3091
3108
  "text-muted-foreground transition-colors duration-200",
3092
3109
  // highlight icon when input (or controls) focused
3093
3110
  "group-focus-within:text-primary"
@@ -3117,6 +3134,7 @@ var Input = forwardRef3(
3117
3134
  "aria-describedby": [errorId, descId].filter(Boolean).join(" ") || void 0,
3118
3135
  className: cn(
3119
3136
  "w-full text-foreground transition-all duration-200 ease-out",
3137
+ formControlFixedClass,
3120
3138
  "placeholder:text-muted-foreground focus:outline-none focus-visible:outline-none",
3121
3139
  "disabled:cursor-not-allowed disabled:opacity-50",
3122
3140
  // Size styles
@@ -3152,7 +3170,7 @@ var Input = forwardRef3(
3152
3170
  "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-md",
3153
3171
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3154
3172
  "active:bg-accent active:text-accent-foreground",
3155
- sizeStyles8[size].button
3173
+ sizeStyles8[size].iconButton
3156
3174
  ),
3157
3175
  tabIndex: 0,
3158
3176
  "aria-label": gi18n.clearInput ?? "Clear input",
@@ -3168,7 +3186,7 @@ var Input = forwardRef3(
3168
3186
  "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-full",
3169
3187
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/40",
3170
3188
  "active:bg-accent/50 active:text-accent-foreground",
3171
- sizeStyles8[size].button
3189
+ sizeStyles8[size].iconButton
3172
3190
  ),
3173
3191
  tabIndex: 0,
3174
3192
  "aria-label": showPassword ? gi18n.hidePassword ?? "Hide password" : gi18n.showPassword ?? "Show password",
@@ -5707,23 +5725,23 @@ var TagInput = forwardRef5(
5707
5725
  const moreLabel = labels?.moreCount?.replace("{count}", String(hiddenCount)) ?? `+${hiddenCount} more`;
5708
5726
  const sizeStyles8 = {
5709
5727
  sm: {
5710
- container: "min-h-8 p-1.5 gap-1",
5711
- input: "text-xs",
5712
- tag: "px-1.5 py-0.5 text-xs gap-1 rounded-full",
5728
+ container: formControlSizeStyles.sm.control,
5729
+ input: formControlSizeStyles.sm.label,
5730
+ tag: formControlSizeStyles.sm.tag,
5713
5731
  tagIcon: "h-3 w-3",
5714
5732
  button: "h-7 text-xs px-2"
5715
5733
  },
5716
5734
  md: {
5717
- container: "min-h-10 p-2 gap-1.5",
5718
- input: "text-sm",
5719
- tag: "px-2 py-1 text-sm gap-1.5 rounded-full",
5735
+ container: formControlSizeStyles.md.control,
5736
+ input: formControlSizeStyles.md.label,
5737
+ tag: formControlSizeStyles.md.tag,
5720
5738
  tagIcon: "h-3.5 w-3.5",
5721
5739
  button: "h-9 text-sm px-3"
5722
5740
  },
5723
5741
  lg: {
5724
- container: "min-h-12 p-2.5 gap-2",
5725
- input: "text-base",
5726
- tag: "px-2.5 py-1.5 text-base gap-2 rounded-full",
5742
+ container: formControlSizeStyles.lg.control,
5743
+ input: formControlSizeStyles.lg.label,
5744
+ tag: formControlSizeStyles.lg.tag,
5727
5745
  tagIcon: "h-4 w-4",
5728
5746
  button: "h-11 text-base px-4"
5729
5747
  }
@@ -5794,7 +5812,7 @@ var TagInput = forwardRef5(
5794
5812
  htmlFor: inputId,
5795
5813
  className: cn(
5796
5814
  "block font-medium transition-colors duration-200",
5797
- size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
5815
+ formControlSizeStyles[size].label,
5798
5816
  disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
5799
5817
  labelClassName
5800
5818
  ),
@@ -5815,7 +5833,8 @@ var TagInput = forwardRef5(
5815
5833
  {
5816
5834
  onClick: handleContainerClick,
5817
5835
  className: cn(
5818
- "flex flex-wrap items-center cursor-text",
5836
+ "flex items-center gap-1.5 cursor-text",
5837
+ formControlFixedClass,
5819
5838
  "bg-background border border-input",
5820
5839
  "transition-all duration-200",
5821
5840
  "hover:border-accent-foreground/20",
@@ -5829,13 +5848,13 @@ var TagInput = forwardRef5(
5829
5848
  "span",
5830
5849
  {
5831
5850
  className: cn(
5832
- "inline-flex items-center",
5851
+ "inline-flex min-w-0 shrink-0 items-center gap-1 overflow-hidden rounded-full",
5833
5852
  "bg-primary/10 text-primary font-mono",
5834
5853
  "animate-in fade-in-0 zoom-in-95 duration-200",
5835
5854
  sizeStyles8[size].tag
5836
5855
  ),
5837
5856
  children: [
5838
- /* @__PURE__ */ jsx17("span", { className: "truncate max-w-50", children: tag }),
5857
+ /* @__PURE__ */ jsx17("span", { className: "min-w-0 truncate", children: tag }),
5839
5858
  /* @__PURE__ */ jsx17(
5840
5859
  "button",
5841
5860
  {
@@ -5869,7 +5888,7 @@ var TagInput = forwardRef5(
5869
5888
  setIsExpanded(true);
5870
5889
  },
5871
5890
  className: cn(
5872
- "inline-flex items-center cursor-pointer",
5891
+ "inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
5873
5892
  "bg-muted text-muted-foreground hover:bg-muted/80",
5874
5893
  "transition-colors duration-150",
5875
5894
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -5888,7 +5907,7 @@ var TagInput = forwardRef5(
5888
5907
  setIsExpanded(false);
5889
5908
  },
5890
5909
  className: cn(
5891
- "inline-flex items-center cursor-pointer",
5910
+ "inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
5892
5911
  "bg-muted/50 text-muted-foreground hover:bg-muted/80",
5893
5912
  "transition-colors duration-150",
5894
5913
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -5918,7 +5937,7 @@ var TagInput = forwardRef5(
5918
5937
  placeholder: isMaxReached ? `Max ${maxTags} tags` : currentPlaceholder,
5919
5938
  disabled: disabled || isMaxReached,
5920
5939
  className: cn(
5921
- "flex-1 min-w-30 bg-transparent outline-none",
5940
+ "h-full min-w-0 flex-1 bg-transparent outline-none",
5922
5941
  "placeholder:text-muted-foreground",
5923
5942
  "disabled:cursor-not-allowed",
5924
5943
  sizeStyles8[size].input
@@ -8914,7 +8933,7 @@ var DropdownMenuSub = ({ label, icon: Icon, disabled, borderMode, children }) =>
8914
8933
  }
8915
8934
  );
8916
8935
  };
8917
- var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode }) => {
8936
+ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode, size = "md" }) => {
8918
8937
  const globalConfig = useUnderverseUIConfig();
8919
8938
  const resolvedBorderMode = borderMode ?? globalConfig.dropdownMenu?.borderMode ?? globalConfig.borderMode;
8920
8939
  return /* @__PURE__ */ jsx32(
@@ -8924,15 +8943,17 @@ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", cla
8924
8943
  "button",
8925
8944
  {
8926
8945
  className: cn(
8927
- "inline-flex items-center justify-between gap-2 px-3 py-2 text-sm border bg-background border-border/60",
8946
+ "inline-flex items-center justify-between gap-2 border bg-background border-border/60",
8928
8947
  resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl",
8948
+ formControlFixedClass,
8949
+ formControlSizeStyles[size].control,
8929
8950
  "hover:bg-accent/50",
8930
8951
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
8931
8952
  className
8932
8953
  ),
8933
8954
  children: [
8934
- /* @__PURE__ */ jsx32("span", { className: "truncate max-w-64 text-foreground/90", children: value || placeholder }),
8935
- /* @__PURE__ */ jsx32("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "opacity-70", children: /* @__PURE__ */ jsx32("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
8955
+ /* @__PURE__ */ jsx32("span", { className: cn(formControlValueClass, "max-w-64 text-foreground/90"), children: value || placeholder }),
8956
+ /* @__PURE__ */ jsx32("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "shrink-0 opacity-70", children: /* @__PURE__ */ jsx32("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
8936
8957
  ]
8937
8958
  }
8938
8959
  ),
@@ -9026,7 +9047,8 @@ var Combobox = ({
9026
9047
  searchDebounceMs = 0,
9027
9048
  minSearchLength = 0,
9028
9049
  maxInitialOptions,
9029
- showSearchPromptWhenEmptyQuery = false
9050
+ showSearchPromptWhenEmptyQuery = false,
9051
+ matchTriggerBackground = false
9030
9052
  }) => {
9031
9053
  const globalConfig = useUnderverseUIConfig();
9032
9054
  const resolvedBorderMode = borderMode ?? globalConfig.borderMode ?? "full";
@@ -9041,6 +9063,7 @@ var Combobox = ({
9041
9063
  const [query, setQuery] = React30.useState("");
9042
9064
  const [activeIndex, setActiveIndex] = React30.useState(null);
9043
9065
  const [localRequiredError, setLocalRequiredError] = React30.useState();
9066
+ const [triggerBackgroundColor, setTriggerBackgroundColor] = React30.useState();
9044
9067
  useShadCNAnimations();
9045
9068
  const inputRef = React30.useRef(null);
9046
9069
  const optionsViewportRef = React30.useRef(null);
@@ -9082,6 +9105,12 @@ var Combobox = ({
9082
9105
  });
9083
9106
  const virtualItems = canVirtualize ? optionVirtualizer.getVirtualItems() : [];
9084
9107
  const triggerRef = React30.useRef(null);
9108
+ const updateTriggerBackgroundColor = React30.useCallback(() => {
9109
+ const trigger = triggerRef.current;
9110
+ if (!trigger) return;
9111
+ const backgroundColor = window.getComputedStyle(trigger).backgroundColor;
9112
+ setTriggerBackgroundColor((current) => current === backgroundColor ? current : backgroundColor);
9113
+ }, []);
9085
9114
  const scrollVirtualListToIndex = React30.useCallback((index) => {
9086
9115
  if (!canVirtualize || renderLimitedOptions.length === 0) return;
9087
9116
  optionVirtualizer.scrollToIndex(index, { align: "auto" });
@@ -9136,6 +9165,19 @@ var Combobox = ({
9136
9165
  );
9137
9166
  }
9138
9167
  }, [maxInitialOptions, options.length, searchMode, virtualized]);
9168
+ React30.useLayoutEffect(() => {
9169
+ if (!open || !matchTriggerBackground) {
9170
+ setTriggerBackgroundColor(void 0);
9171
+ return void 0;
9172
+ }
9173
+ let raf = 0;
9174
+ const tick = () => {
9175
+ updateTriggerBackgroundColor();
9176
+ raf = window.requestAnimationFrame(tick);
9177
+ };
9178
+ tick();
9179
+ return () => window.cancelAnimationFrame(raf);
9180
+ }, [matchTriggerBackground, open, updateTriggerBackgroundColor]);
9139
9181
  const selectedOption = findOptionByValue(options, value) ?? (selectedOptionProp && getOptionValue(selectedOptionProp) === value ? selectedOptionProp : void 0);
9140
9182
  const displayValue = selectedOption ? getOptionLabel(selectedOption) : "";
9141
9183
  const selectedIcon = selectedOption ? getOptionIcon(selectedOption) : void 0;
@@ -9162,9 +9204,9 @@ var Combobox = ({
9162
9204
  lg: "px-4 py-3 text-base gap-3"
9163
9205
  };
9164
9206
  const iconSizeStyles = {
9165
- sm: "w-4 h-4",
9166
- md: "w-5 h-5",
9167
- lg: "w-6 h-6"
9207
+ sm: formControlSizeStyles.sm.icon,
9208
+ md: formControlSizeStyles.md.icon,
9209
+ lg: formControlSizeStyles.lg.icon
9168
9210
  };
9169
9211
  const checkIconSizeStyles = {
9170
9212
  sm: "h-3.5 w-3.5",
@@ -9371,9 +9413,9 @@ var Combobox = ({
9371
9413
  }
9372
9414
  );
9373
9415
  const sizeStyles8 = {
9374
- sm: "h-8 py-1.5 text-sm md:h-7 md:text-xs",
9375
- md: "h-10 py-2 text-sm",
9376
- lg: "h-12 py-3 text-base"
9416
+ sm: formControlSizeStyles.sm.control,
9417
+ md: formControlSizeStyles.md.control,
9418
+ lg: formControlSizeStyles.lg.control
9377
9419
  };
9378
9420
  const variantStyles6 = {
9379
9421
  default: "border border-input bg-background hover:bg-accent/5 hover:border-primary/40",
@@ -9381,8 +9423,9 @@ var Combobox = ({
9381
9423
  ghost: "border-0 bg-transparent hover:bg-accent/50",
9382
9424
  filled: "border-0 bg-muted/50 hover:bg-muted/80"
9383
9425
  };
9384
- const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
9426
+ const labelSize = formControlSizeStyles[size].label;
9385
9427
  const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
9428
+ const dropdownBackgroundStyle = matchTriggerBackground && triggerBackgroundColor ? { backgroundColor: triggerBackgroundColor } : void 0;
9386
9429
  const triggerButtonBaseProps = {
9387
9430
  ref: triggerRef,
9388
9431
  type: "button",
@@ -9406,7 +9449,8 @@ var Combobox = ({
9406
9449
  }
9407
9450
  },
9408
9451
  className: cn(
9409
- "group flex w-full items-center justify-between px-3 transition-all duration-200",
9452
+ "group flex w-full items-center justify-between transition-all duration-200",
9453
+ formControlFixedClass,
9410
9454
  radiusClass,
9411
9455
  sizeStyles8[size],
9412
9456
  variantStyles6[variant],
@@ -9418,8 +9462,8 @@ var Combobox = ({
9418
9462
  )
9419
9463
  };
9420
9464
  const triggerContents = /* @__PURE__ */ jsxs23(Fragment7, { children: [
9421
- selectedIcon && /* @__PURE__ */ jsx33("span", { className: "shrink-0 w-5 h-5 mr-2 flex items-center justify-center text-primary", children: selectedIcon }),
9422
- /* @__PURE__ */ jsx33("span", { className: cn("flex-1 truncate text-left", !displayValue && "text-muted-foreground", fontBold && "font-semibold"), children: renderValue && selectedOption ? renderValue(selectedOption) : displayValue || placeholder }),
9465
+ selectedIcon && /* @__PURE__ */ jsx33("span", { className: cn("mr-2 flex shrink-0 items-center justify-center overflow-hidden text-primary", formControlSizeStyles[size].icon), children: selectedIcon }),
9466
+ /* @__PURE__ */ jsx33("span", { className: cn(formControlValueClass, "text-left", !displayValue && "text-muted-foreground", fontBold && "font-semibold"), children: renderValue && selectedOption ? renderValue(selectedOption) : displayValue || placeholder }),
9423
9467
  /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-1.5 ml-2 shrink-0", children: [
9424
9468
  allowClear && value && !disabled && /* @__PURE__ */ jsx33(
9425
9469
  "div",
@@ -9515,11 +9559,19 @@ var Combobox = ({
9515
9559
  className: "z-50",
9516
9560
  borderMode: resolvedBorderMode,
9517
9561
  contentClassName: "p-0 overflow-hidden",
9562
+ contentProps: { style: dropdownBackgroundStyle },
9518
9563
  children: dropdownBody
9519
9564
  }
9520
9565
  ) : /* @__PURE__ */ jsxs23("div", { className: "relative", children: [
9521
9566
  triggerButtonInline,
9522
- open && /* @__PURE__ */ jsx33("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ jsx33("div", { className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getPanelBorderRadiusClass(resolvedBorderMode)), children: dropdownBody }) })
9567
+ open && /* @__PURE__ */ jsx33("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ jsx33(
9568
+ "div",
9569
+ {
9570
+ style: dropdownBackgroundStyle,
9571
+ className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getPanelBorderRadiusClass(resolvedBorderMode)),
9572
+ children: dropdownBody
9573
+ }
9574
+ ) })
9523
9575
  ] }),
9524
9576
  (helperText || effectiveError) && /* @__PURE__ */ jsxs23(
9525
9577
  "p",
@@ -10385,7 +10437,7 @@ var DatePicker = ({
10385
10437
  useShadCNAnimations();
10386
10438
  const sizeStyles8 = {
10387
10439
  sm: {
10388
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
10440
+ trigger: formControlSizeStyles.sm.compactControl,
10389
10441
  dayCell: "w-7 h-7 text-xs",
10390
10442
  monthCell: "w-6 h-6 text-xs",
10391
10443
  navButton: "p-1.5",
@@ -10396,13 +10448,13 @@ var DatePicker = ({
10396
10448
  actionIcon: "w-2.5 h-2.5",
10397
10449
  contentWidth: 240,
10398
10450
  contentPadding: "p-4",
10399
- label: "text-xs",
10451
+ label: formControlSizeStyles.sm.label,
10400
10452
  weekdayLabel: "text-[9px] py-1",
10401
10453
  headerMargin: "mb-2",
10402
10454
  footerMargin: "mt-3 pt-2 gap-1.5"
10403
10455
  },
10404
10456
  md: {
10405
- trigger: "px-3 py-2.5 text-sm h-10",
10457
+ trigger: formControlSizeStyles.md.control,
10406
10458
  dayCell: "w-8 h-8 text-sm",
10407
10459
  monthCell: "w-8 h-8 text-sm",
10408
10460
  navButton: "p-2",
@@ -10413,13 +10465,13 @@ var DatePicker = ({
10413
10465
  actionIcon: "w-3.5 h-3.5",
10414
10466
  contentWidth: 280,
10415
10467
  contentPadding: "p-5",
10416
- label: "text-sm",
10468
+ label: formControlSizeStyles.md.label,
10417
10469
  weekdayLabel: "text-[10px] py-1.5",
10418
10470
  headerMargin: "mb-4",
10419
10471
  footerMargin: "mt-4 pt-3 gap-2"
10420
10472
  },
10421
10473
  lg: {
10422
- trigger: "px-4 py-3 text-base h-12",
10474
+ trigger: formControlSizeStyles.lg.control,
10423
10475
  dayCell: "w-10 h-10 text-base",
10424
10476
  monthCell: "w-10 h-10 text-base",
10425
10477
  navButton: "p-2.5",
@@ -10430,7 +10482,7 @@ var DatePicker = ({
10430
10482
  actionIcon: "w-4 h-4",
10431
10483
  contentWidth: 340,
10432
10484
  contentPadding: "p-6",
10433
- label: "text-base",
10485
+ label: formControlSizeStyles.lg.label,
10434
10486
  weekdayLabel: "text-xs py-2",
10435
10487
  headerMargin: "mb-5",
10436
10488
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -10788,6 +10840,7 @@ var DatePicker = ({
10788
10840
  "aria-invalid": !!effectiveError,
10789
10841
  className: cn(
10790
10842
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
10843
+ formControlFixedClass,
10791
10844
  getBorderRadiusClass(resolvedBorderMode),
10792
10845
  sizeStyles8[size].trigger,
10793
10846
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -10801,7 +10854,7 @@ var DatePicker = ({
10801
10854
  className
10802
10855
  ),
10803
10856
  children: [
10804
- /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5 flex-1 min-w-0", children: [
10857
+ /* @__PURE__ */ jsxs25("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
10805
10858
  /* @__PURE__ */ jsx38(
10806
10859
  "div",
10807
10860
  {
@@ -10833,7 +10886,7 @@ var DatePicker = ({
10833
10886
  e.stopPropagation();
10834
10887
  }
10835
10888
  },
10836
- className: "w-full bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60 min-w-0"
10889
+ className: "h-full min-w-0 flex-1 truncate bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60"
10837
10890
  }
10838
10891
  )
10839
10892
  ] }),
@@ -11070,7 +11123,7 @@ var DateRangePicker = ({
11070
11123
  };
11071
11124
  const sizeStyles8 = {
11072
11125
  sm: {
11073
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
11126
+ trigger: formControlSizeStyles.sm.compactControl,
11074
11127
  dayCell: "w-7 h-7 text-xs",
11075
11128
  monthCell: "w-6 h-6 text-xs",
11076
11129
  navButton: "p-1.5",
@@ -11081,13 +11134,13 @@ var DateRangePicker = ({
11081
11134
  actionIcon: "w-2.5 h-2.5",
11082
11135
  contentWidth: 240,
11083
11136
  contentPadding: "p-4",
11084
- label: "text-xs",
11137
+ label: formControlSizeStyles.sm.label,
11085
11138
  weekdayLabel: "text-[9px] py-1",
11086
11139
  headerMargin: "mb-2",
11087
11140
  footerMargin: "mt-3 pt-2 gap-1.5"
11088
11141
  },
11089
11142
  md: {
11090
- trigger: "px-3 py-2.5 text-sm h-10",
11143
+ trigger: formControlSizeStyles.md.control,
11091
11144
  dayCell: "w-8 h-8 text-sm",
11092
11145
  monthCell: "w-8 h-8 text-sm",
11093
11146
  navButton: "p-2",
@@ -11098,13 +11151,13 @@ var DateRangePicker = ({
11098
11151
  actionIcon: "w-3.5 h-3.5",
11099
11152
  contentWidth: 280,
11100
11153
  contentPadding: "p-5",
11101
- label: "text-sm",
11154
+ label: formControlSizeStyles.md.label,
11102
11155
  weekdayLabel: "text-[10px] py-1.5",
11103
11156
  headerMargin: "mb-4",
11104
11157
  footerMargin: "mt-4 pt-3 gap-2"
11105
11158
  },
11106
11159
  lg: {
11107
- trigger: "px-4 py-3 text-base h-12",
11160
+ trigger: formControlSizeStyles.lg.control,
11108
11161
  dayCell: "w-10 h-10 text-base",
11109
11162
  monthCell: "w-10 h-10 text-base",
11110
11163
  navButton: "p-2.5",
@@ -11115,7 +11168,7 @@ var DateRangePicker = ({
11115
11168
  actionIcon: "w-4 h-4",
11116
11169
  contentWidth: 340,
11117
11170
  contentPadding: "p-6",
11118
- label: "text-base",
11171
+ label: formControlSizeStyles.lg.label,
11119
11172
  weekdayLabel: "text-xs py-2",
11120
11173
  headerMargin: "mb-5",
11121
11174
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -11542,6 +11595,7 @@ var DateRangePicker = ({
11542
11595
  "aria-invalid": !!effectiveError,
11543
11596
  className: cn(
11544
11597
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
11598
+ formControlFixedClass,
11545
11599
  getBorderRadiusClass(resolvedBorderMode),
11546
11600
  sizeStyles8[size].trigger,
11547
11601
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -11554,7 +11608,7 @@ var DateRangePicker = ({
11554
11608
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
11555
11609
  ),
11556
11610
  children: [
11557
- /* @__PURE__ */ jsxs25("div", { className: cn("flex items-center flex-1 min-w-0", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
11611
+ /* @__PURE__ */ jsxs25("div", { className: cn("flex min-h-0 min-w-0 flex-1 items-center overflow-hidden", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
11558
11612
  /* @__PURE__ */ jsx38(
11559
11613
  "div",
11560
11614
  {
@@ -11586,11 +11640,11 @@ var DateRangePicker = ({
11586
11640
  e.stopPropagation();
11587
11641
  }
11588
11642
  },
11589
- className: "w-full bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60 min-w-0"
11643
+ className: "h-full min-w-0 flex-1 truncate bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60"
11590
11644
  }
11591
11645
  )
11592
11646
  ] }),
11593
- /* @__PURE__ */ jsx38("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx38("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx38("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
11647
+ /* @__PURE__ */ jsx38("span", { className: cn("shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx38("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx38("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
11594
11648
  ]
11595
11649
  }
11596
11650
  ),
@@ -12040,7 +12094,7 @@ var LunarDatePicker = ({
12040
12094
  useShadCNAnimations();
12041
12095
  const sizeStyles8 = {
12042
12096
  sm: {
12043
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
12097
+ trigger: formControlSizeStyles.sm.compactControl,
12044
12098
  dayCell: "w-7 h-7 text-xs",
12045
12099
  monthCell: "w-6 h-6 text-xs",
12046
12100
  navButton: "p-1.5",
@@ -12051,13 +12105,13 @@ var LunarDatePicker = ({
12051
12105
  actionIcon: "w-2.5 h-2.5",
12052
12106
  contentWidth: 240,
12053
12107
  contentPadding: "p-4",
12054
- label: "text-xs",
12108
+ label: formControlSizeStyles.sm.label,
12055
12109
  weekdayLabel: "text-[9px] py-1",
12056
12110
  headerMargin: "mb-2",
12057
12111
  footerMargin: "mt-3 pt-2 gap-1.5"
12058
12112
  },
12059
12113
  md: {
12060
- trigger: "px-3 py-2.5 text-sm h-10",
12114
+ trigger: formControlSizeStyles.md.control,
12061
12115
  dayCell: "w-8 h-8 text-sm",
12062
12116
  monthCell: "w-8 h-8 text-sm",
12063
12117
  navButton: "p-2",
@@ -12068,13 +12122,13 @@ var LunarDatePicker = ({
12068
12122
  actionIcon: "w-3.5 h-3.5",
12069
12123
  contentWidth: 280,
12070
12124
  contentPadding: "p-5",
12071
- label: "text-sm",
12125
+ label: formControlSizeStyles.md.label,
12072
12126
  weekdayLabel: "text-[10px] py-1.5",
12073
12127
  headerMargin: "mb-4",
12074
12128
  footerMargin: "mt-4 pt-3 gap-2"
12075
12129
  },
12076
12130
  lg: {
12077
- trigger: "px-4 py-3 text-base h-12",
12131
+ trigger: formControlSizeStyles.lg.control,
12078
12132
  dayCell: "w-10 h-10 text-base",
12079
12133
  monthCell: "w-10 h-10 text-base",
12080
12134
  navButton: "p-2.5",
@@ -12085,7 +12139,7 @@ var LunarDatePicker = ({
12085
12139
  actionIcon: "w-4 h-4",
12086
12140
  contentWidth: 340,
12087
12141
  contentPadding: "p-6",
12088
- label: "text-base",
12142
+ label: formControlSizeStyles.lg.label,
12089
12143
  weekdayLabel: "text-xs py-2",
12090
12144
  headerMargin: "mb-5",
12091
12145
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -12474,6 +12528,7 @@ var LunarDatePicker = ({
12474
12528
  "aria-invalid": !!effectiveError,
12475
12529
  className: cn(
12476
12530
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
12531
+ formControlFixedClass,
12477
12532
  getBorderRadiusClass(resolvedBorderMode),
12478
12533
  sizeStyles8[size].trigger,
12479
12534
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -12487,7 +12542,7 @@ var LunarDatePicker = ({
12487
12542
  className
12488
12543
  ),
12489
12544
  children: [
12490
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2.5 flex-1 min-w-0", children: [
12545
+ /* @__PURE__ */ jsxs26("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
12491
12546
  /* @__PURE__ */ jsx39(
12492
12547
  "div",
12493
12548
  {
@@ -12519,7 +12574,7 @@ var LunarDatePicker = ({
12519
12574
  e.stopPropagation();
12520
12575
  }
12521
12576
  },
12522
- className: "w-full bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60 min-w-0"
12577
+ className: "h-full min-w-0 flex-1 truncate bg-transparent border-none outline-none focus:outline-none p-0 text-foreground font-medium placeholder-muted-foreground/60"
12523
12578
  }
12524
12579
  )
12525
12580
  ] }),
@@ -12603,7 +12658,7 @@ var LunarDateRangePicker = ({
12603
12658
  const wheelDeltaRef = React35.useRef(0);
12604
12659
  const sizeStyles8 = {
12605
12660
  sm: {
12606
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
12661
+ trigger: formControlSizeStyles.sm.compactControl,
12607
12662
  dayCell: "w-7 h-7 text-xs",
12608
12663
  monthCell: "w-6 h-6 text-xs",
12609
12664
  navButton: "p-1.5",
@@ -12614,13 +12669,13 @@ var LunarDateRangePicker = ({
12614
12669
  actionIcon: "w-2.5 h-2.5",
12615
12670
  contentWidth: 240,
12616
12671
  contentPadding: "p-4",
12617
- label: "text-xs",
12672
+ label: formControlSizeStyles.sm.label,
12618
12673
  weekdayLabel: "text-[9px] py-1",
12619
12674
  headerMargin: "mb-2",
12620
12675
  footerMargin: "mt-3 pt-2 gap-1.5"
12621
12676
  },
12622
12677
  md: {
12623
- trigger: "px-3 py-2.5 text-sm h-10",
12678
+ trigger: formControlSizeStyles.md.control,
12624
12679
  dayCell: "w-8 h-8 text-sm",
12625
12680
  monthCell: "w-8 h-8 text-sm",
12626
12681
  navButton: "p-2",
@@ -12631,13 +12686,13 @@ var LunarDateRangePicker = ({
12631
12686
  actionIcon: "w-3.5 h-3.5",
12632
12687
  contentWidth: 280,
12633
12688
  contentPadding: "p-5",
12634
- label: "text-sm",
12689
+ label: formControlSizeStyles.md.label,
12635
12690
  weekdayLabel: "text-[10px] py-1.5",
12636
12691
  headerMargin: "mb-4",
12637
12692
  footerMargin: "mt-4 pt-3 gap-2"
12638
12693
  },
12639
12694
  lg: {
12640
- trigger: "px-4 py-3 text-base h-12",
12695
+ trigger: formControlSizeStyles.lg.control,
12641
12696
  dayCell: "w-10 h-10 text-base",
12642
12697
  monthCell: "w-10 h-10 text-base",
12643
12698
  navButton: "p-2.5",
@@ -12648,7 +12703,7 @@ var LunarDateRangePicker = ({
12648
12703
  actionIcon: "w-4 h-4",
12649
12704
  contentWidth: 340,
12650
12705
  contentPadding: "p-6",
12651
- label: "text-base",
12706
+ label: formControlSizeStyles.lg.label,
12652
12707
  weekdayLabel: "text-xs py-2",
12653
12708
  headerMargin: "mb-5",
12654
12709
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -13095,6 +13150,7 @@ var LunarDateRangePicker = ({
13095
13150
  "aria-invalid": !!effectiveError,
13096
13151
  className: cn(
13097
13152
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
13153
+ formControlFixedClass,
13098
13154
  getBorderRadiusClass(borderMode ?? "full"),
13099
13155
  sizeStyles8[size].trigger,
13100
13156
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -13107,7 +13163,7 @@ var LunarDateRangePicker = ({
13107
13163
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
13108
13164
  ),
13109
13165
  children: [
13110
- /* @__PURE__ */ jsxs26("div", { className: cn("flex items-center flex-1 min-w-0", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
13166
+ /* @__PURE__ */ jsxs26("div", { className: cn("flex min-h-0 min-w-0 flex-1 items-center overflow-hidden", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
13111
13167
  /* @__PURE__ */ jsx39(
13112
13168
  "div",
13113
13169
  {
@@ -13118,9 +13174,9 @@ var LunarDateRangePicker = ({
13118
13174
  children: /* @__PURE__ */ jsx39(Calendar2, { className: cn("transition-transform duration-300", sizeStyles8[size].calendarIcon, isOpen && "scale-110") })
13119
13175
  }
13120
13176
  ),
13121
- /* @__PURE__ */ jsx39("span", { className: cn("w-full truncate font-medium", !tempStart && "text-muted-foreground/60"), children: tempStart ? displayLabel : placeholder })
13177
+ /* @__PURE__ */ jsx39("span", { className: cn("min-w-0 flex-1 truncate whitespace-nowrap font-medium", !tempStart && "text-muted-foreground/60"), children: tempStart ? displayLabel : placeholder })
13122
13178
  ] }),
13123
- /* @__PURE__ */ jsx39("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx39("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
13179
+ /* @__PURE__ */ jsx39("span", { className: cn("shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx39("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
13124
13180
  ]
13125
13181
  }
13126
13182
  ),
@@ -13748,9 +13804,9 @@ function MonthYearPicker({
13748
13804
  setOpen(false);
13749
13805
  };
13750
13806
  const sizeClasses2 = {
13751
- sm: { label: "text-xs", height: "h-8", padding: "px-2.5 py-1.5", text: "text-xs", icon: "w-3.5 h-3.5" },
13752
- md: { label: "text-sm", height: "h-10", padding: "px-3 py-2", text: "text-sm", icon: "w-4 h-4" },
13753
- lg: { label: "text-base", height: "h-12", padding: "px-4 py-3", text: "text-base", icon: "w-5 h-5" }
13807
+ sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
13808
+ md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
13809
+ lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
13754
13810
  };
13755
13811
  const panelSizeClasses = {
13756
13812
  sm: { contentPadding: "p-4", stackGap: "space-y-3", displayText: "text-lg", actionText: "text-[11px]", actionPadding: "px-3 py-2" },
@@ -13778,9 +13834,8 @@ function MonthYearPicker({
13778
13834
  className: cn(
13779
13835
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
13780
13836
  getBorderRadiusClass(resolvedBorderMode),
13781
- sz.height,
13782
- sz.padding,
13783
- sz.text,
13837
+ sz.control,
13838
+ formControlFixedClass,
13784
13839
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
13785
13840
  "disabled:opacity-50 disabled:cursor-not-allowed",
13786
13841
  "transition-all duration-300 ease-out",
@@ -13792,7 +13847,7 @@ function MonthYearPicker({
13792
13847
  className
13793
13848
  ),
13794
13849
  children: [
13795
- /* @__PURE__ */ jsxs27("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
13850
+ /* @__PURE__ */ jsxs27("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
13796
13851
  /* @__PURE__ */ jsx40(
13797
13852
  "div",
13798
13853
  {
@@ -13806,7 +13861,7 @@ function MonthYearPicker({
13806
13861
  /* @__PURE__ */ jsx40(
13807
13862
  "span",
13808
13863
  {
13809
- className: cn("min-w-0 truncate font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
13864
+ className: cn(formControlValueClass, "font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
13810
13865
  children: hasValue ? display : placeholder
13811
13866
  }
13812
13867
  )
@@ -15464,9 +15519,9 @@ function TimePicker({
15464
15519
  }
15465
15520
  };
15466
15521
  const sizeClasses2 = {
15467
- sm: { label: "text-xs", height: "h-8", padding: "px-2.5 py-1.5", text: "text-xs", icon: "w-3.5 h-3.5" },
15468
- md: { label: "text-sm", height: "h-10", padding: "px-3 py-2", text: "text-sm", icon: "w-4 h-4" },
15469
- lg: { label: "text-base", height: "h-12", padding: "px-4 py-3", text: "text-base", icon: "w-5 h-5" }
15522
+ sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
15523
+ md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
15524
+ lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
15470
15525
  };
15471
15526
  const sz = sizeClasses2[size];
15472
15527
  const effectivePanelSize = variant === "compact" ? size === "lg" ? "md" : "sm" : size;
@@ -15489,9 +15544,8 @@ function TimePicker({
15489
15544
  className: cn(
15490
15545
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
15491
15546
  getBorderRadiusClass(resolvedBorderMode),
15492
- sz.height,
15493
- sz.padding,
15494
- sz.text,
15547
+ sz.control,
15548
+ formControlFixedClass,
15495
15549
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
15496
15550
  "disabled:opacity-50 disabled:cursor-not-allowed",
15497
15551
  "transition-all duration-300 ease-out",
@@ -15503,7 +15557,7 @@ function TimePicker({
15503
15557
  className
15504
15558
  ),
15505
15559
  children: [
15506
- /* @__PURE__ */ jsxs29("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
15560
+ /* @__PURE__ */ jsxs29("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
15507
15561
  /* @__PURE__ */ jsx42(
15508
15562
  "div",
15509
15563
  {
@@ -15518,7 +15572,8 @@ function TimePicker({
15518
15572
  "span",
15519
15573
  {
15520
15574
  className: cn(
15521
- "min-w-0 truncate font-medium transition-colors duration-200",
15575
+ formControlValueClass,
15576
+ "font-medium transition-colors duration-200",
15522
15577
  !hasCommittedValue && "text-muted-foreground",
15523
15578
  hasCommittedValue ? "text-foreground" : ""
15524
15579
  ),
@@ -15982,9 +16037,9 @@ var DateTimePicker = ({
15982
16037
  const [localRequiredError, setLocalRequiredError] = React39.useState();
15983
16038
  const sizeStyles8 = {
15984
16039
  sm: {
15985
- trigger: "h-8 px-2.5 py-1.5 text-sm md:h-7 md:text-xs",
15986
- icon: "h-3.5 w-3.5",
15987
- label: "text-xs",
16040
+ trigger: formControlSizeStyles.sm.compactControl,
16041
+ icon: formControlSizeStyles.sm.icon,
16042
+ label: formControlSizeStyles.sm.label,
15988
16043
  buttonSize: "sm",
15989
16044
  calendarSize: "sm",
15990
16045
  timePickerSize: "sm",
@@ -15992,9 +16047,9 @@ var DateTimePicker = ({
15992
16047
  gap: "gap-2"
15993
16048
  },
15994
16049
  md: {
15995
- trigger: "h-10 px-3 py-2 text-sm",
15996
- icon: "h-4 w-4",
15997
- label: "text-sm",
16050
+ trigger: formControlSizeStyles.md.control,
16051
+ icon: formControlSizeStyles.md.icon,
16052
+ label: formControlSizeStyles.md.label,
15998
16053
  buttonSize: "sm",
15999
16054
  calendarSize: "md",
16000
16055
  timePickerSize: "md",
@@ -16002,9 +16057,9 @@ var DateTimePicker = ({
16002
16057
  gap: "gap-3"
16003
16058
  },
16004
16059
  lg: {
16005
- trigger: "h-12 px-4 py-3 text-base",
16006
- icon: "h-5 w-5",
16007
- label: "text-base",
16060
+ trigger: formControlSizeStyles.lg.control,
16061
+ icon: formControlSizeStyles.lg.icon,
16062
+ label: formControlSizeStyles.lg.label,
16008
16063
  buttonSize: "md",
16009
16064
  calendarSize: "lg",
16010
16065
  timePickerSize: "lg",
@@ -16154,6 +16209,7 @@ var DateTimePicker = ({
16154
16209
  "aria-invalid": !!effectiveError,
16155
16210
  className: cn(
16156
16211
  "flex w-full items-center justify-between border border-input bg-background",
16212
+ formControlFixedClass,
16157
16213
  getBorderRadiusClass(resolvedBorderMode),
16158
16214
  sizeStyles8[size].trigger,
16159
16215
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
@@ -16162,7 +16218,7 @@ var DateTimePicker = ({
16162
16218
  effectiveError && "border-destructive/60 bg-destructive/5"
16163
16219
  ),
16164
16220
  children: [
16165
- /* @__PURE__ */ jsx43("span", { className: "min-w-0 flex-1 truncate text-left", children: displayValue || placeholder || "Select date & time" }),
16221
+ /* @__PURE__ */ jsx43("span", { className: cn(formControlValueClass, "text-left"), children: displayValue || placeholder || "Select date & time" }),
16166
16222
  /* @__PURE__ */ jsxs30("div", { className: "flex shrink-0 items-center gap-2 text-muted-foreground", children: [
16167
16223
  value && /* @__PURE__ */ jsx43(
16168
16224
  "span",
@@ -19158,7 +19214,7 @@ import * as React46 from "react";
19158
19214
  import { useId as useId10 } from "react";
19159
19215
  import { useVirtualizer as useVirtualizer2 } from "@tanstack/react-virtual";
19160
19216
  import { ChevronDown as ChevronDown4, Search as Search6, Check as Check6, SearchX as SearchX2, Loader2 as Loader23, X as X14, Sparkles as Sparkles3 } from "lucide-react";
19161
- import { Fragment as Fragment16, jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
19217
+ import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
19162
19218
  var comboboxScrollClassName2 = [
19163
19219
  "scrollbar-thin",
19164
19220
  "[scrollbar-width:thin]",
@@ -19360,25 +19416,25 @@ var MultiCombobox = ({
19360
19416
  }, [maxInitialOptions, normalizedOptions.length, searchMode, virtualized]);
19361
19417
  const sizeStyles8 = {
19362
19418
  sm: {
19363
- trigger: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
19364
- icon: "h-4 w-4",
19419
+ trigger: formControlSizeStyles.sm.control,
19420
+ icon: formControlSizeStyles.sm.icon,
19365
19421
  search: "px-8 py-1.5 text-xs",
19366
19422
  item: "text-xs px-3 py-1.5",
19367
- tag: "px-2 py-0.5 text-[10px]"
19423
+ tag: formControlSizeStyles.sm.tag
19368
19424
  },
19369
19425
  md: {
19370
- trigger: "h-10 px-4 py-2 text-sm",
19371
- icon: "h-4 w-4",
19426
+ trigger: formControlSizeStyles.md.control,
19427
+ icon: formControlSizeStyles.md.icon,
19372
19428
  search: "px-10 py-2 text-sm",
19373
19429
  item: "text-sm px-3 py-2",
19374
- tag: "px-2 py-1 text-xs"
19430
+ tag: formControlSizeStyles.md.tag
19375
19431
  },
19376
19432
  lg: {
19377
- trigger: "h-12 px-5 py-3 text-base",
19378
- icon: "h-5 w-5",
19433
+ trigger: formControlSizeStyles.lg.control,
19434
+ icon: formControlSizeStyles.lg.icon,
19379
19435
  search: "px-10 py-3 text-base",
19380
19436
  item: "text-base px-3 py-3",
19381
- tag: "px-2.5 py-1 text-sm"
19437
+ tag: formControlSizeStyles.lg.tag
19382
19438
  }
19383
19439
  };
19384
19440
  const variantStyles6 = {
@@ -19389,7 +19445,7 @@ var MultiCombobox = ({
19389
19445
  const autoId = useId10();
19390
19446
  const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
19391
19447
  const labelId = label ? `${resolvedId}-label` : void 0;
19392
- const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
19448
+ const labelSize = formControlSizeStyles[size].label;
19393
19449
  const listboxId = `${resolvedId}-listbox`;
19394
19450
  const renderOptionItem = (item, index, virtualItem) => {
19395
19451
  const isSelected = value.includes(item.value);
@@ -19613,6 +19669,7 @@ var MultiCombobox = ({
19613
19669
  "aria-invalid": !!effectiveError,
19614
19670
  className: cn(
19615
19671
  "group flex w-full items-center gap-2 transition-all duration-200",
19672
+ formControlFixedClass,
19616
19673
  getBorderRadiusClass(resolvedBorderMode),
19617
19674
  sizeStyles8[size].trigger,
19618
19675
  variantStyles6[variant],
@@ -19622,22 +19679,22 @@ var MultiCombobox = ({
19622
19679
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30"
19623
19680
  ),
19624
19681
  children: [
19625
- /* @__PURE__ */ jsx50("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__ */ jsxs37(Fragment16, { children: [
19682
+ /* @__PURE__ */ jsx50("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: value.length > 0 ? showTags ? /* @__PURE__ */ jsxs37(Fragment15, { children: [
19626
19683
  visibleTags.map((option) => {
19627
19684
  if (renderTag) {
19628
- return /* @__PURE__ */ jsx50(React46.Fragment, { children: renderTag(option, () => handleRemove(option.value)) }, option.value);
19685
+ return /* @__PURE__ */ jsx50("span", { className: "inline-flex max-h-full min-w-0 shrink overflow-hidden", children: renderTag(option, () => handleRemove(option.value)) }, option.value);
19629
19686
  }
19630
19687
  return /* @__PURE__ */ jsxs37(
19631
19688
  "span",
19632
19689
  {
19633
19690
  className: cn(
19634
- "inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200 min-w-0",
19691
+ "inline-flex min-w-0 shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-primary/10 text-primary transition-all duration-200",
19635
19692
  "hover:bg-primary/20",
19636
19693
  sizeStyles8[size].tag
19637
19694
  ),
19638
19695
  children: [
19639
19696
  showSelectedIcons && option.icon && /* @__PURE__ */ jsx50("span", { className: "shrink-0 w-3.5 h-3.5 flex items-center justify-center", children: option.icon }),
19640
- /* @__PURE__ */ jsx50("span", { className: "truncate max-w-24", children: displayFormat(option) }),
19697
+ /* @__PURE__ */ jsx50("span", { className: "min-w-0 truncate", children: displayFormat(option) }),
19641
19698
  /* @__PURE__ */ jsx50(
19642
19699
  "span",
19643
19700
  {
@@ -19666,7 +19723,7 @@ var MultiCombobox = ({
19666
19723
  );
19667
19724
  }),
19668
19725
  hiddenCount > 0 && /* @__PURE__ */ jsx50("span", { className: cn("inline-flex items-center bg-muted text-muted-foreground rounded-lg shrink-0", sizeStyles8[size].tag), children: gi18n.moreCount ? gi18n.moreCount(hiddenCount) : `+${hiddenCount} more` })
19669
- ] }) : /* @__PURE__ */ jsx50("span", { className: "truncate text-sm font-medium", children: gi18n.selectedCount ? gi18n.selectedCount(value.length) : `${value.length} item${value.length > 1 ? "s" : ""} selected` }) : /* @__PURE__ */ jsx50("span", { className: "text-muted-foreground", children: placeholder }) }),
19726
+ ] }) : /* @__PURE__ */ jsx50("span", { className: cn(formControlValueClass, "font-medium"), children: gi18n.selectedCount ? gi18n.selectedCount(value.length) : `${value.length} item${value.length > 1 ? "s" : ""} selected` }) : /* @__PURE__ */ jsx50("span", { className: cn(formControlValueClass, "text-muted-foreground"), children: placeholder }) }),
19670
19727
  /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-1.5 shrink-0", children: [
19671
19728
  showClear && value.length > 0 && /* @__PURE__ */ jsx50(
19672
19729
  "div",
@@ -20068,7 +20125,7 @@ RadioGroupItem.displayName = "RadioGroupItem";
20068
20125
 
20069
20126
  // src/components/Slider.tsx
20070
20127
  import * as React48 from "react";
20071
- import { Fragment as Fragment17, jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
20128
+ import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
20072
20129
  var SIZE_STYLES = {
20073
20130
  sm: {
20074
20131
  track: "h-1",
@@ -20326,7 +20383,7 @@ var Slider = React48.forwardRef(
20326
20383
  tooltipClassName
20327
20384
  }
20328
20385
  ),
20329
- isRange && /* @__PURE__ */ jsxs39(Fragment17, { children: [
20386
+ isRange && /* @__PURE__ */ jsxs39(Fragment16, { children: [
20330
20387
  /* @__PURE__ */ jsx52(
20331
20388
  SliderTooltip,
20332
20389
  {
@@ -20422,7 +20479,7 @@ var Slider = React48.forwardRef(
20422
20479
  }
20423
20480
  const minZ = activeThumb === "min" ? "z-20" : "z-10";
20424
20481
  const maxZ = activeThumb === "max" ? "z-20" : "z-10";
20425
- return /* @__PURE__ */ jsxs39(Fragment17, { children: [
20482
+ return /* @__PURE__ */ jsxs39(Fragment16, { children: [
20426
20483
  /* @__PURE__ */ jsx52(
20427
20484
  "div",
20428
20485
  {
@@ -20485,7 +20542,7 @@ Slider.displayName = "Slider";
20485
20542
  // src/components/OverlayControls.tsx
20486
20543
  import { Dot as Dot2, Maximize2, Pause, Play, RotateCcw, RotateCw, Volume2, VolumeX } from "lucide-react";
20487
20544
  import React49 from "react";
20488
- import { Fragment as Fragment18, jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
20545
+ import { Fragment as Fragment17, jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
20489
20546
  function resolveKeyboardEventElement(target) {
20490
20547
  if (target instanceof Element) return target;
20491
20548
  if (target instanceof Node) return target.parentElement;
@@ -20730,7 +20787,7 @@ function OverlayControls({
20730
20787
  const handleSliderMouseLeave = () => {
20731
20788
  setPreviewData(null);
20732
20789
  };
20733
- return /* @__PURE__ */ jsxs40(Fragment18, { children: [
20790
+ return /* @__PURE__ */ jsxs40(Fragment17, { children: [
20734
20791
  keyboardFeedback && /* @__PURE__ */ jsx53(
20735
20792
  "div",
20736
20793
  {
@@ -21640,29 +21697,29 @@ function CategoryTreeSelect(props) {
21640
21697
  const selectedCount = valueArray.length;
21641
21698
  const triggerSizeStyles = {
21642
21699
  sm: {
21643
- button: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
21700
+ button: formControlSizeStyles.sm.control,
21644
21701
  iconWrap: "p-1",
21645
- icon: "w-3.5 h-3.5 md:w-3 md:h-3",
21646
- text: "text-xs md:text-[11px]",
21647
- badge: "px-1.5 py-0.5 text-[10px]",
21648
- actionIcon: "w-3.5 h-3.5",
21702
+ icon: formControlSizeStyles.sm.icon,
21703
+ text: formControlSizeStyles.sm.label,
21704
+ badge: formControlSizeStyles.sm.tag,
21705
+ actionIcon: formControlSizeStyles.sm.icon,
21649
21706
  clearIcon: "h-3 w-3"
21650
21707
  },
21651
21708
  md: {
21652
- button: "h-10 px-3 py-2.5 text-sm",
21709
+ button: formControlSizeStyles.md.control,
21653
21710
  iconWrap: "p-1.5",
21654
21711
  icon: "w-4 h-4",
21655
- text: "text-sm",
21656
- badge: "px-2 py-0.5 text-xs",
21712
+ text: formControlSizeStyles.md.label,
21713
+ badge: formControlSizeStyles.md.tag,
21657
21714
  actionIcon: "w-4 h-4",
21658
21715
  clearIcon: "h-3.5 w-3.5"
21659
21716
  },
21660
21717
  lg: {
21661
- button: "h-12 px-4 py-3 text-base",
21718
+ button: formControlSizeStyles.lg.control,
21662
21719
  iconWrap: "p-1.5",
21663
21720
  icon: "w-5 h-5",
21664
- text: "text-base",
21665
- badge: "px-2.5 py-1 text-sm",
21721
+ text: formControlSizeStyles.lg.label,
21722
+ badge: formControlSizeStyles.lg.tag,
21666
21723
  actionIcon: "w-5 h-5",
21667
21724
  clearIcon: "h-4 w-4"
21668
21725
  }
@@ -21784,6 +21841,7 @@ function CategoryTreeSelect(props) {
21784
21841
  },
21785
21842
  className: cn(
21786
21843
  "group flex w-full items-center justify-between transition-all duration-200",
21844
+ formControlFixedClass,
21787
21845
  getBorderRadiusClass(resolvedBorderMode ?? "full"),
21788
21846
  "backdrop-blur-sm",
21789
21847
  triggerSizeStyles[size].button,
@@ -21794,7 +21852,7 @@ function CategoryTreeSelect(props) {
21794
21852
  effectiveError && "border-destructive focus-visible:ring-destructive/30"
21795
21853
  ),
21796
21854
  children: [
21797
- /* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 text-left", children: [
21855
+ /* @__PURE__ */ jsxs41("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden text-left", children: [
21798
21856
  /* @__PURE__ */ jsx54(
21799
21857
  "div",
21800
21858
  {
@@ -21810,7 +21868,8 @@ function CategoryTreeSelect(props) {
21810
21868
  "span",
21811
21869
  {
21812
21870
  className: cn(
21813
- "min-w-0 flex-1 truncate font-medium transition-colors duration-200",
21871
+ formControlValueClass,
21872
+ "font-medium transition-colors duration-200",
21814
21873
  triggerSizeStyles[size].text,
21815
21874
  selectedCount === 0 ? "text-muted-foreground" : "text-foreground"
21816
21875
  ),
@@ -21834,7 +21893,7 @@ function CategoryTreeSelect(props) {
21834
21893
  children: /* @__PURE__ */ jsx54(X15, { className: triggerSizeStyles[size].clearIcon })
21835
21894
  }
21836
21895
  ),
21837
- selectedCount > 0 && !singleSelect && /* @__PURE__ */ jsx54("span", { className: cn("rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
21896
+ selectedCount > 0 && !singleSelect && /* @__PURE__ */ jsx54("span", { className: cn("inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
21838
21897
  /* @__PURE__ */ jsx54("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ jsx54(ChevronDown5, { className: triggerSizeStyles[size].actionIcon }) })
21839
21898
  ] })
21840
21899
  ]
@@ -22117,7 +22176,7 @@ import {
22117
22176
  Upload as Upload2
22118
22177
  } from "lucide-react";
22119
22178
  import { useCallback as useCallback20, useMemo as useMemo22, useRef as useRef23, useState as useState35 } from "react";
22120
- import { Fragment as Fragment19, jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
22179
+ import { Fragment as Fragment18, jsx as jsx56, jsxs as jsxs43 } from "react/jsx-runtime";
22121
22180
  var formatFileSize = (bytes) => {
22122
22181
  if (bytes === 0) return "0 Bytes";
22123
22182
  const k = 1024;
@@ -22548,7 +22607,7 @@ function FileUpload({
22548
22607
  ] }),
22549
22608
  /* @__PURE__ */ jsx56("p", { className: cn("text-muted-foreground", size === "lg" ? "text-sm" : "text-xs"), children: supportedFormatsText || t("supportedFormats") || `Max ${maxSize}MB per file \u2022 Up to ${maxFiles} files` })
22550
22609
  ] }),
22551
- variant === "compact" && /* @__PURE__ */ jsxs43(Fragment19, { children: [
22610
+ variant === "compact" && /* @__PURE__ */ jsxs43(Fragment18, { children: [
22552
22611
  /* @__PURE__ */ jsx56("div", { className: cn("shrink-0 rounded-lg flex items-center justify-center", "bg-primary/10", currentSize.iconSize), children: /* @__PURE__ */ jsx56(Upload2, { className: cn("text-primary", size === "sm" ? "w-4 h-4" : "w-5 h-5") }) }),
22553
22612
  /* @__PURE__ */ jsxs43("div", { className: "flex-1 min-w-0", children: [
22554
22613
  /* @__PURE__ */ jsx56("p", { className: cn("font-medium truncate", currentSize.text), children: dragDropText || t("dragDropText") || "Drop files here or" }),
@@ -22615,7 +22674,7 @@ function FileUpload({
22615
22674
  // src/components/Carousel.tsx
22616
22675
  import * as React51 from "react";
22617
22676
  import { ChevronLeft as ChevronLeft6, ChevronRight as ChevronRight9 } from "lucide-react";
22618
- import { Fragment as Fragment20, jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
22677
+ import { Fragment as Fragment19, jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
22619
22678
  function Carousel({
22620
22679
  children,
22621
22680
  autoScroll = true,
@@ -23045,7 +23104,7 @@ function Carousel({
23045
23104
  })
23046
23105
  }
23047
23106
  ),
23048
- shouldShowArrows && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsxs44(Fragment20, { children: [
23107
+ shouldShowArrows && totalSlides > effectiveSlidesToShow && /* @__PURE__ */ jsxs44(Fragment19, { children: [
23049
23108
  /* @__PURE__ */ jsx57(
23050
23109
  Button_default,
23051
23110
  {
@@ -23416,7 +23475,7 @@ function FallingIcons({
23416
23475
  // src/components/List.tsx
23417
23476
  import * as React53 from "react";
23418
23477
  import { ChevronRight as ChevronRight10 } from "lucide-react";
23419
- import { Fragment as Fragment21, jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
23478
+ import { Fragment as Fragment20, jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
23420
23479
  var SIZE_STYLES2 = {
23421
23480
  xs: { label: "text-xs", desc: "text-[11px]", icon: "h-3.5 w-3.5", avatar: "h-6 w-6" },
23422
23481
  sm: { label: "text-[13px]", desc: "text-xs", icon: "h-4 w-4", avatar: "h-8 w-8" },
@@ -23585,7 +23644,7 @@ var ListItem = React53.forwardRef(
23585
23644
  }
23586
23645
  }
23587
23646
  } : {};
23588
- const inner = /* @__PURE__ */ jsxs46(Fragment21, { children: [
23647
+ const inner = /* @__PURE__ */ jsxs46(Fragment20, { children: [
23589
23648
  /* @__PURE__ */ jsxs46("div", { className: cn("flex items-center gap-3 group/item relative max-md:gap-2.5", contentClassName), ...headerProps, children: [
23590
23649
  avatar && /* @__PURE__ */ jsx59("div", { className: cn("shrink-0", sz.avatar), children: typeof avatar === "string" ? /* @__PURE__ */ jsx59("img", { src: avatar, alt: "", className: cn("rounded-full object-cover", sz.avatar) }) : avatar }),
23591
23650
  Left && !avatar && /* @__PURE__ */ jsx59("span", { className: cn("text-muted-foreground shrink-0", sz.icon), children: /* @__PURE__ */ jsx59(Left, { className: cn(sz.icon) }) }),
@@ -23630,7 +23689,7 @@ var List_default = List;
23630
23689
  // src/components/Watermark.tsx
23631
23690
  import * as React54 from "react";
23632
23691
  import { createPortal as createPortal5 } from "react-dom";
23633
- import { Fragment as Fragment22, jsx as jsx60, jsxs as jsxs47 } from "react/jsx-runtime";
23692
+ import { Fragment as Fragment21, jsx as jsx60, jsxs as jsxs47 } from "react/jsx-runtime";
23634
23693
  var PRESETS2 = {
23635
23694
  confidential: { text: "CONFIDENTIAL", color: "rgba(220, 38, 38, 0.15)", rotate: -22, fontSize: 16, fontWeight: "bold" },
23636
23695
  draft: { text: "DRAFT", color: "rgba(59, 130, 246, 0.15)", rotate: -22, fontSize: 18, fontWeight: "bold" },
@@ -23909,7 +23968,7 @@ var Watermark = ({
23909
23968
  }
23910
23969
  );
23911
23970
  if (fullPage) {
23912
- return /* @__PURE__ */ jsxs47(Fragment22, { children: [
23971
+ return /* @__PURE__ */ jsxs47(Fragment21, { children: [
23913
23972
  children,
23914
23973
  typeof window !== "undefined" ? createPortal5(overlay, document.body) : null
23915
23974
  ] });
@@ -24478,9 +24537,9 @@ function ColorPicker({
24478
24537
  const alphaPct = Math.round(rgba.a * 100);
24479
24538
  const harmony = showHarmony ? getColorHarmony(rgba) : null;
24480
24539
  const sizeClasses2 = {
24481
- sm: "h-8 text-xs",
24482
- md: "h-10 text-sm",
24483
- lg: "h-12 text-base"
24540
+ sm: formControlSizeStyles.sm.control,
24541
+ md: formControlSizeStyles.md.control,
24542
+ lg: formControlSizeStyles.lg.control
24484
24543
  };
24485
24544
  const swatchSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "md";
24486
24545
  const trigger = /* @__PURE__ */ jsxs49(
@@ -24489,16 +24548,17 @@ function ColorPicker({
24489
24548
  type: "button",
24490
24549
  disabled,
24491
24550
  className: cn(
24492
- "w-full px-3 border border-input bg-background flex items-center justify-between",
24551
+ "w-full border border-input bg-background flex items-center justify-between",
24493
24552
  getBorderRadiusClass(resolvedBorderMode),
24494
24553
  sizeClasses2[size],
24554
+ formControlFixedClass,
24495
24555
  "hover:border-accent-foreground/30 transition-colors",
24496
24556
  disabled && "opacity-50 cursor-not-allowed",
24497
24557
  triggerClassName
24498
24558
  ),
24499
24559
  "aria-label": gi18n.openColorPicker ?? "Open color picker",
24500
24560
  children: [
24501
- /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2", children: [
24561
+ /* @__PURE__ */ jsxs49("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
24502
24562
  /* @__PURE__ */ jsx62(
24503
24563
  "span",
24504
24564
  {
@@ -24506,9 +24566,9 @@ function ColorPicker({
24506
24566
  style: { backgroundColor: withAlpha ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` : hexForInput }
24507
24567
  }
24508
24568
  ),
24509
- /* @__PURE__ */ jsx62("span", { className: "font-mono text-muted-foreground", children: text })
24569
+ /* @__PURE__ */ jsx62("span", { className: cn(formControlValueClass, "font-mono text-muted-foreground"), children: text })
24510
24570
  ] }),
24511
- /* @__PURE__ */ jsx62(Pipette, { className: cn(size === "sm" ? "w-3.5 h-3.5" : size === "lg" ? "w-5 h-5" : "w-4 h-4", "text-muted-foreground") })
24571
+ /* @__PURE__ */ jsx62(Pipette, { className: cn(formControlSizeStyles[size].icon, "shrink-0 text-muted-foreground") })
24512
24572
  ]
24513
24573
  }
24514
24574
  );
@@ -25091,7 +25151,7 @@ var MusicPlayer_default = MusicPlayer;
25091
25151
 
25092
25152
  // src/components/Grid.tsx
25093
25153
  import React58, { useId as useId13 } from "react";
25094
- import { Fragment as Fragment23, jsx as jsx64, jsxs as jsxs51 } from "react/jsx-runtime";
25154
+ import { Fragment as Fragment22, jsx as jsx64, jsxs as jsxs51 } from "react/jsx-runtime";
25095
25155
  var BP_MIN = {
25096
25156
  sm: 640,
25097
25157
  md: 768,
@@ -25248,7 +25308,7 @@ var GridItem = React58.forwardRef(
25248
25308
  st.opacity = 0;
25249
25309
  st.animation = `uvGridItemFadeIn 0.5s ease-out forwards`;
25250
25310
  }
25251
- return /* @__PURE__ */ jsxs51(Fragment23, { children: [
25311
+ return /* @__PURE__ */ jsxs51(Fragment22, { children: [
25252
25312
  animationDelay != null && /* @__PURE__ */ jsx64(
25253
25313
  "style",
25254
25314
  {
@@ -25278,13 +25338,13 @@ var Grid = Object.assign(GridRoot, { Item: GridItem });
25278
25338
  var Grid_default = Grid;
25279
25339
 
25280
25340
  // src/components/ClientOnly.tsx
25281
- import { Fragment as Fragment24, jsx as jsx65 } from "react/jsx-runtime";
25341
+ import { Fragment as Fragment23, jsx as jsx65 } from "react/jsx-runtime";
25282
25342
  function ClientOnly({ children, fallback = null }) {
25283
25343
  const hasMounted = useHydrated();
25284
25344
  if (!hasMounted) {
25285
- return /* @__PURE__ */ jsx65(Fragment24, { children: fallback });
25345
+ return /* @__PURE__ */ jsx65(Fragment23, { children: fallback });
25286
25346
  }
25287
- return /* @__PURE__ */ jsx65(Fragment24, { children });
25347
+ return /* @__PURE__ */ jsx65(Fragment23, { children });
25288
25348
  }
25289
25349
 
25290
25350
  // src/components/Loading.tsx
@@ -25466,7 +25526,7 @@ import React69 from "react";
25466
25526
 
25467
25527
  // src/components/DataTable/components/DataTableBody.tsx
25468
25528
  import React60 from "react";
25469
- import { Fragment as Fragment25, jsx as jsx68, jsxs as jsxs54 } from "react/jsx-runtime";
25529
+ import { Fragment as Fragment24, jsx as jsx68, jsxs as jsxs54 } from "react/jsx-runtime";
25470
25530
  function DataTableOverflowText({
25471
25531
  text,
25472
25532
  align
@@ -25561,7 +25621,7 @@ function DataTableBodyRows({
25561
25621
  t("loading"),
25562
25622
  "\u2026"
25563
25623
  ] })
25564
- ] }) }) }) : displayedData.length === 0 ? /* @__PURE__ */ jsx68(TableRow, { children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: labels?.noData || t("noData") }) }) : /* @__PURE__ */ jsxs54(Fragment25, { children: [
25624
+ ] }) }) }) : displayedData.length === 0 ? /* @__PURE__ */ jsx68(TableRow, { children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: labels?.noData || t("noData") }) }) : /* @__PURE__ */ jsxs54(Fragment24, { children: [
25565
25625
  virtualPaddingTop > 0 && /* @__PURE__ */ jsx68(TableRow, { "aria-hidden": "true", className: "border-0 hover:bg-transparent hover:shadow-none", children: /* @__PURE__ */ jsx68(TableCell, { colSpan: leafColumns.length, className: "p-0", style: { height: virtualPaddingTop } }) }),
25566
25626
  rowsToRender.map(({ row, idx, virtualRow }) => {
25567
25627
  const isStripedRow = striped && idx % 2 === 0;
@@ -25690,7 +25750,7 @@ function groupColumnsByColorTag(leafCols, colorGroups) {
25690
25750
  }
25691
25751
 
25692
25752
  // src/components/DataTable/components/DataTableHeader.tsx
25693
- import { Fragment as Fragment26, jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
25753
+ import { Fragment as Fragment25, jsx as jsx69, jsxs as jsxs55 } from "react/jsx-runtime";
25694
25754
  function getColumnLabel(title) {
25695
25755
  if (typeof title === "string" || typeof title === "number") {
25696
25756
  return String(title).replace(/\s+/g, " ").trim();
@@ -25910,10 +25970,10 @@ function DataTableHeader({
25910
25970
  !isRightAlign && !isCenterAlign && "justify-start",
25911
25971
  useEndIcon && "w-full"
25912
25972
  ),
25913
- children: isRightAlign ? /* @__PURE__ */ jsxs55(Fragment26, { children: [
25973
+ children: isRightAlign ? /* @__PURE__ */ jsxs55(Fragment25, { children: [
25914
25974
  filterContent,
25915
25975
  titleContent
25916
- ] }) : /* @__PURE__ */ jsxs55(Fragment26, { children: [
25976
+ ] }) : /* @__PURE__ */ jsxs55(Fragment25, { children: [
25917
25977
  titleContent,
25918
25978
  filterContent
25919
25979
  ] })
@@ -25934,7 +25994,7 @@ function DataTableHeader({
25934
25994
  t
25935
25995
  ]
25936
25996
  );
25937
- return /* @__PURE__ */ jsx69(Fragment26, { children: headerRows.map((row, rowIndex) => /* @__PURE__ */ jsx69(TableRow, { children: row.map((headerCell, cellIndex) => {
25997
+ return /* @__PURE__ */ jsx69(Fragment25, { children: headerRows.map((row, rowIndex) => /* @__PURE__ */ jsx69(TableRow, { children: row.map((headerCell, cellIndex) => {
25938
25998
  const { column: col, colSpan, rowSpan, isLeaf } = headerCell;
25939
25999
  const prevCell = cellIndex > 0 ? row[cellIndex - 1] : null;
25940
26000
  const prevCol = prevCell?.column;
@@ -27558,7 +27618,7 @@ function AccessDenied({
27558
27618
  import { Moon as Moon2, Sun as Sun2, Monitor } from "lucide-react";
27559
27619
  import { useRef as useRef27, useState as useState43 } from "react";
27560
27620
  import { createPortal as createPortal6 } from "react-dom";
27561
- import { Fragment as Fragment27, jsx as jsx76, jsxs as jsxs62 } from "react/jsx-runtime";
27621
+ import { Fragment as Fragment26, jsx as jsx76, jsxs as jsxs62 } from "react/jsx-runtime";
27562
27622
  function ThemeToggleHeadless({
27563
27623
  theme,
27564
27624
  onChange,
@@ -27608,7 +27668,7 @@ function ThemeToggleHeadless({
27608
27668
  children: /* @__PURE__ */ jsx76(CurrentIcon, { className: "h-5 w-5" })
27609
27669
  }
27610
27670
  ),
27611
- isOpen && /* @__PURE__ */ jsxs62(Fragment27, { children: [
27671
+ isOpen && /* @__PURE__ */ jsxs62(Fragment26, { children: [
27612
27672
  typeof window !== "undefined" && createPortal6(/* @__PURE__ */ jsx76("div", { className: "fixed inset-0 z-[99998]", onClick: () => setIsOpen(false) }), document.body),
27613
27673
  typeof window !== "undefined" && dropdownPosition && createPortal6(
27614
27674
  /* @__PURE__ */ jsx76(
@@ -27660,7 +27720,7 @@ function ThemeToggleHeadless({
27660
27720
  import { useRef as useRef28, useState as useState44 } from "react";
27661
27721
  import { createPortal as createPortal7 } from "react-dom";
27662
27722
  import { Globe } from "lucide-react";
27663
- import { Fragment as Fragment28, jsx as jsx77, jsxs as jsxs63 } from "react/jsx-runtime";
27723
+ import { Fragment as Fragment27, jsx as jsx77, jsxs as jsxs63 } from "react/jsx-runtime";
27664
27724
  function LanguageSwitcherHeadless({
27665
27725
  locales,
27666
27726
  currentLocale,
@@ -27705,7 +27765,7 @@ function LanguageSwitcherHeadless({
27705
27765
  children: /* @__PURE__ */ jsx77(Globe, { className: "h-5 w-5" })
27706
27766
  }
27707
27767
  ),
27708
- isOpen && /* @__PURE__ */ jsxs63(Fragment28, { children: [
27768
+ isOpen && /* @__PURE__ */ jsxs63(Fragment27, { children: [
27709
27769
  typeof window !== "undefined" && createPortal7(/* @__PURE__ */ jsx77("div", { className: "fixed inset-0 z-[99998]", onClick: () => setIsOpen(false) }), document.body),
27710
27770
  typeof window !== "undefined" && dropdownPosition && createPortal7(
27711
27771
  /* @__PURE__ */ jsx77(
@@ -31896,7 +31956,7 @@ var table_align_default = UEditorTable;
31896
31956
  import React80, { useState as useState48 } from "react";
31897
31957
  import { NodeViewWrapper as NodeViewWrapper7, NodeViewContent as NodeViewContent2 } from "@tiptap/react";
31898
31958
  import { Check as Check11, Copy as Copy2, ChevronDown as ChevronDown7 } from "lucide-react";
31899
- import { Fragment as Fragment29, jsx as jsx89, jsxs as jsxs72 } from "react/jsx-runtime";
31959
+ import { Fragment as Fragment28, jsx as jsx89, jsxs as jsxs72 } from "react/jsx-runtime";
31900
31960
  var LANGUAGES = [
31901
31961
  { label: "Plain Text", value: "text" },
31902
31962
  { label: "JavaScript", value: "javascript" },
@@ -31964,7 +32024,7 @@ var CodeBlockView = ({
31964
32024
  ]
31965
32025
  }
31966
32026
  ),
31967
- isDropdownOpen && /* @__PURE__ */ jsxs72(Fragment29, { children: [
32027
+ isDropdownOpen && /* @__PURE__ */ jsxs72(Fragment28, { children: [
31968
32028
  /* @__PURE__ */ jsx89(
31969
32029
  "div",
31970
32030
  {
@@ -33492,7 +33552,7 @@ function getDefaultLetterSpacings() {
33492
33552
  }
33493
33553
 
33494
33554
  // src/components/UEditor/toolbar.tsx
33495
- import { Fragment as Fragment30, jsx as jsx93, jsxs as jsxs75 } from "react/jsx-runtime";
33555
+ import { Fragment as Fragment29, jsx as jsx93, jsxs as jsxs75 } from "react/jsx-runtime";
33496
33556
  function getTableAnchorPos(editor) {
33497
33557
  const tableInfo = findTableNodeInfoFromState(editor.state);
33498
33558
  if (tableInfo) return editor.state.selection.from;
@@ -33744,7 +33804,7 @@ var EditorToolbar = ({
33744
33804
  },
33745
33805
  onCancel: () => setShowLinkInput(false)
33746
33806
  }
33747
- ) : /* @__PURE__ */ jsxs75(Fragment30, { children: [
33807
+ ) : /* @__PURE__ */ jsxs75(Fragment29, { children: [
33748
33808
  /* @__PURE__ */ jsx93(
33749
33809
  DropdownMenuItem,
33750
33810
  {
@@ -33886,7 +33946,7 @@ var EditorToolbar = ({
33886
33946
  ]
33887
33947
  }
33888
33948
  ),
33889
- isFull && /* @__PURE__ */ jsxs75(Fragment30, { children: [
33949
+ isFull && /* @__PURE__ */ jsxs75(Fragment29, { children: [
33890
33950
  /* @__PURE__ */ jsxs75(
33891
33951
  DropdownMenu,
33892
33952
  {
@@ -33958,7 +34018,7 @@ var EditorToolbar = ({
33958
34018
  ),
33959
34019
  /* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ jsx93(FigmaStrikeIcon, { className: "h-4 w-4" }) }),
33960
34020
  (isMediumFull || isFull) && /* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ jsx93(FigmaCodeIcon, { className: "h-4 w-4" }) }),
33961
- isFull && /* @__PURE__ */ jsxs75(Fragment30, { children: [
34021
+ isFull && /* @__PURE__ */ jsxs75(Fragment29, { children: [
33962
34022
  /* @__PURE__ */ jsx93(
33963
34023
  ToolbarButton,
33964
34024
  {
@@ -33993,7 +34053,7 @@ var EditorToolbar = ({
33993
34053
  },
33994
34054
  onCancel: () => setShowLinkInput(false)
33995
34055
  }
33996
- ) : /* @__PURE__ */ jsxs75(Fragment30, { children: [
34056
+ ) : /* @__PURE__ */ jsxs75(Fragment29, { children: [
33997
34057
  /* @__PURE__ */ jsx93(
33998
34058
  DropdownMenuItem,
33999
34059
  {
@@ -34068,7 +34128,7 @@ var EditorToolbar = ({
34068
34128
  )
34069
34129
  }
34070
34130
  ),
34071
- (isMediumFull || isFull) && /* @__PURE__ */ jsxs75(Fragment30, { children: [
34131
+ (isMediumFull || isFull) && /* @__PURE__ */ jsxs75(Fragment29, { children: [
34072
34132
  /* @__PURE__ */ jsx93(ToolbarDivider, {}),
34073
34133
  /* @__PURE__ */ jsx93(
34074
34134
  DropdownMenu,
@@ -34087,7 +34147,7 @@ var EditorToolbar = ({
34087
34147
  }
34088
34148
  )
34089
34149
  ] }),
34090
- (isMediumFull || isFull) && /* @__PURE__ */ jsxs75(Fragment30, { children: [
34150
+ (isMediumFull || isFull) && /* @__PURE__ */ jsxs75(Fragment29, { children: [
34091
34151
  /* @__PURE__ */ jsx93(ToolbarDivider, {}),
34092
34152
  /* @__PURE__ */ jsxs75(
34093
34153
  DropdownMenu,
@@ -34134,7 +34194,7 @@ var EditorToolbar = ({
34134
34194
  active: editor.isActive({ textAlign: "justify" })
34135
34195
  }
34136
34196
  ),
34137
- hasTableContext && /* @__PURE__ */ jsxs75(Fragment30, { children: [
34197
+ hasTableContext && /* @__PURE__ */ jsxs75(Fragment29, { children: [
34138
34198
  /* @__PURE__ */ jsx93("div", { className: "my-1 border-t" }),
34139
34199
  /* @__PURE__ */ jsx93(
34140
34200
  DropdownMenuItem,
@@ -34319,7 +34379,7 @@ var EditorToolbar = ({
34319
34379
  },
34320
34380
  onCancel: () => setShowImageInput(false)
34321
34381
  }
34322
- ) : /* @__PURE__ */ jsxs75(Fragment30, { children: [
34382
+ ) : /* @__PURE__ */ jsxs75(Fragment29, { children: [
34323
34383
  /* @__PURE__ */ jsx93(DropdownMenuItem, { icon: LinkIcon, label: t("imageInput.addFromUrl"), onClick: () => setShowImageInput(true), closeOnSelect: false }),
34324
34384
  /* @__PURE__ */ jsx93(
34325
34385
  DropdownMenuItem,
@@ -34577,7 +34637,7 @@ var EditorToolbar = ({
34577
34637
  /* @__PURE__ */ jsx93(ToolbarDivider, {}),
34578
34638
  /* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ jsx93(FigmaUndoIcon, { className: "h-4 w-4" }) }),
34579
34639
  /* @__PURE__ */ jsx93(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ jsx93(FigmaRedoIcon, { className: "h-4 w-4" }) }),
34580
- hasTableContext && /* @__PURE__ */ jsxs75(Fragment30, { children: [
34640
+ hasTableContext && /* @__PURE__ */ jsxs75(Fragment29, { children: [
34581
34641
  /* @__PURE__ */ jsx93(ToolbarDivider, {}),
34582
34642
  /* @__PURE__ */ jsx93(
34583
34643
  ToolbarButton,
@@ -35742,7 +35802,7 @@ function recalculateAllTableFormulas(editor) {
35742
35802
  }
35743
35803
 
35744
35804
  // src/components/UEditor/menus.tsx
35745
- import { Fragment as Fragment31, jsx as jsx94, jsxs as jsxs76 } from "react/jsx-runtime";
35805
+ import { Fragment as Fragment30, jsx as jsx94, jsxs as jsxs76 } from "react/jsx-runtime";
35746
35806
  var FloatingSlashCommandMenu = ({ editor, onClose }) => {
35747
35807
  const t = useSmartTranslations("UEditor");
35748
35808
  const messages = useMemo25(() => buildSlashCommandMessages(t), [t]);
@@ -36550,7 +36610,7 @@ var BubbleMenuContent = ({
36550
36610
  ),
36551
36611
  /* @__PURE__ */ jsx94(ToolbarButton, { onClick: () => setActiveColorPalette("text"), title: t("colors.textColor"), children: /* @__PURE__ */ jsx94(TextColorIcon, { color: currentTextColor }) }),
36552
36612
  /* @__PURE__ */ jsx94(ToolbarButton, { onClick: () => setActiveColorPalette("highlight"), active: editor.isActive("highlight"), title: t("colors.highlight"), children: /* @__PURE__ */ jsx94(HighlightColorIcon, { color: currentHighlightColor }) }),
36553
- isInTable2 && /* @__PURE__ */ jsxs76(Fragment31, { children: [
36613
+ isInTable2 && /* @__PURE__ */ jsxs76(Fragment30, { children: [
36554
36614
  /* @__PURE__ */ jsx94(
36555
36615
  ToolbarButton,
36556
36616
  {
@@ -37485,7 +37545,7 @@ function findDiffEnd(a, b, posA, posB) {
37485
37545
  posB -= size;
37486
37546
  }
37487
37547
  }
37488
- var Fragment32 = class _Fragment {
37548
+ var Fragment31 = class _Fragment {
37489
37549
  /**
37490
37550
  @internal
37491
37551
  */
@@ -37777,7 +37837,7 @@ var Fragment32 = class _Fragment {
37777
37837
  throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
37778
37838
  }
37779
37839
  };
37780
- Fragment32.empty = new Fragment32([], 0);
37840
+ Fragment31.empty = new Fragment31([], 0);
37781
37841
  var found = { index: 0, offset: 0 };
37782
37842
  function retIndex(index, offset) {
37783
37843
  found.index = index;
@@ -38002,7 +38062,7 @@ var Slice = class _Slice {
38002
38062
  let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
38003
38063
  if (typeof openStart != "number" || typeof openEnd != "number")
38004
38064
  throw new RangeError("Invalid input for Slice.fromJSON");
38005
- return new _Slice(Fragment32.fromJSON(schema, json.content), openStart, openEnd);
38065
+ return new _Slice(Fragment31.fromJSON(schema, json.content), openStart, openEnd);
38006
38066
  }
38007
38067
  /**
38008
38068
  Create a slice from a fragment by taking the maximum possible
@@ -38017,7 +38077,7 @@ var Slice = class _Slice {
38017
38077
  return new _Slice(fragment, openStart, openEnd);
38018
38078
  }
38019
38079
  };
38020
- Slice.empty = new Slice(Fragment32.empty, 0, 0);
38080
+ Slice.empty = new Slice(Fragment31.empty, 0, 0);
38021
38081
  function removeRange(content, from, to) {
38022
38082
  let { index, offset } = content.findIndex(from), child = content.maybeChild(index);
38023
38083
  let { index: indexTo, offset: offsetTo } = content.findIndex(to);
@@ -38115,7 +38175,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
38115
38175
  addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
38116
38176
  }
38117
38177
  addRange($to, null, depth, content);
38118
- return new Fragment32(content);
38178
+ return new Fragment31(content);
38119
38179
  }
38120
38180
  function replaceTwoWay($from, $to, depth) {
38121
38181
  let content = [];
@@ -38125,13 +38185,13 @@ function replaceTwoWay($from, $to, depth) {
38125
38185
  addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
38126
38186
  }
38127
38187
  addRange($to, null, depth, content);
38128
- return new Fragment32(content);
38188
+ return new Fragment31(content);
38129
38189
  }
38130
38190
  function prepareSliceForReplace(slice, $along) {
38131
38191
  let extra = $along.depth - slice.openStart, parent = $along.node(extra);
38132
38192
  let node = parent.copy(slice.content);
38133
38193
  for (let i = extra - 1; i >= 0; i--)
38134
- node = $along.node(i).copy(Fragment32.from(node));
38194
+ node = $along.node(i).copy(Fragment31.from(node));
38135
38195
  return {
38136
38196
  start: node.resolveNoCache(slice.openStart + extra),
38137
38197
  end: node.resolveNoCache(node.content.size - slice.openEnd - extra)
@@ -38470,7 +38530,7 @@ var Node7 = class _Node {
38470
38530
  this.type = type;
38471
38531
  this.attrs = attrs;
38472
38532
  this.marks = marks;
38473
- this.content = content || Fragment32.empty;
38533
+ this.content = content || Fragment31.empty;
38474
38534
  }
38475
38535
  /**
38476
38536
  The array of this node's child nodes.
@@ -38775,7 +38835,7 @@ var Node7 = class _Node {
38775
38835
  can optionally pass `start` and `end` indices into the
38776
38836
  replacement fragment.
38777
38837
  */
38778
- canReplace(from, to, replacement = Fragment32.empty, start = 0, end = replacement.childCount) {
38838
+ canReplace(from, to, replacement = Fragment31.empty, start = 0, end = replacement.childCount) {
38779
38839
  let one = this.contentMatchAt(from).matchFragment(replacement, start, end);
38780
38840
  let two = one && one.matchFragment(this.content, to);
38781
38841
  if (!two || !two.validEnd)
@@ -38857,7 +38917,7 @@ var Node7 = class _Node {
38857
38917
  throw new RangeError("Invalid text node in JSON");
38858
38918
  return schema.text(json.text, marks);
38859
38919
  }
38860
- let content = Fragment32.fromJSON(schema, json.content);
38920
+ let content = Fragment31.fromJSON(schema, json.content);
38861
38921
  let node = schema.nodeType(json.type).create(json.attrs, content, marks);
38862
38922
  node.type.checkAttrs(node.attrs);
38863
38923
  return node;
@@ -38953,7 +39013,7 @@ var ContentMatch = class _ContentMatch {
38953
39013
  function search(match, types) {
38954
39014
  let finished = match.matchFragment(after, startIndex);
38955
39015
  if (finished && (!toEnd || finished.validEnd))
38956
- return Fragment32.from(types.map((tp) => tp.createAndFill()));
39016
+ return Fragment31.from(types.map((tp) => tp.createAndFill()));
38957
39017
  for (let i = 0; i < match.next.length; i++) {
38958
39018
  let { type, next } = match.next[i];
38959
39019
  if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
@@ -39521,7 +39581,7 @@ function mapFragment(fragment, f, parent) {
39521
39581
  child = f(child, parent, i);
39522
39582
  mapped.push(child);
39523
39583
  }
39524
- return Fragment32.fromArray(mapped);
39584
+ return Fragment31.fromArray(mapped);
39525
39585
  }
39526
39586
  var AddMarkStep = class _AddMarkStep extends Step {
39527
39587
  /**
@@ -39638,7 +39698,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
39638
39698
  if (!node)
39639
39699
  return StepResult.fail("No node at mark step's position");
39640
39700
  let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
39641
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39701
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39642
39702
  }
39643
39703
  invert(doc) {
39644
39704
  let node = doc.nodeAt(this.pos);
@@ -39684,7 +39744,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
39684
39744
  if (!node)
39685
39745
  return StepResult.fail("No node at mark step's position");
39686
39746
  let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
39687
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39747
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39688
39748
  }
39689
39749
  invert(doc) {
39690
39750
  let node = doc.nodeAt(this.pos);
@@ -39885,7 +39945,7 @@ var AttrStep = class _AttrStep extends Step {
39885
39945
  attrs[name] = node.attrs[name];
39886
39946
  attrs[this.attr] = this.value;
39887
39947
  let updated = node.type.create(attrs, null, node.marks);
39888
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39948
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39889
39949
  }
39890
39950
  getMap() {
39891
39951
  return StepMap.empty;
@@ -40269,7 +40329,7 @@ var NodeSelection2 = class _NodeSelection extends Selection {
40269
40329
  return new _NodeSelection($pos);
40270
40330
  }
40271
40331
  content() {
40272
- return new Slice(Fragment32.from(this.node), 0, 0);
40332
+ return new Slice(Fragment31.from(this.node), 0, 0);
40273
40333
  }
40274
40334
  eq(other) {
40275
40335
  return other instanceof _NodeSelection && other.anchor == this.anchor;
@@ -40997,10 +41057,10 @@ var CellSelection = class CellSelection2 extends Selection {
40997
41057
  }
40998
41058
  rowContent.push(cell);
40999
41059
  }
41000
- rows.push(table.child(row).copy(Fragment32.from(rowContent)));
41060
+ rows.push(table.child(row).copy(Fragment31.from(rowContent)));
41001
41061
  }
41002
41062
  const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
41003
- return new Slice(Fragment32.from(fragment), 1, 1);
41063
+ return new Slice(Fragment31.from(fragment), 1, 1);
41004
41064
  }
41005
41065
  replace(tr, content = Slice.empty) {
41006
41066
  const mapFrom = tr.steps.length, ranges = this.ranges;
@@ -41012,7 +41072,7 @@ var CellSelection = class CellSelection2 extends Selection {
41012
41072
  if (sel) tr.setSelection(sel);
41013
41073
  }
41014
41074
  replaceWith(tr, node) {
41015
- this.replace(tr, new Slice(Fragment32.from(node), 0, 0));
41075
+ this.replace(tr, new Slice(Fragment31.from(node), 0, 0));
41016
41076
  }
41017
41077
  forEachCell(f) {
41018
41078
  const table = this.$anchorCell.node(-1);
@@ -41913,7 +41973,7 @@ function buildTableHoverState({
41913
41973
  }
41914
41974
 
41915
41975
  // src/components/UEditor/table-drag-preview.tsx
41916
- import { Fragment as Fragment33, jsx as jsx95, jsxs as jsxs78 } from "react/jsx-runtime";
41976
+ import { Fragment as Fragment32, jsx as jsx95, jsxs as jsxs78 } from "react/jsx-runtime";
41917
41977
  function TableDragPreview({
41918
41978
  columnDragLabel,
41919
41979
  dragPreview,
@@ -41924,8 +41984,8 @@ function TableDragPreview({
41924
41984
  const expandPreviewWidth = dragPreview.kind === "add-column" ? layout.tableWidth + dragPreview.previewCols * layout.avgColumnWidth : layout.tableWidth;
41925
41985
  const expandPreviewHeight = dragPreview.kind === "add-row" ? layout.tableHeight + dragPreview.previewRows * layout.avgRowHeight : layout.tableHeight;
41926
41986
  const dragStatusText = dragPreview.kind === "row" ? `${rowDragLabel} ${dragPreview.originIndex + 1} -> ${dragPreview.targetIndex + 1}` : dragPreview.kind === "column" ? `${columnDragLabel} ${dragPreview.originIndex + 1} -> ${dragPreview.targetIndex + 1}` : dragPreview.kind === "add-row" ? `+${dragPreview.previewRows}R` : `+${dragPreview.previewCols}C`;
41927
- return /* @__PURE__ */ jsxs78(Fragment33, { children: [
41928
- dragPreview.kind === "row" && /* @__PURE__ */ jsxs78(Fragment33, { children: [
41987
+ return /* @__PURE__ */ jsxs78(Fragment32, { children: [
41988
+ dragPreview.kind === "row" && /* @__PURE__ */ jsxs78(Fragment32, { children: [
41929
41989
  /* @__PURE__ */ jsx95(
41930
41990
  "div",
41931
41991
  {
@@ -41953,7 +42013,7 @@ function TableDragPreview({
41953
42013
  }
41954
42014
  )
41955
42015
  ] }),
41956
- dragPreview.kind === "column" && /* @__PURE__ */ jsxs78(Fragment33, { children: [
42016
+ dragPreview.kind === "column" && /* @__PURE__ */ jsxs78(Fragment32, { children: [
41957
42017
  /* @__PURE__ */ jsx95(
41958
42018
  "div",
41959
42019
  {
@@ -42010,7 +42070,7 @@ function TableDragPreview({
42010
42070
  }
42011
42071
 
42012
42072
  // src/components/UEditor/table-add-rails.tsx
42013
- import { Fragment as Fragment34, jsx as jsx96, jsxs as jsxs79 } from "react/jsx-runtime";
42073
+ import { Fragment as Fragment33, jsx as jsx96, jsxs as jsxs79 } from "react/jsx-runtime";
42014
42074
  var ADD_COLUMN_RAIL_GAP = 4;
42015
42075
  var ADD_ROW_RAIL_GAP = 4;
42016
42076
  function TableAddRails({
@@ -42031,7 +42091,7 @@ function TableAddRails({
42031
42091
  const rowRailLeft = visibleBounds.left;
42032
42092
  const showColumnRail = controlsVisible || addColumnVisible;
42033
42093
  const showRowRail = controlsVisible || addRowVisible;
42034
- return /* @__PURE__ */ jsxs79(Fragment34, { children: [
42094
+ return /* @__PURE__ */ jsxs79(Fragment33, { children: [
42035
42095
  /* @__PURE__ */ jsx96(
42036
42096
  Tooltip,
42037
42097
  {
@@ -42175,7 +42235,7 @@ function TableControlMenu({
42175
42235
 
42176
42236
  // src/components/UEditor/table-axis-handles.tsx
42177
42237
  import { GripHorizontal, GripVertical as GripVertical3 } from "lucide-react";
42178
- import { Fragment as Fragment35, jsx as jsx98 } from "react/jsx-runtime";
42238
+ import { Fragment as Fragment34, jsx as jsx98 } from "react/jsx-runtime";
42179
42239
  var IDLE_HANDLE_SCALE = "0.78";
42180
42240
  function TableRowHandles({
42181
42241
  activeRowIndex,
@@ -42189,7 +42249,7 @@ function TableRowHandles({
42189
42249
  rowHandleLeft,
42190
42250
  rowHandles
42191
42251
  }) {
42192
- return /* @__PURE__ */ jsx98(Fragment35, { children: rowHandles.map((rowHandle) => {
42252
+ return /* @__PURE__ */ jsx98(Fragment34, { children: rowHandles.map((rowHandle) => {
42193
42253
  const menuKey = `row:${rowHandle.index}`;
42194
42254
  const isActive = rowHandle.index === activeRowIndex;
42195
42255
  const visible = controlsVisible || hoverRowHandleIndex === rowHandle.index || openMenuKey === menuKey;
@@ -42260,7 +42320,7 @@ function TableColumnHandles({
42260
42320
  onStartDrag,
42261
42321
  openMenuKey
42262
42322
  }) {
42263
- return /* @__PURE__ */ jsx98(Fragment35, { children: columnHandles.map((columnHandle) => {
42323
+ return /* @__PURE__ */ jsx98(Fragment34, { children: columnHandles.map((columnHandle) => {
42264
42324
  const menuKey = `column:${columnHandle.index}`;
42265
42325
  const isActive = columnHandle.index === activeColumnIndex;
42266
42326
  const visible = controlsVisible || hoverColumnHandleIndex === columnHandle.index || openMenuKey === menuKey;
@@ -42321,7 +42381,7 @@ function TableColumnHandles({
42321
42381
  }
42322
42382
 
42323
42383
  // src/components/UEditor/table-controls.tsx
42324
- import { Fragment as Fragment36, jsx as jsx99, jsxs as jsxs80 } from "react/jsx-runtime";
42384
+ import { Fragment as Fragment35, jsx as jsx99, jsxs as jsxs80 } from "react/jsx-runtime";
42325
42385
  var TABLE_MENU_TOP_OFFSET = 10;
42326
42386
  function nearestIndex(centers, position) {
42327
42387
  let bestIndex = 0;
@@ -42768,7 +42828,7 @@ function TableControls({ editor, containerRef }) {
42768
42828
  const menuLeft = Math.max(8, layout.tableLeft);
42769
42829
  const rowHandleLeft = layout.tableLeft - 12;
42770
42830
  const columnHandleTop = layout.tableTop - 12;
42771
- return /* @__PURE__ */ jsxs80(Fragment36, { children: [
42831
+ return /* @__PURE__ */ jsxs80(Fragment35, { children: [
42772
42832
  /* @__PURE__ */ jsx99(
42773
42833
  TableRowHandles,
42774
42834
  {
@@ -44121,7 +44181,7 @@ function prepareUEditorPreviewHtml(html) {
44121
44181
  }
44122
44182
 
44123
44183
  // src/components/UEditor/menu-bar.tsx
44124
- import { Fragment as Fragment37, jsx as jsx100, jsxs as jsxs81 } from "react/jsx-runtime";
44184
+ import { Fragment as Fragment36, jsx as jsx100, jsxs as jsxs81 } from "react/jsx-runtime";
44125
44185
  function MenuTableInsertGrid({
44126
44186
  insertLabel,
44127
44187
  previewTemplate,
@@ -44642,7 +44702,7 @@ var MenuBar = ({
44642
44702
  {
44643
44703
  type: "custom",
44644
44704
  key: "image",
44645
- render: () => showImageInput ? /* @__PURE__ */ jsx100(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ jsxs81(Fragment37, { children: [
44705
+ render: () => showImageInput ? /* @__PURE__ */ jsx100(ImageInput, { onSubmit: handleImageUrl, onCancel: () => setShowImageInput(false) }) : /* @__PURE__ */ jsxs81(Fragment36, { children: [
44646
44706
  /* @__PURE__ */ jsx100(DropdownMenuItem, { label: t("menubar.image"), icon: ImageIcon2, onClick: () => setShowImageInput(true), closeOnSelect: false }),
44647
44707
  /* @__PURE__ */ jsx100(
44648
44708
  DropdownMenuItem,
@@ -44758,7 +44818,7 @@ var MenuBar = ({
44758
44818
  },
44759
44819
  { label: t("menubar.table"), items: buildTableMenuItems(t, editor, handleInsertTable), open: void 0, onOpenChange: void 0 }
44760
44820
  ];
44761
- return /* @__PURE__ */ jsxs81(Fragment37, { children: [
44821
+ return /* @__PURE__ */ jsxs81(Fragment36, { children: [
44762
44822
  /* @__PURE__ */ jsx100(
44763
44823
  "input",
44764
44824
  {