sangam-ui 1.0.2 → 1.0.4

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 +451 -132
  2. package/dist/index.js +733 -450
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { cn } from "@esds-sangam/utils";
12
12
  import { semanticColorsResolved } from "@esds-sangam/tokens";
13
13
  import { jsx } from "react/jsx-runtime";
14
14
  var resolvedBg = semanticColorsResolved;
15
- var LOADER_COLOR = resolvedBg?.background?.neutralInverse?.primary ?? "#111111";
15
+ var LOADER_COLOR = resolvedBg?.background?.primary?.default ?? resolvedBg?.background?.["neutral-inverse"]?.primary ?? resolvedBg?.background?.neutralInverse?.primary ?? "#007AE2";
16
16
  var LOADER_COLOR_TRANSPARENT = `${LOADER_COLOR}00`;
17
17
  var loaderVariants = cva(
18
18
  [
@@ -78,35 +78,35 @@ var buttonVariants = cva2(
78
78
  variants: {
79
79
  // Variant: Visual style per Figma design
80
80
  variant: {
81
- // Primary: semantic background/text (neutral inverse primary)
81
+ // Primary: semantic button tokens (blue default/hover)
82
82
  primary: [
83
- "bg-semantic-background-neutralInverse-primary text-semantic-text-neutralInverse-primary",
84
- "hover:bg-semantic-background-neutralInverse-secondary",
83
+ "bg-semantic-buttons-background-primary-default text-semantic-buttons-text-primary-default",
84
+ "hover:bg-semantic-buttons-background-primary-hover",
85
85
  "focus-visible:ring-semantic-border-neutral-primary focus-visible:ring-offset-0",
86
- "disabled:bg-semantic-background-neutral-disabled disabled:text-semantic-text-neutral-disabled disabled:pointer-events-none",
87
- "data-[loading=true]:!bg-semantic-background-neutralInverse-primary data-[loading=true]:!text-semantic-text-neutralInverse-primary"
86
+ "disabled:bg-semantic-buttons-background-primary-disabled disabled:text-semantic-buttons-text-primary-disabled disabled:pointer-events-none",
87
+ "data-[loading=true]:!bg-semantic-buttons-background-primary-default data-[loading=true]:!text-semantic-buttons-text-primary-default"
88
88
  ],
89
- // Secondary: border #111111 (semantic border neutralInverse tertiary), hover: border removed, bg #EBEBEB (semantic background neutral tertiary)
89
+ // Secondary: outlined blue, subtle blue hover
90
90
  secondary: [
91
- "bg-semantic-background-neutral-primary border border-semantic-border-neutralInverse-tertiary text-semantic-text-neutral-primary",
92
- "hover:border-transparent hover:bg-semantic-background-neutral-tertiary",
93
- "focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-semantic-border-neutralInverse-tertiary focus-visible:-m-px",
94
- "disabled:bg-semantic-background-neutral-disabled disabled:text-semantic-text-neutral-disabled disabled:border-semantic-border-neutral-disabled disabled:pointer-events-none"
91
+ "bg-semantic-background-neutral-primary border border-semantic-buttons-background-secondary-default text-semantic-buttons-text-secondary-default",
92
+ "hover:border-transparent hover:bg-semantic-buttons-background-secondary-hover",
93
+ "focus-visible:border-2 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:border-semantic-buttons-background-secondary-default focus-visible:-m-px",
94
+ "disabled:bg-semantic-buttons-background-secondary-disabled disabled:text-semantic-buttons-text-secondary-disabled disabled:border-semantic-border-neutral-disabled disabled:pointer-events-none"
95
95
  ],
96
96
  // Danger: semantic error default/hover
97
97
  danger: [
98
- "bg-semantic-background-semantic-error-default text-semantic-text-semantic-error-default",
99
- "hover:bg-semantic-background-semantic-error-hover",
100
- "focus-visible:ring-semantic-border-semantic-error-default",
101
- "disabled:bg-semantic-background-neutral-disabled disabled:text-semantic-text-neutral-disabled disabled:pointer-events-none",
102
- "data-[loading=true]:!bg-semantic-background-semantic-error-default data-[loading=true]:!text-semantic-text-semantic-error-default"
98
+ "bg-semantic-buttons-background-danger-default text-semantic-buttons-text-danger-default",
99
+ "hover:bg-semantic-buttons-background-danger-hover",
100
+ "focus-visible:ring-semantic-border-error-default",
101
+ "disabled:bg-semantic-buttons-background-danger-disabled disabled:text-semantic-buttons-text-danger-disabled disabled:pointer-events-none",
102
+ "data-[loading=true]:!bg-semantic-buttons-background-danger-default data-[loading=true]:!text-semantic-buttons-text-danger-default"
103
103
  ],
104
- // Link: semantic info default text
105
- link: [
106
- "bg-transparent text-semantic-background-semantic-info-default underline-offset-4",
104
+ // Tertiary (low-emphasis / link style): semantic info default text
105
+ tertiary: [
106
+ "bg-transparent text-semantic-buttons-text-link-default underline-offset-4",
107
107
  "hover:underline",
108
- "focus-visible:ring-semantic-border-semantic-info-default",
109
- "disabled:text-semantic-text-neutral-disabled disabled:pointer-events-none"
108
+ "focus-visible:ring-semantic-border-primary-default",
109
+ "disabled:text-semantic-buttons-text-link-disabled disabled:pointer-events-none"
110
110
  ]
111
111
  },
112
112
  // Size: Height, padding, font size (from Figma specs)
@@ -135,8 +135,8 @@ var buttonVariants = cva2(
135
135
  * - When true, button becomes fully rounded.
136
136
  * - Height is still driven by `size` (small/big).
137
137
  * - Width is applied via compoundVariants below:
138
- * - size="small" w-8 (32px)
139
- * - size="big" w-10 (40px)
138
+ * - size="small" → w-8 (32px)
139
+ * - size="big" → w-10 (40px)
140
140
  */
141
141
  iconOnly: {
142
142
  false: "",
@@ -161,31 +161,51 @@ var buttonVariants = cva2(
161
161
  ]
162
162
  }
163
163
  );
164
- var BUTTON_LOADER_COLOR = semanticColorsResolved2.text.neutralInverse.primary;
164
+ var BUTTON_LOADER_COLOR = semanticColorsResolved2.text["neutral-inverse"]?.primary ?? semanticColorsResolved2.text.neutralInverse?.primary ?? "#FFFFFF";
165
165
  var BUTTON_LOADER_COLOR_TRANSPARENT = `${BUTTON_LOADER_COLOR}00`;
166
+ var hoverPreviewClassByVariant = {
167
+ primary: "!bg-semantic-buttons-background-primary-hover",
168
+ secondary: "!border-transparent !bg-semantic-buttons-background-secondary-hover",
169
+ danger: "!bg-semantic-buttons-background-danger-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
  }
@@ -240,17 +266,17 @@ var toggleVariants = cva3(
240
266
  [
241
267
  "peer inline-flex shrink-0 cursor-pointer items-center rounded-full",
242
268
  "transition-all duration-200 ease-out",
243
- // focus ring: no semantic token for neutral-800 in semantic-colors.json left as-is
269
+ // focus ring: no semantic token for neutral-800 in semantic-colors.json — left as-is
244
270
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2",
245
271
  "disabled:cursor-not-allowed disabled:opacity-semantic-full",
246
272
  // Default unchecked state
247
- "bg-semantic-background-neutralInverse-tertiary",
273
+ "bg-semantic-background-neutral-inverse-tertiary",
248
274
  // Hover effect for unchecked state (border appears on hover)
249
- "border-1 border-semantic-border-transparent hover:border-semantic-border-neutralInverse-primary",
275
+ "border-1 border-semantic-border-transparent hover:border-semantic-border-neutral-inverse-primary",
250
276
  // Checked state
251
- "data-[state=checked]:bg-semantic-background-neutralInverse-primary",
277
+ "data-[state=checked]:bg-semantic-controls-background-checked",
252
278
  // Remove hover border when checked
253
- "data-[state=checked]:hover:border-1 data-[state=checked]:hover:border-semantic-border-neutralInverse-tertiary",
279
+ "data-[state=checked]:hover:border-1 data-[state=checked]:hover:border-semantic-controls-background-checked",
254
280
  // Disabled states - MUST come after checked to override
255
281
  "disabled:bg-semantic-background-neutral-tertiary",
256
282
  "disabled:hover:border-1 disabled:hover:border-semantic-border-neutral-tertiary",
@@ -276,7 +302,7 @@ var toggleThumbVariants = cva3(
276
302
  [
277
303
  "pointer-events-none block rounded-full bg-semantic-background-neutral-primary shadow-sm",
278
304
  "transition-transform duration-200 ease-out",
279
- // Disabled state: no semantic background for neutral.500 left as-is
305
+ // Disabled state: no semantic background for neutral.500 — left as-is
280
306
  "data-[disabled]:bg-neutral-500"
281
307
  ],
282
308
  {
@@ -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,21 +399,20 @@ 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
- "border-semantic-border-neutral-primary bg-transparent",
371
- "group-hover:border-semantic-border-neutralInverse-primary",
372
- "group-data-[state=checked]:bg-semantic-background-neutralInverse-primary group-data-[state=checked]:border-semantic-border-neutralInverse-tertiary",
373
- "group-data-[state=checked]:group-hover:border-semantic-border-neutralInverse-tertiary",
374
- "group-disabled:border-semantic-border-neutral-tertiary group-disabled:group-hover:border-semantic-border-neutral-tertiary",
375
- "group-disabled:group-data-[state=checked]:bg-semantic-background-neutral-tertiary group-disabled:group-data-[state=checked]:border-semantic-border-neutral-tertiary"
402
+ "border-semantic-controls-border-default bg-transparent",
403
+ "group-hover:border-semantic-controls-border-hover",
404
+ "group-data-[preview-hover=true]:border-semantic-controls-border-hover",
405
+ "group-data-[state=checked]:bg-semantic-controls-background-checked group-data-[state=checked]:border-semantic-controls-background-checked",
406
+ "group-data-[state=checked]:group-hover:border-semantic-controls-background-checked",
407
+ "group-data-[state=checked]:group-data-[preview-hover=true]:border-semantic-controls-background-checked",
408
+ "group-disabled:border-semantic-controls-border-disabled group-disabled:group-hover:border-semantic-controls-border-disabled",
409
+ "group-disabled:group-data-[state=checked]:bg-semantic-controls-background-disabled group-disabled:group-data-[state=checked]:border-semantic-controls-border-disabled"
376
410
  ],
377
411
  {
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
- "text-semantic-text-neutralInverse-primary",
421
- disabled && "text-semantic-text-neutral-disabled"
483
+ "text-semantic-controls-icon-checked",
484
+ resolvedDisabled && "text-semantic-controls-icon-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
  }
@@ -446,17 +509,17 @@ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
446
509
  var radioVariants = cva5(
447
510
  [
448
511
  "aspect-square shrink-0 rounded-full border transition-all duration-200 ease-out flex items-center justify-center",
449
- // focus ring: no semantic token for neutral-800 in semantic-colors.json left as-is
512
+ // focus ring: no semantic token for neutral-800 in semantic-colors.json — left as-is
450
513
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2",
451
514
  "disabled:cursor-not-allowed",
452
515
  // Default unchecked state (not selected)
453
516
  "border-semantic-border-neutral-primary bg-semantic-background-transparent",
454
517
  // Hover effect for unchecked state
455
- "hover:border-semantic-border-neutralInverse-primary",
518
+ "hover:border-semantic-border-neutral-inverse-primary",
456
519
  // Checked state (selected)
457
- "data-[state=checked]:border-semantic-border-neutralInverse-tertiary",
520
+ "data-[state=checked]:border-semantic-controls-background-checked",
458
521
  // No border change on hover when checked
459
- "data-[state=checked]:hover:border-semantic-border-neutralInverse-tertiary",
522
+ "data-[state=checked]:hover:border-semantic-controls-background-checked",
460
523
  // Disabled states
461
524
  "disabled:border-semantic-border-neutral-tertiary",
462
525
  "disabled:hover:border-semantic-border-neutral-tertiary",
@@ -493,8 +556,8 @@ var radioIndicatorVariants = cva5(["flex items-center justify-center"], {
493
556
  var radioDotVariants = cva5(
494
557
  [
495
558
  "rounded-full transition-colors duration-200 ease-out flex items-center justify-center",
496
- // Default selected state - neutralInverse primary (neutral.1100)
497
- "bg-semantic-background-neutralInverse-primary"
559
+ // Default selected state - controls checked (blue.600)
560
+ "bg-semantic-controls-background-checked"
498
561
  ],
499
562
  {
500
563
  variants: {
@@ -507,7 +570,7 @@ var radioDotVariants = cva5(
507
570
  disabled: {
508
571
  true: "bg-neutral-500",
509
572
  // Gray dot when disabled (no semantic background token for neutral.500)
510
- false: "bg-semantic-background-neutralInverse-primary"
573
+ false: "bg-semantic-controls-background-checked"
511
574
  }
512
575
  },
513
576
  defaultVariants: {
@@ -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
  }
@@ -566,9 +630,9 @@ var inputVariants = cva6(
566
630
  "placeholder:leading-6",
567
631
  // 24px line-height
568
632
  // Hover state
569
- "hover:border-semantic-border-neutralInverse-primary",
633
+ "hover:border-semantic-input-border-hover",
570
634
  // Focus (Active/Typing) state
571
- "focus:border-semantic-border-neutralInverse-primary focus:text-semantic-text-neutral-primary",
635
+ "focus:border-semantic-input-border-active focus:text-semantic-text-neutral-primary",
572
636
  // Caret (cursor) color
573
637
  "caret-semantic-text-neutral-primary",
574
638
  // Disabled state
@@ -582,11 +646,11 @@ var inputVariants = cva6(
582
646
  variant: {
583
647
  default: "",
584
648
  error: [
585
- "border-semantic-border-semantic-error-subtle focus:border-semantic-border-semantic-error-subtle",
649
+ "border-semantic-border-error-subtle focus:border-semantic-border-error-subtle",
586
650
  "text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
587
651
  ],
588
652
  success: [
589
- "border-semantic-border-semantic-success-subtle focus:border-semantic-border-semantic-success-subtle",
653
+ "border-semantic-border-success-subtle focus:border-semantic-border-success-subtle",
590
654
  "text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
591
655
  ]
592
656
  },
@@ -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;
649
- 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;
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;
727
+ const helperTextColor = error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-tertiary";
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
  ),
@@ -686,10 +764,10 @@ var Input = React6.forwardRef(
686
764
  className: cn6(
687
765
  "flex items-center w-full overflow-hidden rounded-sm border transition-all duration-200 ease-out",
688
766
  "bg-semantic-background-neutral-primary font-sans text-sm leading-6 font-normal",
689
- "border-semantic-border-neutral-primary hover:border-semantic-border-neutralInverse-primary",
690
- "focus-within:border-semantic-border-neutralInverse-primary",
691
- error && "border-semantic-border-semantic-error-subtle hover:border-semantic-border-semantic-error-subtle focus-within:border-semantic-border-semantic-error-subtle",
692
- success && "border-semantic-border-semantic-success-subtle hover:border-semantic-border-semantic-success-subtle focus-within:border-semantic-border-semantic-success-subtle",
767
+ "border-semantic-border-neutral-primary hover:border-semantic-input-border-hover",
768
+ "focus-within:border-semantic-input-border-active",
769
+ error && "border-semantic-border-error-subtle hover:border-semantic-border-error-subtle focus-within:border-semantic-border-error-subtle",
770
+ success && "border-semantic-border-success-subtle hover:border-semantic-border-success-subtle focus-within:border-semantic-border-success-subtle",
693
771
  disabled && "bg-semantic-background-neutral-tertiary border-semantic-border-neutral-tertiary",
694
772
  className
695
773
  ),
@@ -715,29 +793,31 @@ var Input = React6.forwardRef(
715
793
  className: cn6(
716
794
  "flex items-center w-full overflow-hidden rounded-sm border transition-all duration-200 ease-out",
717
795
  "bg-semantic-background-neutral-primary font-sans text-sm leading-6 font-normal",
718
- "border-semantic-border-neutral-primary hover:border-semantic-border-neutralInverse-primary",
719
- "focus-within:border-semantic-border-neutralInverse-primary",
720
- error && "border-semantic-border-semantic-error-subtle hover:border-semantic-border-semantic-error-subtle focus-within:border-semantic-border-semantic-error-subtle",
721
- success && "border-semantic-border-semantic-success-subtle hover:border-semantic-border-semantic-success-subtle focus-within:border-semantic-border-semantic-success-subtle",
796
+ "border-semantic-border-neutral-primary hover:border-semantic-input-border-hover",
797
+ "focus-within:border-semantic-input-border-active",
798
+ error && "border-semantic-border-error-subtle hover:border-semantic-border-error-subtle focus-within:border-semantic-border-error-subtle",
799
+ success && "border-semantic-border-success-subtle hover:border-semantic-border-success-subtle focus-within:border-semantic-border-success-subtle",
722
800
  disabled && "bg-semantic-background-neutral-tertiary border-semantic-border-neutral-tertiary",
723
801
  className
724
802
  ),
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,
@@ -751,12 +831,12 @@ var Input = React6.forwardRef(
751
831
  {
752
832
  size: 16,
753
833
  className: cn6(
754
- error ? "text-semantic-text-semantic-error-subtle" : success ? "text-semantic-text-semantic-success-subtle" : "text-semantic-text-neutral-tertiary"
834
+ error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-tertiary"
755
835
  ),
756
836
  "aria-hidden": "true"
757
837
  }
758
838
  ),
759
- helperText
839
+ resolvedSupportText
760
840
  ]
761
841
  }
762
842
  )
@@ -789,17 +869,17 @@ var dropdownTriggerVariants = cva7(
789
869
  "font-sans text-sm leading-6 font-normal",
790
870
  "px-3 py-1 min-h-[32px] h-8",
791
871
  "bg-semantic-background-neutral-primary border-semantic-border-neutral-primary text-semantic-text-neutral-primary",
792
- "hover:border-semantic-border-neutralInverse-primary",
793
- "focus:border-semantic-border-neutralInverse-primary",
872
+ "hover:border-semantic-input-border-hover",
873
+ "focus:border-semantic-input-border-active",
794
874
  "data-[placeholder]:text-semantic-text-neutral-tertiary",
795
- "data-[state=open]:border-semantic-border-neutralInverse-primary data-[state=open]:text-semantic-text-neutral-tertiary",
875
+ "data-[state=open]:border-semantic-input-border-active data-[state=open]:text-semantic-text-neutral-tertiary",
796
876
  "disabled:bg-semantic-background-neutral-tertiary disabled:border-semantic-border-neutral-tertiary disabled:text-semantic-text-neutral-disabled disabled:cursor-not-allowed",
797
877
  "focus-visible:outline-none"
798
878
  ],
799
879
  {
800
880
  variants: {
801
881
  error: {
802
- true: "border-semantic-border-semantic-error-default hover:border-semantic-border-semantic-error-default focus:border-semantic-border-semantic-error-default data-[state=open]:border-semantic-border-semantic-error-default",
882
+ true: "border-semantic-border-error-default hover:border-semantic-border-error-default focus:border-semantic-border-error-default data-[state=open]:border-semantic-border-error-default",
803
883
  false: ""
804
884
  }
805
885
  },
@@ -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;
844
- const helperTextColor = error ? "text-semantic-text-semantic-error-subtle" : "text-semantic-text-neutral-disabled";
845
- const HelperIcon = error ? WarningFilled2 : showHelperIcon ? Info2 : null;
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;
934
+ const helperTextColor = error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-disabled";
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,
@@ -913,11 +1003,11 @@ var Dropdown = React7.forwardRef(
913
1003
  HelperIcon,
914
1004
  {
915
1005
  size: 16,
916
- className: cn7(error ? "text-semantic-text-semantic-error-subtle" : "text-semantic-text-neutral-primary", "shrink-0"),
1006
+ className: cn7(error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-primary", "shrink-0"),
917
1007
  "aria-hidden": "true"
918
1008
  }
919
1009
  ),
920
- helperText
1010
+ resolvedSupportText
921
1011
  ]
922
1012
  }
923
1013
  )
@@ -940,10 +1030,11 @@ var multiSelectCheckboxItemVariants = cva7([
940
1030
  "data-[highlighted]:bg-semantic-background-neutral-tertiary",
941
1031
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-semantic-disabled"
942
1032
  ]);
943
- var multiSelectCheckboxBox = "flex h-4 w-4 shrink-0 p-[3px] items-center justify-center rounded-[4px] border border-semantic-border-neutral-primary group-data-[state=checked]:border-semantic-border-neutralInverse-tertiary group-data-[state=checked]:bg-semantic-background-neutralInverse-primary";
1033
+ var multiSelectCheckboxBox = "flex h-4 w-4 shrink-0 p-[3px] items-center justify-center rounded-[4px] border border-semantic-border-neutral-primary group-data-[state=checked]:border-semantic-controls-background-checked group-data-[state=checked]:bg-semantic-controls-background-checked";
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;
963
- const helperTextColor = error ? "text-semantic-text-semantic-error-subtle" : "text-semantic-text-neutral-tertiary";
964
- const HelperIcon = error ? InfoFilled2 : showHelperIcon ? Info2 : null;
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;
1063
+ const helperTextColor = error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-tertiary";
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
  ),
@@ -1005,7 +1105,7 @@ var DropdownMulti = React7.forwardRef(
1005
1105
  "data-state": open ? "open" : "closed",
1006
1106
  className: cn7(
1007
1107
  "group flex min-h-8 h-8 w-full flex-wrap items-center gap-1 rounded-sm bg-semantic-background-neutral-primary px-3 py-1 text-left font-sans text-sm leading-6 font-normal outline-none transition-all duration-200 ease-out",
1008
- error ? "border border-semantic-border-semantic-error-default hover:border-semantic-border-semantic-error-default focus:border-semantic-border-semantic-error-default" : "border border-semantic-border-neutral-primary hover:border-semantic-border-neutralInverse-primary focus:border-semantic-border-neutralInverse-primary",
1108
+ error ? "border border-semantic-border-error-default hover:border-semantic-border-error-default focus:border-semantic-border-error-default" : "border border-semantic-border-neutral-primary hover:border-semantic-input-border-hover focus:border-semantic-input-border-active",
1009
1109
  "focus-visible:outline-none",
1010
1110
  "disabled:cursor-not-allowed disabled:bg-semantic-background-neutral-tertiary disabled:border-semantic-border-neutral-tertiary disabled:text-semantic-text-neutral-disabled"
1011
1111
  ),
@@ -1075,7 +1175,7 @@ var DropdownMulti = React7.forwardRef(
1075
1175
  Tickmark,
1076
1176
  {
1077
1177
  size: 12,
1078
- className: "opacity-semantic-hidden !text-semantic-text-neutralInverse-primary group-data-[state=checked]:opacity-semantic-full"
1178
+ className: "opacity-semantic-hidden !text-semantic-text-neutral-inverse-primary group-data-[state=checked]:opacity-semantic-full"
1079
1179
  }
1080
1180
  ) }),
1081
1181
  selectAllLabel
@@ -1097,7 +1197,7 @@ var DropdownMulti = React7.forwardRef(
1097
1197
  Tickmark,
1098
1198
  {
1099
1199
  size: 12,
1100
- className: "opacity-semantic-hidden !text-semantic-text-neutralInverse-primary group-data-[state=checked]:opacity-semantic-full"
1200
+ className: "opacity-semantic-hidden !text-semantic-text-neutral-inverse-primary group-data-[state=checked]:opacity-semantic-full"
1101
1201
  }
1102
1202
  ) }),
1103
1203
  opt.label
@@ -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,
@@ -1122,11 +1222,11 @@ var DropdownMulti = React7.forwardRef(
1122
1222
  HelperIcon,
1123
1223
  {
1124
1224
  size: 16,
1125
- className: cn7(error ? "text-semantic-text-semantic-error-subtle" : "text-semantic-text-neutral-primary", "shrink-0"),
1225
+ className: cn7(error ? "text-semantic-text-error-subtle" : "text-semantic-text-neutral-primary", "shrink-0"),
1126
1226
  "aria-hidden": "true"
1127
1227
  }
1128
1228
  ),
1129
- helperText
1229
+ resolvedSupportText
1130
1230
  ]
1131
1231
  }
1132
1232
  )
@@ -1151,12 +1251,12 @@ var searchFieldVariants = cva8(
1151
1251
  // 14px font, 24px line-height
1152
1252
  "px-3 py-1",
1153
1253
  // 12px horizontal, 4px vertical
1154
- // Default state semantic background, border
1254
+ // Default state — semantic background, border
1155
1255
  "bg-semantic-background-neutral-primary border-semantic-border-neutral-primary",
1156
1256
  // Hover state
1157
- "hover:border-semantic-border-neutralInverse-primary",
1257
+ "hover:border-semantic-input-border-hover",
1158
1258
  // Focus-within (Active/Typing) state
1159
- "focus-within:border-semantic-border-neutralInverse-primary",
1259
+ "focus-within:border-semantic-border-neutral-inverse-primary",
1160
1260
  // Disabled state
1161
1261
  "has-[:disabled]:bg-semantic-background-neutral-tertiary has-[:disabled]:border-semantic-border-neutral-tertiary",
1162
1262
  "has-[:disabled]:cursor-not-allowed",
@@ -1168,7 +1268,7 @@ var searchFieldVariants = cva8(
1168
1268
  }
1169
1269
  );
1170
1270
  var searchInputVariants = cva8([
1171
- // Base input styles semantic background, text
1271
+ // Base input styles — semantic background, text
1172
1272
  "flex-1 bg-semantic-background-transparent border-none outline-none",
1173
1273
  "text-semantic-text-neutral-primary placeholder:text-semantic-text-neutral-tertiary",
1174
1274
  "focus:text-semantic-text-neutral-primary",
@@ -1234,7 +1334,7 @@ var SearchField = React8.forwardRef(
1234
1334
  onClick: handleClear,
1235
1335
  className: cn8(
1236
1336
  "shrink-0 flex items-center justify-center",
1237
- // clear button default: neutral-900 has no semantic token left as-is
1337
+ // clear button default: neutral-900 has no semantic token — left as-is
1238
1338
  "text-neutral-900 hover:text-semantic-text-neutral-primary",
1239
1339
  "transition-colors duration-200 ease-out",
1240
1340
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-800 focus-visible:ring-offset-2 rounded-sm"
@@ -1265,12 +1365,12 @@ var textareaVariants = cva9(
1265
1365
  // 12px horizontal, 4px vertical
1266
1366
  "outline-none resize-none",
1267
1367
  // Fixed height, no resize
1268
- // Default state semantic background, border, text
1368
+ // Default state — semantic background, border, text
1269
1369
  "bg-semantic-background-neutral-primary border-semantic-border-neutral-primary text-semantic-text-neutral-tertiary placeholder:text-semantic-text-neutral-tertiary",
1270
1370
  // Hover state
1271
- "hover:border-semantic-border-neutralInverse-primary",
1371
+ "hover:border-semantic-input-border-hover",
1272
1372
  // Focus (Active/Typing) state
1273
- "focus:border-semantic-border-neutralInverse-primary focus:text-semantic-text-neutral-primary",
1373
+ "focus:border-semantic-input-border-hover focus:text-semantic-text-neutral-primary",
1274
1374
  // Caret (cursor) color
1275
1375
  "caret-semantic-text-neutral-primary",
1276
1376
  // Disabled state
@@ -1284,11 +1384,11 @@ var textareaVariants = cva9(
1284
1384
  variant: {
1285
1385
  default: "",
1286
1386
  error: [
1287
- "border-semantic-border-semantic-error-subtle focus:border-semantic-border-semantic-error-subtle",
1387
+ "border-semantic-border-error-subtle focus:border-semantic-border-error-subtle",
1288
1388
  "text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
1289
1389
  ],
1290
1390
  success: [
1291
- "border-semantic-border-semantic-success-subtle focus:border-semantic-border-semantic-success-subtle",
1391
+ "border-semantic-border-success-subtle focus:border-semantic-border-success-subtle",
1292
1392
  "text-semantic-text-neutral-primary focus:text-semantic-text-neutral-primary"
1293
1393
  ]
1294
1394
  },
@@ -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;
1344
- 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;
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}`;
1458
+ const helperTextColor = error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-tertiary";
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,
@@ -1385,32 +1499,28 @@ var Textarea = React9.forwardRef(
1385
1499
  {
1386
1500
  size: 16,
1387
1501
  className: cn9(
1388
- error ? "text-semantic-text-semantic-error-subtle" : success ? "text-semantic-text-semantic-success-subtle" : "text-semantic-text-neutral-primary"
1502
+ error ? "text-semantic-text-error-subtle" : success ? "text-semantic-text-success-subtle" : "text-semantic-text-neutral-primary"
1389
1503
  ),
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
  ] })
@@ -1431,7 +1541,7 @@ var tooltipContentVariants = cva10(
1431
1541
  // Base styles
1432
1542
  "z-50 rounded-sm",
1433
1543
  // Removed overflow-hidden to allow arrows to show
1434
- "bg-semantic-background-neutralInverse-primary text-semantic-text-neutralInverse-primary",
1544
+ "bg-semantic-background-neutral-inverse-primary text-semantic-text-neutral-inverse-primary",
1435
1545
  "px-4 py-1",
1436
1546
  // 16px horizontal, 4px vertical
1437
1547
  "text-xs font-medium leading-4",
@@ -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,20 +1639,20 @@ 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
- /* @__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(
1649
+ /* @__PURE__ */ jsx10("div", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-inverse-primary", children: title }),
1650
+ resolvedDescription && /* @__PURE__ */ jsx10("div", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-inverse-primary opacity-semantic-description mt-1", children: resolvedDescription }),
1651
+ resolvedCloseIcon && /* @__PURE__ */ jsx10(
1534
1652
  "button",
1535
1653
  {
1536
1654
  onClick: onClose,
1537
- className: "absolute top-0 right-0 text-semantic-text-neutralInverse-primary hover:opacity-semantic-hover transition-opacity",
1655
+ className: "absolute top-0 right-0 text-semantic-text-neutral-inverse-primary hover:opacity-semantic-hover transition-opacity",
1538
1656
  "aria-label": "Close tooltip",
1539
1657
  type: "button",
1540
1658
  children: /* @__PURE__ */ jsx10(Close3, { size: 16 })
@@ -1589,7 +1707,7 @@ var ProgressBar = React11.forwardRef(
1589
1707
  "div",
1590
1708
  {
1591
1709
  className: cn11(
1592
- "rounded-full overflow-hidden bg-semantic-background-neutral-tertiary transition-colors shrink-0",
1710
+ "rounded-full overflow-hidden bg-semantic-background-primary-subtle transition-colors shrink-0",
1593
1711
  fluid && "w-full"
1594
1712
  ),
1595
1713
  style: trackStyle,
@@ -1598,7 +1716,7 @@ var ProgressBar = React11.forwardRef(
1598
1716
  {
1599
1717
  className: cn11(
1600
1718
  "h-full rounded-full transition-all duration-200 ease-out",
1601
- percentage === 100 ? "bg-semantic-background-semantic-success-default" : "bg-semantic-background-neutralInverse-primary"
1719
+ percentage === 100 ? "bg-semantic-background-success-default" : "bg-semantic-background-primary-default"
1602
1720
  ),
1603
1721
  style: {
1604
1722
  width: `${percentage}%`,
@@ -1703,7 +1821,7 @@ var tabsTriggerVariants = cva12(
1703
1821
  underline: [
1704
1822
  "px-3 py-1 border-b-2 -mb-[1px] border-semantic-border-transparent",
1705
1823
  "text-semantic-text-neutral-tertiary hover:text-semantic-text-neutral-primary",
1706
- "data-[state=active]:text-semantic-text-neutral-primary data-[state=active]:border-semantic-border-semantic-info-subtle data-[state=active]:border-b-2",
1824
+ "data-[state=active]:text-semantic-text-neutral-primary data-[state=active]:border-semantic-input-border-active data-[state=active]:border-b-2",
1707
1825
  "disabled:text-semantic-text-neutral-disabled"
1708
1826
  ],
1709
1827
  iconOnly: [
@@ -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
  }
@@ -1857,7 +1977,7 @@ var MenuTrigger = React15.forwardRef(({ className, ...props }, ref) => /* @__PUR
1857
1977
  className: cn15(
1858
1978
  "inline-flex items-center justify-center rounded-sm",
1859
1979
  "text-semantic-text-neutral-primary",
1860
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutralInverse-primary focus-visible:ring-offset-0",
1980
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-semantic-border-neutral-inverse-primary focus-visible:ring-offset-0",
1861
1981
  "hover:bg-semantic-background-neutral-tertiary",
1862
1982
  className
1863
1983
  ),
@@ -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";
@@ -2008,7 +2132,7 @@ var DrawerTitle = ({ children, className, ...props }) => /* @__PURE__ */ jsx16(
2008
2132
  "h2",
2009
2133
  {
2010
2134
  className: cn16(
2011
- // Figma: 20px / 600 / 28px fontSize.xl + lineHeight.lg from tokens
2135
+ // Figma: 20px / 600 / 28px — fontSize.xl + lineHeight.lg from tokens
2012
2136
  "text-xl font-semibold leading-lg text-semantic-text-neutral-primary break-words",
2013
2137
  className
2014
2138
  ),
@@ -2024,7 +2148,7 @@ var DrawerDescription = ({
2024
2148
  "p",
2025
2149
  {
2026
2150
  className: cn16(
2027
- // Figma: 14px / 400 / 24px, TextNeutralTertiary (#7C7C7C)
2151
+ // Figma: 14px / 400 / 24px, Text–Neutral–Tertiary (#7C7C7C)
2028
2152
  "text-sm font-normal leading-6 text-semantic-text-neutral-tertiary break-words",
2029
2153
  className
2030
2154
  ),
@@ -2059,9 +2183,9 @@ var DrawerContent = React16.forwardRef(
2059
2183
  DialogPrimitive.Overlay,
2060
2184
  {
2061
2185
  className: cn16(
2062
- "fixed inset-0 z-50 bg-semantic-background-neutralInverse-primary opacity-semantic-disabled",
2186
+ "fixed inset-0 z-50 bg-semantic-background-neutral-inverse-primary opacity-semantic-disabled",
2063
2187
  // tailwindcss-animate: `.animate-in` bakes in animationDuration DEFAULT (~150ms),
2064
- // which overrides plain `duration-*` in the cascade `!duration-*` fixes it.
2188
+ // which overrides plain `duration-*` in the cascade — `!duration-*` fixes it.
2065
2189
  "!duration-700 ease-in-out",
2066
2190
  "data-[state=open]:animate-in data-[state=open]:fade-in-0",
2067
2191
  "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
@@ -2255,7 +2379,7 @@ function PopupContent({
2255
2379
  {
2256
2380
  className: cn18(
2257
2381
  "w-full rounded-sm px-4 py-3",
2258
- showBodyBox ? "bg-semantic-background-semantic-info-subtle" : "bg-transparent"
2382
+ showBodyBox ? "bg-semantic-background-info-subtle" : "bg-transparent"
2259
2383
  ),
2260
2384
  children
2261
2385
  }
@@ -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
- showOverlay && /* @__PURE__ */ jsx18(DialogPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-semantic-background-neutralInverse-primary opacity-semantic-disabled" }),
2438
+ showOverlay && /* @__PURE__ */ jsx18(DialogPrimitive2.Overlay, { className: "fixed inset-0 z-50 bg-semantic-background-neutral-inverse-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,84 +2560,86 @@ 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
- // Info (subtle/solid from semantic tokens)
2573
+ // Info (badge-specific semantic tokens)
2437
2574
  {
2438
2575
  state: "info",
2439
2576
  appearance: "outlined",
2440
- class: "bg-semantic-background-semantic-info-subtle border-semantic-border-semantic-info-subtle text-semantic-text-neutral-primary"
2577
+ class: "bg-semantic-badge-background-subtle-info border-semantic-badge-border-info text-semantic-badge-text-black"
2441
2578
  },
2442
2579
  {
2443
2580
  state: "info",
2444
2581
  appearance: "solid",
2445
- class: "bg-semantic-background-semantic-info-default text-semantic-text-semantic-info-default"
2582
+ class: "bg-semantic-badge-background-solid-info text-semantic-badge-text-white"
2446
2583
  },
2447
2584
  // Success
2448
2585
  {
2449
2586
  state: "success",
2450
2587
  appearance: "outlined",
2451
- class: "bg-semantic-background-semantic-success-subtle border-semantic-border-semantic-success-subtle text-semantic-text-neutral-primary"
2588
+ class: "bg-semantic-badge-background-subtle-success border-semantic-badge-border-success text-semantic-badge-text-black"
2452
2589
  },
2453
2590
  {
2454
2591
  state: "success",
2455
2592
  appearance: "solid",
2456
- class: "bg-semantic-background-semantic-success-default text-semantic-text-semantic-success-default"
2593
+ class: "bg-semantic-badge-background-solid-success text-semantic-badge-text-white"
2457
2594
  },
2458
2595
  // Warning
2459
2596
  {
2460
2597
  state: "warning",
2461
2598
  appearance: "outlined",
2462
- class: "bg-semantic-background-semantic-warning-subtle border-semantic-border-semantic-warning-subtle text-semantic-text-neutral-primary"
2599
+ class: "bg-semantic-badge-background-subtle-warning border-semantic-badge-border-warning text-semantic-badge-text-black"
2463
2600
  },
2464
2601
  {
2465
2602
  state: "warning",
2466
2603
  appearance: "solid",
2467
- class: "bg-semantic-background-semantic-warning-default text-semantic-text-semantic-warning-default"
2604
+ class: "bg-semantic-badge-background-solid-warning text-semantic-badge-text-black"
2468
2605
  },
2469
2606
  // Error
2470
2607
  {
2471
2608
  state: "error",
2472
2609
  appearance: "outlined",
2473
- class: "bg-semantic-background-semantic-error-subtle border-semantic-border-semantic-error-subtle text-semantic-text-neutral-primary"
2610
+ class: "bg-semantic-badge-background-subtle-error border-semantic-badge-border-error text-semantic-badge-text-black"
2474
2611
  },
2475
2612
  {
2476
2613
  state: "error",
2477
2614
  appearance: "solid",
2478
- class: "bg-semantic-background-semantic-error-default text-semantic-text-semantic-error-default"
2615
+ class: "bg-semantic-badge-background-solid-error text-semantic-badge-text-white"
2479
2616
  },
2480
2617
  // Neutral
2481
2618
  {
2482
2619
  state: "neutral",
2483
2620
  appearance: "outlined",
2484
- class: "bg-semantic-background-neutral-tertiary border-semantic-border-neutral-primary text-semantic-text-neutral-primary"
2621
+ class: "bg-semantic-badge-background-subtle-neutral border-semantic-badge-border-neutral text-semantic-badge-text-black"
2485
2622
  },
2486
2623
  {
2487
2624
  state: "neutral",
2488
2625
  appearance: "solid",
2489
- class: "bg-neutral-400 text-neutral-1100"
2626
+ class: "bg-semantic-badge-background-solid-neutral text-semantic-badge-text-black"
2490
2627
  },
2491
- // Process (purple: outlined = bg purple-200, border purple-700, text neutral-1100; solid = bg purple-700, text white)
2628
+ // Process
2492
2629
  {
2493
2630
  state: "process",
2494
2631
  appearance: "outlined",
2495
- class: "bg-purple-200 border-purple-700 text-neutral-1100"
2632
+ class: "bg-semantic-badge-background-subtle-process border-semantic-badge-border-process text-semantic-badge-text-black"
2496
2633
  },
2497
2634
  {
2498
2635
  state: "process",
2499
2636
  appearance: "solid",
2500
- class: "bg-purple-700 text-white"
2637
+ class: "bg-semantic-badge-background-solid-process text-semantic-badge-text-white"
2501
2638
  },
2502
2639
  {
2503
2640
  state: "action",
2504
2641
  appearance: "outlined",
2505
- class: "bg-semantic-background-semantic-action-subtle border-neutral-400 text-semantic-text-neutral-primary"
2642
+ class: "bg-semantic-badge-background-subtle-action border-semantic-badge-border-action text-semantic-badge-text-black"
2506
2643
  }
2507
2644
  ],
2508
2645
  defaultVariants: {
@@ -2523,31 +2660,41 @@ var leadingIconMap = {
2523
2660
  action: InfoFilled4
2524
2661
  };
2525
2662
  var leadingIconOutlinedColorClass = {
2526
- info: "!text-blue-600",
2527
- success: "!text-green-800",
2528
- warning: "!text-orange-700",
2529
- error: "!text-red-800",
2530
- neutral: "!text-neutral-1100",
2531
- process: "!text-purple-700",
2532
- action: "!text-neutral-400"
2663
+ info: "!text-semantic-badge-icon-subtle-info",
2664
+ success: "!text-semantic-badge-icon-subtle-success",
2665
+ warning: "!text-semantic-badge-icon-subtle-warning",
2666
+ error: "!text-semantic-badge-icon-subtle-error",
2667
+ neutral: "!text-semantic-badge-icon-subtle-neutral",
2668
+ process: "!text-semantic-badge-border-process",
2669
+ action: "!text-semantic-badge-border-action"
2533
2670
  };
2534
2671
  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,
@@ -2573,13 +2720,13 @@ var Badge = React19.forwardRef(
2573
2720
  size: leadingIconSize,
2574
2721
  className: cn19(
2575
2722
  "shrink-0",
2576
- resolvedAppearance === "solid" ? "text-neutral-50" : leadingIconOutlinedColorClass[resolvedState]
2723
+ resolvedAppearance === "solid" ? resolvedState === "info" ? "!text-semantic-badge-icon-solid-info" : "text-neutral-50" : leadingIconOutlinedColorClass[resolvedState]
2577
2724
  ),
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",
@@ -2692,11 +2839,11 @@ var chipVariants = cva16(
2692
2839
  "inline-flex items-center justify-center gap-1.5 rounded-full border transition-colors duration-200 ease-out",
2693
2840
  "font-sans font-normal leading-5",
2694
2841
  // Default: 1px border
2695
- "bg-semantic-background-neutral-primary border border-semantic-border-neutral-primary text-semantic-text-neutral-primary",
2842
+ "bg-semantic-chips-background-default border border-semantic-chips-border-default text-semantic-chips-text-default",
2696
2843
  // Hover
2697
- "hover:bg-semantic-background-neutral-tertiary hover:border-transparent",
2844
+ "hover:bg-semantic-chips-background-hover hover:text-semantic-chips-text-hover hover:border-transparent",
2698
2845
  // Focused: 2px border neutralInverse primary so clearly distinct from default
2699
- "focus-within:border-2 focus-within:border-semantic-border-neutralInverse-primary focus-within:bg-semantic-background-neutral-primary focus-within:text-semantic-text-neutral-primary",
2846
+ "focus-within:border-2 focus-within:border-semantic-chips-border-focused focus-within:bg-semantic-chips-background-default focus-within:text-semantic-chips-text-default",
2700
2847
  "focus-within:outline-none"
2701
2848
  ],
2702
2849
  {
@@ -2706,20 +2853,20 @@ var chipVariants = cva16(
2706
2853
  small: "h-6 min-w-[67px] py-1 px-3 gap-1 text-xs"
2707
2854
  },
2708
2855
  selected: {
2709
- true: "bg-semantic-background-neutralInverse-primary text-semantic-text-neutralInverse-primary border-semantic-border-transparent hover:bg-semantic-background-neutralInverse-primary",
2856
+ true: "bg-semantic-chips-background-selected text-semantic-chips-text-selected border-semantic-border-transparent hover:bg-semantic-chips-background-selected hover:text-semantic-chips-text-selected",
2710
2857
  false: ""
2711
2858
  },
2712
2859
  disabled: {
2713
- true: "bg-semantic-background-neutral-disabled text-semantic-text-neutral-disabled border-semantic-border-transparent hover:bg-semantic-background-neutral-disabled cursor-not-allowed pointer-events-none",
2860
+ true: "bg-semantic-chips-background-disabled text-semantic-chips-text-disabled border-semantic-border-transparent hover:bg-semantic-chips-background-disabled hover:text-semantic-chips-text-disabled cursor-not-allowed pointer-events-none",
2714
2861
  false: ""
2715
2862
  }
2716
2863
  },
2717
2864
  compoundVariants: [
2718
- { selected: true, disabled: true, class: "bg-semantic-background-neutral-disabled text-semantic-text-neutral-disabled" },
2865
+ { selected: true, disabled: true, class: "bg-semantic-chips-background-disabled text-semantic-chips-text-disabled" },
2719
2866
  {
2720
2867
  selected: true,
2721
2868
  disabled: false,
2722
- class: "focus-within:border-2 focus-within:bg-semantic-background-neutralInverse-primary focus-within:text-semantic-text-neutralInverse-primary focus-within:border-semantic-border-neutralInverse-primary"
2869
+ class: "focus-within:border-2 focus-within:bg-semantic-chips-background-selected focus-within:text-semantic-chips-text-selected focus-within:border-semantic-chips-border-focused"
2723
2870
  }
2724
2871
  ],
2725
2872
  defaultVariants: {
@@ -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",
@@ -2938,7 +3087,7 @@ var Pagination = React22.forwardRef(
2938
3087
  {
2939
3088
  className: "inline-flex h-7 min-w-8 shrink-0 items-center justify-center px-2xs text-sm text-semantic-text-neutral-tertiary",
2940
3089
  "aria-hidden": true,
2941
- children: "\u2026"
3090
+ children: "..."
2942
3091
  },
2943
3092
  `ellipsis-${index}`
2944
3093
  ) : /* @__PURE__ */ jsx22(
@@ -2950,7 +3099,7 @@ var Pagination = React22.forwardRef(
2950
3099
  onClick: () => goToPage(item),
2951
3100
  className: cn22(
2952
3101
  "inline-flex h-7 min-w-8 shrink-0 items-center justify-center rounded-sm px-2 text-sm tabular-nums",
2953
- item === page ? "bg-semantic-background-neutralInverse-primary text-semantic-text-neutralInverse-primary" : "bg-semantic-background-neutral-primary text-semantic-text-neutral-tertiary hover:bg-semantic-background-neutral-tertiary"
3102
+ item === page ? "bg-semantic-chips-background-selected text-semantic-chips-text-selected" : "bg-semantic-background-neutral-primary text-semantic-text-neutral-tertiary hover:bg-semantic-chips-background-hover hover:text-semantic-chips-text-hover"
2954
3103
  ),
2955
3104
  children: item
2956
3105
  },
@@ -2987,21 +3136,21 @@ 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,
2995
3144
  "bg-semantic-background-neutral-primary",
2996
- "border-semantic-border-neutralInverse-tertiary",
3145
+ "border-semantic-border-neutral-inverse-tertiary",
2997
3146
  "text-semantic-text-neutral-primary"
2998
3147
  );
2999
3148
  case "complete":
3000
3149
  return cn23(
3001
3150
  circleBase,
3002
- "bg-semantic-background-semantic-success-subtle",
3003
- "border-semantic-border-semantic-success-subtle",
3004
- "text-semantic-text-semantic-success-subtle"
3151
+ "bg-semantic-background-success-subtle",
3152
+ "border-semantic-border-success-subtle",
3153
+ "text-semantic-text-success-subtle"
3005
3154
  );
3006
3155
  case "default":
3007
3156
  default:
@@ -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-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-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
  }
@@ -3178,10 +3352,10 @@ var toastVariants = cva17(
3178
3352
  {
3179
3353
  variants: {
3180
3354
  variant: {
3181
- info: "border-l-semantic-border-semantic-info-subtle bg-semantic-background-semantic-info-subtle",
3182
- success: "border-l-semantic-border-semantic-success-subtle bg-semantic-background-semantic-success-subtle",
3183
- warning: "border-l-semantic-border-semantic-warning-subtle bg-semantic-background-semantic-warning-subtle",
3184
- error: "border-l-semantic-border-semantic-error-subtle bg-semantic-background-semantic-error-subtle"
3355
+ info: "border-l-semantic-toast-border-info bg-semantic-toast-background-info",
3356
+ success: "border-l-semantic-border-success-subtle bg-semantic-background-success-subtle",
3357
+ warning: "border-l-semantic-border-warning-subtle bg-semantic-background-warning-subtle",
3358
+ error: "border-l-semantic-border-error-subtle bg-semantic-background-error-subtle"
3185
3359
  },
3186
3360
  layout: {
3187
3361
  default: "h-14 items-center",
@@ -3197,45 +3371,59 @@ 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
- info: "!text-semantic-icon-semantic-info-subtle",
3222
- success: "!text-semantic-icon-semantic-success-subtle",
3223
- warning: "!text-semantic-icon-semantic-warning-subtle",
3224
- error: "!text-semantic-icon-semantic-error-subtle"
3225
- }[variant];
3402
+ info: "!text-semantic-icon-info-subtle",
3403
+ success: "!text-semantic-icon-success-subtle",
3404
+ warning: "!text-semantic-icon-warning-subtle",
3405
+ error: "!text-semantic-icon-error-subtle"
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
- /* @__PURE__ */ jsx24("div", { className: "flex-shrink-0 mt-0.5", children: /* @__PURE__ */ jsx24(IconComponent, { size: 20, className: iconClassName, "aria-hidden": "true" }) }),
3415
+ /* @__PURE__ */ jsx24("div", { className: "flex-shrink-0 mt-0.5", children: resolvedTypes === "info" ? /* @__PURE__ */ jsx24(
3416
+ "span",
3417
+ {
3418
+ className: "inline-flex h-5 w-5 items-center justify-center rounded-full bg-semantic-toast-border-info text-semantic-text-neutral-inverse-primary text-xs font-semibold leading-none",
3419
+ "aria-hidden": "true",
3420
+ children: "i"
3421
+ }
3422
+ ) : /* @__PURE__ */ jsx24(IconComponent, { size: 20, className: iconClassName, "aria-hidden": "true" }) }),
3235
3423
  /* @__PURE__ */ jsxs19("div", { className: "flex-1 min-w-0 flex flex-col gap-4", children: [
3236
3424
  /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2", children: [
3237
3425
  /* @__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 })
3426
+ shouldShowDescription && /* @__PURE__ */ jsx24("p", { className: "text-sm font-normal leading-6 text-semantic-text-neutral-tertiary", children: resolvedDescription })
3239
3427
  ] }),
3240
3428
  hasCTA && /* @__PURE__ */ jsx24(
3241
3429
  Button,
@@ -3244,7 +3432,7 @@ var Toast = React24.forwardRef(
3244
3432
  size: "small",
3245
3433
  variant: "primary",
3246
3434
  className: "w-auto self-start",
3247
- children: ctaText
3435
+ children: resolvedCtaText
3248
3436
  }
3249
3437
  )
3250
3438
  ] }),
@@ -3269,8 +3457,8 @@ Toast.displayName = "Toast";
3269
3457
  import * as React25 from "react";
3270
3458
  import { cva as cva18 } from "class-variance-authority";
3271
3459
  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";
3460
+ import { ArrowLeft, Close as Close10, Maximize } from "@esds-sangam/icons";
3461
+ import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
3274
3462
  var pageHeaderVariants = cva18("w-full", {
3275
3463
  variants: {
3276
3464
  variant: {
@@ -3298,25 +3486,46 @@ var PageHeader = React25.forwardRef(
3298
3486
  onBackClick,
3299
3487
  showTitle = true,
3300
3488
  badgeLabel,
3489
+ badge,
3490
+ badgeName,
3301
3491
  showSubtext,
3302
3492
  subtext,
3303
3493
  primaryAction,
3304
3494
  secondaryAction,
3305
3495
  tertiaryAction,
3496
+ ctas,
3497
+ firstCta,
3498
+ firstCtaLabel = "Button label",
3499
+ secondCta,
3500
+ secondCtaLabel = "Button label",
3501
+ thirdCta,
3502
+ thirdCtaLabel = "Button label",
3306
3503
  closeIcon,
3307
3504
  onCloseClick,
3505
+ showMaximise,
3506
+ onMaximiseClick,
3507
+ breadcrumbs,
3308
3508
  ...props
3309
3509
  }, ref) => {
3310
- const isControlled = tab !== void 0;
3311
- const tabsValue = isControlled ? tab : defaultTab ?? tabs[0]?.value;
3510
+ const firstTabValue = tabs[0]?.value;
3511
+ const hasValidControlledTab = tab !== void 0 && tab !== "" && tabs.some((t) => t.value === tab);
3512
+ const hasValidDefaultTab = defaultTab !== void 0 && defaultTab !== "" && tabs.some((t) => t.value === defaultTab);
3513
+ const resolvedTabValue = hasValidControlledTab ? tab : hasValidDefaultTab ? defaultTab : firstTabValue;
3514
+ const isControlled = hasValidControlledTab;
3312
3515
  const hasTabs = tabs.length > 0;
3313
- const hasActions = !!primaryAction || !!secondaryAction || !!tertiaryAction || !!closeIcon;
3516
+ const derivedTertiaryAction = ctas && firstCta ? { label: firstCtaLabel, variant: "primary", icon: null } : void 0;
3517
+ const derivedSecondaryAction = ctas && secondCta ? { label: secondCtaLabel, variant: "secondary", icon: null } : void 0;
3518
+ const derivedPrimaryAction = ctas && thirdCta ? { label: thirdCtaLabel, variant: "primary", icon: null } : void 0;
3519
+ const resolvedTertiaryAction = ctas ? derivedTertiaryAction : tertiaryAction;
3520
+ const resolvedSecondaryAction = ctas ? derivedSecondaryAction : secondaryAction;
3521
+ const resolvedPrimaryAction = ctas ? derivedPrimaryAction : primaryAction;
3522
+ const hasActions = !!resolvedPrimaryAction || !!resolvedSecondaryAction || !!resolvedTertiaryAction || !!showMaximise || !!closeIcon;
3314
3523
  const renderActions = () => {
3315
3524
  if (!hasActions) return null;
3316
3525
  const actions = [];
3317
- if (tertiaryAction) actions.push(tertiaryAction);
3318
- if (secondaryAction) actions.push(secondaryAction);
3319
- if (primaryAction) actions.push(primaryAction);
3526
+ if (resolvedTertiaryAction) actions.push(resolvedTertiaryAction);
3527
+ if (resolvedSecondaryAction) actions.push(resolvedSecondaryAction);
3528
+ if (resolvedPrimaryAction) actions.push(resolvedPrimaryAction);
3320
3529
  return /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-2", children: [
3321
3530
  actions.map((action, index) => {
3322
3531
  const { label, onClick, variant: actionVariant, icon, iconPosition } = action;
@@ -3336,11 +3545,22 @@ var PageHeader = React25.forwardRef(
3336
3545
  `${label}-${index}`
3337
3546
  );
3338
3547
  }),
3548
+ showMaximise && /* @__PURE__ */ jsx25(
3549
+ Maximize,
3550
+ {
3551
+ size: 16,
3552
+ className: "cursor-pointer",
3553
+ "aria-label": "Maximise",
3554
+ onClick: onMaximiseClick
3555
+ }
3556
+ ),
3339
3557
  closeIcon && /* @__PURE__ */ jsx25(Close10, { size: 16, className: "cursor-pointer", "aria-label": "Close", onClick: onCloseClick })
3340
3558
  ] });
3341
3559
  };
3342
3560
  const showTitleSection = variant === "withTitle" || variant === "titleTabs";
3343
3561
  const showTabsSection = variant === "withTabs" || variant === "titleTabs";
3562
+ const resolvedBadgeName = badgeName ?? badgeLabel ?? "";
3563
+ const shouldShowBadge = badge !== void 0 ? badge && resolvedBadgeName.length > 0 : Boolean(badgeLabel);
3344
3564
  return /* @__PURE__ */ jsxs20(
3345
3565
  "header",
3346
3566
  {
@@ -3360,17 +3580,19 @@ var PageHeader = React25.forwardRef(
3360
3580
  onClick: onBackClick
3361
3581
  }
3362
3582
  ),
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 })
3583
+ breadcrumbs ? /* @__PURE__ */ jsx25("div", { className: "min-w-0 truncate", children: breadcrumbs }) : /* @__PURE__ */ jsxs20(Fragment4, { children: [
3584
+ showTitle && /* @__PURE__ */ jsx25(
3585
+ "h2",
3586
+ {
3587
+ className: cn25(
3588
+ "truncate text-xl font-semibold leading-7 text-semantic-text-neutral-primary",
3589
+ titleClassName
3590
+ ),
3591
+ children: title
3592
+ }
3593
+ ),
3594
+ shouldShowBadge && /* @__PURE__ */ jsx25(Badge, { size: "big", variant: "rounded", state: "info", children: resolvedBadgeName })
3595
+ ] })
3374
3596
  ] }),
3375
3597
  renderActions()
3376
3598
  ] }),
@@ -3381,13 +3603,21 @@ var PageHeader = React25.forwardRef(
3381
3603
  Tabs,
3382
3604
  {
3383
3605
  type: "underline",
3384
- ...isControlled ? { value: tabsValue, onValueChange: onTabChange } : {
3385
- defaultValue: defaultTab ?? tabs[0]?.value,
3606
+ ...isControlled ? { value: resolvedTabValue, onValueChange: onTabChange } : {
3607
+ defaultValue: resolvedTabValue,
3386
3608
  onValueChange: onTabChange
3387
3609
  },
3388
3610
  className: "flex-1 pt-5",
3389
3611
  children: [
3390
- /* @__PURE__ */ jsx25(Tabs.List, { children: tabs.map((t) => /* @__PURE__ */ jsx25(Tabs.Trigger, { value: t.value, children: t.label }, t.value)) }),
3612
+ /* @__PURE__ */ jsx25(Tabs.List, { children: tabs.map((t) => /* @__PURE__ */ jsx25(
3613
+ Tabs.Trigger,
3614
+ {
3615
+ value: t.value,
3616
+ className: "data-[state=active]:border-semantic-input-border-active",
3617
+ children: t.label
3618
+ },
3619
+ t.value
3620
+ )) }),
3391
3621
  tabs.map((t) => /* @__PURE__ */ jsx25(Tabs.Content, { value: t.value, className: "hidden" }, t.value))
3392
3622
  ]
3393
3623
  }
@@ -3397,13 +3627,21 @@ var PageHeader = React25.forwardRef(
3397
3627
  Tabs,
3398
3628
  {
3399
3629
  type: "underline",
3400
- ...isControlled ? { value: tabsValue, onValueChange: onTabChange } : {
3401
- defaultValue: defaultTab ?? tabs[0]?.value,
3630
+ ...isControlled ? { value: resolvedTabValue, onValueChange: onTabChange } : {
3631
+ defaultValue: resolvedTabValue,
3402
3632
  onValueChange: onTabChange
3403
3633
  },
3404
3634
  className: "-mb-px mt-0 px-5",
3405
3635
  children: [
3406
- /* @__PURE__ */ jsx25(Tabs.List, { className: "mt-0", children: tabs.map((t) => /* @__PURE__ */ jsx25(Tabs.Trigger, { value: t.value, children: t.label }, t.value)) }),
3636
+ /* @__PURE__ */ jsx25(Tabs.List, { className: "mt-0", children: tabs.map((t) => /* @__PURE__ */ jsx25(
3637
+ Tabs.Trigger,
3638
+ {
3639
+ value: t.value,
3640
+ className: "data-[state=active]:border-semantic-input-border-active",
3641
+ children: t.label
3642
+ },
3643
+ t.value
3644
+ )) }),
3407
3645
  tabs.map((t) => /* @__PURE__ */ jsx25(Tabs.Content, { value: t.value, className: "hidden" }, t.value))
3408
3646
  ]
3409
3647
  }
@@ -3415,12 +3653,40 @@ var PageHeader = React25.forwardRef(
3415
3653
  );
3416
3654
  PageHeader.displayName = "PageHeader";
3417
3655
 
3418
- // src/patterns/PageFooter.tsx
3656
+ // src/patterns/Breadcrumbs.tsx
3419
3657
  import * as React26 from "react";
3420
3658
  import { cn as cn26 } from "@esds-sangam/utils";
3421
- import { jsx as jsx26 } from "react/jsx-runtime";
3659
+ import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
3660
+ var ACTIVE_TEXT_STYLES = "text-xl font-semibold leading-7 text-semantic-text-neutral-primary";
3661
+ var INACTIVE_TEXT_STYLES = "text-xl font-medium leading-7 text-semantic-text-neutral-tertiary";
3662
+ var Breadcrumbs = React26.forwardRef(
3663
+ ({ className, type = "onlyTitle", title, l1, l2, ...props }, ref) => {
3664
+ return /* @__PURE__ */ jsxs21(
3665
+ "nav",
3666
+ {
3667
+ ref,
3668
+ "aria-label": "Breadcrumbs",
3669
+ className: cn26("inline-flex items-center gap-2", className),
3670
+ ...props,
3671
+ children: [
3672
+ type !== "onlyTitle" && l1 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, children: l1 }) : null,
3673
+ type !== "onlyTitle" && l1 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, "aria-hidden": true, children: "/" }) : null,
3674
+ type === "L2" && l2 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, children: l2 }) : null,
3675
+ type === "L2" && l2 ? /* @__PURE__ */ jsx26("span", { className: INACTIVE_TEXT_STYLES, "aria-hidden": true, children: "/" }) : null,
3676
+ /* @__PURE__ */ jsx26("span", { className: ACTIVE_TEXT_STYLES, children: title })
3677
+ ]
3678
+ }
3679
+ );
3680
+ }
3681
+ );
3682
+ Breadcrumbs.displayName = "Breadcrumbs";
3683
+
3684
+ // src/patterns/PageFooter.tsx
3685
+ import * as React27 from "react";
3686
+ import { cn as cn27 } from "@esds-sangam/utils";
3687
+ import { jsx as jsx27 } from "react/jsx-runtime";
3422
3688
  var PAGE_FOOTER_WIDTH = 532;
3423
- var PageFooter = React26.forwardRef(
3689
+ var PageFooter = React27.forwardRef(
3424
3690
  ({
3425
3691
  className,
3426
3692
  children,
@@ -3436,11 +3702,11 @@ var PageFooter = React26.forwardRef(
3436
3702
  const actions = [];
3437
3703
  if (secondaryAction) actions.push(secondaryAction);
3438
3704
  if (primaryAction) actions.push(primaryAction);
3439
- return /* @__PURE__ */ jsx26("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
3705
+ return /* @__PURE__ */ jsx27("div", { className: "flex items-center gap-2", children: actions.map((action, index) => {
3440
3706
  const { label, onClick, variant: actionVariant, icon, iconPosition } = action;
3441
3707
  const leadingIcon = !!icon && (iconPosition ?? "leading") === "leading";
3442
3708
  const trailingIcon = !!icon && (iconPosition ?? "leading") === "trailing";
3443
- return /* @__PURE__ */ jsx26(
3709
+ return /* @__PURE__ */ jsx27(
3444
3710
  Button,
3445
3711
  {
3446
3712
  size: "small",
@@ -3455,18 +3721,18 @@ var PageFooter = React26.forwardRef(
3455
3721
  );
3456
3722
  }) });
3457
3723
  };
3458
- const content = children != null ? children : hasActions ? renderActionButtons() : /* @__PURE__ */ jsx26(Button, { variant: "primary", size: "small", children: "Convert" });
3459
- return /* @__PURE__ */ jsx26(
3724
+ const content = children != null ? children : hasActions ? renderActionButtons() : /* @__PURE__ */ jsx27(Button, { variant: "primary", size: "small", children: "Convert" });
3725
+ return /* @__PURE__ */ jsx27(
3460
3726
  "footer",
3461
3727
  {
3462
3728
  ref,
3463
- className: cn26(
3729
+ className: cn27(
3464
3730
  "flex h-16 items-center justify-end gap-2 bg-semantic-background-neutral-primary p-4 shadow-elevation-top-sm",
3465
3731
  className
3466
3732
  ),
3467
3733
  style: { width },
3468
3734
  ...props,
3469
- children: /* @__PURE__ */ jsx26("div", { className: cn26("flex items-center gap-2", contentClassName), children: content })
3735
+ children: /* @__PURE__ */ jsx27("div", { className: cn27("flex items-center gap-2", contentClassName), children: content })
3470
3736
  }
3471
3737
  );
3472
3738
  }
@@ -3474,19 +3740,19 @@ var PageFooter = React26.forwardRef(
3474
3740
  PageFooter.displayName = "PageFooter";
3475
3741
 
3476
3742
  // src/patterns/SideMenu.tsx
3477
- import * as React28 from "react";
3743
+ import * as React29 from "react";
3478
3744
  import { cva as cva19 } from "class-variance-authority";
3479
- import { cn as cn28 } from "@esds-sangam/utils";
3745
+ import { cn as cn29 } from "@esds-sangam/utils";
3480
3746
  import * as SelectPrimitive2 from "@radix-ui/react-select";
3481
3747
  import { ChevronDown as ChevronDown3, ChevronUp as ChevronUp2, Tickmark as Tickmark4 } from "@esds-sangam/icons";
3482
3748
 
3483
3749
  // src/patterns/SideMenuItem.tsx
3484
- import * as React27 from "react";
3750
+ import * as React28 from "react";
3485
3751
  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";
3752
+ import { cn as cn28 } from "@esds-sangam/utils";
3753
+ import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
3488
3754
  var MENU_TEXT_STYLES = "text-xs font-medium leading-4 text-semantic-text-neutral-primary";
3489
- var SideMenuItem = React27.forwardRef(
3755
+ var SideMenuItem = React28.forwardRef(
3490
3756
  ({
3491
3757
  label,
3492
3758
  leadingIcon,
@@ -3499,20 +3765,20 @@ var SideMenuItem = React27.forwardRef(
3499
3765
  ...props
3500
3766
  }, ref) => {
3501
3767
  if (iconOnly) {
3502
- return /* @__PURE__ */ jsx27(
3768
+ return /* @__PURE__ */ jsx28(
3503
3769
  "button",
3504
3770
  {
3505
3771
  ref,
3506
3772
  type,
3507
- className: cn27(
3773
+ className: cn28(
3508
3774
  "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
3775
  className
3510
3776
  ),
3511
3777
  ...props,
3512
- children: /* @__PURE__ */ jsx27(
3778
+ children: /* @__PURE__ */ jsx28(
3513
3779
  "span",
3514
3780
  {
3515
- className: cn27(
3781
+ className: cn28(
3516
3782
  "flex h-9 w-9 items-center justify-center rounded-sm [&>svg]:size-5",
3517
3783
  selected && "border border-semantic-border-neutral-secondary bg-semantic-background-neutral-primary shadow-elevation-bottom-sm"
3518
3784
  ),
@@ -3522,28 +3788,28 @@ var SideMenuItem = React27.forwardRef(
3522
3788
  }
3523
3789
  );
3524
3790
  }
3525
- return /* @__PURE__ */ jsx27(
3791
+ return /* @__PURE__ */ jsx28(
3526
3792
  "button",
3527
3793
  {
3528
3794
  ref,
3529
3795
  type,
3530
- className: cn27(
3796
+ className: cn28(
3531
3797
  "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
3798
  className
3533
3799
  ),
3534
3800
  ...props,
3535
- children: /* @__PURE__ */ jsxs21(
3801
+ children: /* @__PURE__ */ jsxs22(
3536
3802
  "span",
3537
3803
  {
3538
- className: cn27(
3804
+ className: cn28(
3539
3805
  "flex h-9 min-w-0 flex-1 items-center gap-2 rounded-sm px-2",
3540
3806
  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
3807
  !selected && hovered && "bg-neutral-200/60"
3542
3808
  ),
3543
3809
  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(
3810
+ /* @__PURE__ */ jsx28("span", { className: "shrink-0 [&>svg]:size-5", children: leadingIcon }),
3811
+ /* @__PURE__ */ jsx28("span", { className: cn28(MENU_TEXT_STYLES, "min-w-0 flex-1 truncate text-left"), children: label }),
3812
+ hasSubmenu ? /* @__PURE__ */ jsx28(
3547
3813
  ChevronRight3,
3548
3814
  {
3549
3815
  size: 14,
@@ -3561,7 +3827,7 @@ var SideMenuItem = React27.forwardRef(
3561
3827
  SideMenuItem.displayName = "SideMenuItem";
3562
3828
 
3563
3829
  // src/patterns/SideMenu.tsx
3564
- import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
3830
+ import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
3565
3831
  function SideMenuNavRow({
3566
3832
  item,
3567
3833
  isCollapsed,
@@ -3569,7 +3835,7 @@ function SideMenuNavRow({
3569
3835
  onClick
3570
3836
  }) {
3571
3837
  const leadingIcon = isCollapsed && !isSelected ? item.icon : item.iconExpanded ?? item.icon;
3572
- return /* @__PURE__ */ jsx28(
3838
+ return /* @__PURE__ */ jsx29(
3573
3839
  SideMenuItem,
3574
3840
  {
3575
3841
  label: item.label,
@@ -3589,18 +3855,18 @@ function SideMenuGroup({
3589
3855
  className
3590
3856
  }) {
3591
3857
  const showGroup = group.showGroup ?? true;
3592
- return /* @__PURE__ */ jsxs22("div", { className: cn28("flex flex-col gap-2", className), children: [
3593
- showGroup ? /* @__PURE__ */ jsx28(
3858
+ return /* @__PURE__ */ jsxs23("div", { className: cn29("flex flex-col gap-2", className), children: [
3859
+ showGroup ? /* @__PURE__ */ jsx29(
3594
3860
  "div",
3595
3861
  {
3596
- className: cn28(
3862
+ className: cn29(
3597
3863
  "text-xs font-medium leading-4 text-semantic-text-neutral-tertiary",
3598
3864
  isCollapsed ? "px-0 text-center" : "px-2 text-left"
3599
3865
  ),
3600
3866
  children: isCollapsed ? "--" : group.groupName
3601
3867
  }
3602
3868
  ) : null,
3603
- group.items.map((item) => /* @__PURE__ */ jsx28(
3869
+ group.items.map((item) => /* @__PURE__ */ jsx29(
3604
3870
  SideMenuNavRow,
3605
3871
  {
3606
3872
  item,
@@ -3616,7 +3882,7 @@ var sideMenuVariants = cva19(
3616
3882
  "flex flex-col self-start transition-[width] duration-200 ease-out",
3617
3883
  {
3618
3884
  variants: {
3619
- variant: {
3885
+ state: {
3620
3886
  default: "h-[1024px] w-[48px] rounded-r-lg bg-semantic-background-neutral-tertiary py-4 px-1.5",
3621
3887
  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
3888
  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 +3890,21 @@ var sideMenuVariants = cva19(
3624
3890
  }
3625
3891
  },
3626
3892
  defaultVariants: {
3627
- variant: "default"
3893
+ state: "default"
3628
3894
  }
3629
3895
  }
3630
3896
  );
3631
- var SideMenu = React28.forwardRef(
3897
+ var SideMenu = React29.forwardRef(
3632
3898
  ({
3633
3899
  className,
3634
- variant = "default",
3900
+ state = "default",
3635
3901
  logo,
3636
3902
  topGroups,
3637
3903
  bottomGroups,
3638
3904
  selectedId: selectedIdProp,
3639
3905
  defaultSelectedId,
3640
3906
  expanded: expandedProp,
3907
+ showScrollbar = false,
3641
3908
  onItemClick,
3642
3909
  projects,
3643
3910
  project: projectProp,
@@ -3647,17 +3914,17 @@ var SideMenu = React28.forwardRef(
3647
3914
  onMouseLeave,
3648
3915
  ...props
3649
3916
  }, ref) => {
3650
- const [internalSelected, setInternalSelected] = React28.useState(
3917
+ const [internalSelected, setInternalSelected] = React29.useState(
3651
3918
  defaultSelectedId ?? null
3652
3919
  );
3653
3920
  const selectedId = selectedIdProp !== void 0 ? selectedIdProp : internalSelected;
3654
3921
  const isControlled = selectedIdProp !== void 0;
3655
- const [hoverExpanded, setHoverExpanded] = React28.useState(false);
3656
- const isUncontrolledDefault = variant === "default" && expandedProp === void 0;
3922
+ const [hoverExpanded, setHoverExpanded] = React29.useState(false);
3923
+ const isUncontrolledDefault = state === "default" && expandedProp === void 0;
3657
3924
  const isExpandedByHover = isUncontrolledDefault && hoverExpanded;
3658
- const effectiveExpanded = variant === "hover" || variant === "selected" || variant === "sticky" || isExpandedByHover;
3925
+ const effectiveExpanded = state === "hover" || state === "selected" || state === "sticky" || isExpandedByHover;
3659
3926
  const isCollapsed = !effectiveExpanded;
3660
- const [isProjectOpen, setIsProjectOpen] = React28.useState(false);
3927
+ const [isProjectOpen, setIsProjectOpen] = React29.useState(false);
3661
3928
  const handleMouseEnter = (e) => {
3662
3929
  if (isUncontrolledDefault) setHoverExpanded(true);
3663
3930
  onMouseEnter?.(e);
@@ -3675,7 +3942,7 @@ var SideMenu = React28.forwardRef(
3675
3942
  { value: "project-2", label: "Project 2" },
3676
3943
  { value: "project-3", label: "Project 3" }
3677
3944
  ];
3678
- const [internalProject, setInternalProject] = React28.useState(
3945
+ const [internalProject, setInternalProject] = React29.useState(
3679
3946
  defaultProject ?? projectOptions[0]?.value ?? "project-1"
3680
3947
  );
3681
3948
  const currentProject = projectProp !== void 0 ? projectProp : internalProject;
@@ -3683,39 +3950,44 @@ var SideMenu = React28.forwardRef(
3683
3950
  if (projectProp === void 0) setInternalProject(value);
3684
3951
  onProjectChange?.(value);
3685
3952
  };
3686
- return /* @__PURE__ */ jsx28(
3953
+ const scrollbarAllowedState = state === "hover" || state === "selected" || state === "sticky";
3954
+ const shouldShowScrollbar = showScrollbar && scrollbarAllowedState;
3955
+ return /* @__PURE__ */ jsx29(
3687
3956
  "div",
3688
3957
  {
3689
- className: cn28("relative w-12 shrink-0 overflow-visible", className),
3958
+ className: cn29("relative w-12 shrink-0 overflow-visible", className),
3690
3959
  ...props,
3691
- children: /* @__PURE__ */ jsx28(
3960
+ children: /* @__PURE__ */ jsx29(
3692
3961
  "div",
3693
3962
  {
3694
3963
  className: "absolute left-0 top-0",
3695
3964
  onMouseEnter: handleMouseEnter,
3696
3965
  onMouseLeave: handleMouseLeave,
3697
- children: /* @__PURE__ */ jsxs22(
3966
+ children: /* @__PURE__ */ jsxs23(
3698
3967
  "nav",
3699
3968
  {
3700
3969
  ref,
3701
3970
  role: "navigation",
3702
3971
  "aria-label": "Side menu",
3703
3972
  "aria-expanded": isUncontrolledDefault ? isExpandedByHover : void 0,
3704
- className: sideMenuVariants({
3705
- variant: isExpandedByHover && selectedId ? "selected" : isExpandedByHover ? "hover" : variant
3706
- }),
3973
+ className: cn29(
3974
+ sideMenuVariants({
3975
+ state: isExpandedByHover && selectedId ? "selected" : isExpandedByHover ? "hover" : state
3976
+ }),
3977
+ shouldShowScrollbar && "overflow-y-auto overflow-x-hidden"
3978
+ ),
3707
3979
  children: [
3708
- /* @__PURE__ */ jsx28(
3980
+ /* @__PURE__ */ jsx29(
3709
3981
  "div",
3710
3982
  {
3711
- className: cn28(
3983
+ className: cn29(
3712
3984
  "mb-4 shrink-0 flex items-center",
3713
3985
  isCollapsed ? "justify-center" : "justify-start"
3714
3986
  ),
3715
3987
  children: logo
3716
3988
  }
3717
3989
  ),
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(
3990
+ /* @__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
3991
  SelectPrimitive2.Root,
3720
3992
  {
3721
3993
  value: currentProject,
@@ -3725,12 +3997,12 @@ var SideMenu = React28.forwardRef(
3725
3997
  setIsProjectOpen(open);
3726
3998
  if (isUncontrolledDefault && open) setHoverExpanded(true);
3727
3999
  },
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(
4000
+ children: /* @__PURE__ */ jsxs23("div", { className: "relative", children: [
4001
+ /* @__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" }),
4002
+ /* @__PURE__ */ jsxs23(
3731
4003
  SelectPrimitive2.Trigger,
3732
4004
  {
3733
- className: cn28(
4005
+ className: cn29(
3734
4006
  "group",
3735
4007
  dropdownTriggerVariants({ error: false }),
3736
4008
  // Make room for the P icon
@@ -3741,22 +4013,22 @@ var SideMenu = React28.forwardRef(
3741
4013
  "[&>span]:block [&>span]:min-w-0 [&>span]:truncate [&>span]:whitespace-nowrap"
3742
4014
  ),
3743
4015
  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" })
4016
+ /* @__PURE__ */ jsx29(SelectPrimitive2.Value, { placeholder: "Project 1" }),
4017
+ /* @__PURE__ */ jsx29(SelectPrimitive2.Icon, { asChild: true, children: /* @__PURE__ */ jsxs23(Fragment5, { children: [
4018
+ /* @__PURE__ */ jsx29(ChevronDown3, { size: 14, className: "shrink-0 group-data-[state=open]:hidden" }),
4019
+ /* @__PURE__ */ jsx29(ChevronUp2, { size: 14, className: "hidden shrink-0 group-data-[state=open]:block" })
3748
4020
  ] }) })
3749
4021
  ]
3750
4022
  }
3751
4023
  ),
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" }) })
4024
+ /* @__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: [
4025
+ /* @__PURE__ */ jsx29(SelectPrimitive2.ItemText, { children: opt.label }),
4026
+ /* @__PURE__ */ jsx29(SelectPrimitive2.ItemIndicator, { className: "absolute right-2 inline-flex items-center justify-center", children: /* @__PURE__ */ jsx29(Tickmark4, { size: 14, "aria-hidden": "true" }) })
3755
4027
  ] }, opt.value)) }) }) })
3756
4028
  ] })
3757
4029
  }
3758
4030
  ) }),
3759
- /* @__PURE__ */ jsx28("div", { className: "flex flex-1 flex-col gap-4", children: topGroups.map((group) => /* @__PURE__ */ jsx28(
4031
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-1 flex-col gap-4", children: topGroups.map((group) => /* @__PURE__ */ jsx29(
3760
4032
  SideMenuGroup,
3761
4033
  {
3762
4034
  group,
@@ -3766,7 +4038,7 @@ var SideMenu = React28.forwardRef(
3766
4038
  },
3767
4039
  group.id
3768
4040
  )) }),
3769
- /* @__PURE__ */ jsx28("div", { className: "flex flex-col gap-4 pt-4", children: bottomGroups.map((group) => /* @__PURE__ */ jsx28(
4041
+ /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-4 pt-4", children: bottomGroups.map((group) => /* @__PURE__ */ jsx29(
3770
4042
  SideMenuGroup,
3771
4043
  {
3772
4044
  group,
@@ -3788,15 +4060,15 @@ var SideMenu = React28.forwardRef(
3788
4060
  SideMenu.displayName = "SideMenu";
3789
4061
 
3790
4062
  // src/patterns/Upload.tsx
3791
- import * as React29 from "react";
4063
+ import * as React30 from "react";
3792
4064
  import { cva as cva20 } from "class-variance-authority";
3793
4065
  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";
4066
+ import { cn as cn30 } from "@esds-sangam/utils";
4067
+ import { CloudUpload, DocumentPdf, Close as Close11, Delete, Retry, TickmarkFilled as TickmarkFilled6, Info as Info4 } from "@esds-sangam/icons";
4068
+ import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
3797
4069
  var uploadBoxVariants = cva20([
3798
4070
  "relative flex flex-col items-center justify-center w-full",
3799
- "rounded-sm border border-dashed border-semantic-border-neutral-primary hover:border-semantic-border-neutralInverse-primary",
4071
+ "rounded-sm border border-dashed border-semantic-border-neutral-primary hover:border-semantic-input-border-hover",
3800
4072
  "bg-semantic-background-neutral-primary",
3801
4073
  "transition-colors duration-200 ease-out",
3802
4074
  "cursor-pointer",
@@ -3808,20 +4080,25 @@ function formatFileSize(bytes) {
3808
4080
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
3809
4081
  return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
3810
4082
  }
3811
- var Upload = React29.forwardRef(
4083
+ var Upload = React30.forwardRef(
3812
4084
  ({
3813
4085
  className,
3814
4086
  label,
4087
+ asterisk,
3815
4088
  required,
3816
4089
  accept,
3817
4090
  multiple,
3818
4091
  onFilesSelected,
4092
+ subtext,
3819
4093
  helperText = "PNG, JPG, PDF, EXCEL (max size)",
4094
+ supportingText = false,
4095
+ supportText = "Supporting text",
4096
+ supportIcon = false,
3820
4097
  ...props
3821
4098
  }, ref) => {
3822
- const inputRef = React29.useRef(null);
3823
- const [fileEntries, setFileEntries] = React29.useState([]);
3824
- const progressIntervalRef = React29.useRef(null);
4099
+ const inputRef = React30.useRef(null);
4100
+ const [fileEntries, setFileEntries] = React30.useState([]);
4101
+ const progressIntervalRef = React30.useRef(null);
3825
4102
  const handleClick = () => {
3826
4103
  inputRef.current?.click();
3827
4104
  };
@@ -3849,7 +4126,7 @@ var Upload = React29.forwardRef(
3849
4126
  )
3850
4127
  );
3851
4128
  };
3852
- React29.useEffect(() => {
4129
+ React30.useEffect(() => {
3853
4130
  const uploading = fileEntries.filter((e) => e.status === "uploading");
3854
4131
  if (uploading.length === 0) return;
3855
4132
  const steps = [10, 50, 100];
@@ -3888,18 +4165,18 @@ var Upload = React29.forwardRef(
3888
4165
  const handleDragOver = (event) => {
3889
4166
  event.preventDefault();
3890
4167
  };
3891
- return /* @__PURE__ */ jsxs23(
4168
+ return /* @__PURE__ */ jsxs24(
3892
4169
  "div",
3893
4170
  {
3894
4171
  ref,
3895
- className: cn29("flex w-full min-w-[328px] flex-col gap-2", className),
4172
+ className: cn30("flex w-full min-w-[328px] flex-col gap-2", className),
3896
4173
  ...props,
3897
4174
  children: [
3898
- /* @__PURE__ */ jsxs23("label", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-primary", children: [
4175
+ /* @__PURE__ */ jsxs24("label", { className: "text-xs font-medium leading-4 text-semantic-text-neutral-primary", children: [
3899
4176
  label,
3900
- required && /* @__PURE__ */ jsx29("span", { className: "text-semantic-text-semantic-error-subtle ml-0.5", children: "*" })
4177
+ (asterisk ?? required) && /* @__PURE__ */ jsx30("span", { className: "text-semantic-text-error-subtle ml-0.5", children: "*" })
3901
4178
  ] }),
3902
- /* @__PURE__ */ jsxs23(
4179
+ /* @__PURE__ */ jsxs24(
3903
4180
  "div",
3904
4181
  {
3905
4182
  role: "button",
@@ -3913,13 +4190,13 @@ var Upload = React29.forwardRef(
3913
4190
  },
3914
4191
  onDrop: handleDrop,
3915
4192
  onDragOver: handleDragOver,
3916
- className: cn29(
4193
+ className: cn30(
3917
4194
  uploadBoxVariants(),
3918
4195
  // Padding: top/bottom 20px (py-5), left/right 12px (px-3)
3919
4196
  "py-5 px-3"
3920
4197
  ),
3921
4198
  children: [
3922
- /* @__PURE__ */ jsx29(
4199
+ /* @__PURE__ */ jsx30(
3923
4200
  "input",
3924
4201
  {
3925
4202
  ref: inputRef,
@@ -3932,16 +4209,16 @@ var Upload = React29.forwardRef(
3932
4209
  "aria-hidden": "true"
3933
4210
  }
3934
4211
  ),
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(
4212
+ /* @__PURE__ */ jsxs24("div", { className: "relative z-0 flex flex-col items-center gap-2 text-center pointer-events-none", children: [
4213
+ /* @__PURE__ */ jsx30("div", { className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-semantic-background-info-subtle text-semantic-icon-info-subtle", children: /* @__PURE__ */ jsx30(CloudUpload, { size: 20, color: colors.blue["600"], "aria-hidden": "true" }) }),
4214
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1", children: [
4215
+ /* @__PURE__ */ jsxs24("p", { className: "text-sm leading-6 text-semantic-text-neutral-primary", children: [
4216
+ /* @__PURE__ */ jsx30("span", { className: "font-normal", children: "Drop your files here or " }),
4217
+ /* @__PURE__ */ jsx30(
3941
4218
  Button,
3942
4219
  {
3943
- type: "button",
3944
- variant: "link",
4220
+ htmlType: "button",
4221
+ type: "tertiary",
3945
4222
  size: "small",
3946
4223
  className: "pointer-events-auto font-medium p-0 h-auto inline",
3947
4224
  onClick: (e) => {
@@ -3952,13 +4229,17 @@ var Upload = React29.forwardRef(
3952
4229
  }
3953
4230
  )
3954
4231
  ] }),
3955
- /* @__PURE__ */ jsx29("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: helperText })
4232
+ /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary", children: subtext ?? helperText })
3956
4233
  ] })
3957
4234
  ] })
3958
4235
  ]
3959
4236
  }
3960
4237
  ),
3961
- fileEntries.length > 0 && /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-3", children: fileEntries.map((entry) => /* @__PURE__ */ jsx29(
4238
+ supportingText ? /* @__PURE__ */ jsxs24("div", { className: "inline-flex items-center gap-1 text-sm text-semantic-text-neutral-tertiary", children: [
4239
+ supportIcon ? /* @__PURE__ */ jsx30(Info4, { size: 16, className: "text-semantic-icon-neutral-tertiary", "aria-hidden": true }) : null,
4240
+ /* @__PURE__ */ jsx30("span", { children: supportText })
4241
+ ] }) : null,
4242
+ fileEntries.length > 0 && /* @__PURE__ */ jsx30("div", { className: "flex flex-col gap-3", children: fileEntries.map((entry) => /* @__PURE__ */ jsx30(
3962
4243
  UploadFileItem,
3963
4244
  {
3964
4245
  status: entry.status,
@@ -3984,7 +4265,7 @@ var uploadFileItemBoxVariants = cva20(
3984
4265
  status: {
3985
4266
  uploading: "border-semantic-border-neutral-secondary",
3986
4267
  complete: "border-semantic-border-neutral-secondary",
3987
- failed: "border-semantic-border-semantic-error-subtle"
4268
+ failed: "border-semantic-border-error-subtle"
3988
4269
  }
3989
4270
  },
3990
4271
  defaultVariants: {
@@ -3992,86 +4273,87 @@ var uploadFileItemBoxVariants = cva20(
3992
4273
  }
3993
4274
  }
3994
4275
  );
3995
- var UploadFileItem = React29.forwardRef(
4276
+ var UploadFileItem = React30.forwardRef(
3996
4277
  ({
3997
4278
  className,
3998
4279
  status = "uploading",
3999
4280
  fileName,
4000
4281
  fileSize,
4282
+ process,
4001
4283
  progress = 0,
4002
4284
  onCancel,
4003
4285
  onRetry,
4004
4286
  onDelete,
4005
4287
  ...props
4006
4288
  }, ref) => {
4007
- const progressValue = Math.min(100, Math.max(0, progress));
4289
+ const progressValue = Math.min(100, Math.max(0, process ?? progress));
4008
4290
  const showProgress = status !== "failed";
4009
- return /* @__PURE__ */ jsxs23(
4291
+ return /* @__PURE__ */ jsxs24(
4010
4292
  "div",
4011
4293
  {
4012
4294
  ref,
4013
4295
  role: "listitem",
4014
- className: cn29(uploadFileItemBoxVariants({ status }), className),
4296
+ className: cn30(uploadFileItemBoxVariants({ status }), className),
4015
4297
  ...props,
4016
4298
  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
4299
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 gap-3", children: [
4300
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-1 min-w-0 gap-2", children: [
4301
+ /* @__PURE__ */ jsx30(DocumentPdf, { size: 24, className: "shrink-0 text-semantic-text-neutral-primary", "aria-hidden": true }),
4302
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
4303
+ /* @__PURE__ */ jsx30("p", { className: "truncate text-sm font-medium leading-6 text-semantic-text-neutral-primary", children: fileName }),
4304
+ status === "failed" ? /* @__PURE__ */ jsx30("p", { className: "text-xs font-normal leading-4 text-semantic-text-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
4305
  ] })
4024
4306
  ] }),
4025
- /* @__PURE__ */ jsxs23("div", { className: "flex shrink-0 flex-col items-end justify-center", children: [
4026
- status === "uploading" && /* @__PURE__ */ jsx29(
4307
+ /* @__PURE__ */ jsxs24("div", { className: "flex shrink-0 flex-col items-end justify-center", children: [
4308
+ status === "uploading" && /* @__PURE__ */ jsx30(
4027
4309
  "button",
4028
4310
  {
4029
4311
  type: "button",
4030
4312
  onClick: onCancel,
4031
- 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",
4313
+ 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-neutral-inverse-primary focus-visible:ring-offset-1",
4032
4314
  "aria-label": "Cancel upload",
4033
- children: /* @__PURE__ */ jsx29(Close11, { size: 20, "aria-hidden": true })
4315
+ children: /* @__PURE__ */ jsx30(Close11, { size: 20, "aria-hidden": true })
4034
4316
  }
4035
4317
  ),
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(
4318
+ status === "complete" && /* @__PURE__ */ jsx30(Fragment6, { children: /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
4319
+ /* @__PURE__ */ jsx30(TickmarkFilled6, { size: 20, className: "!text-semantic-icon-success-subtle shrink-0", "aria-hidden": true }),
4320
+ /* @__PURE__ */ jsx30(
4039
4321
  "button",
4040
4322
  {
4041
4323
  type: "button",
4042
4324
  onClick: onDelete,
4043
- 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",
4325
+ 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-neutral-inverse-primary focus-visible:ring-offset-1",
4044
4326
  "aria-label": "Delete file",
4045
- children: /* @__PURE__ */ jsx29(Delete, { size: 20, "aria-hidden": true })
4327
+ children: /* @__PURE__ */ jsx30(Delete, { size: 20, "aria-hidden": true })
4046
4328
  }
4047
4329
  )
4048
4330
  ] }) }),
4049
- status === "failed" && /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-4", children: [
4050
- /* @__PURE__ */ jsx29(
4331
+ status === "failed" && /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-4", children: [
4332
+ /* @__PURE__ */ jsx30(
4051
4333
  "button",
4052
4334
  {
4053
4335
  type: "button",
4054
4336
  onClick: onRetry,
4055
- 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",
4337
+ 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-neutral-inverse-primary focus-visible:ring-offset-1",
4056
4338
  "aria-label": "Retry upload",
4057
- children: /* @__PURE__ */ jsx29(Retry, { size: 20, "aria-hidden": true })
4339
+ children: /* @__PURE__ */ jsx30(Retry, { size: 20, "aria-hidden": true })
4058
4340
  }
4059
4341
  ),
4060
- /* @__PURE__ */ jsx29(
4342
+ /* @__PURE__ */ jsx30(
4061
4343
  "button",
4062
4344
  {
4063
4345
  type: "button",
4064
4346
  onClick: onDelete,
4065
- 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",
4347
+ 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-neutral-inverse-primary focus-visible:ring-offset-1",
4066
4348
  "aria-label": "Delete file",
4067
- children: /* @__PURE__ */ jsx29(Delete, { size: 20, "aria-hidden": true })
4349
+ children: /* @__PURE__ */ jsx30(Delete, { size: 20, "aria-hidden": true })
4068
4350
  }
4069
4351
  )
4070
4352
  ] })
4071
4353
  ] })
4072
4354
  ] }),
4073
- showProgress && /* @__PURE__ */ jsxs23("div", { className: "flex w-full items-center gap-sm", children: [
4074
- /* @__PURE__ */ jsx29(
4355
+ showProgress && /* @__PURE__ */ jsxs24("div", { className: "flex w-full items-center gap-sm", children: [
4356
+ /* @__PURE__ */ jsx30(
4075
4357
  ProgressBar,
4076
4358
  {
4077
4359
  value: progressValue,
@@ -4080,7 +4362,7 @@ var UploadFileItem = React29.forwardRef(
4080
4362
  "aria-label": `Upload progress ${progressValue}%`
4081
4363
  }
4082
4364
  ),
4083
- /* @__PURE__ */ jsxs23("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary shrink-0 text-right", children: [
4365
+ /* @__PURE__ */ jsxs24("span", { className: "text-xs font-normal leading-4 text-semantic-text-neutral-tertiary shrink-0 text-right", children: [
4084
4366
  progressValue,
4085
4367
  "%"
4086
4368
  ] })
@@ -4094,6 +4376,7 @@ UploadFileItem.displayName = "UploadFileItem";
4094
4376
  export {
4095
4377
  Avatar,
4096
4378
  Badge,
4379
+ Breadcrumbs,
4097
4380
  Button,
4098
4381
  Card,
4099
4382
  Checkbox,