impact-nova 1.2.4 → 1.3.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/alert.d.ts +1 -1
- package/dist/components/ui/alert.js +59 -47
- package/dist/components/ui/calendar.js +3 -2
- package/dist/components/ui/prompt.js +32 -31
- package/dist/components/ui/select/select.js +157 -158
- package/dist/components/ui/tabs.d.ts +11 -1
- package/dist/components/ui/tabs.js +79 -54
- package/dist/icons/assets/webp/delete-3d.webp.js +4 -0
- package/dist/icons/assets/webp/info-3d.webp.js +4 -0
- package/dist/icons/assets/webp/success-3d.webp.js +4 -0
- package/dist/icons/assets/webp/warning-3d.webp.js +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +143 -135
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +69 -68
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ export interface AlertIconProps {
|
|
|
20
20
|
* Renders the appropriate icon for the given Alert variant.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
|
-
* <AlertIcon variant="success" className="h-
|
|
23
|
+
* <AlertIcon variant="success" className="h-5 w-5" />
|
|
24
24
|
* <AlertIcon variant="error" />
|
|
25
25
|
*/
|
|
26
26
|
declare const AlertIcon: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { Slot as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { X as u
|
|
8
|
-
const
|
|
9
|
-
"relative w-full rounded-lg border px-4 py-
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { Slot as p } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as g } from "class-variance-authority";
|
|
5
|
+
import { cn as n } from "../../lib/utils.js";
|
|
6
|
+
import { Button as m } from "./button.js";
|
|
7
|
+
import { X as u } from "lucide-react";
|
|
8
|
+
const b = g(
|
|
9
|
+
"relative w-full rounded-lg border px-4 py-2 text-sm flex gap-3 items-start",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
@@ -21,69 +21,81 @@ const w = p(
|
|
|
21
21
|
variant: "default"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
),
|
|
25
|
-
({ className: e, variant:
|
|
26
|
-
|
|
24
|
+
), v = i.forwardRef(
|
|
25
|
+
({ className: e, variant: t, asChild: a = !1, removable: s, onClose: c, children: d, ...f }, h) => /* @__PURE__ */ o(
|
|
26
|
+
a ? p : "div",
|
|
27
27
|
{
|
|
28
|
-
ref:
|
|
28
|
+
ref: h,
|
|
29
29
|
role: "alert",
|
|
30
30
|
"data-component": "alert",
|
|
31
|
-
"data-variant":
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
31
|
+
"data-variant": t ?? "default",
|
|
32
|
+
className: n(b({ variant: t }), e),
|
|
33
|
+
...f,
|
|
34
34
|
children: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
d,
|
|
36
|
+
s && /* @__PURE__ */ r(
|
|
37
|
+
m,
|
|
38
38
|
{
|
|
39
39
|
variant: "ghost",
|
|
40
40
|
size: "icon",
|
|
41
41
|
className: "absolute right-4 top-3 h-4 w-4 p-0 text-secondary-foreground hover:text-foreground hover:bg-transparent",
|
|
42
|
-
onClick:
|
|
42
|
+
onClick: c,
|
|
43
43
|
"aria-label": "Close",
|
|
44
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ r(u, { className: "h-4 w-4" })
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
)
|
|
50
50
|
);
|
|
51
|
-
|
|
52
|
-
const
|
|
51
|
+
v.displayName = "Alert";
|
|
52
|
+
const x = i.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
53
53
|
"h5",
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
55
|
+
ref: a,
|
|
56
56
|
"data-component": "alert-title",
|
|
57
|
-
className:
|
|
58
|
-
...
|
|
57
|
+
className: n("font-semibold leading-[21px] tracking-tight text-foreground", e),
|
|
58
|
+
...t
|
|
59
59
|
}
|
|
60
60
|
));
|
|
61
|
-
|
|
62
|
-
const
|
|
61
|
+
x.displayName = "AlertTitle";
|
|
62
|
+
const w = i.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ r(
|
|
63
63
|
"div",
|
|
64
64
|
{
|
|
65
|
-
ref:
|
|
65
|
+
ref: a,
|
|
66
66
|
"data-component": "alert-description",
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
67
|
+
className: n("text-[12px] leading-[18px] text-secondary-foreground", e),
|
|
68
|
+
...t
|
|
69
69
|
}
|
|
70
70
|
));
|
|
71
|
-
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
w.displayName = "AlertDescription";
|
|
72
|
+
const l = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
73
|
+
/* @__PURE__ */ r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#4259ee" }),
|
|
74
|
+
/* @__PURE__ */ r("path", { d: "M13 17h-2v-6h2v6zm0-8h-2V7h2v2z", fill: "white" })
|
|
75
|
+
] }), z = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
76
|
+
/* @__PURE__ */ r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z", fill: "#3bb273" }),
|
|
77
|
+
/* @__PURE__ */ r("path", { d: "M10 14.17l-3.59-3.59L5 12l5 5 9-9-1.41-1.41L10 14.17z", fill: "white" })
|
|
78
|
+
] }), C = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
79
|
+
/* @__PURE__ */ r("path", { d: "M1 21h22L12 2 1 21z", fill: "#e1bc29" }),
|
|
80
|
+
/* @__PURE__ */ r("path", { d: "M13 18h-2v-2h2v2zm0-4h-2v-4h2v4z", fill: "white" })
|
|
81
|
+
] }), I = ({ className: e }) => /* @__PURE__ */ o("svg", { className: e, focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", children: [
|
|
82
|
+
/* @__PURE__ */ r("path", { d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z", fill: "#e15554" }),
|
|
83
|
+
/* @__PURE__ */ r("path", { d: "M17 15.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z", fill: "white" })
|
|
84
|
+
] }), M = {
|
|
85
|
+
default: l,
|
|
86
|
+
info: l,
|
|
87
|
+
success: z,
|
|
88
|
+
warning: C,
|
|
89
|
+
error: I
|
|
90
|
+
}, N = ({ variant: e = "info", className: t = "h-5 w-5 shrink-0 mt-[2px]" }) => {
|
|
91
|
+
const a = M[e] || l;
|
|
92
|
+
return /* @__PURE__ */ r(a, { className: t });
|
|
81
93
|
};
|
|
82
|
-
|
|
94
|
+
N.displayName = "AlertIcon";
|
|
83
95
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
96
|
+
v as Alert,
|
|
97
|
+
w as AlertDescription,
|
|
98
|
+
N as AlertIcon,
|
|
99
|
+
x as AlertTitle,
|
|
100
|
+
b as alertVariants
|
|
89
101
|
};
|
|
@@ -4,6 +4,7 @@ import { ChevronLeftIcon as pe, ChevronRightIcon as be } from "lucide-react";
|
|
|
4
4
|
import { getDefaultClassNames as Ee, DayPicker as Ie } from "react-day-picker";
|
|
5
5
|
import { cn as f } from "../../lib/utils.js";
|
|
6
6
|
import { Button as M } from "./button.js";
|
|
7
|
+
import "./button-variants.js";
|
|
7
8
|
import oe from "./select/select.js";
|
|
8
9
|
import { FISCAL_PATTERNS as Re, resolveWeekSelection as Oe } from "../../lib/fiscal-calendar.js";
|
|
9
10
|
const le = d.createContext(0), Ue = [
|
|
@@ -20,7 +21,7 @@ const le = d.createContext(0), Ue = [
|
|
|
20
21
|
"November",
|
|
21
22
|
"December"
|
|
22
23
|
], He = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
|
|
23
|
-
function
|
|
24
|
+
function Qe({
|
|
24
25
|
className: te,
|
|
25
26
|
classNames: T,
|
|
26
27
|
showOutsideDays: v = !1,
|
|
@@ -750,6 +751,6 @@ function Le({
|
|
|
750
751
|
);
|
|
751
752
|
}
|
|
752
753
|
export {
|
|
753
|
-
|
|
754
|
+
Qe as Calendar,
|
|
754
755
|
Le as CalendarDayButton
|
|
755
756
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import * as m from "react";
|
|
3
|
-
import { cva as
|
|
4
|
-
import {
|
|
3
|
+
import { cva as T } from "class-variance-authority";
|
|
4
|
+
import { X as R } from "lucide-react";
|
|
5
|
+
import { Info3d as V, Success3d as k, Warning3d as B, Delete3d as F } from "../../icons/index.js";
|
|
5
6
|
import { cn as r } from "../../lib/utils.js";
|
|
6
|
-
import { Tooltip as
|
|
7
|
+
import { Tooltip as H, TooltipTrigger as I, TooltipContent as S } from "./tooltip.js";
|
|
7
8
|
import { Button as f } from "./button.js";
|
|
8
|
-
import { Dialog as
|
|
9
|
-
const
|
|
9
|
+
import { Dialog as W, DialogContent as X, DialogHeader as q, DialogTitle as A, DialogDescription as E, DialogFooter as G } from "./dialog.js";
|
|
10
|
+
const O = T("", {
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
default: "",
|
|
@@ -19,8 +20,8 @@ const $ = P("", {
|
|
|
19
20
|
defaultVariants: {
|
|
20
21
|
variant: "default"
|
|
21
22
|
}
|
|
22
|
-
}),
|
|
23
|
-
/* @__PURE__ */ e(
|
|
23
|
+
}), J = m.forwardRef(({ className: l, ...i }, a) => /* @__PURE__ */ o(H, { children: [
|
|
24
|
+
/* @__PURE__ */ e(I, { asChild: !0, children: /* @__PURE__ */ e(
|
|
24
25
|
"button",
|
|
25
26
|
{
|
|
26
27
|
ref: a,
|
|
@@ -28,13 +29,13 @@ const $ = P("", {
|
|
|
28
29
|
type: "button",
|
|
29
30
|
"aria-label": "Close",
|
|
30
31
|
...i,
|
|
31
|
-
children: /* @__PURE__ */ e(
|
|
32
|
+
children: /* @__PURE__ */ e(R, { size: 16 })
|
|
32
33
|
}
|
|
33
34
|
) }),
|
|
34
|
-
/* @__PURE__ */ e(
|
|
35
|
+
/* @__PURE__ */ e(S, { side: "top", variant: "tertiary", children: "Close" })
|
|
35
36
|
] }));
|
|
36
|
-
|
|
37
|
-
const
|
|
37
|
+
J.displayName = "PromptClose";
|
|
38
|
+
const K = m.forwardRef(
|
|
38
39
|
({
|
|
39
40
|
open: l,
|
|
40
41
|
onOpenChange: i,
|
|
@@ -56,17 +57,17 @@ const M = m.forwardRef(
|
|
|
56
57
|
}, v) => {
|
|
57
58
|
const D = () => {
|
|
58
59
|
x?.(), i?.(!1);
|
|
59
|
-
},
|
|
60
|
+
}, j = () => {
|
|
60
61
|
h?.(), i?.(!1);
|
|
61
|
-
}, s = t !== "default",
|
|
62
|
-
return /* @__PURE__ */ e(
|
|
63
|
-
|
|
62
|
+
}, s = t !== "default", z = b || (t === "destructive" ? "destructive" : "default");
|
|
63
|
+
return /* @__PURE__ */ e(W, { open: l, onOpenChange: i, ...y, children: /* @__PURE__ */ o(
|
|
64
|
+
X,
|
|
64
65
|
{
|
|
65
66
|
ref: v,
|
|
66
67
|
"aria-describedby": void 0,
|
|
67
68
|
hideClose: !C,
|
|
68
|
-
onPointerDownOutside: (
|
|
69
|
-
w &&
|
|
69
|
+
onPointerDownOutside: (P) => {
|
|
70
|
+
w && P.preventDefault();
|
|
70
71
|
},
|
|
71
72
|
className: r(
|
|
72
73
|
"max-w-[400px] gap-0",
|
|
@@ -87,20 +88,20 @@ const M = m.forwardRef(
|
|
|
87
88
|
t === "destructive" && "bg-[#fceeee] text-[#ef4444]"
|
|
88
89
|
),
|
|
89
90
|
children: [
|
|
90
|
-
t === "info" && /* @__PURE__ */ e(
|
|
91
|
-
t === "success" && /* @__PURE__ */ e(
|
|
92
|
-
t === "warning" && /* @__PURE__ */ e(
|
|
93
|
-
t === "destructive" && /* @__PURE__ */ e(
|
|
91
|
+
t === "info" && /* @__PURE__ */ e(V, { size: 24 }),
|
|
92
|
+
t === "success" && /* @__PURE__ */ e(k, { size: 24 }),
|
|
93
|
+
t === "warning" && /* @__PURE__ */ e(B, { size: 24 }),
|
|
94
|
+
t === "destructive" && /* @__PURE__ */ e(F, { size: 24 })
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
),
|
|
97
98
|
/* @__PURE__ */ o(
|
|
98
|
-
|
|
99
|
+
q,
|
|
99
100
|
{
|
|
100
101
|
className: r(s && "space-y-2 items-center bg-white border-none"),
|
|
101
102
|
children: [
|
|
102
103
|
/* @__PURE__ */ e(
|
|
103
|
-
|
|
104
|
+
A,
|
|
104
105
|
{
|
|
105
106
|
className: r(
|
|
106
107
|
s && "text-[18px] font-extrabold text-[#1f2b4d]"
|
|
@@ -109,7 +110,7 @@ const M = m.forwardRef(
|
|
|
109
110
|
}
|
|
110
111
|
),
|
|
111
112
|
c && /* @__PURE__ */ e(
|
|
112
|
-
|
|
113
|
+
E,
|
|
113
114
|
{
|
|
114
115
|
className: r(s && "text-sm text-[#60697d]"),
|
|
115
116
|
children: c
|
|
@@ -120,7 +121,7 @@ const M = m.forwardRef(
|
|
|
120
121
|
),
|
|
121
122
|
d && /* @__PURE__ */ e("div", { className: r("w-full py-2", s && "text-center"), children: d }),
|
|
122
123
|
n ? /* @__PURE__ */ e("div", { className: "w-full", children: n }) : /* @__PURE__ */ o(
|
|
123
|
-
|
|
124
|
+
G,
|
|
124
125
|
{
|
|
125
126
|
className: r(
|
|
126
127
|
s && "mt-6 flex flex-row justify-center gap-3 w-full sm:justify-center px-0 pb-0"
|
|
@@ -130,7 +131,7 @@ const M = m.forwardRef(
|
|
|
130
131
|
f,
|
|
131
132
|
{
|
|
132
133
|
variant: g,
|
|
133
|
-
onClick:
|
|
134
|
+
onClick: j,
|
|
134
135
|
className: r(s && "h-10 px-6"),
|
|
135
136
|
children: u
|
|
136
137
|
}
|
|
@@ -138,7 +139,7 @@ const M = m.forwardRef(
|
|
|
138
139
|
/* @__PURE__ */ e(
|
|
139
140
|
f,
|
|
140
141
|
{
|
|
141
|
-
variant:
|
|
142
|
+
variant: z,
|
|
142
143
|
onClick: D,
|
|
143
144
|
className: r(s && "h-10 px-6"),
|
|
144
145
|
children: p
|
|
@@ -152,9 +153,9 @@ const M = m.forwardRef(
|
|
|
152
153
|
) });
|
|
153
154
|
}
|
|
154
155
|
);
|
|
155
|
-
|
|
156
|
+
K.displayName = "Prompt";
|
|
156
157
|
export {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
K as Prompt,
|
|
159
|
+
J as PromptClose,
|
|
160
|
+
O as promptVariants
|
|
160
161
|
};
|