@bubo-squared/ui-framework 0.2.21 → 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
@@ -774,13 +774,14 @@ var Badge = React9.forwardRef(
774
774
  ...rest
775
775
  } = props;
776
776
  const Comp = asChild ? import_react_slot5.Slot : "div";
777
+ const hasValue = typeof value === "string" ? value.trim() !== "" : value != null;
777
778
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
778
779
  Comp,
779
780
  {
780
781
  ref,
781
782
  className: cn(badgeVariants({ size, variant }), className),
782
783
  ...rest,
783
- children: value ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
784
+ children: hasValue ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
784
785
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: label }),
785
786
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-normal", children: ":" }),
786
787
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-medium", children: value })
@@ -961,7 +962,7 @@ var Divider = (props) => {
961
962
  className: _className,
962
963
  ...divProps
963
964
  } = props;
964
- const textLabel = label ? label : "OR";
965
+ const textLabel = label ?? "OR";
965
966
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
966
967
  "div",
967
968
  {
@@ -1109,13 +1110,15 @@ var Field = (props) => {
1109
1110
  className,
1110
1111
  children
1111
1112
  } = props;
1113
+ const hasLabel = label != null;
1114
+ const hasHint = hint != null;
1112
1115
  const fieldId = React14.useId();
1113
- const labelId = label ? `${fieldId}-label` : void 0;
1114
- const hintId = hint ? `${fieldId}-hint` : void 0;
1116
+ const labelId = hasLabel ? `${fieldId}-label` : void 0;
1117
+ const hintId = hasHint ? `${fieldId}-hint` : void 0;
1115
1118
  const hintColorClass = disabled ? "text-primary-disabled" : status === "success" ? "text-(--color-success)" : status === "error" ? "text-(--color-error)" : "text-(--color-secondary)";
1116
1119
  const labelColorClass = disabled ? "text-primary-disabled" : "text-primary";
1117
1120
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn(fieldBase, className), children: [
1118
- label && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
1121
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
1119
1122
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { id: labelId, className: cn("paragraph-sm", labelColorClass), children: label }),
1120
1123
  labelRight
1121
1124
  ] }),
@@ -1123,9 +1126,9 @@ var Field = (props) => {
1123
1126
  !hideHint && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1124
1127
  "p",
1125
1128
  {
1126
- id: hint ? hintId : void 0,
1127
- className: cn("caption", hint ? hintColorClass : "invisible"),
1128
- children: hint || "\xA0"
1129
+ id: hasHint ? hintId : void 0,
1130
+ className: cn("caption", hasHint ? hintColorClass : "invisible"),
1131
+ children: hasHint ? hint : "\xA0"
1129
1132
  }
1130
1133
  )
1131
1134
  ] });
@@ -1145,6 +1148,7 @@ var Progress = React15.forwardRef(
1145
1148
  value,
1146
1149
  label,
1147
1150
  hint,
1151
+ ariaLabel,
1148
1152
  showProgressLabel = true,
1149
1153
  hideHint,
1150
1154
  size = "lg",
@@ -1155,12 +1159,13 @@ var Progress = React15.forwardRef(
1155
1159
  } = props;
1156
1160
  const clamped = Number.isFinite(value) ? Math.min(100, Math.max(0, value)) : 0;
1157
1161
  const percentageLabel = `${Math.round(clamped)}%`;
1162
+ const resolvedAriaLabel = ariaLabel ?? (typeof label === "string" ? label : void 0);
1158
1163
  const barHeightClasses = sizeToBarClasses[size];
1159
1164
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1160
1165
  Field,
1161
1166
  {
1162
1167
  label,
1163
- labelRight: showProgressLabel && label ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
1168
+ labelRight: showProgressLabel && label != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
1164
1169
  hint,
1165
1170
  hideHint,
1166
1171
  status,
@@ -1174,7 +1179,7 @@ var Progress = React15.forwardRef(
1174
1179
  "aria-valuenow": clamped,
1175
1180
  "aria-valuemin": 0,
1176
1181
  "aria-valuemax": 100,
1177
- "aria-label": label,
1182
+ "aria-label": resolvedAriaLabel,
1178
1183
  ...rest,
1179
1184
  children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1180
1185
  "div",
@@ -1275,7 +1280,7 @@ var import_react_slot6 = require("@radix-ui/react-slot");
1275
1280
  var import_class_variance_authority11 = require("class-variance-authority");
1276
1281
  var import_jsx_runtime19 = require("react/jsx-runtime");
1277
1282
  var tagVariants = (0, import_class_variance_authority11.cva)(
1278
- "inline-flex flex-row items-center justify-center rounded-6 gap-2 px-3 overflow-hidden border-1 border-(--border-secondary) bg-(--background-neutral) hover:border-(--border-secondary-hover) focus:border-(--border-brand) focus-ring-primary ",
1283
+ "inline-flex flex-row items-center justify-center rounded-6 gap-2 px-3 overflow-hidden border-1 border-(--border-secondary) bg-(--background-neutral) focus:border-(--border-brand) focus-ring-primary ",
1279
1284
  {
1280
1285
  variants: {
1281
1286
  size: {
@@ -1301,6 +1306,7 @@ var Tag = React17.forwardRef(
1301
1306
  value,
1302
1307
  ...rest
1303
1308
  } = props;
1309
+ const hasValue = typeof value === "string" ? value.trim() !== "" : value != null;
1304
1310
  const Comp = asChild ? import_react_slot6.Slot : "div";
1305
1311
  const leading = props.leadingIcon && React17.isValidElement(props.leadingIcon) ? React17.cloneElement(props.leadingIcon, { disabled, ...props.leadingIcon.props }) : null;
1306
1312
  const trailing = props.trailingIcon && React17.isValidElement(props.trailingIcon) ? React17.cloneElement(props.trailingIcon, { disabled, ...props.trailingIcon.props }) : null;
@@ -1312,7 +1318,7 @@ var Tag = React17.forwardRef(
1312
1318
  ...rest,
1313
1319
  children: [
1314
1320
  leading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: iconClasses, children: leading }),
1315
- value ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-row gap-1 items-center", children: [
1321
+ hasValue ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-row gap-1 items-center", children: [
1316
1322
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: label }),
1317
1323
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg mb-0! cursor-default font-normal", children: ":" }),
1318
1324
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-primary paragraph-lg-medium mb-0! cursor-default font-medium", children: value })
@@ -1646,13 +1652,13 @@ var inputShellVariants = (0, import_class_variance_authority13.cva)(
1646
1652
  }
1647
1653
  },
1648
1654
  defaultVariants: {
1649
- size: "lg",
1655
+ size: "md",
1650
1656
  status: "default"
1651
1657
  }
1652
1658
  }
1653
1659
  );
1654
1660
  var InputShell = React21.forwardRef(
1655
- ({ size, status, disabled, className, ...rest }, ref) => {
1661
+ ({ size = "md", status, disabled, className, ...rest }, ref) => {
1656
1662
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1657
1663
  "div",
1658
1664
  {
@@ -1755,7 +1761,7 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1755
1761
  hint,
1756
1762
  hideHint,
1757
1763
  status = "default",
1758
- size = "lg",
1764
+ size = "md",
1759
1765
  disabled,
1760
1766
  className,
1761
1767
  leadingIcon,
@@ -1770,6 +1776,7 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1770
1776
  inputValue,
1771
1777
  defaultInputValue,
1772
1778
  onInputChange,
1779
+ freeSolo = false,
1773
1780
  dropdownClassName,
1774
1781
  listboxClassName,
1775
1782
  placeholder = "Search\u2026",
@@ -1820,6 +1827,12 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1820
1827
  }
1821
1828
  onInputChange?.(next);
1822
1829
  };
1830
+ const commitTypedValue = (next) => {
1831
+ if (!isValueControlled) {
1832
+ setInternalValue(next);
1833
+ }
1834
+ onChange?.(next);
1835
+ };
1823
1836
  const commitValue = (next) => {
1824
1837
  if (!isValueControlled) {
1825
1838
  setInternalValue(next);
@@ -1836,6 +1849,9 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1836
1849
  const next = event.target.value;
1837
1850
  setInputText(next);
1838
1851
  setActiveIndex(-1);
1852
+ if (freeSolo) {
1853
+ commitTypedValue(next);
1854
+ }
1839
1855
  };
1840
1856
  const handleFocus = (event) => {
1841
1857
  setIsFocused(true);
@@ -1844,6 +1860,12 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1844
1860
  const handleBlur = (event) => {
1845
1861
  setIsFocused(false);
1846
1862
  setActiveIndex(-1);
1863
+ if (freeSolo) {
1864
+ const trimmed = currentInput.trim();
1865
+ if (trimmed.length > 0 && currentInput !== currentValue) {
1866
+ commitTypedValue(currentInput);
1867
+ }
1868
+ }
1847
1869
  onBlur?.(event);
1848
1870
  };
1849
1871
  const handleKeyDown = (event) => {
@@ -1877,6 +1899,17 @@ var Autocomplete = React23.forwardRef((props, forwardedRef) => {
1877
1899
  event.preventDefault();
1878
1900
  commitValue(options[activeIndex]);
1879
1901
  setIsFocused(false);
1902
+ break;
1903
+ }
1904
+ if (freeSolo) {
1905
+ const trimmed = currentInput.trim();
1906
+ if (trimmed.length > 0) {
1907
+ event.preventDefault();
1908
+ if (currentInput !== currentValue) {
1909
+ commitTypedValue(currentInput);
1910
+ }
1911
+ setIsFocused(false);
1912
+ }
1880
1913
  }
1881
1914
  break;
1882
1915
  }
@@ -1999,7 +2032,7 @@ var import_class_variance_authority15 = require("class-variance-authority");
1999
2032
  var import_icons8 = require("@bubo-squared/icons");
2000
2033
  var import_jsx_runtime26 = require("react/jsx-runtime");
2001
2034
  var selectTriggerVariants = (0, import_class_variance_authority15.cva)(
2002
- "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",
2003
2036
  {
2004
2037
  variants: {
2005
2038
  size: {
@@ -2009,13 +2042,13 @@ var selectTriggerVariants = (0, import_class_variance_authority15.cva)(
2009
2042
  xl: "h-14"
2010
2043
  },
2011
2044
  status: {
2012
- default: "border-(--border-secondary)",
2013
- success: "border-(--border-success)",
2014
- error: "border-(--border-error)"
2045
+ default: "input-default",
2046
+ success: "input-success",
2047
+ error: "input-error"
2015
2048
  }
2016
2049
  },
2017
2050
  defaultVariants: {
2018
- size: "lg",
2051
+ size: "md",
2019
2052
  status: "default"
2020
2053
  }
2021
2054
  }
@@ -2037,7 +2070,7 @@ var textVariants = (0, import_class_variance_authority15.cva)("truncate", {
2037
2070
  }
2038
2071
  },
2039
2072
  defaultVariants: {
2040
- size: "lg",
2073
+ size: "md",
2041
2074
  hasValue: false
2042
2075
  }
2043
2076
  });
@@ -2055,7 +2088,7 @@ var selectIconVariants = (0, import_class_variance_authority15.cva)("flex items-
2055
2088
  }
2056
2089
  },
2057
2090
  defaultVariants: {
2058
- size: "lg",
2091
+ size: "md",
2059
2092
  disabled: false
2060
2093
  }
2061
2094
  });
@@ -2079,7 +2112,7 @@ var Select = React24.forwardRef((props, forwardedRef) => {
2079
2112
  hideHint = false,
2080
2113
  name,
2081
2114
  placeholder = "Placeholder text",
2082
- size = "lg",
2115
+ size = "md",
2083
2116
  status = "default",
2084
2117
  disabled,
2085
2118
  options,
@@ -2151,6 +2184,7 @@ var Select = React24.forwardRef((props, forwardedRef) => {
2151
2184
  type: "button",
2152
2185
  "aria-haspopup": "listbox",
2153
2186
  "aria-expanded": isOpen,
2187
+ "aria-disabled": disabled || void 0,
2154
2188
  disabled,
2155
2189
  className: cn(
2156
2190
  selectTriggerVariants({ size, status }),
@@ -2244,7 +2278,7 @@ var passwordTextVariants = (0, import_class_variance_authority16.cva)("truncate"
2244
2278
  }
2245
2279
  },
2246
2280
  defaultVariants: {
2247
- size: "lg",
2281
+ size: "md",
2248
2282
  disabled: false
2249
2283
  }
2250
2284
  });
@@ -2292,7 +2326,7 @@ var PasswordInput = React25.forwardRef((props, forwardedRef) => {
2292
2326
  hint,
2293
2327
  hideHint,
2294
2328
  placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
2295
- size = "lg",
2329
+ size = "md",
2296
2330
  status = "default",
2297
2331
  variant = "icon",
2298
2332
  disabled,
@@ -2800,7 +2834,7 @@ var inputTextVariants2 = (0, import_class_variance_authority18.cva)("", {
2800
2834
  }
2801
2835
  },
2802
2836
  defaultVariants: {
2803
- size: "lg"
2837
+ size: "md"
2804
2838
  }
2805
2839
  });
2806
2840
  var dropdownWidthVariants = (0, import_class_variance_authority18.cva)("", {
@@ -2813,7 +2847,7 @@ var dropdownWidthVariants = (0, import_class_variance_authority18.cva)("", {
2813
2847
  }
2814
2848
  },
2815
2849
  defaultVariants: {
2816
- size: "lg"
2850
+ size: "md"
2817
2851
  }
2818
2852
  });
2819
2853
  var wrapperStatusClass = {
@@ -2833,7 +2867,7 @@ var countryOptionVariants = (0, import_class_variance_authority18.cva)(
2833
2867
  }
2834
2868
  },
2835
2869
  defaultVariants: {
2836
- size: "lg"
2870
+ size: "md"
2837
2871
  }
2838
2872
  }
2839
2873
  );
@@ -2847,7 +2881,7 @@ var PhoneInput = React31.forwardRef(
2847
2881
  hint,
2848
2882
  hideHint,
2849
2883
  placeholder,
2850
- size = "lg",
2884
+ size = "md",
2851
2885
  disabled = false,
2852
2886
  status = "default",
2853
2887
  ...rest
@@ -2905,7 +2939,7 @@ var CountrySelect = ({
2905
2939
  value: selectedCountry,
2906
2940
  options: countryList,
2907
2941
  onChange,
2908
- size = "lg"
2942
+ size = "md"
2909
2943
  }) => {
2910
2944
  const scrollAreaRef = React31.useRef(null);
2911
2945
  const [searchValue, setSearchValue] = React31.useState("");
@@ -3010,7 +3044,7 @@ var CountrySelectOption = (props) => {
3010
3044
  selectedCountry,
3011
3045
  onChange,
3012
3046
  onSelectComplete,
3013
- size = "lg"
3047
+ size = "md"
3014
3048
  } = props;
3015
3049
  const handleSelect = () => {
3016
3050
  onChange(country);
@@ -3173,7 +3207,7 @@ var searchTextVariants = (0, import_class_variance_authority19.cva)("truncate",
3173
3207
  }
3174
3208
  },
3175
3209
  defaultVariants: {
3176
- size: "lg"
3210
+ size: "md"
3177
3211
  }
3178
3212
  });
3179
3213
  var iconWrapperVariants3 = (0, import_class_variance_authority19.cva)("flex items-center justify-center shrink-0 text-(--icon-primary)", {
@@ -3189,13 +3223,13 @@ var iconWrapperVariants3 = (0, import_class_variance_authority19.cva)("flex item
3189
3223
  }
3190
3224
  },
3191
3225
  defaultVariants: {
3192
- size: "lg"
3226
+ size: "md"
3193
3227
  }
3194
3228
  });
3195
3229
  var SearchInput = React33.forwardRef((props, forwardedRef) => {
3196
3230
  const {
3197
3231
  placeholder = "Search...",
3198
- size = "lg",
3232
+ size = "md",
3199
3233
  disabled,
3200
3234
  className,
3201
3235
  leadingIcon,
@@ -3256,10 +3290,21 @@ SearchInput.displayName = "SearchInput";
3256
3290
  var React35 = __toESM(require("react"), 1);
3257
3291
 
3258
3292
  // src/components/Feedback/Tooltip.tsx
3259
- var React34 = require("react");
3293
+ var React34 = __toESM(require("react"), 1);
3260
3294
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
3261
3295
  var import_jsx_runtime36 = require("react/jsx-runtime");
3262
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
+ };
3263
3308
  var mapPlacementToSideAndAlign = (placement) => {
3264
3309
  switch (placement) {
3265
3310
  case "top":
@@ -3306,6 +3351,9 @@ var Tooltip = (props) => {
3306
3351
  children,
3307
3352
  delayDuration = 200
3308
3353
  } = props;
3354
+ const trigger = React34.isValidElement(children) && canAcceptRef(children) ? children : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "inline-flex", tabIndex: 0, children });
3355
+ const hasStrapline = typeof strapline === "string" ? strapline.trim() !== "" : strapline != null;
3356
+ const hasDescription = typeof description === "string" ? description.trim() !== "" : description != null;
3309
3357
  const { side, align } = mapPlacementToSideAndAlign(placement);
3310
3358
  const tooltipClasses = "group bg-(--background-tooltip) max-w-[calc(100vw-2rem)] shadow-card-md border-none rounded-4 py-1.5 px-2.5 [&>span]:scale-200 data-[state=delayed-open]:animate-in data-[state=instant-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=instant-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=instant-open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2";
3311
3359
  const tooltipArrowClasses = "relative fill-(--background-tooltip) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=bottom]:drop-shadow-[0px_1px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=left]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)] group-data-[side=right]:drop-shadow-[0px_2px_1px_color-mix(in_srgb,_var(--color-b-black-10)_66%,_transparent)]";
@@ -3318,7 +3366,7 @@ var Tooltip = (props) => {
3318
3366
  disableHoverableContent,
3319
3367
  delayDuration,
3320
3368
  children: [
3321
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Trigger, { asChild: true, children }),
3369
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Trigger, { asChild: true, children: trigger }),
3322
3370
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3323
3371
  TooltipPrimitive.Content,
3324
3372
  {
@@ -3329,9 +3377,9 @@ var Tooltip = (props) => {
3329
3377
  children: [
3330
3378
  showArrow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TooltipArrow, { className: tooltipArrowClasses }),
3331
3379
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid", children: [
3332
- (strapline ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "caption text-secondary", children: strapline }),
3380
+ hasStrapline && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "caption text-secondary", children: strapline }),
3333
3381
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "paragraph-md text-primary", children: title }),
3334
- (description ?? "") !== "" && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "paragraph-sm text-primary", children: description })
3382
+ hasDescription && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "paragraph-sm text-primary", children: description })
3335
3383
  ] })
3336
3384
  ]
3337
3385
  }
@@ -3934,7 +3982,7 @@ var inputTextVariants3 = (0, import_class_variance_authority20.cva)("truncate",
3934
3982
  }
3935
3983
  },
3936
3984
  defaultVariants: {
3937
- size: "lg"
3985
+ size: "md"
3938
3986
  }
3939
3987
  });
3940
3988
  var iconWrapperVariants4 = (0, import_class_variance_authority20.cva)(
@@ -3952,7 +4000,7 @@ var iconWrapperVariants4 = (0, import_class_variance_authority20.cva)(
3952
4000
  }
3953
4001
  },
3954
4002
  defaultVariants: {
3955
- size: "lg"
4003
+ size: "md"
3956
4004
  }
3957
4005
  }
3958
4006
  );
@@ -3962,7 +4010,7 @@ var TextInput = React37.forwardRef((props, forwardedRef) => {
3962
4010
  hint,
3963
4011
  hideHint,
3964
4012
  placeholder = "Placeholder text",
3965
- size = "lg",
4013
+ size = "md",
3966
4014
  status = "default",
3967
4015
  disabled = false,
3968
4016
  className,
@@ -4164,7 +4212,7 @@ var WebsiteInput = React39.forwardRef((props, forwardedRef) => {
4164
4212
  hierarchy = "leading",
4165
4213
  protocolLabel = "http://",
4166
4214
  icon,
4167
- size = "lg",
4215
+ size = "md",
4168
4216
  disabled,
4169
4217
  className,
4170
4218
  ...rest
@@ -4238,6 +4286,8 @@ var Popover2 = (props) => {
4238
4286
  offset = 10,
4239
4287
  children
4240
4288
  } = props;
4289
+ const hasStrapline = typeof strapline === "string" ? strapline.trim() !== "" : strapline != null;
4290
+ const hasDescription = typeof description === "string" ? description.trim() !== "" : description != null;
4241
4291
  const [open, setOpen] = React40.useState(false);
4242
4292
  const handleCancel = () => {
4243
4293
  onCancel?.();
@@ -4293,9 +4343,9 @@ var Popover2 = (props) => {
4293
4343
  showArrow && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(PopoverArrow, { className: popoverArrowClasses }),
4294
4344
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "grid gap-4", children: [
4295
4345
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "space-y-2", children: [
4296
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "caption text-secondary", children: strapline }),
4346
+ hasStrapline && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "caption text-secondary", children: strapline }),
4297
4347
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
4298
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "paragraph-sm text-primary", children: description })
4348
+ hasDescription && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: "paragraph-sm text-primary", children: description })
4299
4349
  ] }),
4300
4350
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
4301
4351
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),