@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.cjs CHANGED
@@ -3112,6 +3112,39 @@ function useOverlayScrollbarTarget(targetRef, options = {}) {
3112
3112
  }
3113
3113
  var OverlayScrollbarProvider_default = OverlayScrollbarProvider;
3114
3114
 
3115
+ // src/components/form-control-size.ts
3116
+ var formControlSizeStyles = {
3117
+ sm: {
3118
+ control: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
3119
+ compactControl: "h-8 px-2.5 text-sm leading-none md:h-7 md:text-xs",
3120
+ input: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
3121
+ label: "text-xs",
3122
+ icon: "h-4 w-4 md:h-3.5 md:w-3.5",
3123
+ iconButton: "h-7 w-7 md:h-6 md:w-6",
3124
+ tag: "h-5 max-w-24 px-2 text-[10px] leading-none"
3125
+ },
3126
+ md: {
3127
+ control: "h-10 px-3 text-sm leading-none",
3128
+ compactControl: "h-10 px-3 text-sm leading-none",
3129
+ input: "h-10 px-4 text-sm leading-none",
3130
+ label: "text-sm",
3131
+ icon: "h-4 w-4",
3132
+ iconButton: "h-8 w-8",
3133
+ tag: "h-6 max-w-28 px-2 text-xs leading-none"
3134
+ },
3135
+ lg: {
3136
+ control: "h-12 px-4 text-base leading-none",
3137
+ compactControl: "h-12 px-4 text-base leading-none",
3138
+ input: "h-12 px-5 text-base leading-none",
3139
+ label: "text-base",
3140
+ icon: "h-5 w-5",
3141
+ iconButton: "h-10 w-10",
3142
+ tag: "h-7 max-w-32 px-2.5 text-sm leading-none"
3143
+ }
3144
+ };
3145
+ var formControlFixedClass = "min-h-0 overflow-hidden";
3146
+ var formControlValueClass = "max-h-full min-w-0 flex-1 truncate whitespace-nowrap";
3147
+
3115
3148
  // src/components/Input.tsx
3116
3149
  var import_jsx_runtime11 = require("react/jsx-runtime");
3117
3150
  var Input = (0, import_react4.forwardRef)(
@@ -3175,23 +3208,7 @@ var Input = (0, import_react4.forwardRef)(
3175
3208
  error: "border-destructive focus-visible:outline-none focus-visible:border-destructive"
3176
3209
  }
3177
3210
  };
3178
- const sizeStyles8 = {
3179
- sm: {
3180
- input: "px-3 py-1.5 text-sm h-8 md:h-7 md:py-1 md:text-xs",
3181
- icon: "w-4 h-4",
3182
- button: "h-7 w-7"
3183
- },
3184
- md: {
3185
- input: "px-4 py-2 text-sm h-10",
3186
- icon: "w-5 h-5",
3187
- button: "h-8 w-8"
3188
- },
3189
- lg: {
3190
- input: "px-5 py-4 text-base h-12",
3191
- icon: "w-6 h-6",
3192
- button: "h-10 w-10"
3193
- }
3194
- };
3211
+ const sizeStyles8 = formControlSizeStyles;
3195
3212
  const getErrorKey = (v) => {
3196
3213
  if (v.valueMissing) return "required";
3197
3214
  if (v.typeMismatch) return "typeMismatch";
@@ -3250,7 +3267,7 @@ var Input = (0, import_react4.forwardRef)(
3250
3267
  htmlFor: resolvedId,
3251
3268
  className: cn(
3252
3269
  // Label size follows input size
3253
- size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
3270
+ sizeStyles8[size].label,
3254
3271
  "font-medium transition-colors duration-200",
3255
3272
  // default color and highlight while any descendant focused
3256
3273
  disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
@@ -3284,7 +3301,7 @@ var Input = (0, import_react4.forwardRef)(
3284
3301
  "div",
3285
3302
  {
3286
3303
  className: cn(
3287
- "absolute left-3 top-1/2 -translate-y-1/2 z-10",
3304
+ "absolute left-3 top-1/2 -translate-y-1/2 z-10 flex max-h-full items-center overflow-hidden",
3288
3305
  "text-muted-foreground transition-colors duration-200",
3289
3306
  // highlight icon when input (or controls) focused
3290
3307
  "group-focus-within:text-primary"
@@ -3314,6 +3331,7 @@ var Input = (0, import_react4.forwardRef)(
3314
3331
  "aria-describedby": [errorId, descId].filter(Boolean).join(" ") || void 0,
3315
3332
  className: cn(
3316
3333
  "w-full text-foreground transition-all duration-200 ease-out",
3334
+ formControlFixedClass,
3317
3335
  "placeholder:text-muted-foreground focus:outline-none focus-visible:outline-none",
3318
3336
  "disabled:cursor-not-allowed disabled:opacity-50",
3319
3337
  // Size styles
@@ -3349,7 +3367,7 @@ var Input = (0, import_react4.forwardRef)(
3349
3367
  "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-md",
3350
3368
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3351
3369
  "active:bg-accent active:text-accent-foreground",
3352
- sizeStyles8[size].button
3370
+ sizeStyles8[size].iconButton
3353
3371
  ),
3354
3372
  tabIndex: 0,
3355
3373
  "aria-label": gi18n.clearInput ?? "Clear input",
@@ -3365,7 +3383,7 @@ var Input = (0, import_react4.forwardRef)(
3365
3383
  "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-full",
3366
3384
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/40",
3367
3385
  "active:bg-accent/50 active:text-accent-foreground",
3368
- sizeStyles8[size].button
3386
+ sizeStyles8[size].iconButton
3369
3387
  ),
3370
3388
  tabIndex: 0,
3371
3389
  "aria-label": showPassword ? gi18n.hidePassword ?? "Hide password" : gi18n.showPassword ?? "Show password",
@@ -5904,23 +5922,23 @@ var TagInput = (0, import_react10.forwardRef)(
5904
5922
  const moreLabel = labels?.moreCount?.replace("{count}", String(hiddenCount)) ?? `+${hiddenCount} more`;
5905
5923
  const sizeStyles8 = {
5906
5924
  sm: {
5907
- container: "min-h-8 p-1.5 gap-1",
5908
- input: "text-xs",
5909
- tag: "px-1.5 py-0.5 text-xs gap-1 rounded-full",
5925
+ container: formControlSizeStyles.sm.control,
5926
+ input: formControlSizeStyles.sm.label,
5927
+ tag: formControlSizeStyles.sm.tag,
5910
5928
  tagIcon: "h-3 w-3",
5911
5929
  button: "h-7 text-xs px-2"
5912
5930
  },
5913
5931
  md: {
5914
- container: "min-h-10 p-2 gap-1.5",
5915
- input: "text-sm",
5916
- tag: "px-2 py-1 text-sm gap-1.5 rounded-full",
5932
+ container: formControlSizeStyles.md.control,
5933
+ input: formControlSizeStyles.md.label,
5934
+ tag: formControlSizeStyles.md.tag,
5917
5935
  tagIcon: "h-3.5 w-3.5",
5918
5936
  button: "h-9 text-sm px-3"
5919
5937
  },
5920
5938
  lg: {
5921
- container: "min-h-12 p-2.5 gap-2",
5922
- input: "text-base",
5923
- tag: "px-2.5 py-1.5 text-base gap-2 rounded-full",
5939
+ container: formControlSizeStyles.lg.control,
5940
+ input: formControlSizeStyles.lg.label,
5941
+ tag: formControlSizeStyles.lg.tag,
5924
5942
  tagIcon: "h-4 w-4",
5925
5943
  button: "h-11 text-base px-4"
5926
5944
  }
@@ -5991,7 +6009,7 @@ var TagInput = (0, import_react10.forwardRef)(
5991
6009
  htmlFor: inputId,
5992
6010
  className: cn(
5993
6011
  "block font-medium transition-colors duration-200",
5994
- size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
6012
+ formControlSizeStyles[size].label,
5995
6013
  disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
5996
6014
  labelClassName
5997
6015
  ),
@@ -6012,7 +6030,8 @@ var TagInput = (0, import_react10.forwardRef)(
6012
6030
  {
6013
6031
  onClick: handleContainerClick,
6014
6032
  className: cn(
6015
- "flex flex-wrap items-center cursor-text",
6033
+ "flex items-center gap-1.5 cursor-text",
6034
+ formControlFixedClass,
6016
6035
  "bg-background border border-input",
6017
6036
  "transition-all duration-200",
6018
6037
  "hover:border-accent-foreground/20",
@@ -6026,13 +6045,13 @@ var TagInput = (0, import_react10.forwardRef)(
6026
6045
  "span",
6027
6046
  {
6028
6047
  className: cn(
6029
- "inline-flex items-center",
6048
+ "inline-flex min-w-0 shrink-0 items-center gap-1 overflow-hidden rounded-full",
6030
6049
  "bg-primary/10 text-primary font-mono",
6031
6050
  "animate-in fade-in-0 zoom-in-95 duration-200",
6032
6051
  sizeStyles8[size].tag
6033
6052
  ),
6034
6053
  children: [
6035
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "truncate max-w-50", children: tag }),
6054
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "min-w-0 truncate", children: tag }),
6036
6055
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6037
6056
  "button",
6038
6057
  {
@@ -6066,7 +6085,7 @@ var TagInput = (0, import_react10.forwardRef)(
6066
6085
  setIsExpanded(true);
6067
6086
  },
6068
6087
  className: cn(
6069
- "inline-flex items-center cursor-pointer",
6088
+ "inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
6070
6089
  "bg-muted text-muted-foreground hover:bg-muted/80",
6071
6090
  "transition-colors duration-150",
6072
6091
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6085,7 +6104,7 @@ var TagInput = (0, import_react10.forwardRef)(
6085
6104
  setIsExpanded(false);
6086
6105
  },
6087
6106
  className: cn(
6088
- "inline-flex items-center cursor-pointer",
6107
+ "inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
6089
6108
  "bg-muted/50 text-muted-foreground hover:bg-muted/80",
6090
6109
  "transition-colors duration-150",
6091
6110
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6115,7 +6134,7 @@ var TagInput = (0, import_react10.forwardRef)(
6115
6134
  placeholder: isMaxReached ? `Max ${maxTags} tags` : currentPlaceholder,
6116
6135
  disabled: disabled || isMaxReached,
6117
6136
  className: cn(
6118
- "flex-1 min-w-30 bg-transparent outline-none",
6137
+ "h-full min-w-0 flex-1 bg-transparent outline-none",
6119
6138
  "placeholder:text-muted-foreground",
6120
6139
  "disabled:cursor-not-allowed",
6121
6140
  sizeStyles8[size].input
@@ -9111,7 +9130,7 @@ var DropdownMenuSub = ({ label, icon: Icon, disabled, borderMode, children }) =>
9111
9130
  }
9112
9131
  );
9113
9132
  };
9114
- var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode }) => {
9133
+ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode, size = "md" }) => {
9115
9134
  const globalConfig = useUnderverseUIConfig();
9116
9135
  const resolvedBorderMode = borderMode ?? globalConfig.dropdownMenu?.borderMode ?? globalConfig.borderMode;
9117
9136
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
@@ -9121,15 +9140,17 @@ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", cla
9121
9140
  "button",
9122
9141
  {
9123
9142
  className: cn(
9124
- "inline-flex items-center justify-between gap-2 px-3 py-2 text-sm border bg-background border-border/60",
9143
+ "inline-flex items-center justify-between gap-2 border bg-background border-border/60",
9125
9144
  resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl",
9145
+ formControlFixedClass,
9146
+ formControlSizeStyles[size].control,
9126
9147
  "hover:bg-accent/50",
9127
9148
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
9128
9149
  className
9129
9150
  ),
9130
9151
  children: [
9131
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "truncate max-w-64 text-foreground/90", children: value || placeholder }),
9132
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
9152
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: cn(formControlValueClass, "max-w-64 text-foreground/90"), children: value || placeholder }),
9153
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", className: "shrink-0 opacity-70", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("path", { d: "M6 8l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) })
9133
9154
  ]
9134
9155
  }
9135
9156
  ),
@@ -9223,7 +9244,8 @@ var Combobox = ({
9223
9244
  searchDebounceMs = 0,
9224
9245
  minSearchLength = 0,
9225
9246
  maxInitialOptions,
9226
- showSearchPromptWhenEmptyQuery = false
9247
+ showSearchPromptWhenEmptyQuery = false,
9248
+ matchTriggerBackground = false
9227
9249
  }) => {
9228
9250
  const globalConfig = useUnderverseUIConfig();
9229
9251
  const resolvedBorderMode = borderMode ?? globalConfig.borderMode ?? "full";
@@ -9238,6 +9260,7 @@ var Combobox = ({
9238
9260
  const [query, setQuery] = React30.useState("");
9239
9261
  const [activeIndex, setActiveIndex] = React30.useState(null);
9240
9262
  const [localRequiredError, setLocalRequiredError] = React30.useState();
9263
+ const [triggerBackgroundColor, setTriggerBackgroundColor] = React30.useState();
9241
9264
  useShadCNAnimations();
9242
9265
  const inputRef = React30.useRef(null);
9243
9266
  const optionsViewportRef = React30.useRef(null);
@@ -9279,6 +9302,12 @@ var Combobox = ({
9279
9302
  });
9280
9303
  const virtualItems = canVirtualize ? optionVirtualizer.getVirtualItems() : [];
9281
9304
  const triggerRef = React30.useRef(null);
9305
+ const updateTriggerBackgroundColor = React30.useCallback(() => {
9306
+ const trigger = triggerRef.current;
9307
+ if (!trigger) return;
9308
+ const backgroundColor = window.getComputedStyle(trigger).backgroundColor;
9309
+ setTriggerBackgroundColor((current) => current === backgroundColor ? current : backgroundColor);
9310
+ }, []);
9282
9311
  const scrollVirtualListToIndex = React30.useCallback((index) => {
9283
9312
  if (!canVirtualize || renderLimitedOptions.length === 0) return;
9284
9313
  optionVirtualizer.scrollToIndex(index, { align: "auto" });
@@ -9333,6 +9362,19 @@ var Combobox = ({
9333
9362
  );
9334
9363
  }
9335
9364
  }, [maxInitialOptions, options.length, searchMode, virtualized]);
9365
+ React30.useLayoutEffect(() => {
9366
+ if (!open || !matchTriggerBackground) {
9367
+ setTriggerBackgroundColor(void 0);
9368
+ return void 0;
9369
+ }
9370
+ let raf = 0;
9371
+ const tick = () => {
9372
+ updateTriggerBackgroundColor();
9373
+ raf = window.requestAnimationFrame(tick);
9374
+ };
9375
+ tick();
9376
+ return () => window.cancelAnimationFrame(raf);
9377
+ }, [matchTriggerBackground, open, updateTriggerBackgroundColor]);
9336
9378
  const selectedOption = findOptionByValue(options, value) ?? (selectedOptionProp && getOptionValue(selectedOptionProp) === value ? selectedOptionProp : void 0);
9337
9379
  const displayValue = selectedOption ? getOptionLabel(selectedOption) : "";
9338
9380
  const selectedIcon = selectedOption ? getOptionIcon(selectedOption) : void 0;
@@ -9359,9 +9401,9 @@ var Combobox = ({
9359
9401
  lg: "px-4 py-3 text-base gap-3"
9360
9402
  };
9361
9403
  const iconSizeStyles = {
9362
- sm: "w-4 h-4",
9363
- md: "w-5 h-5",
9364
- lg: "w-6 h-6"
9404
+ sm: formControlSizeStyles.sm.icon,
9405
+ md: formControlSizeStyles.md.icon,
9406
+ lg: formControlSizeStyles.lg.icon
9365
9407
  };
9366
9408
  const checkIconSizeStyles = {
9367
9409
  sm: "h-3.5 w-3.5",
@@ -9568,9 +9610,9 @@ var Combobox = ({
9568
9610
  }
9569
9611
  );
9570
9612
  const sizeStyles8 = {
9571
- sm: "h-8 py-1.5 text-sm md:h-7 md:text-xs",
9572
- md: "h-10 py-2 text-sm",
9573
- lg: "h-12 py-3 text-base"
9613
+ sm: formControlSizeStyles.sm.control,
9614
+ md: formControlSizeStyles.md.control,
9615
+ lg: formControlSizeStyles.lg.control
9574
9616
  };
9575
9617
  const variantStyles6 = {
9576
9618
  default: "border border-input bg-background hover:bg-accent/5 hover:border-primary/40",
@@ -9578,8 +9620,9 @@ var Combobox = ({
9578
9620
  ghost: "border-0 bg-transparent hover:bg-accent/50",
9579
9621
  filled: "border-0 bg-muted/50 hover:bg-muted/80"
9580
9622
  };
9581
- const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
9623
+ const labelSize = formControlSizeStyles[size].label;
9582
9624
  const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
9625
+ const dropdownBackgroundStyle = matchTriggerBackground && triggerBackgroundColor ? { backgroundColor: triggerBackgroundColor } : void 0;
9583
9626
  const triggerButtonBaseProps = {
9584
9627
  ref: triggerRef,
9585
9628
  type: "button",
@@ -9603,7 +9646,8 @@ var Combobox = ({
9603
9646
  }
9604
9647
  },
9605
9648
  className: cn(
9606
- "group flex w-full items-center justify-between px-3 transition-all duration-200",
9649
+ "group flex w-full items-center justify-between transition-all duration-200",
9650
+ formControlFixedClass,
9607
9651
  radiusClass,
9608
9652
  sizeStyles8[size],
9609
9653
  variantStyles6[variant],
@@ -9615,8 +9659,8 @@ var Combobox = ({
9615
9659
  )
9616
9660
  };
9617
9661
  const triggerContents = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
9618
- selectedIcon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "shrink-0 w-5 h-5 mr-2 flex items-center justify-center text-primary", children: selectedIcon }),
9619
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: cn("flex-1 truncate text-left", !displayValue && "text-muted-foreground", fontBold && "font-semibold"), children: renderValue && selectedOption ? renderValue(selectedOption) : displayValue || placeholder }),
9662
+ selectedIcon && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: cn("mr-2 flex shrink-0 items-center justify-center overflow-hidden text-primary", formControlSizeStyles[size].icon), children: selectedIcon }),
9663
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: cn(formControlValueClass, "text-left", !displayValue && "text-muted-foreground", fontBold && "font-semibold"), children: renderValue && selectedOption ? renderValue(selectedOption) : displayValue || placeholder }),
9620
9664
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5 ml-2 shrink-0", children: [
9621
9665
  allowClear && value && !disabled && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9622
9666
  "div",
@@ -9712,11 +9756,19 @@ var Combobox = ({
9712
9756
  className: "z-50",
9713
9757
  borderMode: resolvedBorderMode,
9714
9758
  contentClassName: "p-0 overflow-hidden",
9759
+ contentProps: { style: dropdownBackgroundStyle },
9715
9760
  children: dropdownBody
9716
9761
  }
9717
9762
  ) : /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "relative", children: [
9718
9763
  triggerButtonInline,
9719
- open && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getPanelBorderRadiusClass(resolvedBorderMode)), children: dropdownBody }) })
9764
+ open && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute left-0 top-full mt-1 z-50 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9765
+ "div",
9766
+ {
9767
+ style: dropdownBackgroundStyle,
9768
+ className: cn("overflow-hidden border text-popover-foreground shadow-md backdrop-blur-sm bg-popover/95 border-border/60", getPanelBorderRadiusClass(resolvedBorderMode)),
9769
+ children: dropdownBody
9770
+ }
9771
+ ) })
9720
9772
  ] }),
9721
9773
  (helperText || effectiveError) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
9722
9774
  "p",
@@ -10582,7 +10634,7 @@ var DatePicker = ({
10582
10634
  useShadCNAnimations();
10583
10635
  const sizeStyles8 = {
10584
10636
  sm: {
10585
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
10637
+ trigger: formControlSizeStyles.sm.compactControl,
10586
10638
  dayCell: "w-7 h-7 text-xs",
10587
10639
  monthCell: "w-6 h-6 text-xs",
10588
10640
  navButton: "p-1.5",
@@ -10593,13 +10645,13 @@ var DatePicker = ({
10593
10645
  actionIcon: "w-2.5 h-2.5",
10594
10646
  contentWidth: 240,
10595
10647
  contentPadding: "p-4",
10596
- label: "text-xs",
10648
+ label: formControlSizeStyles.sm.label,
10597
10649
  weekdayLabel: "text-[9px] py-1",
10598
10650
  headerMargin: "mb-2",
10599
10651
  footerMargin: "mt-3 pt-2 gap-1.5"
10600
10652
  },
10601
10653
  md: {
10602
- trigger: "px-3 py-2.5 text-sm h-10",
10654
+ trigger: formControlSizeStyles.md.control,
10603
10655
  dayCell: "w-8 h-8 text-sm",
10604
10656
  monthCell: "w-8 h-8 text-sm",
10605
10657
  navButton: "p-2",
@@ -10610,13 +10662,13 @@ var DatePicker = ({
10610
10662
  actionIcon: "w-3.5 h-3.5",
10611
10663
  contentWidth: 280,
10612
10664
  contentPadding: "p-5",
10613
- label: "text-sm",
10665
+ label: formControlSizeStyles.md.label,
10614
10666
  weekdayLabel: "text-[10px] py-1.5",
10615
10667
  headerMargin: "mb-4",
10616
10668
  footerMargin: "mt-4 pt-3 gap-2"
10617
10669
  },
10618
10670
  lg: {
10619
- trigger: "px-4 py-3 text-base h-12",
10671
+ trigger: formControlSizeStyles.lg.control,
10620
10672
  dayCell: "w-10 h-10 text-base",
10621
10673
  monthCell: "w-10 h-10 text-base",
10622
10674
  navButton: "p-2.5",
@@ -10627,7 +10679,7 @@ var DatePicker = ({
10627
10679
  actionIcon: "w-4 h-4",
10628
10680
  contentWidth: 340,
10629
10681
  contentPadding: "p-6",
10630
- label: "text-base",
10682
+ label: formControlSizeStyles.lg.label,
10631
10683
  weekdayLabel: "text-xs py-2",
10632
10684
  headerMargin: "mb-5",
10633
10685
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -10985,6 +11037,7 @@ var DatePicker = ({
10985
11037
  "aria-invalid": !!effectiveError,
10986
11038
  className: cn(
10987
11039
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
11040
+ formControlFixedClass,
10988
11041
  getBorderRadiusClass(resolvedBorderMode),
10989
11042
  sizeStyles8[size].trigger,
10990
11043
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -10998,7 +11051,7 @@ var DatePicker = ({
10998
11051
  className
10999
11052
  ),
11000
11053
  children: [
11001
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2.5 flex-1 min-w-0", children: [
11054
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
11002
11055
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11003
11056
  "div",
11004
11057
  {
@@ -11030,7 +11083,7 @@ var DatePicker = ({
11030
11083
  e.stopPropagation();
11031
11084
  }
11032
11085
  },
11033
- 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"
11086
+ 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"
11034
11087
  }
11035
11088
  )
11036
11089
  ] }),
@@ -11267,7 +11320,7 @@ var DateRangePicker = ({
11267
11320
  };
11268
11321
  const sizeStyles8 = {
11269
11322
  sm: {
11270
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
11323
+ trigger: formControlSizeStyles.sm.compactControl,
11271
11324
  dayCell: "w-7 h-7 text-xs",
11272
11325
  monthCell: "w-6 h-6 text-xs",
11273
11326
  navButton: "p-1.5",
@@ -11278,13 +11331,13 @@ var DateRangePicker = ({
11278
11331
  actionIcon: "w-2.5 h-2.5",
11279
11332
  contentWidth: 240,
11280
11333
  contentPadding: "p-4",
11281
- label: "text-xs",
11334
+ label: formControlSizeStyles.sm.label,
11282
11335
  weekdayLabel: "text-[9px] py-1",
11283
11336
  headerMargin: "mb-2",
11284
11337
  footerMargin: "mt-3 pt-2 gap-1.5"
11285
11338
  },
11286
11339
  md: {
11287
- trigger: "px-3 py-2.5 text-sm h-10",
11340
+ trigger: formControlSizeStyles.md.control,
11288
11341
  dayCell: "w-8 h-8 text-sm",
11289
11342
  monthCell: "w-8 h-8 text-sm",
11290
11343
  navButton: "p-2",
@@ -11295,13 +11348,13 @@ var DateRangePicker = ({
11295
11348
  actionIcon: "w-3.5 h-3.5",
11296
11349
  contentWidth: 280,
11297
11350
  contentPadding: "p-5",
11298
- label: "text-sm",
11351
+ label: formControlSizeStyles.md.label,
11299
11352
  weekdayLabel: "text-[10px] py-1.5",
11300
11353
  headerMargin: "mb-4",
11301
11354
  footerMargin: "mt-4 pt-3 gap-2"
11302
11355
  },
11303
11356
  lg: {
11304
- trigger: "px-4 py-3 text-base h-12",
11357
+ trigger: formControlSizeStyles.lg.control,
11305
11358
  dayCell: "w-10 h-10 text-base",
11306
11359
  monthCell: "w-10 h-10 text-base",
11307
11360
  navButton: "p-2.5",
@@ -11312,7 +11365,7 @@ var DateRangePicker = ({
11312
11365
  actionIcon: "w-4 h-4",
11313
11366
  contentWidth: 340,
11314
11367
  contentPadding: "p-6",
11315
- label: "text-base",
11368
+ label: formControlSizeStyles.lg.label,
11316
11369
  weekdayLabel: "text-xs py-2",
11317
11370
  headerMargin: "mb-5",
11318
11371
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -11739,6 +11792,7 @@ var DateRangePicker = ({
11739
11792
  "aria-invalid": !!effectiveError,
11740
11793
  className: cn(
11741
11794
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
11795
+ formControlFixedClass,
11742
11796
  getBorderRadiusClass(resolvedBorderMode),
11743
11797
  sizeStyles8[size].trigger,
11744
11798
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -11751,7 +11805,7 @@ var DateRangePicker = ({
11751
11805
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
11752
11806
  ),
11753
11807
  children: [
11754
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("flex items-center flex-1 min-w-0", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
11808
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("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: [
11755
11809
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11756
11810
  "div",
11757
11811
  {
@@ -11783,11 +11837,11 @@ var DateRangePicker = ({
11783
11837
  e.stopPropagation();
11784
11838
  }
11785
11839
  },
11786
- 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"
11840
+ 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"
11787
11841
  }
11788
11842
  )
11789
11843
  ] }),
11790
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
11844
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: cn("shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
11791
11845
  ]
11792
11846
  }
11793
11847
  ),
@@ -12237,7 +12291,7 @@ var LunarDatePicker = ({
12237
12291
  useShadCNAnimations();
12238
12292
  const sizeStyles8 = {
12239
12293
  sm: {
12240
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
12294
+ trigger: formControlSizeStyles.sm.compactControl,
12241
12295
  dayCell: "w-7 h-7 text-xs",
12242
12296
  monthCell: "w-6 h-6 text-xs",
12243
12297
  navButton: "p-1.5",
@@ -12248,13 +12302,13 @@ var LunarDatePicker = ({
12248
12302
  actionIcon: "w-2.5 h-2.5",
12249
12303
  contentWidth: 240,
12250
12304
  contentPadding: "p-4",
12251
- label: "text-xs",
12305
+ label: formControlSizeStyles.sm.label,
12252
12306
  weekdayLabel: "text-[9px] py-1",
12253
12307
  headerMargin: "mb-2",
12254
12308
  footerMargin: "mt-3 pt-2 gap-1.5"
12255
12309
  },
12256
12310
  md: {
12257
- trigger: "px-3 py-2.5 text-sm h-10",
12311
+ trigger: formControlSizeStyles.md.control,
12258
12312
  dayCell: "w-8 h-8 text-sm",
12259
12313
  monthCell: "w-8 h-8 text-sm",
12260
12314
  navButton: "p-2",
@@ -12265,13 +12319,13 @@ var LunarDatePicker = ({
12265
12319
  actionIcon: "w-3.5 h-3.5",
12266
12320
  contentWidth: 280,
12267
12321
  contentPadding: "p-5",
12268
- label: "text-sm",
12322
+ label: formControlSizeStyles.md.label,
12269
12323
  weekdayLabel: "text-[10px] py-1.5",
12270
12324
  headerMargin: "mb-4",
12271
12325
  footerMargin: "mt-4 pt-3 gap-2"
12272
12326
  },
12273
12327
  lg: {
12274
- trigger: "px-4 py-3 text-base h-12",
12328
+ trigger: formControlSizeStyles.lg.control,
12275
12329
  dayCell: "w-10 h-10 text-base",
12276
12330
  monthCell: "w-10 h-10 text-base",
12277
12331
  navButton: "p-2.5",
@@ -12282,7 +12336,7 @@ var LunarDatePicker = ({
12282
12336
  actionIcon: "w-4 h-4",
12283
12337
  contentWidth: 340,
12284
12338
  contentPadding: "p-6",
12285
- label: "text-base",
12339
+ label: formControlSizeStyles.lg.label,
12286
12340
  weekdayLabel: "text-xs py-2",
12287
12341
  headerMargin: "mb-5",
12288
12342
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -12671,6 +12725,7 @@ var LunarDatePicker = ({
12671
12725
  "aria-invalid": !!effectiveError,
12672
12726
  className: cn(
12673
12727
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
12728
+ formControlFixedClass,
12674
12729
  getBorderRadiusClass(resolvedBorderMode),
12675
12730
  sizeStyles8[size].trigger,
12676
12731
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -12684,7 +12739,7 @@ var LunarDatePicker = ({
12684
12739
  className
12685
12740
  ),
12686
12741
  children: [
12687
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2.5 flex-1 min-w-0", children: [
12742
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
12688
12743
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12689
12744
  "div",
12690
12745
  {
@@ -12716,7 +12771,7 @@ var LunarDatePicker = ({
12716
12771
  e.stopPropagation();
12717
12772
  }
12718
12773
  },
12719
- 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"
12774
+ 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"
12720
12775
  }
12721
12776
  )
12722
12777
  ] }),
@@ -12800,7 +12855,7 @@ var LunarDateRangePicker = ({
12800
12855
  const wheelDeltaRef = React35.useRef(0);
12801
12856
  const sizeStyles8 = {
12802
12857
  sm: {
12803
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
12858
+ trigger: formControlSizeStyles.sm.compactControl,
12804
12859
  dayCell: "w-7 h-7 text-xs",
12805
12860
  monthCell: "w-6 h-6 text-xs",
12806
12861
  navButton: "p-1.5",
@@ -12811,13 +12866,13 @@ var LunarDateRangePicker = ({
12811
12866
  actionIcon: "w-2.5 h-2.5",
12812
12867
  contentWidth: 240,
12813
12868
  contentPadding: "p-4",
12814
- label: "text-xs",
12869
+ label: formControlSizeStyles.sm.label,
12815
12870
  weekdayLabel: "text-[9px] py-1",
12816
12871
  headerMargin: "mb-2",
12817
12872
  footerMargin: "mt-3 pt-2 gap-1.5"
12818
12873
  },
12819
12874
  md: {
12820
- trigger: "px-3 py-2.5 text-sm h-10",
12875
+ trigger: formControlSizeStyles.md.control,
12821
12876
  dayCell: "w-8 h-8 text-sm",
12822
12877
  monthCell: "w-8 h-8 text-sm",
12823
12878
  navButton: "p-2",
@@ -12828,13 +12883,13 @@ var LunarDateRangePicker = ({
12828
12883
  actionIcon: "w-3.5 h-3.5",
12829
12884
  contentWidth: 280,
12830
12885
  contentPadding: "p-5",
12831
- label: "text-sm",
12886
+ label: formControlSizeStyles.md.label,
12832
12887
  weekdayLabel: "text-[10px] py-1.5",
12833
12888
  headerMargin: "mb-4",
12834
12889
  footerMargin: "mt-4 pt-3 gap-2"
12835
12890
  },
12836
12891
  lg: {
12837
- trigger: "px-4 py-3 text-base h-12",
12892
+ trigger: formControlSizeStyles.lg.control,
12838
12893
  dayCell: "w-10 h-10 text-base",
12839
12894
  monthCell: "w-10 h-10 text-base",
12840
12895
  navButton: "p-2.5",
@@ -12845,7 +12900,7 @@ var LunarDateRangePicker = ({
12845
12900
  actionIcon: "w-4 h-4",
12846
12901
  contentWidth: 340,
12847
12902
  contentPadding: "p-6",
12848
- label: "text-base",
12903
+ label: formControlSizeStyles.lg.label,
12849
12904
  weekdayLabel: "text-xs py-2",
12850
12905
  headerMargin: "mb-5",
12851
12906
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -13292,6 +13347,7 @@ var LunarDateRangePicker = ({
13292
13347
  "aria-invalid": !!effectiveError,
13293
13348
  className: cn(
13294
13349
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
13350
+ formControlFixedClass,
13295
13351
  getBorderRadiusClass(borderMode ?? "full"),
13296
13352
  sizeStyles8[size].trigger,
13297
13353
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -13304,7 +13360,7 @@ var LunarDateRangePicker = ({
13304
13360
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
13305
13361
  ),
13306
13362
  children: [
13307
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("flex items-center flex-1 min-w-0", size === "sm" ? "gap-1.5" : "gap-2.5"), children: [
13363
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("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: [
13308
13364
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
13309
13365
  "div",
13310
13366
  {
@@ -13315,9 +13371,9 @@ var LunarDateRangePicker = ({
13315
13371
  children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react18.Calendar, { className: cn("transition-transform duration-300", sizeStyles8[size].calendarIcon, isOpen && "scale-110") })
13316
13372
  }
13317
13373
  ),
13318
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("w-full truncate font-medium", !tempStart && "text-muted-foreground/60"), children: tempStart ? displayLabel : placeholder })
13374
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("min-w-0 flex-1 truncate whitespace-nowrap font-medium", !tempStart && "text-muted-foreground/60"), children: tempStart ? displayLabel : placeholder })
13319
13375
  ] }),
13320
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
13376
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("shrink-0 transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { className: cn(sizeStyles8[size].navIcon), fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2.5, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" }) }) })
13321
13377
  ]
13322
13378
  }
13323
13379
  ),
@@ -13945,9 +14001,9 @@ function MonthYearPicker({
13945
14001
  setOpen(false);
13946
14002
  };
13947
14003
  const sizeClasses2 = {
13948
- sm: { label: "text-xs", height: "h-8", padding: "px-2.5 py-1.5", text: "text-xs", icon: "w-3.5 h-3.5" },
13949
- md: { label: "text-sm", height: "h-10", padding: "px-3 py-2", text: "text-sm", icon: "w-4 h-4" },
13950
- lg: { label: "text-base", height: "h-12", padding: "px-4 py-3", text: "text-base", icon: "w-5 h-5" }
14004
+ sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
14005
+ md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
14006
+ lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
13951
14007
  };
13952
14008
  const panelSizeClasses = {
13953
14009
  sm: { contentPadding: "p-4", stackGap: "space-y-3", displayText: "text-lg", actionText: "text-[11px]", actionPadding: "px-3 py-2" },
@@ -13975,9 +14031,8 @@ function MonthYearPicker({
13975
14031
  className: cn(
13976
14032
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
13977
14033
  getBorderRadiusClass(resolvedBorderMode),
13978
- sz.height,
13979
- sz.padding,
13980
- sz.text,
14034
+ sz.control,
14035
+ formControlFixedClass,
13981
14036
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
13982
14037
  "disabled:opacity-50 disabled:cursor-not-allowed",
13983
14038
  "transition-all duration-300 ease-out",
@@ -13989,7 +14044,7 @@ function MonthYearPicker({
13989
14044
  className
13990
14045
  ),
13991
14046
  children: [
13992
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
14047
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
13993
14048
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
13994
14049
  "div",
13995
14050
  {
@@ -14003,7 +14058,7 @@ function MonthYearPicker({
14003
14058
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
14004
14059
  "span",
14005
14060
  {
14006
- className: cn("min-w-0 truncate font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
14061
+ className: cn(formControlValueClass, "font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
14007
14062
  children: hasValue ? display : placeholder
14008
14063
  }
14009
14064
  )
@@ -15661,9 +15716,9 @@ function TimePicker({
15661
15716
  }
15662
15717
  };
15663
15718
  const sizeClasses2 = {
15664
- sm: { label: "text-xs", height: "h-8", padding: "px-2.5 py-1.5", text: "text-xs", icon: "w-3.5 h-3.5" },
15665
- md: { label: "text-sm", height: "h-10", padding: "px-3 py-2", text: "text-sm", icon: "w-4 h-4" },
15666
- lg: { label: "text-base", height: "h-12", padding: "px-4 py-3", text: "text-base", icon: "w-5 h-5" }
15719
+ sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
15720
+ md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
15721
+ lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
15667
15722
  };
15668
15723
  const sz = sizeClasses2[size];
15669
15724
  const effectivePanelSize = variant === "compact" ? size === "lg" ? "md" : "sm" : size;
@@ -15686,9 +15741,8 @@ function TimePicker({
15686
15741
  className: cn(
15687
15742
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
15688
15743
  getBorderRadiusClass(resolvedBorderMode),
15689
- sz.height,
15690
- sz.padding,
15691
- sz.text,
15744
+ sz.control,
15745
+ formControlFixedClass,
15692
15746
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
15693
15747
  "disabled:opacity-50 disabled:cursor-not-allowed",
15694
15748
  "transition-all duration-300 ease-out",
@@ -15700,7 +15754,7 @@ function TimePicker({
15700
15754
  className
15701
15755
  ),
15702
15756
  children: [
15703
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
15757
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden", children: [
15704
15758
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
15705
15759
  "div",
15706
15760
  {
@@ -15715,7 +15769,8 @@ function TimePicker({
15715
15769
  "span",
15716
15770
  {
15717
15771
  className: cn(
15718
- "min-w-0 truncate font-medium transition-colors duration-200",
15772
+ formControlValueClass,
15773
+ "font-medium transition-colors duration-200",
15719
15774
  !hasCommittedValue && "text-muted-foreground",
15720
15775
  hasCommittedValue ? "text-foreground" : ""
15721
15776
  ),
@@ -16179,9 +16234,9 @@ var DateTimePicker = ({
16179
16234
  const [localRequiredError, setLocalRequiredError] = React39.useState();
16180
16235
  const sizeStyles8 = {
16181
16236
  sm: {
16182
- trigger: "h-8 px-2.5 py-1.5 text-sm md:h-7 md:text-xs",
16183
- icon: "h-3.5 w-3.5",
16184
- label: "text-xs",
16237
+ trigger: formControlSizeStyles.sm.compactControl,
16238
+ icon: formControlSizeStyles.sm.icon,
16239
+ label: formControlSizeStyles.sm.label,
16185
16240
  buttonSize: "sm",
16186
16241
  calendarSize: "sm",
16187
16242
  timePickerSize: "sm",
@@ -16189,9 +16244,9 @@ var DateTimePicker = ({
16189
16244
  gap: "gap-2"
16190
16245
  },
16191
16246
  md: {
16192
- trigger: "h-10 px-3 py-2 text-sm",
16193
- icon: "h-4 w-4",
16194
- label: "text-sm",
16247
+ trigger: formControlSizeStyles.md.control,
16248
+ icon: formControlSizeStyles.md.icon,
16249
+ label: formControlSizeStyles.md.label,
16195
16250
  buttonSize: "sm",
16196
16251
  calendarSize: "md",
16197
16252
  timePickerSize: "md",
@@ -16199,9 +16254,9 @@ var DateTimePicker = ({
16199
16254
  gap: "gap-3"
16200
16255
  },
16201
16256
  lg: {
16202
- trigger: "h-12 px-4 py-3 text-base",
16203
- icon: "h-5 w-5",
16204
- label: "text-base",
16257
+ trigger: formControlSizeStyles.lg.control,
16258
+ icon: formControlSizeStyles.lg.icon,
16259
+ label: formControlSizeStyles.lg.label,
16205
16260
  buttonSize: "md",
16206
16261
  calendarSize: "lg",
16207
16262
  timePickerSize: "lg",
@@ -16351,6 +16406,7 @@ var DateTimePicker = ({
16351
16406
  "aria-invalid": !!effectiveError,
16352
16407
  className: cn(
16353
16408
  "flex w-full items-center justify-between border border-input bg-background",
16409
+ formControlFixedClass,
16354
16410
  getBorderRadiusClass(resolvedBorderMode),
16355
16411
  sizeStyles8[size].trigger,
16356
16412
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
@@ -16359,7 +16415,7 @@ var DateTimePicker = ({
16359
16415
  effectiveError && "border-destructive/60 bg-destructive/5"
16360
16416
  ),
16361
16417
  children: [
16362
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: displayValue || placeholder || "Select date & time" }),
16418
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: cn(formControlValueClass, "text-left"), children: displayValue || placeholder || "Select date & time" }),
16363
16419
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex shrink-0 items-center gap-2 text-muted-foreground", children: [
16364
16420
  value && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
16365
16421
  "span",
@@ -19557,25 +19613,25 @@ var MultiCombobox = ({
19557
19613
  }, [maxInitialOptions, normalizedOptions.length, searchMode, virtualized]);
19558
19614
  const sizeStyles8 = {
19559
19615
  sm: {
19560
- trigger: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
19561
- icon: "h-4 w-4",
19616
+ trigger: formControlSizeStyles.sm.control,
19617
+ icon: formControlSizeStyles.sm.icon,
19562
19618
  search: "px-8 py-1.5 text-xs",
19563
19619
  item: "text-xs px-3 py-1.5",
19564
- tag: "px-2 py-0.5 text-[10px]"
19620
+ tag: formControlSizeStyles.sm.tag
19565
19621
  },
19566
19622
  md: {
19567
- trigger: "h-10 px-4 py-2 text-sm",
19568
- icon: "h-4 w-4",
19623
+ trigger: formControlSizeStyles.md.control,
19624
+ icon: formControlSizeStyles.md.icon,
19569
19625
  search: "px-10 py-2 text-sm",
19570
19626
  item: "text-sm px-3 py-2",
19571
- tag: "px-2 py-1 text-xs"
19627
+ tag: formControlSizeStyles.md.tag
19572
19628
  },
19573
19629
  lg: {
19574
- trigger: "h-12 px-5 py-3 text-base",
19575
- icon: "h-5 w-5",
19630
+ trigger: formControlSizeStyles.lg.control,
19631
+ icon: formControlSizeStyles.lg.icon,
19576
19632
  search: "px-10 py-3 text-base",
19577
19633
  item: "text-base px-3 py-3",
19578
- tag: "px-2.5 py-1 text-sm"
19634
+ tag: formControlSizeStyles.lg.tag
19579
19635
  }
19580
19636
  };
19581
19637
  const variantStyles6 = {
@@ -19586,7 +19642,7 @@ var MultiCombobox = ({
19586
19642
  const autoId = (0, import_react24.useId)();
19587
19643
  const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
19588
19644
  const labelId = label ? `${resolvedId}-label` : void 0;
19589
- const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
19645
+ const labelSize = formControlSizeStyles[size].label;
19590
19646
  const listboxId = `${resolvedId}-listbox`;
19591
19647
  const renderOptionItem = (item, index, virtualItem) => {
19592
19648
  const isSelected = value.includes(item.value);
@@ -19810,6 +19866,7 @@ var MultiCombobox = ({
19810
19866
  "aria-invalid": !!effectiveError,
19811
19867
  className: cn(
19812
19868
  "group flex w-full items-center gap-2 transition-all duration-200",
19869
+ formControlFixedClass,
19813
19870
  getBorderRadiusClass(resolvedBorderMode),
19814
19871
  sizeStyles8[size].trigger,
19815
19872
  variantStyles6[variant],
@@ -19819,22 +19876,22 @@ var MultiCombobox = ({
19819
19876
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30"
19820
19877
  ),
19821
19878
  children: [
19822
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex items-center gap-1.5 flex-1 overflow-hidden", size === "sm" ? "min-h-4" : size === "lg" ? "min-h-8" : "min-h-6"), children: value.length > 0 ? showTags ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
19879
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: value.length > 0 ? showTags ? /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
19823
19880
  visibleTags.map((option) => {
19824
19881
  if (renderTag) {
19825
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(React46.Fragment, { children: renderTag(option, () => handleRemove(option.value)) }, option.value);
19882
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "inline-flex max-h-full min-w-0 shrink overflow-hidden", children: renderTag(option, () => handleRemove(option.value)) }, option.value);
19826
19883
  }
19827
19884
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
19828
19885
  "span",
19829
19886
  {
19830
19887
  className: cn(
19831
- "inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200 min-w-0",
19888
+ "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",
19832
19889
  "hover:bg-primary/20",
19833
19890
  sizeStyles8[size].tag
19834
19891
  ),
19835
19892
  children: [
19836
19893
  showSelectedIcons && option.icon && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "shrink-0 w-3.5 h-3.5 flex items-center justify-center", children: option.icon }),
19837
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "truncate max-w-24", children: displayFormat(option) }),
19894
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "min-w-0 truncate", children: displayFormat(option) }),
19838
19895
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
19839
19896
  "span",
19840
19897
  {
@@ -19863,7 +19920,7 @@ var MultiCombobox = ({
19863
19920
  );
19864
19921
  }),
19865
19922
  hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("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` })
19866
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "truncate text-sm font-medium", children: gi18n.selectedCount ? gi18n.selectedCount(value.length) : `${value.length} item${value.length > 1 ? "s" : ""} selected` }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground", children: placeholder }) }),
19923
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn(formControlValueClass, "font-medium"), children: gi18n.selectedCount ? gi18n.selectedCount(value.length) : `${value.length} item${value.length > 1 ? "s" : ""} selected` }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: cn(formControlValueClass, "text-muted-foreground"), children: placeholder }) }),
19867
19924
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
19868
19925
  showClear && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
19869
19926
  "div",
@@ -21837,29 +21894,29 @@ function CategoryTreeSelect(props) {
21837
21894
  const selectedCount = valueArray.length;
21838
21895
  const triggerSizeStyles = {
21839
21896
  sm: {
21840
- button: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
21897
+ button: formControlSizeStyles.sm.control,
21841
21898
  iconWrap: "p-1",
21842
- icon: "w-3.5 h-3.5 md:w-3 md:h-3",
21843
- text: "text-xs md:text-[11px]",
21844
- badge: "px-1.5 py-0.5 text-[10px]",
21845
- actionIcon: "w-3.5 h-3.5",
21899
+ icon: formControlSizeStyles.sm.icon,
21900
+ text: formControlSizeStyles.sm.label,
21901
+ badge: formControlSizeStyles.sm.tag,
21902
+ actionIcon: formControlSizeStyles.sm.icon,
21846
21903
  clearIcon: "h-3 w-3"
21847
21904
  },
21848
21905
  md: {
21849
- button: "h-10 px-3 py-2.5 text-sm",
21906
+ button: formControlSizeStyles.md.control,
21850
21907
  iconWrap: "p-1.5",
21851
21908
  icon: "w-4 h-4",
21852
- text: "text-sm",
21853
- badge: "px-2 py-0.5 text-xs",
21909
+ text: formControlSizeStyles.md.label,
21910
+ badge: formControlSizeStyles.md.tag,
21854
21911
  actionIcon: "w-4 h-4",
21855
21912
  clearIcon: "h-3.5 w-3.5"
21856
21913
  },
21857
21914
  lg: {
21858
- button: "h-12 px-4 py-3 text-base",
21915
+ button: formControlSizeStyles.lg.control,
21859
21916
  iconWrap: "p-1.5",
21860
21917
  icon: "w-5 h-5",
21861
- text: "text-base",
21862
- badge: "px-2.5 py-1 text-sm",
21918
+ text: formControlSizeStyles.lg.label,
21919
+ badge: formControlSizeStyles.lg.tag,
21863
21920
  actionIcon: "w-5 h-5",
21864
21921
  clearIcon: "h-4 w-4"
21865
21922
  }
@@ -21981,6 +22038,7 @@ function CategoryTreeSelect(props) {
21981
22038
  },
21982
22039
  className: cn(
21983
22040
  "group flex w-full items-center justify-between transition-all duration-200",
22041
+ formControlFixedClass,
21984
22042
  getBorderRadiusClass(resolvedBorderMode ?? "full"),
21985
22043
  "backdrop-blur-sm",
21986
22044
  triggerSizeStyles[size].button,
@@ -21991,7 +22049,7 @@ function CategoryTreeSelect(props) {
21991
22049
  effectiveError && "border-destructive focus-visible:ring-destructive/30"
21992
22050
  ),
21993
22051
  children: [
21994
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 text-left", children: [
22052
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2.5 overflow-hidden text-left", children: [
21995
22053
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
21996
22054
  "div",
21997
22055
  {
@@ -22007,7 +22065,8 @@ function CategoryTreeSelect(props) {
22007
22065
  "span",
22008
22066
  {
22009
22067
  className: cn(
22010
- "min-w-0 flex-1 truncate font-medium transition-colors duration-200",
22068
+ formControlValueClass,
22069
+ "font-medium transition-colors duration-200",
22011
22070
  triggerSizeStyles[size].text,
22012
22071
  selectedCount === 0 ? "text-muted-foreground" : "text-foreground"
22013
22072
  ),
@@ -22031,7 +22090,7 @@ function CategoryTreeSelect(props) {
22031
22090
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.X, { className: triggerSizeStyles[size].clearIcon })
22032
22091
  }
22033
22092
  ),
22034
- selectedCount > 0 && !singleSelect && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("rounded-full bg-primary/15 font-bold text-primary", triggerSizeStyles[size].badge), children: selectedCount }),
22093
+ selectedCount > 0 && !singleSelect && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("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 }),
22035
22094
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: cn("transition-all duration-300 text-muted-foreground group-hover:text-foreground", isOpen && "rotate-180 text-primary"), children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.ChevronDown, { className: triggerSizeStyles[size].actionIcon }) })
22036
22095
  ] })
22037
22096
  ]
@@ -24659,9 +24718,9 @@ function ColorPicker({
24659
24718
  const alphaPct = Math.round(rgba.a * 100);
24660
24719
  const harmony = showHarmony ? getColorHarmony(rgba) : null;
24661
24720
  const sizeClasses2 = {
24662
- sm: "h-8 text-xs",
24663
- md: "h-10 text-sm",
24664
- lg: "h-12 text-base"
24721
+ sm: formControlSizeStyles.sm.control,
24722
+ md: formControlSizeStyles.md.control,
24723
+ lg: formControlSizeStyles.lg.control
24665
24724
  };
24666
24725
  const swatchSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "md";
24667
24726
  const trigger = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
@@ -24670,16 +24729,17 @@ function ColorPicker({
24670
24729
  type: "button",
24671
24730
  disabled,
24672
24731
  className: cn(
24673
- "w-full px-3 border border-input bg-background flex items-center justify-between",
24732
+ "w-full border border-input bg-background flex items-center justify-between",
24674
24733
  getBorderRadiusClass(resolvedBorderMode),
24675
24734
  sizeClasses2[size],
24735
+ formControlFixedClass,
24676
24736
  "hover:border-accent-foreground/30 transition-colors",
24677
24737
  disabled && "opacity-50 cursor-not-allowed",
24678
24738
  triggerClassName
24679
24739
  ),
24680
24740
  "aria-label": gi18n.openColorPicker ?? "Open color picker",
24681
24741
  children: [
24682
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-2", children: [
24742
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
24683
24743
  /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
24684
24744
  "span",
24685
24745
  {
@@ -24687,9 +24747,9 @@ function ColorPicker({
24687
24747
  style: { backgroundColor: withAlpha ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` : hexForInput }
24688
24748
  }
24689
24749
  ),
24690
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "font-mono text-muted-foreground", children: text })
24750
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: cn(formControlValueClass, "font-mono text-muted-foreground"), children: text })
24691
24751
  ] }),
24692
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react35.Pipette, { className: cn(size === "sm" ? "w-3.5 h-3.5" : size === "lg" ? "w-5 h-5" : "w-4 h-4", "text-muted-foreground") })
24752
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react35.Pipette, { className: cn(formControlSizeStyles[size].icon, "shrink-0 text-muted-foreground") })
24693
24753
  ]
24694
24754
  }
24695
24755
  );
@@ -37581,7 +37641,7 @@ function findDiffEnd(a, b, posA, posB) {
37581
37641
  posB -= size;
37582
37642
  }
37583
37643
  }
37584
- var Fragment32 = class _Fragment {
37644
+ var Fragment31 = class _Fragment {
37585
37645
  /**
37586
37646
  @internal
37587
37647
  */
@@ -37873,7 +37933,7 @@ var Fragment32 = class _Fragment {
37873
37933
  throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
37874
37934
  }
37875
37935
  };
37876
- Fragment32.empty = new Fragment32([], 0);
37936
+ Fragment31.empty = new Fragment31([], 0);
37877
37937
  var found = { index: 0, offset: 0 };
37878
37938
  function retIndex(index, offset) {
37879
37939
  found.index = index;
@@ -38098,7 +38158,7 @@ var Slice = class _Slice {
38098
38158
  let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
38099
38159
  if (typeof openStart != "number" || typeof openEnd != "number")
38100
38160
  throw new RangeError("Invalid input for Slice.fromJSON");
38101
- return new _Slice(Fragment32.fromJSON(schema, json.content), openStart, openEnd);
38161
+ return new _Slice(Fragment31.fromJSON(schema, json.content), openStart, openEnd);
38102
38162
  }
38103
38163
  /**
38104
38164
  Create a slice from a fragment by taking the maximum possible
@@ -38113,7 +38173,7 @@ var Slice = class _Slice {
38113
38173
  return new _Slice(fragment, openStart, openEnd);
38114
38174
  }
38115
38175
  };
38116
- Slice.empty = new Slice(Fragment32.empty, 0, 0);
38176
+ Slice.empty = new Slice(Fragment31.empty, 0, 0);
38117
38177
  function removeRange(content, from, to) {
38118
38178
  let { index, offset } = content.findIndex(from), child = content.maybeChild(index);
38119
38179
  let { index: indexTo, offset: offsetTo } = content.findIndex(to);
@@ -38211,7 +38271,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
38211
38271
  addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
38212
38272
  }
38213
38273
  addRange($to, null, depth, content);
38214
- return new Fragment32(content);
38274
+ return new Fragment31(content);
38215
38275
  }
38216
38276
  function replaceTwoWay($from, $to, depth) {
38217
38277
  let content = [];
@@ -38221,13 +38281,13 @@ function replaceTwoWay($from, $to, depth) {
38221
38281
  addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
38222
38282
  }
38223
38283
  addRange($to, null, depth, content);
38224
- return new Fragment32(content);
38284
+ return new Fragment31(content);
38225
38285
  }
38226
38286
  function prepareSliceForReplace(slice, $along) {
38227
38287
  let extra = $along.depth - slice.openStart, parent = $along.node(extra);
38228
38288
  let node = parent.copy(slice.content);
38229
38289
  for (let i = extra - 1; i >= 0; i--)
38230
- node = $along.node(i).copy(Fragment32.from(node));
38290
+ node = $along.node(i).copy(Fragment31.from(node));
38231
38291
  return {
38232
38292
  start: node.resolveNoCache(slice.openStart + extra),
38233
38293
  end: node.resolveNoCache(node.content.size - slice.openEnd - extra)
@@ -38566,7 +38626,7 @@ var Node7 = class _Node {
38566
38626
  this.type = type;
38567
38627
  this.attrs = attrs;
38568
38628
  this.marks = marks;
38569
- this.content = content || Fragment32.empty;
38629
+ this.content = content || Fragment31.empty;
38570
38630
  }
38571
38631
  /**
38572
38632
  The array of this node's child nodes.
@@ -38871,7 +38931,7 @@ var Node7 = class _Node {
38871
38931
  can optionally pass `start` and `end` indices into the
38872
38932
  replacement fragment.
38873
38933
  */
38874
- canReplace(from, to, replacement = Fragment32.empty, start = 0, end = replacement.childCount) {
38934
+ canReplace(from, to, replacement = Fragment31.empty, start = 0, end = replacement.childCount) {
38875
38935
  let one = this.contentMatchAt(from).matchFragment(replacement, start, end);
38876
38936
  let two = one && one.matchFragment(this.content, to);
38877
38937
  if (!two || !two.validEnd)
@@ -38953,7 +39013,7 @@ var Node7 = class _Node {
38953
39013
  throw new RangeError("Invalid text node in JSON");
38954
39014
  return schema.text(json.text, marks);
38955
39015
  }
38956
- let content = Fragment32.fromJSON(schema, json.content);
39016
+ let content = Fragment31.fromJSON(schema, json.content);
38957
39017
  let node = schema.nodeType(json.type).create(json.attrs, content, marks);
38958
39018
  node.type.checkAttrs(node.attrs);
38959
39019
  return node;
@@ -39049,7 +39109,7 @@ var ContentMatch = class _ContentMatch {
39049
39109
  function search(match, types) {
39050
39110
  let finished = match.matchFragment(after, startIndex);
39051
39111
  if (finished && (!toEnd || finished.validEnd))
39052
- return Fragment32.from(types.map((tp) => tp.createAndFill()));
39112
+ return Fragment31.from(types.map((tp) => tp.createAndFill()));
39053
39113
  for (let i = 0; i < match.next.length; i++) {
39054
39114
  let { type, next } = match.next[i];
39055
39115
  if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
@@ -39617,7 +39677,7 @@ function mapFragment(fragment, f, parent) {
39617
39677
  child = f(child, parent, i);
39618
39678
  mapped.push(child);
39619
39679
  }
39620
- return Fragment32.fromArray(mapped);
39680
+ return Fragment31.fromArray(mapped);
39621
39681
  }
39622
39682
  var AddMarkStep = class _AddMarkStep extends Step {
39623
39683
  /**
@@ -39734,7 +39794,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
39734
39794
  if (!node)
39735
39795
  return StepResult.fail("No node at mark step's position");
39736
39796
  let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
39737
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39797
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39738
39798
  }
39739
39799
  invert(doc) {
39740
39800
  let node = doc.nodeAt(this.pos);
@@ -39780,7 +39840,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
39780
39840
  if (!node)
39781
39841
  return StepResult.fail("No node at mark step's position");
39782
39842
  let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
39783
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39843
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39784
39844
  }
39785
39845
  invert(doc) {
39786
39846
  let node = doc.nodeAt(this.pos);
@@ -39981,7 +40041,7 @@ var AttrStep = class _AttrStep extends Step {
39981
40041
  attrs[name] = node.attrs[name];
39982
40042
  attrs[this.attr] = this.value;
39983
40043
  let updated = node.type.create(attrs, null, node.marks);
39984
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
40044
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39985
40045
  }
39986
40046
  getMap() {
39987
40047
  return StepMap.empty;
@@ -40365,7 +40425,7 @@ var NodeSelection2 = class _NodeSelection extends Selection {
40365
40425
  return new _NodeSelection($pos);
40366
40426
  }
40367
40427
  content() {
40368
- return new Slice(Fragment32.from(this.node), 0, 0);
40428
+ return new Slice(Fragment31.from(this.node), 0, 0);
40369
40429
  }
40370
40430
  eq(other) {
40371
40431
  return other instanceof _NodeSelection && other.anchor == this.anchor;
@@ -41093,10 +41153,10 @@ var CellSelection = class CellSelection2 extends Selection {
41093
41153
  }
41094
41154
  rowContent.push(cell);
41095
41155
  }
41096
- rows.push(table.child(row).copy(Fragment32.from(rowContent)));
41156
+ rows.push(table.child(row).copy(Fragment31.from(rowContent)));
41097
41157
  }
41098
41158
  const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
41099
- return new Slice(Fragment32.from(fragment), 1, 1);
41159
+ return new Slice(Fragment31.from(fragment), 1, 1);
41100
41160
  }
41101
41161
  replace(tr, content = Slice.empty) {
41102
41162
  const mapFrom = tr.steps.length, ranges = this.ranges;
@@ -41108,7 +41168,7 @@ var CellSelection = class CellSelection2 extends Selection {
41108
41168
  if (sel) tr.setSelection(sel);
41109
41169
  }
41110
41170
  replaceWith(tr, node) {
41111
- this.replace(tr, new Slice(Fragment32.from(node), 0, 0));
41171
+ this.replace(tr, new Slice(Fragment31.from(node), 0, 0));
41112
41172
  }
41113
41173
  forEachCell(f) {
41114
41174
  const table = this.$anchorCell.node(-1);