@bubo-squared/ui-framework 0.2.24 → 0.2.26

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
@@ -378,7 +378,7 @@ var IconButtonGroup = (props) => {
378
378
  "aria-label": item.ariaLabel,
379
379
  disabled: item.disabled,
380
380
  className: cn(
381
- "rounded-none border-1 border-(--border-secondary) text-primary ",
381
+ "rounded-none border-1 border-secondary text-primary ",
382
382
  index === 0 && "rounded-l-6",
383
383
  index === items.length - 1 && "rounded-r-6",
384
384
  index > 0 && "-ml-px"
@@ -555,7 +555,7 @@ var Accordion = React6.forwardRef(
555
555
  AccordionPrimitive.Item,
556
556
  {
557
557
  value: "item",
558
- className: cn(bordered ? "border rounded-4" : "border-b", "border-(--border-secondary) px-4"),
558
+ className: cn(bordered ? "border rounded-4" : "border-b", "border-secondary px-4"),
559
559
  children: [
560
560
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
561
561
  AccordionPrimitive.Trigger,
@@ -589,7 +589,7 @@ var import_class_variance_authority6 = require("class-variance-authority");
589
589
  var import_icons2 = require("@bubo-squared/icons");
590
590
  var import_jsx_runtime9 = require("react/jsx-runtime");
591
591
  var avatarVariants = (0, import_class_variance_authority6.cva)(
592
- "relative inline-flex items-center justify-center rounded-full border-(--border-secondary) border-1 bg-(--background-primary) text-primary overflow-hidden hover:border-(--focus-secondary) focus-visible:border-(--focus-primary) focus-visible:outline-none",
592
+ "relative inline-flex items-center justify-center rounded-full border-secondary border-1 bg-(--background-primary) text-primary overflow-hidden hover:border-(--focus-secondary) focus-visible:border-(--focus-primary) focus-visible:outline-none",
593
593
  {
594
594
  variants: {
595
595
  size: {
@@ -738,24 +738,24 @@ var import_react_slot5 = require("@radix-ui/react-slot");
738
738
  var import_class_variance_authority7 = require("class-variance-authority");
739
739
  var import_jsx_runtime11 = require("react/jsx-runtime");
740
740
  var badgeVariants = (0, import_class_variance_authority7.cva)(
741
- "inline-flex items-center justify-center rounded-4 leading-none whitespace-nowrap gap-1 px-1 py-0",
741
+ "inline-flex items-center justify-center rounded-4 leading-none whitespace-nowrap gap-1 py-0",
742
742
  {
743
743
  variants: {
744
744
  size: {
745
- sm: "px-1 paragraph-sm",
746
- md: "px-1 paragraph-md",
747
- lg: "px-1.5 subtitle",
748
- xl: "px-2 h6-title"
745
+ sm: "px-1.5 paragraph-sm",
746
+ md: "px-2 paragraph-md",
747
+ lg: "px-2 subtitle",
748
+ xl: "px-2.5 h6-title"
749
749
  },
750
750
  variant: {
751
751
  primary: "bg-(--background-secondary) text-primary",
752
- secondary: "bg-(--background-primary) border-1 border-(--border-primary) text-primary",
752
+ secondary: "bg-(--background-primary) border-1 border-primary text-primary",
753
753
  active: "bg-ac-lilac text-badge-black",
754
754
  informal: "bg-ac-neon-blue text-badge-black",
755
755
  success: "bg-ac-neon-green text-badge-black",
756
756
  warning: "bg-ac-light-orange text-badge-black",
757
757
  error: "bg-s-error-300 text-badge-black",
758
- disabled: "bg-(--background-primary-disabled) border-1 border-(--border-primary-disabled) text-primary-disabled",
758
+ disabled: "bg-(--background-primary-disabled) border-1 border-primary-disabled text-primary-disabled",
759
759
  "double-default": "bg-(--background-secondary) text-primary",
760
760
  "double-current": "bg-color-ac-lilac text-badge-black"
761
761
  }
@@ -810,12 +810,12 @@ var badgeDigitVariants = (0, import_class_variance_authority8.cva)(
810
810
  },
811
811
  variant: {
812
812
  primary: "bg-(--background-brand)",
813
- secondary: "bg-(--background-primary) border-1 border-(--border-secondary) text-(--color-secondary)",
813
+ secondary: "bg-(--background-primary) border-1 border-secondary text-primary",
814
814
  informal: "bg-(--background-informal)",
815
815
  success: "bg-(--background-success)",
816
816
  warning: "bg-(--background-warning)",
817
817
  error: "bg-(--background-error)",
818
- disabled: "bg-(--background-primary) border-1 border-(--border-primary-disabled) text-primary-disabled"
818
+ disabled: "bg-(--background-primary) border-1 border-primary-disabled text-primary-disabled"
819
819
  }
820
820
  },
821
821
  defaultVariants: {
@@ -1153,7 +1153,8 @@ var Progress = React15.forwardRef(
1153
1153
  label,
1154
1154
  hint,
1155
1155
  ariaLabel,
1156
- showProgressLabel = true,
1156
+ hideProgressLabel = false,
1157
+ successBarColorOnComplete = false,
1157
1158
  hideHint,
1158
1159
  size = "lg",
1159
1160
  status = "default",
@@ -1169,7 +1170,7 @@ var Progress = React15.forwardRef(
1169
1170
  Field,
1170
1171
  {
1171
1172
  label,
1172
- labelRight: showProgressLabel && label != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
1173
+ labelRight: !hideProgressLabel && label != null ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "footnote text-(--color-secondary)", children: percentageLabel }) : void 0,
1173
1174
  hint,
1174
1175
  hideHint,
1175
1176
  status,
@@ -1197,7 +1198,8 @@ var Progress = React15.forwardRef(
1197
1198
  "div",
1198
1199
  {
1199
1200
  className: cn(
1200
- "bg-(--chart-brand) h-full",
1201
+ "h-full",
1202
+ successBarColorOnComplete && clamped === 100 ? "bg-(--color-success)" : "bg-(--chart-brand)",
1201
1203
  size === "lg" ? "rounded-4" : size === "md" ? "rounded-2" : "rounded-[1px]"
1202
1204
  ),
1203
1205
  style: { width: `${clamped}%` }
@@ -1284,7 +1286,7 @@ var import_react_slot6 = require("@radix-ui/react-slot");
1284
1286
  var import_class_variance_authority11 = require("class-variance-authority");
1285
1287
  var import_jsx_runtime19 = require("react/jsx-runtime");
1286
1288
  var tagVariants = (0, import_class_variance_authority11.cva)(
1287
- "inline-flex flex-row items-center justify-center rounded-6 gap-2 px-3 overflow-hidden border-1 border-(--border-secondary) bg-(--background-neutral) focus:border-(--border-brand) focus-ring-primary ",
1289
+ "inline-flex flex-row items-center justify-center rounded-6 gap-2 px-3 overflow-hidden border-1 border-secondary bg-(--background-neutral) focus:border-brand focus-ring-primary ",
1288
1290
  {
1289
1291
  variants: {
1290
1292
  size: {
@@ -1297,7 +1299,7 @@ var tagVariants = (0, import_class_variance_authority11.cva)(
1297
1299
  }
1298
1300
  }
1299
1301
  );
1300
- var disabledTag = "pointer-events-none border-(--border-secondary-disabled) bg-(--background-neutral-disabled) text-primary-disabled";
1302
+ var disabledTag = "pointer-events-none border-secondary-disabled bg-(--background-neutral-disabled) text-primary-disabled";
1301
1303
  var iconClasses = "flex items-center justify-center w-5 h-5 [&>*]:w-5 [&>*]:h-5 shrink-0 text-primary";
1302
1304
  var Tag = React17.forwardRef(
1303
1305
  (props, ref) => {
@@ -1344,7 +1346,7 @@ var import_icons5 = require("@bubo-squared/icons");
1344
1346
 
1345
1347
  // src/components/ui/dropdown-styles.ts
1346
1348
  var import_class_variance_authority12 = require("class-variance-authority");
1347
- var dropdownSurfaceClass = "z-50 rounded-4 border border-(--border-secondary-hover) bg-(--background-neutral) shadow-card-md";
1349
+ var dropdownSurfaceClass = "z-50 rounded-4 border border-secondary-hover bg-(--background-neutral) shadow-card-md";
1348
1350
  var dropdownScrollClass = "max-h-79 overflow-y-auto dropdown-scrollbar";
1349
1351
  var dropdownRowVariants = (0, import_class_variance_authority12.cva)(
1350
1352
  "flex w-full items-center gap-2 pl-(--space-8) pr-(--space-16) text-left text-primary cursor-pointer hover:bg-(--background-secondary)",
@@ -1605,15 +1607,15 @@ var Checkbox = React20.forwardRef(({ label, className, ...props }, forwardedRef)
1605
1607
  {
1606
1608
  ref: forwardedRef,
1607
1609
  className: cn(
1608
- "group flex h-5 w-5 items-center justify-center rounded-2 border border-(--border-secondary) bg-(--background-neutral) text-primary-inverse",
1610
+ "group flex h-5 w-5 items-center justify-center rounded-2 border border-secondary bg-(--background-neutral) text-primary-inverse",
1609
1611
  "data-[state=checked]:bg-(--background-brand) data-[state=checked]:text-button-white data-[state=checked]:border-none",
1610
1612
  "data-[state=indeterminate]:bg-(--background-brand) data-[state=indeterminate]:text-button-white data-[state=indeterminate]:border-none",
1611
1613
  "data-[state=checked]:hover:bg-(--background-brand-hover) data-[state=indeterminate]:hover:bg-(--background-brand-hover)",
1612
- "focus-visible:border-(--border-brand)",
1614
+ "focus-visible:border-brand",
1613
1615
  "disabled:bg-(--background-primary-disabled) disabled:border-none disabled:text-(--icon-primary-disabled)",
1614
1616
  "data-[state=checked]:disabled:bg-(--background-primary-disabled) data-[state=checked]:disabled:border-none data-[state=checked]:disabled:text-(--icon-primary-disabled)",
1615
1617
  "data-[state=indeterminate]:disabled:bg-(--background-primary-disabled) data-[state=indeterminate]:disabled:border-none data-[state=indeterminate]:disabled:text-(--icon-primary-disabled)",
1616
- "focus-ring-primary hover:cursor-pointer hover:border-(--border-secondary-hover)",
1618
+ "focus-ring-primary hover:cursor-pointer hover:border-secondary-hover",
1617
1619
  className
1618
1620
  ),
1619
1621
  ...props,
@@ -1637,7 +1639,7 @@ var React21 = __toESM(require("react"), 1);
1637
1639
  var import_class_variance_authority13 = require("class-variance-authority");
1638
1640
  var import_jsx_runtime23 = require("react/jsx-runtime");
1639
1641
  var inputShellVariants = (0, import_class_variance_authority13.cva)(
1640
- "group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-(--border-secondary)",
1642
+ "group flex w-full items-center rounded-4 border bg-(--background-primary) text-left cursor-text border-secondary",
1641
1643
  {
1642
1644
  variants: {
1643
1645
  size: {
@@ -1652,7 +1654,7 @@ var inputShellVariants = (0, import_class_variance_authority13.cva)(
1652
1654
  error: "input-error"
1653
1655
  },
1654
1656
  disabled: {
1655
- true: "bg-(--background-primary-disabled) border-(--border-secondary-disabled) text-primary-disabled cursor-default"
1657
+ true: "bg-(--background-primary-disabled) border-secondary-disabled text-primary-disabled cursor-default"
1656
1658
  }
1657
1659
  },
1658
1660
  defaultVariants: {
@@ -2811,7 +2813,7 @@ function ScrollBar({
2811
2813
  // src/components/Inputs/PhoneInput.tsx
2812
2814
  var import_class_variance_authority18 = require("class-variance-authority");
2813
2815
  var import_jsx_runtime33 = require("react/jsx-runtime");
2814
- var inputBase = "h-full rounded-4 border-(--border-secondary) bg-(--background-primary) hover:border-(--border-secondary-hover)";
2816
+ var inputBase = "h-full rounded-4 border-secondary bg-(--background-primary) hover:border-secondary-hover";
2815
2817
  var sizeBase = (0, import_class_variance_authority18.cva)(
2816
2818
  "flex w-full",
2817
2819
  {
@@ -2834,7 +2836,7 @@ var inputTextVariants2 = (0, import_class_variance_authority18.cva)("", {
2834
2836
  xl: "h6-title"
2835
2837
  },
2836
2838
  disabled: {
2837
- true: "text-primary-disabled border-(--border-secondary-disabled)"
2839
+ true: "text-primary-disabled border-secondary-disabled"
2838
2840
  }
2839
2841
  },
2840
2842
  defaultVariants: {
@@ -3163,24 +3165,24 @@ var RadioGroup = React32.forwardRef((props, forwardedRef) => {
3163
3165
  className: cn(
3164
3166
  "flex items-center justify-center shrink-0 h-5 w-5 rounded-full border bg-(--background-primary) transition-all",
3165
3167
  // 1: enabled, unchecked, unfocused, unhovered
3166
- "group-data-[state=unchecked]:border-(--border-secondary)",
3168
+ "group-data-[state=unchecked]:border-secondary",
3167
3169
  // 2: enabled, checked, unfocused, unhovered
3168
- "group-data-[state=checked]:border-(--border-brand)",
3170
+ "group-data-[state=checked]:border-brand",
3169
3171
  // 3: enabled, unchecked, hovered, unfocused
3170
- "group-data-[state=unchecked]:group-hover:border-(--border-secondary-hover)",
3172
+ "group-data-[state=unchecked]:group-hover:border-secondary-hover",
3171
3173
  // 4: enabled, checked, hovered, unfocused
3172
- "group-data-[state=checked]:group-hover:border-(--border-brand-hover)",
3174
+ "group-data-[state=checked]:group-hover:border-brand-hover",
3173
3175
  "group-data-[state=checked]:group-hover:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-secondary)]",
3174
3176
  // 5: enabled, unchecked, focused (override 1/3)
3175
- "group-data-[state=unchecked]:group-focus-visible:border-(--border-secondary-hover)",
3177
+ "group-data-[state=unchecked]:group-focus-visible:border-secondary-hover",
3176
3178
  // 6: enabled, checked, focused (override 2/4)
3177
- "group-data-[state=checked]:group-focus-visible:border-(--border-brand-focus)",
3179
+ "group-data-[state=checked]:group-focus-visible:border-brand-focus",
3178
3180
  "group-data-[state=checked]:group-focus-visible:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-primary)]",
3179
3181
  // 7: disabled, unchecked (override everything above)
3180
3182
  "group-[&[data-disabled][data-state=unchecked]]:border-none",
3181
3183
  "group-[&[data-disabled][data-state=unchecked]]:bg-(--background-primary-disabled)",
3182
3184
  // 8: disabled, checked (override everything above)
3183
- "group-[&[data-disabled][data-state=checked]]:border-(--border-primary-disabled)",
3185
+ "group-[&[data-disabled][data-state=checked]]:border-primary-disabled",
3184
3186
  "group-[&[data-disabled][data-state=checked]]:bg-(--background-primary-disabled)"
3185
3187
  ),
3186
3188
  children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
@@ -3900,8 +3902,8 @@ var TextArea = React36.forwardRef((props, forwardedRef) => {
3900
3902
  const textareaId = id ?? generatedId;
3901
3903
  const statusBorderClass = {
3902
3904
  default: "",
3903
- success: "border-(--border-success)",
3904
- error: "border-(--border-error)"
3905
+ success: "border-success",
3906
+ error: "border-error"
3905
3907
  };
3906
3908
  const statusShellClass = {
3907
3909
  default: "input-default",
@@ -3947,9 +3949,9 @@ var TextArea = React36.forwardRef((props, forwardedRef) => {
3947
3949
  {
3948
3950
  className: cn(
3949
3951
  "relative flex w-full rounded-4 border bg-(--background-primary) cursor-text",
3950
- "border-(--border-secondary)",
3952
+ "border-secondary",
3951
3953
  statusShellClass[status],
3952
- disabled && "bg-(--background-primary-disabled) border-(--border-secondary-disabled) cursor-default",
3954
+ disabled && "bg-(--background-primary-disabled) border-secondary-disabled cursor-default",
3953
3955
  statusBorderClass[status],
3954
3956
  className
3955
3957
  ),
@@ -4197,16 +4199,16 @@ var Toggle = React38.forwardRef((props, forwardedRef) => {
4197
4199
  // Knob position
4198
4200
  "justify-start peer-checked:justify-end",
4199
4201
  // 1: enabled, unchecked, unhovered, unfocused
4200
- "border-(--border-secondary)",
4202
+ "border-secondary",
4201
4203
  // 3: enabled, unchecked, hovered, unfocused
4202
- "hover:border-(--border-secondary-hover)",
4204
+ "hover:border-secondary-hover",
4203
4205
  // 2: enabled, checked, unhovered, unfocused
4204
- "peer-checked:border-(--border-brand)",
4206
+ "peer-checked:border-brand",
4205
4207
  // 4: enabled, checked, hovered, unfocused
4206
- "peer-checked:hover:border-(--border-brand-hover)",
4208
+ "peer-checked:hover:border-brand-hover",
4207
4209
  "peer-checked:hover:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-secondary)]",
4208
4210
  // 5: enabled, unchecked, unhovered, focused
4209
- "peer-focus-visible:border-(--border-brand-focus)",
4211
+ "peer-focus-visible:border-brand-focus",
4210
4212
  // 6: enabled, checked, unhovered, focused
4211
4213
  "peer-checked:peer-focus-visible:bg-(--background-brand-focus)",
4212
4214
  "peer-checked:peer-focus-visible:shadow-[0_0_0_var(--focus-ring-spread)_var(--focus-primary)]",
@@ -4215,7 +4217,7 @@ var Toggle = React38.forwardRef((props, forwardedRef) => {
4215
4217
  "peer-disabled:border-none",
4216
4218
  "peer-disabled:shadow-none",
4217
4219
  // 8: disabled, checked (override)
4218
- "peer-disabled:peer-checked:border-(--border-primary-disabled)",
4220
+ "peer-disabled:peer-checked:border-primary-disabled",
4219
4221
  // Disable hover when disabled
4220
4222
  "peer-disabled:pointer-events-none",
4221
4223
  // Knob on (enabled)
@@ -4274,7 +4276,7 @@ var WebsiteInput = React39.forwardRef((props, forwardedRef) => {
4274
4276
  const baseClass = cn(
4275
4277
  "[&>span]:w-[unset] hover:bg-[unset]",
4276
4278
  !disabled && "[&:not(:focus-within):hover]:shadow-[0_0_0_var(--focus-ring-spread)_var(--background-secondary-hover)]",
4277
- disabled && "bg-[unset] hover:shadow-none hover:border-(--border-secondary-disabled) border-(--border-secondary-disabled)",
4279
+ disabled && "bg-[unset] hover:shadow-none hover:border-secondary-disabled border-secondary-disabled",
4278
4280
  spanHeightClass
4279
4281
  );
4280
4282
  const addonTextClass = cn(
@@ -4285,9 +4287,9 @@ var WebsiteInput = React39.forwardRef((props, forwardedRef) => {
4285
4287
  const baseAddonClass = cn(
4286
4288
  "flex items-center gap-2 px-2 h-full",
4287
4289
  // layout + padding
4288
- "border-(--border-secondary)",
4290
+ "border-secondary",
4289
4291
  // divider color
4290
- disabled && "border-(--border-secondary-disabled) hover:border-(--border-secondary-disabled)",
4292
+ disabled && "border-secondary-disabled hover:border-secondary-disabled",
4291
4293
  isLeading ? "border-r" : "border-l"
4292
4294
  );
4293
4295
  const iconWrapperClass = cn(
@@ -4550,7 +4552,7 @@ var Breadcrumbs = React43.forwardRef(
4550
4552
  DropdownMenuContent,
4551
4553
  {
4552
4554
  align: "start",
4553
- className: "bg-(--background-neutral) border-(--border-secondary-hover) shadow-card-md rounded-4",
4555
+ className: "bg-(--background-neutral) border-secondary-hover shadow-card-md rounded-4",
4554
4556
  children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(DropdownMenuGroup, { children: hiddenItems.map((hidden, hiddenIndex) => {
4555
4557
  const hiddenKey = React43.isValidElement(hidden) && hidden.key != null ? String(hidden.key) : `hidden-${hiddenIndex}`;
4556
4558
  if (React43.isValidElement(hidden)) {