@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.cjs CHANGED
@@ -143,8 +143,8 @@ var Button = React.forwardRef(
143
143
  size = "md",
144
144
  asChild = false,
145
145
  children,
146
- suffixIcon,
147
- prefixIcon,
146
+ trailingIcon,
147
+ leadingIcon,
148
148
  ...rest
149
149
  } = props;
150
150
  const Comp = asChild ? import_react_slot.Slot : "button";
@@ -155,9 +155,9 @@ var Button = React.forwardRef(
155
155
  ref,
156
156
  ...rest,
157
157
  children: [
158
- prefixIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(buttonIconVariants({ size })), children: prefixIcon }),
158
+ leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(buttonIconVariants({ size })), children: leadingIcon }),
159
159
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(buttonTextVariants({ size })), children }),
160
- suffixIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(buttonIconVariants({ size })), children: suffixIcon })
160
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: cn(buttonIconVariants({ size })), children: trailingIcon })
161
161
  ]
162
162
  }
163
163
  );
@@ -169,22 +169,34 @@ Button.displayName = "Button";
169
169
  var import_class_variance_authority2 = require("class-variance-authority");
170
170
  var import_jsx_runtime3 = require("react/jsx-runtime");
171
171
  var buttonGroupVariants = (0, import_class_variance_authority2.cva)(
172
- "flex items-center justify-center gap-4 pt-4 w-[320px] min-w-[320px]",
172
+ "flex items-center justify-center gap-4 pt-4 w-fit",
173
173
  {
174
174
  variants: {
175
- variant: {
175
+ orientation: {
176
176
  vertical: ["flex-col"],
177
177
  horizontal: ["flex-row"]
178
178
  }
179
179
  },
180
180
  defaultVariants: {
181
- variant: "horizontal"
181
+ orientation: "horizontal"
182
182
  }
183
183
  }
184
184
  );
185
185
  var ButtonGroup = (props) => {
186
- const { orientation = "horizontal" } = props;
187
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: buttonGroupVariants({ variant: orientation }), ...props, children: props.children });
186
+ const {
187
+ orientation = "horizontal",
188
+ className,
189
+ children,
190
+ ...rest
191
+ } = props;
192
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
193
+ "div",
194
+ {
195
+ className: cn(buttonGroupVariants({ orientation }), className),
196
+ ...rest,
197
+ children
198
+ }
199
+ );
188
200
  };
189
201
 
190
202
  // src/components/Buttons/IconButton.tsx
@@ -361,8 +373,8 @@ var LinkButton = React4.forwardRef(
361
373
  size = "sm",
362
374
  asChild = false,
363
375
  children,
364
- suffixIcon,
365
- prefixIcon,
376
+ trailingIcon,
377
+ leadingIcon,
366
378
  ...rest
367
379
  } = props;
368
380
  const Comp = asChild ? import_react_slot3.Slot : "button";
@@ -373,9 +385,9 @@ var LinkButton = React4.forwardRef(
373
385
  ref,
374
386
  ...rest,
375
387
  children: [
376
- prefixIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn(linkButtonIconVariants({ size })), children: prefixIcon }),
388
+ leadingIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn(linkButtonIconVariants({ size })), children: leadingIcon }),
377
389
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn(linkButtonTextVariants({ size })), children }),
378
- suffixIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn(linkButtonIconVariants({ size })), children: suffixIcon })
390
+ trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: cn(linkButtonIconVariants({ size })), children: trailingIcon })
379
391
  ]
380
392
  }
381
393
  );
@@ -523,7 +535,7 @@ var Avatar = React6.forwardRef(
523
535
  className: "w-full h-full object-cover"
524
536
  }
525
537
  ) : null,
526
- !hasImage && variant === "initial" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), style: { marginBottom: 0 }, children: initials }),
538
+ !hasImage && variant === "initial" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn(avatarInitialsVariants({ size }), "relative bottom-px"), children: initials }),
527
539
  !hasImage && variant === "icon" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: cn(avatarIconVariants({ size })), children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_icons.UserIcon, {}) })
528
540
  ]
529
541
  }
@@ -584,7 +596,6 @@ var Badge = React7.forwardRef(
584
596
  ref,
585
597
  className: cn(badgeVariants({ size, variant }), className),
586
598
  ...rest,
587
- style: { marginBottom: 0 },
588
599
  children: value ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
589
600
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-normal", children: label }),
590
601
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-normal", children: ":" }),
@@ -638,7 +649,6 @@ var BadgeDigit = React8.forwardRef(
638
649
  {
639
650
  ref,
640
651
  className: cn(badgeDigitVariants({ size, variant }), className),
641
- style: { marginBottom: 0 },
642
652
  ...rest,
643
653
  children: String(value)
644
654
  }
@@ -701,7 +711,7 @@ var BadgeStatus = React10.forwardRef(
701
711
  )
702
712
  }
703
713
  ),
704
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: textClasses, style: { marginBottom: 0 }, children: label })
714
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: textClasses, children: label })
705
715
  ]
706
716
  }
707
717
  );
@@ -713,60 +723,128 @@ BadgeStatus.displayName = "BadgeStatus";
713
723
  var React11 = require("react");
714
724
  var import_icons2 = require("@bubo-squared/icons");
715
725
  var import_jsx_runtime13 = require("react/jsx-runtime");
716
- var lineClass = "h-px flex-1 bg-(--border-secondary)";
726
+ var lineClassBase = "flex-1 bg-(--border-secondary) h-px";
727
+ var gapBySize = {
728
+ sm: "gap-2",
729
+ md: "gap-3",
730
+ lg: "gap-4",
731
+ xl: "gap-4"
732
+ };
733
+ var textClassBySize = {
734
+ sm: "footnote",
735
+ md: "caption",
736
+ lg: "paragraph-s",
737
+ xl: "paragraph-m"
738
+ };
717
739
  var Divider = (props) => {
718
- const { type = "line", className, ...rest } = props;
719
- const showCenter = type !== "line";
720
- const textLabel = type === "text-lines" && "label" in rest && rest.label ? rest.label : "OR";
721
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
722
- "div",
723
- {
724
- className: cn(
725
- "flex w-full items-center",
726
- showCenter ? "gap-2" : "gap-0",
727
- className
728
- ),
729
- ...rest,
730
- children: [
731
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
732
- type === "text-lines" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
733
- "span",
734
- {
735
- className: "footnote text-(--text-secondary)",
736
- style: { marginBottom: 0 },
737
- children: textLabel
738
- }
739
- ),
740
- type === "icon-lines" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
741
- IconButton,
742
- {
743
- variant: props.type === "icon-lines" && props.iconButtonVariant ? props.iconButtonVariant : "secondary",
744
- size: "sm",
745
- "aria-label": props.type === "icon-lines" && props.ariaLabel ? props.ariaLabel : textLabel || "More options",
746
- icon: props.type === "icon-lines" ? props.icon : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons2.TargetIcon, {}),
747
- onClick: props.type === "icon-lines" ? props.onIconClick : void 0
748
- }
749
- ),
750
- type === "icon-group-lines" && (props.type === "icon-group-lines" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
751
- IconButtonGroup,
752
- {
753
- items: props.iconGroupItems,
754
- size: props.iconGroupSize
755
- }
756
- ) : null),
757
- type === "button-lines" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
758
- Button,
759
- {
760
- variant: props.type === "button-lines" && props.buttonVariant ? props.buttonVariant : "secondary",
761
- size: "md",
762
- onClick: props.type === "button-lines" ? props.onButtonClick : void 0,
763
- children: props.type === "button-lines" ? props.buttonLabel : "Label"
764
- }
765
- ),
766
- showCenter && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
767
- ]
768
- }
740
+ const resolvedType = props.type ?? "default";
741
+ const resolvedSize = props.size ?? "sm";
742
+ const showCenter = resolvedType !== "default";
743
+ const lineClass = lineClassBase;
744
+ const wrapperClass = cn(
745
+ "flex w-full items-center",
746
+ showCenter ? gapBySize[resolvedSize] : "gap-0",
747
+ props.className
769
748
  );
749
+ if (props.type === void 0 || props.type === "default") {
750
+ const {
751
+ type: _type,
752
+ size: _size,
753
+ label: _label,
754
+ className: _className,
755
+ ...divProps
756
+ } = props;
757
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: wrapperClass, ...divProps, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }) });
758
+ }
759
+ if (props.type === "text") {
760
+ const {
761
+ type: _type,
762
+ size: _size,
763
+ label,
764
+ className: _className,
765
+ ...divProps
766
+ } = props;
767
+ const textLabel = label ? label : "OR";
768
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: wrapperClass, ...divProps, children: [
769
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
770
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
771
+ "span",
772
+ {
773
+ className: cn(
774
+ textClassBySize[resolvedSize],
775
+ "text-(--text-secondary)"
776
+ ),
777
+ children: textLabel
778
+ }
779
+ ),
780
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
781
+ ] });
782
+ }
783
+ if (props.type === "iconButton") {
784
+ const {
785
+ type: _type,
786
+ size: _size,
787
+ icon,
788
+ iconButtonVariant,
789
+ onIconClick,
790
+ ariaLabel,
791
+ className: _className,
792
+ ...divProps
793
+ } = props;
794
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: wrapperClass, ...divProps, children: [
795
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
796
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
797
+ IconButton,
798
+ {
799
+ variant: iconButtonVariant ?? "secondary",
800
+ size: resolvedSize,
801
+ "aria-label": ariaLabel ?? "More options",
802
+ icon: icon ?? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_icons2.TargetIcon, {}),
803
+ onClick: onIconClick
804
+ }
805
+ ),
806
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
807
+ ] });
808
+ }
809
+ if (props.type === "iconButtonGroup") {
810
+ const {
811
+ type: _type,
812
+ size: _size,
813
+ iconGroupItems,
814
+ className: _className,
815
+ ...divProps
816
+ } = props;
817
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: wrapperClass, ...divProps, children: [
818
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
819
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconButtonGroup, { items: iconGroupItems, size: resolvedSize }),
820
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
821
+ ] });
822
+ }
823
+ if (props.type === "button") {
824
+ const {
825
+ type: _type,
826
+ size: _size,
827
+ buttonLabel,
828
+ onButtonClick,
829
+ buttonVariant,
830
+ className: _className,
831
+ ...divProps
832
+ } = props;
833
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: wrapperClass, ...divProps, children: [
834
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass }),
835
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
836
+ Button,
837
+ {
838
+ variant: buttonVariant ?? "secondary",
839
+ size: resolvedSize,
840
+ onClick: onButtonClick,
841
+ children: buttonLabel
842
+ }
843
+ ),
844
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: lineClass })
845
+ ] });
846
+ }
847
+ return null;
770
848
  };
771
849
  Divider.displayName = "Divider";
772
850
 
@@ -806,8 +884,8 @@ var Progress = React12.forwardRef(
806
884
  ...rest,
807
885
  children: [
808
886
  showLabel && label && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex w-full items-center justify-between", children: [
809
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "paragraph-s-bold text-(--text-primary)", style: { marginBottom: 0 }, children: label }),
810
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "footnote text-(--text-secondary)", style: { marginBottom: 0 }, children: percentageLabel })
887
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "paragraph-s-bold text-(--text-primary)", children: label }),
888
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "footnote text-(--text-secondary)", children: percentageLabel })
811
889
  ] }),
812
890
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: cn("w-full bg-(--chart-mono) overflow-hidden", barHeightClasses), children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
813
891
  "div",
@@ -819,7 +897,7 @@ var Progress = React12.forwardRef(
819
897
  style: { width: `${clamped}%` }
820
898
  }
821
899
  ) }),
822
- showHint && hint && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "caption text-(--text-secondary)", style: { marginBottom: 0 }, children: hint })
900
+ showHint && hint && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "caption text-(--text-secondary)", children: hint })
823
901
  ]
824
902
  }
825
903
  );
@@ -977,7 +1055,7 @@ function Checkbox({ label, className, ...props }) {
977
1055
  ] })
978
1056
  }
979
1057
  ),
980
- label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "paragraph-m-medium text-(--text-primary)", style: { marginBottom: 0 }, children: label })
1058
+ label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "paragraph-m-medium text-(--text-primary)", children: label })
981
1059
  ] });
982
1060
  }
983
1061
 
@@ -986,7 +1064,7 @@ var React16 = __toESM(require("react"), 1);
986
1064
  var import_class_variance_authority12 = require("class-variance-authority");
987
1065
  var import_icons6 = require("@bubo-squared/icons");
988
1066
  var import_jsx_runtime18 = require("react/jsx-runtime");
989
- var dropdownWrapperBase = "flex flex-col gap-2 items-start min-w-[343px]";
1067
+ var dropdownWrapperBase = "flex flex-col gap-2 items-start";
990
1068
  var dropdownTriggerVariants = (0, import_class_variance_authority12.cva)(
991
1069
  "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",
992
1070
  {
@@ -1047,7 +1125,7 @@ var Dropdown = (props) => {
1047
1125
  label = "Field Label",
1048
1126
  showLabel = true,
1049
1127
  hint = "This is a hint text to help user.",
1050
- showHint = true,
1128
+ hideHint = false,
1051
1129
  placeholder = "Placeholder text",
1052
1130
  size = "large",
1053
1131
  status = "default",
@@ -1111,7 +1189,6 @@ var Dropdown = (props) => {
1111
1189
  "paragraph-s",
1112
1190
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
1113
1191
  ),
1114
- style: { marginBottom: 0 },
1115
1192
  children: label
1116
1193
  }
1117
1194
  ),
@@ -1124,7 +1201,7 @@ var Dropdown = (props) => {
1124
1201
  "aria-haspopup": "listbox",
1125
1202
  "aria-expanded": isOpen,
1126
1203
  "aria-labelledby": showLabel ? labelId : void 0,
1127
- "aria-describedby": showHint ? hintId : void 0,
1204
+ "aria-describedby": !hideHint ? hintId : void 0,
1128
1205
  disabled,
1129
1206
  className: cn(
1130
1207
  dropdownTriggerVariants({ size, status }),
@@ -1144,7 +1221,6 @@ var Dropdown = (props) => {
1144
1221
  disabled: !!disabled
1145
1222
  })
1146
1223
  ),
1147
- style: { marginBottom: 0 },
1148
1224
  children: hasValue ? selectedOption?.label : placeholder
1149
1225
  }
1150
1226
  ),
@@ -1174,7 +1250,6 @@ var Dropdown = (props) => {
1174
1250
  {
1175
1251
  type: "button",
1176
1252
  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)",
1177
- style: { marginBottom: 0 },
1178
1253
  role: "option",
1179
1254
  "aria-selected": selected,
1180
1255
  onClick: () => handleSelect(opt.value),
@@ -1186,7 +1261,7 @@ var Dropdown = (props) => {
1186
1261
  );
1187
1262
  }) }) })
1188
1263
  ] }),
1189
- showHint && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1264
+ !hideHint && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1190
1265
  "p",
1191
1266
  {
1192
1267
  id: hintId,
@@ -1194,7 +1269,6 @@ var Dropdown = (props) => {
1194
1269
  "caption",
1195
1270
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-secondary)"
1196
1271
  ),
1197
- style: { marginBottom: 0 },
1198
1272
  children: hint
1199
1273
  }
1200
1274
  )
@@ -1205,11 +1279,12 @@ Dropdown.displayName = "Dropdown";
1205
1279
  // src/components/Inputs/Field.tsx
1206
1280
  var React17 = __toESM(require("react"), 1);
1207
1281
  var import_jsx_runtime19 = require("react/jsx-runtime");
1208
- var fieldBase = "flex flex-col gap-2 items-start min-w-[343px]";
1282
+ var fieldBase = "flex flex-col gap-2 items-start";
1209
1283
  var Field = (props) => {
1210
1284
  const {
1211
1285
  label,
1212
1286
  hint,
1287
+ hideHint,
1213
1288
  status = "default",
1214
1289
  disabled,
1215
1290
  className,
@@ -1226,17 +1301,15 @@ var Field = (props) => {
1226
1301
  {
1227
1302
  id: labelId,
1228
1303
  className: cn("paragraph-s", labelColorClass),
1229
- style: { marginBottom: 0 },
1230
1304
  children: label
1231
1305
  }
1232
1306
  ),
1233
1307
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "relative w-full", children }),
1234
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1308
+ !hideHint && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1235
1309
  "p",
1236
1310
  {
1237
1311
  id: hint ? hintId : void 0,
1238
1312
  className: cn("caption", hint ? hintColorClass : "invisible"),
1239
- style: { marginBottom: 0 },
1240
1313
  children: hint || "\xA0"
1241
1314
  }
1242
1315
  )
@@ -1375,6 +1448,7 @@ var PasswordInput = (props) => {
1375
1448
  const {
1376
1449
  label,
1377
1450
  hint,
1451
+ hideHint,
1378
1452
  placeholder = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
1379
1453
  size = "large",
1380
1454
  status = "default",
@@ -1414,6 +1488,7 @@ var PasswordInput = (props) => {
1414
1488
  {
1415
1489
  label,
1416
1490
  hint,
1491
+ hideHint,
1417
1492
  status,
1418
1493
  disabled,
1419
1494
  children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
@@ -1448,7 +1523,6 @@ var PasswordInput = (props) => {
1448
1523
  className: cn(
1449
1524
  passwordTextVariants({ size, disabled: !!disabled })
1450
1525
  ),
1451
- style: { marginBottom: 0 },
1452
1526
  ...inputProps
1453
1527
  }
1454
1528
  ),
@@ -1465,7 +1539,6 @@ var PasswordInput = (props) => {
1465
1539
  "button",
1466
1540
  {
1467
1541
  type: "button",
1468
- style: { marginBottom: 0 },
1469
1542
  className: cn(
1470
1543
  actionButtonVariants({ size, disabled: !!disabled })
1471
1544
  ),
@@ -1790,6 +1863,7 @@ var PhoneInput = React26.forwardRef(
1790
1863
  value,
1791
1864
  label,
1792
1865
  hint,
1866
+ hideHint,
1793
1867
  placeholder,
1794
1868
  size = "large",
1795
1869
  disabled = false,
@@ -1801,6 +1875,7 @@ var PhoneInput = React26.forwardRef(
1801
1875
  {
1802
1876
  label,
1803
1877
  hint,
1878
+ hideHint,
1804
1879
  status,
1805
1880
  disabled,
1806
1881
  className,
@@ -1812,7 +1887,6 @@ var PhoneInput = React26.forwardRef(
1812
1887
  sizeBase({ size }),
1813
1888
  inputTextVariants({ size, disabled })
1814
1889
  ),
1815
- style: { marginBottom: 0 },
1816
1890
  flagComponent: FlagComponent,
1817
1891
  countrySelectComponent: CountrySelect,
1818
1892
  inputComponent: InputComponent,
@@ -1890,44 +1964,51 @@ var CountrySelect = ({
1890
1964
  ]
1891
1965
  }
1892
1966
  ) }),
1893
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(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__ */ (0, import_jsx_runtime28.jsxs)(Command, { children: [
1894
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1895
- CommandInput,
1896
- {
1897
- value: searchValue,
1898
- onValueChange: (value) => {
1899
- setSearchValue(value);
1900
- setTimeout(() => {
1901
- if (scrollAreaRef.current) {
1902
- const viewportElement = scrollAreaRef.current.querySelector(
1903
- "[data-radix-scroll-area-viewport]"
1904
- );
1905
- if (viewportElement) {
1906
- viewportElement.scrollTop = 0;
1907
- }
1908
- }
1909
- }, 0);
1910
- },
1911
- placeholder: "Search country..."
1912
- }
1913
- ),
1914
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CommandList, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
1915
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CommandEmpty, { children: "No country found." }),
1916
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(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(
1917
- ({ value, label }) => value ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1918
- CountrySelectOption,
1967
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1968
+ PopoverContent,
1969
+ {
1970
+ align: "start",
1971
+ 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)",
1972
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Command, { children: [
1973
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1974
+ CommandInput,
1919
1975
  {
1920
- country: value,
1921
- countryName: label,
1922
- selectedCountry,
1923
- onChange,
1924
- onSelectComplete: () => setIsOpen(false)
1925
- },
1926
- value
1927
- ) : null
1928
- ) })
1929
- ] }) })
1930
- ] }) })
1976
+ value: searchValue,
1977
+ onValueChange: (value) => {
1978
+ setSearchValue(value);
1979
+ setTimeout(() => {
1980
+ if (scrollAreaRef.current) {
1981
+ const viewportElement = scrollAreaRef.current.querySelector(
1982
+ "[data-radix-scroll-area-viewport]"
1983
+ );
1984
+ if (viewportElement) {
1985
+ viewportElement.scrollTop = 0;
1986
+ }
1987
+ }
1988
+ }, 0);
1989
+ },
1990
+ placeholder: "Search country..."
1991
+ }
1992
+ ),
1993
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CommandList, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ScrollArea, { ref: scrollAreaRef, className: "h-72", children: [
1994
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(CommandEmpty, { children: "No country found." }),
1995
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(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(
1996
+ ({ value, label }) => value ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1997
+ CountrySelectOption,
1998
+ {
1999
+ country: value,
2000
+ countryName: label,
2001
+ selectedCountry,
2002
+ onChange,
2003
+ onSelectComplete: () => setIsOpen(false)
2004
+ },
2005
+ value
2006
+ ) : null
2007
+ ) })
2008
+ ] }) })
2009
+ ] })
2010
+ }
2011
+ )
1931
2012
  ]
1932
2013
  }
1933
2014
  );
@@ -1976,6 +2057,7 @@ var wrapperBase = "flex flex-col gap-2 items-start";
1976
2057
  var RadioGroup = ({
1977
2058
  label,
1978
2059
  hint,
2060
+ hideHint,
1979
2061
  options,
1980
2062
  orientation = "vertical",
1981
2063
  disabled = false,
@@ -1999,7 +2081,6 @@ var RadioGroup = ({
1999
2081
  "paragraph-s text-(--text-primary)",
2000
2082
  disabled && "text-(--text-primary-disabled)"
2001
2083
  ),
2002
- style: { marginBottom: 0 },
2003
2084
  children: label
2004
2085
  }
2005
2086
  ),
@@ -2080,7 +2161,6 @@ var RadioGroup = ({
2080
2161
  "paragraph-s text-(--text-primary)",
2081
2162
  "group-data-[disabled]:text-(--text-primary-disabled) whitespace-nowrap"
2082
2163
  ),
2083
- style: { marginBottom: 0 },
2084
2164
  children: option.label
2085
2165
  }
2086
2166
  )
@@ -2092,7 +2172,7 @@ var RadioGroup = ({
2092
2172
  ))
2093
2173
  }
2094
2174
  ),
2095
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2175
+ !hideHint && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2096
2176
  "p",
2097
2177
  {
2098
2178
  id: hintId,
@@ -2100,7 +2180,6 @@ var RadioGroup = ({
2100
2180
  "caption text-(--text-secondary)",
2101
2181
  disabled && "text-(--text-primary-disabled)"
2102
2182
  ),
2103
- style: { marginBottom: 0 },
2104
2183
  children: hint ?? "\xA0"
2105
2184
  }
2106
2185
  )
@@ -2145,6 +2224,7 @@ var SearchInput = (props) => {
2145
2224
  className,
2146
2225
  leadingIcon,
2147
2226
  showLeadingIcon = true,
2227
+ trailingIcon,
2148
2228
  ...inputProps
2149
2229
  } = props;
2150
2230
  const inputRef = React28.useRef(null);
@@ -2152,7 +2232,8 @@ var SearchInput = (props) => {
2152
2232
  if (disabled) return;
2153
2233
  inputRef.current?.focus();
2154
2234
  };
2155
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col gap-2 items-start min-w-[343px]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2235
+ const showTrailingIcon = !!trailingIcon;
2236
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex flex-col gap-2 items-start", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "relative w-full", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2156
2237
  InputShell,
2157
2238
  {
2158
2239
  size,
@@ -2173,10 +2254,10 @@ var SearchInput = (props) => {
2173
2254
  className: cn(
2174
2255
  searchTextVariants({ size })
2175
2256
  ),
2176
- style: { marginBottom: 0 },
2177
2257
  ...inputProps
2178
2258
  }
2179
- )
2259
+ ),
2260
+ showTrailingIcon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: cn("cursor-pointer", iconWrapperVariants2({ size, disabled: !!disabled })), children: trailingIcon })
2180
2261
  ]
2181
2262
  }
2182
2263
  ) }) });
@@ -2186,7 +2267,7 @@ SearchInput.displayName = "SearchInput";
2186
2267
  // src/components/Inputs/Slider.tsx
2187
2268
  var React29 = __toESM(require("react"), 1);
2188
2269
  var import_jsx_runtime31 = require("react/jsx-runtime");
2189
- var wrapperBase2 = "flex flex-col gap-2 items-start min-w-[343px]";
2270
+ var wrapperBase2 = "flex flex-col gap-2 items-start";
2190
2271
  var Slider = (props) => {
2191
2272
  const {
2192
2273
  display = "flat",
@@ -2442,7 +2523,6 @@ var Slider = (props) => {
2442
2523
  "relative rounded-4 shadow-card-md px-(--space-8) py-(--space-4)",
2443
2524
  disabled ? "bg-(--background-primary-disabled)" : "bg-(--background-neutral)"
2444
2525
  ),
2445
- style: { marginBottom: 0 },
2446
2526
  children: [
2447
2527
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2448
2528
  "p",
@@ -2451,7 +2531,6 @@ var Slider = (props) => {
2451
2531
  "paragraph-s",
2452
2532
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
2453
2533
  ),
2454
- style: { marginBottom: 0 },
2455
2534
  children: labelText
2456
2535
  }
2457
2536
  ),
@@ -2504,7 +2583,7 @@ var Slider = (props) => {
2504
2583
  index
2505
2584
  );
2506
2585
  };
2507
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: wrapperBase2, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("w-[354px] flex flex-col gap-1", className), children: [
2586
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: wrapperBase2, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("w-full flex flex-col gap-1", className), children: [
2508
2587
  /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "relative w-full", children: [
2509
2588
  showTooltip && primary !== void 0 && renderTooltipBubble("primary", primaryPercent, formatDisplayValue(primary)),
2510
2589
  showTooltip && type === "multi" && secondary !== void 0 && renderTooltipBubble("secondary", secondaryPercent, formatDisplayValue(secondary)),
@@ -2545,7 +2624,6 @@ var Slider = (props) => {
2545
2624
  "paragraph-s text-(--text-primary)",
2546
2625
  disabled && "text-(--text-primary-disabled)"
2547
2626
  ),
2548
- style: { marginBottom: 0 },
2549
2627
  children: formatNumericLabel()
2550
2628
  }
2551
2629
  )
@@ -2648,7 +2726,6 @@ var TextArea = (props) => {
2648
2726
  "paragraph-s",
2649
2727
  disabled ? "text-(--text-primary-disabled)" : "text-(--text-primary)"
2650
2728
  ),
2651
- style: { marginBottom: 0 },
2652
2729
  children: label
2653
2730
  }
2654
2731
  ),
@@ -2689,7 +2766,6 @@ var TextArea = (props) => {
2689
2766
  disabled ? "text-(--text-primary-disabled)" : hasValue ? "text-(--text-primary)" : "text-(--text-secondary)",
2690
2767
  showCharacterLimit && "pr-16"
2691
2768
  ),
2692
- style: { marginBottom: 0 },
2693
2769
  ...textareaProps
2694
2770
  }
2695
2771
  ),
@@ -2732,7 +2808,6 @@ var TextArea = (props) => {
2732
2808
  {
2733
2809
  id: hint ? hintId : void 0,
2734
2810
  className: cn("caption", hint ? hintColorClass : "invisible"),
2735
- style: { marginBottom: 0 },
2736
2811
  children: hint || "\xA0"
2737
2812
  }
2738
2813
  )
@@ -2776,6 +2851,7 @@ var TextInput = (props) => {
2776
2851
  const {
2777
2852
  label,
2778
2853
  hint,
2854
+ hideHint,
2779
2855
  placeholder = "Placeholder text",
2780
2856
  size = "large",
2781
2857
  status = "default",
@@ -2811,6 +2887,7 @@ var TextInput = (props) => {
2811
2887
  {
2812
2888
  label,
2813
2889
  hint,
2890
+ hideHint,
2814
2891
  status,
2815
2892
  disabled,
2816
2893
  children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
@@ -2846,7 +2923,6 @@ var TextInput = (props) => {
2846
2923
  inputTextVariants2({ size }),
2847
2924
  "bg-transparent outline-none w-full"
2848
2925
  ),
2849
- style: { marginBottom: 0 },
2850
2926
  ...inputProps
2851
2927
  }
2852
2928
  ),
@@ -2949,7 +3025,6 @@ var Toggle = (props) => {
2949
3025
  "paragraph-s text-(--text-primary)",
2950
3026
  disabled && "text-(--text-primary-disabled)"
2951
3027
  ),
2952
- style: { marginBottom: 0 },
2953
3028
  children: label
2954
3029
  }
2955
3030
  )
@@ -2964,7 +3039,7 @@ var React33 = require("react");
2964
3039
  var import_jsx_runtime35 = require("react/jsx-runtime");
2965
3040
  var WebsiteInput = (props) => {
2966
3041
  const {
2967
- hierarchy = "prefix",
3042
+ hierarchy = "leading",
2968
3043
  protocolLabel = "http://",
2969
3044
  icon,
2970
3045
  size = "large",
@@ -2972,7 +3047,7 @@ var WebsiteInput = (props) => {
2972
3047
  className,
2973
3048
  ...rest
2974
3049
  } = props;
2975
- const isPrefix = hierarchy === "prefix";
3050
+ const isLeading = hierarchy === "leading";
2976
3051
  const baseClass = cn(
2977
3052
  "[&>span]:w-[unset] hover:bg-[unset]",
2978
3053
  !disabled && "[&:not(:focus-within):hover]:shadow-[0_0_0_var(--focus-ring-spread)_var(--background-secondary-hover)]",
@@ -2990,18 +3065,18 @@ var WebsiteInput = (props) => {
2990
3065
  "border-(--border-secondary)",
2991
3066
  // divider color
2992
3067
  disabled && "border-(--border-secondary-disabled) hover:border-(--border-secondary-disabled)",
2993
- isPrefix ? "border-r" : "border-l"
3068
+ isLeading ? "border-r" : "border-l"
2994
3069
  );
2995
3070
  const iconWrapperClass = cn(
2996
3071
  "flex items-center justify-center shrink-0",
2997
3072
  size === "extra-large" ? "[&>svg]:w-6 [&>svg]:h-6" : "[&>svg]:w-5 [&>svg]:h-5",
2998
3073
  disabled ? "text-(--icon-primary-disabled)" : "text-(--icon-primary) group-hover:text-(--icon-primary-hover) group-focus-within:text-(--icon-primary-focus)"
2999
3074
  );
3000
- const prefixAddon = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: baseAddonClass, children: [
3075
+ const leadingAddon = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: baseAddonClass, children: [
3001
3076
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: addonTextClass, children: protocolLabel }),
3002
3077
  icon != null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: iconWrapperClass, children: icon })
3003
3078
  ] });
3004
- const suffixAddon = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: baseAddonClass, children: [
3079
+ const trailingAddon = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: baseAddonClass, children: [
3005
3080
  icon != null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: iconWrapperClass, children: icon }),
3006
3081
  /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: addonTextClass, children: protocolLabel })
3007
3082
  ] });
@@ -3012,8 +3087,8 @@ var WebsiteInput = (props) => {
3012
3087
  size,
3013
3088
  disabled,
3014
3089
  className: cn(baseClass, className),
3015
- leadingIcon: isPrefix ? prefixAddon : void 0,
3016
- trailingIcon: !isPrefix ? suffixAddon : void 0
3090
+ leadingIcon: isLeading ? leadingAddon : void 0,
3091
+ trailingIcon: !isLeading ? trailingAddon : void 0
3017
3092
  }
3018
3093
  );
3019
3094
  };
@@ -3048,7 +3123,8 @@ var Popover2 = (props) => {
3048
3123
  onOk?.();
3049
3124
  setOpen(false);
3050
3125
  };
3051
- const popoverClasses = "bg-(--background-popover) fill-(--background-popover) popover w-80 shadow-card-md border-none [&_span]:scale-240 rounded-4";
3126
+ const popoverClasses = "group bg-(--background-popover) popover w-80 max-w-[calc(100vw-2rem)] shadow-card-md border-none [&_span]:scale-240 rounded-4";
3127
+ 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)]";
3052
3128
  const mapPlacementToSideAndAlign = (placement2) => {
3053
3129
  switch (placement2) {
3054
3130
  case "top":
@@ -3079,19 +3155,6 @@ var Popover2 = (props) => {
3079
3155
  return { side: "bottom", align: "center" };
3080
3156
  }
3081
3157
  };
3082
- const arrowShadowClass = (side2) => {
3083
- switch (side2) {
3084
- case "top":
3085
- return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
3086
- case "bottom":
3087
- return "drop-shadow(0px -1px 1px color-mix(in srgb, var(--color-b-black-10) 66%, transparent))";
3088
- case "left":
3089
- case "right":
3090
- return "drop-shadow(0px 2px 1px var(--color-b-black-12))";
3091
- default:
3092
- return "";
3093
- }
3094
- };
3095
3158
  const { side, align } = mapPlacementToSideAndAlign(placement);
3096
3159
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
3097
3160
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PopoverTrigger, { asChild: true, children }),
@@ -3101,21 +3164,16 @@ var Popover2 = (props) => {
3101
3164
  side,
3102
3165
  align,
3103
3166
  sideOffset: offset,
3104
- className: cn(popoverClasses, side === "top" ? "[&_span]:bottom-1! " : "", className),
3167
+ className: cn(popoverClasses, className),
3105
3168
  children: [
3106
- showArrow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3107
- PopoverArrow,
3108
- {
3109
- style: { filter: arrowShadowClass(side) }
3110
- }
3111
- ),
3169
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PopoverArrow, { className: popoverArrowClasses }),
3112
3170
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "grid gap-4", children: [
3113
3171
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "space-y-2", children: [
3114
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "caption text-secondary", style: { marginBottom: 0 }, children: strapline }),
3115
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "subtitle-medium text-primary", style: { marginBottom: 0 }, children: title }),
3116
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "paragraph-s text-primary", style: { marginBottom: 0 }, children: description })
3172
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "caption text-secondary", children: strapline }),
3173
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("h4", { className: "subtitle-medium text-primary", children: title }),
3174
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "paragraph-s text-primary", children: description })
3117
3175
  ] }),
3118
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex justify-start items-center gap-4", children: [
3176
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex justify-start items-center gap-4 flex-wrap", children: [
3119
3177
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { size: "sm", variant: "secondary", onClick: handleCancel, children: cancelText || "Cancel" }),
3120
3178
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { size: "sm", variant: "primary", onClick: handleOk, children: okText || "Ok" })
3121
3179
  ] })