@bubo-squared/ui-framework 0.1.93 → 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
@@ -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
@@ -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
  )
@@ -2093,7 +2172,7 @@ var SearchInput = (props) => {
2093
2172
  inputRef.current?.focus();
2094
2173
  };
2095
2174
  const showTrailingIcon = !!trailingIcon;
2096
- 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(
2175
+ return /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-2 items-start", children: /* @__PURE__ */ jsx30("div", { className: "relative w-full", children: /* @__PURE__ */ jsxs20(
2097
2176
  InputShell,
2098
2177
  {
2099
2178
  size,
@@ -2114,7 +2193,6 @@ var SearchInput = (props) => {
2114
2193
  className: cn(
2115
2194
  searchTextVariants({ size })
2116
2195
  ),
2117
- style: { marginBottom: 0 },
2118
2196
  ...inputProps
2119
2197
  }
2120
2198
  ),
@@ -2128,7 +2206,7 @@ SearchInput.displayName = "SearchInput";
2128
2206
  // src/components/Inputs/Slider.tsx
2129
2207
  import * as React29 from "react";
2130
2208
  import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
2131
- var wrapperBase2 = "flex flex-col gap-2 items-start min-w-[343px]";
2209
+ var wrapperBase2 = "flex flex-col gap-2 items-start";
2132
2210
  var Slider = (props) => {
2133
2211
  const {
2134
2212
  display = "flat",
@@ -2384,7 +2462,6 @@ var Slider = (props) => {
2384
2462
  "relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4)",
2385
2463
  disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-neutral)"
2386
2464
  ),
2387
- style: { marginBottom: 0 },
2388
2465
  children: [
2389
2466
  /* @__PURE__ */ jsx31(
2390
2467
  "p",
@@ -2393,7 +2470,6 @@ var Slider = (props) => {
2393
2470
  "paragraph-s",
2394
2471
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
2395
2472
  ),
2396
- style: { marginBottom: 0 },
2397
2473
  children: labelText
2398
2474
  }
2399
2475
  ),
@@ -2446,7 +2522,7 @@ var Slider = (props) => {
2446
2522
  index
2447
2523
  );
2448
2524
  };
2449
- 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: [
2450
2526
  /* @__PURE__ */ jsxs21("div", { className: "relative w-full", children: [
2451
2527
  showTooltip && primary !== void 0 && renderTooltipBubble("primary", primaryPercent, formatDisplayValue(primary)),
2452
2528
  showTooltip && type === "multi" && secondary !== void 0 && renderTooltipBubble("secondary", secondaryPercent, formatDisplayValue(secondary)),
@@ -2487,7 +2563,6 @@ var Slider = (props) => {
2487
2563
  "paragraph-s text-(--text-primary)",
2488
2564
  disabled && "text-(--text-primary-disabled)"
2489
2565
  ),
2490
- style: { marginBottom: 0 },
2491
2566
  children: formatNumericLabel()
2492
2567
  }
2493
2568
  )
@@ -2590,7 +2665,6 @@ var TextArea = (props) => {
2590
2665
  "paragraph-s",
2591
2666
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
2592
2667
  ),
2593
- style: { marginBottom: 0 },
2594
2668
  children: label
2595
2669
  }
2596
2670
  ),
@@ -2631,7 +2705,6 @@ var TextArea = (props) => {
2631
2705
  disabled ? "text-(--text-primary-disabled)" : hasValue ? "text-(--text-primary)" : "text-(--text-secondary)",
2632
2706
  showCharacterLimit && "pr-16"
2633
2707
  ),
2634
- style: { marginBottom: 0 },
2635
2708
  ...textareaProps
2636
2709
  }
2637
2710
  ),
@@ -2674,7 +2747,6 @@ var TextArea = (props) => {
2674
2747
  {
2675
2748
  id: hint ? hintId : void 0,
2676
2749
  className: cn("caption", hint ? hintColorClass : "invisible"),
2677
- style: { marginBottom: 0 },
2678
2750
  children: hint || "\xA0"
2679
2751
  }
2680
2752
  )
@@ -2718,6 +2790,7 @@ var TextInput = (props) => {
2718
2790
  const {
2719
2791
  label,
2720
2792
  hint,
2793
+ hideHint,
2721
2794
  placeholder = "Placeholder text",
2722
2795
  size = "large",
2723
2796
  status = "default",
@@ -2753,6 +2826,7 @@ var TextInput = (props) => {
2753
2826
  {
2754
2827
  label,
2755
2828
  hint,
2829
+ hideHint,
2756
2830
  status,
2757
2831
  disabled,
2758
2832
  children: /* @__PURE__ */ jsxs23(
@@ -2788,7 +2862,6 @@ var TextInput = (props) => {
2788
2862
  inputTextVariants2({ size }),
2789
2863
  "bg-transparent outline-none w-full"
2790
2864
  ),
2791
- style: { marginBottom: 0 },
2792
2865
  ...inputProps
2793
2866
  }
2794
2867
  ),
@@ -2891,7 +2964,6 @@ var Toggle = (props) => {
2891
2964
  "paragraph-s text-(--text-primary)",
2892
2965
  disabled && "text-(--text-primary-disabled)"
2893
2966
  ),
2894
- style: { marginBottom: 0 },
2895
2967
  children: label
2896
2968
  }
2897
2969
  )
@@ -2990,7 +3062,8 @@ var Popover2 = (props) => {
2990
3062
  onOk?.();
2991
3063
  setOpen(false);
2992
3064
  };
2993
- 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)]";
2994
3067
  const mapPlacementToSideAndAlign = (placement2) => {
2995
3068
  switch (placement2) {
2996
3069
  case "top":
@@ -3021,19 +3094,6 @@ var Popover2 = (props) => {
3021
3094
  return { side: "bottom", align: "center" };
3022
3095
  }
3023
3096
  };
3024
- const arrowShadowClass = (side2) => {
3025
- switch (side2) {
3026
- case "top":
3027
- return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
3028
- case "bottom":
3029
- return "drop-shadow(0px -1px 1px color-mix(in srgb, var(--color-b-black-10) 66%, transparent))";
3030
- case "left":
3031
- case "right":
3032
- return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
3033
- default:
3034
- return "";
3035
- }
3036
- };
3037
3097
  const { side, align } = mapPlacementToSideAndAlign(placement);
3038
3098
  return /* @__PURE__ */ jsxs26(Popover, { open, onOpenChange: setOpen, children: [
3039
3099
  /* @__PURE__ */ jsx36(PopoverTrigger, { asChild: true, children }),
@@ -3043,21 +3103,16 @@ var Popover2 = (props) => {
3043
3103
  side,
3044
3104
  align,
3045
3105
  sideOffset: offset,
3046
- className: cn(popoverClasses, side === "top" ? "[&_span]:bottom-1! " : "", className),
3106
+ className: cn(popoverClasses, className),
3047
3107
  children: [
3048
- showArrow && /* @__PURE__ */ jsx36(
3049
- PopoverArrow,
3050
- {
3051
- style: { filter: arrowShadowClass(side) }
3052
- }
3053
- ),
3108
+ showArrow && /* @__PURE__ */ jsx36(PopoverArrow, { className: popoverArrowClasses }),
3054
3109
  /* @__PURE__ */ jsxs26("div", { className: "grid gap-4", children: [
3055
3110
  /* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
3056
- /* @__PURE__ */ jsx36("span", { className: "caption text-secondary", style: { marginBottom: 0 }, children: strapline }),
3057
- /* @__PURE__ */ jsx36("h4", { className: "subtitle-medium text-primary", style: { marginBottom: 0 }, children: title }),
3058
- /* @__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 })
3059
3114
  ] }),
3060
- /* @__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: [
3061
3116
  /* @__PURE__ */ jsx36(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
3062
3117
  /* @__PURE__ */ jsx36(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
3063
3118
  ] })