@bubo-squared/ui-framework 0.2.22 → 0.2.23

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
@@ -1652,13 +1652,13 @@ var inputShellVariants = (0, import_class_variance_authority13.cva)(
1652
1652
  }
1653
1653
  },
1654
1654
  defaultVariants: {
1655
- size: "lg",
1655
+ size: "md",
1656
1656
  status: "default"
1657
1657
  }
1658
1658
  }
1659
1659
  );
1660
1660
  var InputShell = React21.forwardRef(
1661
- ({ size, status, disabled, className, ...rest }, ref) => {
1661
+ ({ size = "md", status, disabled, className, ...rest }, ref) => {
1662
1662
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1663
1663
  "div",
1664
1664
  {
@@ -1761,7 +1761,7 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1761
1761
  hint,
1762
1762
  hideHint,
1763
1763
  status = "default",
1764
- size = "lg",
1764
+ size = "md",
1765
1765
  disabled,
1766
1766
  className,
1767
1767
  leadingIcon,
@@ -2032,7 +2032,7 @@ var import_class_variance_authority15 = require("class-variance-authority");
2032
2032
  var import_icons8 = require("@bubo-squared/icons");
2033
2033
  var import_jsx_runtime26 = require("react/jsx-runtime");
2034
2034
  var selectTriggerVariants = (0, import_class_variance_authority15.cva)(
2035
- "group flex w-full items-center justify-between rounded-4 border bg-(--background-primary) p-2 text-left transition-colors cursor-pointer focus-ring-primary focus:border-(--border-brand) hover:bg-(--background-primary-hover) disabled:bg-(--background-primary) disabled:border-(--border-secondary-disabled) disabled:text-primary-disabled disabled:cursor-default",
2035
+ "group flex w-full items-center justify-between rounded-4 border bg-(--background-primary) p-2 text-left transition-colors cursor-pointer hover:bg-(--background-primary-hover) disabled:bg-(--background-primary-disabled) disabled:text-primary-disabled disabled:cursor-default",
2036
2036
  {
2037
2037
  variants: {
2038
2038
  size: {
@@ -2042,13 +2042,13 @@ var selectTriggerVariants = (0, import_class_variance_authority15.cva)(
2042
2042
  xl: "h-14"
2043
2043
  },
2044
2044
  status: {
2045
- default: "border-(--border-secondary)",
2046
- success: "border-(--border-success)",
2047
- error: "border-(--border-error)"
2045
+ default: "input-default",
2046
+ success: "input-success",
2047
+ error: "input-error"
2048
2048
  }
2049
2049
  },
2050
2050
  defaultVariants: {
2051
- size: "lg",
2051
+ size: "md",
2052
2052
  status: "default"
2053
2053
  }
2054
2054
  }
@@ -2070,7 +2070,7 @@ var textVariants = (0, import_class_variance_authority15.cva)("truncate", {
2070
2070
  }
2071
2071
  },
2072
2072
  defaultVariants: {
2073
- size: "lg",
2073
+ size: "md",
2074
2074
  hasValue: false
2075
2075
  }
2076
2076
  });
@@ -2088,7 +2088,7 @@ var selectIconVariants = (0, import_class_variance_authority15.cva)("flex items-
2088
2088
  }
2089
2089
  },
2090
2090
  defaultVariants: {
2091
- size: "lg",
2091
+ size: "md",
2092
2092
  disabled: false
2093
2093
  }
2094
2094
  });
@@ -2112,7 +2112,7 @@ var Select = React24.forwardRef((props, forwardedRef) => {
2112
2112
  hideHint = false,
2113
2113
  name,
2114
2114
  placeholder = "Placeholder text",
2115
- size = "lg",
2115
+ size = "md",
2116
2116
  status = "default",
2117
2117
  disabled,
2118
2118
  options,
@@ -2184,6 +2184,7 @@ var Select = React24.forwardRef((props, forwardedRef) => {
2184
2184
  type: "button",
2185
2185
  "aria-haspopup": "listbox",
2186
2186
  "aria-expanded": isOpen,
2187
+ "aria-disabled": disabled || void 0,
2187
2188
  disabled,
2188
2189
  className: cn(
2189
2190
  selectTriggerVariants({ size, status }),
@@ -2277,7 +2278,7 @@ var passwordTextVariants = (0, import_class_variance_authority16.cva)("truncate"
2277
2278
  }
2278
2279
  },
2279
2280
  defaultVariants: {
2280
- size: "lg",
2281
+ size: "md",
2281
2282
  disabled: false
2282
2283
  }
2283
2284
  });
@@ -2325,7 +2326,7 @@ var PasswordInput = React25.forwardRef((props, forwardedRef) => {
2325
2326
  hint,
2326
2327
  hideHint,
2327
2328
  placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
2328
- size = "lg",
2329
+ size = "md",
2329
2330
  status = "default",
2330
2331
  variant = "icon",
2331
2332
  disabled,
@@ -2833,7 +2834,7 @@ var inputTextVariants2 = (0, import_class_variance_authority18.cva)("", {
2833
2834
  }
2834
2835
  },
2835
2836
  defaultVariants: {
2836
- size: "lg"
2837
+ size: "md"
2837
2838
  }
2838
2839
  });
2839
2840
  var dropdownWidthVariants = (0, import_class_variance_authority18.cva)("", {
@@ -2846,7 +2847,7 @@ var dropdownWidthVariants = (0, import_class_variance_authority18.cva)("", {
2846
2847
  }
2847
2848
  },
2848
2849
  defaultVariants: {
2849
- size: "lg"
2850
+ size: "md"
2850
2851
  }
2851
2852
  });
2852
2853
  var wrapperStatusClass = {
@@ -2866,7 +2867,7 @@ var countryOptionVariants = (0, import_class_variance_authority18.cva)(
2866
2867
  }
2867
2868
  },
2868
2869
  defaultVariants: {
2869
- size: "lg"
2870
+ size: "md"
2870
2871
  }
2871
2872
  }
2872
2873
  );
@@ -2880,7 +2881,7 @@ var PhoneInput = React31.forwardRef(
2880
2881
  hint,
2881
2882
  hideHint,
2882
2883
  placeholder,
2883
- size = "lg",
2884
+ size = "md",
2884
2885
  disabled = false,
2885
2886
  status = "default",
2886
2887
  ...rest
@@ -2938,7 +2939,7 @@ var CountrySelect = ({
2938
2939
  value: selectedCountry,
2939
2940
  options: countryList,
2940
2941
  onChange,
2941
- size = "lg"
2942
+ size = "md"
2942
2943
  }) => {
2943
2944
  const scrollAreaRef = React31.useRef(null);
2944
2945
  const [searchValue, setSearchValue] = React31.useState("");
@@ -3043,7 +3044,7 @@ var CountrySelectOption = (props) => {
3043
3044
  selectedCountry,
3044
3045
  onChange,
3045
3046
  onSelectComplete,
3046
- size = "lg"
3047
+ size = "md"
3047
3048
  } = props;
3048
3049
  const handleSelect = () => {
3049
3050
  onChange(country);
@@ -3206,7 +3207,7 @@ var searchTextVariants = (0, import_class_variance_authority19.cva)("truncate",
3206
3207
  }
3207
3208
  },
3208
3209
  defaultVariants: {
3209
- size: "lg"
3210
+ size: "md"
3210
3211
  }
3211
3212
  });
3212
3213
  var iconWrapperVariants3 = (0, import_class_variance_authority19.cva)("flex items-center justify-center shrink-0 text-(--icon-primary)", {
@@ -3222,13 +3223,13 @@ var iconWrapperVariants3 = (0, import_class_variance_authority19.cva)("flex item
3222
3223
  }
3223
3224
  },
3224
3225
  defaultVariants: {
3225
- size: "lg"
3226
+ size: "md"
3226
3227
  }
3227
3228
  });
3228
3229
  var SearchInput = React33.forwardRef((props, forwardedRef) => {
3229
3230
  const {
3230
3231
  placeholder = "Search...",
3231
- size = "lg",
3232
+ size = "md",
3232
3233
  disabled,
3233
3234
  className,
3234
3235
  leadingIcon,
@@ -3289,10 +3290,21 @@ SearchInput.displayName = "SearchInput";
3289
3290
  var React35 = __toESM(require("react"), 1);
3290
3291
 
3291
3292
  // src/components/Feedback/Tooltip.tsx
3292
- var React34 = require("react");
3293
+ var React34 = __toESM(require("react"), 1);
3293
3294
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
3294
3295
  var import_jsx_runtime36 = require("react/jsx-runtime");
3295
3296
  var TooltipArrow = TooltipPrimitive.Arrow;
3297
+ var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
3298
+ var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
3299
+ var canAcceptRef = (child) => {
3300
+ const type = child.type;
3301
+ if (typeof child.type === "string") return true;
3302
+ if (type?.$$typeof === REACT_FORWARD_REF_TYPE) return true;
3303
+ if (type?.$$typeof === REACT_MEMO_TYPE && type.type?.$$typeof === REACT_FORWARD_REF_TYPE) {
3304
+ return true;
3305
+ }
3306
+ return false;
3307
+ };
3296
3308
  var mapPlacementToSideAndAlign = (placement) => {
3297
3309
  switch (placement) {
3298
3310
  case "top":
@@ -3339,6 +3351,7 @@ var Tooltip = (props) => {
3339
3351
  children,
3340
3352
  delayDuration = 200
3341
3353
  } = props;
3354
+ const trigger = React34.isValidElement(children) && canAcceptRef(children) ? children : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-flex", tabIndex: 0, children });
3342
3355
  const hasStrapline = typeof strapline === "string" ? strapline.trim() !== "" : strapline != null;
3343
3356
  const hasDescription = typeof description === "string" ? description.trim() !== "" : description != null;
3344
3357
  const { side, align } = mapPlacementToSideAndAlign(placement);
@@ -3353,7 +3366,7 @@ var Tooltip = (props) => {
3353
3366
  disableHoverableContent,
3354
3367
  delayDuration,
3355
3368
  children: [
3356
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
3369
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
3357
3370
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3358
3371
  TooltipPrimitive.Content,
3359
3372
  {
@@ -3969,7 +3982,7 @@ var inputTextVariants3 = (0, import_class_variance_authority20.cva)("truncate",
3969
3982
  }
3970
3983
  },
3971
3984
  defaultVariants: {
3972
- size: "lg"
3985
+ size: "md"
3973
3986
  }
3974
3987
  });
3975
3988
  var iconWrapperVariants4 = (0, import_class_variance_authority20.cva)(
@@ -3987,7 +4000,7 @@ var iconWrapperVariants4 = (0, import_class_variance_authority20.cva)(
3987
4000
  }
3988
4001
  },
3989
4002
  defaultVariants: {
3990
- size: "lg"
4003
+ size: "md"
3991
4004
  }
3992
4005
  }
3993
4006
  );
@@ -3997,7 +4010,7 @@ var TextInput = React37.forwardRef((props, forwardedRef) => {
3997
4010
  hint,
3998
4011
  hideHint,
3999
4012
  placeholder = "Placeholder text",
4000
- size = "lg",
4013
+ size = "md",
4001
4014
  status = "default",
4002
4015
  disabled = false,
4003
4016
  className,
@@ -4199,7 +4212,7 @@ var WebsiteInput = React39.forwardRef((props, forwardedRef) => {
4199
4212
  hierarchy = "leading",
4200
4213
  protocolLabel = "http://",
4201
4214
  icon,
4202
- size = "lg",
4215
+ size = "md",
4203
4216
  disabled,
4204
4217
  className,
4205
4218
  ...rest