@underverse-ui/underverse 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  extractImageSrcsFromHtml,
5
5
  normalizeImageUrl,
6
6
  prepareUEditorContentForSave
7
- } from "./chunk-Y7SQKJ7X.js";
7
+ } from "./chunk-2UQ7H5GR.js";
8
8
  import {
9
9
  EmojiPicker_default
10
10
  } from "./chunk-A7XL4RDV.js";
@@ -16,7 +16,7 @@ import {
16
16
  import "./chunk-4TYW5K4J.js";
17
17
  import {
18
18
  Modal_default
19
- } from "./chunk-UNDGI6ZI.js";
19
+ } from "./chunk-OZH3EDGZ.js";
20
20
  import {
21
21
  DropdownMenuItem,
22
22
  DropdownMenuSeparator,
@@ -34,7 +34,7 @@ import {
34
34
  shadcnAnimationStyles,
35
35
  useShadCNAnimations,
36
36
  useUnderverseUIConfig
37
- } from "./chunk-Z6WE65J2.js";
37
+ } from "./chunk-JXE7JBQV.js";
38
38
  import {
39
39
  ForceInternalTranslationsProvider,
40
40
  NextIntlAdapter,
@@ -86,9 +86,11 @@ var VARIANT_STYLES_BTN = {
86
86
  gradient: "bg-linear-to-r from-primary via-primary/80 to-secondary text-primary-foreground hover:opacity-90 shadow-md border-0"
87
87
  };
88
88
  var SIZE_STYLES_BTN = {
89
+ xs: `${formControlSizeStyles.xs.control} min-w-6`,
89
90
  sm: `${formControlSizeStyles.sm.control} min-w-8`,
90
- md: `${formControlSizeStyles.md.input} min-w-10`,
91
- lg: `${formControlSizeStyles.lg.input} min-w-12`,
91
+ md: `${formControlSizeStyles.md.control} min-w-10`,
92
+ lg: `${formControlSizeStyles.lg.control} min-w-12`,
93
+ xl: `${formControlSizeStyles.xl.control} min-w-14`,
92
94
  smx: "h-9 min-w-9 px-3.5 text-[13px] leading-none md:h-8 md:text-xs",
93
95
  icon: "w-11 h-11 p-0 rounded-full flex items-center justify-center md:w-10 md:h-10"
94
96
  };
@@ -128,7 +130,7 @@ var Button = forwardRef(
128
130
  const finalVariant = gradient ? "gradient" : variant;
129
131
  const variantStyle = VARIANT_STYLES_BTN[finalVariant] || VARIANT_STYLES_BTN.default;
130
132
  const sizeStyle = SIZE_STYLES_BTN[size] || SIZE_STYLES_BTN.md;
131
- const iconSizeStyle = size === "sm" ? formControlSizeStyles.sm.icon : size === "lg" || size === "icon" ? formControlSizeStyles.lg.icon : formControlSizeStyles.md.icon;
133
+ const iconSizeStyle = size === "xs" || size === "sm" ? formControlSizeStyles.sm.icon : size === "lg" || size === "xl" || size === "icon" ? formControlSizeStyles.lg.icon : formControlSizeStyles.md.icon;
132
134
  const globalConfig = useUnderverseUIConfig();
133
135
  const resolvedBorderMode = borderMode ?? globalConfig.button?.borderMode ?? "full";
134
136
  const SpinnerIcon = Spinner ?? Activity;
@@ -890,7 +892,7 @@ var Input = forwardRef3(
890
892
  const charCount = typeof value === "string" ? value.length : 0;
891
893
  const errorId = errMsg && resolvedId ? `${resolvedId}-error` : void 0;
892
894
  const descId = !errMsg && (description || hint) && resolvedId ? `${resolvedId}-desc` : void 0;
893
- const containerSpacing = size === "sm" ? "space-y-1.5" : "space-y-2";
895
+ const containerSpacing = size === "xs" || size === "sm" ? "space-y-1.5" : "space-y-2";
894
896
  const variantStyles5 = {
895
897
  default: {
896
898
  container: "bg-background border border-input hover:border-accent-foreground/20",
@@ -1049,8 +1051,8 @@ var Input = forwardRef3(
1049
1051
  variantStyles5[variant].container,
1050
1052
  errMsg ? variantStyles5[variant].error : variantStyles5[variant].focus,
1051
1053
  // Reduce visual weight for sm: no default drop shadows
1052
- size !== "sm" && variant !== "minimal" && "shadow-sm",
1053
- size !== "sm" && isFocused && "shadow-md",
1054
+ size !== "xs" && size !== "sm" && variant !== "minimal" && "shadow-sm",
1055
+ size !== "xs" && size !== "sm" && isFocused && "shadow-md",
1054
1056
  className
1055
1057
  ),
1056
1058
  disabled,
@@ -1245,9 +1247,11 @@ var NumberInput = forwardRef3(
1245
1247
  };
1246
1248
  const inputSize = props.size || "md";
1247
1249
  const stepperSizeStyles = {
1250
+ xs: { width: "w-6", icon: { width: 7, height: 4, path: { up: "M3.5 1L6 3H1L3.5 1Z", down: "M3.5 3L1 1H6L3.5 3Z" } } },
1248
1251
  sm: { width: "w-7", icon: { width: 8, height: 5, path: { up: "M4 1L7 4H1L4 1Z", down: "M4 4L1 1H7L4 4Z" } } },
1249
1252
  md: { width: "w-9", icon: { width: 10, height: 6, path: { up: "M5 1L9 5H1L5 1Z", down: "M5 5L1 1H9L5 5Z" } } },
1250
- lg: { width: "w-11", icon: { width: 12, height: 7, path: { up: "M6 1L11 6H1L6 1Z", down: "M6 6L1 1H11L6 6Z" } } }
1253
+ lg: { width: "w-11", icon: { width: 12, height: 7, path: { up: "M6 1L11 6H1L6 1Z", down: "M6 6L1 1H11L6 6Z" } } },
1254
+ xl: { width: "w-12", icon: { width: 14, height: 8, path: { up: "M7 1L13 7H1L7 1Z", down: "M7 7L1 1H13L7 7Z" } } }
1251
1255
  };
1252
1256
  const ss = stepperSizeStyles[inputSize];
1253
1257
  const stepperAddon = showSteppers ? /* @__PURE__ */ jsxs5("div", { className: cn("absolute right-0 inset-y-0 flex flex-col border-l border-border/50 rounded-r-full overflow-hidden", ss.width), children: [
@@ -2239,6 +2243,13 @@ var TagInput = forwardRef4(
2239
2243
  const visibleTags = hiddenCount > 0 ? value.slice(0, maxVisibleTags) : value;
2240
2244
  const moreLabel = labels?.moreCount?.replace("{count}", String(hiddenCount)) ?? `+${hiddenCount} more`;
2241
2245
  const sizeStyles7 = {
2246
+ xs: {
2247
+ container: formControlSizeStyles.xs.control,
2248
+ input: formControlSizeStyles.xs.label,
2249
+ tag: formControlSizeStyles.xs.tag,
2250
+ tagIcon: "h-2.5 w-2.5",
2251
+ button: "h-6 text-xs px-1.5"
2252
+ },
2242
2253
  sm: {
2243
2254
  container: formControlSizeStyles.sm.control,
2244
2255
  input: formControlSizeStyles.sm.label,
@@ -2259,6 +2270,13 @@ var TagInput = forwardRef4(
2259
2270
  tag: formControlSizeStyles.lg.tag,
2260
2271
  tagIcon: "h-4 w-4",
2261
2272
  button: "h-11 text-base px-4"
2273
+ },
2274
+ xl: {
2275
+ container: formControlSizeStyles.xl.control,
2276
+ input: formControlSizeStyles.xl.label,
2277
+ tag: formControlSizeStyles.xl.tag,
2278
+ tagIcon: "h-4 w-4",
2279
+ button: "h-12 text-base px-5"
2262
2280
  }
2263
2281
  };
2264
2282
  const addTag = (tagValue) => {
@@ -4674,19 +4692,25 @@ var Combobox = ({
4674
4692
  return groups;
4675
4693
  }, [renderLimitedOptions, groupBy]);
4676
4694
  const itemSizeStyles = {
4695
+ xs: "px-2 py-1 text-xs gap-1.5",
4677
4696
  sm: "px-2.5 py-1.5 text-xs gap-2",
4678
4697
  md: "px-3 py-2.5 text-sm gap-3",
4679
- lg: "px-4 py-3 text-base gap-3"
4698
+ lg: "px-4 py-3 text-base gap-3",
4699
+ xl: "px-5 py-3.5 text-base gap-3"
4680
4700
  };
4681
4701
  const iconSizeStyles = {
4702
+ xs: formControlSizeStyles.xs.icon,
4682
4703
  sm: formControlSizeStyles.sm.icon,
4683
4704
  md: formControlSizeStyles.md.icon,
4684
- lg: formControlSizeStyles.lg.icon
4705
+ lg: formControlSizeStyles.lg.icon,
4706
+ xl: formControlSizeStyles.xl.icon
4685
4707
  };
4686
4708
  const checkIconSizeStyles = {
4709
+ xs: "h-3 w-3",
4687
4710
  sm: "h-3.5 w-3.5",
4688
4711
  md: "h-4 w-4",
4689
- lg: "h-5 w-5"
4712
+ lg: "h-5 w-5",
4713
+ xl: "h-5 w-5"
4690
4714
  };
4691
4715
  const renderOptionItem = (item, index, virtualItem) => {
4692
4716
  const itemValue = getOptionValue(item);
@@ -4742,7 +4766,7 @@ var Combobox = ({
4742
4766
  ),
4743
4767
  renderOption ? /* @__PURE__ */ jsx22("div", { className: "flex-1 min-w-0", children: renderOption(item, isSelected) }) : /* @__PURE__ */ jsxs18("div", { className: "flex-1 min-w-0", children: [
4744
4768
  /* @__PURE__ */ jsx22("span", { className: "block truncate", children: itemLabel }),
4745
- itemDescription && /* @__PURE__ */ jsx22("span", { className: cn("block text-muted-foreground truncate mt-0.5", size === "sm" ? "text-[10px]" : "text-xs"), children: itemDescription })
4769
+ itemDescription && /* @__PURE__ */ jsx22("span", { className: cn("block text-muted-foreground truncate mt-0.5", size === "xs" || size === "sm" ? "text-[10px]" : "text-xs"), children: itemDescription })
4746
4770
  ] }),
4747
4771
  isSelected && showSelectedIcon && /* @__PURE__ */ jsx22("span", { className: "shrink-0 ml-auto", children: /* @__PURE__ */ jsx22(Check3, { className: cn(checkIconSizeStyles[size], "text-primary") }) })
4748
4772
  ]
@@ -4759,13 +4783,13 @@ var Combobox = ({
4759
4783
  "data-state": open ? "open" : "closed",
4760
4784
  className: cn("w-full overflow-hidden", getPanelBorderRadiusClass(resolvedBorderMode)),
4761
4785
  children: [
4762
- enableSearch && /* @__PURE__ */ jsx22("div", { className: cn("relative border-b border-border/30", size === "sm" ? "p-2" : size === "lg" ? "p-3" : "p-2.5"), children: /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
4786
+ enableSearch && /* @__PURE__ */ jsx22("div", { className: cn("relative border-b border-border/30", size === "xs" ? "p-1.5" : size === "sm" ? "p-2" : size === "lg" ? "p-3" : size === "xl" ? "p-3.5" : "p-2.5"), children: /* @__PURE__ */ jsxs18("div", { className: "relative", children: [
4763
4787
  /* @__PURE__ */ jsx22(
4764
4788
  Search4,
4765
4789
  {
4766
4790
  className: cn(
4767
4791
  "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground/60 transition-colors peer-focus:text-primary",
4768
- size === "sm" ? "h-3.5 w-3.5" : size === "lg" ? "h-5 w-5" : "h-4 w-4"
4792
+ size === "xs" ? "h-3 w-3" : size === "sm" ? "h-3.5 w-3.5" : size === "lg" || size === "xl" ? "h-5 w-5" : "h-4 w-4"
4769
4793
  )
4770
4794
  }
4771
4795
  ),
@@ -4799,7 +4823,7 @@ var Combobox = ({
4799
4823
  placeholder: searchPlaceholder,
4800
4824
  className: cn(
4801
4825
  "peer w-full rounded-xl bg-muted/40 pr-3",
4802
- size === "sm" ? "py-1.5 pl-8 text-xs" : size === "lg" ? "py-3 pl-10 text-base" : "py-2.5 pl-9 text-sm",
4826
+ size === "xs" ? "py-1 pl-7 text-xs" : size === "sm" ? "py-1.5 pl-8 text-xs" : size === "lg" ? "py-3 pl-10 text-base" : size === "xl" ? "py-3.5 pl-10 text-base" : "py-2.5 pl-9 text-sm",
4803
4827
  "border border-transparent",
4804
4828
  "focus:outline-none focus:bg-background focus:border-primary/30 focus:ring-2 focus:ring-primary/10",
4805
4829
  "transition-all duration-200",
@@ -4817,7 +4841,7 @@ var Combobox = ({
4817
4841
  scrollVirtualListToStart();
4818
4842
  },
4819
4843
  className: "absolute right-3 top-1/2 -translate-y-1/2 p-0.5 rounded-md hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",
4820
- children: /* @__PURE__ */ jsx22(X8, { className: cn(size === "sm" ? "h-3 w-3" : size === "lg" ? "h-4 w-4" : "h-3.5 w-3.5") })
4844
+ children: /* @__PURE__ */ jsx22(X8, { className: cn(size === "xs" ? "h-3 w-3" : size === "sm" ? "h-3 w-3" : size === "lg" || size === "xl" ? "h-4 w-4" : "h-3.5 w-3.5") })
4821
4845
  }
4822
4846
  )
4823
4847
  ] }) }),
@@ -4831,7 +4855,7 @@ var Combobox = ({
4831
4855
  "data-os-ignore": virtualized ? "" : void 0,
4832
4856
  className: cn("overflow-y-auto overscroll-contain", (!useOverlayScrollbar || virtualized) && comboboxScrollClassName),
4833
4857
  style: { maxHeight },
4834
- children: /* @__PURE__ */ jsx22("div", { className: cn(size === "sm" ? "p-1" : size === "lg" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ jsx22("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
4858
+ children: /* @__PURE__ */ jsx22("div", { className: cn(size === "xs" ? "p-1" : size === "sm" ? "p-1" : size === "lg" || size === "xl" ? "p-2" : "p-1.5"), children: loading2 ? /* @__PURE__ */ jsx22("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
4835
4859
  /* @__PURE__ */ jsx22("div", { className: "relative", children: /* @__PURE__ */ jsx22("div", { className: "w-10 h-10 rounded-full border-2 border-primary/20 border-t-primary animate-spin" }) }),
4836
4860
  /* @__PURE__ */ jsx22("span", { className: "text-sm text-muted-foreground", children: loadingText })
4837
4861
  ] }) }) : shouldPromptForSearch ? /* @__PURE__ */ jsx22("div", { className: "px-3 py-10 text-center", children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col items-center gap-3 animate-in fade-in-0 zoom-in-95 duration-300", children: [
@@ -4888,9 +4912,11 @@ var Combobox = ({
4888
4912
  }
4889
4913
  );
4890
4914
  const sizeStyles7 = {
4915
+ xs: formControlSizeStyles.xs.control,
4891
4916
  sm: formControlSizeStyles.sm.control,
4892
4917
  md: formControlSizeStyles.md.control,
4893
- lg: formControlSizeStyles.lg.control
4918
+ lg: formControlSizeStyles.lg.control,
4919
+ xl: formControlSizeStyles.xl.control
4894
4920
  };
4895
4921
  const variantStyles5 = {
4896
4922
  default: "border border-input bg-background hover:bg-accent/5 hover:border-primary/40",
@@ -4899,7 +4925,7 @@ var Combobox = ({
4899
4925
  filled: "border-0 bg-muted/50 hover:bg-muted/80"
4900
4926
  };
4901
4927
  const labelSize = formControlSizeStyles[size].label;
4902
- const verticalGap = size === "sm" ? "space-y-1.5" : "space-y-2";
4928
+ const verticalGap = size === "xs" || size === "sm" ? "space-y-1.5" : "space-y-2";
4903
4929
  const dropdownBackgroundStyle = matchTriggerBackground && triggerBackgroundColor ? { backgroundColor: triggerBackgroundColor } : void 0;
4904
4930
  const triggerButtonBaseProps = {
4905
4931
  ref: triggerRef,
@@ -5795,7 +5821,7 @@ var DatePicker = ({
5795
5821
  placeholder,
5796
5822
  className,
5797
5823
  disabled = false,
5798
- size = "md",
5824
+ size: requestedSize = "md",
5799
5825
  label,
5800
5826
  labelClassName,
5801
5827
  required,
@@ -5807,6 +5833,7 @@ var DatePicker = ({
5807
5833
  maxDate,
5808
5834
  borderMode
5809
5835
  }) => {
5836
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
5810
5837
  const t = useSmartTranslations("DatePicker");
5811
5838
  const tv = useSmartTranslations("ValidationInput");
5812
5839
  const locale = useSmartLocale();
@@ -6317,6 +6344,7 @@ var DatePicker = ({
6317
6344
  formControlFixedClass,
6318
6345
  getBorderRadiusClass(resolvedBorderMode),
6319
6346
  sizeStyles7[size].trigger,
6347
+ formControlSizeStyles[requestedSize].control,
6320
6348
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
6321
6349
  "border-border/60 hover:border-primary/40",
6322
6350
  "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
@@ -6432,10 +6460,11 @@ var DateRangePicker = ({
6432
6460
  disablePastDates = false,
6433
6461
  minDate,
6434
6462
  maxDate,
6435
- size = "md",
6463
+ size: requestedSize = "md",
6436
6464
  disabled = false,
6437
6465
  borderMode
6438
6466
  }) => {
6467
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
6439
6468
  const locale = useSmartLocale();
6440
6469
  const t = useSmartTranslations("DatePicker");
6441
6470
  const tv = useSmartTranslations("ValidationInput");
@@ -7073,6 +7102,7 @@ var DateRangePicker = ({
7073
7102
  formControlFixedClass,
7074
7103
  getBorderRadiusClass(resolvedBorderMode),
7075
7104
  sizeStyles7[size].trigger,
7105
+ formControlSizeStyles[requestedSize].control,
7076
7106
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
7077
7107
  "border-border/60 hover:border-primary/40",
7078
7108
  "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
@@ -7450,7 +7480,7 @@ var LunarDatePicker = ({
7450
7480
  placeholder,
7451
7481
  className,
7452
7482
  disabled = false,
7453
- size = "md",
7483
+ size: requestedSize = "md",
7454
7484
  label,
7455
7485
  labelClassName,
7456
7486
  required,
@@ -7462,6 +7492,7 @@ var LunarDatePicker = ({
7462
7492
  maxDate,
7463
7493
  borderMode
7464
7494
  }) => {
7495
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
7465
7496
  const globalConfig = useUnderverseUIConfig();
7466
7497
  const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
7467
7498
  const t = useSmartTranslations("DatePicker");
@@ -8010,6 +8041,7 @@ var LunarDatePicker = ({
8010
8041
  formControlFixedClass,
8011
8042
  getBorderRadiusClass(resolvedBorderMode),
8012
8043
  sizeStyles7[size].trigger,
8044
+ formControlSizeStyles[requestedSize].control,
8013
8045
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
8014
8046
  "border-border/60 hover:border-primary/40",
8015
8047
  "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
@@ -8131,10 +8163,11 @@ var LunarDateRangePicker = ({
8131
8163
  disablePastDates = false,
8132
8164
  minDate,
8133
8165
  maxDate,
8134
- size = "md",
8166
+ size: requestedSize = "md",
8135
8167
  disabled = false,
8136
8168
  borderMode
8137
8169
  }) => {
8170
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
8138
8171
  const locale = useSmartLocale();
8139
8172
  const t = useSmartTranslations("DatePicker");
8140
8173
  const tv = useSmartTranslations("ValidationInput");
@@ -8647,6 +8680,7 @@ var LunarDateRangePicker = ({
8647
8680
  formControlFixedClass,
8648
8681
  getBorderRadiusClass(borderMode ?? "full"),
8649
8682
  sizeStyles7[size].trigger,
8683
+ formControlSizeStyles[requestedSize].control,
8650
8684
  disabled ? "border-border/40 opacity-50 cursor-not-allowed" : [
8651
8685
  "border-border/60 hover:border-primary/40",
8652
8686
  "focus-within:ring-2 focus-within:ring-primary/50 focus-within:ring-offset-2 focus-within:ring-offset-background focus-within:border-transparent focus-within:hover:border-transparent",
@@ -9142,7 +9176,7 @@ function MonthYearPicker({
9142
9176
  onChange,
9143
9177
  placeholder = "Select month/year",
9144
9178
  disabled = false,
9145
- size = "md",
9179
+ size: requestedSize = "md",
9146
9180
  label,
9147
9181
  labelClassName,
9148
9182
  required,
@@ -9167,6 +9201,7 @@ function MonthYearPicker({
9167
9201
  borderMode,
9168
9202
  ...rest
9169
9203
  }) {
9204
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
9170
9205
  const globalConfig = useUnderverseUIConfig();
9171
9206
  const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
9172
9207
  const gi18n = useGlobalI18n();
@@ -9335,6 +9370,7 @@ function MonthYearPicker({
9335
9370
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
9336
9371
  getBorderRadiusClass(resolvedBorderMode),
9337
9372
  sz.control,
9373
+ formControlSizeStyles[requestedSize].control,
9338
9374
  formControlFixedClass,
9339
9375
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
9340
9376
  "disabled:opacity-50 disabled:cursor-not-allowed",
@@ -10674,7 +10710,7 @@ function TimePicker({
10674
10710
  onChange,
10675
10711
  placeholder = "Select time",
10676
10712
  disabled = false,
10677
- size = "md",
10713
+ size: requestedSize = "md",
10678
10714
  label,
10679
10715
  required,
10680
10716
  format = "24",
@@ -10703,6 +10739,7 @@ function TimePicker({
10703
10739
  borderMode,
10704
10740
  ...rest
10705
10741
  }) {
10742
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
10706
10743
  const tv = useSmartTranslations("ValidationInput");
10707
10744
  const gi18n = useGlobalI18n();
10708
10745
  const globalConfig = useUnderverseUIConfig();
@@ -11049,6 +11086,7 @@ function TimePicker({
11049
11086
  "group flex w-full items-center justify-between border bg-background/80 backdrop-blur-sm",
11050
11087
  getBorderRadiusClass(resolvedBorderMode),
11051
11088
  sz.control,
11089
+ formControlSizeStyles[requestedSize].control,
11052
11090
  formControlFixedClass,
11053
11091
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background",
11054
11092
  "disabled:opacity-50 disabled:cursor-not-allowed",
@@ -11530,9 +11568,10 @@ var DateTimePicker = ({
11530
11568
  required,
11531
11569
  doneLabel,
11532
11570
  clearLabel,
11533
- size = "md",
11571
+ size: requestedSize = "md",
11534
11572
  borderMode
11535
11573
  }) => {
11574
+ const size = requestedSize === "xs" ? "sm" : requestedSize === "xl" ? "lg" : requestedSize;
11536
11575
  const globalConfig = useUnderverseUIConfig();
11537
11576
  const resolvedBorderMode = borderMode ?? globalConfig.input?.borderMode ?? globalConfig.borderMode ?? "full";
11538
11577
  const t = useSmartTranslations("DateTimePicker");
@@ -11737,6 +11776,7 @@ var DateTimePicker = ({
11737
11776
  formControlFixedClass,
11738
11777
  getBorderRadiusClass(resolvedBorderMode),
11739
11778
  sizeStyles7[size].trigger,
11779
+ formControlSizeStyles[requestedSize].control,
11740
11780
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
11741
11781
  disabled && "opacity-50 cursor-not-allowed",
11742
11782
  !displayValue && "text-muted-foreground",
@@ -14940,6 +14980,13 @@ var MultiCombobox = ({
14940
14980
  }
14941
14981
  }, [maxInitialOptions, normalizedOptions.length, searchMode, virtualized]);
14942
14982
  const sizeStyles7 = {
14983
+ xs: {
14984
+ trigger: formControlSizeStyles.xs.control,
14985
+ icon: formControlSizeStyles.xs.icon,
14986
+ search: "px-7 py-1 text-xs",
14987
+ item: "text-xs px-2 py-1",
14988
+ tag: formControlSizeStyles.xs.tag
14989
+ },
14943
14990
  sm: {
14944
14991
  trigger: formControlSizeStyles.sm.control,
14945
14992
  icon: formControlSizeStyles.sm.icon,
@@ -14960,6 +15007,13 @@ var MultiCombobox = ({
14960
15007
  search: "px-10 py-3 text-base",
14961
15008
  item: "text-base px-3 py-3",
14962
15009
  tag: formControlSizeStyles.lg.tag
15010
+ },
15011
+ xl: {
15012
+ trigger: formControlSizeStyles.xl.control,
15013
+ icon: formControlSizeStyles.xl.icon,
15014
+ search: "px-10 py-3.5 text-base",
15015
+ item: "text-base px-4 py-3.5",
15016
+ tag: formControlSizeStyles.xl.tag
14963
15017
  }
14964
15018
  };
14965
15019
  const variantStyles5 = {
@@ -17390,6 +17444,15 @@ function CategoryTreeSelect(props) {
17390
17444
  }
17391
17445
  const selectedCount = valueArray.length;
17392
17446
  const triggerSizeStyles = {
17447
+ xs: {
17448
+ button: formControlSizeStyles.xs.control,
17449
+ iconWrap: "p-0.5",
17450
+ icon: formControlSizeStyles.xs.icon,
17451
+ text: formControlSizeStyles.xs.label,
17452
+ badge: formControlSizeStyles.xs.tag,
17453
+ actionIcon: formControlSizeStyles.xs.icon,
17454
+ clearIcon: "h-2.5 w-2.5"
17455
+ },
17393
17456
  sm: {
17394
17457
  button: formControlSizeStyles.sm.control,
17395
17458
  iconWrap: "p-1",
@@ -17416,6 +17479,15 @@ function CategoryTreeSelect(props) {
17416
17479
  badge: formControlSizeStyles.lg.tag,
17417
17480
  actionIcon: "w-5 h-5",
17418
17481
  clearIcon: "h-4 w-4"
17482
+ },
17483
+ xl: {
17484
+ button: formControlSizeStyles.xl.control,
17485
+ iconWrap: "p-2",
17486
+ icon: formControlSizeStyles.xl.icon,
17487
+ text: formControlSizeStyles.xl.label,
17488
+ badge: formControlSizeStyles.xl.tag,
17489
+ actionIcon: formControlSizeStyles.xl.icon,
17490
+ clearIcon: "h-4 w-4"
17419
17491
  }
17420
17492
  };
17421
17493
  const triggerVariantStyles = {
@@ -20108,9 +20180,11 @@ var Swatch = ({
20108
20180
  size = "md"
20109
20181
  }) => {
20110
20182
  const sizeClasses2 = {
20183
+ xs: "h-4 w-4",
20111
20184
  sm: "h-5 w-5",
20112
20185
  md: "h-6 w-6",
20113
- lg: "h-8 w-8"
20186
+ lg: "h-8 w-8",
20187
+ xl: "h-10 w-10"
20114
20188
  };
20115
20189
  return /* @__PURE__ */ jsx51(
20116
20190
  "button",
@@ -20231,11 +20305,13 @@ function ColorPicker({
20231
20305
  const alphaPct = Math.round(rgba.a * 100);
20232
20306
  const harmony = showHarmony ? getColorHarmony(rgba) : null;
20233
20307
  const sizeClasses2 = {
20308
+ xs: formControlSizeStyles.xs.control,
20234
20309
  sm: formControlSizeStyles.sm.control,
20235
20310
  md: formControlSizeStyles.md.control,
20236
- lg: formControlSizeStyles.lg.control
20311
+ lg: formControlSizeStyles.lg.control,
20312
+ xl: formControlSizeStyles.xl.control
20237
20313
  };
20238
- const swatchSize = size === "sm" ? "sm" : size === "lg" ? "lg" : "md";
20314
+ const swatchSize = size;
20239
20315
  const trigger = /* @__PURE__ */ jsxs44(
20240
20316
  "button",
20241
20317
  {
@@ -21299,7 +21375,7 @@ function DataTableBodyRows({
21299
21375
  idx: virtualRow.index,
21300
21376
  virtualRow
21301
21377
  })).filter((item) => Boolean(item.row)) : displayedData.map((row, idx) => ({ row, idx, virtualRow: void 0 }));
21302
- return /* @__PURE__ */ jsx57(TableBody, { children: loading2 ? /* @__PURE__ */ jsx57(TableRow, { children: /* @__PURE__ */ jsx57(TableCell, { colSpan: leafColumns.length, className: "text-center py-8", children: /* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
21378
+ return /* @__PURE__ */ jsx57(TableBody, { children: loading2 ? /* @__PURE__ */ jsx57(TableRow, { className: "!border-border/10", children: /* @__PURE__ */ jsx57(TableCell, { colSpan: leafColumns.length, className: "text-center py-8", children: /* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
21303
21379
  /* @__PURE__ */ jsxs49("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
21304
21380
  /* @__PURE__ */ jsx57("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
21305
21381
  /* @__PURE__ */ jsx57(
@@ -21315,7 +21391,7 @@ function DataTableBodyRows({
21315
21391
  t("loading"),
21316
21392
  "\u2026"
21317
21393
  ] })
21318
- ] }) }) }) : displayedData.length === 0 ? /* @__PURE__ */ jsx57(TableRow, { children: /* @__PURE__ */ jsx57(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: labels?.noData || t("noData") }) }) : /* @__PURE__ */ jsxs49(Fragment20, { children: [
21394
+ ] }) }) }) : displayedData.length === 0 ? /* @__PURE__ */ jsx57(TableRow, { className: "!border-border/10", children: /* @__PURE__ */ jsx57(TableCell, { colSpan: leafColumns.length, className: "text-center py-6 text-muted-foreground", children: labels?.noData || t("noData") }) }) : /* @__PURE__ */ jsxs49(Fragment20, { children: [
21319
21395
  virtualPaddingTop > 0 && /* @__PURE__ */ jsx57(TableRow, { "aria-hidden": "true", className: "border-0 hover:bg-transparent hover:shadow-none", children: /* @__PURE__ */ jsx57(TableCell, { colSpan: leafColumns.length, className: "p-0", style: { height: virtualPaddingTop } }) }),
21320
21396
  rowsToRender.map(({ row, idx, virtualRow }) => {
21321
21397
  const isStripedRow = striped && idx % 2 === 0;
@@ -21324,7 +21400,11 @@ function DataTableBodyRows({
21324
21400
  {
21325
21401
  ref: virtualRow ? measureVirtualRow : void 0,
21326
21402
  "data-index": virtualRow?.index,
21327
- className: cn(densityRowClass, isStripedRow ? "bg-surface-1" : "bg-surface-0"),
21403
+ className: cn(
21404
+ "!border-border/10",
21405
+ densityRowClass,
21406
+ isStripedRow ? "bg-surface-1" : "bg-surface-0"
21407
+ ),
21328
21408
  style: {
21329
21409
  contentVisibility: "auto",
21330
21410
  containIntrinsicSize: density === "compact" ? "0 36px" : density === "comfortable" ? "0 56px" : "0 48px"
@@ -21468,6 +21548,7 @@ function DataTableHeader({
21468
21548
  filters,
21469
21549
  sort,
21470
21550
  columnDividers,
21551
+ uppercaseHeader,
21471
21552
  setCurPage,
21472
21553
  setFilters,
21473
21554
  setSort,
@@ -21714,7 +21795,7 @@ function DataTableHeader({
21714
21795
  t
21715
21796
  ]
21716
21797
  );
21717
- return /* @__PURE__ */ jsx58(Fragment21, { children: headerRows.map((row, rowIndex) => /* @__PURE__ */ jsx58(TableRow, { children: row.map((headerCell, cellIndex) => {
21798
+ return /* @__PURE__ */ jsx58(Fragment21, { children: headerRows.map((row, rowIndex) => /* @__PURE__ */ jsx58(TableRow, { className: "!border-border/10", children: row.map((headerCell, cellIndex) => {
21718
21799
  const { column: col, colSpan, rowSpan, isLeaf } = headerCell;
21719
21800
  const prevCell = cellIndex > 0 ? row[cellIndex - 1] : null;
21720
21801
  const prevCol = prevCell?.column;
@@ -21739,6 +21820,7 @@ function DataTableHeader({
21739
21820
  "relative",
21740
21821
  (col.headerAlign ?? headerAlign) === "right" && "text-right",
21741
21822
  (col.headerAlign ?? headerAlign) === "center" && "text-center",
21823
+ uppercaseHeader && "uppercase",
21742
21824
  showBorderLeft && "border-l border-border/60",
21743
21825
  getStickyHeaderClass(col)
21744
21826
  ),
@@ -21791,7 +21873,8 @@ function DataTablePagination({
21791
21873
  setCurPage,
21792
21874
  pageSizeOptions,
21793
21875
  setCurPageSize,
21794
- size
21876
+ size,
21877
+ align
21795
21878
  }) {
21796
21879
  const totalPages = Math.ceil(totalItems / curPageSize);
21797
21880
  const pages = React51.useMemo(() => {
@@ -21815,60 +21898,72 @@ function DataTablePagination({
21815
21898
  const pageBtnClass = size === "sm" ? "h-6 min-w-6 px-1.5 rounded-full text-[11px] font-medium transition-colors" : size === "lg" ? "h-8 min-w-8 px-2.5 rounded-full text-sm font-medium transition-colors" : "h-7 min-w-7 px-2 rounded-full text-xs font-medium transition-colors";
21816
21899
  const containerTextClass = size === "sm" ? "text-[11px]" : size === "lg" ? "text-sm" : "text-xs";
21817
21900
  const pageSizeClass = size === "sm" ? "w-16" : size === "lg" ? "w-24" : "w-20";
21818
- return /* @__PURE__ */ jsxs51("div", { className: cn("flex items-center justify-between gap-2 px-1 pt-3 text-muted-foreground", containerTextClass), children: [
21819
- /* @__PURE__ */ jsxs51("div", { className: "tabular-nums", children: [
21820
- (curPage - 1) * curPageSize + 1,
21821
- "-",
21822
- Math.min(curPage * curPageSize, totalItems),
21823
- "/",
21824
- totalItems
21825
- ] }),
21826
- /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-0.5", children: [
21827
- /* @__PURE__ */ jsx59(
21828
- Button_default,
21901
+ return /* @__PURE__ */ jsxs51("div", { className: cn("relative flex items-center gap-2 px-1 pt-3 text-muted-foreground", containerTextClass), children: [
21902
+ /* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2", children: [
21903
+ /* @__PURE__ */ jsxs51("div", { className: "tabular-nums", children: [
21904
+ (curPage - 1) * curPageSize + 1,
21905
+ "-",
21906
+ Math.min(curPage * curPageSize, totalItems),
21907
+ "/",
21908
+ totalItems
21909
+ ] }),
21910
+ pageSizeOptions && /* @__PURE__ */ jsx59(
21911
+ Combobox,
21829
21912
  {
21830
- variant: "ghost",
21831
- size: controlButtonSize,
21832
- className: navBtnClass,
21833
- onClick: () => setCurPage(Math.max(1, curPage - 1)),
21834
- disabled: curPage === 1,
21835
- children: /* @__PURE__ */ jsx59("svg", { className: navIconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx59("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
21836
- }
21837
- ),
21838
- pages.map(
21839
- (p, i) => p === "..." ? /* @__PURE__ */ jsx59("span", { className: "px-1 text-muted-foreground/60", children: "\u2026" }, `dots-${i}`) : /* @__PURE__ */ jsx59(
21840
- "button",
21841
- {
21842
- onClick: () => setCurPage(p),
21843
- className: cn(pageBtnClass, curPage === p ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground"),
21844
- children: p
21913
+ options: pageSizeOptions.map(String),
21914
+ value: String(curPageSize),
21915
+ onChange: (v) => {
21916
+ setCurPage(1);
21917
+ setCurPageSize(Number(v));
21845
21918
  },
21846
- p
21847
- )
21848
- ),
21849
- /* @__PURE__ */ jsx59(
21850
- Button_default,
21851
- {
21852
- variant: "ghost",
21853
- size: controlButtonSize,
21854
- className: navBtnClass,
21855
- onClick: () => setCurPage(Math.min(totalPages, curPage + 1)),
21856
- disabled: curPage === totalPages,
21857
- children: /* @__PURE__ */ jsx59("svg", { className: navIconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx59("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
21919
+ size,
21920
+ className: pageSizeClass
21858
21921
  }
21859
21922
  )
21860
21923
  ] }),
21861
- pageSizeOptions && /* @__PURE__ */ jsx59(
21862
- Combobox,
21924
+ /* @__PURE__ */ jsxs51(
21925
+ "div",
21863
21926
  {
21864
- options: pageSizeOptions.map(String),
21865
- value: String(curPageSize),
21866
- onChange: (v) => {
21867
- setCurPage(1);
21868
- setCurPageSize(Number(v));
21869
- },
21870
- size,
21871
- className: pageSizeClass
21927
+ className: cn(
21928
+ "flex items-center gap-0.5",
21929
+ align === "center" && "absolute left-1/2 -translate-x-1/2",
21930
+ align === "right" && "ml-auto"
21931
+ ),
21932
+ children: [
21933
+ /* @__PURE__ */ jsx59(
21934
+ Button_default,
21935
+ {
21936
+ variant: "ghost",
21937
+ size: controlButtonSize,
21938
+ className: navBtnClass,
21939
+ onClick: () => setCurPage(Math.max(1, curPage - 1)),
21940
+ disabled: curPage === 1,
21941
+ children: /* @__PURE__ */ jsx59("svg", { className: navIconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx59("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) })
21942
+ }
21943
+ ),
21944
+ pages.map(
21945
+ (p, i) => p === "..." ? /* @__PURE__ */ jsx59("span", { className: "px-1 text-muted-foreground/60", children: "\u2026" }, `dots-${i}`) : /* @__PURE__ */ jsx59(
21946
+ "button",
21947
+ {
21948
+ onClick: () => setCurPage(p),
21949
+ className: cn(pageBtnClass, curPage === p ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground"),
21950
+ children: p
21951
+ },
21952
+ p
21953
+ )
21954
+ ),
21955
+ /* @__PURE__ */ jsx59(
21956
+ Button_default,
21957
+ {
21958
+ variant: "ghost",
21959
+ size: controlButtonSize,
21960
+ className: navBtnClass,
21961
+ onClick: () => setCurPage(Math.min(totalPages, curPage + 1)),
21962
+ disabled: curPage === totalPages,
21963
+ children: /* @__PURE__ */ jsx59("svg", { className: navIconClass, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx59("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) })
21964
+ }
21965
+ )
21966
+ ]
21872
21967
  }
21873
21968
  )
21874
21969
  ] });
@@ -22560,10 +22655,12 @@ function DataTable({
22560
22655
  onQueryChange,
22561
22656
  caption,
22562
22657
  toolbar,
22658
+ showToolbar = true,
22563
22659
  size = "md",
22564
22660
  enableColumnVisibilityToggle = true,
22565
22661
  enableDensityToggle = true,
22566
22662
  enableHeaderAlignToggle = false,
22663
+ uppercaseHeader = false,
22567
22664
  striped = true,
22568
22665
  columnDividers = false,
22569
22666
  className,
@@ -22576,6 +22673,7 @@ function DataTable({
22576
22673
  virtualizedRows = false,
22577
22674
  estimatedRowHeight,
22578
22675
  overscan = 8,
22676
+ paginationAlign = "right",
22579
22677
  enableHeaderAutoFit = true,
22580
22678
  labels,
22581
22679
  columnColorGroups,
@@ -22716,7 +22814,7 @@ function DataTable({
22716
22814
  });
22717
22815
  }, []);
22718
22816
  return /* @__PURE__ */ jsxs53("div", { className: cn("space-y-2", className), children: [
22719
- /* @__PURE__ */ jsx61(
22817
+ showToolbar && /* @__PURE__ */ jsx61(
22720
22818
  DataTableToolbar,
22721
22819
  {
22722
22820
  caption,
@@ -22776,6 +22874,7 @@ function DataTable({
22776
22874
  filters,
22777
22875
  sort,
22778
22876
  columnDividers,
22877
+ uppercaseHeader,
22779
22878
  setCurPage,
22780
22879
  setFilters,
22781
22880
  setSort,
@@ -22826,7 +22925,8 @@ function DataTable({
22826
22925
  setCurPage,
22827
22926
  pageSizeOptions,
22828
22927
  setCurPageSize,
22829
- size
22928
+ size,
22929
+ align: paginationAlign
22830
22930
  }
22831
22931
  )
22832
22932
  ] });