@underverse-ui/underverse 1.0.198 → 1.0.200

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
@@ -210,6 +210,39 @@ module.exports = __toCommonJS(index_exports);
210
210
  // src/components/Button.tsx
211
211
  var import_react = require("react");
212
212
 
213
+ // src/constants/form-control-size.ts
214
+ var formControlSizeStyles = {
215
+ sm: {
216
+ control: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
217
+ compactControl: "h-8 px-2.5 text-sm leading-none md:h-7 md:text-xs",
218
+ input: "h-8 px-3 text-sm leading-none md:h-7 md:text-xs",
219
+ label: "text-xs",
220
+ icon: "h-4 w-4 md:h-3.5 md:w-3.5",
221
+ iconButton: "h-7 w-7 md:h-6 md:w-6",
222
+ tag: "h-5 max-w-24 px-2 text-[10px] leading-none"
223
+ },
224
+ md: {
225
+ control: "h-10 px-3 text-sm leading-none",
226
+ compactControl: "h-10 px-3 text-sm leading-none",
227
+ input: "h-10 px-4 text-sm leading-none",
228
+ label: "text-sm",
229
+ icon: "h-4 w-4",
230
+ iconButton: "h-8 w-8",
231
+ tag: "h-6 max-w-28 px-2 text-xs leading-none"
232
+ },
233
+ lg: {
234
+ control: "h-12 px-4 text-base leading-none",
235
+ compactControl: "h-12 px-4 text-base leading-none",
236
+ input: "h-12 px-5 text-base leading-none",
237
+ label: "text-base",
238
+ icon: "h-5 w-5",
239
+ iconButton: "h-10 w-10",
240
+ tag: "h-7 max-w-32 px-2.5 text-sm leading-none"
241
+ }
242
+ };
243
+ var formControlFixedClass = "min-h-0 overflow-hidden";
244
+ var formControlValueClass = "max-h-full min-w-0 flex-1 truncate whitespace-nowrap";
245
+
213
246
  // src/constants/button.ts
214
247
  var VARIANT_STYLES_BTN = {
215
248
  // Mặc định: tối giản, rõ ràng, dùng tokens hệ màu
@@ -233,10 +266,10 @@ var VARIANT_STYLES_BTN = {
233
266
  gradient: "bg-linear-to-r from-primary via-primary/80 to-secondary text-primary-foreground hover:opacity-90 shadow-md border-0"
234
267
  };
235
268
  var SIZE_STYLES_BTN = {
236
- sm: "px-3 py-1.5 text-sm h-8 min-w-8 md:px-2.5 md:py-1 md:h-7 md:text-xs",
237
- md: "px-4 py-2 text-sm h-10 min-w-10 md:px-3 md:py-1.5 md:h-9",
238
- lg: "px-6 py-3 text-base h-12 min-w-12 md:px-4 md:py-2 md:h-10 md:text-sm",
239
- smx: "px-3.5 py-1.5 text-[13px] h-9 min-w-9 md:px-3 md:py-1 md:h-8 md:text-xs",
269
+ sm: `${formControlSizeStyles.sm.control} min-w-8`,
270
+ md: `${formControlSizeStyles.md.input} min-w-10`,
271
+ lg: `${formControlSizeStyles.lg.input} min-w-12`,
272
+ smx: "h-9 min-w-9 px-3.5 text-[13px] leading-none md:h-8 md:text-xs",
240
273
  icon: "w-11 h-11 p-0 rounded-full flex items-center justify-center md:w-10 md:h-10"
241
274
  };
242
275
 
@@ -321,6 +354,7 @@ var Button = (0, import_react.forwardRef)(
321
354
  const finalVariant = gradient ? "gradient" : variant;
322
355
  const variantStyle = VARIANT_STYLES_BTN[finalVariant] || VARIANT_STYLES_BTN.default;
323
356
  const sizeStyle = SIZE_STYLES_BTN[size] || SIZE_STYLES_BTN.md;
357
+ const iconSizeStyle = size === "sm" ? formControlSizeStyles.sm.icon : size === "lg" || size === "icon" ? formControlSizeStyles.lg.icon : formControlSizeStyles.md.icon;
324
358
  const globalConfig = useUnderverseUIConfig();
325
359
  const resolvedBorderMode = borderMode ?? globalConfig.button?.borderMode ?? "full";
326
360
  const SpinnerIcon = Spinner ?? import_lucide_react.Activity;
@@ -385,13 +419,13 @@ var Button = (0, import_react.forwardRef)(
385
419
  children: [
386
420
  !noHoverOverlay ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute inset-0 bg-linear-to-r from-primary-foreground/20 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-200 dark:hidden" }) : null,
387
421
  loading2 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
388
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SpinnerIcon, { className: "w-4 h-4 animate-spin", "aria-hidden": "true" }),
422
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SpinnerIcon, { className: cn(iconSizeStyle, "shrink-0 animate-spin"), "aria-hidden": "true" }),
389
423
  loadingText ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ml-2", "aria-live": "polite", children: loadingText }) : null,
390
424
  preserveChildrenOnLoading && !loadingText ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ml-2 opacity-70", "aria-hidden": true, children }) : null
391
425
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
392
- Icon ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: cn("transition-transform duration-200", iConClassName ? iConClassName : "w-5 h-5") }) : null,
426
+ Icon ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { className: cn("shrink-0 transition-transform duration-200", iConClassName ? iConClassName : iconSizeStyle) }) : null,
393
427
  children,
394
- IconRight ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconRight, { className: "w-4 h-4 transition-transform duration-200" }) : null
428
+ IconRight ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(IconRight, { className: cn(iconSizeStyle, "shrink-0 transition-transform duration-200") }) : null
395
429
  ] })
396
430
  ]
397
431
  }
@@ -3175,23 +3209,7 @@ var Input = (0, import_react4.forwardRef)(
3175
3209
  error: "border-destructive focus-visible:outline-none focus-visible:border-destructive"
3176
3210
  }
3177
3211
  };
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
- };
3212
+ const sizeStyles8 = formControlSizeStyles;
3195
3213
  const getErrorKey = (v) => {
3196
3214
  if (v.valueMissing) return "required";
3197
3215
  if (v.typeMismatch) return "typeMismatch";
@@ -3250,7 +3268,7 @@ var Input = (0, import_react4.forwardRef)(
3250
3268
  htmlFor: resolvedId,
3251
3269
  className: cn(
3252
3270
  // Label size follows input size
3253
- size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
3271
+ sizeStyles8[size].label,
3254
3272
  "font-medium transition-colors duration-200",
3255
3273
  // default color and highlight while any descendant focused
3256
3274
  disabled ? "text-muted-foreground" : cn("text-foreground group-focus-within:text-primary", success && "text-primary"),
@@ -3284,7 +3302,7 @@ var Input = (0, import_react4.forwardRef)(
3284
3302
  "div",
3285
3303
  {
3286
3304
  className: cn(
3287
- "absolute left-3 top-1/2 -translate-y-1/2 z-10",
3305
+ "absolute left-3 top-1/2 -translate-y-1/2 z-10 flex max-h-full items-center overflow-hidden",
3288
3306
  "text-muted-foreground transition-colors duration-200",
3289
3307
  // highlight icon when input (or controls) focused
3290
3308
  "group-focus-within:text-primary"
@@ -3314,6 +3332,7 @@ var Input = (0, import_react4.forwardRef)(
3314
3332
  "aria-describedby": [errorId, descId].filter(Boolean).join(" ") || void 0,
3315
3333
  className: cn(
3316
3334
  "w-full text-foreground transition-all duration-200 ease-out",
3335
+ formControlFixedClass,
3317
3336
  "placeholder:text-muted-foreground focus:outline-none focus-visible:outline-none",
3318
3337
  "disabled:cursor-not-allowed disabled:opacity-50",
3319
3338
  // Size styles
@@ -3349,7 +3368,7 @@ var Input = (0, import_react4.forwardRef)(
3349
3368
  "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-md",
3350
3369
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
3351
3370
  "active:bg-accent active:text-accent-foreground",
3352
- sizeStyles8[size].button
3371
+ sizeStyles8[size].iconButton
3353
3372
  ),
3354
3373
  tabIndex: 0,
3355
3374
  "aria-label": gi18n.clearInput ?? "Clear input",
@@ -3365,7 +3384,7 @@ var Input = (0, import_react4.forwardRef)(
3365
3384
  "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors rounded-full",
3366
3385
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring/40",
3367
3386
  "active:bg-accent/50 active:text-accent-foreground",
3368
- sizeStyles8[size].button
3387
+ sizeStyles8[size].iconButton
3369
3388
  ),
3370
3389
  tabIndex: 0,
3371
3390
  "aria-label": showPassword ? gi18n.hidePassword ?? "Hide password" : gi18n.showPassword ?? "Show password",
@@ -5904,23 +5923,23 @@ var TagInput = (0, import_react10.forwardRef)(
5904
5923
  const moreLabel = labels?.moreCount?.replace("{count}", String(hiddenCount)) ?? `+${hiddenCount} more`;
5905
5924
  const sizeStyles8 = {
5906
5925
  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",
5926
+ container: formControlSizeStyles.sm.control,
5927
+ input: formControlSizeStyles.sm.label,
5928
+ tag: formControlSizeStyles.sm.tag,
5910
5929
  tagIcon: "h-3 w-3",
5911
5930
  button: "h-7 text-xs px-2"
5912
5931
  },
5913
5932
  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",
5933
+ container: formControlSizeStyles.md.control,
5934
+ input: formControlSizeStyles.md.label,
5935
+ tag: formControlSizeStyles.md.tag,
5917
5936
  tagIcon: "h-3.5 w-3.5",
5918
5937
  button: "h-9 text-sm px-3"
5919
5938
  },
5920
5939
  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",
5940
+ container: formControlSizeStyles.lg.control,
5941
+ input: formControlSizeStyles.lg.label,
5942
+ tag: formControlSizeStyles.lg.tag,
5924
5943
  tagIcon: "h-4 w-4",
5925
5944
  button: "h-11 text-base px-4"
5926
5945
  }
@@ -5991,7 +6010,7 @@ var TagInput = (0, import_react10.forwardRef)(
5991
6010
  htmlFor: inputId,
5992
6011
  className: cn(
5993
6012
  "block font-medium transition-colors duration-200",
5994
- size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm",
6013
+ formControlSizeStyles[size].label,
5995
6014
  disabled ? "text-muted-foreground" : isFocused ? "text-primary" : "text-foreground",
5996
6015
  labelClassName
5997
6016
  ),
@@ -6012,7 +6031,8 @@ var TagInput = (0, import_react10.forwardRef)(
6012
6031
  {
6013
6032
  onClick: handleContainerClick,
6014
6033
  className: cn(
6015
- "flex flex-wrap items-center cursor-text",
6034
+ "flex items-center gap-1.5 cursor-text",
6035
+ formControlFixedClass,
6016
6036
  "bg-background border border-input",
6017
6037
  "transition-all duration-200",
6018
6038
  "hover:border-accent-foreground/20",
@@ -6026,13 +6046,13 @@ var TagInput = (0, import_react10.forwardRef)(
6026
6046
  "span",
6027
6047
  {
6028
6048
  className: cn(
6029
- "inline-flex items-center",
6049
+ "inline-flex min-w-0 shrink-0 items-center gap-1 overflow-hidden rounded-full",
6030
6050
  "bg-primary/10 text-primary font-mono",
6031
6051
  "animate-in fade-in-0 zoom-in-95 duration-200",
6032
6052
  sizeStyles8[size].tag
6033
6053
  ),
6034
6054
  children: [
6035
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "truncate max-w-50", children: tag }),
6055
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "min-w-0 truncate", children: tag }),
6036
6056
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6037
6057
  "button",
6038
6058
  {
@@ -6066,7 +6086,7 @@ var TagInput = (0, import_react10.forwardRef)(
6066
6086
  setIsExpanded(true);
6067
6087
  },
6068
6088
  className: cn(
6069
- "inline-flex items-center cursor-pointer",
6089
+ "inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
6070
6090
  "bg-muted text-muted-foreground hover:bg-muted/80",
6071
6091
  "transition-colors duration-150",
6072
6092
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6085,7 +6105,7 @@ var TagInput = (0, import_react10.forwardRef)(
6085
6105
  setIsExpanded(false);
6086
6106
  },
6087
6107
  className: cn(
6088
- "inline-flex items-center cursor-pointer",
6108
+ "inline-flex shrink-0 items-center cursor-pointer overflow-hidden rounded-full",
6089
6109
  "bg-muted/50 text-muted-foreground hover:bg-muted/80",
6090
6110
  "transition-colors duration-150",
6091
6111
  "focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -6115,7 +6135,7 @@ var TagInput = (0, import_react10.forwardRef)(
6115
6135
  placeholder: isMaxReached ? `Max ${maxTags} tags` : currentPlaceholder,
6116
6136
  disabled: disabled || isMaxReached,
6117
6137
  className: cn(
6118
- "flex-1 min-w-30 bg-transparent outline-none",
6138
+ "h-full min-w-0 flex-1 bg-transparent outline-none",
6119
6139
  "placeholder:text-muted-foreground",
6120
6140
  "disabled:cursor-not-allowed",
6121
6141
  sizeStyles8[size].input
@@ -9111,7 +9131,7 @@ var DropdownMenuSub = ({ label, icon: Icon, disabled, borderMode, children }) =>
9111
9131
  }
9112
9132
  );
9113
9133
  };
9114
- var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode }) => {
9134
+ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", className, borderMode, size = "md" }) => {
9115
9135
  const globalConfig = useUnderverseUIConfig();
9116
9136
  const resolvedBorderMode = borderMode ?? globalConfig.dropdownMenu?.borderMode ?? globalConfig.borderMode;
9117
9137
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
@@ -9121,15 +9141,17 @@ var SelectDropdown = ({ options, value, onChange, placeholder = "Select...", cla
9121
9141
  "button",
9122
9142
  {
9123
9143
  className: cn(
9124
- "inline-flex items-center justify-between gap-2 px-3 py-2 text-sm border bg-background border-border/60",
9144
+ "inline-flex items-center justify-between gap-2 border bg-background border-border/60",
9125
9145
  resolvedBorderMode ? getBorderRadiusClass(resolvedBorderMode) : "rounded-2xl",
9146
+ formControlFixedClass,
9147
+ formControlSizeStyles[size].control,
9126
9148
  "hover:bg-accent/50",
9127
9149
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
9128
9150
  className
9129
9151
  ),
9130
9152
  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" }) })
9153
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: cn(formControlValueClass, "max-w-64 text-foreground/90"), children: value || placeholder }),
9154
+ /* @__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
9155
  ]
9134
9156
  }
9135
9157
  ),
@@ -9380,9 +9402,9 @@ var Combobox = ({
9380
9402
  lg: "px-4 py-3 text-base gap-3"
9381
9403
  };
9382
9404
  const iconSizeStyles = {
9383
- sm: "w-4 h-4",
9384
- md: "w-5 h-5",
9385
- lg: "w-6 h-6"
9405
+ sm: formControlSizeStyles.sm.icon,
9406
+ md: formControlSizeStyles.md.icon,
9407
+ lg: formControlSizeStyles.lg.icon
9386
9408
  };
9387
9409
  const checkIconSizeStyles = {
9388
9410
  sm: "h-3.5 w-3.5",
@@ -9589,9 +9611,9 @@ var Combobox = ({
9589
9611
  }
9590
9612
  );
9591
9613
  const sizeStyles8 = {
9592
- sm: "h-8 py-1.5 text-sm md:h-7 md:text-xs",
9593
- md: "h-10 py-2 text-sm",
9594
- lg: "h-12 py-3 text-base"
9614
+ sm: formControlSizeStyles.sm.control,
9615
+ md: formControlSizeStyles.md.control,
9616
+ lg: formControlSizeStyles.lg.control
9595
9617
  };
9596
9618
  const variantStyles6 = {
9597
9619
  default: "border border-input bg-background hover:bg-accent/5 hover:border-primary/40",
@@ -9599,7 +9621,7 @@ var Combobox = ({
9599
9621
  ghost: "border-0 bg-transparent hover:bg-accent/50",
9600
9622
  filled: "border-0 bg-muted/50 hover:bg-muted/80"
9601
9623
  };
9602
- const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
9624
+ const labelSize = formControlSizeStyles[size].label;
9603
9625
  const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
9604
9626
  const dropdownBackgroundStyle = matchTriggerBackground && triggerBackgroundColor ? { backgroundColor: triggerBackgroundColor } : void 0;
9605
9627
  const triggerButtonBaseProps = {
@@ -9625,7 +9647,8 @@ var Combobox = ({
9625
9647
  }
9626
9648
  },
9627
9649
  className: cn(
9628
- "group flex w-full items-center justify-between px-3 transition-all duration-200",
9650
+ "group flex w-full items-center justify-between transition-all duration-200",
9651
+ formControlFixedClass,
9629
9652
  radiusClass,
9630
9653
  sizeStyles8[size],
9631
9654
  variantStyles6[variant],
@@ -9637,8 +9660,8 @@ var Combobox = ({
9637
9660
  )
9638
9661
  };
9639
9662
  const triggerContents = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
9640
- 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 }),
9641
- /* @__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 }),
9663
+ 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 }),
9664
+ /* @__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 }),
9642
9665
  /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5 ml-2 shrink-0", children: [
9643
9666
  allowClear && value && !disabled && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
9644
9667
  "div",
@@ -10612,7 +10635,7 @@ var DatePicker = ({
10612
10635
  useShadCNAnimations();
10613
10636
  const sizeStyles8 = {
10614
10637
  sm: {
10615
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
10638
+ trigger: formControlSizeStyles.sm.compactControl,
10616
10639
  dayCell: "w-7 h-7 text-xs",
10617
10640
  monthCell: "w-6 h-6 text-xs",
10618
10641
  navButton: "p-1.5",
@@ -10623,13 +10646,13 @@ var DatePicker = ({
10623
10646
  actionIcon: "w-2.5 h-2.5",
10624
10647
  contentWidth: 240,
10625
10648
  contentPadding: "p-4",
10626
- label: "text-xs",
10649
+ label: formControlSizeStyles.sm.label,
10627
10650
  weekdayLabel: "text-[9px] py-1",
10628
10651
  headerMargin: "mb-2",
10629
10652
  footerMargin: "mt-3 pt-2 gap-1.5"
10630
10653
  },
10631
10654
  md: {
10632
- trigger: "px-3 py-2.5 text-sm h-10",
10655
+ trigger: formControlSizeStyles.md.control,
10633
10656
  dayCell: "w-8 h-8 text-sm",
10634
10657
  monthCell: "w-8 h-8 text-sm",
10635
10658
  navButton: "p-2",
@@ -10640,13 +10663,13 @@ var DatePicker = ({
10640
10663
  actionIcon: "w-3.5 h-3.5",
10641
10664
  contentWidth: 280,
10642
10665
  contentPadding: "p-5",
10643
- label: "text-sm",
10666
+ label: formControlSizeStyles.md.label,
10644
10667
  weekdayLabel: "text-[10px] py-1.5",
10645
10668
  headerMargin: "mb-4",
10646
10669
  footerMargin: "mt-4 pt-3 gap-2"
10647
10670
  },
10648
10671
  lg: {
10649
- trigger: "px-4 py-3 text-base h-12",
10672
+ trigger: formControlSizeStyles.lg.control,
10650
10673
  dayCell: "w-10 h-10 text-base",
10651
10674
  monthCell: "w-10 h-10 text-base",
10652
10675
  navButton: "p-2.5",
@@ -10657,7 +10680,7 @@ var DatePicker = ({
10657
10680
  actionIcon: "w-4 h-4",
10658
10681
  contentWidth: 340,
10659
10682
  contentPadding: "p-6",
10660
- label: "text-base",
10683
+ label: formControlSizeStyles.lg.label,
10661
10684
  weekdayLabel: "text-xs py-2",
10662
10685
  headerMargin: "mb-5",
10663
10686
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -11015,6 +11038,7 @@ var DatePicker = ({
11015
11038
  "aria-invalid": !!effectiveError,
11016
11039
  className: cn(
11017
11040
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
11041
+ formControlFixedClass,
11018
11042
  getBorderRadiusClass(resolvedBorderMode),
11019
11043
  sizeStyles8[size].trigger,
11020
11044
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -11028,7 +11052,7 @@ var DatePicker = ({
11028
11052
  className
11029
11053
  ),
11030
11054
  children: [
11031
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2.5 flex-1 min-w-0", children: [
11055
+ /* @__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: [
11032
11056
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11033
11057
  "div",
11034
11058
  {
@@ -11060,7 +11084,7 @@ var DatePicker = ({
11060
11084
  e.stopPropagation();
11061
11085
  }
11062
11086
  },
11063
- 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"
11087
+ 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"
11064
11088
  }
11065
11089
  )
11066
11090
  ] }),
@@ -11297,7 +11321,7 @@ var DateRangePicker = ({
11297
11321
  };
11298
11322
  const sizeStyles8 = {
11299
11323
  sm: {
11300
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
11324
+ trigger: formControlSizeStyles.sm.compactControl,
11301
11325
  dayCell: "w-7 h-7 text-xs",
11302
11326
  monthCell: "w-6 h-6 text-xs",
11303
11327
  navButton: "p-1.5",
@@ -11308,13 +11332,13 @@ var DateRangePicker = ({
11308
11332
  actionIcon: "w-2.5 h-2.5",
11309
11333
  contentWidth: 240,
11310
11334
  contentPadding: "p-4",
11311
- label: "text-xs",
11335
+ label: formControlSizeStyles.sm.label,
11312
11336
  weekdayLabel: "text-[9px] py-1",
11313
11337
  headerMargin: "mb-2",
11314
11338
  footerMargin: "mt-3 pt-2 gap-1.5"
11315
11339
  },
11316
11340
  md: {
11317
- trigger: "px-3 py-2.5 text-sm h-10",
11341
+ trigger: formControlSizeStyles.md.control,
11318
11342
  dayCell: "w-8 h-8 text-sm",
11319
11343
  monthCell: "w-8 h-8 text-sm",
11320
11344
  navButton: "p-2",
@@ -11325,13 +11349,13 @@ var DateRangePicker = ({
11325
11349
  actionIcon: "w-3.5 h-3.5",
11326
11350
  contentWidth: 280,
11327
11351
  contentPadding: "p-5",
11328
- label: "text-sm",
11352
+ label: formControlSizeStyles.md.label,
11329
11353
  weekdayLabel: "text-[10px] py-1.5",
11330
11354
  headerMargin: "mb-4",
11331
11355
  footerMargin: "mt-4 pt-3 gap-2"
11332
11356
  },
11333
11357
  lg: {
11334
- trigger: "px-4 py-3 text-base h-12",
11358
+ trigger: formControlSizeStyles.lg.control,
11335
11359
  dayCell: "w-10 h-10 text-base",
11336
11360
  monthCell: "w-10 h-10 text-base",
11337
11361
  navButton: "p-2.5",
@@ -11342,7 +11366,7 @@ var DateRangePicker = ({
11342
11366
  actionIcon: "w-4 h-4",
11343
11367
  contentWidth: 340,
11344
11368
  contentPadding: "p-6",
11345
- label: "text-base",
11369
+ label: formControlSizeStyles.lg.label,
11346
11370
  weekdayLabel: "text-xs py-2",
11347
11371
  headerMargin: "mb-5",
11348
11372
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -11769,6 +11793,7 @@ var DateRangePicker = ({
11769
11793
  "aria-invalid": !!effectiveError,
11770
11794
  className: cn(
11771
11795
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
11796
+ formControlFixedClass,
11772
11797
  getBorderRadiusClass(resolvedBorderMode),
11773
11798
  sizeStyles8[size].trigger,
11774
11799
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -11781,7 +11806,7 @@ var DateRangePicker = ({
11781
11806
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
11782
11807
  ),
11783
11808
  children: [
11784
- /* @__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: [
11809
+ /* @__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: [
11785
11810
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
11786
11811
  "div",
11787
11812
  {
@@ -11813,11 +11838,11 @@ var DateRangePicker = ({
11813
11838
  e.stopPropagation();
11814
11839
  }
11815
11840
  },
11816
- 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"
11841
+ 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"
11817
11842
  }
11818
11843
  )
11819
11844
  ] }),
11820
- /* @__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" }) }) })
11845
+ /* @__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" }) }) })
11821
11846
  ]
11822
11847
  }
11823
11848
  ),
@@ -12267,7 +12292,7 @@ var LunarDatePicker = ({
12267
12292
  useShadCNAnimations();
12268
12293
  const sizeStyles8 = {
12269
12294
  sm: {
12270
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
12295
+ trigger: formControlSizeStyles.sm.compactControl,
12271
12296
  dayCell: "w-7 h-7 text-xs",
12272
12297
  monthCell: "w-6 h-6 text-xs",
12273
12298
  navButton: "p-1.5",
@@ -12278,13 +12303,13 @@ var LunarDatePicker = ({
12278
12303
  actionIcon: "w-2.5 h-2.5",
12279
12304
  contentWidth: 240,
12280
12305
  contentPadding: "p-4",
12281
- label: "text-xs",
12306
+ label: formControlSizeStyles.sm.label,
12282
12307
  weekdayLabel: "text-[9px] py-1",
12283
12308
  headerMargin: "mb-2",
12284
12309
  footerMargin: "mt-3 pt-2 gap-1.5"
12285
12310
  },
12286
12311
  md: {
12287
- trigger: "px-3 py-2.5 text-sm h-10",
12312
+ trigger: formControlSizeStyles.md.control,
12288
12313
  dayCell: "w-8 h-8 text-sm",
12289
12314
  monthCell: "w-8 h-8 text-sm",
12290
12315
  navButton: "p-2",
@@ -12295,13 +12320,13 @@ var LunarDatePicker = ({
12295
12320
  actionIcon: "w-3.5 h-3.5",
12296
12321
  contentWidth: 280,
12297
12322
  contentPadding: "p-5",
12298
- label: "text-sm",
12323
+ label: formControlSizeStyles.md.label,
12299
12324
  weekdayLabel: "text-[10px] py-1.5",
12300
12325
  headerMargin: "mb-4",
12301
12326
  footerMargin: "mt-4 pt-3 gap-2"
12302
12327
  },
12303
12328
  lg: {
12304
- trigger: "px-4 py-3 text-base h-12",
12329
+ trigger: formControlSizeStyles.lg.control,
12305
12330
  dayCell: "w-10 h-10 text-base",
12306
12331
  monthCell: "w-10 h-10 text-base",
12307
12332
  navButton: "p-2.5",
@@ -12312,7 +12337,7 @@ var LunarDatePicker = ({
12312
12337
  actionIcon: "w-4 h-4",
12313
12338
  contentWidth: 340,
12314
12339
  contentPadding: "p-6",
12315
- label: "text-base",
12340
+ label: formControlSizeStyles.lg.label,
12316
12341
  weekdayLabel: "text-xs py-2",
12317
12342
  headerMargin: "mb-5",
12318
12343
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -12701,6 +12726,7 @@ var LunarDatePicker = ({
12701
12726
  "aria-invalid": !!effectiveError,
12702
12727
  className: cn(
12703
12728
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
12729
+ formControlFixedClass,
12704
12730
  getBorderRadiusClass(resolvedBorderMode),
12705
12731
  sizeStyles8[size].trigger,
12706
12732
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -12714,7 +12740,7 @@ var LunarDatePicker = ({
12714
12740
  className
12715
12741
  ),
12716
12742
  children: [
12717
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2.5 flex-1 min-w-0", children: [
12743
+ /* @__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: [
12718
12744
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
12719
12745
  "div",
12720
12746
  {
@@ -12746,7 +12772,7 @@ var LunarDatePicker = ({
12746
12772
  e.stopPropagation();
12747
12773
  }
12748
12774
  },
12749
- 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"
12775
+ 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"
12750
12776
  }
12751
12777
  )
12752
12778
  ] }),
@@ -12830,7 +12856,7 @@ var LunarDateRangePicker = ({
12830
12856
  const wheelDeltaRef = React35.useRef(0);
12831
12857
  const sizeStyles8 = {
12832
12858
  sm: {
12833
- trigger: "px-2.5 py-1.5 text-sm h-8 md:h-7 md:text-xs md:py-1",
12859
+ trigger: formControlSizeStyles.sm.compactControl,
12834
12860
  dayCell: "w-7 h-7 text-xs",
12835
12861
  monthCell: "w-6 h-6 text-xs",
12836
12862
  navButton: "p-1.5",
@@ -12841,13 +12867,13 @@ var LunarDateRangePicker = ({
12841
12867
  actionIcon: "w-2.5 h-2.5",
12842
12868
  contentWidth: 240,
12843
12869
  contentPadding: "p-4",
12844
- label: "text-xs",
12870
+ label: formControlSizeStyles.sm.label,
12845
12871
  weekdayLabel: "text-[9px] py-1",
12846
12872
  headerMargin: "mb-2",
12847
12873
  footerMargin: "mt-3 pt-2 gap-1.5"
12848
12874
  },
12849
12875
  md: {
12850
- trigger: "px-3 py-2.5 text-sm h-10",
12876
+ trigger: formControlSizeStyles.md.control,
12851
12877
  dayCell: "w-8 h-8 text-sm",
12852
12878
  monthCell: "w-8 h-8 text-sm",
12853
12879
  navButton: "p-2",
@@ -12858,13 +12884,13 @@ var LunarDateRangePicker = ({
12858
12884
  actionIcon: "w-3.5 h-3.5",
12859
12885
  contentWidth: 280,
12860
12886
  contentPadding: "p-5",
12861
- label: "text-sm",
12887
+ label: formControlSizeStyles.md.label,
12862
12888
  weekdayLabel: "text-[10px] py-1.5",
12863
12889
  headerMargin: "mb-4",
12864
12890
  footerMargin: "mt-4 pt-3 gap-2"
12865
12891
  },
12866
12892
  lg: {
12867
- trigger: "px-4 py-3 text-base h-12",
12893
+ trigger: formControlSizeStyles.lg.control,
12868
12894
  dayCell: "w-10 h-10 text-base",
12869
12895
  monthCell: "w-10 h-10 text-base",
12870
12896
  navButton: "p-2.5",
@@ -12875,7 +12901,7 @@ var LunarDateRangePicker = ({
12875
12901
  actionIcon: "w-4 h-4",
12876
12902
  contentWidth: 340,
12877
12903
  contentPadding: "p-6",
12878
- label: "text-base",
12904
+ label: formControlSizeStyles.lg.label,
12879
12905
  weekdayLabel: "text-xs py-2",
12880
12906
  headerMargin: "mb-5",
12881
12907
  footerMargin: "mt-5 pt-4 gap-2.5"
@@ -13322,6 +13348,7 @@ var LunarDateRangePicker = ({
13322
13348
  "aria-invalid": !!effectiveError,
13323
13349
  className: cn(
13324
13350
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
13351
+ formControlFixedClass,
13325
13352
  getBorderRadiusClass(borderMode ?? "full"),
13326
13353
  sizeStyles8[size].trigger,
13327
13354
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
@@ -13334,7 +13361,7 @@ var LunarDateRangePicker = ({
13334
13361
  effectiveError && "border-destructive/60 focus-within:ring-destructive/50 bg-destructive/5"
13335
13362
  ),
13336
13363
  children: [
13337
- /* @__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: [
13364
+ /* @__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: [
13338
13365
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
13339
13366
  "div",
13340
13367
  {
@@ -13345,9 +13372,9 @@ var LunarDateRangePicker = ({
13345
13372
  children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react18.Calendar, { className: cn("transition-transform duration-300", sizeStyles8[size].calendarIcon, isOpen && "scale-110") })
13346
13373
  }
13347
13374
  ),
13348
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: cn("w-full truncate font-medium", !tempStart && "text-muted-foreground/60"), children: tempStart ? displayLabel : placeholder })
13375
+ /* @__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 })
13349
13376
  ] }),
13350
- /* @__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" }) }) })
13377
+ /* @__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" }) }) })
13351
13378
  ]
13352
13379
  }
13353
13380
  ),
@@ -13975,9 +14002,9 @@ function MonthYearPicker({
13975
14002
  setOpen(false);
13976
14003
  };
13977
14004
  const sizeClasses2 = {
13978
- sm: { label: "text-xs", height: "h-8", padding: "px-2.5 py-1.5", text: "text-xs", icon: "w-3.5 h-3.5" },
13979
- md: { label: "text-sm", height: "h-10", padding: "px-3 py-2", text: "text-sm", icon: "w-4 h-4" },
13980
- lg: { label: "text-base", height: "h-12", padding: "px-4 py-3", text: "text-base", icon: "w-5 h-5" }
14005
+ sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
14006
+ md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
14007
+ lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
13981
14008
  };
13982
14009
  const panelSizeClasses = {
13983
14010
  sm: { contentPadding: "p-4", stackGap: "space-y-3", displayText: "text-lg", actionText: "text-[11px]", actionPadding: "px-3 py-2" },
@@ -14005,9 +14032,8 @@ function MonthYearPicker({
14005
14032
  className: cn(
14006
14033
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
14007
14034
  getBorderRadiusClass(resolvedBorderMode),
14008
- sz.height,
14009
- sz.padding,
14010
- sz.text,
14035
+ sz.control,
14036
+ formControlFixedClass,
14011
14037
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
14012
14038
  "disabled:opacity-50 disabled:cursor-not-allowed",
14013
14039
  "transition-all duration-300 ease-out",
@@ -14019,7 +14045,7 @@ function MonthYearPicker({
14019
14045
  className
14020
14046
  ),
14021
14047
  children: [
14022
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
14048
+ /* @__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: [
14023
14049
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
14024
14050
  "div",
14025
14051
  {
@@ -14033,7 +14059,7 @@ function MonthYearPicker({
14033
14059
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
14034
14060
  "span",
14035
14061
  {
14036
- className: cn("min-w-0 truncate font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
14062
+ className: cn(formControlValueClass, "font-medium transition-colors duration-200", !hasValue && "text-muted-foreground", hasValue && "text-foreground"),
14037
14063
  children: hasValue ? display : placeholder
14038
14064
  }
14039
14065
  )
@@ -15691,9 +15717,9 @@ function TimePicker({
15691
15717
  }
15692
15718
  };
15693
15719
  const sizeClasses2 = {
15694
- sm: { label: "text-xs", height: "h-8", padding: "px-2.5 py-1.5", text: "text-xs", icon: "w-3.5 h-3.5" },
15695
- md: { label: "text-sm", height: "h-10", padding: "px-3 py-2", text: "text-sm", icon: "w-4 h-4" },
15696
- lg: { label: "text-base", height: "h-12", padding: "px-4 py-3", text: "text-base", icon: "w-5 h-5" }
15720
+ sm: { label: formControlSizeStyles.sm.label, control: formControlSizeStyles.sm.compactControl, icon: formControlSizeStyles.sm.icon },
15721
+ md: { label: formControlSizeStyles.md.label, control: formControlSizeStyles.md.control, icon: formControlSizeStyles.md.icon },
15722
+ lg: { label: formControlSizeStyles.lg.label, control: formControlSizeStyles.lg.control, icon: formControlSizeStyles.lg.icon }
15697
15723
  };
15698
15724
  const sz = sizeClasses2[size];
15699
15725
  const effectivePanelSize = variant === "compact" ? size === "lg" ? "md" : "sm" : size;
@@ -15716,9 +15742,8 @@ function TimePicker({
15716
15742
  className: cn(
15717
15743
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
15718
15744
  getBorderRadiusClass(resolvedBorderMode),
15719
- sz.height,
15720
- sz.padding,
15721
- sz.text,
15745
+ sz.control,
15746
+ formControlFixedClass,
15722
15747
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
15723
15748
  "disabled:opacity-50 disabled:cursor-not-allowed",
15724
15749
  "transition-all duration-300 ease-out",
@@ -15730,7 +15755,7 @@ function TimePicker({
15730
15755
  className
15731
15756
  ),
15732
15757
  children: [
15733
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
15758
+ /* @__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: [
15734
15759
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
15735
15760
  "div",
15736
15761
  {
@@ -15745,7 +15770,8 @@ function TimePicker({
15745
15770
  "span",
15746
15771
  {
15747
15772
  className: cn(
15748
- "min-w-0 truncate font-medium transition-colors duration-200",
15773
+ formControlValueClass,
15774
+ "font-medium transition-colors duration-200",
15749
15775
  !hasCommittedValue && "text-muted-foreground",
15750
15776
  hasCommittedValue ? "text-foreground" : ""
15751
15777
  ),
@@ -16209,9 +16235,9 @@ var DateTimePicker = ({
16209
16235
  const [localRequiredError, setLocalRequiredError] = React39.useState();
16210
16236
  const sizeStyles8 = {
16211
16237
  sm: {
16212
- trigger: "h-8 px-2.5 py-1.5 text-sm md:h-7 md:text-xs",
16213
- icon: "h-3.5 w-3.5",
16214
- label: "text-xs",
16238
+ trigger: formControlSizeStyles.sm.compactControl,
16239
+ icon: formControlSizeStyles.sm.icon,
16240
+ label: formControlSizeStyles.sm.label,
16215
16241
  buttonSize: "sm",
16216
16242
  calendarSize: "sm",
16217
16243
  timePickerSize: "sm",
@@ -16219,9 +16245,9 @@ var DateTimePicker = ({
16219
16245
  gap: "gap-2"
16220
16246
  },
16221
16247
  md: {
16222
- trigger: "h-10 px-3 py-2 text-sm",
16223
- icon: "h-4 w-4",
16224
- label: "text-sm",
16248
+ trigger: formControlSizeStyles.md.control,
16249
+ icon: formControlSizeStyles.md.icon,
16250
+ label: formControlSizeStyles.md.label,
16225
16251
  buttonSize: "sm",
16226
16252
  calendarSize: "md",
16227
16253
  timePickerSize: "md",
@@ -16229,9 +16255,9 @@ var DateTimePicker = ({
16229
16255
  gap: "gap-3"
16230
16256
  },
16231
16257
  lg: {
16232
- trigger: "h-12 px-4 py-3 text-base",
16233
- icon: "h-5 w-5",
16234
- label: "text-base",
16258
+ trigger: formControlSizeStyles.lg.control,
16259
+ icon: formControlSizeStyles.lg.icon,
16260
+ label: formControlSizeStyles.lg.label,
16235
16261
  buttonSize: "md",
16236
16262
  calendarSize: "lg",
16237
16263
  timePickerSize: "lg",
@@ -16381,6 +16407,7 @@ var DateTimePicker = ({
16381
16407
  "aria-invalid": !!effectiveError,
16382
16408
  className: cn(
16383
16409
  "flex w-full items-center justify-between border border-input bg-background",
16410
+ formControlFixedClass,
16384
16411
  getBorderRadiusClass(resolvedBorderMode),
16385
16412
  sizeStyles8[size].trigger,
16386
16413
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
@@ -16389,7 +16416,7 @@ var DateTimePicker = ({
16389
16416
  effectiveError && "border-destructive/60 bg-destructive/5"
16390
16417
  ),
16391
16418
  children: [
16392
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", children: displayValue || placeholder || "Select date & time" }),
16419
+ /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: cn(formControlValueClass, "text-left"), children: displayValue || placeholder || "Select date & time" }),
16393
16420
  /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex shrink-0 items-center gap-2 text-muted-foreground", children: [
16394
16421
  value && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
16395
16422
  "span",
@@ -19587,25 +19614,25 @@ var MultiCombobox = ({
19587
19614
  }, [maxInitialOptions, normalizedOptions.length, searchMode, virtualized]);
19588
19615
  const sizeStyles8 = {
19589
19616
  sm: {
19590
- trigger: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
19591
- icon: "h-4 w-4",
19617
+ trigger: formControlSizeStyles.sm.control,
19618
+ icon: formControlSizeStyles.sm.icon,
19592
19619
  search: "px-8 py-1.5 text-xs",
19593
19620
  item: "text-xs px-3 py-1.5",
19594
- tag: "px-2 py-0.5 text-[10px]"
19621
+ tag: formControlSizeStyles.sm.tag
19595
19622
  },
19596
19623
  md: {
19597
- trigger: "h-10 px-4 py-2 text-sm",
19598
- icon: "h-4 w-4",
19624
+ trigger: formControlSizeStyles.md.control,
19625
+ icon: formControlSizeStyles.md.icon,
19599
19626
  search: "px-10 py-2 text-sm",
19600
19627
  item: "text-sm px-3 py-2",
19601
- tag: "px-2 py-1 text-xs"
19628
+ tag: formControlSizeStyles.md.tag
19602
19629
  },
19603
19630
  lg: {
19604
- trigger: "h-12 px-5 py-3 text-base",
19605
- icon: "h-5 w-5",
19631
+ trigger: formControlSizeStyles.lg.control,
19632
+ icon: formControlSizeStyles.lg.icon,
19606
19633
  search: "px-10 py-3 text-base",
19607
19634
  item: "text-base px-3 py-3",
19608
- tag: "px-2.5 py-1 text-sm"
19635
+ tag: formControlSizeStyles.lg.tag
19609
19636
  }
19610
19637
  };
19611
19638
  const variantStyles6 = {
@@ -19616,7 +19643,7 @@ var MultiCombobox = ({
19616
19643
  const autoId = (0, import_react24.useId)();
19617
19644
  const resolvedId = id ? String(id) : `multicombobox-${autoId}`;
19618
19645
  const labelId = label ? `${resolvedId}-label` : void 0;
19619
- const labelSize = size === "sm" ? "text-xs" : size === "lg" ? "text-base" : "text-sm";
19646
+ const labelSize = formControlSizeStyles[size].label;
19620
19647
  const listboxId = `${resolvedId}-listbox`;
19621
19648
  const renderOptionItem = (item, index, virtualItem) => {
19622
19649
  const isSelected = value.includes(item.value);
@@ -19840,6 +19867,7 @@ var MultiCombobox = ({
19840
19867
  "aria-invalid": !!effectiveError,
19841
19868
  className: cn(
19842
19869
  "group flex w-full items-center gap-2 transition-all duration-200",
19870
+ formControlFixedClass,
19843
19871
  getBorderRadiusClass(resolvedBorderMode),
19844
19872
  sizeStyles8[size].trigger,
19845
19873
  variantStyles6[variant],
@@ -19849,22 +19877,22 @@ var MultiCombobox = ({
19849
19877
  !!effectiveError && "border-destructive focus-visible:ring-destructive/30"
19850
19878
  ),
19851
19879
  children: [
19852
- /* @__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: [
19880
+ /* @__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: [
19853
19881
  visibleTags.map((option) => {
19854
19882
  if (renderTag) {
19855
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(React46.Fragment, { children: renderTag(option, () => handleRemove(option.value)) }, option.value);
19883
+ 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);
19856
19884
  }
19857
19885
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
19858
19886
  "span",
19859
19887
  {
19860
19888
  className: cn(
19861
- "inline-flex items-center gap-1.5 bg-primary/10 text-primary rounded-full transition-all duration-200 min-w-0",
19889
+ "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",
19862
19890
  "hover:bg-primary/20",
19863
19891
  sizeStyles8[size].tag
19864
19892
  ),
19865
19893
  children: [
19866
19894
  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 }),
19867
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "truncate max-w-24", children: displayFormat(option) }),
19895
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "min-w-0 truncate", children: displayFormat(option) }),
19868
19896
  /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
19869
19897
  "span",
19870
19898
  {
@@ -19893,7 +19921,7 @@ var MultiCombobox = ({
19893
19921
  );
19894
19922
  }),
19895
19923
  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` })
19896
- ] }) : /* @__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 }) }),
19924
+ ] }) : /* @__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 }) }),
19897
19925
  /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-1.5 shrink-0", children: [
19898
19926
  showClear && value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
19899
19927
  "div",
@@ -21867,29 +21895,29 @@ function CategoryTreeSelect(props) {
21867
21895
  const selectedCount = valueArray.length;
21868
21896
  const triggerSizeStyles = {
21869
21897
  sm: {
21870
- button: "h-8 px-3 py-1.5 text-sm md:h-7 md:text-xs",
21898
+ button: formControlSizeStyles.sm.control,
21871
21899
  iconWrap: "p-1",
21872
- icon: "w-3.5 h-3.5 md:w-3 md:h-3",
21873
- text: "text-xs md:text-[11px]",
21874
- badge: "px-1.5 py-0.5 text-[10px]",
21875
- actionIcon: "w-3.5 h-3.5",
21900
+ icon: formControlSizeStyles.sm.icon,
21901
+ text: formControlSizeStyles.sm.label,
21902
+ badge: formControlSizeStyles.sm.tag,
21903
+ actionIcon: formControlSizeStyles.sm.icon,
21876
21904
  clearIcon: "h-3 w-3"
21877
21905
  },
21878
21906
  md: {
21879
- button: "h-10 px-3 py-2.5 text-sm",
21907
+ button: formControlSizeStyles.md.control,
21880
21908
  iconWrap: "p-1.5",
21881
21909
  icon: "w-4 h-4",
21882
- text: "text-sm",
21883
- badge: "px-2 py-0.5 text-xs",
21910
+ text: formControlSizeStyles.md.label,
21911
+ badge: formControlSizeStyles.md.tag,
21884
21912
  actionIcon: "w-4 h-4",
21885
21913
  clearIcon: "h-3.5 w-3.5"
21886
21914
  },
21887
21915
  lg: {
21888
- button: "h-12 px-4 py-3 text-base",
21916
+ button: formControlSizeStyles.lg.control,
21889
21917
  iconWrap: "p-1.5",
21890
21918
  icon: "w-5 h-5",
21891
- text: "text-base",
21892
- badge: "px-2.5 py-1 text-sm",
21919
+ text: formControlSizeStyles.lg.label,
21920
+ badge: formControlSizeStyles.lg.tag,
21893
21921
  actionIcon: "w-5 h-5",
21894
21922
  clearIcon: "h-4 w-4"
21895
21923
  }
@@ -22011,6 +22039,7 @@ function CategoryTreeSelect(props) {
22011
22039
  },
22012
22040
  className: cn(
22013
22041
  "group flex w-full items-center justify-between transition-all duration-200",
22042
+ formControlFixedClass,
22014
22043
  getBorderRadiusClass(resolvedBorderMode ?? "full"),
22015
22044
  "backdrop-blur-sm",
22016
22045
  triggerSizeStyles[size].button,
@@ -22021,7 +22050,7 @@ function CategoryTreeSelect(props) {
22021
22050
  effectiveError && "border-destructive focus-visible:ring-destructive/30"
22022
22051
  ),
22023
22052
  children: [
22024
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-2.5 text-left", children: [
22053
+ /* @__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: [
22025
22054
  /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
22026
22055
  "div",
22027
22056
  {
@@ -22037,7 +22066,8 @@ function CategoryTreeSelect(props) {
22037
22066
  "span",
22038
22067
  {
22039
22068
  className: cn(
22040
- "min-w-0 flex-1 truncate font-medium transition-colors duration-200",
22069
+ formControlValueClass,
22070
+ "font-medium transition-colors duration-200",
22041
22071
  triggerSizeStyles[size].text,
22042
22072
  selectedCount === 0 ? "text-muted-foreground" : "text-foreground"
22043
22073
  ),
@@ -22061,7 +22091,7 @@ function CategoryTreeSelect(props) {
22061
22091
  children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_lucide_react29.X, { className: triggerSizeStyles[size].clearIcon })
22062
22092
  }
22063
22093
  ),
22064
- 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 }),
22094
+ 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 }),
22065
22095
  /* @__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 }) })
22066
22096
  ] })
22067
22097
  ]
@@ -24689,9 +24719,9 @@ function ColorPicker({
24689
24719
  const alphaPct = Math.round(rgba.a * 100);
24690
24720
  const harmony = showHarmony ? getColorHarmony(rgba) : null;
24691
24721
  const sizeClasses2 = {
24692
- sm: "h-8 text-xs",
24693
- md: "h-10 text-sm",
24694
- lg: "h-12 text-base"
24722
+ sm: formControlSizeStyles.sm.control,
24723
+ md: formControlSizeStyles.md.control,
24724
+ lg: formControlSizeStyles.lg.control
24695
24725
  };
24696
24726
  const swatchSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "md";
24697
24727
  const trigger = /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
@@ -24700,16 +24730,17 @@ function ColorPicker({
24700
24730
  type: "button",
24701
24731
  disabled,
24702
24732
  className: cn(
24703
- "w-full px-3 border border-input bg-background flex items-center justify-between",
24733
+ "w-full border border-input bg-background flex items-center justify-between",
24704
24734
  getBorderRadiusClass(resolvedBorderMode),
24705
24735
  sizeClasses2[size],
24736
+ formControlFixedClass,
24706
24737
  "hover:border-accent-foreground/30 transition-colors",
24707
24738
  disabled && "opacity-50 cursor-not-allowed",
24708
24739
  triggerClassName
24709
24740
  ),
24710
24741
  "aria-label": gi18n.openColorPicker ?? "Open color picker",
24711
24742
  children: [
24712
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex items-center gap-2", children: [
24743
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex min-h-0 min-w-0 flex-1 items-center gap-2 overflow-hidden", children: [
24713
24744
  /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
24714
24745
  "span",
24715
24746
  {
@@ -24717,9 +24748,9 @@ function ColorPicker({
24717
24748
  style: { backgroundColor: withAlpha ? `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})` : hexForInput }
24718
24749
  }
24719
24750
  ),
24720
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "font-mono text-muted-foreground", children: text })
24751
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: cn(formControlValueClass, "font-mono text-muted-foreground"), children: text })
24721
24752
  ] }),
24722
- /* @__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") })
24753
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(import_lucide_react35.Pipette, { className: cn(formControlSizeStyles[size].icon, "shrink-0 text-muted-foreground") })
24723
24754
  ]
24724
24755
  }
24725
24756
  );
@@ -33929,7 +33960,7 @@ var EditorToolbar = ({
33929
33960
  "div",
33930
33961
  {
33931
33962
  role: "toolbar",
33932
- className: "flex min-h-[60px] flex-nowrap items-center gap-1 overflow-x-auto border-b border-[rgba(196,197,213,0.6)] bg-[#F4F4F4] px-3 py-3 dark:bg-muted/60",
33963
+ className: "flex min-h-15 flex-nowrap items-center gap-1 overflow-x-auto border-b border-[rgba(196,197,213,0.6)] bg-[#F4F4F4] px-3 py-3 dark:bg-muted/60",
33933
33964
  children: [
33934
33965
  isFull && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
33935
33966
  DropdownMenu,
@@ -33940,7 +33971,7 @@ var EditorToolbar = ({
33940
33971
  onClick: () => {
33941
33972
  },
33942
33973
  title: t("toolbar.fontFamily"),
33943
- className: "h-9 w-[200px] max-w-[200px] justify-between gap-3 rounded-lg border border-[rgba(196,197,213,0.6)] bg-white px-3 text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] hover:bg-white hover:text-[#404040] dark:bg-background dark:text-foreground",
33974
+ className: "h-9 w-50 max-w-50 justify-between gap-3 rounded-lg border border-[rgba(196,197,213,0.6)] bg-white px-3 text-[#404040] shadow-[0_1px_2px_rgba(0,0,0,0.07)] hover:bg-white hover:text-[#404040] dark:bg-background dark:text-foreground",
33944
33975
  children: [
33945
33976
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "min-w-0 flex-1 truncate text-left text-sm font-normal", style: { fontFamily: displayedFontFamilyValue || void 0 }, children: displayedFontFamilyLabel }),
33946
33977
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FigmaChevronDownIcon, { className: "h-3 w-3 shrink-0 text-[#7B8184]" })
@@ -37611,7 +37642,7 @@ function findDiffEnd(a, b, posA, posB) {
37611
37642
  posB -= size;
37612
37643
  }
37613
37644
  }
37614
- var Fragment32 = class _Fragment {
37645
+ var Fragment31 = class _Fragment {
37615
37646
  /**
37616
37647
  @internal
37617
37648
  */
@@ -37903,7 +37934,7 @@ var Fragment32 = class _Fragment {
37903
37934
  throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
37904
37935
  }
37905
37936
  };
37906
- Fragment32.empty = new Fragment32([], 0);
37937
+ Fragment31.empty = new Fragment31([], 0);
37907
37938
  var found = { index: 0, offset: 0 };
37908
37939
  function retIndex(index, offset) {
37909
37940
  found.index = index;
@@ -38128,7 +38159,7 @@ var Slice = class _Slice {
38128
38159
  let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
38129
38160
  if (typeof openStart != "number" || typeof openEnd != "number")
38130
38161
  throw new RangeError("Invalid input for Slice.fromJSON");
38131
- return new _Slice(Fragment32.fromJSON(schema, json.content), openStart, openEnd);
38162
+ return new _Slice(Fragment31.fromJSON(schema, json.content), openStart, openEnd);
38132
38163
  }
38133
38164
  /**
38134
38165
  Create a slice from a fragment by taking the maximum possible
@@ -38143,7 +38174,7 @@ var Slice = class _Slice {
38143
38174
  return new _Slice(fragment, openStart, openEnd);
38144
38175
  }
38145
38176
  };
38146
- Slice.empty = new Slice(Fragment32.empty, 0, 0);
38177
+ Slice.empty = new Slice(Fragment31.empty, 0, 0);
38147
38178
  function removeRange(content, from, to) {
38148
38179
  let { index, offset } = content.findIndex(from), child = content.maybeChild(index);
38149
38180
  let { index: indexTo, offset: offsetTo } = content.findIndex(to);
@@ -38241,7 +38272,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
38241
38272
  addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
38242
38273
  }
38243
38274
  addRange($to, null, depth, content);
38244
- return new Fragment32(content);
38275
+ return new Fragment31(content);
38245
38276
  }
38246
38277
  function replaceTwoWay($from, $to, depth) {
38247
38278
  let content = [];
@@ -38251,13 +38282,13 @@ function replaceTwoWay($from, $to, depth) {
38251
38282
  addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
38252
38283
  }
38253
38284
  addRange($to, null, depth, content);
38254
- return new Fragment32(content);
38285
+ return new Fragment31(content);
38255
38286
  }
38256
38287
  function prepareSliceForReplace(slice, $along) {
38257
38288
  let extra = $along.depth - slice.openStart, parent = $along.node(extra);
38258
38289
  let node = parent.copy(slice.content);
38259
38290
  for (let i = extra - 1; i >= 0; i--)
38260
- node = $along.node(i).copy(Fragment32.from(node));
38291
+ node = $along.node(i).copy(Fragment31.from(node));
38261
38292
  return {
38262
38293
  start: node.resolveNoCache(slice.openStart + extra),
38263
38294
  end: node.resolveNoCache(node.content.size - slice.openEnd - extra)
@@ -38596,7 +38627,7 @@ var Node7 = class _Node {
38596
38627
  this.type = type;
38597
38628
  this.attrs = attrs;
38598
38629
  this.marks = marks;
38599
- this.content = content || Fragment32.empty;
38630
+ this.content = content || Fragment31.empty;
38600
38631
  }
38601
38632
  /**
38602
38633
  The array of this node's child nodes.
@@ -38901,7 +38932,7 @@ var Node7 = class _Node {
38901
38932
  can optionally pass `start` and `end` indices into the
38902
38933
  replacement fragment.
38903
38934
  */
38904
- canReplace(from, to, replacement = Fragment32.empty, start = 0, end = replacement.childCount) {
38935
+ canReplace(from, to, replacement = Fragment31.empty, start = 0, end = replacement.childCount) {
38905
38936
  let one = this.contentMatchAt(from).matchFragment(replacement, start, end);
38906
38937
  let two = one && one.matchFragment(this.content, to);
38907
38938
  if (!two || !two.validEnd)
@@ -38983,7 +39014,7 @@ var Node7 = class _Node {
38983
39014
  throw new RangeError("Invalid text node in JSON");
38984
39015
  return schema.text(json.text, marks);
38985
39016
  }
38986
- let content = Fragment32.fromJSON(schema, json.content);
39017
+ let content = Fragment31.fromJSON(schema, json.content);
38987
39018
  let node = schema.nodeType(json.type).create(json.attrs, content, marks);
38988
39019
  node.type.checkAttrs(node.attrs);
38989
39020
  return node;
@@ -39079,7 +39110,7 @@ var ContentMatch = class _ContentMatch {
39079
39110
  function search(match, types) {
39080
39111
  let finished = match.matchFragment(after, startIndex);
39081
39112
  if (finished && (!toEnd || finished.validEnd))
39082
- return Fragment32.from(types.map((tp) => tp.createAndFill()));
39113
+ return Fragment31.from(types.map((tp) => tp.createAndFill()));
39083
39114
  for (let i = 0; i < match.next.length; i++) {
39084
39115
  let { type, next } = match.next[i];
39085
39116
  if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
@@ -39647,7 +39678,7 @@ function mapFragment(fragment, f, parent) {
39647
39678
  child = f(child, parent, i);
39648
39679
  mapped.push(child);
39649
39680
  }
39650
- return Fragment32.fromArray(mapped);
39681
+ return Fragment31.fromArray(mapped);
39651
39682
  }
39652
39683
  var AddMarkStep = class _AddMarkStep extends Step {
39653
39684
  /**
@@ -39764,7 +39795,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
39764
39795
  if (!node)
39765
39796
  return StepResult.fail("No node at mark step's position");
39766
39797
  let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
39767
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39798
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39768
39799
  }
39769
39800
  invert(doc) {
39770
39801
  let node = doc.nodeAt(this.pos);
@@ -39810,7 +39841,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
39810
39841
  if (!node)
39811
39842
  return StepResult.fail("No node at mark step's position");
39812
39843
  let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
39813
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
39844
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
39814
39845
  }
39815
39846
  invert(doc) {
39816
39847
  let node = doc.nodeAt(this.pos);
@@ -40011,7 +40042,7 @@ var AttrStep = class _AttrStep extends Step {
40011
40042
  attrs[name] = node.attrs[name];
40012
40043
  attrs[this.attr] = this.value;
40013
40044
  let updated = node.type.create(attrs, null, node.marks);
40014
- return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment32.from(updated), 0, node.isLeaf ? 0 : 1));
40045
+ return StepResult.fromReplace(doc, this.pos, this.pos + 1, new Slice(Fragment31.from(updated), 0, node.isLeaf ? 0 : 1));
40015
40046
  }
40016
40047
  getMap() {
40017
40048
  return StepMap.empty;
@@ -40395,7 +40426,7 @@ var NodeSelection2 = class _NodeSelection extends Selection {
40395
40426
  return new _NodeSelection($pos);
40396
40427
  }
40397
40428
  content() {
40398
- return new Slice(Fragment32.from(this.node), 0, 0);
40429
+ return new Slice(Fragment31.from(this.node), 0, 0);
40399
40430
  }
40400
40431
  eq(other) {
40401
40432
  return other instanceof _NodeSelection && other.anchor == this.anchor;
@@ -41123,10 +41154,10 @@ var CellSelection = class CellSelection2 extends Selection {
41123
41154
  }
41124
41155
  rowContent.push(cell);
41125
41156
  }
41126
- rows.push(table.child(row).copy(Fragment32.from(rowContent)));
41157
+ rows.push(table.child(row).copy(Fragment31.from(rowContent)));
41127
41158
  }
41128
41159
  const fragment = this.isColSelection() && this.isRowSelection() ? table : rows;
41129
- return new Slice(Fragment32.from(fragment), 1, 1);
41160
+ return new Slice(Fragment31.from(fragment), 1, 1);
41130
41161
  }
41131
41162
  replace(tr, content = Slice.empty) {
41132
41163
  const mapFrom = tr.steps.length, ranges = this.ranges;
@@ -41138,7 +41169,7 @@ var CellSelection = class CellSelection2 extends Selection {
41138
41169
  if (sel) tr.setSelection(sel);
41139
41170
  }
41140
41171
  replaceWith(tr, node) {
41141
- this.replace(tr, new Slice(Fragment32.from(node), 0, 0));
41172
+ this.replace(tr, new Slice(Fragment31.from(node), 0, 0));
41142
41173
  }
41143
41174
  forEachCell(f) {
41144
41175
  const table = this.$anchorCell.node(-1);