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,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
6
|
-
({ className:
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import * as d from "@radix-ui/react-progress";
|
|
4
|
+
import { cn as c } from "../../lib/utils.js";
|
|
5
|
+
const p = l.forwardRef(
|
|
6
|
+
({ className: n, value: t, variant: e = "default", label: s, time: r, ...i }, m) => {
|
|
7
|
+
const u = l.useMemo(() => {
|
|
8
8
|
if (s === !1 || s === null) return null;
|
|
9
9
|
if (s && typeof s != "boolean") return s;
|
|
10
10
|
if (e === "success") return "Completed";
|
|
11
11
|
if (e === "destructive") return "Failed";
|
|
12
|
-
const f = `${Math.round(
|
|
13
|
-
return
|
|
14
|
-
}, [s, e,
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
12
|
+
const f = `${Math.round(t || 0)}%`;
|
|
13
|
+
return r ? `${f} • ${r} seconds remaining` : f;
|
|
14
|
+
}, [s, e, t, r]);
|
|
15
|
+
return /* @__PURE__ */ a("div", { className: "w-full", "data-component": "progress", "data-variant": e, children: [
|
|
16
|
+
u && /* @__PURE__ */ o(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
19
|
"data-component": "progress-label",
|
|
20
|
-
className:
|
|
20
|
+
className: c(
|
|
21
21
|
"text-[12px] font-medium mb-1",
|
|
22
|
-
e === "default" && "text-
|
|
23
|
-
e === "success" && "text-
|
|
24
|
-
e === "destructive" && "text-
|
|
22
|
+
e === "default" && "text-content-tertiary",
|
|
23
|
+
e === "success" && "text-success",
|
|
24
|
+
e === "destructive" && "text-destructive"
|
|
25
25
|
),
|
|
26
|
-
children:
|
|
26
|
+
children: u
|
|
27
27
|
}
|
|
28
28
|
),
|
|
29
29
|
/* @__PURE__ */ o(
|
|
30
|
-
|
|
30
|
+
d.Root,
|
|
31
31
|
{
|
|
32
|
-
ref:
|
|
33
|
-
className:
|
|
32
|
+
ref: m,
|
|
33
|
+
className: c(
|
|
34
34
|
"relative h-2 w-full overflow-hidden rounded-full",
|
|
35
|
-
e === "default" && "bg-
|
|
36
|
-
e === "success" && "bg-
|
|
37
|
-
e === "destructive" && "bg-
|
|
38
|
-
|
|
35
|
+
e === "default" && "bg-brand/10",
|
|
36
|
+
e === "success" && "bg-feedback-success-surface",
|
|
37
|
+
e === "destructive" && "bg-feedback-error-surface",
|
|
38
|
+
n
|
|
39
39
|
),
|
|
40
|
-
value:
|
|
41
|
-
...
|
|
40
|
+
value: t,
|
|
41
|
+
...i,
|
|
42
42
|
children: /* @__PURE__ */ o(
|
|
43
|
-
|
|
43
|
+
d.Indicator,
|
|
44
44
|
{
|
|
45
45
|
"data-component": "progress-indicator",
|
|
46
|
-
className:
|
|
46
|
+
className: c(
|
|
47
47
|
"h-full w-full flex-1 transition-all",
|
|
48
|
-
e === "default" && "bg-
|
|
49
|
-
e === "success" && "bg-
|
|
50
|
-
e === "destructive" && "bg-
|
|
48
|
+
e === "default" && "bg-brand",
|
|
49
|
+
e === "success" && "bg-success",
|
|
50
|
+
e === "destructive" && "bg-destructive"
|
|
51
51
|
),
|
|
52
|
-
style: { transform: `translateX(-${100 - (
|
|
52
|
+
style: { transform: `translateX(-${100 - (t || 0)}%)` }
|
|
53
53
|
}
|
|
54
54
|
)
|
|
55
55
|
}
|
|
@@ -57,7 +57,7 @@ const a = n.forwardRef(
|
|
|
57
57
|
] });
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
|
-
|
|
60
|
+
p.displayName = d.Root.displayName;
|
|
61
61
|
export {
|
|
62
|
-
|
|
62
|
+
p as Progress
|
|
63
63
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import { cva as
|
|
4
|
-
import { X as
|
|
3
|
+
import { cva as R } from "class-variance-authority";
|
|
4
|
+
import { X as V } from "lucide-react";
|
|
5
5
|
import { Info3d as B, Success3d as F, Warning3d as H, Delete3d as S } from "../../icons/index.js";
|
|
6
6
|
import { cn as r } from "../../lib/utils.js";
|
|
7
7
|
import { Tooltip as W, TooltipTrigger as X, TooltipContent as q } from "./tooltip.js";
|
|
8
|
-
import { Button as
|
|
8
|
+
import { Button as f } from "./button.js";
|
|
9
9
|
import { Dialog as A, DialogContent as E, DialogHeader as G, DialogTitle as J, DialogDescription as K, DialogFooter as M } from "./dialog.js";
|
|
10
10
|
import { useImpactNovaI18n as u } from "../../i18n/ImpactNovaI18nContext.js";
|
|
11
|
-
const se =
|
|
11
|
+
const se = R("", {
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
default: "",
|
|
@@ -21,57 +21,57 @@ const se = V("", {
|
|
|
21
21
|
defaultVariants: {
|
|
22
22
|
variant: "default"
|
|
23
23
|
}
|
|
24
|
-
}), Q = p.forwardRef(({ className:
|
|
25
|
-
const { t:
|
|
26
|
-
return /* @__PURE__ */
|
|
24
|
+
}), Q = p.forwardRef(({ className: n, ...s }, i) => {
|
|
25
|
+
const { t: a } = u();
|
|
26
|
+
return /* @__PURE__ */ c(W, { children: [
|
|
27
27
|
/* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(
|
|
28
28
|
"button",
|
|
29
29
|
{
|
|
30
|
-
ref:
|
|
31
|
-
className: r("text-
|
|
30
|
+
ref: i,
|
|
31
|
+
className: r("text-content-tertiary hover:text-content transition-colors", n),
|
|
32
32
|
type: "button",
|
|
33
|
-
"aria-label":
|
|
33
|
+
"aria-label": a("aria.close"),
|
|
34
34
|
...s,
|
|
35
|
-
children: /* @__PURE__ */ e(
|
|
35
|
+
children: /* @__PURE__ */ e(V, { size: 16 })
|
|
36
36
|
}
|
|
37
37
|
) }),
|
|
38
|
-
/* @__PURE__ */ e(q, { side: "top", variant: "tertiary", children:
|
|
38
|
+
/* @__PURE__ */ e(q, { side: "top", variant: "tertiary", children: a("aria.close") })
|
|
39
39
|
] });
|
|
40
40
|
});
|
|
41
41
|
Q.displayName = "PromptClose";
|
|
42
42
|
const U = p.forwardRef(
|
|
43
43
|
({
|
|
44
|
-
open:
|
|
44
|
+
open: n,
|
|
45
45
|
onOpenChange: s,
|
|
46
|
-
title:
|
|
47
|
-
description:
|
|
46
|
+
title: i,
|
|
47
|
+
description: a,
|
|
48
48
|
confirmLabel: x,
|
|
49
49
|
cancelLabel: b,
|
|
50
|
-
onConfirm:
|
|
51
|
-
onCancel:
|
|
52
|
-
confirmVariant:
|
|
53
|
-
cancelVariant:
|
|
50
|
+
onConfirm: g,
|
|
51
|
+
onCancel: h,
|
|
52
|
+
confirmVariant: v,
|
|
53
|
+
cancelVariant: N = "secondary",
|
|
54
54
|
variant: t = "default",
|
|
55
|
-
showClose:
|
|
55
|
+
showClose: w = !0,
|
|
56
56
|
preventOutsideClick: y = !1,
|
|
57
|
-
footer:
|
|
57
|
+
footer: l,
|
|
58
58
|
children: d,
|
|
59
59
|
className: C,
|
|
60
60
|
...D
|
|
61
61
|
}, j) => {
|
|
62
|
-
const { t:
|
|
63
|
-
h?.(), s?.(!1);
|
|
64
|
-
}, I = () => {
|
|
62
|
+
const { t: m } = u(), z = b ?? m("prompt.cancel"), P = x ?? m("prompt.confirm"), T = () => {
|
|
65
63
|
g?.(), s?.(!1);
|
|
66
|
-
},
|
|
67
|
-
|
|
64
|
+
}, k = () => {
|
|
65
|
+
h?.(), s?.(!1);
|
|
66
|
+
}, o = t !== "default", I = v || (t === "destructive" ? "destructive" : "default");
|
|
67
|
+
return /* @__PURE__ */ e(A, { open: n, onOpenChange: s, ...D, children: /* @__PURE__ */ c(
|
|
68
68
|
E,
|
|
69
69
|
{
|
|
70
70
|
ref: j,
|
|
71
71
|
"aria-describedby": void 0,
|
|
72
|
-
hideClose: !
|
|
73
|
-
onPointerDownOutside: (
|
|
74
|
-
y &&
|
|
72
|
+
hideClose: !w,
|
|
73
|
+
onPointerDownOutside: (L) => {
|
|
74
|
+
y && L.preventDefault();
|
|
75
75
|
},
|
|
76
76
|
className: r(
|
|
77
77
|
"max-w-[400px] gap-0",
|
|
@@ -81,15 +81,15 @@ const U = p.forwardRef(
|
|
|
81
81
|
"data-component": "prompt",
|
|
82
82
|
"data-variant": t,
|
|
83
83
|
children: [
|
|
84
|
-
o && /* @__PURE__ */
|
|
84
|
+
o && /* @__PURE__ */ c(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
className: r(
|
|
88
88
|
"flex h-12 w-12 items-center justify-center rounded-xl",
|
|
89
|
-
t === "info" && "bg-
|
|
90
|
-
t === "success" && "bg-
|
|
91
|
-
t === "warning" && "bg-
|
|
92
|
-
t === "destructive" && "bg-
|
|
89
|
+
t === "info" && "bg-brand-tint text-brand",
|
|
90
|
+
t === "success" && "bg-feedback-success-surface text-success",
|
|
91
|
+
t === "warning" && "bg-feedback-warning-surface text-content",
|
|
92
|
+
t === "destructive" && "bg-prompt-error-bg text-destructive"
|
|
93
93
|
),
|
|
94
94
|
children: [
|
|
95
95
|
t === "info" && /* @__PURE__ */ e(B, { size: 24 }),
|
|
@@ -99,32 +99,32 @@ const U = p.forwardRef(
|
|
|
99
99
|
]
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ c(
|
|
103
103
|
G,
|
|
104
104
|
{
|
|
105
|
-
className: r(o && "space-y-2 items-center bg-
|
|
105
|
+
className: r(o && "space-y-2 items-center bg-canvas-elevated border-none"),
|
|
106
106
|
children: [
|
|
107
107
|
/* @__PURE__ */ e(
|
|
108
108
|
J,
|
|
109
109
|
{
|
|
110
110
|
className: r(
|
|
111
|
-
o && "text-[18px] font-extrabold text-
|
|
111
|
+
o && "text-[18px] font-extrabold text-content"
|
|
112
112
|
),
|
|
113
|
-
children:
|
|
113
|
+
children: i
|
|
114
114
|
}
|
|
115
115
|
),
|
|
116
|
-
|
|
116
|
+
a && /* @__PURE__ */ e(
|
|
117
117
|
K,
|
|
118
118
|
{
|
|
119
|
-
className: r(o && "text-sm text-
|
|
120
|
-
children:
|
|
119
|
+
className: r(o && "text-sm text-content-tertiary"),
|
|
120
|
+
children: a
|
|
121
121
|
}
|
|
122
122
|
)
|
|
123
123
|
]
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
d && /* @__PURE__ */ e("div", { className: r("w-full py-2", o && "text-center"), children: d }),
|
|
127
|
-
|
|
127
|
+
l ? /* @__PURE__ */ e("div", { className: "w-full", children: l }) : /* @__PURE__ */ c(
|
|
128
128
|
M,
|
|
129
129
|
{
|
|
130
130
|
className: r(
|
|
@@ -132,18 +132,18 @@ const U = p.forwardRef(
|
|
|
132
132
|
),
|
|
133
133
|
children: [
|
|
134
134
|
/* @__PURE__ */ e(
|
|
135
|
-
|
|
135
|
+
f,
|
|
136
136
|
{
|
|
137
|
-
variant:
|
|
138
|
-
onClick:
|
|
137
|
+
variant: N,
|
|
138
|
+
onClick: k,
|
|
139
139
|
className: r(o && "h-10 px-6"),
|
|
140
140
|
children: z
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
143
|
/* @__PURE__ */ e(
|
|
144
|
-
|
|
144
|
+
f,
|
|
145
145
|
{
|
|
146
|
-
variant:
|
|
146
|
+
variant: I,
|
|
147
147
|
onClick: T,
|
|
148
148
|
className: r(o && "h-10 px-6"),
|
|
149
149
|
children: P
|
|
@@ -1,77 +1,86 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
3
|
+
import * as r from "@radix-ui/react-radio-group";
|
|
4
|
+
import { cn as a } from "../../lib/utils.js";
|
|
5
5
|
import { Info as p } from "../../icons/index.js";
|
|
6
|
-
const
|
|
6
|
+
const f = n.forwardRef(({ className: i, orientation: s = "horizontal", label: d, helperText: c, isError: t, required: u, ...l }, m) => /* @__PURE__ */ o(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
|
-
className:
|
|
9
|
+
className: a("flex w-full flex-col gap-[6px]", i),
|
|
10
10
|
"data-component": "radio-group",
|
|
11
|
-
"data-invalid":
|
|
11
|
+
"data-invalid": t || void 0,
|
|
12
12
|
children: [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
/* @__PURE__ */ e(
|
|
30
|
-
a.Root,
|
|
31
|
-
{
|
|
32
|
-
className: t(
|
|
33
|
-
"flex gap-4 group",
|
|
34
|
-
i === "vertical" && "flex-col gap-2"
|
|
35
|
-
),
|
|
36
|
-
"data-error": r,
|
|
37
|
-
...l,
|
|
38
|
-
ref: u
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
c && /* @__PURE__ */ s("div", { className: t("flex items-center gap-1", r && "text-destructive"), children: [
|
|
42
|
-
!r && /* @__PURE__ */ e(p, { size: 10, className: "shrink-0 text-muted-foreground" }),
|
|
13
|
+
/* @__PURE__ */ o("div", { className: "flex flex-col gap-[6px]", children: [
|
|
14
|
+
d && /* @__PURE__ */ o(
|
|
15
|
+
"label",
|
|
16
|
+
{
|
|
17
|
+
className: a(
|
|
18
|
+
"text-xs font-medium leading-[18px] text-content-tertiary",
|
|
19
|
+
l.disabled && "opacity-70",
|
|
20
|
+
t && "text-destructive"
|
|
21
|
+
),
|
|
22
|
+
children: [
|
|
23
|
+
d,
|
|
24
|
+
" ",
|
|
25
|
+
u && /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
),
|
|
43
29
|
/* @__PURE__ */ e(
|
|
44
|
-
|
|
30
|
+
r.Root,
|
|
45
31
|
{
|
|
46
|
-
className:
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
r && "text-destructive"
|
|
32
|
+
className: a(
|
|
33
|
+
"group flex gap-4",
|
|
34
|
+
s === "vertical" && "flex-col gap-2"
|
|
50
35
|
),
|
|
51
|
-
|
|
36
|
+
"data-error": t,
|
|
37
|
+
...l,
|
|
38
|
+
ref: m
|
|
52
39
|
}
|
|
53
40
|
)
|
|
54
|
-
] })
|
|
41
|
+
] }),
|
|
42
|
+
c && /* @__PURE__ */ o(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: a(
|
|
46
|
+
"flex items-center gap-[6px]",
|
|
47
|
+
t && "text-destructive"
|
|
48
|
+
),
|
|
49
|
+
children: [
|
|
50
|
+
!t && /* @__PURE__ */ e(p, { size: "xs", className: "shrink-0 text-content-muted" }),
|
|
51
|
+
/* @__PURE__ */ e(
|
|
52
|
+
"p",
|
|
53
|
+
{
|
|
54
|
+
className: a(
|
|
55
|
+
"text-[10px] leading-4 text-navigation-muted",
|
|
56
|
+
t && "text-destructive"
|
|
57
|
+
),
|
|
58
|
+
children: c
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
)
|
|
55
64
|
]
|
|
56
65
|
}
|
|
57
66
|
));
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
67
|
+
f.displayName = r.Root.displayName;
|
|
68
|
+
const x = n.forwardRef(({ className: i, ...s }, d) => /* @__PURE__ */ e(
|
|
69
|
+
r.Item,
|
|
61
70
|
{
|
|
62
71
|
ref: d,
|
|
63
|
-
className:
|
|
64
|
-
"aspect-square h-4 w-4 rounded-full border border-
|
|
72
|
+
className: a(
|
|
73
|
+
"aspect-square h-4 w-4 rounded-full border border-stroke-field bg-canvas-elevated text-brand shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:border-stroke data-[state=checked]:border-brand hover:border-brand",
|
|
65
74
|
"group-data-[error=true]:border-destructive group-data-[error=true]:data-[state=checked]:border-destructive group-data-[error=true]:text-destructive",
|
|
66
|
-
|
|
75
|
+
i
|
|
67
76
|
),
|
|
68
77
|
"data-component": "radio-group-item",
|
|
69
|
-
...
|
|
70
|
-
children: /* @__PURE__ */ e(
|
|
78
|
+
...s,
|
|
79
|
+
children: /* @__PURE__ */ e(r.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 rounded-full bg-current peer-disabled:bg-canvas-accordion" }) })
|
|
71
80
|
}
|
|
72
81
|
));
|
|
73
|
-
|
|
82
|
+
x.displayName = r.Item.displayName;
|
|
74
83
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
f as RadioGroup,
|
|
85
|
+
x as RadioGroupItem
|
|
77
86
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, Fragment as r, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { Badge as a } from "../../badge.js";
|
|
3
3
|
import "react";
|
|
4
|
-
const
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
|
|
4
|
+
const l = ({ label: i, sequence: t }) => typeof i != "string" ? /* @__PURE__ */ e(r, { children: i }) : /* @__PURE__ */ n("div", { className: "flex items-center justify-between w-full min-w-0 gap-2", children: [
|
|
5
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-content-tertiary truncate flex-1 min-w-0", children: i }),
|
|
6
|
+
t !== void 0 && t > 0 && /* @__PURE__ */ e("div", { className: "flex-shrink-0 leading-none flex items-center", "data-testid": `select-option-sequence-${t}`, children: /* @__PURE__ */ e(
|
|
7
7
|
a,
|
|
8
8
|
{
|
|
9
9
|
variant: "outline",
|
|
10
10
|
color: "primary",
|
|
11
11
|
className: "text-xs px-[8px] py-0.2",
|
|
12
|
-
children:
|
|
12
|
+
children: t.toString()
|
|
13
13
|
}
|
|
14
14
|
) })
|
|
15
15
|
] });
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
l as default
|
|
18
18
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { ChevronRight as
|
|
5
|
-
import { cn as
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "@radix-ui/react-popover";
|
|
3
|
+
import { Checkbox as C } from "../../checkbox.js";
|
|
4
|
+
import { ChevronRight as N, Checkmark as w } from "../../../../icons/index.js";
|
|
5
|
+
import { cn as S } from "../../../../lib/utils.js";
|
|
6
6
|
const D = ({
|
|
7
7
|
parentOption: o,
|
|
8
|
-
isMulti:
|
|
9
|
-
isReadOnly:
|
|
10
|
-
isSelected:
|
|
8
|
+
isMulti: i,
|
|
9
|
+
isReadOnly: c,
|
|
10
|
+
isSelected: x,
|
|
11
11
|
getIndeterminateState: f,
|
|
12
12
|
getSelectedCount: h,
|
|
13
|
-
handleSelect:
|
|
14
|
-
id:
|
|
13
|
+
handleSelect: v,
|
|
14
|
+
id: y
|
|
15
15
|
}) => {
|
|
16
16
|
const d = "children" in o && Array.isArray(o.children) ? o.children : null;
|
|
17
17
|
if (!d) return null;
|
|
18
18
|
const u = String(o.value || "");
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */ t(
|
|
21
|
-
/* @__PURE__ */ t(
|
|
22
|
-
|
|
19
|
+
return /* @__PURE__ */ r(l.Root, { open: !0, children: [
|
|
20
|
+
/* @__PURE__ */ t(l.Anchor, { className: "absolute inset-0 pointer-events-none" }),
|
|
21
|
+
/* @__PURE__ */ t(l.Portal, { children: /* @__PURE__ */ t(
|
|
22
|
+
l.Content,
|
|
23
23
|
{
|
|
24
24
|
side: "right",
|
|
25
25
|
sideOffset: 8,
|
|
@@ -27,32 +27,32 @@ const D = ({
|
|
|
27
27
|
avoidCollisions: !0,
|
|
28
28
|
collisionPadding: 8,
|
|
29
29
|
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
30
|
-
className: "select-submenu-container z-50
|
|
30
|
+
className: "select-submenu-container z-50 min-w-[180px] max-h-[300px] overflow-auto rounded-xl bg-canvas-elevated py-1 shadow-elevation-floating",
|
|
31
31
|
"data-component": "select-menu",
|
|
32
32
|
children: d.map((e) => {
|
|
33
|
-
const n =
|
|
34
|
-
return /* @__PURE__ */
|
|
33
|
+
const n = x(e), g = f(e), a = e.isDisabled, m = h(e), s = "children" in e && Array.isArray(e.children) && e.children.length > 0, p = e.isParentSelectable !== !1, b = String(e.value || "");
|
|
34
|
+
return /* @__PURE__ */ r(
|
|
35
35
|
"div",
|
|
36
36
|
{
|
|
37
|
-
className:
|
|
38
|
-
"relative cursor-default select-none
|
|
39
|
-
a ? "
|
|
40
|
-
n && !a && !
|
|
37
|
+
className: S(
|
|
38
|
+
"relative flex h-[35px] cursor-default select-none items-center justify-between gap-1.5 rounded-[8px] px-3",
|
|
39
|
+
a ? "cursor-not-allowed bg-canvas-readonly opacity-50" : c ? "cursor-default" : "cursor-pointer hover:bg-canvas-muted",
|
|
40
|
+
n && !a && !s ? "bg-brand-subtle text-content" : "text-content"
|
|
41
41
|
),
|
|
42
42
|
onClick: (k) => {
|
|
43
|
-
k.stopPropagation(), !a && !
|
|
43
|
+
k.stopPropagation(), !a && !c && p && v(e);
|
|
44
44
|
},
|
|
45
|
-
"data-testid": `select-submenu-option-${u}-${
|
|
45
|
+
"data-testid": `select-submenu-option-${u}-${b}`,
|
|
46
46
|
"data-state": n ? "checked" : "unchecked",
|
|
47
47
|
"data-disabled": a || void 0,
|
|
48
48
|
"data-component": "select-option",
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
51
|
+
i && p && /* @__PURE__ */ t(
|
|
52
|
+
C,
|
|
53
53
|
{
|
|
54
|
-
checked:
|
|
55
|
-
disabled: a ||
|
|
54
|
+
checked: g ? "indeterminate" : n,
|
|
55
|
+
disabled: a || c,
|
|
56
56
|
onChange: () => {
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -60,21 +60,21 @@ const D = ({
|
|
|
60
60
|
/* @__PURE__ */ t(
|
|
61
61
|
"span",
|
|
62
62
|
{
|
|
63
|
-
className: "block truncate",
|
|
64
|
-
"data-testid": `select-submenu-option-label-${u}-${
|
|
63
|
+
className: "block truncate text-[14px] font-medium leading-5",
|
|
64
|
+
"data-testid": `select-submenu-option-label-${u}-${b}`,
|
|
65
65
|
"data-state": n ? "checked" : "unchecked",
|
|
66
66
|
title: String(e.label || ""),
|
|
67
67
|
children: e.label
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
|
|
70
|
+
s && m > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-content-muted font-medium", children: [
|
|
71
71
|
"(",
|
|
72
72
|
m,
|
|
73
73
|
")"
|
|
74
74
|
] })
|
|
75
75
|
] }),
|
|
76
|
-
|
|
77
|
-
!
|
|
76
|
+
s && /* @__PURE__ */ t(N, { size: "sm", className: "text-content-icon" }),
|
|
77
|
+
!i && n && !s && /* @__PURE__ */ t(w, { className: "h-4 w-4 text-brand" })
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
80
|
e.value
|