@definable/ui 0.1.32 → 0.1.35
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/alert-dialog.js +15 -15
- package/dist/components/alert.js +21 -21
- package/dist/components/avatar.js +7 -7
- package/dist/components/badge.js +10 -10
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +20 -18
- package/dist/components/calendar.js +26 -26
- package/dist/components/card.js +14 -14
- package/dist/components/carousel.js +39 -39
- package/dist/components/checkbox.js +7 -7
- package/dist/components/collapse.js +17 -17
- package/dist/components/command-menu.js +30 -30
- package/dist/components/command.js +52 -52
- package/dist/components/confirmation-modal.js +23 -23
- package/dist/components/context-menu.js +30 -30
- package/dist/components/dialog.js +32 -32
- package/dist/components/drawer.js +6 -6
- package/dist/components/dropdown-menu.js +16 -16
- package/dist/components/image-cropper-modal.js +27 -27
- package/dist/components/image-cropper.js +27 -27
- package/dist/components/input.js +9 -9
- package/dist/components/loader.js +3 -3
- package/dist/components/loading-placeholder.js +4 -4
- package/dist/components/mention.js +18 -18
- package/dist/components/modal.js +39 -39
- package/dist/components/picker.js +30 -30
- package/dist/components/popover.js +7 -7
- package/dist/components/progress.js +13 -13
- package/dist/components/radio-group.js +19 -19
- package/dist/components/scroll-area.js +20 -20
- package/dist/components/select.js +25 -25
- package/dist/components/selection-bar.js +17 -17
- package/dist/components/separator.js +8 -8
- package/dist/components/skeleton.js +8 -8
- package/dist/components/slider.js +11 -11
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch.js +8 -8
- package/dist/components/table-empty.js +6 -6
- package/dist/components/table-mobile.js +45 -45
- package/dist/components/table.js +66 -66
- package/dist/components/tabs.js +16 -16
- package/dist/components/textarea.js +4 -4
- package/dist/components/use-toast.js +9 -9
- package/dist/index.js +1 -1
- package/dist/{stepper-modal-JXpOXOV2.js → stepper-modal-Bh6gsg8o.js} +79 -79
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/components/table.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cn as
|
|
1
|
+
import { jsx as i, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../lib/utils.js";
|
|
3
3
|
import { Checkbox as N } from "./checkbox.js";
|
|
4
4
|
import { Tooltip as w } from "./tooltip.js";
|
|
5
5
|
import { useState as z } from "react";
|
|
6
6
|
import { TableEmpty as V } from "./table-empty.js";
|
|
7
|
-
const
|
|
7
|
+
const g = ({ children: d, className: l }) => /* @__PURE__ */ i("div", { className: t("border border-light rounded-lg overflow-hidden bg-secondary shadow-sm", l), children: d });
|
|
8
8
|
function q({
|
|
9
|
-
data:
|
|
9
|
+
data: d,
|
|
10
10
|
columns: l,
|
|
11
|
-
showCheckbox:
|
|
12
|
-
onRowClick:
|
|
13
|
-
className:
|
|
14
|
-
selectedItems:
|
|
15
|
-
onSelect:
|
|
11
|
+
showCheckbox: o = !0,
|
|
12
|
+
onRowClick: p,
|
|
13
|
+
className: c,
|
|
14
|
+
selectedItems: e,
|
|
15
|
+
onSelect: s,
|
|
16
16
|
emptyState: x,
|
|
17
17
|
isLoading: b = !1,
|
|
18
18
|
loadingRows: T = 5,
|
|
19
19
|
tableHeightOffset: f
|
|
20
20
|
}) {
|
|
21
|
-
const [j,
|
|
22
|
-
|
|
23
|
-
...l.map((
|
|
24
|
-
].filter(Boolean).join(" "), $ = () => /* @__PURE__ */
|
|
21
|
+
const [j, y] = z(null), m = { height: f ? `calc(100vh - ${f})` : "calc(100vh - 8rem)" }, v = [
|
|
22
|
+
o ? "40px" : null,
|
|
23
|
+
...l.map((r) => r.width || "1fr")
|
|
24
|
+
].filter(Boolean).join(" "), $ = () => /* @__PURE__ */ i(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
|
-
className:
|
|
27
|
+
className: t("divide-y divide-light/50 overflow-y-auto"),
|
|
28
28
|
style: m,
|
|
29
|
-
children: Array(T).fill(0).map((
|
|
29
|
+
children: Array(T).fill(0).map((r, h) => /* @__PURE__ */ n(
|
|
30
30
|
"div",
|
|
31
31
|
{
|
|
32
32
|
className: "grid items-center px-6 py-4 text-sm",
|
|
33
|
-
style: { gridTemplateColumns:
|
|
33
|
+
style: { gridTemplateColumns: v },
|
|
34
34
|
children: [
|
|
35
|
-
|
|
36
|
-
l.map((
|
|
35
|
+
o && /* @__PURE__ */ i("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "h-4 w-4 rounded bg-hover animate-pulse" }) }),
|
|
36
|
+
l.map((a) => /* @__PURE__ */ i(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
|
-
className:
|
|
40
|
-
children: /* @__PURE__ */
|
|
39
|
+
className: t("px-2 relative min-w-0", a.className),
|
|
40
|
+
children: /* @__PURE__ */ i(
|
|
41
41
|
"div",
|
|
42
42
|
{
|
|
43
|
-
className: "h-4 bg-
|
|
43
|
+
className: "h-4 bg-hover rounded animate-pulse",
|
|
44
44
|
style: { width: Math.random() * 40 + 40 + "%" }
|
|
45
45
|
}
|
|
46
46
|
)
|
|
47
47
|
},
|
|
48
|
-
`skeleton-col-${
|
|
48
|
+
`skeleton-col-${a.id}`
|
|
49
49
|
))
|
|
50
50
|
]
|
|
51
51
|
},
|
|
@@ -53,91 +53,91 @@ function q({
|
|
|
53
53
|
))
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
|
-
return b ? /* @__PURE__ */
|
|
56
|
+
return b ? /* @__PURE__ */ i(g, { className: c, children: /* @__PURE__ */ n("div", { className: "relative bg-card", children: [
|
|
57
57
|
/* @__PURE__ */ n(
|
|
58
58
|
"div",
|
|
59
59
|
{
|
|
60
|
-
className:
|
|
61
|
-
"grid items-center px-6 py-3 text-xs font-medium text-
|
|
60
|
+
className: t(
|
|
61
|
+
"grid items-center px-6 py-3 text-xs font-medium text-tertiary/80 bg-hover/30 border-b border-light sticky top-0 z-10"
|
|
62
62
|
),
|
|
63
|
-
style: { gridTemplateColumns:
|
|
63
|
+
style: { gridTemplateColumns: v },
|
|
64
64
|
children: [
|
|
65
|
-
|
|
66
|
-
l.map((
|
|
65
|
+
o && /* @__PURE__ */ i("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ i("div", { className: "h-4 w-4 rounded bg-hover animate-pulse" }) }),
|
|
66
|
+
l.map((r) => /* @__PURE__ */ i("div", { className: t("px-2 font-medium", r.className), children: r.header }, r.id))
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
] }) }) :
|
|
70
|
+
/* @__PURE__ */ i($, {})
|
|
71
|
+
] }) }) : d.length === 0 ? /* @__PURE__ */ i(g, { className: c, children: /* @__PURE__ */ i("div", { className: "relative bg-card", children: /* @__PURE__ */ i(V, { ...x }) }) }) : /* @__PURE__ */ i(g, { className: c, children: /* @__PURE__ */ n("div", { className: "relative bg-card", children: [
|
|
72
72
|
/* @__PURE__ */ n(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
|
-
className:
|
|
76
|
-
"grid items-center px-6 py-3 text-xs font-medium text-
|
|
75
|
+
className: t(
|
|
76
|
+
"grid items-center px-6 py-3 text-xs font-medium text-tertiary/80 bg-hover/30 border-b border-light sticky top-0 z-10"
|
|
77
77
|
),
|
|
78
|
-
style: { gridTemplateColumns:
|
|
78
|
+
style: { gridTemplateColumns: v },
|
|
79
79
|
children: [
|
|
80
|
-
|
|
80
|
+
o && /* @__PURE__ */ i("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ i(
|
|
81
81
|
N,
|
|
82
82
|
{
|
|
83
|
-
checked:
|
|
84
|
-
onClick: (
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
(
|
|
83
|
+
checked: d.length > 0 && (e == null ? void 0 : e.size) === d.length,
|
|
84
|
+
onClick: (r) => {
|
|
85
|
+
r.stopPropagation();
|
|
86
|
+
const a = !((e == null ? void 0 : e.size) === d.length);
|
|
87
|
+
d.forEach((u) => {
|
|
88
|
+
(e == null ? void 0 : e.has(u.id)) !== a && (s == null || s(u.id, a));
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
) }),
|
|
93
|
-
l.map((
|
|
93
|
+
l.map((r) => /* @__PURE__ */ i("div", { className: t("px-2 font-medium", r.className), children: r.header }, r.id))
|
|
94
94
|
]
|
|
95
95
|
}
|
|
96
96
|
),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ i(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
|
-
className:
|
|
100
|
+
className: t("divide-y divide-light/30 overflow-y-auto"),
|
|
101
101
|
style: m,
|
|
102
|
-
children:
|
|
102
|
+
children: d.map((r, h) => /* @__PURE__ */ n(
|
|
103
103
|
"div",
|
|
104
104
|
{
|
|
105
|
-
className:
|
|
106
|
-
"grid items-center px-6 py-4 text-sm text-
|
|
105
|
+
className: t(
|
|
106
|
+
"grid items-center px-6 py-4 text-sm text-primary hover:bg-hover/30 transition-colors duration-150 group cursor-pointer"
|
|
107
107
|
),
|
|
108
|
-
style: { gridTemplateColumns:
|
|
109
|
-
onClick: () =>
|
|
108
|
+
style: { gridTemplateColumns: v },
|
|
109
|
+
onClick: () => p == null ? void 0 : p(r),
|
|
110
110
|
children: [
|
|
111
|
-
|
|
111
|
+
o && /* @__PURE__ */ i("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ i(
|
|
112
112
|
N,
|
|
113
113
|
{
|
|
114
|
-
checked:
|
|
115
|
-
onClick: (
|
|
116
|
-
|
|
114
|
+
checked: e == null ? void 0 : e.has(r.id),
|
|
115
|
+
onClick: (a) => {
|
|
116
|
+
a.stopPropagation(), s == null || s(r.id, !(e != null && e.has(r.id)));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
) }),
|
|
120
|
-
l.map((
|
|
120
|
+
l.map((a) => /* @__PURE__ */ n(
|
|
121
121
|
"div",
|
|
122
122
|
{
|
|
123
|
-
className:
|
|
123
|
+
className: t(
|
|
124
124
|
"px-2 relative min-w-0",
|
|
125
|
-
|
|
125
|
+
a.className
|
|
126
126
|
),
|
|
127
|
-
onMouseEnter: () =>
|
|
128
|
-
onMouseLeave: () =>
|
|
127
|
+
onMouseEnter: () => a.tooltipValue && y(`${h}-${a.id}`),
|
|
128
|
+
onMouseLeave: () => y(null),
|
|
129
129
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ i("div", { className: t(
|
|
131
131
|
"flex items-center gap-2",
|
|
132
|
-
|
|
133
|
-
), children: /* @__PURE__ */
|
|
132
|
+
a.truncate && "overflow-hidden"
|
|
133
|
+
), children: /* @__PURE__ */ i("div", { className: t(
|
|
134
134
|
"w-full",
|
|
135
|
-
|
|
136
|
-
), children:
|
|
137
|
-
|
|
135
|
+
a.truncate && "truncate"
|
|
136
|
+
), children: a.cell(r) }) }),
|
|
137
|
+
a.tooltipValue && j === `${h}-${a.id}` && /* @__PURE__ */ i(
|
|
138
138
|
w,
|
|
139
139
|
{
|
|
140
|
-
content:
|
|
140
|
+
content: a.tooltipValue(r),
|
|
141
141
|
side: "bottom",
|
|
142
142
|
align: "start",
|
|
143
143
|
isVisible: !0
|
|
@@ -145,11 +145,11 @@ function q({
|
|
|
145
145
|
)
|
|
146
146
|
]
|
|
147
147
|
},
|
|
148
|
-
|
|
148
|
+
a.id
|
|
149
149
|
))
|
|
150
150
|
]
|
|
151
151
|
},
|
|
152
|
-
|
|
152
|
+
r.id
|
|
153
153
|
))
|
|
154
154
|
}
|
|
155
155
|
)
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
3
|
import * as e from "@radix-ui/react-tabs";
|
|
4
|
-
import { cn as
|
|
5
|
-
const m = e.Root,
|
|
4
|
+
import { cn as o } from "../lib/utils.js";
|
|
5
|
+
const m = e.Root, n = r.forwardRef(({ className: i, ...t }, s) => /* @__PURE__ */ a(
|
|
6
6
|
e.List,
|
|
7
7
|
{
|
|
8
8
|
ref: s,
|
|
9
|
-
className:
|
|
10
|
-
"inline-flex h-9 items-center justify-center rounded-lg bg-
|
|
9
|
+
className: o(
|
|
10
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-hover p-1 text-tertiary",
|
|
11
11
|
i
|
|
12
12
|
),
|
|
13
13
|
...t
|
|
14
14
|
}
|
|
15
15
|
));
|
|
16
|
-
|
|
17
|
-
const f =
|
|
16
|
+
n.displayName = e.List.displayName;
|
|
17
|
+
const f = r.forwardRef(({ className: i, ...t }, s) => /* @__PURE__ */ a(
|
|
18
18
|
e.Trigger,
|
|
19
19
|
{
|
|
20
20
|
ref: s,
|
|
21
|
-
className:
|
|
22
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-
|
|
21
|
+
className: o(
|
|
22
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-white dark:ring-offset-[#1F1F20] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black/20 dark:focus-visible:ring-white/20 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-secondary data-[state=active]:text-primary data-[state=active]:shadow",
|
|
23
23
|
i
|
|
24
24
|
),
|
|
25
25
|
...t
|
|
26
26
|
}
|
|
27
27
|
));
|
|
28
28
|
f.displayName = e.Trigger.displayName;
|
|
29
|
-
const
|
|
29
|
+
const l = r.forwardRef(({ className: i, ...t }, s) => /* @__PURE__ */ a(
|
|
30
30
|
e.Content,
|
|
31
31
|
{
|
|
32
32
|
ref: s,
|
|
33
|
-
className:
|
|
34
|
-
"mt-2 ring-offset-
|
|
33
|
+
className: o(
|
|
34
|
+
"mt-2 ring-offset-white dark:ring-offset-[#1F1F20] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black/20 dark:focus-visible:ring-white/20 focus-visible:ring-offset-2",
|
|
35
35
|
i
|
|
36
36
|
),
|
|
37
37
|
...t
|
|
38
38
|
}
|
|
39
39
|
));
|
|
40
|
-
|
|
40
|
+
l.displayName = e.Content.displayName;
|
|
41
41
|
export {
|
|
42
42
|
m as Tabs,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
l as TabsContent,
|
|
44
|
+
n as TabsList,
|
|
45
45
|
f as TabsTrigger
|
|
46
46
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import * as t from "react";
|
|
3
3
|
import { cn as s } from "../lib/utils.js";
|
|
4
4
|
const a = t.forwardRef(
|
|
5
|
-
({ className: e, ...r },
|
|
5
|
+
({ className: e, ...r }, i) => /* @__PURE__ */ o(
|
|
6
6
|
"textarea",
|
|
7
7
|
{
|
|
8
8
|
className: s(
|
|
9
|
-
"flex min-h-[80px] w-full rounded-md border border-
|
|
9
|
+
"flex min-h-[80px] w-full rounded-md border border-light bg-secondary px-3 py-2 text-sm ring-offset-white dark:ring-offset-[#1F1F20] placeholder:text-tertiary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-black/20 dark:focus-visible:ring-white/20 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
10
|
e
|
|
11
11
|
),
|
|
12
|
-
ref:
|
|
12
|
+
ref: i,
|
|
13
13
|
...r
|
|
14
14
|
}
|
|
15
15
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useCallback as u } from "react";
|
|
3
3
|
let s = [], a = [];
|
|
4
4
|
const d = () => {
|
|
5
5
|
a.forEach((t) => t([...s]));
|
|
@@ -18,7 +18,7 @@ const d = () => {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
}, g = () => {
|
|
21
|
-
const [t, i] =
|
|
21
|
+
const [t, i] = c(s), e = u(() => {
|
|
22
22
|
const r = (n) => {
|
|
23
23
|
i(n);
|
|
24
24
|
};
|
|
@@ -26,21 +26,21 @@ const d = () => {
|
|
|
26
26
|
a = a.filter((n) => n !== r);
|
|
27
27
|
};
|
|
28
28
|
}, []);
|
|
29
|
-
return
|
|
29
|
+
return c(() => e()), {
|
|
30
30
|
toast: m,
|
|
31
31
|
toasts: t,
|
|
32
32
|
dismiss: (r) => {
|
|
33
33
|
s = s.filter((n) => n.id !== r), d();
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
},
|
|
36
|
+
}, h = () => {
|
|
37
37
|
const { toasts: t, dismiss: i } = g();
|
|
38
|
-
return t.length === 0 ? null : /* @__PURE__ */ o("div", { className: "fixed top-4 right-4 z-50 flex flex-col gap-2 w-[350px]", children: t.map((e) => /* @__PURE__ */
|
|
38
|
+
return t.length === 0 ? null : /* @__PURE__ */ o("div", { className: "fixed top-4 right-4 z-50 flex flex-col gap-2 w-[350px]", children: t.map((e) => /* @__PURE__ */ l(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
className: `p-4 rounded-lg shadow-lg border border-light transition-all duration-300 ease-in-out ${e.type === "error" ? "bg-
|
|
41
|
+
className: `p-4 rounded-lg shadow-lg border border-light transition-all duration-300 ease-in-out ${e.type === "error" ? "bg-red-500 text-white" : e.type === "success" ? "bg-green-50 text-green-800 border-green-200" : e.type === "warning" ? "bg-amber-50 text-amber-800 border-amber-200" : "bg-secondary text-primary"}`,
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ l("div", { className: "flex justify-between items-start", children: [
|
|
44
44
|
/* @__PURE__ */ o("div", { className: "font-medium", children: e.title }),
|
|
45
45
|
/* @__PURE__ */ o(
|
|
46
46
|
"button",
|
|
@@ -58,7 +58,7 @@ const d = () => {
|
|
|
58
58
|
)) });
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
h as ToastContainer,
|
|
62
62
|
m as toast,
|
|
63
63
|
g as useToast
|
|
64
64
|
};
|
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ import { Separator as V1 } from "./components/separator.js";
|
|
|
35
35
|
import { Sheet as X1 } from "./components/sheet.js";
|
|
36
36
|
import { Skeleton as q1 } from "./components/skeleton.js";
|
|
37
37
|
import { Slider as K1 } from "./components/slider.js";
|
|
38
|
-
import { a as W1, S as Y1, b as Z1 } from "./stepper-modal-
|
|
38
|
+
import { a as W1, S as Y1, b as Z1 } from "./stepper-modal-Bh6gsg8o.js";
|
|
39
39
|
import { Switch as e2 } from "./components/switch.js";
|
|
40
40
|
import { Table as r2 } from "./components/table.js";
|
|
41
41
|
import { TableEmpty as t2 } from "./components/table-empty.js";
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { motion as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as s } from "./lib/utils.js";
|
|
3
|
+
import { motion as r, AnimatePresence as L } from "framer-motion";
|
|
4
4
|
import { Modal as O } from "./components/modal.js";
|
|
5
5
|
import { Button as m } from "./components/button.js";
|
|
6
|
-
function H({ steps:
|
|
7
|
-
return /* @__PURE__ */ e("div", { className:
|
|
8
|
-
|
|
6
|
+
function H({ steps: o, className: l }) {
|
|
7
|
+
return /* @__PURE__ */ e("div", { className: s("py-6 space-y-5", l), children: o.map((i, t) => /* @__PURE__ */ a(
|
|
8
|
+
r.div,
|
|
9
9
|
{
|
|
10
10
|
className: "relative",
|
|
11
11
|
initial: { opacity: 0, y: 10 },
|
|
12
12
|
animate: { opacity: 1, y: 0 },
|
|
13
|
-
transition: { delay:
|
|
13
|
+
transition: { delay: t * 0.1, duration: 0.3 },
|
|
14
14
|
children: [
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
t !== 0 && /* @__PURE__ */ e(
|
|
16
|
+
r.div,
|
|
17
17
|
{
|
|
18
|
-
className:
|
|
18
|
+
className: s(
|
|
19
19
|
"absolute left-[15px] -top-[26px] w-[2px] h-[24px] origin-top",
|
|
20
|
-
i.isCompleted || i.isCurrent ? "bg-primary/60" : "bg-
|
|
20
|
+
i.isCompleted || i.isCurrent ? "bg-primary/60" : "bg-light"
|
|
21
21
|
),
|
|
22
22
|
initial: { scaleY: 0 },
|
|
23
23
|
animate: { scaleY: 1 },
|
|
24
|
-
transition: { delay:
|
|
24
|
+
transition: { delay: t * 0.1 + 0.2, duration: 0.2 }
|
|
25
25
|
}
|
|
26
26
|
),
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ a("div", { className: "flex gap-4 items-start", children: [
|
|
28
28
|
/* @__PURE__ */ e(
|
|
29
|
-
|
|
29
|
+
r.div,
|
|
30
30
|
{
|
|
31
|
-
className:
|
|
31
|
+
className: s(
|
|
32
32
|
"w-[30px] h-[30px] rounded-full flex items-center justify-center text-xs font-medium shrink-0 transition-all",
|
|
33
|
-
i.isCompleted && "bg-primary text-
|
|
33
|
+
i.isCompleted && "bg-primary text-white shadow-sm shadow-primary/20",
|
|
34
34
|
i.isCurrent && "border-2 border-primary bg-primary/10 text-primary",
|
|
35
|
-
!i.isCompleted && !i.isCurrent && "border-2 border-
|
|
35
|
+
!i.isCompleted && !i.isCurrent && "border-2 border-tertiary/30 text-tertiary"
|
|
36
36
|
),
|
|
37
37
|
whileHover: { scale: 1.05 },
|
|
38
38
|
whileTap: { scale: 0.98 },
|
|
@@ -46,19 +46,19 @@ function H({ steps: n, className: o }) {
|
|
|
46
46
|
strokeLinecap: "round",
|
|
47
47
|
strokeLinejoin: "round"
|
|
48
48
|
}
|
|
49
|
-
) }) :
|
|
49
|
+
) }) : t + 1
|
|
50
50
|
}
|
|
51
51
|
),
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */ e("h3", { className:
|
|
52
|
+
/* @__PURE__ */ a("div", { className: "space-y-0.5 pt-0.5", children: [
|
|
53
|
+
/* @__PURE__ */ e("h3", { className: s(
|
|
54
54
|
"text-sm font-medium transition-colors",
|
|
55
55
|
i.isCurrent && "text-primary",
|
|
56
|
-
i.isCompleted && "text-
|
|
57
|
-
!i.isCurrent && !i.isCompleted && "text-
|
|
56
|
+
i.isCompleted && "text-primary",
|
|
57
|
+
!i.isCurrent && !i.isCompleted && "text-tertiary"
|
|
58
58
|
), children: i.title }),
|
|
59
|
-
i.description && /* @__PURE__ */ e("p", { className:
|
|
60
|
-
"text-xs text-
|
|
61
|
-
i.isCurrent && "text-
|
|
59
|
+
i.description && /* @__PURE__ */ e("p", { className: s(
|
|
60
|
+
"text-xs text-tertiary leading-relaxed",
|
|
61
|
+
i.isCurrent && "text-tertiary/90"
|
|
62
62
|
), children: i.description })
|
|
63
63
|
] })
|
|
64
64
|
] })
|
|
@@ -68,114 +68,114 @@ function H({ steps: n, className: o }) {
|
|
|
68
68
|
)) });
|
|
69
69
|
}
|
|
70
70
|
function z({
|
|
71
|
-
children:
|
|
72
|
-
title:
|
|
71
|
+
children: o,
|
|
72
|
+
title: l,
|
|
73
73
|
sidebar: i,
|
|
74
|
-
subclassName:
|
|
74
|
+
subclassName: t
|
|
75
75
|
}) {
|
|
76
|
-
return /* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ a("div", { className: "flex h-scroll-xl overflow-hidden", children: [
|
|
77
77
|
/* @__PURE__ */ e(
|
|
78
|
-
|
|
78
|
+
r.div,
|
|
79
79
|
{
|
|
80
|
-
className: "border-r bg-gradient-to-b from-
|
|
80
|
+
className: "border-r bg-gradient-to-b from-hover/30 to-hover/60 sticky top-0 self-start h-full max-h-[calc(100vh-10rem)]",
|
|
81
81
|
initial: { opacity: 0, x: -10 },
|
|
82
82
|
animate: { opacity: 1, x: 0 },
|
|
83
83
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
84
84
|
children: i
|
|
85
85
|
}
|
|
86
86
|
),
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
|
|
87
|
+
/* @__PURE__ */ a(
|
|
88
|
+
r.div,
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
90
|
+
className: s("flex-1 px-5 py-4 overflow-y-auto", t),
|
|
91
91
|
initial: { opacity: 0, x: 5 },
|
|
92
92
|
animate: { opacity: 1, x: 0 },
|
|
93
93
|
transition: { duration: 0.3, delay: 0.1, ease: "easeInOut" },
|
|
94
94
|
children: [
|
|
95
|
-
|
|
96
|
-
/* @__PURE__ */ e("div", { className: "h-full", children:
|
|
95
|
+
l && /* @__PURE__ */ e("div", { className: "flex items-center mb-5", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-primary", children: l }) }),
|
|
96
|
+
/* @__PURE__ */ e("div", { className: "h-full", children: o })
|
|
97
97
|
]
|
|
98
98
|
}
|
|
99
99
|
)
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
102
|
function P({
|
|
103
|
-
isOpen:
|
|
104
|
-
onClose:
|
|
103
|
+
isOpen: o,
|
|
104
|
+
onClose: l,
|
|
105
105
|
title: i,
|
|
106
|
-
description:
|
|
106
|
+
description: t,
|
|
107
107
|
icon: c,
|
|
108
|
-
currentStep:
|
|
108
|
+
currentStep: n,
|
|
109
109
|
totalSteps: d,
|
|
110
|
-
onBack:
|
|
111
|
-
onNext:
|
|
112
|
-
onComplete:
|
|
113
|
-
sidebar:
|
|
114
|
-
children:
|
|
115
|
-
continueText:
|
|
116
|
-
completeText:
|
|
117
|
-
isNextDisabled:
|
|
118
|
-
isNextLoading:
|
|
119
|
-
size:
|
|
110
|
+
onBack: y,
|
|
111
|
+
onNext: x,
|
|
112
|
+
onComplete: u,
|
|
113
|
+
sidebar: f,
|
|
114
|
+
children: v,
|
|
115
|
+
continueText: b = "Continue",
|
|
116
|
+
completeText: N = "Complete",
|
|
117
|
+
isNextDisabled: h = !1,
|
|
118
|
+
isNextLoading: p = !1,
|
|
119
|
+
size: g = "2xl",
|
|
120
120
|
stepLayoutSubclassName: w,
|
|
121
121
|
isShowBackButton: C = !0,
|
|
122
122
|
isModelContentScrollable: k = !1
|
|
123
123
|
}) {
|
|
124
|
-
const j = (
|
|
125
|
-
return /* @__PURE__ */
|
|
124
|
+
const j = (n + 1) / d * 100;
|
|
125
|
+
return /* @__PURE__ */ a(
|
|
126
126
|
O,
|
|
127
127
|
{
|
|
128
|
-
isOpen:
|
|
129
|
-
onClose:
|
|
130
|
-
size:
|
|
128
|
+
isOpen: o,
|
|
129
|
+
onClose: l,
|
|
130
|
+
size: g,
|
|
131
131
|
showClose: !0,
|
|
132
132
|
title: i,
|
|
133
133
|
isContentScrollable: k,
|
|
134
|
-
description:
|
|
134
|
+
description: t,
|
|
135
135
|
icon: c && /* @__PURE__ */ e("div", { className: "bg-primary/10 p-2 rounded-full", children: /* @__PURE__ */ e(c, { className: "h-5 w-5 text-primary" }) }),
|
|
136
136
|
contentClassName: "px-0 pt-0 pb-0",
|
|
137
|
-
footer: /* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */ e("div", { className: "flex-1", children:
|
|
137
|
+
footer: /* @__PURE__ */ a("div", { className: "w-full flex items-center justify-between", children: [
|
|
138
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: n > 0 && C && /* @__PURE__ */ e(
|
|
139
139
|
m,
|
|
140
140
|
{
|
|
141
141
|
variant: "ghost",
|
|
142
|
-
onClick:
|
|
142
|
+
onClick: y,
|
|
143
143
|
size: "sm",
|
|
144
|
-
className: "text-
|
|
144
|
+
className: "text-tertiary hover:text-primary transition-colors",
|
|
145
145
|
children: "Back"
|
|
146
146
|
}
|
|
147
147
|
) }),
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ a("div", { className: "flex-1 flex justify-center text-xs text-tertiary", children: [
|
|
149
149
|
"Step ",
|
|
150
|
-
|
|
150
|
+
n + 1,
|
|
151
151
|
" of ",
|
|
152
152
|
d
|
|
153
153
|
] }),
|
|
154
|
-
/* @__PURE__ */ e("div", { className: "flex-1 flex justify-end", children:
|
|
154
|
+
/* @__PURE__ */ e("div", { className: "flex-1 flex justify-end", children: n < d - 1 ? /* @__PURE__ */ e(
|
|
155
155
|
m,
|
|
156
156
|
{
|
|
157
|
-
onClick:
|
|
158
|
-
disabled:
|
|
159
|
-
isLoading:
|
|
157
|
+
onClick: x,
|
|
158
|
+
disabled: h,
|
|
159
|
+
isLoading: p,
|
|
160
160
|
size: "sm",
|
|
161
|
-
className: "bg-primary text-
|
|
162
|
-
children:
|
|
161
|
+
className: "bg-primary text-white hover:bg-primary/90",
|
|
162
|
+
children: b
|
|
163
163
|
}
|
|
164
164
|
) : /* @__PURE__ */ e(
|
|
165
165
|
m,
|
|
166
166
|
{
|
|
167
|
-
onClick:
|
|
168
|
-
disabled:
|
|
169
|
-
isLoading:
|
|
167
|
+
onClick: u,
|
|
168
|
+
disabled: h,
|
|
169
|
+
isLoading: p,
|
|
170
170
|
size: "sm",
|
|
171
|
-
className: "bg-primary text-
|
|
172
|
-
children:
|
|
171
|
+
className: "bg-primary text-white hover:bg-primary/90",
|
|
172
|
+
children: N
|
|
173
173
|
}
|
|
174
174
|
) })
|
|
175
175
|
] }),
|
|
176
176
|
children: [
|
|
177
|
-
/* @__PURE__ */ e("div", { className: "w-full h-0.5 bg-
|
|
178
|
-
|
|
177
|
+
/* @__PURE__ */ e("div", { className: "w-full h-0.5 bg-hover relative mb-1", children: /* @__PURE__ */ e(
|
|
178
|
+
r.div,
|
|
179
179
|
{
|
|
180
180
|
className: "absolute top-0 left-0 h-full bg-primary",
|
|
181
181
|
initial: { width: 0 },
|
|
@@ -186,19 +186,19 @@ function P({
|
|
|
186
186
|
/* @__PURE__ */ e(
|
|
187
187
|
z,
|
|
188
188
|
{
|
|
189
|
-
sidebar:
|
|
189
|
+
sidebar: f,
|
|
190
190
|
subclassName: w,
|
|
191
191
|
children: /* @__PURE__ */ e(L, { mode: "wait", children: /* @__PURE__ */ e(
|
|
192
|
-
|
|
192
|
+
r.div,
|
|
193
193
|
{
|
|
194
194
|
initial: { opacity: 0, y: 10 },
|
|
195
195
|
animate: { opacity: 1, y: 0 },
|
|
196
196
|
exit: { opacity: 0, y: -10 },
|
|
197
197
|
transition: { duration: 0.25, ease: "easeInOut" },
|
|
198
198
|
className: "h-full",
|
|
199
|
-
children:
|
|
199
|
+
children: v
|
|
200
200
|
},
|
|
201
|
-
|
|
201
|
+
n
|
|
202
202
|
) })
|
|
203
203
|
}
|
|
204
204
|
)
|