impact-nova 1.5.14 → 1.6.0

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 (149) hide show
  1. package/dist/components/ui/accordion.d.ts +4 -1
  2. package/dist/components/ui/accordion.js +28 -22
  3. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +11 -11
  4. package/dist/components/ui/ag-grid-react/cell-renderers/checkbox-display-renderer.js +12 -12
  5. package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +13 -13
  6. package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +13 -13
  7. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +30 -30
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/percent-progress-cell-editor.js +13 -13
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +16 -16
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +17 -17
  11. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +11 -11
  12. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +2 -2
  13. package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +11 -13
  14. package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +8 -8
  15. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +6 -6
  16. package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.d.ts +1 -1
  17. package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.js +14 -14
  18. package/dist/components/ui/ag-grid-react/cell-renderers/switch-display-renderer.js +18 -18
  19. package/dist/components/ui/ag-grid-react/cell-renderers/textarea-display-renderer.js +6 -6
  20. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +14 -14
  21. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +35 -35
  22. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +49 -49
  23. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +29 -29
  24. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +9 -9
  25. package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +20 -20
  26. package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +10 -10
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +76 -76
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +118 -118
  29. package/dist/components/ui/ag-grid-react/index.js +121 -102
  30. package/dist/components/ui/alert-dialog.js +6 -6
  31. package/dist/components/ui/alert.d.ts +4 -3
  32. package/dist/components/ui/alert.js +182 -64
  33. package/dist/components/ui/avatar.js +5 -5
  34. package/dist/components/ui/badge.d.ts +7 -2
  35. package/dist/components/ui/badge.js +105 -32
  36. package/dist/components/ui/breadcrumb.js +26 -21
  37. package/dist/components/ui/button-group.d.ts +7 -0
  38. package/dist/components/ui/button-group.js +116 -91
  39. package/dist/components/ui/button-variants.d.ts +7 -2
  40. package/dist/components/ui/button-variants.js +31 -16
  41. package/dist/components/ui/button.d.ts +2 -2
  42. package/dist/components/ui/button.js +10 -10
  43. package/dist/components/ui/calendar.js +185 -184
  44. package/dist/components/ui/card.js +24 -24
  45. package/dist/components/ui/chart/chart.js +27 -27
  46. package/dist/components/ui/chart/chart.utils.js +50 -50
  47. package/dist/components/ui/checkbox.js +22 -22
  48. package/dist/components/ui/chips.d.ts +19 -3
  49. package/dist/components/ui/chips.js +140 -41
  50. package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
  51. package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
  52. package/dist/components/ui/command-palette/command-palette.js +254 -264
  53. package/dist/components/ui/command-palette/index.d.ts +1 -1
  54. package/dist/components/ui/command-palette/index.js +42 -41
  55. package/dist/components/ui/command-palette/kbd.js +18 -18
  56. package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
  57. package/dist/components/ui/command-palette/shortcut-settings.js +105 -111
  58. package/dist/components/ui/command-palette/utils.d.ts +6 -1
  59. package/dist/components/ui/command-palette/utils.js +81 -74
  60. package/dist/components/ui/data-table/data-table-column-list.js +31 -31
  61. package/dist/components/ui/data-table/data-table-constants.d.ts +6 -0
  62. package/dist/components/ui/data-table/data-table-constants.js +4 -0
  63. package/dist/components/ui/data-table/data-table-context.d.ts +4 -0
  64. package/dist/components/ui/data-table/data-table-format-options.js +35 -35
  65. package/dist/components/ui/data-table/data-table-sheet.d.ts +4 -4
  66. package/dist/components/ui/data-table/data-table-sheet.js +91 -58
  67. package/dist/components/ui/data-table/data-table-view-options.js +29 -29
  68. package/dist/components/ui/data-table/data-table.js +84 -52
  69. package/dist/components/ui/data-table/index.d.ts +1 -0
  70. package/dist/components/ui/data-table/index.js +15 -13
  71. package/dist/components/ui/date-picker/date-picker.js +35 -35
  72. package/dist/components/ui/date-picker/date-range-picker.js +166 -164
  73. package/dist/components/ui/date-picker/month-picker.js +14 -14
  74. package/dist/components/ui/date-picker/month-range-picker.js +198 -189
  75. package/dist/components/ui/date-picker/multi-date-picker.js +14 -14
  76. package/dist/components/ui/date-picker/multi-month-picker.js +1 -1
  77. package/dist/components/ui/date-picker/multi-week-picker.js +1 -1
  78. package/dist/components/ui/date-picker/week-picker.js +2 -2
  79. package/dist/components/ui/date-picker/week-range-picker.js +164 -162
  80. package/dist/components/ui/dialog.js +25 -28
  81. package/dist/components/ui/drawer.js +40 -40
  82. package/dist/components/ui/dropdown-menu.js +72 -72
  83. package/dist/components/ui/empty-container.js +73 -69
  84. package/dist/components/ui/file-upload.js +137 -135
  85. package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
  86. package/dist/components/ui/filter-panel/filter-panel.js +175 -97
  87. package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
  88. package/dist/components/ui/filter-strip/filter-strip.js +63 -50
  89. package/dist/components/ui/filter-strip/filter-summary.d.ts +4 -1
  90. package/dist/components/ui/filter-strip/filter-summary.js +230 -146
  91. package/dist/components/ui/filter-strip/filter-tag-list.js +125 -91
  92. package/dist/components/ui/header.d.ts +7 -3
  93. package/dist/components/ui/header.js +87 -79
  94. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +44 -44
  95. package/dist/components/ui/hover-card.js +10 -10
  96. package/dist/components/ui/input.js +79 -70
  97. package/dist/components/ui/loader.js +16 -16
  98. package/dist/components/ui/nested-list/components/NestedListCategoryFilters.js +16 -16
  99. package/dist/components/ui/nested-list/components/NestedListHeader.js +27 -27
  100. package/dist/components/ui/nested-list/components/SortableItem.js +58 -58
  101. package/dist/components/ui/notification-panel/notification-item.js +32 -32
  102. package/dist/components/ui/notification-panel/notification-list.js +24 -24
  103. package/dist/components/ui/notification-panel/notification-panel.js +26 -26
  104. package/dist/components/ui/popover.js +22 -22
  105. package/dist/components/ui/progress.js +34 -34
  106. package/dist/components/ui/prompt.js +48 -48
  107. package/dist/components/ui/radio-group.js +63 -54
  108. package/dist/components/ui/select/components/LabelWithSequence.js +6 -6
  109. package/dist/components/ui/select/components/Submenu.js +33 -33
  110. package/dist/components/ui/select/select.js +425 -376
  111. package/dist/components/ui/sheet.js +88 -66
  112. package/dist/components/ui/sidebar.js +342 -296
  113. package/dist/components/ui/skeleton.js +6 -6
  114. package/dist/components/ui/slider.js +17 -17
  115. package/dist/components/ui/statistics-card.d.ts +86 -0
  116. package/dist/components/ui/statistics-card.hooks.d.ts +150 -0
  117. package/dist/components/ui/statistics-card.hooks.js +100 -0
  118. package/dist/components/ui/statistics-card.js +259 -0
  119. package/dist/components/ui/stepper.js +51 -51
  120. package/dist/components/ui/switch.js +7 -7
  121. package/dist/components/ui/tabs.js +70 -70
  122. package/dist/components/ui/tag-group.d.ts +1 -0
  123. package/dist/components/ui/tag-group.js +14 -13
  124. package/dist/components/ui/tag.js +43 -43
  125. package/dist/components/ui/textarea.js +86 -58
  126. package/dist/components/ui/toast.js +39 -39
  127. package/dist/components/ui/tooltip.js +23 -23
  128. package/dist/components/ui/types/date-picker.types.d.ts +1 -0
  129. package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
  130. package/dist/components/ui/types/filter-strip.types.d.ts +14 -0
  131. package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
  132. package/dist/components/ui/types/statistics-card.types.d.ts +1 -0
  133. package/dist/i18n/defaultMessages.d.ts +8 -0
  134. package/dist/i18n/defaultMessages.js +15 -9
  135. package/dist/i18n/locales/de.js +7 -1
  136. package/dist/i18n/locales/es.js +7 -1
  137. package/dist/i18n/locales/hi.js +7 -1
  138. package/dist/i18n/locales/kn.js +7 -1
  139. package/dist/icons/assets/bulk-edit.svg.js +5 -0
  140. package/dist/icons/assets/clock.svg.js +5 -0
  141. package/dist/icons/assets/statistics.svg.js +5 -0
  142. package/dist/icons/index.d.ts +3 -0
  143. package/dist/icons/index.js +254 -206
  144. package/dist/impact-nova.css +1 -1
  145. package/dist/index.d.ts +1 -0
  146. package/dist/index.js +361 -347
  147. package/package.json +3 -2
  148. package/tailwind.config.js +259 -152
  149. /package/dist/icons/assets/{PivotMode.svg.js → pivotMode.svg.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import * as a from "@radix-ui/react-avatar";
4
- import { cva as c } from "class-variance-authority";
4
+ import { cva as i } from "class-variance-authority";
5
5
  import { cn as o } from "../../lib/utils.js";
6
- const f = c(
6
+ const f = i(
7
7
  "relative flex shrink-0 overflow-hidden",
8
8
  {
9
9
  variants: {
@@ -22,10 +22,10 @@ const f = c(
22
22
  shape: "square"
23
23
  }
24
24
  }
25
- ), d = l.forwardRef(({ className: e, size: t, shape: r, ...m }, i) => /* @__PURE__ */ s(
25
+ ), d = l.forwardRef(({ className: e, size: t, shape: r, ...m }, c) => /* @__PURE__ */ s(
26
26
  a.Root,
27
27
  {
28
- ref: i,
28
+ ref: c,
29
29
  className: o(f({ size: t, shape: r, className: e })),
30
30
  "data-component": "avatar",
31
31
  ...m
@@ -47,7 +47,7 @@ const p = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ s(
47
47
  {
48
48
  ref: r,
49
49
  className: o(
50
- "flex h-full w-full items-center justify-center bg-success text-white font-bold",
50
+ "flex h-full w-full items-center justify-center bg-success text-success-foreground font-bold",
51
51
  e
52
52
  ),
53
53
  "data-component": "avatar-fallback",
@@ -3,9 +3,14 @@ import * as React from "react";
3
3
  declare const badgeVariants: (props?: {
4
4
  variant?: "solid" | "outline" | "subtle";
5
5
  color?: "primary" | "destructive" | "warning" | "success" | "neutral";
6
+ size?: "sm" | "md";
6
7
  shape?: "circle" | "square";
8
+ layout?: "default" | "iconOnly";
7
9
  } & import('class-variance-authority/types').ClassProp) => string;
8
- export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof badgeVariants> {
10
+ export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, Omit<VariantProps<typeof badgeVariants>, "layout"> {
11
+ /** Optional leading icon (16px slot). Omit label children for icon-only badges. */
12
+ icon?: React.ReactNode;
13
+ disabled?: boolean;
9
14
  }
10
- declare function Badge({ className, variant, color, shape, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
15
+ declare function Badge({ className, variant, color, size, shape, icon, disabled, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
11
16
  export { Badge, badgeVariants };
@@ -1,9 +1,9 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import "react";
3
- import { cva as o } from "class-variance-authority";
4
- import { cn as i } from "../../lib/utils.js";
5
- const c = o(
6
- "inline-flex items-center border px-2.5 py-0.5 text-sm leading-[18px] font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1
+ import { jsxs as u, jsx as n } from "react/jsx-runtime";
2
+ import * as g from "react";
3
+ import { cva as f } from "class-variance-authority";
4
+ import { cn as v } from "../../lib/utils.js";
5
+ const m = f(
6
+ "inline-flex min-w-0 max-w-[164px] shrink-0 items-center justify-center border font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 [&_[data-slot=badge-icon]_svg]:size-4 [&_[data-slot=badge-icon]_svg]:shrink-0",
7
7
  {
8
8
  variants: {
9
9
  variant: {
@@ -18,49 +18,122 @@ const c = o(
18
18
  destructive: "",
19
19
  neutral: ""
20
20
  },
21
+ /** Figma Large (14px) vs Medium (12px, 20px tall). */
22
+ size: {
23
+ md: "",
24
+ sm: ""
25
+ },
21
26
  shape: {
22
27
  circle: "rounded-full",
23
- square: "rounded"
28
+ square: "rounded-md"
29
+ },
30
+ layout: {
31
+ default: "gap-1.5 px-2 py-0.5",
32
+ iconOnly: "p-1"
24
33
  }
25
34
  },
26
35
  compoundVariants: [
27
- // Solid
28
- { variant: "solid", color: "primary", className: "border-transparent bg-primary text-white" },
29
- { variant: "solid", color: "success", className: "border-transparent bg-success text-white" },
30
- { variant: "solid", color: "warning", className: "border-transparent bg-warning text-[#000000de]" },
31
- { variant: "solid", color: "destructive", className: "border-transparent bg-destructive text-white" },
32
- { variant: "solid", color: "neutral", className: "border-transparent bg-[#5f6673] text-white" },
33
- // Outline
34
- { variant: "outline", color: "primary", className: "bg-transparent border-primary text-primary" },
35
- { variant: "outline", color: "success", className: "bg-transparent border-success text-success" },
36
- { variant: "outline", color: "warning", className: "bg-transparent border-warning text-warning" },
37
- { variant: "outline", color: "destructive", className: "bg-transparent border-destructive text-destructive" },
38
- { variant: "outline", color: "neutral", className: "bg-transparent border-[#5f6673] text-[#5f6673]" },
39
- // Subtle
40
- { variant: "subtle", color: "primary", className: "border-transparent bg-primary-subtle-bg text-primary-subtle-text" },
41
- { variant: "subtle", color: "success", className: "border-transparent bg-success-alert-bg text-success" },
42
- { variant: "subtle", color: "warning", className: "border-transparent bg-warning-alert-bg text-warning" },
43
- { variant: "subtle", color: "destructive", className: "border-transparent bg-error-alert-bg text-destructive" },
44
- { variant: "subtle", color: "neutral", className: "border-transparent bg-[#5f6673]/10 text-[#5f6673]" }
36
+ { size: "md", layout: "default", class: "text-sm leading-5" },
37
+ { size: "sm", layout: "default", class: "h-5 text-xs leading-4" },
38
+ { size: "sm", layout: "iconOnly", class: "h-5" },
39
+ {
40
+ variant: "solid",
41
+ color: "primary",
42
+ class: "border-transparent bg-badge-info-filled text-brand-foreground"
43
+ },
44
+ { variant: "solid", color: "neutral", class: "border-transparent bg-content-badge text-brand-foreground" },
45
+ {
46
+ variant: "solid",
47
+ color: "success",
48
+ class: "border-transparent bg-badge-success-filled text-success-foreground"
49
+ },
50
+ { variant: "solid", color: "warning", class: "border-transparent bg-badge-warning-filled text-content" },
51
+ {
52
+ variant: "solid",
53
+ color: "destructive",
54
+ class: "border-transparent bg-badge-error-filled text-destructive-foreground"
55
+ },
56
+ {
57
+ variant: "outline",
58
+ color: "primary",
59
+ class: "border border-badge-info-filled bg-canvas-elevated text-badge-info-filled"
60
+ },
61
+ { variant: "outline", color: "neutral", class: "border border-content-badge bg-canvas-elevated text-content-badge" },
62
+ {
63
+ variant: "outline",
64
+ color: "success",
65
+ class: "border border-badge-success-filled bg-canvas-elevated text-badge-success-filled"
66
+ },
67
+ { variant: "outline", color: "warning", class: "border border-badge-warning-ink bg-canvas-elevated text-badge-warning-ink" },
68
+ {
69
+ variant: "outline",
70
+ color: "destructive",
71
+ class: "border border-badge-error-filled bg-canvas-elevated text-badge-error-filled"
72
+ },
73
+ {
74
+ variant: "subtle",
75
+ color: "primary",
76
+ class: "border-transparent bg-badge-info-muted text-badge-info-filled"
77
+ },
78
+ { variant: "subtle", color: "neutral", class: "border-transparent bg-badge-neutral-muted text-content-badge" },
79
+ {
80
+ variant: "subtle",
81
+ color: "success",
82
+ class: "border-transparent bg-badge-success-muted text-badge-success-ink"
83
+ },
84
+ {
85
+ variant: "subtle",
86
+ color: "warning",
87
+ class: "border-transparent bg-badge-warning-muted text-badge-warning-ink"
88
+ },
89
+ {
90
+ variant: "subtle",
91
+ color: "destructive",
92
+ class: "border-transparent bg-badge-error-muted text-badge-error-ink"
93
+ }
45
94
  ],
46
95
  defaultVariants: {
47
96
  variant: "solid",
48
97
  color: "primary",
49
- shape: "circle"
98
+ size: "md",
99
+ shape: "circle",
100
+ layout: "default"
50
101
  }
51
102
  }
52
103
  );
53
- function m({ className: r, variant: t, color: a, shape: e, ...s }) {
54
- return /* @__PURE__ */ n(
104
+ function w({
105
+ className: o,
106
+ variant: l,
107
+ color: i,
108
+ size: d,
109
+ shape: c,
110
+ icon: e,
111
+ disabled: r,
112
+ children: a,
113
+ ...b
114
+ }) {
115
+ const t = g.Children.count(a) > 0, s = e != null && !t ? "iconOnly" : "default";
116
+ return /* @__PURE__ */ u(
55
117
  "div",
56
118
  {
57
- className: i(c({ variant: t, color: a, shape: e }), r),
119
+ role: "status",
58
120
  "data-component": "badge",
59
- ...s
121
+ "data-layout": s,
122
+ "aria-disabled": r ? !0 : void 0,
123
+ className: v(
124
+ m({ variant: l, color: i, size: d, shape: c, layout: s }),
125
+ r && "pointer-events-none border border-disabled-border bg-disabled-surface text-disabled-foreground",
126
+ o
127
+ ),
128
+ ...b,
129
+ children: [
130
+ e != null ? /* @__PURE__ */ n("span", { "data-slot": "badge-icon", className: "inline-flex shrink-0 text-current", children: e }) : null,
131
+ t ? /* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-center", children: a }) : null
132
+ ]
60
133
  }
61
134
  );
62
135
  }
63
136
  export {
64
- m as Badge,
65
- c as badgeVariants
137
+ w as Badge,
138
+ m as badgeVariants
66
139
  };
@@ -36,7 +36,7 @@ const W = s.forwardRef(({ className: e, maxWords: t, ...r }, o) => /* @__PURE__
36
36
  {
37
37
  ref: o,
38
38
  className: n(
39
- "flex flex-wrap items-center gap-2 text-[14px] font-medium text-secondary-foreground",
39
+ "flex flex-wrap items-center gap-1 text-[14px] font-medium text-secondary-foreground",
40
40
  e
41
41
  ),
42
42
  ...r
@@ -52,24 +52,26 @@ const R = s.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a(
52
52
  }
53
53
  ));
54
54
  R.displayName = "BreadcrumbItem";
55
- const V = s.forwardRef(({ asChild: e, className: t, maxWords: r, children: o, ...p }, u) => {
56
- const i = e ? y : "a", { maxWords: d } = s.useContext(x), c = r ?? d, l = typeof o == "string", m = l && c ? N(o, c) : o, B = l && c && o.split(/\s+/).length > c, C = /* @__PURE__ */ a(
57
- i,
58
- {
59
- ref: u,
60
- className: n(
61
- "transition-colors text-primary hover:text-primary-700 font-medium",
62
- t
63
- ),
64
- ...p,
65
- children: m
66
- }
67
- );
68
- return B ? /* @__PURE__ */ f(h, { children: [
69
- /* @__PURE__ */ a(w, { asChild: !0, children: C }),
70
- /* @__PURE__ */ a(b, { side: "top", variant: "tertiary", children: o })
71
- ] }) : C;
72
- });
55
+ const V = s.forwardRef(
56
+ ({ asChild: e, className: t, maxWords: r, children: o, ...p }, u) => {
57
+ const i = e ? y : "a", { maxWords: d } = s.useContext(x), c = r ?? d, l = typeof o == "string", m = l && c ? N(o, c) : o, B = l && c && o.split(/\s+/).length > c, C = /* @__PURE__ */ a(
58
+ i,
59
+ {
60
+ ref: u,
61
+ className: n(
62
+ "transition-colors text-brand hover:text-brand-strong font-medium",
63
+ t
64
+ ),
65
+ ...p,
66
+ children: m
67
+ }
68
+ );
69
+ return B ? /* @__PURE__ */ f(h, { children: [
70
+ /* @__PURE__ */ a(w, { asChild: !0, children: C }),
71
+ /* @__PURE__ */ a(b, { side: "top", variant: "tertiary", children: o })
72
+ ] }) : C;
73
+ }
74
+ );
73
75
  V.displayName = "BreadcrumbLink";
74
76
  const M = s.forwardRef(({ className: e, maxWords: t, children: r, ...o }, p) => {
75
77
  const { maxWords: u } = s.useContext(x), i = t ?? u, d = typeof r == "string", c = d && i ? N(r, i) : r, l = d && i && r.split(/\s+/).length > i, m = /* @__PURE__ */ a(
@@ -80,7 +82,7 @@ const M = s.forwardRef(({ className: e, maxWords: t, children: r, ...o }, p) =>
80
82
  "aria-disabled": "true",
81
83
  "aria-current": "page",
82
84
  "data-current": "page",
83
- className: n("font-extrabold text-[#1f2b4d]", e),
85
+ className: n("font-extrabold text-content", e),
84
86
  ...o,
85
87
  children: c
86
88
  }
@@ -100,7 +102,10 @@ const S = ({
100
102
  {
101
103
  role: "presentation",
102
104
  "aria-hidden": "true",
103
- className: n("[&>svg]:w-3.5 [&>svg]:h-3.5 text-secondary-foreground", t),
105
+ className: n(
106
+ "[&>svg]:w-3.5 [&>svg]:h-3.5 text-secondary-foreground",
107
+ t
108
+ ),
104
109
  ...r,
105
110
  children: e ?? /* @__PURE__ */ a(
106
111
  "svg",
@@ -1,5 +1,10 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
+ /**
4
+ * Button group — IA Design System v3.1 (Figma: Button group).
5
+ * - Fused (`spacing="none"`): shared #C3C8D4 borders, 8px outer radius; selected = #ECEEFD fill + #4259EE border/text.
6
+ * - Spaced: independent 8px rounded segments with gap (Figma “split” row).
7
+ */
3
8
  declare const buttonGroupVariants: (props?: {
4
9
  orientation?: "horizontal" | "vertical";
5
10
  spacing?: "sm" | "md" | "lg" | "none";
@@ -12,6 +17,8 @@ export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement>,
12
17
  helperText?: React.ReactNode;
13
18
  isError?: boolean;
14
19
  required?: boolean;
20
+ /** Accessible name when no visible `label` is passed */
21
+ "aria-label"?: string;
15
22
  }
16
23
  declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
17
24
  export { ButtonGroup, buttonGroupVariants };
@@ -1,105 +1,130 @@
1
- import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { cva as k } from "class-variance-authority";
4
- import { cn as t } from "../../lib/utils.js";
5
- import { Info as G } from "../../icons/index.js";
6
- const V = k(
7
- "inline-flex",
8
- {
9
- variants: {
10
- orientation: {
11
- horizontal: "flex-row",
12
- vertical: "flex-col"
13
- },
14
- spacing: {
15
- none: "gap-0",
16
- sm: "gap-1",
17
- md: "gap-2",
18
- lg: "gap-4"
19
- }
1
+ import { jsxs as f, jsx as c } from "react/jsx-runtime";
2
+ import * as a from "react";
3
+ import { cva as O } from "class-variance-authority";
4
+ import { cn as e } from "../../lib/utils.js";
5
+ import { Info as R } from "../../icons/index.js";
6
+ const A = O("inline-flex", {
7
+ variants: {
8
+ orientation: {
9
+ horizontal: "flex-row",
10
+ vertical: "flex-col"
20
11
  },
21
- defaultVariants: {
22
- orientation: "horizontal",
23
- spacing: "none"
12
+ spacing: {
13
+ none: "gap-0",
14
+ sm: "gap-1",
15
+ md: "gap-2",
16
+ lg: "gap-4"
24
17
  }
18
+ },
19
+ defaultVariants: {
20
+ orientation: "horizontal",
21
+ spacing: "none"
25
22
  }
26
- ), j = o.forwardRef(
27
- ({ className: x, orientation: n = "horizontal", spacing: l = "none", value: v, onValueChange: c, isDisabled: p, children: b, label: m, helperText: u, isError: r, required: g, ...h }, N) => /* @__PURE__ */ s("div", { className: t("grid gap-1.5", x), children: [
28
- m && /* @__PURE__ */ s(
29
- "label",
30
- {
31
- className: t(
32
- "text-xs font-medium leading-[18px] text-[#60697d]",
33
- // Exact legacy color
34
- p && "opacity-70",
35
- r && "text-destructive"
36
- ),
37
- children: [
38
- m,
39
- " ",
40
- g && /* @__PURE__ */ a("span", { className: "text-destructive", children: "*" })
41
- ]
42
- }
43
- ),
44
- /* @__PURE__ */ a(
45
- "div",
46
- {
47
- ref: N,
48
- className: t(
49
- V({ orientation: n, spacing: l }),
50
- ""
51
- ),
52
- role: "group",
53
- "data-component": "button-group",
54
- "data-orientation": n,
55
- "data-spacing": l,
56
- ...h,
57
- children: o.Children.map(b, (i) => {
58
- if (o.isValidElement(i)) {
59
- const e = i, d = e.props.value || e.props.children?.toString(), f = v === d, z = n === "horizontal";
60
- return o.cloneElement(e, {
61
- disabled: e.props.disabled || p,
62
- variant: e.props.variant || "tertiary",
23
+ }), H = a.forwardRef(
24
+ ({
25
+ className: z,
26
+ orientation: l = "horizontal",
27
+ spacing: p = "none",
28
+ value: m,
29
+ onValueChange: x,
30
+ isDisabled: b,
31
+ children: N,
32
+ label: o,
33
+ helperText: g,
34
+ isError: n,
35
+ required: y,
36
+ "aria-label": S,
37
+ ...w
38
+ }, _) => {
39
+ const s = p === "none", B = l === "horizontal", I = a.useId(), h = o ? `${I}-label` : void 0;
40
+ return /* @__PURE__ */ f("div", { className: e("grid gap-1.5", z), children: [
41
+ o && /* @__PURE__ */ f(
42
+ "label",
43
+ {
44
+ id: h,
45
+ className: e(
46
+ "text-xs font-medium leading-[18px] text-content-tertiary",
47
+ b && "opacity-70",
48
+ n && "text-destructive"
49
+ ),
50
+ children: [
51
+ o,
52
+ " ",
53
+ y && /* @__PURE__ */ c("span", { className: "text-destructive", children: "*" })
54
+ ]
55
+ }
56
+ ),
57
+ /* @__PURE__ */ c(
58
+ "div",
59
+ {
60
+ ref: _,
61
+ className: e(A({ orientation: l, spacing: p })),
62
+ role: "group",
63
+ "data-component": "button-group",
64
+ "data-orientation": l,
65
+ "data-spacing": p,
66
+ "data-fused": s ? "true" : "false",
67
+ "aria-label": o ? void 0 : S,
68
+ "aria-labelledby": o ? h : void 0,
69
+ ...w,
70
+ children: a.Children.map(N, (u) => {
71
+ if (!a.isValidElement(u)) return u;
72
+ const t = u, v = t.props.value ?? t.props.children?.toString?.() ?? "", d = typeof v == "string" ? v : String(v), r = m !== void 0 && m === d, i = !!(t.props.disabled || b), V = t.props.size === "icon" || t.props.size === "iconMd" || t.props.size === "iconSm", k = e(
73
+ "!shadow-none relative border transition-colors",
74
+ s && !V && "min-w-14",
75
+ s ? B ? "!rounded-none first:!rounded-l-md last:!rounded-r-md -ml-px first:ml-0" : "!rounded-none first:!rounded-t-md last:!rounded-b-md -mt-px first:mt-0" : "!rounded-md",
76
+ s && (r ? "z-10" : "z-[1]")
77
+ ), G = i ? "!bg-disabled-surface !border-disabled-border !text-disabled-foreground opacity-100 [&_svg]:!text-disabled-foreground" : r ? "!bg-accent !border-brand !text-brand [&_svg]:!text-brand" : e(
78
+ "!bg-canvas-elevated !border-button-primary-disabled !text-[#60697d]",
79
+ "[&_svg]:text-content-icon",
80
+ "hover:!text-brand hover:[&_svg]:!text-brand"
81
+ ), j = n && !r && !i && "!border-destructive !text-destructive [&_svg]:!text-destructive";
82
+ return a.cloneElement(t, {
83
+ disabled: i,
84
+ variant: "ghost",
85
+ "aria-pressed": m !== void 0 && d !== "" ? r : void 0,
63
86
  "data-button-group": "item",
64
- className: t(
65
- "relative transition-all hover:bg-transparent hover:border-tertiary-border",
66
- z ? "rounded-none first:rounded-l-md last:rounded-r-md -ml-[1px] first:ml-0" : "rounded-none first:rounded-t-md last:rounded-b-md -mt-[1px] first:mt-0",
67
- f ? "z-10 bg-[#eceefd] border-[#4259ee] text-[#4259ee] hover:bg-[#eceefd] hover:border-[#4259ee] hover:text-[#4259ee]" : "text-[#0000008a]",
68
- "disabled:bg-[#f8f9fb] disabled:text-[#b4bac7] disabled:opacity-100",
69
- r && !f && "border-destructive text-destructive z-10",
70
- // rudimentary error style for buttons
71
- // If active and error? Maybe keep active color but allow border to be red?
72
- // For now let's just stick to the text label error. Button error styles are complex.
73
- // The user just said "do the same thing", which mainly implies the wrapper structure.
74
- e.props.className
87
+ "data-active": r ? "true" : "false",
88
+ className: e(
89
+ k,
90
+ G,
91
+ j,
92
+ t.props.className
75
93
  ),
76
- onClick: (y) => {
77
- e.props.onClick?.(y), d && c && c(d);
94
+ onClick: (C) => {
95
+ t.props.onClick?.(C), d && x && !i && x(d);
78
96
  }
79
97
  });
80
- }
81
- return i;
82
- })
83
- }
84
- ),
85
- u && /* @__PURE__ */ s("div", { className: t("flex items-center gap-1", r && "text-destructive"), children: [
86
- !r && /* @__PURE__ */ a(G, { size: 10, className: "shrink-0 text-muted-foreground" }),
87
- /* @__PURE__ */ a(
88
- "p",
98
+ })
99
+ }
100
+ ),
101
+ g && /* @__PURE__ */ f(
102
+ "div",
89
103
  {
90
- className: t(
91
- "text-[10px] text-[#7a8294]",
92
- // Exact legacy color
93
- r && "text-destructive"
104
+ className: e(
105
+ "flex items-center gap-1",
106
+ n && "text-destructive"
94
107
  ),
95
- children: u
108
+ children: [
109
+ !n && /* @__PURE__ */ c(R, { size: 10, className: "shrink-0 text-content-muted" }),
110
+ /* @__PURE__ */ c(
111
+ "p",
112
+ {
113
+ className: e(
114
+ "text-xs text-content-muted",
115
+ n && "text-destructive"
116
+ ),
117
+ children: g
118
+ }
119
+ )
120
+ ]
96
121
  }
97
122
  )
98
- ] })
99
- ] })
123
+ ] });
124
+ }
100
125
  );
101
- j.displayName = "ButtonGroup";
126
+ H.displayName = "ButtonGroup";
102
127
  export {
103
- j as ButtonGroup,
104
- V as buttonGroupVariants
128
+ H as ButtonGroup,
129
+ A as buttonGroupVariants
105
130
  };
@@ -1,4 +1,9 @@
1
+ /**
2
+ * Buttons — IA Design System v3.1 (Figma: Buttons).
3
+ * - Primary (`default`): filled #4259EE (`--color-primary` / `bg-brand`), hover `--color-primary-strong`, disabled `--color-button-primary-disabled`.
4
+ * - Heights: Large `default` 32px, Medium `md` 28px, Small `sm` 24px; icon-only `icon` / `iconMd` / `iconSm` match those squares.
5
+ */
1
6
  export declare const buttonVariants: (props?: {
2
- variant?: "default" | "link" | "secondary" | "tertiary" | "destructive" | "outline" | "ghost";
3
- size?: "sm" | "md" | "lg" | "default" | "icon";
7
+ variant?: "default" | "link" | "secondary" | "tertiary" | "destructive" | "destructive-outline" | "outline" | "ghost";
8
+ size?: "sm" | "md" | "lg" | "default" | "icon" | "iconMd" | "iconSm";
4
9
  } & import('class-variance-authority/types').ClassProp) => string;
@@ -1,31 +1,46 @@
1
1
  import { cva as e } from "class-variance-authority";
2
- const d = e(
3
- "inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
2
+ const i = e(
3
+ "inline-flex items-center justify-center gap-1 whitespace-nowrap rounded-md text-sm font-medium leading-5 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring/25 focus-visible:ring-offset-1 focus-visible:ring-offset-canvas disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",
4
4
  {
5
5
  variants: {
6
6
  variant: {
7
- default: "bg-primary text-primary-foreground hover:bg-primary-700 disabled:bg-disabled-primary disabled:text-primary-foreground disabled:opacity-100",
8
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
9
- outline: "border border-primary bg-background text-primary hover:bg-accent hover:text-accent-foreground disabled:bg-disabled-secondary-bg disabled:border-border disabled:text-disabled-text disabled:opacity-100",
10
- secondary: "bg-secondary text-secondary-foreground hover:bg-accent hover:text-secondary-hover-foreground",
11
- tertiary: "border border-tertiary-border bg-background text-foreground hover:bg-accent hover:text-secondary-hover-foreground hover:border-secondary-hover-foreground disabled:bg-disabled-secondary-bg disabled:border-border disabled:text-disabled-text disabled:opacity-100",
12
- ghost: "hover:bg-accent hover:text-accent-foreground",
13
- link: "text-primary underline-offset-4 hover:underline"
7
+ default: "bg-brand text-brand-foreground hover:bg-brand-strong disabled:bg-button-primary-disabled disabled:text-brand-foreground disabled:opacity-100",
8
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive-hover focus-visible:ring-destructive/25 disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:opacity-100",
9
+ /** Outlined destructive — red border + label; use instead of `outline` when the action is dangerous. */
10
+ "destructive-outline": "border border-destructive bg-canvas text-destructive hover:bg-feedback-error-surface hover:border-destructive-hover hover:text-destructive-hover focus-visible:ring-destructive/22 disabled:bg-disabled-surface disabled:border-stroke disabled:text-disabled-foreground disabled:opacity-100",
11
+ outline: "border border-brand bg-canvas text-brand hover:bg-accent hover:text-accent-foreground disabled:bg-disabled-surface disabled:border-stroke disabled:text-disabled-foreground disabled:opacity-100",
12
+ secondary: "bg-secondary text-secondary-foreground hover:bg-accent hover:text-secondary-hover-foreground disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:opacity-100",
13
+ tertiary: "border border-stroke-field bg-canvas text-content hover:bg-accent hover:text-secondary-hover-foreground hover:border-secondary-hover-foreground disabled:bg-disabled-surface disabled:border-stroke disabled:text-disabled-foreground disabled:opacity-100",
14
+ ghost: "text-content hover:bg-accent hover:text-accent-foreground disabled:text-disabled-foreground disabled:opacity-50",
15
+ link: "text-brand underline-offset-4 hover:underline disabled:text-disabled-foreground disabled:opacity-50"
14
16
  },
15
17
  size: {
16
- default: "h-8 px-4 py-2",
17
- sm: "h-6 rounded-md px-3 text-xs",
18
- md: "h-7 rounded-md px-4 text-xs",
19
- lg: "h-9 rounded-md px-8",
20
- icon: "p-2"
18
+ default: "h-8 min-h-8 px-3 py-1.5",
19
+ sm: "h-6 min-h-6 gap-1 px-2.5 py-1 text-xs leading-4 [&_svg]:size-3.5",
20
+ md: "h-7 min-h-7 gap-1 px-3 py-1 text-xs leading-4 [&_svg]:size-3.5",
21
+ lg: "h-9 min-h-9 px-4 py-2 text-sm leading-5 [&_svg]:size-4",
22
+ icon: "h-8 w-8 min-h-8 min-w-8 shrink-0 gap-0 p-0 [&_svg]:size-4",
23
+ iconMd: "h-7 w-7 min-h-7 min-w-7 shrink-0 gap-0 p-0 [&_svg]:size-3.5",
24
+ iconSm: "h-6 w-6 min-h-6 min-w-6 shrink-0 gap-0 p-0 [&_svg]:size-3.5"
21
25
  }
22
26
  },
23
27
  defaultVariants: {
24
28
  variant: "default",
25
29
  size: "default"
26
- }
30
+ },
31
+ compoundVariants: [
32
+ {
33
+ variant: "default",
34
+ /** Filled primary: light ring so focus does not read heavier than the control. */
35
+ class: "focus-visible:ring-white/45"
36
+ },
37
+ {
38
+ variant: "link",
39
+ class: "h-auto min-h-0 w-auto min-w-0 justify-start gap-0 p-0 font-medium leading-normal ring-offset-0 focus-visible:ring-1 focus-visible:ring-focus-ring/25"
40
+ }
41
+ ]
27
42
  }
28
43
  );
29
44
  export {
30
- d as buttonVariants
45
+ i as buttonVariants
31
46
  };
@@ -12,14 +12,14 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, Var
12
12
  asChild?: boolean;
13
13
  /**
14
14
  * Side of the tooltip for icon-only buttons.
15
- * Only applies when `size="icon"` and `aria-label` is set.
15
+ * Only applies when `size` is `icon`, `iconMd`, or `iconSm` and `aria-label` is set.
16
16
  * @default "top"
17
17
  */
18
18
  tooltipSide?: "top" | "bottom" | "left" | "right";
19
19
  /**
20
20
  * Optional keyboard shortcut keybinding to display in the tooltip
21
21
  * alongside the aria-label text as a styled Kbd badge.
22
- * Only applies when the tooltip is shown (size="icon" + aria-label).
22
+ * Only applies when the tooltip is shown (icon-only size + aria-label).
23
23
  */
24
24
  tooltipKeybinding?: KeyBinding;
25
25
  }