fina-react-ds 1.0.25 → 1.0.28
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 +22 -22
- package/dist/components/alert.js +26 -26
- package/dist/components/avatar.js +19 -19
- package/dist/components/badge.js +20 -20
- package/dist/components/button.js +52 -52
- package/dist/components/calendar.js +83 -83
- package/dist/components/card.js +46 -46
- package/dist/components/checkbox.js +21 -21
- package/dist/components/date-picker.js +23 -23
- package/dist/components/dialog.js +38 -38
- package/dist/components/dropdown-menu.js +23 -23
- package/dist/components/file-uploader.js +47 -47
- package/dist/components/form-switch.js +9 -9
- package/dist/components/form.js +15 -15
- package/dist/components/hover-card.js +5 -5
- package/dist/components/input.js +15 -15
- package/dist/components/label.js +17 -17
- package/dist/components/mode-toggle.js +17 -17
- package/dist/components/pagination.js +25 -25
- package/dist/components/popover.js +8 -8
- package/dist/components/select.js +38 -38
- package/dist/components/sheet.js +78 -76
- package/dist/components/sidebar.js +198 -198
- package/dist/components/skeleton.js +7 -7
- package/dist/components/sonner.js +3 -3
- package/dist/components/switch.js +20 -20
- package/dist/components/table.js +44 -44
- package/dist/components/tabs.js +29 -29
- package/dist/components/textarea.js +12 -12
- package/dist/components/tooltip.js +14 -14
- package/dist/providers/loader-provider.js +7 -7
- package/dist/themes/base.css +985 -884
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var n = Object.defineProperty;
|
|
2
2
|
var o = (e, t) => n(e, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
import { cn as a } from "../lib/utils.js";
|
|
5
|
+
function d({ className: e, ...t }) {
|
|
6
|
+
return /* @__PURE__ */ r(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "skeleton",
|
|
10
|
-
className:
|
|
10
|
+
className: a("bg-accent animate-pulse rounded-md", e),
|
|
11
11
|
...t
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
-
o(
|
|
15
|
+
o(d, "Skeleton");
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
d as Skeleton
|
|
18
18
|
};
|
|
@@ -3,13 +3,13 @@ var e = (r, o) => t(r, "name", { value: o, configurable: !0 });
|
|
|
3
3
|
import { jsx as s } from "react/jsx-runtime";
|
|
4
4
|
import { useTheme as a } from "next-themes";
|
|
5
5
|
import { Toaster as m } from "sonner";
|
|
6
|
-
const
|
|
6
|
+
const f = /* @__PURE__ */ e(({ ...r }) => {
|
|
7
7
|
const { theme: o = "system" } = a();
|
|
8
8
|
return /* @__PURE__ */ s(
|
|
9
9
|
m,
|
|
10
10
|
{
|
|
11
11
|
theme: o,
|
|
12
|
-
className: "
|
|
12
|
+
className: "toaster group",
|
|
13
13
|
style: {
|
|
14
14
|
"--normal-bg": "var(--popover)",
|
|
15
15
|
"--normal-text": "var(--popover-foreground)",
|
|
@@ -20,5 +20,5 @@ const l = /* @__PURE__ */ e(({ ...r }) => {
|
|
|
20
20
|
);
|
|
21
21
|
}, "Toaster");
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
f as Toaster
|
|
24
24
|
};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { Switch as
|
|
5
|
-
import { cn as
|
|
6
|
-
function
|
|
7
|
-
className:
|
|
8
|
-
...
|
|
1
|
+
var o = Object.defineProperty;
|
|
2
|
+
var r = (t, e) => o(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { Switch as i } from "radix-ui";
|
|
5
|
+
import { cn as n } from "../lib/utils.js";
|
|
6
|
+
function u({
|
|
7
|
+
className: t,
|
|
8
|
+
...e
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ a(
|
|
11
|
+
i.Root,
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "switch",
|
|
14
|
-
className:
|
|
15
|
-
"
|
|
16
|
-
|
|
14
|
+
className: n(
|
|
15
|
+
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input-border focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
t
|
|
17
17
|
),
|
|
18
|
-
...
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
|
|
18
|
+
...e,
|
|
19
|
+
children: /* @__PURE__ */ a(
|
|
20
|
+
i.Thumb,
|
|
21
21
|
{
|
|
22
22
|
"data-slot": "switch-thumb",
|
|
23
|
-
className:
|
|
24
|
-
"
|
|
23
|
+
className: n(
|
|
24
|
+
"bg-input dark:bg-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
25
25
|
)
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
r(u, "Switch");
|
|
32
32
|
export {
|
|
33
|
-
|
|
33
|
+
u as Switch
|
|
34
34
|
};
|
package/dist/components/table.js
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
var
|
|
2
|
-
var a = (t, e) =>
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var a = (t, e) => r(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
import { cn as l } from "../lib/utils.js";
|
|
5
|
+
function b({ className: t, ...e }) {
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "table-container",
|
|
10
|
-
className: "
|
|
11
|
-
children: /* @__PURE__ */
|
|
10
|
+
className: "relative w-full overflow-x-auto",
|
|
11
|
+
children: /* @__PURE__ */ o(
|
|
12
12
|
"table",
|
|
13
13
|
{
|
|
14
14
|
"data-slot": "table",
|
|
15
|
-
className:
|
|
15
|
+
className: l("w-full caption-bottom text-sm", t),
|
|
16
16
|
...e
|
|
17
17
|
}
|
|
18
18
|
)
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
a(
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */
|
|
22
|
+
a(b, "Table");
|
|
23
|
+
function d({ className: t, ...e }) {
|
|
24
|
+
return /* @__PURE__ */ o(
|
|
25
25
|
"thead",
|
|
26
26
|
{
|
|
27
27
|
"data-slot": "table-header",
|
|
28
|
-
className:
|
|
28
|
+
className: l("[&_tr]:border-b", t),
|
|
29
29
|
...e
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
a(
|
|
34
|
-
function
|
|
35
|
-
return /* @__PURE__ */
|
|
33
|
+
a(d, "TableHeader");
|
|
34
|
+
function i({ className: t, ...e }) {
|
|
35
|
+
return /* @__PURE__ */ o(
|
|
36
36
|
"tbody",
|
|
37
37
|
{
|
|
38
38
|
"data-slot": "table-body",
|
|
39
|
-
className:
|
|
39
|
+
className: l("[&_tr:last-child]:border-0", t),
|
|
40
40
|
...e
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
a(
|
|
45
|
-
function
|
|
46
|
-
return /* @__PURE__ */
|
|
44
|
+
a(i, "TableBody");
|
|
45
|
+
function m({ className: t, ...e }) {
|
|
46
|
+
return /* @__PURE__ */ o(
|
|
47
47
|
"tfoot",
|
|
48
48
|
{
|
|
49
49
|
"data-slot": "table-footer",
|
|
50
|
-
className:
|
|
51
|
-
"
|
|
50
|
+
className: l(
|
|
51
|
+
"bg-accent/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
52
52
|
t
|
|
53
53
|
),
|
|
54
54
|
...e
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
a(
|
|
59
|
-
function
|
|
60
|
-
return /* @__PURE__ */
|
|
58
|
+
a(m, "TableFooter");
|
|
59
|
+
function u({ className: t, ...e }) {
|
|
60
|
+
return /* @__PURE__ */ o(
|
|
61
61
|
"tr",
|
|
62
62
|
{
|
|
63
63
|
"data-slot": "table-row",
|
|
64
|
-
className:
|
|
65
|
-
"
|
|
64
|
+
className: l(
|
|
65
|
+
"hover:bg-accent/50 data-[state=selected]:bg-accent border-b transition-colors",
|
|
66
66
|
t
|
|
67
67
|
),
|
|
68
68
|
...e
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
a(
|
|
73
|
-
function
|
|
74
|
-
return /* @__PURE__ */
|
|
72
|
+
a(u, "TableRow");
|
|
73
|
+
function f({ className: t, ...e }) {
|
|
74
|
+
return /* @__PURE__ */ o(
|
|
75
75
|
"th",
|
|
76
76
|
{
|
|
77
77
|
"data-slot": "table-head",
|
|
78
|
-
className:
|
|
79
|
-
"
|
|
78
|
+
className: l(
|
|
79
|
+
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
80
80
|
t
|
|
81
81
|
),
|
|
82
82
|
...e
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
|
-
a(
|
|
86
|
+
a(f, "TableHead");
|
|
87
87
|
function p({ className: t, ...e }) {
|
|
88
|
-
return /* @__PURE__ */
|
|
88
|
+
return /* @__PURE__ */ o(
|
|
89
89
|
"td",
|
|
90
90
|
{
|
|
91
91
|
"data-slot": "table-cell",
|
|
92
|
-
className:
|
|
93
|
-
"
|
|
92
|
+
className: l(
|
|
93
|
+
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
94
94
|
t
|
|
95
95
|
),
|
|
96
96
|
...e
|
|
@@ -102,23 +102,23 @@ function h({
|
|
|
102
102
|
className: t,
|
|
103
103
|
...e
|
|
104
104
|
}) {
|
|
105
|
-
return /* @__PURE__ */
|
|
105
|
+
return /* @__PURE__ */ o(
|
|
106
106
|
"caption",
|
|
107
107
|
{
|
|
108
108
|
"data-slot": "table-caption",
|
|
109
|
-
className:
|
|
109
|
+
className: l("text-muted mt-4 text-sm", t),
|
|
110
110
|
...e
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
114
|
a(h, "TableCaption");
|
|
115
115
|
export {
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
b as Table,
|
|
117
|
+
i as TableBody,
|
|
118
118
|
h as TableCaption,
|
|
119
119
|
p as TableCell,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
m as TableFooter,
|
|
121
|
+
f as TableHead,
|
|
122
|
+
d as TableHeader,
|
|
123
|
+
u as TableRow
|
|
124
124
|
};
|
package/dist/components/tabs.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { Tabs as
|
|
5
|
-
import { cn as
|
|
6
|
-
function
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var s = (t, e) => n(t, "name", { value: e, configurable: !0 });
|
|
3
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
4
|
+
import { Tabs as r } from "radix-ui";
|
|
5
|
+
import { cn as i } from "../lib/utils.js";
|
|
6
|
+
function u({
|
|
7
7
|
className: t,
|
|
8
8
|
...e
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ a(
|
|
11
|
+
r.Root,
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "tabs",
|
|
14
|
-
className:
|
|
14
|
+
className: i("flex flex-col gap-2", t),
|
|
15
15
|
...e
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
function
|
|
19
|
+
s(u, "Tabs");
|
|
20
|
+
function b({
|
|
21
21
|
className: t,
|
|
22
22
|
...e
|
|
23
23
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
return /* @__PURE__ */ a(
|
|
25
|
+
r.List,
|
|
26
26
|
{
|
|
27
27
|
"data-slot": "tabs-list",
|
|
28
|
-
className:
|
|
29
|
-
"
|
|
28
|
+
className: i(
|
|
29
|
+
"bg-tabs text-muted inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
30
30
|
t
|
|
31
31
|
),
|
|
32
32
|
...e
|
|
33
33
|
}
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
function
|
|
36
|
+
s(b, "TabsList");
|
|
37
|
+
function f({
|
|
38
38
|
className: t,
|
|
39
39
|
...e
|
|
40
40
|
}) {
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
|
|
41
|
+
return /* @__PURE__ */ a(
|
|
42
|
+
r.Trigger,
|
|
43
43
|
{
|
|
44
44
|
"data-slot": "tabs-trigger",
|
|
45
|
-
className:
|
|
46
|
-
"
|
|
45
|
+
className: i(
|
|
46
|
+
"cursor-pointer data-[state=active]:bg-primary data-[state=active]:text-primary-foreground focus-visible:border-ring focus-visible:ring-primary/50 focus-visible:outline-ring dark:data-[state=active]:border-input text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
47
47
|
t
|
|
48
48
|
),
|
|
49
49
|
...e
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
s(f, "TabsTrigger");
|
|
54
54
|
function p({
|
|
55
55
|
className: t,
|
|
56
56
|
...e
|
|
57
57
|
}) {
|
|
58
|
-
return /* @__PURE__ */
|
|
59
|
-
|
|
58
|
+
return /* @__PURE__ */ a(
|
|
59
|
+
r.Content,
|
|
60
60
|
{
|
|
61
61
|
"data-slot": "tabs-content",
|
|
62
|
-
className:
|
|
62
|
+
className: i("flex-1 outline-none", t),
|
|
63
63
|
...e
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
s(p, "TabsContent");
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
u as Tabs,
|
|
70
70
|
p as TabsContent,
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
b as TabsList,
|
|
72
|
+
f as TabsTrigger
|
|
73
73
|
};
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var i = (e, r) =>
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
var t = Object.defineProperty;
|
|
2
|
+
var i = (e, r) => t(e, "name", { value: r, configurable: !0 });
|
|
3
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
|
+
import { cn as a } from "../lib/utils.js";
|
|
5
|
+
function l({ className: e, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
7
|
"textarea",
|
|
8
8
|
{
|
|
9
9
|
"data-slot": "textarea",
|
|
10
|
-
className:
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
10
|
+
className: a(
|
|
11
|
+
"bg-input border-input-border placeholder:text-placeholder flex field-sizing-content min-h-16 w-full rounded-md border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
13
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
14
14
|
e
|
|
15
15
|
),
|
|
16
16
|
...r
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
i(
|
|
20
|
+
i(l, "Textarea");
|
|
21
21
|
export {
|
|
22
|
-
|
|
22
|
+
l as Textarea
|
|
23
23
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var e = (t, r) =>
|
|
3
|
-
import { jsx as i, jsxs as
|
|
1
|
+
var n = Object.defineProperty;
|
|
2
|
+
var e = (t, r) => n(t, "name", { value: r, configurable: !0 });
|
|
3
|
+
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
4
4
|
import { Tooltip as o } from "radix-ui";
|
|
5
|
-
import { cn as
|
|
6
|
-
function
|
|
5
|
+
import { cn as s } from "../lib/utils.js";
|
|
6
|
+
function p({
|
|
7
7
|
delayDuration: t = 0,
|
|
8
8
|
...r
|
|
9
9
|
}) {
|
|
@@ -16,11 +16,11 @@ function l({
|
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
e(
|
|
19
|
+
e(p, "TooltipProvider");
|
|
20
20
|
function g({
|
|
21
21
|
...t
|
|
22
22
|
}) {
|
|
23
|
-
return /* @__PURE__ */ i(
|
|
23
|
+
return /* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(o.Root, { "data-slot": "tooltip", ...t }) });
|
|
24
24
|
}
|
|
25
25
|
e(g, "Tooltip");
|
|
26
26
|
function x({
|
|
@@ -33,21 +33,21 @@ function T({
|
|
|
33
33
|
className: t,
|
|
34
34
|
sideOffset: r = 0,
|
|
35
35
|
children: a,
|
|
36
|
-
...
|
|
36
|
+
...d
|
|
37
37
|
}) {
|
|
38
|
-
return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ i(o.Portal, { children: /* @__PURE__ */ l(
|
|
39
39
|
o.Content,
|
|
40
40
|
{
|
|
41
41
|
"data-slot": "tooltip-content",
|
|
42
42
|
sideOffset: r,
|
|
43
|
-
className:
|
|
44
|
-
"
|
|
43
|
+
className: s(
|
|
44
|
+
"bg-dark text-dark-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
45
45
|
t
|
|
46
46
|
),
|
|
47
|
-
...
|
|
47
|
+
...d,
|
|
48
48
|
children: [
|
|
49
49
|
a,
|
|
50
|
-
/* @__PURE__ */ i(o.Arrow, { className: "
|
|
50
|
+
/* @__PURE__ */ i(o.Arrow, { className: "bg-dark fill-dark z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
51
51
|
]
|
|
52
52
|
}
|
|
53
53
|
) });
|
|
@@ -56,6 +56,6 @@ e(T, "TooltipContent");
|
|
|
56
56
|
export {
|
|
57
57
|
g as Tooltip,
|
|
58
58
|
T as TooltipContent,
|
|
59
|
-
|
|
59
|
+
p as TooltipProvider,
|
|
60
60
|
x as TooltipTrigger
|
|
61
61
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var t = (e, o) =>
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { useState as
|
|
1
|
+
var l = Object.defineProperty;
|
|
2
|
+
var t = (e, o) => l(e, "name", { value: o, configurable: !0 });
|
|
3
|
+
import { jsxs as u, jsx as c } from "react/jsx-runtime";
|
|
4
|
+
import { useState as f, createContext as m, useContext as g } from "react";
|
|
5
5
|
import { toast as h } from "sonner";
|
|
6
6
|
const v = {
|
|
7
7
|
isLoading: !1,
|
|
8
8
|
loadingWithToast: /* @__PURE__ */ t(() => null, "loadingWithToast")
|
|
9
9
|
}, s = m(v);
|
|
10
10
|
function P({ children: e, ...o }) {
|
|
11
|
-
const [r, i] =
|
|
11
|
+
const [r, i] = f(!1), d = {
|
|
12
12
|
isLoading: r,
|
|
13
13
|
loadingWithToast: /* @__PURE__ */ t((a, n) => {
|
|
14
14
|
i(!0), n.loading || (n.loading = "Chargement en cours"), h.promise(a, n), a.finally(() => {
|
|
@@ -16,9 +16,9 @@ function P({ children: e, ...o }) {
|
|
|
16
16
|
});
|
|
17
17
|
}, "loadingWithToast")
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ u(s.Provider, { ...o, value: d, children: [
|
|
20
20
|
e,
|
|
21
|
-
r && /* @__PURE__ */
|
|
21
|
+
r && /* @__PURE__ */ c("div", { className: "fixed inset-0 z-9999 bg-transparent pointer-events-auto" })
|
|
22
22
|
] });
|
|
23
23
|
}
|
|
24
24
|
t(P, "LoaderProvider");
|