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,10 +1,10 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { cva as
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { cva as u } from "class-variance-authority";
|
|
4
4
|
import { Check as V } from "lucide-react";
|
|
5
|
-
import { cn as
|
|
6
|
-
import { useImpactNovaI18n as
|
|
7
|
-
const
|
|
5
|
+
import { cn as r } from "../../lib/utils.js";
|
|
6
|
+
import { useImpactNovaI18n as k } from "../../i18n/ImpactNovaI18nContext.js";
|
|
7
|
+
const j = u("flex w-full gap-0", {
|
|
8
8
|
variants: {
|
|
9
9
|
orientation: {
|
|
10
10
|
horizontal: "flex-row items-center",
|
|
@@ -14,12 +14,12 @@ const I = m("flex w-full gap-0", {
|
|
|
14
14
|
defaultVariants: {
|
|
15
15
|
orientation: "horizontal"
|
|
16
16
|
}
|
|
17
|
-
}),
|
|
17
|
+
}), I = u(
|
|
18
18
|
"relative flex items-center transition-all duration-200",
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
21
21
|
orientation: {
|
|
22
|
-
horizontal: "h-[44px] px-3 rounded-lg border-b-2 bg-
|
|
22
|
+
horizontal: "h-[44px] px-3 rounded-lg border-b-2 bg-canvas-elevated shadow-elevation-card flex-none",
|
|
23
23
|
vertical: "w-full py-4 px-3 mb-2 rounded-lg border-none"
|
|
24
24
|
},
|
|
25
25
|
status: {
|
|
@@ -33,33 +33,33 @@ const I = m("flex w-full gap-0", {
|
|
|
33
33
|
{
|
|
34
34
|
orientation: "horizontal",
|
|
35
35
|
status: "active",
|
|
36
|
-
className: "border-
|
|
36
|
+
className: "border-brand after:absolute after:bottom-[-9.5px] after:left-[18px] after:h-0 after:w-0 after:border-l-[6.5px] after:border-r-[6.5px] after:border-t-[10px] after:border-l-transparent after:border-r-transparent after:border-t-brand after:content-['']"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
orientation: "horizontal",
|
|
40
40
|
status: "completed",
|
|
41
|
-
className: "border-
|
|
41
|
+
className: "border-success"
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
orientation: "horizontal",
|
|
45
45
|
status: "default",
|
|
46
|
-
className: "border-
|
|
46
|
+
className: "border-stroke-hairline"
|
|
47
47
|
},
|
|
48
48
|
// Vertical Orientation Status
|
|
49
49
|
{
|
|
50
50
|
orientation: "vertical",
|
|
51
51
|
status: "active",
|
|
52
|
-
className: "bg-
|
|
52
|
+
className: "bg-canvas-tint before:absolute before:left-[-8px] before:top-1/2 before:h-8 before:w-[4px] before:-translate-y-1/2 before:bg-brand before:rounded-full before:content-['']"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
orientation: "vertical",
|
|
56
56
|
status: "completed",
|
|
57
|
-
className: "bg-
|
|
57
|
+
className: "bg-feedback-success-surface"
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
orientation: "vertical",
|
|
61
61
|
status: "default",
|
|
62
|
-
className: "bg-
|
|
62
|
+
className: "bg-secondary"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
defaultVariants: {
|
|
@@ -67,74 +67,74 @@ const I = m("flex w-full gap-0", {
|
|
|
67
67
|
status: "default"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
), D =
|
|
70
|
+
), D = u(
|
|
71
71
|
"flex h-6 w-6 shrink-0 items-center justify-center rounded-[8px] text-xs font-extrabold transition-all",
|
|
72
72
|
{
|
|
73
73
|
variants: {
|
|
74
74
|
status: {
|
|
75
|
-
default: "bg-
|
|
76
|
-
active: "bg-
|
|
77
|
-
completed: "bg-
|
|
75
|
+
default: "bg-muted text-navigation-muted",
|
|
76
|
+
active: "bg-brand text-brand-foreground",
|
|
77
|
+
completed: "bg-success text-success-foreground"
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
defaultVariants: {
|
|
81
81
|
status: "default"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
),
|
|
85
|
-
({ className:
|
|
86
|
-
const { t:
|
|
84
|
+
), A = v.forwardRef(
|
|
85
|
+
({ className: h, currentStep: p, steps: c, orientation: e = "horizontal", onStepClick: o, ...g }, w) => {
|
|
86
|
+
const { t: N } = k(), y = c.length;
|
|
87
87
|
return /* @__PURE__ */ t(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
ref: w,
|
|
91
|
-
className:
|
|
91
|
+
className: r(j({ orientation: e }), h),
|
|
92
92
|
"data-orientation": e,
|
|
93
93
|
role: "list",
|
|
94
94
|
...g,
|
|
95
|
-
children:
|
|
96
|
-
const
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
95
|
+
children: c.map((d, s) => {
|
|
96
|
+
const n = typeof d == "string" ? { label: d } : d, l = s + 1, b = l === p, x = l < p, i = n.disabled, a = x ? "completed" : b ? "active" : "default", z = N("stepper.stepOfTotal", { current: l, total: y });
|
|
97
|
+
return /* @__PURE__ */ m(v.Fragment, { children: [
|
|
98
|
+
/* @__PURE__ */ m(
|
|
99
99
|
"div",
|
|
100
100
|
{
|
|
101
101
|
role: "listitem",
|
|
102
|
-
onClick: () => !
|
|
102
|
+
onClick: () => !i && o?.(s),
|
|
103
103
|
"aria-label": z,
|
|
104
|
-
"aria-current":
|
|
105
|
-
tabIndex: o && !
|
|
106
|
-
onKeyDown: o && !
|
|
104
|
+
"aria-current": b ? "step" : void 0,
|
|
105
|
+
tabIndex: o && !i ? 0 : void 0,
|
|
106
|
+
onKeyDown: o && !i ? (f) => {
|
|
107
107
|
(f.key === "Enter" || f.key === " ") && (f.preventDefault(), o(s));
|
|
108
108
|
} : void 0,
|
|
109
109
|
"data-step": l,
|
|
110
|
-
"data-status":
|
|
111
|
-
"data-disabled":
|
|
112
|
-
className:
|
|
113
|
-
|
|
110
|
+
"data-status": a,
|
|
111
|
+
"data-disabled": i || void 0,
|
|
112
|
+
className: r(
|
|
113
|
+
I({ orientation: e, status: a }),
|
|
114
114
|
e === "horizontal" && "min-w-[140px]",
|
|
115
|
-
|
|
115
|
+
i ? "opacity-80 cursor-not-allowed" : o ? "cursor-pointer" : "cursor-default"
|
|
116
116
|
),
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */ t("div", { className:
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */ t("div", { className:
|
|
118
|
+
/* @__PURE__ */ t("div", { className: r(D({ status: a }), "mr-2"), children: x ? /* @__PURE__ */ t(V, { className: "h-4 w-4 stroke-[3px]" }) : /* @__PURE__ */ t("span", { children: n.icon || l }) }),
|
|
119
|
+
/* @__PURE__ */ m("div", { className: "flex flex-col justify-center overflow-hidden", children: [
|
|
120
|
+
/* @__PURE__ */ t("div", { className: r(
|
|
121
121
|
"text-[14px] leading-tight font-medium truncate max-w-[200px]",
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
), children:
|
|
125
|
-
|
|
122
|
+
a === "completed" ? "text-success" : "text-content",
|
|
123
|
+
a === "active" && e === "vertical" ? "text-brand" : ""
|
|
124
|
+
), children: n.label }),
|
|
125
|
+
n.description && /* @__PURE__ */ t("div", { className: r(
|
|
126
126
|
"text-[12px] leading-tight mt-0.5 truncate max-w-[200px]",
|
|
127
|
-
|
|
128
|
-
), children:
|
|
127
|
+
a === "completed" ? "text-success" : "text-content-muted"
|
|
128
|
+
), children: n.description })
|
|
129
129
|
] })
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
),
|
|
133
|
-
s <
|
|
133
|
+
s < c.length - 1 && /* @__PURE__ */ t(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className:
|
|
137
|
-
"border-t border-dashed border-
|
|
136
|
+
className: r(
|
|
137
|
+
"border-t border-dashed border-stroke-hairline transition-colors",
|
|
138
138
|
e === "horizontal" ? "flex-1 min-w-[24px] mx-1 self-center" : "h-6 w-0 border-l ml-[12px] my-[-4px]"
|
|
139
139
|
)
|
|
140
140
|
}
|
|
@@ -145,9 +145,9 @@ const I = m("flex w-full gap-0", {
|
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
);
|
|
148
|
-
|
|
148
|
+
A.displayName = "Stepper";
|
|
149
149
|
export {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
A as Stepper,
|
|
151
|
+
I as stepVariants,
|
|
152
|
+
j as stepperVariants
|
|
153
153
|
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-switch";
|
|
4
4
|
import { cn as a } from "../../lib/utils.js";
|
|
5
|
-
const
|
|
5
|
+
const r = n.forwardRef(({ className: o, ...s }, i) => /* @__PURE__ */ t(
|
|
6
6
|
e.Root,
|
|
7
7
|
{
|
|
8
8
|
className: a(
|
|
9
|
-
"peer inline-flex h-[16px] w-[24px] shrink-0 cursor-pointer items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-
|
|
9
|
+
"peer inline-flex h-[16px] w-[24px] shrink-0 cursor-pointer items-center rounded-full border transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-canvas disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-brand-tint data-[state=checked]:border-canvas-accordion data-[state=unchecked]:bg-canvas-elevated data-[state=unchecked]:border-canvas-tint",
|
|
10
10
|
o
|
|
11
11
|
),
|
|
12
|
-
...
|
|
12
|
+
...s,
|
|
13
13
|
ref: i,
|
|
14
14
|
"data-component": "switch-root",
|
|
15
15
|
children: /* @__PURE__ */ t(
|
|
16
16
|
e.Thumb,
|
|
17
17
|
{
|
|
18
18
|
className: a(
|
|
19
|
-
"pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-[10px] data-[state=unchecked]:translate-x-[2px] data-[state=checked]:bg-
|
|
19
|
+
"pointer-events-none block h-[10px] w-[10px] rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-[10px] data-[state=unchecked]:translate-x-[2px] data-[state=checked]:bg-brand data-[state=unchecked]:bg-stroke-field"
|
|
20
20
|
),
|
|
21
21
|
"data-component": "switch-thumb"
|
|
22
22
|
}
|
|
23
23
|
)
|
|
24
24
|
}
|
|
25
25
|
));
|
|
26
|
-
|
|
26
|
+
r.displayName = e.Root.displayName;
|
|
27
27
|
export {
|
|
28
|
-
|
|
28
|
+
r as Switch
|
|
29
29
|
};
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as r, jsxs as u, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as s from "react";
|
|
3
3
|
import * as c from "@radix-ui/react-tabs";
|
|
4
4
|
import { cn as p } from "../../lib/utils.js";
|
|
5
|
-
import { Tooltip as W, TooltipTrigger as z, TooltipContent as
|
|
6
|
-
const N =
|
|
5
|
+
import { Tooltip as W, TooltipTrigger as z, TooltipContent as I } from "./tooltip.js";
|
|
6
|
+
const N = s.createContext({
|
|
7
7
|
variant: "line",
|
|
8
8
|
size: "default"
|
|
9
|
-
}),
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
const [y, b] =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, [
|
|
9
|
+
}), L = (e, a) => {
|
|
10
|
+
const t = e.split(/\s+/);
|
|
11
|
+
return t.length <= a ? e : t.slice(0, a).join(" ") + "...";
|
|
12
|
+
}, S = s.forwardRef(({ variant: e = "line", size: a = "default", hideInactiveLabel: t = !1, tooltipClassName: n, maxWords: o, value: i, defaultValue: x, onValueChange: g, ...d }, h) => {
|
|
13
|
+
const [y, b] = s.useState(i || x);
|
|
14
|
+
s.useEffect(() => {
|
|
15
|
+
i !== void 0 && b(i);
|
|
16
|
+
}, [i]);
|
|
17
17
|
const w = (f) => {
|
|
18
|
-
|
|
18
|
+
i === void 0 && b(f), g?.(f);
|
|
19
19
|
};
|
|
20
|
-
return /* @__PURE__ */ r(N.Provider, { value: { variant:
|
|
20
|
+
return /* @__PURE__ */ r(N.Provider, { value: { variant: e, size: a, activeValue: y, hideInactiveLabel: t, tooltipClassName: n, maxWords: o }, children: /* @__PURE__ */ r(
|
|
21
21
|
c.Root,
|
|
22
22
|
{
|
|
23
|
-
ref:
|
|
24
|
-
value:
|
|
23
|
+
ref: h,
|
|
24
|
+
value: i,
|
|
25
25
|
defaultValue: x,
|
|
26
26
|
onValueChange: w,
|
|
27
27
|
"data-component": "tabs",
|
|
28
|
-
"data-variant":
|
|
29
|
-
...
|
|
28
|
+
"data-variant": e,
|
|
29
|
+
...d
|
|
30
30
|
}
|
|
31
31
|
) });
|
|
32
32
|
});
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const { variant:
|
|
33
|
+
S.displayName = c.Root.displayName;
|
|
34
|
+
const F = s.forwardRef(({ className: e, ...a }, t) => {
|
|
35
|
+
const { variant: n } = s.useContext(N);
|
|
36
36
|
return /* @__PURE__ */ r(
|
|
37
37
|
c.List,
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
39
|
+
ref: t,
|
|
40
40
|
"data-tabs": "list",
|
|
41
41
|
className: p(
|
|
42
42
|
"inline-flex items-center justify-center rounded-lg",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
n === "line" && "h-[38px] bg-canvas-elevated border w-full justify-start gap-2 px-2 shrink-0 py-0",
|
|
44
|
+
n === "pill" && "h-[38px] p-1 bg-brand-tint text-brand gap-1",
|
|
45
|
+
n === "outline" && "bg-transparent gap-2 p-0 w-full justify-start",
|
|
46
|
+
n === "box" && "h-auto bg-transparent border-0 w-full justify-start gap-[16px] p-0 shrink-0",
|
|
47
|
+
e
|
|
48
48
|
),
|
|
49
49
|
...a
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
|
-
}),
|
|
53
|
-
const { variant:
|
|
54
|
-
|
|
55
|
-
const C =
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
}), $ = s.forwardRef(({ className: e, icon: a, children: t, maxWords: n, activeColor: o, style: i, ...x }, g) => {
|
|
53
|
+
const { variant: d, size: h, activeValue: y, hideInactiveLabel: b, tooltipClassName: w, maxWords: f } = s.useContext(N), v = n ?? f, m = y === x.value, T = typeof t == "string", R = T && v ? L(t, v) : t, k = T && v && t.split(/\s+/).length > v, V = b && !m || k, l = { ...i };
|
|
54
|
+
d === "box" && o && (l["--tab-border"] = o.border, l["--tab-bg"] = o.bg, l["--tab-text"] = o.text, l["--tab-hover-border"] = `color-mix(in srgb, ${o.border} 40%, transparent)`, l["--tab-hover-bg"] = `color-mix(in srgb, ${o.bg} 50%, white)`, l["--tab-hover-text"] = `color-mix(in srgb, ${o.text} 60%, var(--color-foreground-tertiary))`);
|
|
55
|
+
const C = d === "box" ? /* @__PURE__ */ u(j, { children: [
|
|
56
|
+
t,
|
|
57
|
+
m && /* @__PURE__ */ r(
|
|
58
58
|
"span",
|
|
59
59
|
{
|
|
60
60
|
className: "absolute -bottom-[5.5px] left-1/2 -translate-x-1/2 w-[11px] h-[11px] rotate-45 border-b border-r",
|
|
@@ -62,8 +62,8 @@ const E = i.forwardRef(({ className: t, ...a }, e) => {
|
|
|
62
62
|
}
|
|
63
63
|
)
|
|
64
64
|
] }) : /* @__PURE__ */ u(j, { children: [
|
|
65
|
-
a && /* @__PURE__ */ r("span", { className: p("h-4 w-4 shrink-0", !b ||
|
|
66
|
-
/* @__PURE__ */ r("span", { className: p(b && !
|
|
65
|
+
a && /* @__PURE__ */ r("span", { className: p("h-4 w-4 shrink-0", !b || m ? "mr-2" : "mr-0"), children: a }),
|
|
66
|
+
/* @__PURE__ */ r("span", { className: p(b && !m && "sr-only"), children: R })
|
|
67
67
|
] });
|
|
68
68
|
return /* @__PURE__ */ r(
|
|
69
69
|
c.Trigger,
|
|
@@ -72,65 +72,65 @@ const E = i.forwardRef(({ className: t, ...a }, e) => {
|
|
|
72
72
|
"data-tabs": "trigger",
|
|
73
73
|
className: p(
|
|
74
74
|
"relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
75
|
-
|
|
76
|
-
"h-full rounded-none border-b-2 border-transparent px-1 text-[13px] font-medium capitalize text-
|
|
77
|
-
"data-[state=active]:border-
|
|
78
|
-
"hover:text-
|
|
75
|
+
d === "line" && [
|
|
76
|
+
"h-full rounded-none border-b-2 border-transparent px-1 text-[13px] font-medium capitalize text-content-tertiary -mb-[1px]",
|
|
77
|
+
"data-[state=active]:border-brand data-[state=active]:text-brand data-[state=active]:shadow-none",
|
|
78
|
+
"hover:text-brand py-1.5 px-3"
|
|
79
79
|
],
|
|
80
|
-
|
|
81
|
-
"rounded-md text-
|
|
82
|
-
"data-[state=active]:bg-
|
|
80
|
+
d === "pill" && [
|
|
81
|
+
"rounded-md text-brand/70 text-[13px]",
|
|
82
|
+
"data-[state=active]:bg-canvas-elevated data-[state=active]:text-brand data-[state=active]:shadow-sm",
|
|
83
83
|
"py-1.5 px-3"
|
|
84
84
|
],
|
|
85
|
-
|
|
86
|
-
"rounded-full border border-
|
|
87
|
-
"hover:bg-
|
|
88
|
-
"data-[state=active]:border-
|
|
89
|
-
|
|
85
|
+
d === "outline" && [
|
|
86
|
+
"rounded-full border border-content-badge bg-canvas-elevated text-content-badge font-['Manrope']",
|
|
87
|
+
"hover:bg-canvas-muted hover:text-content",
|
|
88
|
+
"data-[state=active]:border-brand data-[state=active]:text-brand",
|
|
89
|
+
h === "sm" ? "h-[24px] px-[8px] py-[2px] text-xs" : "h-9 px-4 py-2"
|
|
90
90
|
],
|
|
91
|
-
|
|
92
|
-
"group flex flex-row items-center justify-between min-w-[231px] w-fit gap-4 min-h-[45px] h-auto py-2 px-[16px] rounded-[8px] bg-
|
|
93
|
-
"border border-
|
|
91
|
+
d === "box" && [
|
|
92
|
+
"group flex flex-row items-center justify-between min-w-[231px] w-fit gap-4 min-h-[45px] h-auto py-2 px-[16px] rounded-[8px] bg-canvas-elevated text-content-tertiary transition-none overflow-visible",
|
|
93
|
+
"border border-stroke-field",
|
|
94
94
|
"text-[16px]",
|
|
95
|
-
"hover:border-[color:var(--tab-hover-border
|
|
96
|
-
"data-[state=active]:border-[color:var(--tab-border
|
|
97
|
-
"data-[state=active]:bg-[color:var(--tab-bg
|
|
98
|
-
"data-[state=active]:text-[color:var(--tab-text
|
|
95
|
+
"hover:border-[color:var(--tab-hover-border,var(--color-tab-hover-border))] hover:bg-[color:var(--tab-hover-bg,var(--color-tab-hover-surface))] hover:text-[color:var(--tab-hover-text,var(--color-tab-hover-foreground))]",
|
|
96
|
+
"data-[state=active]:border-[color:var(--tab-border,var(--color-tab-active-border))]",
|
|
97
|
+
"data-[state=active]:bg-[color:var(--tab-bg,var(--color-tab-active-surface))]",
|
|
98
|
+
"data-[state=active]:text-[color:var(--tab-text,var(--color-tab-active-foreground))]"
|
|
99
99
|
],
|
|
100
|
-
|
|
100
|
+
e
|
|
101
101
|
),
|
|
102
|
-
style:
|
|
102
|
+
style: l,
|
|
103
103
|
...x,
|
|
104
104
|
children: V ? /* @__PURE__ */ u(W, { children: [
|
|
105
105
|
/* @__PURE__ */ r(z, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "inline-flex items-center justify-center h-full w-full", children: C }) }),
|
|
106
|
-
/* @__PURE__ */ r(
|
|
106
|
+
/* @__PURE__ */ r(I, { variant: "tertiary", className: w, children: t })
|
|
107
107
|
] }) : C
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
110
|
});
|
|
111
|
-
|
|
112
|
-
const
|
|
111
|
+
$.displayName = c.Trigger.displayName;
|
|
112
|
+
const M = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
|
|
113
113
|
c.Content,
|
|
114
114
|
{
|
|
115
|
-
ref:
|
|
115
|
+
ref: t,
|
|
116
116
|
"data-tabs": "content",
|
|
117
117
|
className: p(
|
|
118
|
-
"mt-2 ring-offset-
|
|
119
|
-
|
|
118
|
+
"mt-2 ring-offset-canvas focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2",
|
|
119
|
+
e
|
|
120
120
|
),
|
|
121
121
|
...a
|
|
122
122
|
}
|
|
123
123
|
));
|
|
124
|
-
|
|
125
|
-
const
|
|
126
|
-
/* @__PURE__ */ r("div", { className: "flex group-data-[state=active]:hidden", children:
|
|
124
|
+
M.displayName = c.Content.displayName;
|
|
125
|
+
const P = s.forwardRef(({ className: e, activeImage: a, inactiveImage: t, ...n }, o) => /* @__PURE__ */ u("div", { ref: o, className: p("relative flex items-center justify-center shrink-0", e), ...n, children: [
|
|
126
|
+
/* @__PURE__ */ r("div", { className: "flex group-data-[state=active]:hidden", children: t }),
|
|
127
127
|
/* @__PURE__ */ r("div", { className: "hidden group-data-[state=active]:flex", children: a })
|
|
128
128
|
] }));
|
|
129
|
-
|
|
129
|
+
P.displayName = "TabsImage";
|
|
130
130
|
export {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
S as Tabs,
|
|
132
|
+
M as TabsContent,
|
|
133
|
+
P as TabsImage,
|
|
134
|
+
F as TabsList,
|
|
135
|
+
$ as TabsTrigger
|
|
136
136
|
};
|
|
@@ -16,6 +16,7 @@ export interface TagGroupProps extends React.HTMLAttributes<HTMLDivElement>, Var
|
|
|
16
16
|
rightIcon?: TagProps["rightIcon"];
|
|
17
17
|
removable?: TagProps["removable"];
|
|
18
18
|
onRemove?: TagProps["onRemove"];
|
|
19
|
+
className?: TagProps["className"];
|
|
19
20
|
}>;
|
|
20
21
|
asChild?: boolean;
|
|
21
22
|
}
|
|
@@ -27,26 +27,27 @@ const w = d("flex", {
|
|
|
27
27
|
wrap: "nowrap"
|
|
28
28
|
}
|
|
29
29
|
}), g = c.forwardRef(
|
|
30
|
-
({ className: n, spacing:
|
|
31
|
-
|
|
30
|
+
({ className: n, spacing: o, orientation: r, wrap: p, tags: i, asChild: t = !1, ...m }, l) => /* @__PURE__ */ e(
|
|
31
|
+
t ? f : "div",
|
|
32
32
|
{
|
|
33
33
|
ref: l,
|
|
34
|
-
className: v(w({ spacing:
|
|
34
|
+
className: v(w({ spacing: o, orientation: r, wrap: p }), n),
|
|
35
35
|
"data-component": "tag-group",
|
|
36
|
-
"data-spacing":
|
|
36
|
+
"data-spacing": o ?? "md",
|
|
37
37
|
"data-orientation": r ?? "horizontal",
|
|
38
38
|
...m,
|
|
39
|
-
children:
|
|
39
|
+
children: i.map((a, s) => /* @__PURE__ */ e(
|
|
40
40
|
h,
|
|
41
41
|
{
|
|
42
|
-
variant:
|
|
43
|
-
size:
|
|
44
|
-
shape:
|
|
45
|
-
leftIcon:
|
|
46
|
-
rightIcon:
|
|
47
|
-
removable:
|
|
48
|
-
onRemove:
|
|
49
|
-
|
|
42
|
+
variant: a.variant,
|
|
43
|
+
size: a.size,
|
|
44
|
+
shape: a.shape,
|
|
45
|
+
leftIcon: a.leftIcon,
|
|
46
|
+
rightIcon: a.rightIcon,
|
|
47
|
+
removable: a.removable,
|
|
48
|
+
onRemove: a.onRemove,
|
|
49
|
+
className: a.className,
|
|
50
|
+
children: a.label
|
|
50
51
|
},
|
|
51
52
|
s
|
|
52
53
|
))
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { X as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { useImpactNovaI18n as
|
|
9
|
-
const
|
|
10
|
-
"inline-flex items-center justify-center rounded-full transition-colors whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1
|
+
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as f from "react";
|
|
3
|
+
import { Slot as v } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as h } from "class-variance-authority";
|
|
5
|
+
import { X as x } from "lucide-react";
|
|
6
|
+
import { Button as y } from "./button.js";
|
|
7
|
+
import { cn as k } from "../../lib/utils.js";
|
|
8
|
+
import { useImpactNovaI18n as w } from "../../i18n/ImpactNovaI18nContext.js";
|
|
9
|
+
const N = h(
|
|
10
|
+
"inline-flex items-center justify-center rounded-full transition-colors whitespace-nowrap focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2",
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
|
-
default: "bg-
|
|
15
|
-
secondary: "bg-
|
|
16
|
-
outline: "border border-
|
|
17
|
-
tertiary: "bg-
|
|
18
|
-
ghost: "bg-transparent text-
|
|
19
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive
|
|
20
|
-
success: "bg-
|
|
21
|
-
warning: "bg-
|
|
22
|
-
info: "bg-
|
|
23
|
-
choice: "bg-[
|
|
14
|
+
default: "bg-brand text-brand-foreground hover:bg-brand/90",
|
|
15
|
+
secondary: "bg-accent text-content hover:bg-brand-tint-hover",
|
|
16
|
+
outline: "border border-stroke-accent bg-canvas-elevated text-content-tertiary hover:bg-canvas-muted",
|
|
17
|
+
tertiary: "bg-secondary text-content hover:bg-muted",
|
|
18
|
+
ghost: "bg-transparent text-content-tertiary hover:bg-muted",
|
|
19
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive-hover",
|
|
20
|
+
success: "bg-feedback-success-surface text-success hover:bg-success/15 border border-success-border",
|
|
21
|
+
warning: "bg-feedback-warning-surface text-content hover:bg-warning/15 border border-warning-border",
|
|
22
|
+
info: "bg-brand-tint text-brand hover:bg-brand-tint-hover border border-stroke-accent",
|
|
23
|
+
choice: "bg-content/[0.08] text-content-tertiary border border-stroke-accent hover:bg-canvas-elevated hover:shadow-elevation-floating"
|
|
24
24
|
},
|
|
25
25
|
size: {
|
|
26
26
|
sm: "h-[22px] px-2 text-[12px] leading-[15px]",
|
|
@@ -39,36 +39,36 @@ const j = u(
|
|
|
39
39
|
shape: "pill"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
),
|
|
43
|
-
({ className:
|
|
44
|
-
const { t:
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
|
|
42
|
+
), j = f.forwardRef(
|
|
43
|
+
({ className: s, variant: t, size: r, shape: n, leftIcon: o, rightIcon: a, removable: i, onRemove: c, asChild: d = !1, children: l, ...b }, g) => {
|
|
44
|
+
const { t: m } = w();
|
|
45
|
+
return /* @__PURE__ */ p(
|
|
46
|
+
d ? v : "span",
|
|
47
47
|
{
|
|
48
48
|
ref: g,
|
|
49
|
-
className:
|
|
49
|
+
className: k(N({ variant: t, size: r, shape: n }), s),
|
|
50
50
|
"data-component": "tag",
|
|
51
|
-
"data-variant":
|
|
52
|
-
"data-size":
|
|
53
|
-
"data-shape":
|
|
54
|
-
...
|
|
51
|
+
"data-variant": t ?? "default",
|
|
52
|
+
"data-size": r ?? "md",
|
|
53
|
+
"data-shape": n ?? "pill",
|
|
54
|
+
...b,
|
|
55
55
|
children: [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
o && /* @__PURE__ */ e("span", { className: "mr-1.5 flex shrink-0 items-center justify-center", children: o }),
|
|
57
|
+
l,
|
|
58
|
+
a && /* @__PURE__ */ e("span", { className: "ml-1.5 flex shrink-0 items-center justify-center", children: a }),
|
|
59
|
+
i && /* @__PURE__ */ e(
|
|
60
|
+
y,
|
|
61
61
|
{
|
|
62
62
|
type: "button",
|
|
63
63
|
variant: "ghost",
|
|
64
64
|
size: "icon",
|
|
65
|
-
"aria-label":
|
|
66
|
-
onClick: (
|
|
67
|
-
|
|
65
|
+
"aria-label": m("aria.remove"),
|
|
66
|
+
onClick: (u) => {
|
|
67
|
+
u.stopPropagation(), c?.();
|
|
68
68
|
},
|
|
69
|
-
className: "ml-1.5 h-4 w-4 shrink-0 rounded-full hover:bg-
|
|
69
|
+
className: "ml-1.5 h-4 w-4 shrink-0 rounded-full hover:bg-content/10 transition-colors p-0 [&_svg]:size-3",
|
|
70
70
|
"data-component": "tag-remove",
|
|
71
|
-
children: /* @__PURE__ */ e(
|
|
71
|
+
children: /* @__PURE__ */ e(x, {})
|
|
72
72
|
}
|
|
73
73
|
)
|
|
74
74
|
]
|
|
@@ -76,8 +76,8 @@ const j = u(
|
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
|
-
|
|
79
|
+
j.displayName = "Tag";
|
|
80
80
|
export {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
j as Tag,
|
|
82
|
+
N as tagVariants
|
|
83
83
|
};
|