sangam-ui 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +427 -108
  2. package/dist/index.js +555 -298
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -101,8 +101,8 @@ var buttonVariants = cva2(
101
101
  "disabled:bg-semantic-background-neutral-disabled disabled:text-semantic-text-neutral-disabled disabled:pointer-events-none",
102
102
  "data-[loading=true]:!bg-semantic-background-semantic-error-default data-[loading=true]:!text-semantic-text-semantic-error-default"
103
103
  ],
104
- // Link: semantic info default text
105
- link: [
104
+ // Tertiary (low-emphasis / link style): semantic info default text
105
+ tertiary: [
106
106
  "bg-transparent text-semantic-background-semantic-info-default underline-offset-4",
107
107
  "hover:underline",
108
108
  "focus-visible:ring-semantic-border-semantic-info-default",
@@ -163,29 +163,49 @@ var buttonVariants = cva2(
163
163
  );
164
164
  var BUTTON_LOADER_COLOR = semanticColorsResolved2.text.neutralInverse.primary;
165
165
  var BUTTON_LOADER_COLOR_TRANSPARENT = `${BUTTON_LOADER_COLOR}00`;
166
+ var hoverPreviewClassByVariant = {
167
+ primary: "!bg-semantic-background-neutralInverse-secondary",
168
+ secondary: "!border-transparent !bg-semantic-background-neutral-tertiary",
169
+ danger: "!bg-semantic-background-semantic-error-hover",
170
+ tertiary: "underline"
171
+ };
172
+ function normalizeButtonType(value) {
173
+ if (value === void 0 || value === "") return "primary";
174
+ if (value === "link") return "tertiary";
175
+ return value;
176
+ }
166
177
  var Button = React2.forwardRef(
167
178
  ({
168
179
  className,
169
- variant,
180
+ type: typeProp,
181
+ htmlType = "button",
182
+ variant: variantProp,
170
183
  size,
171
184
  iconOnly = false,
172
185
  asChild = false,
173
186
  icon,
174
187
  leadingIcon = false,
175
188
  trailingIcon = false,
189
+ label,
176
190
  children,
177
- loading = false,
191
+ state = "enabled",
192
+ hover = false,
178
193
  disabled,
179
194
  "aria-busy": ariaBusy,
180
195
  "aria-disabled": ariaDisabled,
181
196
  ...props
182
197
  }, ref) => {
183
- const isDisabled = disabled ?? loading;
184
- const showLoader = loading && !asChild;
198
+ const normalized = normalizeButtonType(variantProp ?? typeProp);
199
+ const isLoaderType = normalized === "loader";
200
+ const cvaVariant = isLoaderType ? "primary" : normalized;
201
+ const resolvedDisabled = disabled !== void 0 ? disabled : state === "disabled";
202
+ const isDisabled = isLoaderType || resolvedDisabled;
203
+ const showLoader = isLoaderType && !asChild;
185
204
  const loaderSize = size === "small" ? "extraSmall" : "small";
186
205
  const iconPixelSize = size === "small" ? 16 : 20;
187
206
  const iconSizeClass = size === "small" ? "h-4 w-4" : "h-5 w-5";
188
- const loaderColor = variant === "primary" || variant === "danger" ? { color: BUTTON_LOADER_COLOR, colorTransparent: BUTTON_LOADER_COLOR_TRANSPARENT } : void 0;
207
+ const loaderColor = cvaVariant === "primary" || cvaVariant === "danger" ? { color: BUTTON_LOADER_COLOR, colorTransparent: BUTTON_LOADER_COLOR_TRANSPARENT } : void 0;
208
+ const labelContent = label ?? children;
189
209
  const Comp = asChild && !showLoader ? Slot : "button";
190
210
  const hasIcon = !!icon;
191
211
  const showIconOnly = iconOnly && hasIcon;
@@ -201,10 +221,16 @@ var Button = React2.forwardRef(
201
221
  isDomElement ? { className: mergedClassName } : { size: iconPixelSize, className: mergedClassName }
202
222
  );
203
223
  }
224
+ const useSlot = asChild && !showLoader;
204
225
  return /* @__PURE__ */ jsx2(
205
226
  Comp,
206
227
  {
207
- className: cn2(buttonVariants({ variant, size, iconOnly, className })),
228
+ ...!useSlot ? { type: htmlType } : {},
229
+ className: cn2(
230
+ buttonVariants({ variant: cvaVariant, size, iconOnly }),
231
+ hover && hoverPreviewClassByVariant[isLoaderType ? "primary" : cvaVariant],
232
+ className
233
+ ),
208
234
  ref,
209
235
  disabled: isDisabled,
210
236
  "data-loading": showLoader ? true : void 0,
@@ -221,7 +247,7 @@ var Button = React2.forwardRef(
221
247
  }
222
248
  ) : showIconOnly ? /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0", children: renderIcon }) : /* @__PURE__ */ jsxs(Fragment, { children: [
223
249
  showLeadingIcon && /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0", children: renderIcon }),
224
- children,
250
+ labelContent,
225
251
  showTrailingIcon && /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0", children: renderIcon })
226
252
  ] })
227
253
  }
@@ -306,13 +332,21 @@ var toggleThumbVariants = cva3(
306
332
  }
307
333
  );
308
334
  var Toggle = React3.forwardRef(
309
- ({ className, size = "big", title, subtext, ...props }, ref) => {
310
- const hasLabel = title != null || subtext != null;
335
+ ({ className, size = "big", title, subtitle, subtext, isOn, onIsOnChange, ...props }, ref) => {
336
+ const resolvedSubtitle = subtitle ?? subtext;
337
+ const resolvedChecked = isOn ?? props.checked;
338
+ const resolvedOnCheckedChange = (next) => {
339
+ onIsOnChange?.(next);
340
+ props.onCheckedChange?.(next);
341
+ };
342
+ const hasLabel = title != null || resolvedSubtitle != null;
311
343
  const switchEl = /* @__PURE__ */ jsx3(
312
344
  SwitchPrimitives.Root,
313
345
  {
314
346
  className: cn3(toggleVariants({ size }), !hasLabel && className),
315
347
  ...props,
348
+ checked: resolvedChecked,
349
+ onCheckedChange: resolvedOnCheckedChange,
316
350
  ref,
317
351
  children: /* @__PURE__ */ jsx3(
318
352
  SwitchPrimitives.Thumb,
@@ -328,7 +362,7 @@ var Toggle = React3.forwardRef(
328
362
  switchEl,
329
363
  /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-0", children: [
330
364
  title != null && /* @__PURE__ */ jsx3("span", { className: "text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: title }),
331
- subtext != null && /* @__PURE__ */ jsx3("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: subtext })
365
+ resolvedSubtitle != null && /* @__PURE__ */ jsx3("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: resolvedSubtitle })
332
366
  ] })
333
367
  ] });
334
368
  }
@@ -345,7 +379,6 @@ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
345
379
  var checkboxRootVariants = cva4(
346
380
  [
347
381
  "peer group flex shrink-0 items-center justify-center",
348
- // focus ring: no semantic token for neutral-800 in semantic-colors.json — left as-is
349
382
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2",
350
383
  "disabled:cursor-not-allowed"
351
384
  ],
@@ -366,11 +399,12 @@ var checkboxRootVariants = cva4(
366
399
  var checkboxInnerVariants = cva4(
367
400
  [
368
401
  "flex shrink-0 items-center justify-center rounded-xs border transition-all duration-200 ease-out",
369
- // Default unchecked — semantic border/background
370
402
  "border-semantic-border-neutral-primary bg-transparent",
371
403
  "group-hover:border-semantic-border-neutralInverse-primary",
404
+ "group-data-[preview-hover=true]:border-semantic-border-neutralInverse-primary",
372
405
  "group-data-[state=checked]:bg-semantic-background-neutralInverse-primary group-data-[state=checked]:border-semantic-border-neutralInverse-tertiary",
373
406
  "group-data-[state=checked]:group-hover:border-semantic-border-neutralInverse-tertiary",
407
+ "group-data-[state=checked]:group-data-[preview-hover=true]:border-semantic-border-neutralInverse-tertiary",
374
408
  "group-disabled:border-semantic-border-neutral-tertiary group-disabled:group-hover:border-semantic-border-neutral-tertiary",
375
409
  "group-disabled:group-data-[state=checked]:bg-semantic-background-neutral-tertiary group-disabled:group-data-[state=checked]:border-semantic-border-neutral-tertiary"
376
410
  ],
@@ -378,9 +412,7 @@ var checkboxInnerVariants = cva4(
378
412
  variants: {
379
413
  size: {
380
414
  big: "h-5 w-5",
381
- // 20px inner (2px gap inside 24px)
382
415
  small: "h-4 w-4"
383
- // 16px inner (2px gap inside 20px)
384
416
  }
385
417
  },
386
418
  defaultVariants: {
@@ -403,34 +435,65 @@ var checkboxIndicatorVariants = cva4(
403
435
  }
404
436
  );
405
437
  var Checkbox = React4.forwardRef(
406
- ({ className, size = "big", disabled, title, subtext, ...props }, ref) => {
407
- const hasLabel = title != null || subtext != null;
438
+ ({
439
+ className,
440
+ size = "big",
441
+ isOn,
442
+ onIsOnChange,
443
+ checked: checkedProp,
444
+ onCheckedChange,
445
+ state = "default",
446
+ text = true,
447
+ title: showTitle = true,
448
+ titletext = "",
449
+ subtext: showSubtext = true,
450
+ subtextText = "",
451
+ disabled: disabledProp,
452
+ ...props
453
+ }, ref) => {
454
+ const mergedCheckedState = isOn !== void 0 ? isOn : checkedProp;
455
+ const isControlled = isOn !== void 0 || checkedProp !== void 0;
456
+ const resolvedDisabled = disabledProp ?? state === "disabled";
457
+ const previewHover = state === "hover";
458
+ const handleCheckedChange = React4.useCallback(
459
+ (value) => {
460
+ const next = value === true;
461
+ onIsOnChange?.(next);
462
+ onCheckedChange?.(value);
463
+ },
464
+ [onIsOnChange, onCheckedChange]
465
+ );
466
+ const showTextColumn = text;
467
+ const hasLabelLayout = showTextColumn && (showTitle || showSubtext);
408
468
  const checkboxEl = /* @__PURE__ */ jsx4(
409
469
  CheckboxPrimitive.Root,
410
470
  {
411
471
  ref,
412
- className: cn4(checkboxRootVariants({ size }), !hasLabel && className),
413
- disabled,
414
472
  ...props,
473
+ className: cn4(checkboxRootVariants({ size }), !hasLabelLayout && className),
474
+ disabled: resolvedDisabled,
475
+ "data-preview-hover": previewHover ? "" : void 0,
476
+ ...isControlled && mergedCheckedState !== void 0 ? { checked: mergedCheckedState } : {},
477
+ onCheckedChange: handleCheckedChange,
415
478
  children: /* @__PURE__ */ jsx4("div", { className: cn4(checkboxInnerVariants({ size })), "aria-hidden": true, children: /* @__PURE__ */ jsx4(CheckboxPrimitive.Indicator, { className: cn4(checkboxIndicatorVariants({ size })), children: /* @__PURE__ */ jsx4(
416
479
  Check,
417
480
  {
418
481
  className: cn4(
419
482
  size === "big" ? "h-4 w-4" : "h-3 w-3",
420
483
  "text-semantic-text-neutralInverse-primary",
421
- disabled && "text-semantic-text-neutral-disabled"
484
+ resolvedDisabled && "text-semantic-text-neutral-disabled"
422
485
  ),
423
486
  strokeWidth: 3
424
487
  }
425
488
  ) }) })
426
489
  }
427
490
  );
428
- if (!hasLabel) return checkboxEl;
491
+ if (!hasLabelLayout) return checkboxEl;
429
492
  return /* @__PURE__ */ jsxs3("label", { className: cn4("inline-flex cursor-pointer items-center gap-3", className), children: [
430
493
  checkboxEl,
431
494
  /* @__PURE__ */ jsxs3("div", { className: "flex flex-col gap-0", children: [
432
- title != null && /* @__PURE__ */ jsx4("span", { className: "text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: title }),
433
- subtext != null && /* @__PURE__ */ jsx4("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: subtext })
495
+ showTitle && /* @__PURE__ */ jsx4("span", { className: "text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: titletext }),
496
+ showSubtext && /* @__PURE__ */ jsx4("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: subtextText })
434
497
  ] })
435
498
  ] });
436
499
  }
@@ -519,8 +582,9 @@ var radioDotVariants = cva5(
519
582
  var RadioGroup = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(RadioGroupPrimitive.Root, { className: cn5("grid gap-2", className), ...props, ref }));
520
583
  RadioGroup.displayName = "RadioGroup";
521
584
  var Radio = React5.forwardRef(
522
- ({ className, size = "big", disabled, title, subtext, ...props }, ref) => {
523
- const hasLabel = title != null || subtext != null;
585
+ ({ className, size = "big", disabled, title, subtext, subText, ...props }, ref) => {
586
+ const resolvedSubtext = subText ?? subtext;
587
+ const hasLabel = title != null || resolvedSubtext != null;
524
588
  const radioEl = /* @__PURE__ */ jsx5(
525
589
  RadioGroupPrimitive.Item,
526
590
  {
@@ -536,7 +600,7 @@ var Radio = React5.forwardRef(
536
600
  radioEl,
537
601
  /* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-0", children: [
538
602
  title != null && /* @__PURE__ */ jsx5("span", { className: "text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: title }),
539
- subtext != null && /* @__PURE__ */ jsx5("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: subtext })
603
+ resolvedSubtext != null && /* @__PURE__ */ jsx5("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: resolvedSubtext })
540
604
  ] })
541
605
  ] });
542
606
  }
@@ -628,16 +692,23 @@ var Input = React6.forwardRef(
628
692
  className,
629
693
  type = "text",
630
694
  label,
695
+ asterisk,
631
696
  required,
632
697
  error,
633
698
  success,
699
+ supportText,
700
+ supportingText,
634
701
  helperText,
635
702
  helperError,
636
703
  disabled,
637
704
  value,
638
- showLabelIcon = false,
639
- showHelperIcon = false,
705
+ infoIcon,
706
+ showLabelIcon,
707
+ supportIcon,
708
+ showHelperIcon,
640
709
  trailingIcon,
710
+ cta,
711
+ ctaType = "tertiary",
641
712
  ctaLabel,
642
713
  onCtaClick,
643
714
  ...props
@@ -645,11 +716,18 @@ var Input = React6.forwardRef(
645
716
  const variant = error ? "error" : success ? "success" : "default";
646
717
  const isFilled = !!value && value.toString().length > 0;
647
718
  const inputId = props.id || `input-${React6.useId()}`;
648
- const helperTextId = helperText ? `${inputId}-helper` : void 0;
719
+ const resolvedAsterisk = asterisk ?? required ?? false;
720
+ const resolvedInfoIcon = infoIcon ?? showLabelIcon ?? false;
721
+ const resolvedSupportIcon = supportIcon ?? showHelperIcon ?? false;
722
+ const resolvedSupportText = supportText ?? helperText;
723
+ const shouldShowSupportingText = supportingText ?? Boolean(resolvedSupportText);
724
+ const ctaText = typeof cta === "string" && cta.length > 0 ? cta : typeof ctaLabel === "string" && ctaLabel.length > 0 ? ctaLabel : "Button";
725
+ const hasCtaToggle = Boolean(cta);
726
+ const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${inputId}-helper` : void 0;
649
727
  const helperTextColor = error ? "text-semantic-text-semantic-error-subtle" : success ? "text-semantic-text-semantic-success-subtle" : "text-semantic-text-neutral-tertiary";
650
- const HelperIcon = error ? WarningFilled : success ? TickmarkFilled : showHelperIcon ? Info : null;
728
+ const HelperIcon = error ? WarningFilled : success ? TickmarkFilled : resolvedSupportIcon ? Info : null;
651
729
  const hasTrailing = Boolean(trailingIcon);
652
- const hasCta = Boolean(ctaLabel);
730
+ const hasCta = hasCtaToggle;
653
731
  const inputElement = /* @__PURE__ */ jsx6(
654
732
  "input",
655
733
  {
@@ -675,8 +753,8 @@ var Input = React6.forwardRef(
675
753
  Label,
676
754
  {
677
755
  htmlFor: inputId,
678
- required,
679
- endAdornment: showLabelIcon ? /* @__PURE__ */ jsx6(Info, { size: 16, className: "!text-semantic-text-neutral-tertiary shrink-0", "aria-hidden": "true" }) : void 0,
756
+ required: resolvedAsterisk,
757
+ endAdornment: resolvedInfoIcon ? /* @__PURE__ */ jsx6(Info, { size: 16, className: "!text-semantic-text-neutral-tertiary shrink-0", "aria-hidden": "true" }) : void 0,
680
758
  children: label
681
759
  }
682
760
  ),
@@ -725,19 +803,21 @@ var Input = React6.forwardRef(
725
803
  children: [
726
804
  inputElement,
727
805
  /* @__PURE__ */ jsx6(
728
- "button",
806
+ Button,
729
807
  {
730
- type: "button",
808
+ type: ctaType,
809
+ size: "small",
810
+ state: disabled ? "disabled" : "enabled",
811
+ label: ctaText,
731
812
  onClick: onCtaClick,
732
- disabled,
733
- className: "shrink-0 text-semantic-text-semantic-info-subtle text-sm font-normal hover:underline pl-2 pr-3 py-1 focus:outline-none focus-visible:ring-0 rounded",
734
- children: ctaLabel
813
+ className: "shrink-0 px-2 py-0 h-auto min-h-0",
814
+ children: ctaText
735
815
  }
736
816
  )
737
817
  ]
738
818
  }
739
819
  ) : inputElement,
740
- helperText && /* @__PURE__ */ jsxs5(
820
+ shouldShowSupportingText && resolvedSupportText && /* @__PURE__ */ jsxs5(
741
821
  "p",
742
822
  {
743
823
  id: helperTextId,
@@ -756,7 +836,7 @@ var Input = React6.forwardRef(
756
836
  "aria-hidden": "true"
757
837
  }
758
838
  ),
759
- helperText
839
+ resolvedSupportText
760
840
  ]
761
841
  }
762
842
  )
@@ -826,6 +906,7 @@ var dropdownItemVariants = cva7([
826
906
  var Dropdown = React7.forwardRef(
827
907
  ({
828
908
  label,
909
+ asterisk,
829
910
  required,
830
911
  placeholder = "Input",
831
912
  options,
@@ -833,28 +914,37 @@ var Dropdown = React7.forwardRef(
833
914
  triggerMinWidth,
834
915
  error = false,
835
916
  disabled,
836
- showLabelIcon = false,
917
+ infoIcon,
918
+ showLabelIcon,
919
+ supportingText,
920
+ supportText,
837
921
  helperText,
838
- showHelperIcon = false,
922
+ supportIcon,
923
+ showHelperIcon,
839
924
  ...rootProps
840
925
  }, ref) => {
841
926
  const triggerId = React7.useId();
842
927
  const isDisabled = disabled ?? false;
843
- const helperTextId = helperText ? `${triggerId}-helper` : void 0;
928
+ const resolvedAsterisk = asterisk ?? required ?? false;
929
+ const resolvedInfoIcon = infoIcon ?? showLabelIcon ?? false;
930
+ const resolvedSupportText = supportText ?? helperText;
931
+ const shouldShowSupportingText = supportingText ?? Boolean(resolvedSupportText);
932
+ const resolvedSupportIcon = supportIcon ?? showHelperIcon ?? false;
933
+ const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${triggerId}-helper` : void 0;
844
934
  const helperTextColor = error ? "text-semantic-text-semantic-error-subtle" : "text-semantic-text-neutral-disabled";
845
- const HelperIcon = error ? WarningFilled2 : showHelperIcon ? Info2 : null;
935
+ const HelperIcon = error ? WarningFilled2 : resolvedSupportIcon ? Info2 : null;
846
936
  return /* @__PURE__ */ jsxs6("div", { className: "w-full flex flex-col gap-2", children: [
847
937
  label && /* @__PURE__ */ jsx7(
848
938
  Label,
849
939
  {
850
940
  htmlFor: triggerId,
851
- required,
852
- endAdornment: showLabelIcon ? /* @__PURE__ */ jsx7(Info2, { size: 16, className: "shrink-0 !text-semantic-text-neutral-tertiary", "aria-hidden": "true" }) : void 0,
941
+ required: resolvedAsterisk,
942
+ endAdornment: resolvedInfoIcon ? /* @__PURE__ */ jsx7(Info2, { size: 16, className: "shrink-0 !text-semantic-text-neutral-tertiary", "aria-hidden": "true" }) : void 0,
853
943
  className: "!m-0",
854
944
  children: label
855
945
  }
856
946
  ),
857
- /* @__PURE__ */ jsxs6(SelectPrimitive.Root, { ...rootProps, disabled: isDisabled, required, children: [
947
+ /* @__PURE__ */ jsxs6(SelectPrimitive.Root, { ...rootProps, disabled: isDisabled, required: resolvedAsterisk, children: [
858
948
  /* @__PURE__ */ jsxs6(
859
949
  SelectPrimitive.Trigger,
860
950
  {
@@ -903,7 +993,7 @@ var Dropdown = React7.forwardRef(
903
993
  }
904
994
  ) })
905
995
  ] }),
906
- helperText && /* @__PURE__ */ jsxs6(
996
+ shouldShowSupportingText && resolvedSupportText && /* @__PURE__ */ jsxs6(
907
997
  "p",
908
998
  {
909
999
  id: helperTextId,
@@ -917,7 +1007,7 @@ var Dropdown = React7.forwardRef(
917
1007
  "aria-hidden": "true"
918
1008
  }
919
1009
  ),
920
- helperText
1010
+ resolvedSupportText
921
1011
  ]
922
1012
  }
923
1013
  )
@@ -944,6 +1034,7 @@ var multiSelectCheckboxBox = "flex h-4 w-4 shrink-0 p-[3px] items-center justify
944
1034
  var DropdownMulti = React7.forwardRef(
945
1035
  ({
946
1036
  label,
1037
+ asterisk,
947
1038
  required,
948
1039
  placeholder = "Input",
949
1040
  options,
@@ -953,15 +1044,24 @@ var DropdownMulti = React7.forwardRef(
953
1044
  error = false,
954
1045
  disabled,
955
1046
  selectAllLabel = "Select all",
1047
+ infoIcon,
956
1048
  showLabelIcon = false,
1049
+ supportingText,
1050
+ supportText,
957
1051
  helperText,
1052
+ supportIcon,
958
1053
  showHelperIcon = false
959
1054
  }, ref) => {
960
1055
  const triggerId = React7.useId();
961
1056
  const [open, setOpen] = React7.useState(false);
962
- const helperTextId = helperText ? `${triggerId}-helper` : void 0;
1057
+ const resolvedAsterisk = asterisk ?? required ?? false;
1058
+ const resolvedInfoIcon = infoIcon ?? showLabelIcon ?? false;
1059
+ const resolvedSupportText = supportText ?? helperText;
1060
+ const shouldShowSupportingText = supportingText ?? Boolean(resolvedSupportText);
1061
+ const resolvedSupportIcon = supportIcon ?? showHelperIcon ?? false;
1062
+ const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${triggerId}-helper` : void 0;
963
1063
  const helperTextColor = error ? "text-semantic-text-semantic-error-subtle" : "text-semantic-text-neutral-tertiary";
964
- const HelperIcon = error ? InfoFilled2 : showHelperIcon ? Info2 : null;
1064
+ const HelperIcon = error ? InfoFilled2 : resolvedSupportIcon ? Info2 : null;
965
1065
  const allSelected = options.length > 0 && value.length === options.length;
966
1066
  const handleCheckedChange = (optValue, checked) => {
967
1067
  if (checked) {
@@ -987,8 +1087,8 @@ var DropdownMulti = React7.forwardRef(
987
1087
  Label,
988
1088
  {
989
1089
  htmlFor: triggerId,
990
- required,
991
- endAdornment: showLabelIcon ? /* @__PURE__ */ jsx7(Info2, { size: 16, className: "!text-semantic-text-neutral-tertiary shrink-0", "aria-hidden": "true" }) : void 0,
1090
+ required: resolvedAsterisk,
1091
+ endAdornment: resolvedInfoIcon ? /* @__PURE__ */ jsx7(Info2, { size: 16, className: "!text-semantic-text-neutral-tertiary shrink-0", "aria-hidden": "true" }) : void 0,
992
1092
  children: label
993
1093
  }
994
1094
  ),
@@ -1109,7 +1209,7 @@ var DropdownMulti = React7.forwardRef(
1109
1209
  }
1110
1210
  ) })
1111
1211
  ] }),
1112
- helperText && /* @__PURE__ */ jsxs6(
1212
+ shouldShowSupportingText && resolvedSupportText && /* @__PURE__ */ jsxs6(
1113
1213
  "p",
1114
1214
  {
1115
1215
  id: helperTextId,
@@ -1126,7 +1226,7 @@ var DropdownMulti = React7.forwardRef(
1126
1226
  "aria-hidden": "true"
1127
1227
  }
1128
1228
  ),
1129
- helperText
1229
+ resolvedSupportText
1130
1230
  ]
1131
1231
  }
1132
1232
  )
@@ -1308,17 +1408,24 @@ var Textarea = React9.forwardRef(
1308
1408
  ({
1309
1409
  className,
1310
1410
  label,
1411
+ asterisk,
1311
1412
  required,
1312
1413
  error,
1313
1414
  success,
1415
+ supportText,
1416
+ supportingText,
1314
1417
  helperText,
1315
1418
  helperError,
1316
1419
  disabled,
1317
1420
  value,
1318
1421
  rows = 3,
1319
1422
  maxLength = 250,
1423
+ characterCount,
1424
+ count,
1320
1425
  showCounter = true,
1426
+ infoIcon,
1321
1427
  showLabelIcon = false,
1428
+ supportIcon,
1322
1429
  showHelperIcon = false,
1323
1430
  onChange,
1324
1431
  ...props
@@ -1340,16 +1447,23 @@ var Textarea = React9.forwardRef(
1340
1447
  [onChange]
1341
1448
  );
1342
1449
  const textareaId = props.id || `textarea-${React9.useId()}`;
1343
- const helperTextId = helperText ? `${textareaId}-helper` : void 0;
1450
+ const resolvedAsterisk = asterisk ?? required ?? false;
1451
+ const resolvedInfoIcon = infoIcon ?? showLabelIcon ?? false;
1452
+ const resolvedSupportIcon = supportIcon ?? showHelperIcon ?? false;
1453
+ const resolvedSupportText = supportText ?? helperText;
1454
+ const shouldShowSupportingText = supportingText ?? Boolean(resolvedSupportText);
1455
+ const helperTextId = shouldShowSupportingText && resolvedSupportText ? `${textareaId}-helper` : void 0;
1456
+ const shouldShowCharacterCount = characterCount ?? showCounter;
1457
+ const countText = count ?? `${currentLength}/${maxLength}`;
1344
1458
  const helperTextColor = error ? "text-semantic-text-semantic-error-subtle" : success ? "text-semantic-text-semantic-success-subtle" : "text-semantic-text-neutral-tertiary";
1345
- const HelperIcon = error ? InfoFilled3 : success ? TickmarkFilled2 : showHelperIcon ? Info3 : null;
1459
+ const HelperIcon = error ? InfoFilled3 : success ? TickmarkFilled2 : resolvedSupportIcon ? Info3 : null;
1346
1460
  return /* @__PURE__ */ jsxs8("div", { className: "w-full", children: [
1347
1461
  label && /* @__PURE__ */ jsx9(
1348
1462
  Label,
1349
1463
  {
1350
1464
  htmlFor: textareaId,
1351
- required,
1352
- endAdornment: showLabelIcon ? /* @__PURE__ */ jsx9(Info3, { size: 16, className: "text-semantic-text-neutral-primary shrink-0", "aria-hidden": "true" }) : void 0,
1465
+ required: resolvedAsterisk,
1466
+ endAdornment: resolvedInfoIcon ? /* @__PURE__ */ jsx9(Info3, { size: 16, className: "text-semantic-text-neutral-primary shrink-0", "aria-hidden": "true" }) : void 0,
1353
1467
  children: label
1354
1468
  }
1355
1469
  ),
@@ -1369,8 +1483,8 @@ var Textarea = React9.forwardRef(
1369
1483
  ...props
1370
1484
  }
1371
1485
  ),
1372
- (helperText || showCounter) && /* @__PURE__ */ jsxs8("div", { className: "mt-1 flex items-center justify-between gap-2", children: [
1373
- helperText && /* @__PURE__ */ jsxs8(
1486
+ (shouldShowSupportingText || shouldShowCharacterCount) && /* @__PURE__ */ jsxs8("div", { className: "mt-1 flex items-center justify-between gap-2", children: [
1487
+ shouldShowSupportingText && resolvedSupportText && /* @__PURE__ */ jsxs8(
1374
1488
  "p",
1375
1489
  {
1376
1490
  id: helperTextId,
@@ -1390,27 +1504,23 @@ var Textarea = React9.forwardRef(
1390
1504
  "aria-hidden": "true"
1391
1505
  }
1392
1506
  ),
1393
- helperText
1507
+ resolvedSupportText
1394
1508
  ]
1395
1509
  }
1396
1510
  ),
1397
- showCounter && /* @__PURE__ */ jsxs8(
1511
+ shouldShowCharacterCount && /* @__PURE__ */ jsx9(
1398
1512
  "div",
1399
1513
  {
1400
1514
  className: cn9(
1401
1515
  "text-xs leading-4 select-none",
1402
1516
  // 12px font, 16px line-height
1403
1517
  disabled ? "text-semantic-text-neutral-disabled" : "text-semantic-text-neutral-tertiary",
1404
- helperText ? "" : "ml-auto"
1405
- // Push to right if no helper text
1518
+ shouldShowSupportingText && resolvedSupportText ? "" : "ml-auto"
1519
+ // Push to right if no support text
1406
1520
  ),
1407
1521
  "aria-live": "polite",
1408
1522
  "aria-atomic": "true",
1409
- children: [
1410
- currentLength,
1411
- "/",
1412
- maxLength
1413
- ]
1523
+ children: countText
1414
1524
  }
1415
1525
  )
1416
1526
  ] })
@@ -1470,19 +1580,26 @@ var TooltipContent = React10.forwardRef(
1470
1580
  className,
1471
1581
  variant,
1472
1582
  sideOffset = 12,
1583
+ direction,
1584
+ alignment,
1473
1585
  side = "bottom",
1474
1586
  align = "center",
1475
1587
  showArrow = true,
1476
1588
  title,
1477
1589
  description,
1478
- showCloseIcon = false,
1590
+ descriptionText,
1591
+ closeIcon,
1479
1592
  onClose,
1480
1593
  children,
1481
1594
  ...props
1482
1595
  }, ref) => {
1483
- const computedVariant = description || showCloseIcon ? "withDescription" : "default";
1596
+ const resolvedDirection = direction ?? side ?? "bottom";
1597
+ const resolvedAlignment = alignment === "middle" ? "center" : alignment ?? align ?? "center";
1598
+ const resolvedDescription = typeof description === "string" ? description : description ? descriptionText ?? "Description" : void 0;
1599
+ const resolvedCloseIcon = closeIcon;
1600
+ const computedVariant = resolvedDescription || resolvedCloseIcon ? "withDescription" : "default";
1484
1601
  const finalVariant = variant || computedVariant;
1485
- const CaretComponent = {
1602
+ const CaretComponentMap = {
1486
1603
  bottom: CaretUp,
1487
1604
  // Tooltip at bottom, arrow at top pointing up
1488
1605
  top: CaretDown,
@@ -1491,26 +1608,27 @@ var TooltipContent = React10.forwardRef(
1491
1608
  // Tooltip at left, arrow at right pointing right
1492
1609
  right: CaretLeft
1493
1610
  // Tooltip at right, arrow at left pointing left
1494
- }[side];
1611
+ };
1612
+ const CaretComponent = CaretComponentMap[resolvedDirection];
1495
1613
  const getCaretPosition = () => {
1496
- if (side === "bottom" || side === "top") {
1614
+ if (resolvedDirection === "bottom" || resolvedDirection === "top") {
1497
1615
  const baseClasses = "absolute left-1/2 -translate-x-1/2";
1498
- const sideClass = side === "bottom" ? "-top-[8px]" : "-bottom-[8px]";
1616
+ const sideClass = resolvedDirection === "bottom" ? "-top-[8px]" : "-bottom-[8px]";
1499
1617
  let alignClass = "";
1500
- if (align === "start") {
1618
+ if (resolvedAlignment === "start") {
1501
1619
  alignClass = "!left-4 !translate-x-0";
1502
- } else if (align === "end") {
1620
+ } else if (resolvedAlignment === "end") {
1503
1621
  alignClass = "!left-auto !right-4 !translate-x-0";
1504
1622
  }
1505
1623
  return `${baseClasses} ${sideClass} ${alignClass}`;
1506
1624
  }
1507
- if (side === "left" || side === "right") {
1625
+ if (resolvedDirection === "left" || resolvedDirection === "right") {
1508
1626
  const baseClasses = "absolute top-1/2 -translate-y-1/2";
1509
- const sideClass = side === "left" ? "-right-[8px]" : "-left-[8px]";
1627
+ const sideClass = resolvedDirection === "left" ? "-right-[8px]" : "-left-[8px]";
1510
1628
  let alignClass = "";
1511
- if (align === "start") {
1629
+ if (resolvedAlignment === "start") {
1512
1630
  alignClass = "!top-auto !bottom-4 !translate-y-0";
1513
- } else if (align === "end") {
1631
+ } else if (resolvedAlignment === "end") {
1514
1632
  alignClass = "!top-4 !translate-y-0";
1515
1633
  }
1516
1634
  return `${baseClasses} ${sideClass} ${alignClass}`;
@@ -1521,16 +1639,16 @@ var TooltipContent = React10.forwardRef(
1521
1639
  TooltipPrimitive.Content,
1522
1640
  {
1523
1641
  ref,
1524
- side,
1525
- align,
1642
+ side: resolvedDirection,
1643
+ align: resolvedAlignment,
1526
1644
  sideOffset,
1527
1645
  className: cn10(tooltipContentVariants({ variant: finalVariant }), "relative", className),
1528
1646
  ...props,
1529
1647
  children: [
1530
1648
  /* @__PURE__ */ jsxs9("div", { className: "w-full relative", children: [
1531
1649
  /* @__PURE__ */ jsx10("div", { className: "text-xs font-medium leading-4 text-semantic-text-neutralInverse-primary", children: title }),
1532
- description && /* @__PURE__ */ jsx10("div", { className: "text-xs font-normal leading-4 text-semantic-text-neutralInverse-primary opacity-semantic-description mt-1", children: description }),
1533
- showCloseIcon && /* @__PURE__ */ jsx10(
1650
+ resolvedDescription && /* @__PURE__ */ jsx10("div", { className: "text-xs font-normal leading-4 text-semantic-text-neutralInverse-primary opacity-semantic-description mt-1", children: resolvedDescription }),
1651
+ resolvedCloseIcon && /* @__PURE__ */ jsx10(
1534
1652
  "button",
1535
1653
  {
1536
1654
  onClick: onClose,
@@ -1725,7 +1843,7 @@ function useTabsType() {
1725
1843
  return ctx?.tabType ?? "container";
1726
1844
  }
1727
1845
  var TabsRoot = React13.forwardRef(
1728
- ({ type = "container", className, ...props }, ref) => /* @__PURE__ */ jsx13(TabsContext.Provider, { value: { tabType: type }, children: /* @__PURE__ */ jsx13(TabsPrimitive.Root, { ref, className: cn13(className), ...props }) })
1846
+ ({ type = "container", count, className, ...props }, ref) => /* @__PURE__ */ jsx13(TabsContext.Provider, { value: { tabType: type, tabCount: count }, children: /* @__PURE__ */ jsx13(TabsPrimitive.Root, { ref, className: cn13(className), ...props }) })
1729
1847
  );
1730
1848
  TabsRoot.displayName = "Tabs";
1731
1849
  var TabsList = React13.forwardRef(({ className, type, ...props }, ref) => {
@@ -1784,7 +1902,7 @@ var avatarVariants = cva13(
1784
1902
  {
1785
1903
  variants: {
1786
1904
  size: {
1787
- large: "h-8 w-8",
1905
+ big: "h-8 w-8",
1788
1906
  // 32×32 (Big)
1789
1907
  medium: "h-6 w-6",
1790
1908
  // 24×24 (Medium)
@@ -1793,28 +1911,30 @@ var avatarVariants = cva13(
1793
1911
  }
1794
1912
  },
1795
1913
  defaultVariants: {
1796
- size: "large"
1914
+ size: "big"
1797
1915
  }
1798
1916
  }
1799
1917
  );
1800
1918
  var letterTextClassBySize = {
1801
- large: "text-base font-medium leading-6 text-semantic-text-neutral-tertiary",
1919
+ big: "text-base font-medium leading-6 text-semantic-text-neutral-tertiary",
1802
1920
  medium: "text-3xs font-medium leading-4 text-semantic-text-neutral-tertiary",
1803
1921
  small: "text-3xs font-medium leading-4 text-semantic-text-neutral-tertiary"
1804
1922
  };
1805
1923
  var Avatar = React14.forwardRef(
1806
- ({ className, size = "large", variant = "image", src, alt = "", children, ...props }, ref) => {
1924
+ ({ className, size = "big", type = "icon", variant, src, alt = "", children, ...props }, ref) => {
1807
1925
  const [imgFailed, setImgFailed] = React14.useState(false);
1808
- const showImg = variant === "image" && src && !imgFailed;
1809
- const showLetter = variant === "letter" || variant === "image" && !showImg && children;
1810
- const sizePx = size === "large" ? 32 : size === "medium" ? 24 : 20;
1926
+ const resolvedType = (variant === "image" ? "icon" : variant) ?? type;
1927
+ const resolvedSize = size === "large" ? "big" : size;
1928
+ const showImg = resolvedType === "icon" && src && !imgFailed;
1929
+ const showLetter = resolvedType === "letter" || resolvedType === "icon" && !showImg && children;
1930
+ const sizePx = resolvedSize === "big" ? 32 : resolvedSize === "medium" ? 24 : 20;
1811
1931
  return /* @__PURE__ */ jsx14(
1812
1932
  "span",
1813
1933
  {
1814
1934
  ref,
1815
1935
  role: "img",
1816
1936
  "aria-label": alt || (typeof children === "string" ? children : void 0),
1817
- className: cn14(avatarVariants({ size }), className),
1937
+ className: cn14(avatarVariants({ size: resolvedSize }), className),
1818
1938
  ...props,
1819
1939
  children: showImg ? /* @__PURE__ */ jsx14(
1820
1940
  "img",
@@ -1831,7 +1951,7 @@ var Avatar = React14.forwardRef(
1831
1951
  {
1832
1952
  className: cn14(
1833
1953
  "flex h-full w-full items-center justify-center",
1834
- letterTextClassBySize[size ?? "large"]
1954
+ letterTextClassBySize[resolvedSize ?? "big"]
1835
1955
  ),
1836
1956
  children
1837
1957
  }
@@ -1884,7 +2004,7 @@ var MenuContent = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
1884
2004
  }
1885
2005
  ));
1886
2006
  MenuContent.displayName = "MenuContent";
1887
- var MenuItem = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
2007
+ var MenuItem = React15.forwardRef(({ className, children, leadingIcon, ...props }, ref) => /* @__PURE__ */ jsx15(
1888
2008
  MenubarPrimitive.Item,
1889
2009
  {
1890
2010
  ref,
@@ -1896,7 +2016,11 @@ var MenuItem = React15.forwardRef(({ className, ...props }, ref) => /* @__PURE__
1896
2016
  "data-[highlighted]:bg-semantic-background-neutral-tertiary",
1897
2017
  className
1898
2018
  ),
1899
- ...props
2019
+ ...props,
2020
+ children: leadingIcon ? /* @__PURE__ */ jsxs11("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
2021
+ /* @__PURE__ */ jsx15("span", { className: "inline-flex shrink-0 items-center text-semantic-icon-neutral-tertiary [&_svg]:shrink-0", children: leadingIcon }),
2022
+ /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1", children })
2023
+ ] }) : children
1900
2024
  }
1901
2025
  ));
1902
2026
  MenuItem.displayName = "MenuItem";
@@ -2291,10 +2415,12 @@ function Popup({
2291
2415
  onOpenChange,
2292
2416
  title,
2293
2417
  subtext,
2418
+ showSubtext = true,
2294
2419
  children,
2295
2420
  showBodyBox = false,
2296
2421
  cancelText,
2297
2422
  ctaText,
2423
+ showCTA = true,
2298
2424
  onCancelClick,
2299
2425
  onCtaClick,
2300
2426
  showClose = true,
@@ -2305,13 +2431,16 @@ function Popup({
2305
2431
  }) {
2306
2432
  const titleId = React18.useId();
2307
2433
  const descriptionId = React18.useId();
2434
+ const resolvedSubtext = showSubtext ? subtext : void 0;
2435
+ const resolvedCtaText = showCTA ? ctaText : void 0;
2436
+ const resolvedCancelText = showCTA ? cancelText : void 0;
2308
2437
  return /* @__PURE__ */ jsx18(DialogPrimitive2.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs13(DialogPrimitive2.Portal, { children: [
2309
2438
  showOverlay && /* @__PURE__ */ jsx18(DialogPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-semantic-background-neutralInverse-primary opacity-semantic-disabled" }),
2310
2439
  /* @__PURE__ */ jsx18(
2311
2440
  DialogPrimitive2.Content,
2312
2441
  {
2313
2442
  "aria-labelledby": titleId,
2314
- "aria-describedby": subtext ? descriptionId : void 0,
2443
+ "aria-describedby": resolvedSubtext ? descriptionId : void 0,
2315
2444
  className: cn18(
2316
2445
  // Centered fixed wrapper (shadcn/dialog-like behavior)
2317
2446
  "fixed left-1/2 top-1/2 z-[60] -translate-x-1/2 -translate-y-1/2 focus:outline-none",
@@ -2322,11 +2451,11 @@ function Popup({
2322
2451
  PopupContent,
2323
2452
  {
2324
2453
  title,
2325
- subtext,
2454
+ subtext: resolvedSubtext,
2326
2455
  titleId,
2327
2456
  descriptionId,
2328
- cancelText,
2329
- ctaText,
2457
+ cancelText: resolvedCancelText,
2458
+ ctaText: resolvedCtaText,
2330
2459
  onCancelClick,
2331
2460
  onCtaClick,
2332
2461
  showClose,
@@ -2344,8 +2473,10 @@ function Popup({
2344
2473
  function PopupTrigger({
2345
2474
  title,
2346
2475
  subtext,
2476
+ showSubtext = true,
2347
2477
  cancelText,
2348
2478
  ctaText,
2479
+ showCTA = true,
2349
2480
  showClose = true,
2350
2481
  showOverlay = true,
2351
2482
  autoFocusClose = true,
@@ -2365,8 +2496,10 @@ function PopupTrigger({
2365
2496
  onOpenChange: setOpen,
2366
2497
  title,
2367
2498
  subtext,
2499
+ showSubtext,
2368
2500
  cancelText,
2369
2501
  ctaText,
2502
+ showCTA,
2370
2503
  showClose,
2371
2504
  showOverlay,
2372
2505
  autoFocusClose,
@@ -2408,6 +2541,8 @@ var badgeVariants = cva14(
2408
2541
  rounded: "rounded-sm",
2409
2542
  // 8px border radius (tokens radius.sm = 0.5rem)
2410
2543
  pill: "rounded-full",
2544
+ number: "rounded-full",
2545
+ /** @deprecated Use `number` instead. Kept for backwards compatibility. */
2411
2546
  notification: "rounded-full"
2412
2547
  },
2413
2548
  state: {
@@ -2425,13 +2560,15 @@ var badgeVariants = cva14(
2425
2560
  }
2426
2561
  },
2427
2562
  compoundVariants: [
2428
- // Big: rounded/pill 48×24, notification 24×24
2563
+ // Big: rounded/pill 48×24, number/notification 24×24
2429
2564
  { size: "big", variant: "rounded", class: "h-6 min-w-12 py-1 px-2" },
2430
2565
  { size: "big", variant: "pill", class: "h-6 min-w-12 py-1 px-2" },
2566
+ { size: "big", variant: "number", class: "h-6 w-6 p-0" },
2431
2567
  { size: "big", variant: "notification", class: "h-6 w-6 p-0" },
2432
- // Small: rounded/pill 48×20, notification 20×20; padding top=2 bottom=2 left=8 right=8
2568
+ // Small: rounded/pill 48×20, number/notification 20×20; padding top=2 bottom=2 left=8 right=8
2433
2569
  { size: "small", variant: "rounded", class: "h-5 min-w-12 py-0.5 px-2" },
2434
2570
  { size: "small", variant: "pill", class: "h-5 min-w-12 py-0.5 px-2" },
2571
+ { size: "small", variant: "number", class: "h-5 w-5 p-0" },
2435
2572
  { size: "small", variant: "notification", class: "h-5 w-5 p-0" },
2436
2573
  // Info (subtle/solid from semantic tokens)
2437
2574
  {
@@ -2535,19 +2672,29 @@ var Badge = React19.forwardRef(
2535
2672
  ({
2536
2673
  className,
2537
2674
  size,
2675
+ type,
2538
2676
  variant,
2539
2677
  state,
2540
2678
  appearance,
2679
+ text,
2680
+ number,
2541
2681
  children,
2682
+ solid = false,
2542
2683
  isSolid = false,
2543
2684
  leadingIcon = false,
2685
+ dropdown = false,
2544
2686
  dropdownIcon = false,
2687
+ closeIcon = false,
2545
2688
  closable = false,
2546
2689
  onClose,
2547
2690
  ...props
2548
2691
  }, ref) => {
2549
- const resolvedAppearance = isSolid ? "solid" : appearance;
2692
+ const resolvedType = (variant === "notification" ? "number" : variant) ?? type ?? "rounded";
2693
+ const resolvedAppearance = solid || isSolid ? "solid" : appearance;
2550
2694
  const resolvedState = state ?? "neutral";
2695
+ const resolvedDropdown = dropdown || dropdownIcon;
2696
+ const resolvedCloseIcon = closeIcon || closable;
2697
+ const resolvedContent = resolvedType === "number" ? number ?? text ?? children : text ?? children;
2551
2698
  const LeadingIcon = leadingIconMap[resolvedState];
2552
2699
  const showLeadingIcon = leadingIcon && !!LeadingIcon;
2553
2700
  const onCloseClick = (event) => {
@@ -2562,7 +2709,7 @@ var Badge = React19.forwardRef(
2562
2709
  {
2563
2710
  ref,
2564
2711
  className: cn19(
2565
- badgeVariants({ size, variant, state: resolvedState, appearance: resolvedAppearance }),
2712
+ badgeVariants({ size, variant: resolvedType, state: resolvedState, appearance: resolvedAppearance }),
2566
2713
  className
2567
2714
  ),
2568
2715
  ...props,
@@ -2578,8 +2725,8 @@ var Badge = React19.forwardRef(
2578
2725
  "aria-hidden": "true"
2579
2726
  }
2580
2727
  ),
2581
- children,
2582
- dropdownIcon && /* @__PURE__ */ jsx19(
2728
+ resolvedContent,
2729
+ resolvedDropdown && /* @__PURE__ */ jsx19(
2583
2730
  ChevronDown2,
2584
2731
  {
2585
2732
  size: dropdownChevronSize,
@@ -2590,7 +2737,7 @@ var Badge = React19.forwardRef(
2590
2737
  "aria-hidden": "true"
2591
2738
  }
2592
2739
  ),
2593
- closable && /* @__PURE__ */ jsx19(
2740
+ resolvedCloseIcon && /* @__PURE__ */ jsx19(
2594
2741
  "button",
2595
2742
  {
2596
2743
  type: "button",
@@ -2736,11 +2883,13 @@ var Chip = React21.forwardRef(
2736
2883
  selected = false,
2737
2884
  disabled = false,
2738
2885
  onDismiss,
2739
- showLeadingIcon = false,
2886
+ closeIcon,
2887
+ leadingIcon = false,
2740
2888
  children,
2741
2889
  ...props
2742
2890
  }, ref) => {
2743
2891
  const iconSize = size === "large" ? 16 : 12;
2892
+ const shouldShowCloseIcon = closeIcon ?? onDismiss != null;
2744
2893
  return /* @__PURE__ */ jsxs16(
2745
2894
  "div",
2746
2895
  {
@@ -2752,7 +2901,7 @@ var Chip = React21.forwardRef(
2752
2901
  "data-state": selected ? "selected" : void 0,
2753
2902
  ...props,
2754
2903
  children: [
2755
- showLeadingIcon && /* @__PURE__ */ jsx21(
2904
+ leadingIcon && /* @__PURE__ */ jsx21(
2756
2905
  "span",
2757
2906
  {
2758
2907
  className: "shrink-0 inline-flex items-center justify-center text-inherit",
@@ -2761,13 +2910,13 @@ var Chip = React21.forwardRef(
2761
2910
  }
2762
2911
  ),
2763
2912
  /* @__PURE__ */ jsx21("span", { className: "truncate", children }),
2764
- onDismiss != null && /* @__PURE__ */ jsx21(
2913
+ shouldShowCloseIcon && /* @__PURE__ */ jsx21(
2765
2914
  "button",
2766
2915
  {
2767
2916
  type: "button",
2768
2917
  onClick: (e) => {
2769
2918
  e.stopPropagation();
2770
- if (!disabled) onDismiss();
2919
+ if (!disabled) onDismiss?.();
2771
2920
  },
2772
2921
  disabled,
2773
2922
  className: "shrink-0 p-0 border-0 bg-transparent cursor-pointer rounded-full inline-flex items-center justify-center text-inherit focus:outline-none focus-visible:ring-0 disabled:pointer-events-none",
@@ -2987,8 +3136,8 @@ import { Tickmark as Tickmark3 } from "@esds-sangam/icons";
2987
3136
  import { cn as cn23 } from "@esds-sangam/utils";
2988
3137
  import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
2989
3138
  var circleBase = "flex h-6 w-6 shrink-0 items-center justify-center rounded-full border text-sm font-medium leading-6";
2990
- function getCircleClasses(variant) {
2991
- switch (variant) {
3139
+ function getCircleClasses(states) {
3140
+ switch (states) {
2992
3141
  case "inProgress":
2993
3142
  return cn23(
2994
3143
  circleBase,
@@ -3013,8 +3162,8 @@ function getCircleClasses(variant) {
3013
3162
  );
3014
3163
  }
3015
3164
  }
3016
- function getTextClasses(variant) {
3017
- switch (variant) {
3165
+ function getTextClasses(states) {
3166
+ switch (states) {
3018
3167
  case "default":
3019
3168
  return {
3020
3169
  title: "text-semantic-text-neutral-tertiary",
@@ -3037,44 +3186,67 @@ function getTextClasses(variant) {
3037
3186
  };
3038
3187
  }
3039
3188
  }
3040
- function getLineColor(currentVariant) {
3041
- return currentVariant === "complete" ? "bg-semantic-background-semantic-success-default" : "bg-semantic-background-neutral-tertiary";
3189
+ function getLineColor(states) {
3190
+ return states === "complete" ? "bg-semantic-background-semantic-success-default" : "bg-semantic-background-neutral-tertiary";
3042
3191
  }
3043
- var Stepper = React23.forwardRef(({ className, steps, ...props }, ref) => {
3044
- return /* @__PURE__ */ jsx23("div", { ref, className: cn23("flex flex-col", className), ...props, children: steps.map((step, index) => {
3045
- const isLast = index === steps.length - 1;
3046
- const titleId = `stepper-title-${index}`;
3047
- const textClasses = getTextClasses(step.variant);
3048
- const circleClasses = getCircleClasses(step.variant);
3049
- return /* @__PURE__ */ jsxs18("div", { className: "flex items-stretch gap-3", children: [
3050
- /* @__PURE__ */ jsxs18(
3051
- "div",
3052
- {
3053
- className: cn23(
3054
- "flex w-6 flex-col items-center",
3055
- !isLast && "h-7xl"
3056
- ),
3057
- children: [
3058
- /* @__PURE__ */ jsx23(
3059
- "div",
3060
- {
3061
- "aria-labelledby": titleId,
3062
- "aria-current": step.variant === "inProgress" ? "step" : void 0,
3063
- className: circleClasses,
3064
- children: step.variant === "complete" ? /* @__PURE__ */ jsx23(Tickmark3, { size: 16, className: "text-semantic-icon-semantic-success-subtle", "aria-hidden": true }) : index + 1
3065
- }
3192
+ var Stepper = React23.forwardRef(
3193
+ ({
3194
+ className,
3195
+ steps,
3196
+ states = "default",
3197
+ showLine = true,
3198
+ title = "Create order",
3199
+ description = "Start by creating a new order",
3200
+ stepNumber = 1,
3201
+ ...props
3202
+ }, ref) => {
3203
+ const resolvedSteps = steps && steps.length > 0 ? steps : [
3204
+ {
3205
+ title,
3206
+ description,
3207
+ states,
3208
+ stepNumber,
3209
+ showLine
3210
+ }
3211
+ ];
3212
+ return /* @__PURE__ */ jsx23("div", { ref, className: cn23("flex flex-col", className), ...props, children: resolvedSteps.map((step, index) => {
3213
+ const isLast = index === resolvedSteps.length - 1;
3214
+ const titleId = `stepper-title-${index}`;
3215
+ const stepState = step.states ?? step.variant ?? "default";
3216
+ const stepDescription = step.description ?? step.subtext;
3217
+ const shouldShowLine = step.showLine !== void 0 ? step.showLine : steps && steps.length > 0 ? !isLast : showLine;
3218
+ const textClasses = getTextClasses(stepState);
3219
+ const circleClasses = getCircleClasses(stepState);
3220
+ return /* @__PURE__ */ jsxs18("div", { className: "flex items-stretch gap-3", children: [
3221
+ /* @__PURE__ */ jsxs18(
3222
+ "div",
3223
+ {
3224
+ className: cn23(
3225
+ "flex w-6 flex-col items-center",
3226
+ shouldShowLine && "h-7xl"
3066
3227
  ),
3067
- !isLast ? /* @__PURE__ */ jsx23("div", { className: cn23("w-[2px] min-h-0 flex-1 rounded-full", getLineColor(step.variant)), "aria-hidden": true }) : null
3068
- ]
3069
- }
3070
- ),
3071
- /* @__PURE__ */ jsxs18("div", { className: "min-w-0 pb-2", children: [
3072
- /* @__PURE__ */ jsx23("div", { id: titleId, className: "text-sm font-medium leading-6 break-words", children: /* @__PURE__ */ jsx23("span", { className: textClasses.title, children: step.title }) }),
3073
- step.subtext != null ? /* @__PURE__ */ jsx23("div", { className: "text-xs font-normal leading-4 break-words", children: /* @__PURE__ */ jsx23("span", { className: textClasses.subtext, children: step.subtext }) }) : null
3074
- ] })
3075
- ] }, index);
3076
- }) });
3077
- });
3228
+ children: [
3229
+ /* @__PURE__ */ jsx23(
3230
+ "div",
3231
+ {
3232
+ "aria-labelledby": titleId,
3233
+ "aria-current": stepState === "inProgress" ? "step" : void 0,
3234
+ className: circleClasses,
3235
+ children: stepState === "complete" ? /* @__PURE__ */ jsx23(Tickmark3, { size: 16, className: "text-semantic-icon-semantic-success-subtle", "aria-hidden": true }) : step.stepNumber ?? index + 1
3236
+ }
3237
+ ),
3238
+ shouldShowLine ? /* @__PURE__ */ jsx23("div", { className: cn23("w-[2px] min-h-0 flex-1 rounded-full", getLineColor(stepState)), "aria-hidden": true }) : null
3239
+ ]
3240
+ }
3241
+ ),
3242
+ /* @__PURE__ */ jsxs18("div", { className: "min-w-0 pb-2", children: [
3243
+ /* @__PURE__ */ jsx23("div", { id: titleId, className: "text-sm font-medium leading-6 break-words", children: /* @__PURE__ */ jsx23("span", { className: textClasses.title, children: step.title }) }),
3244
+ stepDescription != null ? /* @__PURE__ */ jsx23("div", { className: "text-xs font-normal leading-4 break-words", children: /* @__PURE__ */ jsx23("span", { className: textClasses.subtext, children: stepDescription }) }) : null
3245
+ ] })
3246
+ ] }, index);
3247
+ }) });
3248
+ }
3249
+ );
3078
3250
  Stepper.displayName = "Stepper";
3079
3251
 
3080
3252
  // src/components/toast.tsx
@@ -3150,11 +3322,13 @@ function ToastProvider({ children }) {
3150
3322
  children: toasts.map((t) => /* @__PURE__ */ jsx24(ToastItemWrapper, { children: /* @__PURE__ */ jsx24(
3151
3323
  Toast,
3152
3324
  {
3153
- variant: t.variant ?? "info",
3325
+ types: t.types ?? t.variant ?? "info",
3154
3326
  title: t.title,
3155
3327
  description: t.description,
3156
- showClose: t.showClose ?? true,
3328
+ descriptionText: t.descriptionText,
3329
+ close: t.close ?? t.showClose ?? true,
3157
3330
  onClose: () => removeToast(t.id),
3331
+ cta: t.cta,
3158
3332
  ctaText: t.ctaText,
3159
3333
  onCtaClick: t.onCtaClick
3160
3334
  }
@@ -3197,45 +3371,52 @@ var toastVariants = cva17(
3197
3371
  var Toast = React24.forwardRef(
3198
3372
  ({
3199
3373
  className,
3374
+ types,
3200
3375
  variant = "info",
3201
3376
  title,
3202
3377
  description,
3378
+ descriptionText,
3379
+ close,
3203
3380
  showClose = true,
3204
3381
  onClose,
3382
+ cta,
3205
3383
  ctaText,
3206
3384
  onCtaClick,
3207
3385
  ...props
3208
3386
  }, ref) => {
3209
- const hasCTA = Boolean(ctaText);
3210
- const shouldShowClose = showClose && !hasCTA;
3211
- const hasExtendedContent = Boolean(hasCTA || description);
3387
+ const resolvedTypes = types ?? variant ?? "info";
3388
+ const resolvedDescription = typeof description === "string" ? description : description ? descriptionText ?? "Description" : void 0;
3389
+ const resolvedCtaText = typeof cta === "string" ? cta : cta === false ? void 0 : cta ? ctaText ?? "Button" : ctaText;
3390
+ const hasCTA = Boolean(resolvedCtaText);
3391
+ const shouldShowClose = close ?? showClose;
3392
+ const hasExtendedContent = Boolean(hasCTA || resolvedDescription);
3212
3393
  const layout = hasExtendedContent ? "withDescription" : "default";
3213
- const shouldShowDescription = description && !hasCTA;
3394
+ const shouldShowDescription = resolvedDescription;
3214
3395
  const IconComponent = {
3215
3396
  info: InfoFilled5,
3216
3397
  success: TickmarkFilled5,
3217
3398
  warning: WarningFilled4,
3218
3399
  error: WarningFilled4
3219
- }[variant];
3400
+ }[resolvedTypes];
3220
3401
  const iconClassName = {
3221
3402
  info: "!text-semantic-icon-semantic-info-subtle",
3222
3403
  success: "!text-semantic-icon-semantic-success-subtle",
3223
3404
  warning: "!text-semantic-icon-semantic-warning-subtle",
3224
3405
  error: "!text-semantic-icon-semantic-error-subtle"
3225
- }[variant];
3406
+ }[resolvedTypes];
3226
3407
  return /* @__PURE__ */ jsxs19(
3227
3408
  "div",
3228
3409
  {
3229
3410
  ref,
3230
3411
  role: "alert",
3231
- className: cn24(toastVariants({ variant, layout }), className),
3412
+ className: cn24(toastVariants({ variant: resolvedTypes, layout }), className),
3232
3413
  ...props,
3233
3414
  children: [
3234
3415
  /* @__PURE__ */ jsx24("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx24(IconComponent, { size: 20, className: iconClassName, "aria-hidden": "true" }) }),
3235
3416
  /* @__PURE__ */ jsxs19("div", { className: "flex-1 min-w-0 flex flex-col gap-4", children: [
3236
3417
  /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2", children: [
3237
3418
  /* @__PURE__ */ jsx24("p", { className: "text-base font-medium leading-6 text-semantic-text-neutral-primary", children: title }),
3238
- shouldShowDescription && /* @__PURE__ */ jsx24("p", { className: "text-sm font-normal leading-6 text-semantic-text-neutral-tertiary", children: description })
3419
+ shouldShowDescription && /* @__PURE__ */ jsx24("p", { className: "text-sm font-normal leading-6 text-semantic-text-neutral-tertiary", children: resolvedDescription })
3239
3420
  ] }),
3240
3421
  hasCTA && /* @__PURE__ */ jsx24(
3241
3422
  Button,
@@ -3244,7 +3425,7 @@ var Toast = React24.forwardRef(
3244
3425
  size: "small",
3245
3426
  variant: "primary",
3246
3427
  className: "w-auto self-start",
3247
- children: ctaText
3428
+ children: resolvedCtaText
3248
3429
  }
3249
3430
  )
3250
3431
  ] }),
@@ -3269,8 +3450,8 @@ Toast.displayName = "Toast";
3269
3450
  import * as React25 from "react";
3270
3451
  import { cva as cva18 } from "class-variance-authority";
3271
3452
  import { cn as cn25 } from "@esds-sangam/utils";
3272
- import { ArrowLeft, Close as Close10 } from "@esds-sangam/icons";
3273
- import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
3453
+ import { ArrowLeft, Close as Close10, Maximize } from "@esds-sangam/icons";
3454
+ import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
3274
3455
  var pageHeaderVariants = cva18("w-full", {
3275
3456
  variants: {
3276
3457
  variant: {
@@ -3298,25 +3479,43 @@ var PageHeader = React25.forwardRef(
3298
3479
  onBackClick,
3299
3480
  showTitle = true,
3300
3481
  badgeLabel,
3482
+ badge,
3483
+ badgeName,
3301
3484
  showSubtext,
3302
3485
  subtext,
3303
3486
  primaryAction,
3304
3487
  secondaryAction,
3305
3488
  tertiaryAction,
3489
+ ctas,
3490
+ firstCta,
3491
+ firstCtaLabel = "Button label",
3492
+ secondCta,
3493
+ secondCtaLabel = "Button label",
3494
+ thirdCta,
3495
+ thirdCtaLabel = "Button label",
3306
3496
  closeIcon,
3307
3497
  onCloseClick,
3498
+ showMaximise,
3499
+ onMaximiseClick,
3500
+ breadcrumbs,
3308
3501
  ...props
3309
3502
  }, ref) => {
3310
3503
  const isControlled = tab !== void 0;
3311
3504
  const tabsValue = isControlled ? tab : defaultTab ?? tabs[0]?.value;
3312
3505
  const hasTabs = tabs.length > 0;
3313
- const hasActions = !!primaryAction || !!secondaryAction || !!tertiaryAction || !!closeIcon;
3506
+ const derivedTertiaryAction = ctas && firstCta ? { label: firstCtaLabel, variant: "primary", icon: null } : void 0;
3507
+ const derivedSecondaryAction = ctas && secondCta ? { label: secondCtaLabel, variant: "secondary", icon: null } : void 0;
3508
+ const derivedPrimaryAction = ctas && thirdCta ? { label: thirdCtaLabel, variant: "primary", icon: null } : void 0;
3509
+ const resolvedTertiaryAction = ctas ? derivedTertiaryAction : tertiaryAction;
3510
+ const resolvedSecondaryAction = ctas ? derivedSecondaryAction : secondaryAction;
3511
+ const resolvedPrimaryAction = ctas ? derivedPrimaryAction : primaryAction;
3512
+ const hasActions = !!resolvedPrimaryAction || !!resolvedSecondaryAction || !!resolvedTertiaryAction || !!showMaximise || !!closeIcon;
3314
3513
  const renderActions = () => {
3315
3514
  if (!hasActions) return null;
3316
3515
  const actions = [];
3317
- if (tertiaryAction) actions.push(tertiaryAction);
3318
- if (secondaryAction) actions.push(secondaryAction);
3319
- if (primaryAction) actions.push(primaryAction);
3516
+ if (resolvedTertiaryAction) actions.push(resolvedTertiaryAction);
3517
+ if (resolvedSecondaryAction) actions.push(resolvedSecondaryAction);
3518
+ if (resolvedPrimaryAction) actions.push(resolvedPrimaryAction);
3320
3519
  return /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
3321
3520
  actions.map((action, index) => {
3322
3521
  const { label, onClick, variant: actionVariant, icon, iconPosition } = action;
@@ -3336,11 +3535,22 @@ var PageHeader = React25.forwardRef(
3336
3535
  `${label}-${index}`
3337
3536
  );
3338
3537
  }),
3538
+ showMaximise && /* @__PURE__ */ jsx25(
3539
+ Maximize,
3540
+ {
3541
+ size: 16,
3542
+ className: "cursor-pointer",
3543
+ "aria-label": "Maximise",
3544
+ onClick: onMaximiseClick
3545
+ }
3546
+ ),
3339
3547
  closeIcon && /* @__PURE__ */ jsx25(Close10, { size: 16, className: "cursor-pointer", "aria-label": "Close", onClick: onCloseClick })
3340
3548
  ] });
3341
3549
  };
3342
3550
  const showTitleSection = variant === "withTitle" || variant === "titleTabs";
3343
3551
  const showTabsSection = variant === "withTabs" || variant === "titleTabs";
3552
+ const resolvedBadgeName = badgeName ?? badgeLabel ?? "";
3553
+ const shouldShowBadge = badge !== void 0 ? badge && resolvedBadgeName.length > 0 : Boolean(badgeLabel);
3344
3554
  return /* @__PURE__ */ jsxs20(
3345
3555
  "header",
3346
3556
  {
@@ -3360,17 +3570,19 @@ var PageHeader = React25.forwardRef(
3360
3570
  onClick: onBackClick
3361
3571
  }
3362
3572
  ),
3363
- showTitle && /* @__PURE__ */ jsx25(
3364
- "h2",
3365
- {
3366
- className: cn25(
3367
- "truncate text-xl font-semibold leading-7 text-semantic-text-neutral-primary",
3368
- titleClassName
3369
- ),
3370
- children: title
3371
- }
3372
- ),
3373
- badgeLabel && /* @__PURE__ */ jsx25(Badge, { size: "big", variant: "rounded", state: "info", children: badgeLabel })
3573
+ breadcrumbs ? /* @__PURE__ */ jsx25("div", { className: "min-w-0 truncate", children: breadcrumbs }) : /* @__PURE__ */ jsxs20(Fragment4, { children: [
3574
+ showTitle && /* @__PURE__ */ jsx25(
3575
+ "h2",
3576
+ {
3577
+ className: cn25(
3578
+ "truncate text-xl font-semibold leading-7 text-semantic-text-neutral-primary",
3579
+ titleClassName
3580
+ ),
3581
+ children: title
3582
+ }
3583
+ ),
3584
+ shouldShowBadge && /* @__PURE__ */ jsx25(Badge, { size: "big", variant: "rounded", state: "info", children: resolvedBadgeName })
3585
+ ] })
3374
3586
  ] }),
3375
3587
  renderActions()
3376
3588
  ] }),
@@ -3415,12 +3627,40 @@ var PageHeader = React25.forwardRef(
3415
3627
  );
3416
3628
  PageHeader.displayName = "PageHeader";
3417
3629
 
3418
- // src/patterns/PageFooter.tsx
3630
+ // src/patterns/Breadcrumbs.tsx
3419
3631
  import * as React26 from "react";
3420
3632
  import { cn as cn26 } from "@esds-sangam/utils";
3421
- import { jsx as jsx26 } from "react/jsx-runtime";
3633
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
3634
+ var ACTIVE_TEXT_STYLES = "text-xl font-semibold leading-7 text-semantic-text-neutral-primary";
3635
+ var INACTIVE_TEXT_STYLES = "text-xl font-medium leading-7 text-semantic-text-neutral-tertiary";
3636
+ var Breadcrumbs = React26.forwardRef(
3637
+ ({ className, type = "onlyTitle", title, l1, l2, ...props }, ref) => {
3638
+ return /* @__PURE__ */ jsxs21(
3639
+ "nav",
3640
+ {
3641
+ ref,
3642
+ "aria-label": "Breadcrumbs",
3643
+ className: cn26("inline-flex items-center gap-2", className),
3644
+ ...props,
3645
+ children: [
3646
+ type !== "onlyTitle" && l1 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, children: l1 }) : null,
3647
+ type !== "onlyTitle" && l1 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, "aria-hidden": true, children: "/" }) : null,
3648
+ type === "L2" && l2 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, children: l2 }) : null,
3649
+ type === "L2" && l2 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, "aria-hidden": true, children: "/" }) : null,
3650
+ /* @__PURE__ */ jsx26("span", { className: ACTIVE_TEXT_STYLES, children: title })
3651
+ ]
3652
+ }
3653
+ );
3654
+ }
3655
+ );
3656
+ Breadcrumbs.displayName = "Breadcrumbs";
3657
+
3658
+ // src/patterns/PageFooter.tsx
3659
+ import * as React27 from "react";
3660
+ import { cn as cn27 } from "@esds-sangam/utils";
3661
+ import { jsx as jsx27 } from "react/jsx-runtime";
3422
3662
  var PAGE_FOOTER_WIDTH = 532;
3423
- var PageFooter = React26.forwardRef(
3663
+ var PageFooter = React27.forwardRef(
3424
3664
  ({
3425
3665
  className,
3426
3666
  children,
@@ -3436,11 +3676,11 @@ var PageFooter = React26.forwardRef(
3436
3676
  const actions = [];
3437
3677
  if (secondaryAction) actions.push(secondaryAction);
3438
3678
  if (primaryAction) actions.push(primaryAction);
3439
- return /* @__PURE__ */ jsx26("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
3679
+ return /* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
3440
3680
  const { label, onClick, variant: actionVariant, icon, iconPosition } = action;
3441
3681
  const leadingIcon = !!icon && (iconPosition ?? "leading") === "leading";
3442
3682
  const trailingIcon = !!icon && (iconPosition ?? "leading") === "trailing";
3443
- return /* @__PURE__ */ jsx26(
3683
+ return /* @__PURE__ */ jsx27(
3444
3684
  Button,
3445
3685
  {
3446
3686
  size: "small",
@@ -3455,18 +3695,18 @@ var PageFooter = React26.forwardRef(
3455
3695
  );
3456
3696
  }) });
3457
3697
  };
3458
- const content = children != null ? children : hasActions ? renderActionButtons() : /* @__PURE__ */ jsx26(Button, { variant: "primary", size: "small", children: "Convert" });
3459
- return /* @__PURE__ */ jsx26(
3698
+ const content = children != null ? children : hasActions ? renderActionButtons() : /* @__PURE__ */ jsx27(Button, { variant: "primary", size: "small", children: "Convert" });
3699
+ return /* @__PURE__ */ jsx27(
3460
3700
  "footer",
3461
3701
  {
3462
3702
  ref,
3463
- className: cn26(
3703
+ className: cn27(
3464
3704
  "flex h-16 items-center justify-end gap-2 bg-semantic-background-neutral-primary p-4 shadow-elevation-top-sm",
3465
3705
  className
3466
3706
  ),
3467
3707
  style: { width },
3468
3708
  ...props,
3469
- children: /* @__PURE__ */ jsx26("div", { className: cn26("flex items-center gap-2", contentClassName), children: content })
3709
+ children: /* @__PURE__ */ jsx27("div", { className: cn27("flex items-center gap-2", contentClassName), children: content })
3470
3710
  }
3471
3711
  );
3472
3712
  }
@@ -3474,19 +3714,19 @@ var PageFooter = React26.forwardRef(
3474
3714
  PageFooter.displayName = "PageFooter";
3475
3715
 
3476
3716
  // src/patterns/SideMenu.tsx
3477
- import * as React28 from "react";
3717
+ import * as React29 from "react";
3478
3718
  import { cva as cva19 } from "class-variance-authority";
3479
- import { cn as cn28 } from "@esds-sangam/utils";
3719
+ import { cn as cn29 } from "@esds-sangam/utils";
3480
3720
  import * as SelectPrimitive2 from "@radix-ui/react-select";
3481
3721
  import { ChevronDown as ChevronDown3, ChevronUp as ChevronUp2, Tickmark as Tickmark4 } from "@esds-sangam/icons";
3482
3722
 
3483
3723
  // src/patterns/SideMenuItem.tsx
3484
- import * as React27 from "react";
3724
+ import * as React28 from "react";
3485
3725
  import { ChevronRight as ChevronRight3 } from "@esds-sangam/icons";
3486
- import { cn as cn27 } from "@esds-sangam/utils";
3487
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
3726
+ import { cn as cn28 } from "@esds-sangam/utils";
3727
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
3488
3728
  var MENU_TEXT_STYLES = "text-xs font-medium leading-4 text-semantic-text-neutral-primary";
3489
- var SideMenuItem = React27.forwardRef(
3729
+ var SideMenuItem = React28.forwardRef(
3490
3730
  ({
3491
3731
  label,
3492
3732
  leadingIcon,
@@ -3499,20 +3739,20 @@ var SideMenuItem = React27.forwardRef(
3499
3739
  ...props
3500
3740
  }, ref) => {
3501
3741
  if (iconOnly) {
3502
- return /* @__PURE__ */ jsx27(
3742
+ return /* @__PURE__ */ jsx28(
3503
3743
  "button",
3504
3744
  {
3505
3745
  ref,
3506
3746
  type,
3507
- className: cn27(
3747
+ className: cn28(
3508
3748
  "inline-flex w-full items-center justify-center outline-none focus-visible:ring-2 focus-visible:ring-primary-600 focus-visible:ring-offset-2",
3509
3749
  className
3510
3750
  ),
3511
3751
  ...props,
3512
- children: /* @__PURE__ */ jsx27(
3752
+ children: /* @__PURE__ */ jsx28(
3513
3753
  "span",
3514
3754
  {
3515
- className: cn27(
3755
+ className: cn28(
3516
3756
  "flex h-9 w-9 items-center justify-center rounded-sm [&>svg]:size-5",
3517
3757
  selected && "border border-semantic-border-neutral-secondary bg-semantic-background-neutral-primary shadow-elevation-bottom-sm"
3518
3758
  ),
@@ -3522,28 +3762,28 @@ var SideMenuItem = React27.forwardRef(
3522
3762
  }
3523
3763
  );
3524
3764
  }
3525
- return /* @__PURE__ */ jsx27(
3765
+ return /* @__PURE__ */ jsx28(
3526
3766
  "button",
3527
3767
  {
3528
3768
  ref,
3529
3769
  type,
3530
- className: cn27(
3770
+ className: cn28(
3531
3771
  "inline-flex w-full items-center justify-start outline-none focus-visible:ring-2 focus-visible:ring-primary-600 focus-visible:ring-offset-2",
3532
3772
  className
3533
3773
  ),
3534
3774
  ...props,
3535
- children: /* @__PURE__ */ jsxs21(
3775
+ children: /* @__PURE__ */ jsxs22(
3536
3776
  "span",
3537
3777
  {
3538
- className: cn27(
3778
+ className: cn28(
3539
3779
  "flex h-9 min-w-0 flex-1 items-center gap-2 rounded-sm px-2",
3540
3780
  selected ? "mx-1 my-0.5 border border-semantic-border-neutral-secondary bg-semantic-background-neutral-primary shadow-elevation-bottom-sm" : "hover:bg-neutral-200/60",
3541
3781
  !selected && hovered && "bg-neutral-200/60"
3542
3782
  ),
3543
3783
  children: [
3544
- /* @__PURE__ */ jsx27("span", { className: "shrink-0 [&>svg]:size-5", children: leadingIcon }),
3545
- /* @__PURE__ */ jsx27("span", { className: cn27(MENU_TEXT_STYLES, "min-w-0 flex-1 truncate text-left"), children: label }),
3546
- hasSubmenu ? /* @__PURE__ */ jsx27(
3784
+ /* @__PURE__ */ jsx28("span", { className: "shrink-0 [&>svg]:size-5", children: leadingIcon }),
3785
+ /* @__PURE__ */ jsx28("span", { className: cn28(MENU_TEXT_STYLES, "min-w-0 flex-1 truncate text-left"), children: label }),
3786
+ hasSubmenu ? /* @__PURE__ */ jsx28(
3547
3787
  ChevronRight3,
3548
3788
  {
3549
3789
  size: 14,
@@ -3561,7 +3801,7 @@ var SideMenuItem = React27.forwardRef(
3561
3801
  SideMenuItem.displayName = "SideMenuItem";
3562
3802
 
3563
3803
  // src/patterns/SideMenu.tsx
3564
- import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
3804
+ import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
3565
3805
  function SideMenuNavRow({
3566
3806
  item,
3567
3807
  isCollapsed,
@@ -3569,7 +3809,7 @@ function SideMenuNavRow({
3569
3809
  onClick
3570
3810
  }) {
3571
3811
  const leadingIcon = isCollapsed && !isSelected ? item.icon : item.iconExpanded ?? item.icon;
3572
- return /* @__PURE__ */ jsx28(
3812
+ return /* @__PURE__ */ jsx29(
3573
3813
  SideMenuItem,
3574
3814
  {
3575
3815
  label: item.label,
@@ -3589,18 +3829,18 @@ function SideMenuGroup({
3589
3829
  className
3590
3830
  }) {
3591
3831
  const showGroup = group.showGroup ?? true;
3592
- return /* @__PURE__ */ jsxs22("div", { className: cn28("flex flex-col gap-2", className), children: [
3593
- showGroup ? /* @__PURE__ */ jsx28(
3832
+ return /* @__PURE__ */ jsxs23("div", { className: cn29("flex flex-col gap-2", className), children: [
3833
+ showGroup ? /* @__PURE__ */ jsx29(
3594
3834
  "div",
3595
3835
  {
3596
- className: cn28(
3836
+ className: cn29(
3597
3837
  "text-xs font-medium leading-4 text-semantic-text-neutral-tertiary",
3598
3838
  isCollapsed ? "px-0 text-center" : "px-2 text-left"
3599
3839
  ),
3600
3840
  children: isCollapsed ? "--" : group.groupName
3601
3841
  }
3602
3842
  ) : null,
3603
- group.items.map((item) => /* @__PURE__ */ jsx28(
3843
+ group.items.map((item) => /* @__PURE__ */ jsx29(
3604
3844
  SideMenuNavRow,
3605
3845
  {
3606
3846
  item,
@@ -3616,7 +3856,7 @@ var sideMenuVariants = cva19(
3616
3856
  "flex flex-col self-start transition-[width] duration-200 ease-out",
3617
3857
  {
3618
3858
  variants: {
3619
- variant: {
3859
+ state: {
3620
3860
  default: "h-[1024px] w-[48px] rounded-r-lg bg-semantic-background-neutral-tertiary py-4 px-1.5",
3621
3861
  hover: "h-[1024px] w-[196px] rounded-r-lg bg-semantic-background-neutral-primary border-l border-semantic-border-neutral-tertiary shadow-elevation-right-sm py-4 pl-3 pr-3",
3622
3862
  selected: "h-[1024px] w-[196px] rounded-r-lg bg-semantic-background-neutral-primary border-l border-semantic-border-neutral-tertiary shadow-elevation-right-sm py-4 pl-3 pr-3",
@@ -3624,20 +3864,21 @@ var sideMenuVariants = cva19(
3624
3864
  }
3625
3865
  },
3626
3866
  defaultVariants: {
3627
- variant: "default"
3867
+ state: "default"
3628
3868
  }
3629
3869
  }
3630
3870
  );
3631
- var SideMenu = React28.forwardRef(
3871
+ var SideMenu = React29.forwardRef(
3632
3872
  ({
3633
3873
  className,
3634
- variant = "default",
3874
+ state = "default",
3635
3875
  logo,
3636
3876
  topGroups,
3637
3877
  bottomGroups,
3638
3878
  selectedId: selectedIdProp,
3639
3879
  defaultSelectedId,
3640
3880
  expanded: expandedProp,
3881
+ showScrollbar = false,
3641
3882
  onItemClick,
3642
3883
  projects,
3643
3884
  project: projectProp,
@@ -3647,17 +3888,17 @@ var SideMenu = React28.forwardRef(
3647
3888
  onMouseLeave,
3648
3889
  ...props
3649
3890
  }, ref) => {
3650
- const [internalSelected, setInternalSelected] = React28.useState(
3891
+ const [internalSelected, setInternalSelected] = React29.useState(
3651
3892
  defaultSelectedId ?? null
3652
3893
  );
3653
3894
  const selectedId = selectedIdProp !== void 0 ? selectedIdProp : internalSelected;
3654
3895
  const isControlled = selectedIdProp !== void 0;
3655
- const [hoverExpanded, setHoverExpanded] = React28.useState(false);
3656
- const isUncontrolledDefault = variant === "default" && expandedProp === void 0;
3896
+ const [hoverExpanded, setHoverExpanded] = React29.useState(false);
3897
+ const isUncontrolledDefault = state === "default" && expandedProp === void 0;
3657
3898
  const isExpandedByHover = isUncontrolledDefault && hoverExpanded;
3658
- const effectiveExpanded = variant === "hover" || variant === "selected" || variant === "sticky" || isExpandedByHover;
3899
+ const effectiveExpanded = state === "hover" || state === "selected" || state === "sticky" || isExpandedByHover;
3659
3900
  const isCollapsed = !effectiveExpanded;
3660
- const [isProjectOpen, setIsProjectOpen] = React28.useState(false);
3901
+ const [isProjectOpen, setIsProjectOpen] = React29.useState(false);
3661
3902
  const handleMouseEnter = (e) => {
3662
3903
  if (isUncontrolledDefault) setHoverExpanded(true);
3663
3904
  onMouseEnter?.(e);
@@ -3675,7 +3916,7 @@ var SideMenu = React28.forwardRef(
3675
3916
  { value: "project-2", label: "Project 2" },
3676
3917
  { value: "project-3", label: "Project 3" }
3677
3918
  ];
3678
- const [internalProject, setInternalProject] = React28.useState(
3919
+ const [internalProject, setInternalProject] = React29.useState(
3679
3920
  defaultProject ?? projectOptions[0]?.value ?? "project-1"
3680
3921
  );
3681
3922
  const currentProject = projectProp !== void 0 ? projectProp : internalProject;
@@ -3683,39 +3924,44 @@ var SideMenu = React28.forwardRef(
3683
3924
  if (projectProp === void 0) setInternalProject(value);
3684
3925
  onProjectChange?.(value);
3685
3926
  };
3686
- return /* @__PURE__ */ jsx28(
3927
+ const scrollbarAllowedState = state === "hover" || state === "selected" || state === "sticky";
3928
+ const shouldShowScrollbar = showScrollbar && scrollbarAllowedState;
3929
+ return /* @__PURE__ */ jsx29(
3687
3930
  "div",
3688
3931
  {
3689
- className: cn28("relative w-12 shrink-0 overflow-visible", className),
3932
+ className: cn29("relative w-12 shrink-0 overflow-visible", className),
3690
3933
  ...props,
3691
- children: /* @__PURE__ */ jsx28(
3934
+ children: /* @__PURE__ */ jsx29(
3692
3935
  "div",
3693
3936
  {
3694
3937
  className: "absolute left-0 top-0",
3695
3938
  onMouseEnter: handleMouseEnter,
3696
3939
  onMouseLeave: handleMouseLeave,
3697
- children: /* @__PURE__ */ jsxs22(
3940
+ children: /* @__PURE__ */ jsxs23(
3698
3941
  "nav",
3699
3942
  {
3700
3943
  ref,
3701
3944
  role: "navigation",
3702
3945
  "aria-label": "Side menu",
3703
3946
  "aria-expanded": isUncontrolledDefault ? isExpandedByHover : void 0,
3704
- className: sideMenuVariants({
3705
- variant: isExpandedByHover && selectedId ? "selected" : isExpandedByHover ? "hover" : variant
3706
- }),
3947
+ className: cn29(
3948
+ sideMenuVariants({
3949
+ state: isExpandedByHover && selectedId ? "selected" : isExpandedByHover ? "hover" : state
3950
+ }),
3951
+ shouldShowScrollbar && "overflow-y-auto overflow-x-hidden"
3952
+ ),
3707
3953
  children: [
3708
- /* @__PURE__ */ jsx28(
3954
+ /* @__PURE__ */ jsx29(
3709
3955
  "div",
3710
3956
  {
3711
- className: cn28(
3957
+ className: cn29(
3712
3958
  "mb-4 shrink-0 flex items-center",
3713
3959
  isCollapsed ? "justify-center" : "justify-start"
3714
3960
  ),
3715
3961
  children: logo
3716
3962
  }
3717
3963
  ),
3718
- /* @__PURE__ */ jsx28("div", { className: cn28("mb-4 shrink-0", isCollapsed ? "flex justify-center" : ""), children: isCollapsed ? /* @__PURE__ */ jsx28("div", { className: "flex h-9 w-9 items-center justify-center rounded-sm", children: /* @__PURE__ */ jsx28("span", { className: "inline-flex h-6 w-6 items-center justify-center rounded-[4px] bg-blue-300 text-sm font-semibold leading-6 text-blue-600", children: "P" }) }) : /* @__PURE__ */ jsx28(
3964
+ /* @__PURE__ */ jsx29("div", { className: cn29("mb-4 shrink-0", isCollapsed ? "flex justify-center" : ""), children: isCollapsed ? /* @__PURE__ */ jsx29("div", { className: "flex h-9 w-9 items-center justify-center rounded-sm", children: /* @__PURE__ */ jsx29("span", { className: "inline-flex h-6 w-6 items-center justify-center rounded-[4px] bg-blue-300 text-sm font-semibold leading-6 text-blue-600", children: "P" }) }) : /* @__PURE__ */ jsx29(
3719
3965
  SelectPrimitive2.Root,
3720
3966
  {
3721
3967
  value: currentProject,
@@ -3725,12 +3971,12 @@ var SideMenu = React28.forwardRef(
3725
3971
  setIsProjectOpen(open);
3726
3972
  if (isUncontrolledDefault && open) setHoverExpanded(true);
3727
3973
  },
3728
- children: /* @__PURE__ */ jsxs22("div", { className: "relative", children: [
3729
- /* @__PURE__ */ jsx28("span", { className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 inline-flex h-6 w-6 items-center justify-center rounded-[4px] bg-blue-300 text-sm font-semibold leading-6 text-blue-600", children: "P" }),
3730
- /* @__PURE__ */ jsxs22(
3974
+ children: /* @__PURE__ */ jsxs23("div", { className: "relative", children: [
3975
+ /* @__PURE__ */ jsx29("span", { className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 inline-flex h-6 w-6 items-center justify-center rounded-[4px] bg-blue-300 text-sm font-semibold leading-6 text-blue-600", children: "P" }),
3976
+ /* @__PURE__ */ jsxs23(
3731
3977
  SelectPrimitive2.Trigger,
3732
3978
  {
3733
- className: cn28(
3979
+ className: cn29(
3734
3980
  "group",
3735
3981
  dropdownTriggerVariants({ error: false }),
3736
3982
  // Make room for the P icon
@@ -3741,22 +3987,22 @@ var SideMenu = React28.forwardRef(
3741
3987
  "[&>span]:block [&>span]:min-w-0 [&>span]:truncate [&>span]:whitespace-nowrap"
3742
3988
  ),
3743
3989
  children: [
3744
- /* @__PURE__ */ jsx28(SelectPrimitive2.Value, { placeholder: "Project 1" }),
3745
- /* @__PURE__ */ jsx28(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ jsxs22(Fragment4, { children: [
3746
- /* @__PURE__ */ jsx28(ChevronDown3, { size: 14, className: "shrink-0 group-data-[state=open]:hidden" }),
3747
- /* @__PURE__ */ jsx28(ChevronUp2, { size: 14, className: "hidden shrink-0 group-data-[state=open]:block" })
3990
+ /* @__PURE__ */ jsx29(SelectPrimitive2.Value, { placeholder: "Project 1" }),
3991
+ /* @__PURE__ */ jsx29(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ jsxs23(Fragment5, { children: [
3992
+ /* @__PURE__ */ jsx29(ChevronDown3, { size: 14, className: "shrink-0 group-data-[state=open]:hidden" }),
3993
+ /* @__PURE__ */ jsx29(ChevronUp2, { size: 14, className: "hidden shrink-0 group-data-[state=open]:block" })
3748
3994
  ] }) })
3749
3995
  ]
3750
3996
  }
3751
3997
  ),
3752
- /* @__PURE__ */ jsx28(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx28(SelectPrimitive2.Content, { className: cn28(dropdownContentVariants()), position: "popper", sideOffset: 6, children: /* @__PURE__ */ jsx28(SelectPrimitive2.Viewport, { children: projectOptions.map((opt) => /* @__PURE__ */ jsxs22(SelectPrimitive2.Item, { value: opt.value, disabled: opt.disabled, className: cn28(dropdownItemVariants()), children: [
3753
- /* @__PURE__ */ jsx28(SelectPrimitive2.ItemText, { children: opt.label }),
3754
- /* @__PURE__ */ jsx28(SelectPrimitive2.ItemIndicator, { className: "absolute right-2 inline-flex items-center justify-center", children: /* @__PURE__ */ jsx28(Tickmark4, { size: 14, "aria-hidden": "true" }) })
3998
+ /* @__PURE__ */ jsx29(SelectPrimitive2.Portal, { children: /* @__PURE__ */ jsx29(SelectPrimitive2.Content, { className: cn29(dropdownContentVariants()), position: "popper", sideOffset: 6, children: /* @__PURE__ */ jsx29(SelectPrimitive2.Viewport, { children: projectOptions.map((opt) => /* @__PURE__ */ jsxs23(SelectPrimitive2.Item, { value: opt.value, disabled: opt.disabled, className: cn29(dropdownItemVariants()), children: [
3999
+ /* @__PURE__ */ jsx29(SelectPrimitive2.ItemText, { children: opt.label }),
4000
+ /* @__PURE__ */ jsx29(SelectPrimitive2.ItemIndicator, { className: "absolute right-2 inline-flex items-center justify-center", children: /* @__PURE__ */ jsx29(Tickmark4, { size: 14, "aria-hidden": "true" }) })
3755
4001
  ] }, opt.value)) }) }) })
3756
4002
  ] })
3757
4003
  }
3758
4004
  ) }),
3759
- /* @__PURE__ */ jsx28("div", { className: "flex flex-1 flex-col gap-4", children: topGroups.map((group) => /* @__PURE__ */ jsx28(
4005
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-1 flex-col gap-4", children: topGroups.map((group) => /* @__PURE__ */ jsx29(
3760
4006
  SideMenuGroup,
3761
4007
  {
3762
4008
  group,
@@ -3766,7 +4012,7 @@ var SideMenu = React28.forwardRef(
3766
4012
  },
3767
4013
  group.id
3768
4014
  )) }),
3769
- /* @__PURE__ */ jsx28("div", { className: "flex flex-col gap-4 pt-4", children: bottomGroups.map((group) => /* @__PURE__ */ jsx28(
4015
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-4 pt-4", children: bottomGroups.map((group) => /* @__PURE__ */ jsx29(
3770
4016
  SideMenuGroup,
3771
4017
  {
3772
4018
  group,
@@ -3788,12 +4034,12 @@ var SideMenu = React28.forwardRef(
3788
4034
  SideMenu.displayName = "SideMenu";
3789
4035
 
3790
4036
  // src/patterns/Upload.tsx
3791
- import * as React29 from "react";
4037
+ import * as React30 from "react";
3792
4038
  import { cva as cva20 } from "class-variance-authority";
3793
4039
  import { colors } from "@esds-sangam/tokens";
3794
- import { cn as cn29 } from "@esds-sangam/utils";
3795
- import { CloudUpload, DocumentPdf, Close as Close11, Delete, Retry, TickmarkFilled as TickmarkFilled6 } from "@esds-sangam/icons";
3796
- import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
4040
+ import { cn as cn30 } from "@esds-sangam/utils";
4041
+ import { CloudUpload, DocumentPdf, Close as Close11, Delete, Retry, TickmarkFilled as TickmarkFilled6, Info as Info4 } from "@esds-sangam/icons";
4042
+ import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
3797
4043
  var uploadBoxVariants = cva20([
3798
4044
  "relative flex flex-col items-center justify-center w-full",
3799
4045
  "rounded-sm border border-dashed border-semantic-border-neutral-primary hover:border-semantic-border-neutralInverse-primary",
@@ -3808,20 +4054,25 @@ function formatFileSize(bytes) {
3808
4054
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
3809
4055
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
3810
4056
  }
3811
- var Upload = React29.forwardRef(
4057
+ var Upload = React30.forwardRef(
3812
4058
  ({
3813
4059
  className,
3814
4060
  label,
4061
+ asterisk,
3815
4062
  required,
3816
4063
  accept,
3817
4064
  multiple,
3818
4065
  onFilesSelected,
4066
+ subtext,
3819
4067
  helperText = "PNG, JPG, PDF, EXCEL (max size)",
4068
+ supportingText = false,
4069
+ supportText = "Supporting text",
4070
+ supportIcon = false,
3820
4071
  ...props
3821
4072
  }, ref) => {
3822
- const inputRef = React29.useRef(null);
3823
- const [fileEntries, setFileEntries] = React29.useState([]);
3824
- const progressIntervalRef = React29.useRef(null);
4073
+ const inputRef = React30.useRef(null);
4074
+ const [fileEntries, setFileEntries] = React30.useState([]);
4075
+ const progressIntervalRef = React30.useRef(null);
3825
4076
  const handleClick = () => {
3826
4077
  inputRef.current?.click();
3827
4078
  };
@@ -3849,7 +4100,7 @@ var Upload = React29.forwardRef(
3849
4100
  )
3850
4101
  );
3851
4102
  };
3852
- React29.useEffect(() => {
4103
+ React30.useEffect(() => {
3853
4104
  const uploading = fileEntries.filter((e) => e.status === "uploading");
3854
4105
  if (uploading.length === 0) return;
3855
4106
  const steps = [10, 50, 100];
@@ -3888,18 +4139,18 @@ var Upload = React29.forwardRef(
3888
4139
  const handleDragOver = (event) => {
3889
4140
  event.preventDefault();
3890
4141
  };
3891
- return /* @__PURE__ */ jsxs23(
4142
+ return /* @__PURE__ */ jsxs24(
3892
4143
  "div",
3893
4144
  {
3894
4145
  ref,
3895
- className: cn29("flex w-full min-w-[328px] flex-col gap-2", className),
4146
+ className: cn30("flex w-full min-w-[328px] flex-col gap-2", className),
3896
4147
  ...props,
3897
4148
  children: [
3898
- /* @__PURE__ */ jsxs23("label", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-primary", children: [
4149
+ /* @__PURE__ */ jsxs24("label", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-primary", children: [
3899
4150
  label,
3900
- required && /* @__PURE__ */ jsx29("span", { className: "text-semantic-text-semantic-error-subtle ml-0.5", children: "*" })
4151
+ (asterisk ?? required) && /* @__PURE__ */ jsx30("span", { className: "text-semantic-text-semantic-error-subtle ml-0.5", children: "*" })
3901
4152
  ] }),
3902
- /* @__PURE__ */ jsxs23(
4153
+ /* @__PURE__ */ jsxs24(
3903
4154
  "div",
3904
4155
  {
3905
4156
  role: "button",
@@ -3913,13 +4164,13 @@ var Upload = React29.forwardRef(
3913
4164
  },
3914
4165
  onDrop: handleDrop,
3915
4166
  onDragOver: handleDragOver,
3916
- className: cn29(
4167
+ className: cn30(
3917
4168
  uploadBoxVariants(),
3918
4169
  // Padding: top/bottom 20px (py-5), left/right 12px (px-3)
3919
4170
  "py-5 px-3"
3920
4171
  ),
3921
4172
  children: [
3922
- /* @__PURE__ */ jsx29(
4173
+ /* @__PURE__ */ jsx30(
3923
4174
  "input",
3924
4175
  {
3925
4176
  ref: inputRef,
@@ -3932,16 +4183,16 @@ var Upload = React29.forwardRef(
3932
4183
  "aria-hidden": "true"
3933
4184
  }
3934
4185
  ),
3935
- /* @__PURE__ */ jsxs23("div", { className: "relative z-0 flex flex-col items-center gap-2 text-center pointer-events-none", children: [
3936
- /* @__PURE__ */ jsx29("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-semantic-background-semantic-info-subtle text-semantic-icon-semantic-info-subtle", children: /* @__PURE__ */ jsx29(CloudUpload, { size: 20, color: colors.blue["600"], "aria-hidden": "true" }) }),
3937
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-1", children: [
3938
- /* @__PURE__ */ jsxs23("p", { className: "text-sm leading-6 text-semantic-text-neutral-primary", children: [
3939
- /* @__PURE__ */ jsx29("span", { className: "font-normal", children: "Drop your files here or " }),
3940
- /* @__PURE__ */ jsx29(
4186
+ /* @__PURE__ */ jsxs24("div", { className: "relative z-0 flex flex-col items-center gap-2 text-center pointer-events-none", children: [
4187
+ /* @__PURE__ */ jsx30("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-semantic-background-semantic-info-subtle text-semantic-icon-semantic-info-subtle", children: /* @__PURE__ */ jsx30(CloudUpload, { size: 20, color: colors.blue["600"], "aria-hidden": "true" }) }),
4188
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
4189
+ /* @__PURE__ */ jsxs24("p", { className: "text-sm leading-6 text-semantic-text-neutral-primary", children: [
4190
+ /* @__PURE__ */ jsx30("span", { className: "font-normal", children: "Drop your files here or " }),
4191
+ /* @__PURE__ */ jsx30(
3941
4192
  Button,
3942
4193
  {
3943
- type: "button",
3944
- variant: "link",
4194
+ htmlType: "button",
4195
+ type: "tertiary",
3945
4196
  size: "small",
3946
4197
  className: "pointer-events-auto font-medium p-0 h-auto inline",
3947
4198
  onClick: (e) => {
@@ -3952,13 +4203,17 @@ var Upload = React29.forwardRef(
3952
4203
  }
3953
4204
  )
3954
4205
  ] }),
3955
- /* @__PURE__ */ jsx29("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: helperText })
4206
+ /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: subtext ?? helperText })
3956
4207
  ] })
3957
4208
  ] })
3958
4209
  ]
3959
4210
  }
3960
4211
  ),
3961
- fileEntries.length > 0 && /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-3", children: fileEntries.map((entry) => /* @__PURE__ */ jsx29(
4212
+ supportingText ? /* @__PURE__ */ jsxs24("div", { className: "inline-flex items-center gap-1 text-sm text-semantic-text-neutral-tertiary", children: [
4213
+ supportIcon ? /* @__PURE__ */ jsx30(Info4, { size: 16, className: "text-semantic-icon-neutral-tertiary", "aria-hidden": true }) : null,
4214
+ /* @__PURE__ */ jsx30("span", { children: supportText })
4215
+ ] }) : null,
4216
+ fileEntries.length > 0 && /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-3", children: fileEntries.map((entry) => /* @__PURE__ */ jsx30(
3962
4217
  UploadFileItem,
3963
4218
  {
3964
4219
  status: entry.status,
@@ -3992,86 +4247,87 @@ var uploadFileItemBoxVariants = cva20(
3992
4247
  }
3993
4248
  }
3994
4249
  );
3995
- var UploadFileItem = React29.forwardRef(
4250
+ var UploadFileItem = React30.forwardRef(
3996
4251
  ({
3997
4252
  className,
3998
4253
  status = "uploading",
3999
4254
  fileName,
4000
4255
  fileSize,
4256
+ process,
4001
4257
  progress = 0,
4002
4258
  onCancel,
4003
4259
  onRetry,
4004
4260
  onDelete,
4005
4261
  ...props
4006
4262
  }, ref) => {
4007
- const progressValue = Math.min(100, Math.max(0, progress));
4263
+ const progressValue = Math.min(100, Math.max(0, process ?? progress));
4008
4264
  const showProgress = status !== "failed";
4009
- return /* @__PURE__ */ jsxs23(
4265
+ return /* @__PURE__ */ jsxs24(
4010
4266
  "div",
4011
4267
  {
4012
4268
  ref,
4013
4269
  role: "listitem",
4014
- className: cn29(uploadFileItemBoxVariants({ status }), className),
4270
+ className: cn30(uploadFileItemBoxVariants({ status }), className),
4015
4271
  ...props,
4016
4272
  children: [
4017
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-1 gap-3", children: [
4018
- /* @__PURE__ */ jsxs23("div", { className: "flex flex-1 min-w-0 gap-2", children: [
4019
- /* @__PURE__ */ jsx29(DocumentPdf, { size: 24, className: "shrink-0 text-semantic-text-neutral-primary", "aria-hidden": true }),
4020
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
4021
- /* @__PURE__ */ jsx29("p", { className: "truncate text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: fileName }),
4022
- status === "failed" ? /* @__PURE__ */ jsx29("p", { className: "text-xs font-normal leading-4 text-semantic-text-semantic-error-subtle", children: "Upload failed" }) : fileSize ? /* @__PURE__ */ jsx29("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: fileSize }) : null
4273
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 gap-3", children: [
4274
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-1 min-w-0 gap-2", children: [
4275
+ /* @__PURE__ */ jsx30(DocumentPdf, { size: 24, className: "shrink-0 text-semantic-text-neutral-primary", "aria-hidden": true }),
4276
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
4277
+ /* @__PURE__ */ jsx30("p", { className: "truncate text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: fileName }),
4278
+ status === "failed" ? /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-semantic-error-subtle", children: "Upload failed" }) : fileSize ? /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: fileSize }) : null
4023
4279
  ] })
4024
4280
  ] }),
4025
- /* @__PURE__ */ jsxs23("div", { className: "flex shrink-0 flex-col items-end justify-center", children: [
4026
- status === "uploading" && /* @__PURE__ */ jsx29(
4281
+ /* @__PURE__ */ jsxs24("div", { className: "flex shrink-0 flex-col items-end justify-center", children: [
4282
+ status === "uploading" && /* @__PURE__ */ jsx30(
4027
4283
  "button",
4028
4284
  {
4029
4285
  type: "button",
4030
4286
  onClick: onCancel,
4031
4287
  className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutralInverse-primary focus-visible:ring-offset-1",
4032
4288
  "aria-label": "Cancel upload",
4033
- children: /* @__PURE__ */ jsx29(Close11, { size: 20, "aria-hidden": true })
4289
+ children: /* @__PURE__ */ jsx30(Close11, { size: 20, "aria-hidden": true })
4034
4290
  }
4035
4291
  ),
4036
- status === "complete" && /* @__PURE__ */ jsx29(Fragment5, { children: /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-4", children: [
4037
- /* @__PURE__ */ jsx29(TickmarkFilled6, { size: 20, className: "!text-semantic-icon-semantic-success-subtle shrink-0", "aria-hidden": true }),
4038
- /* @__PURE__ */ jsx29(
4292
+ status === "complete" && /* @__PURE__ */ jsx30(Fragment6, { children: /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
4293
+ /* @__PURE__ */ jsx30(TickmarkFilled6, { size: 20, className: "!text-semantic-icon-semantic-success-subtle shrink-0", "aria-hidden": true }),
4294
+ /* @__PURE__ */ jsx30(
4039
4295
  "button",
4040
4296
  {
4041
4297
  type: "button",
4042
4298
  onClick: onDelete,
4043
4299
  className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutralInverse-primary focus-visible:ring-offset-1",
4044
4300
  "aria-label": "Delete file",
4045
- children: /* @__PURE__ */ jsx29(Delete, { size: 20, "aria-hidden": true })
4301
+ children: /* @__PURE__ */ jsx30(Delete, { size: 20, "aria-hidden": true })
4046
4302
  }
4047
4303
  )
4048
4304
  ] }) }),
4049
- status === "failed" && /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-4", children: [
4050
- /* @__PURE__ */ jsx29(
4305
+ status === "failed" && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
4306
+ /* @__PURE__ */ jsx30(
4051
4307
  "button",
4052
4308
  {
4053
4309
  type: "button",
4054
4310
  onClick: onRetry,
4055
4311
  className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutralInverse-primary focus-visible:ring-offset-1",
4056
4312
  "aria-label": "Retry upload",
4057
- children: /* @__PURE__ */ jsx29(Retry, { size: 20, "aria-hidden": true })
4313
+ children: /* @__PURE__ */ jsx30(Retry, { size: 20, "aria-hidden": true })
4058
4314
  }
4059
4315
  ),
4060
- /* @__PURE__ */ jsx29(
4316
+ /* @__PURE__ */ jsx30(
4061
4317
  "button",
4062
4318
  {
4063
4319
  type: "button",
4064
4320
  onClick: onDelete,
4065
4321
  className: "inline-flex items-center justify-center rounded p-0 text-semantic-text-neutral-primary hover:opacity-semantic-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutralInverse-primary focus-visible:ring-offset-1",
4066
4322
  "aria-label": "Delete file",
4067
- children: /* @__PURE__ */ jsx29(Delete, { size: 20, "aria-hidden": true })
4323
+ children: /* @__PURE__ */ jsx30(Delete, { size: 20, "aria-hidden": true })
4068
4324
  }
4069
4325
  )
4070
4326
  ] })
4071
4327
  ] })
4072
4328
  ] }),
4073
- showProgress && /* @__PURE__ */ jsxs23("div", { className: "flex w-full items-center gap-sm", children: [
4074
- /* @__PURE__ */ jsx29(
4329
+ showProgress && /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center gap-sm", children: [
4330
+ /* @__PURE__ */ jsx30(
4075
4331
  ProgressBar,
4076
4332
  {
4077
4333
  value: progressValue,
@@ -4080,7 +4336,7 @@ var UploadFileItem = React29.forwardRef(
4080
4336
  "aria-label": `Upload progress ${progressValue}%`
4081
4337
  }
4082
4338
  ),
4083
- /* @__PURE__ */ jsxs23("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary shrink-0 text-right", children: [
4339
+ /* @__PURE__ */ jsxs24("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary shrink-0 text-right", children: [
4084
4340
  progressValue,
4085
4341
  "%"
4086
4342
  ] })
@@ -4094,6 +4350,7 @@ UploadFileItem.displayName = "UploadFileItem";
4094
4350
  export {
4095
4351
  Avatar,
4096
4352
  Badge,
4353
+ Breadcrumbs,
4097
4354
  Button,
4098
4355
  Card,
4099
4356
  Checkbox,