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.
- package/dist/components/ui/accordion.d.ts +4 -1
- package/dist/components/ui/accordion.js +28 -22
- package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/checkbox-display-renderer.js +12 -12
- package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +30 -30
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/percent-progress-cell-editor.js +13 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +16 -16
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/textarea-cell-editor.js +17 -17
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +11 -11
- package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +2 -2
- package/dist/components/ui/ag-grid-react/cell-renderers/percent-progress-display-renderer.js +11 -13
- package/dist/components/ui/ag-grid-react/cell-renderers/select-display-renderer.js +8 -8
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/status-badge-renderer.js +14 -14
- package/dist/components/ui/ag-grid-react/cell-renderers/switch-display-renderer.js +18 -18
- package/dist/components/ui/ag-grid-react/cell-renderers/textarea-display-renderer.js +6 -6
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +14 -14
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +35 -35
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +49 -49
- package/dist/components/ui/ag-grid-react/headers/components/header-info.js +29 -29
- package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +9 -9
- package/dist/components/ui/ag-grid-react/headers/components/section-renderers.js +20 -20
- package/dist/components/ui/ag-grid-react/headers/custom-header-group.js +10 -10
- package/dist/components/ui/ag-grid-react/headers/custom-header.js +76 -76
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +118 -118
- package/dist/components/ui/ag-grid-react/index.js +121 -102
- package/dist/components/ui/alert-dialog.js +6 -6
- package/dist/components/ui/alert.d.ts +4 -3
- package/dist/components/ui/alert.js +182 -64
- package/dist/components/ui/avatar.js +5 -5
- package/dist/components/ui/badge.d.ts +7 -2
- package/dist/components/ui/badge.js +105 -32
- package/dist/components/ui/breadcrumb.js +26 -21
- package/dist/components/ui/button-group.d.ts +7 -0
- package/dist/components/ui/button-group.js +116 -91
- package/dist/components/ui/button-variants.d.ts +7 -2
- package/dist/components/ui/button-variants.js +31 -16
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/button.js +10 -10
- package/dist/components/ui/calendar.js +185 -184
- package/dist/components/ui/card.js +24 -24
- package/dist/components/ui/chart/chart.js +27 -27
- package/dist/components/ui/chart/chart.utils.js +50 -50
- package/dist/components/ui/checkbox.js +22 -22
- package/dist/components/ui/chips.d.ts +19 -3
- package/dist/components/ui/chips.js +140 -41
- package/dist/components/ui/command-palette/command-palette-layout.d.ts +28 -0
- package/dist/components/ui/command-palette/command-palette-layout.js +59 -0
- package/dist/components/ui/command-palette/command-palette.js +254 -264
- package/dist/components/ui/command-palette/index.d.ts +1 -1
- package/dist/components/ui/command-palette/index.js +42 -41
- package/dist/components/ui/command-palette/kbd.js +18 -18
- package/dist/components/ui/command-palette/shortcut-settings.d.ts +3 -3
- package/dist/components/ui/command-palette/shortcut-settings.js +105 -111
- package/dist/components/ui/command-palette/utils.d.ts +6 -1
- package/dist/components/ui/command-palette/utils.js +81 -74
- package/dist/components/ui/data-table/data-table-column-list.js +31 -31
- package/dist/components/ui/data-table/data-table-constants.d.ts +6 -0
- package/dist/components/ui/data-table/data-table-constants.js +4 -0
- package/dist/components/ui/data-table/data-table-context.d.ts +4 -0
- package/dist/components/ui/data-table/data-table-format-options.js +35 -35
- package/dist/components/ui/data-table/data-table-sheet.d.ts +4 -4
- package/dist/components/ui/data-table/data-table-sheet.js +91 -58
- package/dist/components/ui/data-table/data-table-view-options.js +29 -29
- package/dist/components/ui/data-table/data-table.js +84 -52
- package/dist/components/ui/data-table/index.d.ts +1 -0
- package/dist/components/ui/data-table/index.js +15 -13
- package/dist/components/ui/date-picker/date-picker.js +35 -35
- package/dist/components/ui/date-picker/date-range-picker.js +166 -164
- package/dist/components/ui/date-picker/month-picker.js +14 -14
- package/dist/components/ui/date-picker/month-range-picker.js +198 -189
- package/dist/components/ui/date-picker/multi-date-picker.js +14 -14
- package/dist/components/ui/date-picker/multi-month-picker.js +1 -1
- package/dist/components/ui/date-picker/multi-week-picker.js +1 -1
- package/dist/components/ui/date-picker/week-picker.js +2 -2
- package/dist/components/ui/date-picker/week-range-picker.js +164 -162
- package/dist/components/ui/dialog.js +25 -28
- package/dist/components/ui/drawer.js +40 -40
- package/dist/components/ui/dropdown-menu.js +72 -72
- package/dist/components/ui/empty-container.js +73 -69
- package/dist/components/ui/file-upload.js +137 -135
- package/dist/components/ui/filter-panel/filter-panel.d.ts +2 -2
- package/dist/components/ui/filter-panel/filter-panel.js +175 -97
- package/dist/components/ui/filter-strip/filter-strip.d.ts +1 -1
- package/dist/components/ui/filter-strip/filter-strip.js +63 -50
- package/dist/components/ui/filter-strip/filter-summary.d.ts +4 -1
- package/dist/components/ui/filter-strip/filter-summary.js +230 -146
- package/dist/components/ui/filter-strip/filter-tag-list.js +125 -91
- package/dist/components/ui/header.d.ts +7 -3
- package/dist/components/ui/header.js +87 -79
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +44 -44
- package/dist/components/ui/hover-card.js +10 -10
- package/dist/components/ui/input.js +79 -70
- package/dist/components/ui/loader.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListCategoryFilters.js +16 -16
- package/dist/components/ui/nested-list/components/NestedListHeader.js +27 -27
- package/dist/components/ui/nested-list/components/SortableItem.js +58 -58
- package/dist/components/ui/notification-panel/notification-item.js +32 -32
- package/dist/components/ui/notification-panel/notification-list.js +24 -24
- package/dist/components/ui/notification-panel/notification-panel.js +26 -26
- package/dist/components/ui/popover.js +22 -22
- package/dist/components/ui/progress.js +34 -34
- package/dist/components/ui/prompt.js +48 -48
- package/dist/components/ui/radio-group.js +63 -54
- package/dist/components/ui/select/components/LabelWithSequence.js +6 -6
- package/dist/components/ui/select/components/Submenu.js +33 -33
- package/dist/components/ui/select/select.js +425 -376
- package/dist/components/ui/sheet.js +88 -66
- package/dist/components/ui/sidebar.js +342 -296
- package/dist/components/ui/skeleton.js +6 -6
- package/dist/components/ui/slider.js +17 -17
- package/dist/components/ui/statistics-card.d.ts +86 -0
- package/dist/components/ui/statistics-card.hooks.d.ts +150 -0
- package/dist/components/ui/statistics-card.hooks.js +100 -0
- package/dist/components/ui/statistics-card.js +259 -0
- package/dist/components/ui/stepper.js +51 -51
- package/dist/components/ui/switch.js +7 -7
- package/dist/components/ui/tabs.js +70 -70
- package/dist/components/ui/tag-group.d.ts +1 -0
- package/dist/components/ui/tag-group.js +14 -13
- package/dist/components/ui/tag.js +43 -43
- package/dist/components/ui/textarea.js +86 -58
- package/dist/components/ui/toast.js +39 -39
- package/dist/components/ui/tooltip.js +23 -23
- package/dist/components/ui/types/date-picker.types.d.ts +1 -0
- package/dist/components/ui/types/filter-panel.types.d.ts +3 -0
- package/dist/components/ui/types/filter-strip.types.d.ts +14 -0
- package/dist/components/ui/types/horizontal-scroller.types.d.ts +1 -1
- package/dist/components/ui/types/statistics-card.types.d.ts +1 -0
- package/dist/i18n/defaultMessages.d.ts +8 -0
- package/dist/i18n/defaultMessages.js +15 -9
- package/dist/i18n/locales/de.js +7 -1
- package/dist/i18n/locales/es.js +7 -1
- package/dist/i18n/locales/hi.js +7 -1
- package/dist/i18n/locales/kn.js +7 -1
- package/dist/icons/assets/bulk-edit.svg.js +5 -0
- package/dist/icons/assets/clock.svg.js +5 -0
- package/dist/icons/assets/statistics.svg.js +5 -0
- package/dist/icons/index.d.ts +3 -0
- package/dist/icons/index.js +254 -206
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +361 -347
- package/package.json +3 -2
- package/tailwind.config.js +259 -152
- /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
|
|
4
|
+
import { cva as i } from "class-variance-authority";
|
|
5
5
|
import { cn as o } from "../../lib/utils.js";
|
|
6
|
-
const f =
|
|
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 },
|
|
25
|
+
), d = l.forwardRef(({ className: e, size: t, shape: r, ...m }, c) => /* @__PURE__ */ s(
|
|
26
26
|
a.Root,
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
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-
|
|
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
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
"inline-flex
|
|
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
|
-
|
|
28
|
-
{
|
|
29
|
-
{
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{ variant: "
|
|
36
|
-
{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{ variant: "
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
98
|
+
size: "md",
|
|
99
|
+
shape: "circle",
|
|
100
|
+
layout: "default"
|
|
50
101
|
}
|
|
51
102
|
}
|
|
52
103
|
);
|
|
53
|
-
function
|
|
54
|
-
|
|
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
|
-
|
|
119
|
+
role: "status",
|
|
58
120
|
"data-component": "badge",
|
|
59
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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-
|
|
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(
|
|
56
|
-
|
|
57
|
-
i,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
71
|
-
|
|
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-
|
|
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(
|
|
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
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Info as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
),
|
|
27
|
-
({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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: (
|
|
77
|
-
|
|
94
|
+
onClick: (C) => {
|
|
95
|
+
t.props.onClick?.(C), d && x && !i && x(d);
|
|
78
96
|
}
|
|
79
97
|
});
|
|
80
|
-
}
|
|
81
|
-
|
|
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:
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
r && "text-destructive"
|
|
104
|
+
className: e(
|
|
105
|
+
"flex items-center gap-1",
|
|
106
|
+
n && "text-destructive"
|
|
94
107
|
),
|
|
95
|
-
children:
|
|
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
|
-
|
|
126
|
+
H.displayName = "ButtonGroup";
|
|
102
127
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
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
|
|
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-
|
|
8
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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-
|
|
17
|
-
sm: "h-6
|
|
18
|
-
md: "h-7
|
|
19
|
-
lg: "h-9
|
|
20
|
-
icon: "p-
|
|
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
|
-
|
|
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
|
|
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 (
|
|
22
|
+
* Only applies when the tooltip is shown (icon-only size + aria-label).
|
|
23
23
|
*/
|
|
24
24
|
tooltipKeybinding?: KeyBinding;
|
|
25
25
|
}
|