@bubo-squared/ui-framework 0.1.92 → 0.1.94

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
@@ -76,8 +76,8 @@ var Button = React.forwardRef(
76
76
  size = "md",
77
77
  asChild = false,
78
78
  children,
79
- suffixIcon,
80
- prefixIcon,
79
+ trailingIcon,
80
+ leadingIcon,
81
81
  ...rest
82
82
  } = props;
83
83
  const Comp = asChild ? Slot : "button";
@@ -88,9 +88,9 @@ var Button = React.forwardRef(
88
88
  ref,
89
89
  ...rest,
90
90
  children: [
91
- prefixIcon && /* @__PURE__ */ jsx2("div", { className: cn(buttonIconVariants({ size })), children: prefixIcon }),
91
+ leadingIcon && /* @__PURE__ */ jsx2("div", { className: cn(buttonIconVariants({ size })), children: leadingIcon }),
92
92
  /* @__PURE__ */ jsx2("div", { className: cn(buttonTextVariants({ size })), children }),
93
- suffixIcon && /* @__PURE__ */ jsx2("div", { className: cn(buttonIconVariants({ size })), children: suffixIcon })
93
+ trailingIcon && /* @__PURE__ */ jsx2("div", { className: cn(buttonIconVariants({ size })), children: trailingIcon })
94
94
  ]
95
95
  }
96
96
  );
@@ -102,22 +102,34 @@ Button.displayName = "Button";
102
102
  import { cva as cva2 } from "class-variance-authority";
103
103
  import { jsx as jsx3 } from "react/jsx-runtime";
104
104
  var buttonGroupVariants = cva2(
105
- "flex items-center justify-center gap-4 pt-4 w-[320px] min-w-[320px]",
105
+ "flex items-center justify-center gap-4 pt-4 w-fit",
106
106
  {
107
107
  variants: {
108
- variant: {
108
+ orientation: {
109
109
  vertical: ["flex-col"],
110
110
  horizontal: ["flex-row"]
111
111
  }
112
112
  },
113
113
  defaultVariants: {
114
- variant: "horizontal"
114
+ orientation: "horizontal"
115
115
  }
116
116
  }
117
117
  );
118
118
  var ButtonGroup = (props) => {
119
- const { orientation = "horizontal" } = props;
120
- return /* @__PURE__ */ jsx3("div", { className: buttonGroupVariants({ variant: orientation }), ...props, children: props.children });
119
+ const {
120
+ orientation = "horizontal",
121
+ className,
122
+ children,
123
+ ...rest
124
+ } = props;
125
+ return /* @__PURE__ */ jsx3(
126
+ "div",
127
+ {
128
+ className: cn(buttonGroupVariants({ orientation }), className),
129
+ ...rest,
130
+ children
131
+ }
132
+ );
121
133
  };
122
134
 
123
135
  // src/components/Buttons/IconButton.tsx
@@ -294,8 +306,8 @@ var LinkButton = React4.forwardRef(
294
306
  size = "sm",
295
307
  asChild = false,
296
308
  children,
297
- suffixIcon,
298
- prefixIcon,
309
+ trailingIcon,
310
+ leadingIcon,
299
311
  ...rest
300
312
  } = props;
301
313
  const Comp = asChild ? Slot3 : "button";
@@ -306,9 +318,9 @@ var LinkButton = React4.forwardRef(
306
318
  ref,
307
319
  ...rest,
308
320
  children: [
309
- prefixIcon && /* @__PURE__ */ jsx6("div", { className: cn(linkButtonIconVariants({ size })), children: prefixIcon }),
321
+ leadingIcon && /* @__PURE__ */ jsx6("div", { className: cn(linkButtonIconVariants({ size })), children: leadingIcon }),
310
322
  /* @__PURE__ */ jsx6("div", { className: cn(linkButtonTextVariants({ size })), children }),
311
- suffixIcon && /* @__PURE__ */ jsx6("div", { className: cn(linkButtonIconVariants({ size })), children: suffixIcon })
323
+ trailingIcon && /* @__PURE__ */ jsx6("div", { className: cn(linkButtonIconVariants({ size })), children: trailingIcon })
312
324
  ]
313
325
  }
314
326
  );
@@ -456,7 +468,7 @@ var Avatar = React6.forwardRef(
456
468
  className: "w-full h-full object-cover"
457
469
  }
458
470
  ) : null,
459
- !hasImage && variant === "initial" && /* @__PURE__ */ jsx8("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), style: { marginBottom: 0 }, children: initials }),
471
+ !hasImage && variant === "initial" && /* @__PURE__ */ jsx8("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), children: initials }),
460
472
  !hasImage && variant === "icon" && /* @__PURE__ */ jsx8("span", { className: cn(avatarIconVariants({ size })), children: /* @__PURE__ */ jsx8(UserIcon, {}) })
461
473
  ]
462
474
  }
@@ -517,7 +529,6 @@ var Badge = React7.forwardRef(
517
529
  ref,
518
530
  className: cn(badgeVariants({ size, variant }), className),
519
531
  ...rest,
520
- style: { marginBottom: 0 },
521
532
  children: value ? /* @__PURE__ */ jsxs5(Fragment, { children: [
522
533
  /* @__PURE__ */ jsx9("span", { className: "font-normal", children: label }),
523
534
  /* @__PURE__ */ jsx9("span", { className: "font-normal", children: ":" }),
@@ -571,7 +582,6 @@ var BadgeDigit = React8.forwardRef(
571
582
  {
572
583
  ref,
573
584
  className: cn(badgeDigitVariants({ size, variant }), className),
574
- style: { marginBottom: 0 },
575
585
  ...rest,
576
586
  children: String(value)
577
587
  }
@@ -634,7 +644,7 @@ var BadgeStatus = React10.forwardRef(
634
644
  )
635
645
  }
636
646
  ),
637
- /* @__PURE__ */ jsx12("span", { className: textClasses, style: { marginBottom: 0 }, children: label })
647
+ /* @__PURE__ */ jsx12("span", { className: textClasses, children: label })
638
648
  ]
639
649
  }
640
650
  );
@@ -646,60 +656,128 @@ BadgeStatus.displayName = "BadgeStatus";
646
656
  import "react";
647
657
  import { TargetIcon } from "@bubo-squared/icons";
648
658
  import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
649
- var lineClass = "h-px flex-1 bg-(--border-secondary)";
659
+ var lineClassBase = "flex-1 bg-(--border-secondary) h-px";
660
+ var gapBySize = {
661
+ sm: "gap-2",
662
+ md: "gap-3",
663
+ lg: "gap-4",
664
+ xl: "gap-4"
665
+ };
666
+ var textClassBySize = {
667
+ sm: "footnote",
668
+ md: "caption",
669
+ lg: "paragraph-s",
670
+ xl: "paragraph-m"
671
+ };
650
672
  var Divider = (props) => {
651
- const { type = "line", className, ...rest } = props;
652
- const showCenter = type !== "line";
653
- const textLabel = type === "text-lines" && "label" in rest && rest.label ? rest.label : "OR";
654
- return /* @__PURE__ */ jsxs7(
655
- "div",
656
- {
657
- className: cn(
658
- "flex w-full items-center",
659
- showCenter ? "gap-2" : "gap-0",
660
- className
661
- ),
662
- ...rest,
663
- children: [
664
- /* @__PURE__ */ jsx13("div", { className: lineClass }),
665
- type === "text-lines" && /* @__PURE__ */ jsx13(
666
- "span",
667
- {
668
- className: "footnote text-(--text-secondary)",
669
- style: { marginBottom: 0 },
670
- children: textLabel
671
- }
672
- ),
673
- type === "icon-lines" && /* @__PURE__ */ jsx13(
674
- IconButton,
675
- {
676
- variant: props.type === "icon-lines" && props.iconButtonVariant ? props.iconButtonVariant : "secondary",
677
- size: "sm",
678
- "aria-label": props.type === "icon-lines" && props.ariaLabel ? props.ariaLabel : textLabel || "More options",
679
- icon: props.type === "icon-lines" ? props.icon : /* @__PURE__ */ jsx13(TargetIcon, {}),
680
- onClick: props.type === "icon-lines" ? props.onIconClick : void 0
681
- }
682
- ),
683
- type === "icon-group-lines" && (props.type === "icon-group-lines" ? /* @__PURE__ */ jsx13(
684
- IconButtonGroup,
685
- {
686
- items: props.iconGroupItems,
687
- size: props.iconGroupSize
688
- }
689
- ) : null),
690
- type === "button-lines" && /* @__PURE__ */ jsx13(
691
- Button,
692
- {
693
- variant: props.type === "button-lines" && props.buttonVariant ? props.buttonVariant : "secondary",
694
- size: "md",
695
- onClick: props.type === "button-lines" ? props.onButtonClick : void 0,
696
- children: props.type === "button-lines" ? props.buttonLabel : "Label"
697
- }
698
- ),
699
- showCenter && /* @__PURE__ */ jsx13("div", { className: lineClass })
700
- ]
701
- }
673
+ const resolvedType = props.type ?? "default";
674
+ const resolvedSize = props.size ?? "sm";
675
+ const showCenter = resolvedType !== "default";
676
+ const lineClass = lineClassBase;
677
+ const wrapperClass = cn(
678
+ "flex w-full items-center",
679
+ showCenter ? gapBySize[resolvedSize] : "gap-0",
680
+ props.className
702
681
  );
682
+ if (props.type === void 0 || props.type === "default") {
683
+ const {
684
+ type: _type,
685
+ size: _size,
686
+ label: _label,
687
+ className: _className,
688
+ ...divProps
689
+ } = props;
690
+ return /* @__PURE__ */ jsx13("div", { className: wrapperClass, ...divProps, children: /* @__PURE__ */ jsx13("div", { className: lineClass }) });
691
+ }
692
+ if (props.type === "text") {
693
+ const {
694
+ type: _type,
695
+ size: _size,
696
+ label,
697
+ className: _className,
698
+ ...divProps
699
+ } = props;
700
+ const textLabel = label ? label : "OR";
701
+ return /* @__PURE__ */ jsxs7("div", { className: wrapperClass, ...divProps, children: [
702
+ /* @__PURE__ */ jsx13("div", { className: lineClass }),
703
+ /* @__PURE__ */ jsx13(
704
+ "span",
705
+ {
706
+ className: cn(
707
+ textClassBySize[resolvedSize],
708
+ "text-(--text-secondary)"
709
+ ),
710
+ children: textLabel
711
+ }
712
+ ),
713
+ /* @__PURE__ */ jsx13("div", { className: lineClass })
714
+ ] });
715
+ }
716
+ if (props.type === "iconButton") {
717
+ const {
718
+ type: _type,
719
+ size: _size,
720
+ icon,
721
+ iconButtonVariant,
722
+ onIconClick,
723
+ ariaLabel,
724
+ className: _className,
725
+ ...divProps
726
+ } = props;
727
+ return /* @__PURE__ */ jsxs7("div", { className: wrapperClass, ...divProps, children: [
728
+ /* @__PURE__ */ jsx13("div", { className: lineClass }),
729
+ /* @__PURE__ */ jsx13(
730
+ IconButton,
731
+ {
732
+ variant: iconButtonVariant ?? "secondary",
733
+ size: resolvedSize,
734
+ "aria-label": ariaLabel ?? "More options",
735
+ icon: icon ?? /* @__PURE__ */ jsx13(TargetIcon, {}),
736
+ onClick: onIconClick
737
+ }
738
+ ),
739
+ /* @__PURE__ */ jsx13("div", { className: lineClass })
740
+ ] });
741
+ }
742
+ if (props.type === "iconButtonGroup") {
743
+ const {
744
+ type: _type,
745
+ size: _size,
746
+ iconGroupItems,
747
+ className: _className,
748
+ ...divProps
749
+ } = props;
750
+ return /* @__PURE__ */ jsxs7("div", { className: wrapperClass, ...divProps, children: [
751
+ /* @__PURE__ */ jsx13("div", { className: lineClass }),
752
+ /* @__PURE__ */ jsx13(IconButtonGroup, { items: iconGroupItems, size: resolvedSize }),
753
+ /* @__PURE__ */ jsx13("div", { className: lineClass })
754
+ ] });
755
+ }
756
+ if (props.type === "button") {
757
+ const {
758
+ type: _type,
759
+ size: _size,
760
+ buttonLabel,
761
+ onButtonClick,
762
+ buttonVariant,
763
+ className: _className,
764
+ ...divProps
765
+ } = props;
766
+ return /* @__PURE__ */ jsxs7("div", { className: wrapperClass, ...divProps, children: [
767
+ /* @__PURE__ */ jsx13("div", { className: lineClass }),
768
+ /* @__PURE__ */ jsx13(
769
+ Button,
770
+ {
771
+ variant: buttonVariant ?? "secondary",
772
+ size: resolvedSize,
773
+ onClick: onButtonClick,
774
+ children: buttonLabel
775
+ }
776
+ ),
777
+ /* @__PURE__ */ jsx13("div", { className: lineClass })
778
+ ] });
779
+ }
780
+ return null;
703
781
  };
704
782
  Divider.displayName = "Divider";
705
783
 
@@ -739,8 +817,8 @@ var Progress = React12.forwardRef(
739
817
  ...rest,
740
818
  children: [
741
819
  showLabel && label && /* @__PURE__ */ jsxs8("div", { className: "flex w-full items-center justify-between", children: [
742
- /* @__PURE__ */ jsx14("span", { className: "paragraph-s-bold text-(--text-primary)", style: { marginBottom: 0 }, children: label }),
743
- /* @__PURE__ */ jsx14("span", { className: "footnote text-(--text-secondary)", style: { marginBottom: 0 }, children: percentageLabel })
820
+ /* @__PURE__ */ jsx14("span", { className: "paragraph-s-bold text-(--text-primary)", children: label }),
821
+ /* @__PURE__ */ jsx14("span", { className: "footnote text-(--text-secondary)", children: percentageLabel })
744
822
  ] }),
745
823
  /* @__PURE__ */ jsx14("div", { className: cn("w-full bg-(--chart-mono) overflow-hidden", barHeightClasses), children: /* @__PURE__ */ jsx14(
746
824
  "div",
@@ -752,7 +830,7 @@ var Progress = React12.forwardRef(
752
830
  style: { width: `${clamped}%` }
753
831
  }
754
832
  ) }),
755
- showHint && hint && /* @__PURE__ */ jsx14("p", { className: "caption text-(--text-secondary)", style: { marginBottom: 0 }, children: hint })
833
+ showHint && hint && /* @__PURE__ */ jsx14("p", { className: "caption text-(--text-secondary)", children: hint })
756
834
  ]
757
835
  }
758
836
  );
@@ -916,7 +994,7 @@ function Checkbox({ label, className, ...props }) {
916
994
  ] })
917
995
  }
918
996
  ),
919
- label && /* @__PURE__ */ jsx17("span", { className: "paragraph-m-medium text-(--text-primary)", style: { marginBottom: 0 }, children: label })
997
+ label && /* @__PURE__ */ jsx17("span", { className: "paragraph-m-medium text-(--text-primary)", children: label })
920
998
  ] });
921
999
  }
922
1000
 
@@ -925,7 +1003,7 @@ import * as React16 from "react";
925
1003
  import { cva as cva12 } from "class-variance-authority";
926
1004
  import { ChevronDownIcon } from "@bubo-squared/icons";
927
1005
  import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
928
- var dropdownWrapperBase = "flex flex-col gap-2 items-start min-w-[343px]";
1006
+ var dropdownWrapperBase = "flex flex-col gap-2 items-start";
929
1007
  var dropdownTriggerVariants = cva12(
930
1008
  "group flex w-full items-center justify-between rounded-4 border bg-(--background-primary) px-3 py-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-(--text-primary-disabled) disabled:cursor-default",
931
1009
  {
@@ -986,7 +1064,7 @@ var Dropdown = (props) => {
986
1064
  label = "Field Label",
987
1065
  showLabel = true,
988
1066
  hint = "This is a hint text to help user.",
989
- showHint = true,
1067
+ hideHint = false,
990
1068
  placeholder = "Placeholder text",
991
1069
  size = "large",
992
1070
  status = "default",
@@ -1050,7 +1128,6 @@ var Dropdown = (props) => {
1050
1128
  "paragraph-s",
1051
1129
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
1052
1130
  ),
1053
- style: { marginBottom: 0 },
1054
1131
  children: label
1055
1132
  }
1056
1133
  ),
@@ -1063,7 +1140,7 @@ var Dropdown = (props) => {
1063
1140
  "aria-haspopup": "listbox",
1064
1141
  "aria-expanded": isOpen,
1065
1142
  "aria-labelledby": showLabel ? labelId : void 0,
1066
- "aria-describedby": showHint ? hintId : void 0,
1143
+ "aria-describedby": !hideHint ? hintId : void 0,
1067
1144
  disabled,
1068
1145
  className: cn(
1069
1146
  dropdownTriggerVariants({ size, status }),
@@ -1083,7 +1160,6 @@ var Dropdown = (props) => {
1083
1160
  disabled: !!disabled
1084
1161
  })
1085
1162
  ),
1086
- style: { marginBottom: 0 },
1087
1163
  children: hasValue ? selectedOption?.label : placeholder
1088
1164
  }
1089
1165
  ),
@@ -1113,7 +1189,6 @@ var Dropdown = (props) => {
1113
1189
  {
1114
1190
  type: "button",
1115
1191
  className: "flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) py-(--space-8) text-left paragraph-l text-(--text-primary) hover:bg-(--background-secondary)",
1116
- style: { marginBottom: 0 },
1117
1192
  role: "option",
1118
1193
  "aria-selected": selected,
1119
1194
  onClick: () => handleSelect(opt.value),
@@ -1125,7 +1200,7 @@ var Dropdown = (props) => {
1125
1200
  );
1126
1201
  }) }) })
1127
1202
  ] }),
1128
- showHint && /* @__PURE__ */ jsx18(
1203
+ !hideHint && /* @__PURE__ */ jsx18(
1129
1204
  "p",
1130
1205
  {
1131
1206
  id: hintId,
@@ -1133,7 +1208,6 @@ var Dropdown = (props) => {
1133
1208
  "caption",
1134
1209
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-secondary)"
1135
1210
  ),
1136
- style: { marginBottom: 0 },
1137
1211
  children: hint
1138
1212
  }
1139
1213
  )
@@ -1144,11 +1218,12 @@ Dropdown.displayName = "Dropdown";
1144
1218
  // src/components/Inputs/Field.tsx
1145
1219
  import * as React17 from "react";
1146
1220
  import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
1147
- var fieldBase = "flex flex-col gap-2 items-start min-w-[343px]";
1221
+ var fieldBase = "flex flex-col gap-2 items-start";
1148
1222
  var Field = (props) => {
1149
1223
  const {
1150
1224
  label,
1151
1225
  hint,
1226
+ hideHint,
1152
1227
  status = "default",
1153
1228
  disabled,
1154
1229
  className,
@@ -1165,17 +1240,15 @@ var Field = (props) => {
1165
1240
  {
1166
1241
  id: labelId,
1167
1242
  className: cn("paragraph-s", labelColorClass),
1168
- style: { marginBottom: 0 },
1169
1243
  children: label
1170
1244
  }
1171
1245
  ),
1172
1246
  /* @__PURE__ */ jsx19("div", { className: "relative w-full", children }),
1173
- /* @__PURE__ */ jsx19(
1247
+ !hideHint && /* @__PURE__ */ jsx19(
1174
1248
  "p",
1175
1249
  {
1176
1250
  id: hint ? hintId : void 0,
1177
1251
  className: cn("caption", hint ? hintColorClass : "invisible"),
1178
- style: { marginBottom: 0 },
1179
1252
  children: hint || "\xA0"
1180
1253
  }
1181
1254
  )
@@ -1314,6 +1387,7 @@ var PasswordInput = (props) => {
1314
1387
  const {
1315
1388
  label,
1316
1389
  hint,
1390
+ hideHint,
1317
1391
  placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
1318
1392
  size = "large",
1319
1393
  status = "default",
@@ -1353,6 +1427,7 @@ var PasswordInput = (props) => {
1353
1427
  {
1354
1428
  label,
1355
1429
  hint,
1430
+ hideHint,
1356
1431
  status,
1357
1432
  disabled,
1358
1433
  children: /* @__PURE__ */ jsxs14(
@@ -1387,7 +1462,6 @@ var PasswordInput = (props) => {
1387
1462
  className: cn(
1388
1463
  passwordTextVariants({ size, disabled: !!disabled })
1389
1464
  ),
1390
- style: { marginBottom: 0 },
1391
1465
  ...inputProps
1392
1466
  }
1393
1467
  ),
@@ -1404,7 +1478,6 @@ var PasswordInput = (props) => {
1404
1478
  "button",
1405
1479
  {
1406
1480
  type: "button",
1407
- style: { marginBottom: 0 },
1408
1481
  className: cn(
1409
1482
  actionButtonVariants({ size, disabled: !!disabled })
1410
1483
  ),
@@ -1729,6 +1802,7 @@ var PhoneInput = React26.forwardRef(
1729
1802
  value,
1730
1803
  label,
1731
1804
  hint,
1805
+ hideHint,
1732
1806
  placeholder,
1733
1807
  size = "large",
1734
1808
  disabled = false,
@@ -1740,6 +1814,7 @@ var PhoneInput = React26.forwardRef(
1740
1814
  {
1741
1815
  label,
1742
1816
  hint,
1817
+ hideHint,
1743
1818
  status,
1744
1819
  disabled,
1745
1820
  className,
@@ -1751,7 +1826,6 @@ var PhoneInput = React26.forwardRef(
1751
1826
  sizeBase({ size }),
1752
1827
  inputTextVariants({ size, disabled })
1753
1828
  ),
1754
- style: { marginBottom: 0 },
1755
1829
  flagComponent: FlagComponent,
1756
1830
  countrySelectComponent: CountrySelect,
1757
1831
  inputComponent: InputComponent,
@@ -1829,44 +1903,51 @@ var CountrySelect = ({
1829
1903
  ]
1830
1904
  }
1831
1905
  ) }),
1832
- /* @__PURE__ */ jsx28(PopoverContent, { className: "w-[300px] p-0 relative left-4.5 bg-(--background-primary) shadow-card-md rounded-4 border-none outline-1 outline-solid outline-(--border-primary-hover) **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)", children: /* @__PURE__ */ jsxs18(Command, { children: [
1833
- /* @__PURE__ */ jsx28(
1834
- CommandInput,
1835
- {
1836
- value: searchValue,
1837
- onValueChange: (value) => {
1838
- setSearchValue(value);
1839
- setTimeout(() => {
1840
- if (scrollAreaRef.current) {
1841
- const viewportElement = scrollAreaRef.current.querySelector(
1842
- "[data-radix-scroll-area-viewport]"
1843
- );
1844
- if (viewportElement) {
1845
- viewportElement.scrollTop = 0;
1846
- }
1847
- }
1848
- }, 0);
1849
- },
1850
- placeholder: "Search country..."
1851
- }
1852
- ),
1853
- /* @__PURE__ */ jsx28(CommandList, { children: /* @__PURE__ */ jsxs18(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
1854
- /* @__PURE__ */ jsx28(CommandEmpty, { children: "No country found." }),
1855
- /* @__PURE__ */ jsx28(CommandGroup, { className: "[&>div>div]:pl-4 [&>div>div]:pr-2 [&>div>div]:py-2 [&>div>div]:border-b [&>div>div]:border-b-(--border-secondary) [&>div>div]:cursor-pointer [&>div>div]:hover:bg-(--background-primary-hover) [&>div>div]:text-(--text-primary) [&>div>div]:hover:text-(--text-primary) p-0 pr-4", children: countryList.map(
1856
- ({ value, label }) => value ? /* @__PURE__ */ jsx28(
1857
- CountrySelectOption,
1906
+ /* @__PURE__ */ jsx28(
1907
+ PopoverContent,
1908
+ {
1909
+ align: "start",
1910
+ className: "p-0 bg-(--background-primary) shadow-card-md rounded-4 border-none outline-1 outline-solid outline-(--border-primary-hover) **:data-[slot='command-input-wrapper']:border-b-(--border-secondary)",
1911
+ children: /* @__PURE__ */ jsxs18(Command, { children: [
1912
+ /* @__PURE__ */ jsx28(
1913
+ CommandInput,
1858
1914
  {
1859
- country: value,
1860
- countryName: label,
1861
- selectedCountry,
1862
- onChange,
1863
- onSelectComplete: () => setIsOpen(false)
1864
- },
1865
- value
1866
- ) : null
1867
- ) })
1868
- ] }) })
1869
- ] }) })
1915
+ value: searchValue,
1916
+ onValueChange: (value) => {
1917
+ setSearchValue(value);
1918
+ setTimeout(() => {
1919
+ if (scrollAreaRef.current) {
1920
+ const viewportElement = scrollAreaRef.current.querySelector(
1921
+ "[data-radix-scroll-area-viewport]"
1922
+ );
1923
+ if (viewportElement) {
1924
+ viewportElement.scrollTop = 0;
1925
+ }
1926
+ }
1927
+ }, 0);
1928
+ },
1929
+ placeholder: "Search country..."
1930
+ }
1931
+ ),
1932
+ /* @__PURE__ */ jsx28(CommandList, { children: /* @__PURE__ */ jsxs18(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
1933
+ /* @__PURE__ */ jsx28(CommandEmpty, { children: "No country found." }),
1934
+ /* @__PURE__ */ jsx28(CommandGroup, { className: "[&>div>div]:pl-4 [&>div>div]:pr-2 [&>div>div]:py-2 [&>div>div]:border-b [&>div>div]:border-b-(--border-secondary) [&>div>div]:cursor-pointer [&>div>div]:hover:bg-(--background-primary-hover) [&>div>div]:text-(--text-primary) [&>div>div]:hover:text-(--text-primary) p-0 pr-4", children: countryList.map(
1935
+ ({ value, label }) => value ? /* @__PURE__ */ jsx28(
1936
+ CountrySelectOption,
1937
+ {
1938
+ country: value,
1939
+ countryName: label,
1940
+ selectedCountry,
1941
+ onChange,
1942
+ onSelectComplete: () => setIsOpen(false)
1943
+ },
1944
+ value
1945
+ ) : null
1946
+ ) })
1947
+ ] }) })
1948
+ ] })
1949
+ }
1950
+ )
1870
1951
  ]
1871
1952
  }
1872
1953
  );
@@ -1915,6 +1996,7 @@ var wrapperBase = "flex flex-col gap-2 items-start";
1915
1996
  var RadioGroup = ({
1916
1997
  label,
1917
1998
  hint,
1999
+ hideHint,
1918
2000
  options,
1919
2001
  orientation = "vertical",
1920
2002
  disabled = false,
@@ -1938,7 +2020,6 @@ var RadioGroup = ({
1938
2020
  "paragraph-s text-(--text-primary)",
1939
2021
  disabled && "text-(--text-primary-disabled)"
1940
2022
  ),
1941
- style: { marginBottom: 0 },
1942
2023
  children: label
1943
2024
  }
1944
2025
  ),
@@ -2019,7 +2100,6 @@ var RadioGroup = ({
2019
2100
  "paragraph-s text-(--text-primary)",
2020
2101
  "group-data-[disabled]:text-(--text-primary-disabled) whitespace-nowrap"
2021
2102
  ),
2022
- style: { marginBottom: 0 },
2023
2103
  children: option.label
2024
2104
  }
2025
2105
  )
@@ -2031,7 +2111,7 @@ var RadioGroup = ({
2031
2111
  ))
2032
2112
  }
2033
2113
  ),
2034
- /* @__PURE__ */ jsx29(
2114
+ !hideHint && /* @__PURE__ */ jsx29(
2035
2115
  "p",
2036
2116
  {
2037
2117
  id: hintId,
@@ -2039,7 +2119,6 @@ var RadioGroup = ({
2039
2119
  "caption text-(--text-secondary)",
2040
2120
  disabled && "text-(--text-primary-disabled)"
2041
2121
  ),
2042
- style: { marginBottom: 0 },
2043
2122
  children: hint ?? "\xA0"
2044
2123
  }
2045
2124
  )
@@ -2084,6 +2163,7 @@ var SearchInput = (props) => {
2084
2163
  className,
2085
2164
  leadingIcon,
2086
2165
  showLeadingIcon = true,
2166
+ trailingIcon,
2087
2167
  ...inputProps
2088
2168
  } = props;
2089
2169
  const inputRef = React28.useRef(null);
@@ -2091,7 +2171,8 @@ var SearchInput = (props) => {
2091
2171
  if (disabled) return;
2092
2172
  inputRef.current?.focus();
2093
2173
  };
2094
- return /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-2 items-start min-w-[343px]", children: /* @__PURE__ */ jsx30("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs20(
2174
+ const showTrailingIcon = !!trailingIcon;
2175
+ return /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-2 items-start", children: /* @__PURE__ */ jsx30("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs20(
2095
2176
  InputShell,
2096
2177
  {
2097
2178
  size,
@@ -2112,10 +2193,10 @@ var SearchInput = (props) => {
2112
2193
  className: cn(
2113
2194
  searchTextVariants({ size })
2114
2195
  ),
2115
- style: { marginBottom: 0 },
2116
2196
  ...inputProps
2117
2197
  }
2118
- )
2198
+ ),
2199
+ showTrailingIcon && /* @__PURE__ */ jsx30("span", { className: cn("cursor-pointer", iconWrapperVariants2({ size, disabled: !!disabled })), children: trailingIcon })
2119
2200
  ]
2120
2201
  }
2121
2202
  ) }) });
@@ -2125,7 +2206,7 @@ SearchInput.displayName = "SearchInput";
2125
2206
  // src/components/Inputs/Slider.tsx
2126
2207
  import * as React29 from "react";
2127
2208
  import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
2128
- var wrapperBase2 = "flex flex-col gap-2 items-start min-w-[343px]";
2209
+ var wrapperBase2 = "flex flex-col gap-2 items-start";
2129
2210
  var Slider = (props) => {
2130
2211
  const {
2131
2212
  display = "flat",
@@ -2381,7 +2462,6 @@ var Slider = (props) => {
2381
2462
  "relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4)",
2382
2463
  disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-neutral)"
2383
2464
  ),
2384
- style: { marginBottom: 0 },
2385
2465
  children: [
2386
2466
  /* @__PURE__ */ jsx31(
2387
2467
  "p",
@@ -2390,7 +2470,6 @@ var Slider = (props) => {
2390
2470
  "paragraph-s",
2391
2471
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
2392
2472
  ),
2393
- style: { marginBottom: 0 },
2394
2473
  children: labelText
2395
2474
  }
2396
2475
  ),
@@ -2443,7 +2522,7 @@ var Slider = (props) => {
2443
2522
  index
2444
2523
  );
2445
2524
  };
2446
- return /* @__PURE__ */ jsx31("div", { className: wrapperBase2, children: /* @__PURE__ */ jsxs21("div", { className: cn("w-[354px] flex flex-col gap-1", className), children: [
2525
+ return /* @__PURE__ */ jsx31("div", { className: wrapperBase2, children: /* @__PURE__ */ jsxs21("div", { className: cn("w-full flex flex-col gap-1", className), children: [
2447
2526
  /* @__PURE__ */ jsxs21("div", { className: "relative w-full", children: [
2448
2527
  showTooltip && primary !== void 0 && renderTooltipBubble("primary", primaryPercent, formatDisplayValue(primary)),
2449
2528
  showTooltip && type === "multi" && secondary !== void 0 && renderTooltipBubble("secondary", secondaryPercent, formatDisplayValue(secondary)),
@@ -2484,7 +2563,6 @@ var Slider = (props) => {
2484
2563
  "paragraph-s text-(--text-primary)",
2485
2564
  disabled && "text-(--text-primary-disabled)"
2486
2565
  ),
2487
- style: { marginBottom: 0 },
2488
2566
  children: formatNumericLabel()
2489
2567
  }
2490
2568
  )
@@ -2587,7 +2665,6 @@ var TextArea = (props) => {
2587
2665
  "paragraph-s",
2588
2666
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
2589
2667
  ),
2590
- style: { marginBottom: 0 },
2591
2668
  children: label
2592
2669
  }
2593
2670
  ),
@@ -2628,7 +2705,6 @@ var TextArea = (props) => {
2628
2705
  disabled ? "text-(--text-primary-disabled)" : hasValue ? "text-(--text-primary)" : "text-(--text-secondary)",
2629
2706
  showCharacterLimit && "pr-16"
2630
2707
  ),
2631
- style: { marginBottom: 0 },
2632
2708
  ...textareaProps
2633
2709
  }
2634
2710
  ),
@@ -2671,7 +2747,6 @@ var TextArea = (props) => {
2671
2747
  {
2672
2748
  id: hint ? hintId : void 0,
2673
2749
  className: cn("caption", hint ? hintColorClass : "invisible"),
2674
- style: { marginBottom: 0 },
2675
2750
  children: hint || "\xA0"
2676
2751
  }
2677
2752
  )
@@ -2715,6 +2790,7 @@ var TextInput = (props) => {
2715
2790
  const {
2716
2791
  label,
2717
2792
  hint,
2793
+ hideHint,
2718
2794
  placeholder = "Placeholder text",
2719
2795
  size = "large",
2720
2796
  status = "default",
@@ -2750,6 +2826,7 @@ var TextInput = (props) => {
2750
2826
  {
2751
2827
  label,
2752
2828
  hint,
2829
+ hideHint,
2753
2830
  status,
2754
2831
  disabled,
2755
2832
  children: /* @__PURE__ */ jsxs23(
@@ -2785,7 +2862,6 @@ var TextInput = (props) => {
2785
2862
  inputTextVariants2({ size }),
2786
2863
  "bg-transparent outline-none w-full"
2787
2864
  ),
2788
- style: { marginBottom: 0 },
2789
2865
  ...inputProps
2790
2866
  }
2791
2867
  ),
@@ -2888,7 +2964,6 @@ var Toggle = (props) => {
2888
2964
  "paragraph-s text-(--text-primary)",
2889
2965
  disabled && "text-(--text-primary-disabled)"
2890
2966
  ),
2891
- style: { marginBottom: 0 },
2892
2967
  children: label
2893
2968
  }
2894
2969
  )
@@ -2903,7 +2978,7 @@ import "react";
2903
2978
  import { jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
2904
2979
  var WebsiteInput = (props) => {
2905
2980
  const {
2906
- hierarchy = "prefix",
2981
+ hierarchy = "leading",
2907
2982
  protocolLabel = "http://",
2908
2983
  icon,
2909
2984
  size = "large",
@@ -2911,7 +2986,7 @@ var WebsiteInput = (props) => {
2911
2986
  className,
2912
2987
  ...rest
2913
2988
  } = props;
2914
- const isPrefix = hierarchy === "prefix";
2989
+ const isLeading = hierarchy === "leading";
2915
2990
  const baseClass = cn(
2916
2991
  "[&>span]:w-[unset] hover:bg-[unset]",
2917
2992
  !disabled && "[&:not(:focus-within):hover]:shadow-[0_0_0_var(--focus-ring-spread)_var(--background-secondary-hover)]",
@@ -2929,18 +3004,18 @@ var WebsiteInput = (props) => {
2929
3004
  "border-(--border-secondary)",
2930
3005
  // divider color
2931
3006
  disabled && "border-(--border-secondary-disabled) hover:border-(--border-secondary-disabled)",
2932
- isPrefix ? "border-r" : "border-l"
3007
+ isLeading ? "border-r" : "border-l"
2933
3008
  );
2934
3009
  const iconWrapperClass = cn(
2935
3010
  "flex items-center justify-center shrink-0",
2936
3011
  size === "extra-large" ? "[&>svg]:w-6 [&>svg]:h-6" : "[&>svg]:w-5 [&>svg]:h-5",
2937
3012
  disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
2938
3013
  );
2939
- const prefixAddon = /* @__PURE__ */ jsxs25("div", { className: baseAddonClass, children: [
3014
+ const leadingAddon = /* @__PURE__ */ jsxs25("div", { className: baseAddonClass, children: [
2940
3015
  /* @__PURE__ */ jsx35("div", { className: addonTextClass, children: protocolLabel }),
2941
3016
  icon != null && /* @__PURE__ */ jsx35("span", { className: iconWrapperClass, children: icon })
2942
3017
  ] });
2943
- const suffixAddon = /* @__PURE__ */ jsxs25("div", { className: baseAddonClass, children: [
3018
+ const trailingAddon = /* @__PURE__ */ jsxs25("div", { className: baseAddonClass, children: [
2944
3019
  icon != null && /* @__PURE__ */ jsx35("span", { className: iconWrapperClass, children: icon }),
2945
3020
  /* @__PURE__ */ jsx35("div", { className: addonTextClass, children: protocolLabel })
2946
3021
  ] });
@@ -2951,8 +3026,8 @@ var WebsiteInput = (props) => {
2951
3026
  size,
2952
3027
  disabled,
2953
3028
  className: cn(baseClass, className),
2954
- leadingIcon: isPrefix ? prefixAddon : void 0,
2955
- trailingIcon: !isPrefix ? suffixAddon : void 0
3029
+ leadingIcon: isLeading ? leadingAddon : void 0,
3030
+ trailingIcon: !isLeading ? trailingAddon : void 0
2956
3031
  }
2957
3032
  );
2958
3033
  };
@@ -2987,7 +3062,8 @@ var Popover2 = (props) => {
2987
3062
  onOk?.();
2988
3063
  setOpen(false);
2989
3064
  };
2990
- const popoverClasses = "bg-(--background-popover) fill-(--background-popover) popover w-80 shadow-card-md border-none [&_span]:scale-240 rounded-4";
3065
+ const popoverClasses = "group bg-(--background-popover) popover w-80 max-w-[calc(100vw-2rem)] shadow-card-md border-none [&_span]:scale-240 rounded-4";
3066
+ const popoverArrowClasses = "relative fill-(--background-popover) transition-[filter,transform] group-data-[side=top]:top-[-2px] group-data-[side=top]:drop-shadow-[0px_2px_1px_var(--color-b-black-12)] 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_var(--color-b-black-12)] group-data-[side=right]:drop-shadow-[0px_2px_1px_var(--color-b-black-12)]";
2991
3067
  const mapPlacementToSideAndAlign = (placement2) => {
2992
3068
  switch (placement2) {
2993
3069
  case "top":
@@ -3018,19 +3094,6 @@ var Popover2 = (props) => {
3018
3094
  return { side: "bottom", align: "center" };
3019
3095
  }
3020
3096
  };
3021
- const arrowShadowClass = (side2) => {
3022
- switch (side2) {
3023
- case "top":
3024
- return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
3025
- case "bottom":
3026
- return "drop-shadow(0px -1px 1px color-mix(in srgb, var(--color-b-black-10) 66%, transparent))";
3027
- case "left":
3028
- case "right":
3029
- return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
3030
- default:
3031
- return "";
3032
- }
3033
- };
3034
3097
  const { side, align } = mapPlacementToSideAndAlign(placement);
3035
3098
  return /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
3036
3099
  /* @__PURE__ */ jsx36(PopoverTrigger, { asChild: true, children }),
@@ -3040,21 +3103,16 @@ var Popover2 = (props) => {
3040
3103
  side,
3041
3104
  align,
3042
3105
  sideOffset: offset,
3043
- className: cn(popoverClasses, side === "top" ? "[&_span]:bottom-1! " : "", className),
3106
+ className: cn(popoverClasses, className),
3044
3107
  children: [
3045
- showArrow && /* @__PURE__ */ jsx36(
3046
- PopoverArrow,
3047
- {
3048
- style: { filter: arrowShadowClass(side) }
3049
- }
3050
- ),
3108
+ showArrow && /* @__PURE__ */ jsx36(PopoverArrow, { className: popoverArrowClasses }),
3051
3109
  /* @__PURE__ */ jsxs26("div", { className: "grid gap-4", children: [
3052
3110
  /* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
3053
- /* @__PURE__ */ jsx36("span", { className: "caption text-secondary", style: { marginBottom: 0 }, children: strapline }),
3054
- /* @__PURE__ */ jsx36("h4", { className: "subtitle-medium text-primary", style: { marginBottom: 0 }, children: title }),
3055
- /* @__PURE__ */ jsx36("p", { className: "paragraph-s text-primary", style: { marginBottom: 0 }, children: description })
3111
+ /* @__PURE__ */ jsx36("span", { className: "caption text-secondary", children: strapline }),
3112
+ /* @__PURE__ */ jsx36("h4", { className: "subtitle-medium text-primary", children: title }),
3113
+ /* @__PURE__ */ jsx36("p", { className: "paragraph-s text-primary", children: description })
3056
3114
  ] }),
3057
- /* @__PURE__ */ jsxs26("div", { className: "flex justify-start items-center gap-4", children: [
3115
+ /* @__PURE__ */ jsxs26("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
3058
3116
  /* @__PURE__ */ jsx36(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
3059
3117
  /* @__PURE__ */ jsx36(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
3060
3118
  ] })