impact-nova 1.6.4 → 1.6.6
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.js +34 -33
- package/dist/components/ui/ag-grid-react/index.js +151 -122
- package/dist/components/ui/alert-dialog.js +37 -34
- package/dist/components/ui/calendar.js +148 -133
- package/dist/components/ui/checkbox.js +44 -41
- package/dist/components/ui/date-picker/month-range-picker.js +63 -63
- package/dist/components/ui/date-picker/multi-month-picker.js +46 -43
- package/dist/components/ui/date-picker/multi-week-picker.js +22 -20
- package/dist/components/ui/dialog.js +56 -53
- package/dist/components/ui/filter-strip/filter-strip.js +9 -9
- package/dist/components/ui/filter-strip/filter-summary.js +3 -3
- package/dist/components/ui/input.js +12 -11
- package/dist/components/ui/sheet.js +48 -45
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/tabs.js +15 -13
- package/dist/icons/assets/layers.svg.js +7 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +214 -212
- package/dist/impact-nova.css +1 -1
- package/package.json +1 -1
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import * as
|
|
4
|
-
import { X as
|
|
3
|
+
import * as a from "@radix-ui/react-dialog";
|
|
4
|
+
import { X as y } from "lucide-react";
|
|
5
5
|
import { cn as i } from "../../lib/utils.js";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
const
|
|
9
|
-
|
|
6
|
+
import { Tooltip as u, TooltipTrigger as x, TooltipContent as N } from "./tooltip.js";
|
|
7
|
+
import { useImpactNovaI18n as v } from "../../i18n/ImpactNovaI18nContext.js";
|
|
8
|
+
const B = a.Root, H = a.Trigger, D = a.Portal, I = a.Close, c = n.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
|
|
9
|
+
a.Overlay,
|
|
10
10
|
{
|
|
11
11
|
ref: s,
|
|
12
12
|
className: i(
|
|
13
13
|
"fixed inset-0 z-50 bg-scrim data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
14
14
|
e
|
|
15
15
|
),
|
|
16
|
-
...
|
|
16
|
+
...t
|
|
17
17
|
}
|
|
18
18
|
));
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
const { t:
|
|
22
|
-
return /* @__PURE__ */ l(
|
|
23
|
-
/* @__PURE__ */ o(
|
|
19
|
+
c.displayName = a.Overlay.displayName;
|
|
20
|
+
const b = n.forwardRef(({ className: e, children: t, hideClose: s, onOpenAutoFocus: m, ...p }, f) => {
|
|
21
|
+
const { t: g } = v(), d = g("aria.close");
|
|
22
|
+
return /* @__PURE__ */ l(D, { children: [
|
|
23
|
+
/* @__PURE__ */ o(c, {}),
|
|
24
24
|
/* @__PURE__ */ l(
|
|
25
|
-
|
|
25
|
+
a.Content,
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
27
|
+
ref: f,
|
|
28
28
|
"aria-describedby": void 0,
|
|
29
29
|
"data-component": "dialog-content",
|
|
30
|
+
onOpenAutoFocus: (r) => {
|
|
31
|
+
r.preventDefault(), m?.(r);
|
|
32
|
+
},
|
|
30
33
|
className: i(
|
|
31
34
|
"fixed left-[50%] top-[50%] z-50 flex flex-col w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-canvas shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg overflow-hidden",
|
|
32
35
|
e
|
|
33
36
|
),
|
|
34
|
-
...
|
|
37
|
+
...p,
|
|
35
38
|
children: [
|
|
36
|
-
|
|
37
|
-
!s && /* @__PURE__ */ l(
|
|
38
|
-
/* @__PURE__ */ o(
|
|
39
|
-
|
|
39
|
+
t,
|
|
40
|
+
!s && /* @__PURE__ */ l(u, { children: [
|
|
41
|
+
/* @__PURE__ */ o(x, { asChild: !0, children: /* @__PURE__ */ l(
|
|
42
|
+
a.Close,
|
|
40
43
|
{
|
|
41
44
|
"data-component": "dialog-close",
|
|
42
45
|
className: "absolute right-4 top-4 rounded-sm opacity-50 ring-offset-canvas transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-content-muted",
|
|
43
46
|
"aria-label": d,
|
|
44
47
|
children: [
|
|
45
|
-
/* @__PURE__ */ o(
|
|
48
|
+
/* @__PURE__ */ o(y, { className: "h-4 w-4" }),
|
|
46
49
|
/* @__PURE__ */ o("span", { className: "sr-only", children: d })
|
|
47
50
|
]
|
|
48
51
|
}
|
|
49
52
|
) }),
|
|
50
|
-
/* @__PURE__ */ o(
|
|
53
|
+
/* @__PURE__ */ o(N, { variant: "tertiary", side: "top", children: d })
|
|
51
54
|
] })
|
|
52
55
|
]
|
|
53
56
|
}
|
|
54
57
|
)
|
|
55
58
|
] });
|
|
56
59
|
});
|
|
57
|
-
|
|
58
|
-
const
|
|
60
|
+
b.displayName = a.Content.displayName;
|
|
61
|
+
const h = ({
|
|
59
62
|
className: e,
|
|
60
|
-
...
|
|
63
|
+
...t
|
|
61
64
|
}) => /* @__PURE__ */ o(
|
|
62
65
|
"div",
|
|
63
66
|
{
|
|
@@ -65,24 +68,24 @@ const D = ({
|
|
|
65
68
|
"flex flex-col text-center sm:text-left bg-canvas-tint p-4 border-b",
|
|
66
69
|
e
|
|
67
70
|
),
|
|
68
|
-
...
|
|
71
|
+
...t
|
|
69
72
|
}
|
|
70
73
|
);
|
|
71
|
-
|
|
72
|
-
const
|
|
74
|
+
h.displayName = "DialogHeader";
|
|
75
|
+
const w = ({
|
|
73
76
|
className: e,
|
|
74
|
-
...
|
|
77
|
+
...t
|
|
75
78
|
}) => /* @__PURE__ */ o(
|
|
76
79
|
"div",
|
|
77
80
|
{
|
|
78
81
|
className: i("px-6 py-6 flex-1 overflow-y-auto min-h-0", e),
|
|
79
|
-
...
|
|
82
|
+
...t
|
|
80
83
|
}
|
|
81
84
|
);
|
|
82
|
-
|
|
83
|
-
const
|
|
85
|
+
w.displayName = "DialogBody";
|
|
86
|
+
const T = ({
|
|
84
87
|
className: e,
|
|
85
|
-
...
|
|
88
|
+
...t
|
|
86
89
|
}) => /* @__PURE__ */ o(
|
|
87
90
|
"div",
|
|
88
91
|
{
|
|
@@ -90,12 +93,12 @@ const h = ({
|
|
|
90
93
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:items-center sm:space-x-2 px-4 py-3 bg-canvas-elevated",
|
|
91
94
|
e
|
|
92
95
|
),
|
|
93
|
-
...
|
|
96
|
+
...t
|
|
94
97
|
}
|
|
95
98
|
);
|
|
96
|
-
|
|
97
|
-
const
|
|
98
|
-
|
|
99
|
+
T.displayName = "DialogFooter";
|
|
100
|
+
const C = n.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
|
|
101
|
+
a.Title,
|
|
99
102
|
{
|
|
100
103
|
ref: s,
|
|
101
104
|
"data-component": "dialog-title",
|
|
@@ -103,29 +106,29 @@ const w = n.forwardRef(({ className: e, ...a }, s) => /* @__PURE__ */ o(
|
|
|
103
106
|
"text-md font-bold leading-none tracking-tight text-content",
|
|
104
107
|
e
|
|
105
108
|
),
|
|
106
|
-
...
|
|
109
|
+
...t
|
|
107
110
|
}
|
|
108
111
|
));
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
+
C.displayName = a.Title.displayName;
|
|
113
|
+
const R = n.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ o(
|
|
114
|
+
a.Description,
|
|
112
115
|
{
|
|
113
116
|
ref: s,
|
|
114
117
|
className: i("text-sm text-content-secondary leading-relaxed", e),
|
|
115
|
-
...
|
|
118
|
+
...t
|
|
116
119
|
}
|
|
117
120
|
));
|
|
118
|
-
|
|
121
|
+
R.displayName = a.Description.displayName;
|
|
119
122
|
export {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
B as Dialog,
|
|
124
|
+
w as DialogBody,
|
|
125
|
+
I as DialogClose,
|
|
126
|
+
b as DialogContent,
|
|
127
|
+
R as DialogDescription,
|
|
128
|
+
T as DialogFooter,
|
|
129
|
+
h as DialogHeader,
|
|
130
|
+
c as DialogOverlay,
|
|
131
|
+
D as DialogPortal,
|
|
132
|
+
C as DialogTitle,
|
|
133
|
+
H as DialogTrigger
|
|
131
134
|
};
|
|
@@ -17,10 +17,10 @@ const E = ({
|
|
|
17
17
|
onSavedFiltersScroll: f,
|
|
18
18
|
onViewAll: d,
|
|
19
19
|
onOverflowClick: x,
|
|
20
|
-
selectedFilter:
|
|
21
|
-
onSelectedFilterChange:
|
|
22
|
-
onDropdownOpenChange:
|
|
23
|
-
isLoadingFilterPreferencesList:
|
|
20
|
+
selectedFilter: w,
|
|
21
|
+
onSelectedFilterChange: N,
|
|
22
|
+
onDropdownOpenChange: v,
|
|
23
|
+
isLoadingFilterPreferencesList: g,
|
|
24
24
|
isLoading: k,
|
|
25
25
|
onEditSavedFilter: b,
|
|
26
26
|
onDeleteSavedFilter: u,
|
|
@@ -66,22 +66,22 @@ const E = ({
|
|
|
66
66
|
{
|
|
67
67
|
"data-component": "filter-strip",
|
|
68
68
|
className: l(
|
|
69
|
-
"flex w-full h-12 items-center gap-3 bg-canvas-elevated px-6 py-2",
|
|
69
|
+
"flex w-full h-12 items-center gap-3 bg-canvas-elevated px-6 py-2 overflow-visible",
|
|
70
70
|
a
|
|
71
71
|
),
|
|
72
72
|
children: [
|
|
73
73
|
/* @__PURE__ */ e(
|
|
74
74
|
I,
|
|
75
75
|
{
|
|
76
|
-
selectedFilter:
|
|
77
|
-
onSelectedFilterChange:
|
|
76
|
+
selectedFilter: w,
|
|
77
|
+
onSelectedFilterChange: N,
|
|
78
78
|
savedFilters: o,
|
|
79
79
|
recentFilters: p,
|
|
80
80
|
onApplySavedFilter: c,
|
|
81
81
|
onSavedFilterSearch: h,
|
|
82
82
|
onSavedFiltersScroll: f,
|
|
83
|
-
onDropdownOpenChange:
|
|
84
|
-
isLoadingFilterPreferencesList:
|
|
83
|
+
onDropdownOpenChange: v,
|
|
84
|
+
isLoadingFilterPreferencesList: g,
|
|
85
85
|
onEditSavedFilter: b,
|
|
86
86
|
onDeleteSavedFilter: u,
|
|
87
87
|
onSetDefaultSavedFilter: S
|
|
@@ -106,7 +106,7 @@ const he = ({
|
|
|
106
106
|
return /* @__PURE__ */ e(
|
|
107
107
|
"div",
|
|
108
108
|
{
|
|
109
|
-
className: "flex max-h-[160px] flex-col overflow-y-auto",
|
|
109
|
+
className: "flex max-h-[160px] flex-col gap-1 overflow-y-auto px-1",
|
|
110
110
|
onScroll: P,
|
|
111
111
|
children: a.map((t) => {
|
|
112
112
|
const o = i?.label === t.label;
|
|
@@ -115,7 +115,7 @@ const he = ({
|
|
|
115
115
|
{
|
|
116
116
|
type: "button",
|
|
117
117
|
className: b(
|
|
118
|
-
"
|
|
118
|
+
"flex justify-between cursor-pointer rounded-lg px-3 py-2 text-sm font-medium font-['Manrope'] hover:bg-[#f5f6fa] w-full text-left bg-transparent border-none",
|
|
119
119
|
o ? "bg-[#edf0ff]" : "text-[#1f2b4d]"
|
|
120
120
|
),
|
|
121
121
|
onClick: () => x({ label: t.label, savedItem: t }),
|
|
@@ -171,7 +171,7 @@ const he = ({
|
|
|
171
171
|
H,
|
|
172
172
|
{
|
|
173
173
|
align: "start",
|
|
174
|
-
className: "w-[280px] p-0 shadow-[0_0_4px_0_rgba(0,0,0,0.12)]",
|
|
174
|
+
className: "w-[280px] p-0 shadow-[0_0_4px_0_rgba(0,0,0,0.12)] overflow-visible",
|
|
175
175
|
sideOffset: 8,
|
|
176
176
|
children: /* @__PURE__ */ l("div", { className: "flex w-full flex-col py-[8px] px-[6px]", children: [
|
|
177
177
|
Q(),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import * as b from "react";
|
|
3
3
|
import { Info as h } from "../../icons/index.js";
|
|
4
4
|
import { cva as v } from "class-variance-authority";
|
|
5
5
|
import { cn as e } from "../../lib/utils.js";
|
|
6
6
|
const g = v(
|
|
7
|
-
"flex w-full items-center gap-1 rounded-md border bg-transparent px-3 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-content-muted focus-within:outline-none hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
|
|
7
|
+
"flex w-full items-center gap-1 rounded-md border bg-transparent px-3 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-content-muted focus-within:outline-none focus-within:border-brand hover:border-brand disabled:cursor-not-allowed disabled:bg-disabled-surface disabled:text-disabled-foreground disabled:border-stroke",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
isError: {
|
|
@@ -28,7 +28,7 @@ const g = v(
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
), N = b.forwardRef(
|
|
31
|
-
({ className:
|
|
31
|
+
({ className: m, type: f, label: d, helperText: o, isError: t, size: p, disabled: r, prefix: s, suffix: i, prefixClick: l, suffixClick: c, ...u }, x) => /* @__PURE__ */ n(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
34
|
className: "flex w-full flex-col gap-[6px]",
|
|
@@ -36,8 +36,8 @@ const g = v(
|
|
|
36
36
|
"data-disabled": r || void 0,
|
|
37
37
|
"data-invalid": t || void 0,
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
39
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col gap-[6px]", children: [
|
|
40
|
+
d && /* @__PURE__ */ n(
|
|
41
41
|
"label",
|
|
42
42
|
{
|
|
43
43
|
className: e(
|
|
@@ -46,17 +46,18 @@ const g = v(
|
|
|
46
46
|
t && "text-destructive"
|
|
47
47
|
),
|
|
48
48
|
children: [
|
|
49
|
-
|
|
49
|
+
d,
|
|
50
50
|
" ",
|
|
51
|
-
|
|
51
|
+
u.required && /* @__PURE__ */ a("span", { className: "text-destructive", children: "*" })
|
|
52
52
|
]
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ n(
|
|
56
56
|
"div",
|
|
57
57
|
{
|
|
58
|
+
"data-component": "input-border",
|
|
58
59
|
className: e(
|
|
59
|
-
g({ size: p, isError: t, disabled: r, className:
|
|
60
|
+
g({ size: p, isError: t, disabled: r, className: m }),
|
|
60
61
|
"bg-canvas",
|
|
61
62
|
r && "bg-disabled-surface"
|
|
62
63
|
),
|
|
@@ -80,7 +81,7 @@ const g = v(
|
|
|
80
81
|
ref: x,
|
|
81
82
|
disabled: !!r,
|
|
82
83
|
"data-form-control": "input",
|
|
83
|
-
...
|
|
84
|
+
...u
|
|
84
85
|
}
|
|
85
86
|
),
|
|
86
87
|
i && /* @__PURE__ */ a(
|
|
@@ -95,7 +96,7 @@ const g = v(
|
|
|
95
96
|
}
|
|
96
97
|
)
|
|
97
98
|
] }),
|
|
98
|
-
o && /* @__PURE__ */
|
|
99
|
+
o && /* @__PURE__ */ n(
|
|
99
100
|
"div",
|
|
100
101
|
{
|
|
101
102
|
className: e(
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import * as n from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-dialog";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { ChevronDown as
|
|
4
|
+
import { cva as S } from "class-variance-authority";
|
|
5
|
+
import { ChevronDown as w, ChevronUp as C, X as T } from "lucide-react";
|
|
6
6
|
import { cn as r } from "../../lib/utils.js";
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { useImpactNovaI18n as
|
|
9
|
-
const
|
|
7
|
+
import { Tooltip as x, TooltipTrigger as b, TooltipContent as y } from "./tooltip.js";
|
|
8
|
+
import { useImpactNovaI18n as k } from "../../i18n/ImpactNovaI18nContext.js";
|
|
9
|
+
const N = n.createContext({
|
|
10
10
|
isExpanded: !1,
|
|
11
11
|
expandable: !1,
|
|
12
12
|
side: "right"
|
|
13
|
-
}), X = o.Root, q = o.Trigger,
|
|
13
|
+
}), X = o.Root, q = o.Trigger, D = o.Close, E = o.Portal, v = n.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e(
|
|
14
14
|
o.Overlay,
|
|
15
15
|
{
|
|
16
16
|
className: r(
|
|
@@ -21,8 +21,8 @@ const y = n.createContext({
|
|
|
21
21
|
ref: s
|
|
22
22
|
}
|
|
23
23
|
));
|
|
24
|
-
|
|
25
|
-
const R =
|
|
24
|
+
v.displayName = o.Overlay.displayName;
|
|
25
|
+
const R = S(
|
|
26
26
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
27
27
|
{
|
|
28
28
|
variants: {
|
|
@@ -37,79 +37,82 @@ const R = v(
|
|
|
37
37
|
side: "right"
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
),
|
|
41
|
-
const [
|
|
42
|
-
|
|
40
|
+
), L = n.forwardRef(({ side: t = "right", className: a, children: s, expandable: c = !1, defaultExpanded: l = !1, onOpenAutoFocus: f, ...u }, g) => {
|
|
41
|
+
const [d, p] = n.useState(l), m = n.useCallback(() => {
|
|
42
|
+
p((h) => !h);
|
|
43
43
|
}, []);
|
|
44
|
-
return /* @__PURE__ */ e(
|
|
45
|
-
/* @__PURE__ */ e(
|
|
44
|
+
return /* @__PURE__ */ e(N.Provider, { value: { isExpanded: d, onExpandToggle: m, expandable: c, side: t || void 0 }, children: /* @__PURE__ */ i(E, { children: [
|
|
45
|
+
/* @__PURE__ */ e(v, {}),
|
|
46
46
|
/* @__PURE__ */ e(
|
|
47
47
|
o.Content,
|
|
48
48
|
{
|
|
49
|
-
ref:
|
|
49
|
+
ref: g,
|
|
50
50
|
"data-component": "sheet-content",
|
|
51
|
+
onOpenAutoFocus: (h) => {
|
|
52
|
+
h.preventDefault(), f?.(h);
|
|
53
|
+
},
|
|
51
54
|
className: r(
|
|
52
55
|
R({ side: t }),
|
|
53
56
|
"flex flex-col p-0 transition-all duration-300",
|
|
54
|
-
t === "bottom" && (
|
|
57
|
+
t === "bottom" && (d ? "h-[96vh]" : "h-[40vh]"),
|
|
55
58
|
a
|
|
56
59
|
),
|
|
57
|
-
...
|
|
60
|
+
...u,
|
|
58
61
|
children: s
|
|
59
62
|
}
|
|
60
63
|
)
|
|
61
64
|
] }) });
|
|
62
65
|
});
|
|
63
|
-
|
|
64
|
-
const
|
|
66
|
+
L.displayName = o.Content.displayName;
|
|
67
|
+
const j = ({
|
|
65
68
|
className: t,
|
|
66
69
|
children: a,
|
|
67
70
|
...s
|
|
68
71
|
}) => {
|
|
69
|
-
const { t:
|
|
72
|
+
const { t: c } = k(), { isExpanded: l, onExpandToggle: f, expandable: u, side: g } = n.useContext(N), d = c("aria.close"), p = c("nestedList.expand"), m = c("nestedList.collapse");
|
|
70
73
|
return /* @__PURE__ */ i(
|
|
71
74
|
"div",
|
|
72
75
|
{
|
|
73
76
|
className: r(
|
|
74
77
|
"flex px-4 py-4 shrink-0 items-center justify-between bg-light-blue border-b",
|
|
75
|
-
|
|
78
|
+
g === "bottom" && "rounded-t-lg",
|
|
76
79
|
t
|
|
77
80
|
),
|
|
78
81
|
...s,
|
|
79
82
|
children: [
|
|
80
83
|
/* @__PURE__ */ e("div", { className: "flex flex-col space-y-1 text-center sm:text-left", children: a }),
|
|
81
84
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
82
|
-
u && /* @__PURE__ */ i(
|
|
83
|
-
/* @__PURE__ */ e(
|
|
85
|
+
u && /* @__PURE__ */ i(x, { children: [
|
|
86
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ i(
|
|
84
87
|
"button",
|
|
85
88
|
{
|
|
86
89
|
type: "button",
|
|
87
90
|
"data-component": "sheet-expand-toggle",
|
|
88
91
|
onClick: f,
|
|
89
92
|
className: "rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none",
|
|
90
|
-
"aria-label": l ?
|
|
93
|
+
"aria-label": l ? m : p,
|
|
91
94
|
children: [
|
|
92
|
-
l ? /* @__PURE__ */ e(
|
|
93
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: l ?
|
|
95
|
+
l ? /* @__PURE__ */ e(w, { className: "h-4 w-4" }) : /* @__PURE__ */ e(C, { className: "h-4 w-4" }),
|
|
96
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: l ? m : p })
|
|
94
97
|
]
|
|
95
98
|
}
|
|
96
99
|
) }),
|
|
97
|
-
/* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ e(y, { variant: "tertiary", side: "top", children: l ? m : p })
|
|
98
101
|
] }),
|
|
99
|
-
/* @__PURE__ */ i(
|
|
100
|
-
/* @__PURE__ */ e(
|
|
101
|
-
/* @__PURE__ */ e(
|
|
102
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children:
|
|
102
|
+
/* @__PURE__ */ i(x, { children: [
|
|
103
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ i(D, { "data-component": "sheet-close", className: "rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", "aria-label": d, children: [
|
|
104
|
+
/* @__PURE__ */ e(T, { className: "h-4 w-4" }),
|
|
105
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: d })
|
|
103
106
|
] }) }),
|
|
104
|
-
/* @__PURE__ */ e(
|
|
107
|
+
/* @__PURE__ */ e(y, { variant: "tertiary", side: "top", children: d })
|
|
105
108
|
] })
|
|
106
109
|
] })
|
|
107
110
|
]
|
|
108
111
|
}
|
|
109
112
|
);
|
|
110
113
|
};
|
|
111
|
-
|
|
112
|
-
const
|
|
114
|
+
j.displayName = "SheetHeader";
|
|
115
|
+
const O = ({
|
|
113
116
|
className: t,
|
|
114
117
|
...a
|
|
115
118
|
}) => /* @__PURE__ */ e(
|
|
@@ -119,7 +122,7 @@ const j = ({
|
|
|
119
122
|
...a
|
|
120
123
|
}
|
|
121
124
|
);
|
|
122
|
-
|
|
125
|
+
O.displayName = "SheetBody";
|
|
123
126
|
const P = ({
|
|
124
127
|
className: t,
|
|
125
128
|
...a
|
|
@@ -135,7 +138,7 @@ const P = ({
|
|
|
135
138
|
}
|
|
136
139
|
);
|
|
137
140
|
P.displayName = "SheetFooter";
|
|
138
|
-
const
|
|
141
|
+
const F = n.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e(
|
|
139
142
|
o.Title,
|
|
140
143
|
{
|
|
141
144
|
ref: s,
|
|
@@ -144,8 +147,8 @@ const I = n.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e(
|
|
|
144
147
|
...a
|
|
145
148
|
}
|
|
146
149
|
));
|
|
147
|
-
|
|
148
|
-
const
|
|
150
|
+
F.displayName = o.Title.displayName;
|
|
151
|
+
const I = n.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e(
|
|
149
152
|
o.Description,
|
|
150
153
|
{
|
|
151
154
|
ref: s,
|
|
@@ -153,17 +156,17 @@ const O = n.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ e(
|
|
|
153
156
|
...a
|
|
154
157
|
}
|
|
155
158
|
));
|
|
156
|
-
|
|
159
|
+
I.displayName = o.Description.displayName;
|
|
157
160
|
export {
|
|
158
161
|
X as Sheet,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
O as SheetBody,
|
|
163
|
+
D as SheetClose,
|
|
164
|
+
L as SheetContent,
|
|
165
|
+
I as SheetDescription,
|
|
163
166
|
P as SheetFooter,
|
|
164
|
-
|
|
165
|
-
|
|
167
|
+
j as SheetHeader,
|
|
168
|
+
v as SheetOverlay,
|
|
166
169
|
E as SheetPortal,
|
|
167
|
-
|
|
170
|
+
F as SheetTitle,
|
|
168
171
|
q as SheetTrigger
|
|
169
172
|
};
|
|
@@ -471,7 +471,7 @@ const D = n.forwardRef(
|
|
|
471
471
|
);
|
|
472
472
|
D.displayName = "SidebarMenuCollapsible";
|
|
473
473
|
const pe = H(
|
|
474
|
-
"peer/menu-button flex w-full items-center gap-[22px] overflow-
|
|
474
|
+
"peer/menu-button flex w-full items-center gap-[22px] overflow-visible py-[14px] px-[22px] text-left text-[14px] outline-none ring-navigation-ring transition-[width,height,padding,background-color] hover:bg-navigation-item-active hover:text-navigation-on-hover focus-visible:ring-2 disabled:pointer-events-none disabled:text-navigation-muted group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:text-navigation-muted aria-disabled:opacity-50 hover:aria-disabled:bg-transparent data-[active=true]:bg-navigation-item-active data-[active=true]:font-medium data-[active=true]:text-navigation-on-hover cursor-pointer group-data-[state=collapsed]:!w-[var(--sidebar-width-icon)] group-data-[state=collapsed]:!h-12 group-data-[state=collapsed]:!p-0 group-data-[state=collapsed]:!pl-[22px] [&>span:last-child]:truncate [&>svg]:size-5 [&>img]:size-5 [&>svg]:shrink-0 [&>svg]:text-inherit group-data-[state=collapsed]:[&>span]:hidden group-data-[state=collapsed]:[&>svg:not(:first-of-type)]:hidden [&>[data-sidebar=menu-button-chevron]]:ml-auto [&>[data-sidebar=menu-button-chevron]]:size-4 [&>[data-sidebar=menu-button-chevron]]:transition-transform [&>[data-sidebar=menu-button-chevron]]:duration-200 [&>[data-sidebar=menu-button-chevron]]:rotate-90 data-[state=open]:[&>[data-sidebar=menu-button-chevron]]:rotate-[270deg] before:absolute before:left-0 before:top-0 before:w-1 before:bg-success before:rounded-r-[4px] before:transition-[height] before:duration-200 before:linear before:z-20 data-[active=false]:before:h-0 data-[active=true]:before:h-full",
|
|
475
475
|
{
|
|
476
476
|
variants: {
|
|
477
477
|
variant: {
|
|
@@ -684,7 +684,7 @@ const G = n.forwardRef(({ asChild: t = !1, size: r = "md", isActive: e, classNam
|
|
|
684
684
|
"data-size": r,
|
|
685
685
|
"data-active": e,
|
|
686
686
|
className: l(
|
|
687
|
-
"relative flex h-auto min-w-0 items-center gap-2 overflow-
|
|
687
|
+
"relative flex h-auto min-w-0 items-center gap-2 overflow-visible py-[14px] px-5 text-navigation-foreground outline-none transition-colors hover:bg-navigation-item-hover focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 cursor-pointer [&>span]:truncate [&>span]:shrink [&>span]:text-[14px] [&>span]:whitespace-nowrap [&>svg]:size-4 [&>svg]:shrink-0",
|
|
688
688
|
"data-[active=true]:font-medium data-[active=true]:text-success",
|
|
689
689
|
"group-data-[state=collapsed]:hidden",
|
|
690
690
|
"before:absolute before:left-0 before:top-0 before:w-1 before:transition-all before:duration-200 before:h-full before:z-10",
|
|
@@ -2,25 +2,25 @@ import { jsx as r, jsxs as u, Fragment as j } from "react/jsx-runtime";
|
|
|
2
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
|
|
5
|
+
import { Tooltip as W, TooltipTrigger as I, TooltipContent as z } from "./tooltip.js";
|
|
6
6
|
const N = s.createContext({
|
|
7
7
|
variant: "line",
|
|
8
8
|
size: "default"
|
|
9
9
|
}), L = (e, a) => {
|
|
10
10
|
const t = e.split(/\s+/);
|
|
11
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:
|
|
12
|
+
}, S = s.forwardRef(({ variant: e = "line", size: a = "default", hideInactiveLabel: t = !1, tooltipClassName: n, maxWords: o, value: i, defaultValue: x, onValueChange: h, ...d }, g) => {
|
|
13
13
|
const [y, b] = s.useState(i || x);
|
|
14
14
|
s.useEffect(() => {
|
|
15
15
|
i !== void 0 && b(i);
|
|
16
16
|
}, [i]);
|
|
17
|
-
const w = (
|
|
18
|
-
i === void 0 && b(
|
|
17
|
+
const w = (v) => {
|
|
18
|
+
i === void 0 && b(v), h?.(v);
|
|
19
19
|
};
|
|
20
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:
|
|
23
|
+
ref: g,
|
|
24
24
|
value: i,
|
|
25
25
|
defaultValue: x,
|
|
26
26
|
onValueChange: w,
|
|
@@ -42,15 +42,16 @@ const F = s.forwardRef(({ className: e, ...a }, t) => {
|
|
|
42
42
|
"inline-flex items-center justify-center rounded-lg",
|
|
43
43
|
n === "line" && "h-[38px] bg-canvas-elevated border w-full justify-start gap-2 px-2 shrink-0 py-0",
|
|
44
44
|
n === "pill" && "h-[38px] p-1 bg-brand-tint text-brand gap-1",
|
|
45
|
-
n === "outline" && "bg-transparent gap-2
|
|
45
|
+
n === "outline" && "bg-transparent gap-2 w-full justify-start",
|
|
46
46
|
n === "box" && "h-auto bg-transparent border-0 w-full justify-start gap-[16px] p-0 shrink-0",
|
|
47
47
|
e
|
|
48
48
|
),
|
|
49
|
+
style: { overflow: "visible" },
|
|
49
50
|
...a
|
|
50
51
|
}
|
|
51
52
|
);
|
|
52
|
-
}), $ = s.forwardRef(({ className: e, icon: a, children: t, maxWords: n, activeColor: o, style: i, ...x },
|
|
53
|
-
const { variant: d, size:
|
|
53
|
+
}), $ = s.forwardRef(({ className: e, icon: a, children: t, maxWords: n, activeColor: o, style: i, ...x }, h) => {
|
|
54
|
+
const { variant: d, size: g, activeValue: y, hideInactiveLabel: b, tooltipClassName: w, maxWords: v } = s.useContext(N), f = n ?? v, m = y === x.value, T = typeof t == "string", R = T && f ? L(t, f) : t, k = T && f && t.split(/\s+/).length > f, V = b && !m || k, l = { ...i };
|
|
54
55
|
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
56
|
const C = d === "box" ? /* @__PURE__ */ u(j, { children: [
|
|
56
57
|
t,
|
|
@@ -68,7 +69,7 @@ const F = s.forwardRef(({ className: e, ...a }, t) => {
|
|
|
68
69
|
return /* @__PURE__ */ r(
|
|
69
70
|
c.Trigger,
|
|
70
71
|
{
|
|
71
|
-
ref:
|
|
72
|
+
ref: h,
|
|
72
73
|
"data-tabs": "trigger",
|
|
73
74
|
className: p(
|
|
74
75
|
"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",
|
|
@@ -86,7 +87,7 @@ const F = s.forwardRef(({ className: e, ...a }, t) => {
|
|
|
86
87
|
"rounded-full border border-content-badge bg-canvas-elevated text-content-badge font-['Manrope']",
|
|
87
88
|
"hover:bg-canvas-muted hover:text-content",
|
|
88
89
|
"data-[state=active]:border-brand data-[state=active]:text-brand",
|
|
89
|
-
|
|
90
|
+
g === "sm" ? "h-[24px] px-[8px] py-[2px] text-xs" : "h-9 px-4 py-2"
|
|
90
91
|
],
|
|
91
92
|
d === "box" && [
|
|
92
93
|
"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",
|
|
@@ -102,8 +103,8 @@ const F = s.forwardRef(({ className: e, ...a }, t) => {
|
|
|
102
103
|
style: l,
|
|
103
104
|
...x,
|
|
104
105
|
children: V ? /* @__PURE__ */ u(W, { children: [
|
|
105
|
-
/* @__PURE__ */ r(
|
|
106
|
-
/* @__PURE__ */ r(
|
|
106
|
+
/* @__PURE__ */ r(I, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "inline-flex items-center justify-center h-full w-full", children: C }) }),
|
|
107
|
+
/* @__PURE__ */ r(z, { variant: "tertiary", className: w, children: t })
|
|
107
108
|
] }) : C
|
|
108
109
|
}
|
|
109
110
|
);
|
|
@@ -114,8 +115,9 @@ const M = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ r(
|
|
|
114
115
|
{
|
|
115
116
|
ref: t,
|
|
116
117
|
"data-tabs": "content",
|
|
118
|
+
tabIndex: -1,
|
|
117
119
|
className: p(
|
|
118
|
-
"mt-2
|
|
120
|
+
"mt-2 focus-visible:outline-none focus:outline-none",
|
|
119
121
|
e
|
|
120
122
|
),
|
|
121
123
|
...a
|