@situaction/traq-ui-ste 1.2.13 → 1.2.15
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/X.es-BEJ-zMPl.mjs +146 -0
- package/dist/components/button/Button.js +36 -36
- package/dist/components/calendar/Calendar.js +210 -214
- package/dist/components/drag-and-drop/DragAndDrop.d.ts +31 -0
- package/dist/components/drag-and-drop/DragAndDrop.js +143 -0
- package/dist/components/icon/Icon.js +23729 -46405
- package/dist/components/icon-button/IconButton.js +27 -27
- package/dist/components/input/Input.js +49 -49
- package/dist/components/loading/Loading.d.ts +38 -0
- package/dist/components/loading/Loading.js +87 -0
- package/dist/components/menu/Menu.js +60 -63
- package/dist/components/panel/side-panel/SidePanel.js +18 -19
- package/dist/components/select/Select.js +67 -69
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +8 -9
- package/dist/components/select-multi-items/SelectMultiItems.js +18 -18
- package/dist/components/tag/Tag.js +25 -25
- package/dist/components/theme/variables_dark.d.ts +11 -0
- package/dist/components/theme/variables_dark.js +12 -1
- package/dist/components/theme/variables_light.d.ts +11 -0
- package/dist/components/theme/variables_light.js +12 -1
- package/dist/components/toast/Toast.js +38 -38
- package/dist/main.d.ts +2 -0
- package/dist/main.js +29 -25
- package/dist/styles/Button.css +1 -1
- package/dist/styles/DragAndDrop.css +1 -0
- package/dist/styles/IconButton.css +1 -1
- package/dist/styles/Input.css +1 -1
- package/dist/styles/Loading.css +1 -0
- package/dist/styles/Tag.css +1 -1
- package/dist/styles/Toast.css +1 -1
- package/package.json +1 -1
- package/dist/X-Bd1VjKAF.mjs +0 -190
|
@@ -1,59 +1,57 @@
|
|
|
1
1
|
import { jsxs as L, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as y, useRef as v, useEffect as d } from "react";
|
|
3
3
|
import { Button as W } from "../button/Button.js";
|
|
4
|
-
import { Input as
|
|
5
|
-
import { IconButton as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { Modal as
|
|
4
|
+
import { Input as G } from "../input/Input.js";
|
|
5
|
+
import { IconButton as H } from "../icon-button/IconButton.js";
|
|
6
|
+
import { Icon as _ } from "../icon/Icon.js";
|
|
7
|
+
import { Modal as J } from "../modal/Modal.js";
|
|
8
8
|
import "../theme/ThemeContext.js";
|
|
9
9
|
import '../../styles/Size.css';import '../../styles/Select.css';/* empty css */
|
|
10
|
-
const
|
|
11
|
-
selectContainer:
|
|
12
|
-
selected: Q,
|
|
10
|
+
const Q = "_selectContainer_133eb_54", X = "_children_133eb_61", Y = "_active_133eb_78", Z = "_selectList_133eb_82", O = "_modal_133eb_91", I = "_itemLabel_133eb_98", ee = "_searchWrapper_133eb_103", te = "_noResults_133eb_109", f = {
|
|
11
|
+
selectContainer: Q,
|
|
13
12
|
children: X,
|
|
14
13
|
active: Y,
|
|
15
14
|
selectList: Z,
|
|
16
15
|
modal: O,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, he = ({
|
|
16
|
+
itemLabel: I,
|
|
17
|
+
searchWrapper: ee,
|
|
18
|
+
noResults: te
|
|
19
|
+
}, de = ({
|
|
22
20
|
selected: k,
|
|
23
21
|
size: g = "m",
|
|
24
22
|
listItem: h,
|
|
25
23
|
modeDisplay: E = "all",
|
|
26
24
|
onSelect: B,
|
|
27
|
-
positionOverride:
|
|
25
|
+
positionOverride: b,
|
|
28
26
|
placeholder: x = "Sélectionner",
|
|
29
|
-
searchPlaceholder:
|
|
30
|
-
autoCloseCondition:
|
|
31
|
-
searchable:
|
|
27
|
+
searchPlaceholder: V,
|
|
28
|
+
autoCloseCondition: w,
|
|
29
|
+
searchable: z = !1,
|
|
32
30
|
fullWidth: T = !1
|
|
33
31
|
}) => {
|
|
34
|
-
const [t,
|
|
32
|
+
const [t, l] = y(!1), [A, K] = y({
|
|
35
33
|
top: "calc(100% + 6px)",
|
|
36
34
|
left: "0px"
|
|
37
|
-
}), [n, S] =
|
|
35
|
+
}), [n, S] = y(k ?? null), [$, F] = y(""), u = v(null), j = v(null), N = v(null), P = v({}), D = v({}), p = v(null);
|
|
38
36
|
d(() => {
|
|
39
37
|
S(k || null);
|
|
40
38
|
}, [k]), d(() => {
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
44
|
-
S(e),
|
|
45
|
-
},
|
|
39
|
+
b && K(b);
|
|
40
|
+
}, [b]);
|
|
41
|
+
const M = (e) => {
|
|
42
|
+
S(e), l(!1), B && B(e);
|
|
43
|
+
}, q = () => {
|
|
46
44
|
const e = n == null ? void 0 : n.icon, r = (n == null ? void 0 : n.label) ?? x;
|
|
47
|
-
return E === "icon" && e ? /* @__PURE__ */ s(
|
|
45
|
+
return E === "icon" && e ? /* @__PURE__ */ s(H, { ref: u, mode: "tertiary", size: g, onClick: () => l(!t), children: /* @__PURE__ */ s(_, { icon: n.icon }) }) : E === "text" ? /* @__PURE__ */ s(
|
|
48
46
|
W,
|
|
49
47
|
{
|
|
50
48
|
ref: u,
|
|
51
49
|
mode: "tertiary",
|
|
52
50
|
label: n ? r : x,
|
|
53
|
-
childrenRight: /* @__PURE__ */ s(
|
|
51
|
+
childrenRight: /* @__PURE__ */ s(_, { icon: t ? "CaretUp" : "CaretDown", size: 14, weight: "bold" }),
|
|
54
52
|
size: g,
|
|
55
53
|
fullWidth: T,
|
|
56
|
-
onClick: () =>
|
|
54
|
+
onClick: () => l(!t),
|
|
57
55
|
"aria-expanded": t,
|
|
58
56
|
"aria-haspopup": "listbox"
|
|
59
57
|
}
|
|
@@ -65,9 +63,9 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
65
63
|
label: n ? r : x,
|
|
66
64
|
size: g,
|
|
67
65
|
fullWidth: T,
|
|
68
|
-
childrenLeft: e && /* @__PURE__ */ s(
|
|
69
|
-
childrenRight: /* @__PURE__ */ s(
|
|
70
|
-
onClick: () =>
|
|
66
|
+
childrenLeft: e && /* @__PURE__ */ s(_, { icon: n.icon }),
|
|
67
|
+
childrenRight: /* @__PURE__ */ s(_, { icon: t ? "CaretUp" : "CaretDown", size: 14, weight: "bold" }),
|
|
68
|
+
onClick: () => l(!t),
|
|
71
69
|
"aria-expanded": t,
|
|
72
70
|
"aria-haspopup": "listbox"
|
|
73
71
|
}
|
|
@@ -79,24 +77,24 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
79
77
|
fullWidth: T,
|
|
80
78
|
label: x ?? "Sélectionner",
|
|
81
79
|
size: g,
|
|
82
|
-
onClick: () =>
|
|
80
|
+
onClick: () => l(!t),
|
|
83
81
|
"aria-expanded": t,
|
|
84
82
|
"aria-haspopup": "listbox"
|
|
85
83
|
}
|
|
86
84
|
);
|
|
87
|
-
},
|
|
88
|
-
(e) => String(e.label ?? "").toLowerCase().includes(
|
|
89
|
-
), [C, R] =
|
|
85
|
+
}, U = h.filter(
|
|
86
|
+
(e) => String(e.label ?? "").toLowerCase().includes($.toLowerCase())
|
|
87
|
+
), [C, R] = y("");
|
|
90
88
|
return d(() => {
|
|
91
89
|
if (t) {
|
|
92
90
|
const e = (r) => {
|
|
93
91
|
const c = r.key.length === 1 ? r.key.toLowerCase() : "";
|
|
94
92
|
if (!c) return;
|
|
95
|
-
const
|
|
96
|
-
R(
|
|
93
|
+
const i = C + c;
|
|
94
|
+
R(i);
|
|
97
95
|
const o = h.find((a) => {
|
|
98
96
|
var m;
|
|
99
|
-
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(
|
|
97
|
+
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(i);
|
|
100
98
|
});
|
|
101
99
|
if (o) {
|
|
102
100
|
const a = P.current[o.value];
|
|
@@ -111,12 +109,12 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
111
109
|
if (!t) return;
|
|
112
110
|
const c = r.key.length === 1 ? r.key.toLowerCase() : "";
|
|
113
111
|
if (!c) return;
|
|
114
|
-
const
|
|
115
|
-
R(
|
|
112
|
+
const i = C + c;
|
|
113
|
+
R(i);
|
|
116
114
|
const o = h.find(
|
|
117
115
|
(a) => {
|
|
118
116
|
var m;
|
|
119
|
-
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(
|
|
117
|
+
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(i);
|
|
120
118
|
}
|
|
121
119
|
);
|
|
122
120
|
if (o && N.current && P.current[o.value]) {
|
|
@@ -131,12 +129,12 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
131
129
|
const e = (r) => {
|
|
132
130
|
const c = r.key.toLowerCase();
|
|
133
131
|
if (c.length === 1) {
|
|
134
|
-
const
|
|
132
|
+
const i = h.find((o) => {
|
|
135
133
|
var a;
|
|
136
134
|
return (a = o.label) == null ? void 0 : a.toLowerCase().startsWith(c);
|
|
137
135
|
});
|
|
138
|
-
if (
|
|
139
|
-
const o =
|
|
136
|
+
if (i) {
|
|
137
|
+
const o = D.current[i.value];
|
|
140
138
|
o && o.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
141
139
|
}
|
|
142
140
|
}
|
|
@@ -145,67 +143,67 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
145
143
|
}, [t, h]), d(() => {
|
|
146
144
|
if (t && u.current) {
|
|
147
145
|
const e = u.current.getBoundingClientRect().height;
|
|
148
|
-
|
|
146
|
+
K(b || { top: `${e + 6}px`, left: "0px" });
|
|
149
147
|
}
|
|
150
|
-
}, [t,
|
|
151
|
-
if (!t || !
|
|
148
|
+
}, [t, b]), d(() => {
|
|
149
|
+
if (!t || !w) return;
|
|
152
150
|
const e = (r) => {
|
|
153
|
-
const c = r.target,
|
|
154
|
-
|
|
151
|
+
const c = r.target, i = u.current, o = j.current;
|
|
152
|
+
i && i.contains(c) || o && o.contains(c) || l(!1);
|
|
155
153
|
};
|
|
156
154
|
return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e, { passive: !0 }), () => {
|
|
157
155
|
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
158
156
|
};
|
|
159
|
-
}, [t,
|
|
160
|
-
if (!t || !
|
|
157
|
+
}, [t, w]), d(() => {
|
|
158
|
+
if (!t || !w) return;
|
|
161
159
|
const e = (r) => {
|
|
162
|
-
r.key === "Escape" &&
|
|
160
|
+
r.key === "Escape" && l(!1);
|
|
163
161
|
};
|
|
164
162
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
165
|
-
}, [t,
|
|
166
|
-
|
|
163
|
+
}, [t, w]), /* @__PURE__ */ L("div", { className: f.selectContainer, children: [
|
|
164
|
+
q(),
|
|
167
165
|
/* @__PURE__ */ s(
|
|
168
|
-
|
|
166
|
+
J,
|
|
169
167
|
{
|
|
170
168
|
anchorRef: u,
|
|
171
169
|
open: t,
|
|
172
|
-
onClose: () =>
|
|
173
|
-
position:
|
|
170
|
+
onClose: () => l(!1),
|
|
171
|
+
position: A,
|
|
174
172
|
disableOverlay: !0,
|
|
175
173
|
className: f.modal,
|
|
176
|
-
autoCloseCondition:
|
|
177
|
-
children: /* @__PURE__ */ L("div", { ref:
|
|
178
|
-
|
|
174
|
+
autoCloseCondition: w,
|
|
175
|
+
children: /* @__PURE__ */ L("div", { ref: j, children: [
|
|
176
|
+
z && /* @__PURE__ */ L("div", { children: [
|
|
179
177
|
/* @__PURE__ */ s(
|
|
180
|
-
|
|
178
|
+
G,
|
|
181
179
|
{
|
|
182
180
|
type: "text",
|
|
183
|
-
placeholder:
|
|
181
|
+
placeholder: V,
|
|
184
182
|
status: "ghost",
|
|
185
183
|
sizeStyle: "s",
|
|
186
|
-
value:
|
|
187
|
-
onChange: (e) =>
|
|
184
|
+
value: $,
|
|
185
|
+
onChange: (e) => F(e.target.value)
|
|
188
186
|
}
|
|
189
187
|
),
|
|
190
188
|
/* @__PURE__ */ s("div", { className: f.searchWrapper })
|
|
191
189
|
] }),
|
|
192
190
|
/* @__PURE__ */ L("div", { className: f.selectList, ref: N, children: [
|
|
193
|
-
|
|
191
|
+
U.map((e) => /* @__PURE__ */ L(
|
|
194
192
|
"div",
|
|
195
193
|
{
|
|
196
|
-
ref: (r) =>
|
|
194
|
+
ref: (r) => D.current[e.value] = r,
|
|
197
195
|
className: `${f.children} ${(n == null ? void 0 : n.value) === e.value ? f.active : ""}`,
|
|
198
|
-
onClick: () =>
|
|
196
|
+
onClick: () => M(e),
|
|
199
197
|
role: "option",
|
|
200
198
|
"aria-selected": (n == null ? void 0 : n.value) === e.value,
|
|
201
199
|
children: [
|
|
202
|
-
e.icon && /* @__PURE__ */ s(
|
|
200
|
+
e.icon && /* @__PURE__ */ s(_, { icon: e.icon, size: 16 }),
|
|
203
201
|
e.label && /* @__PURE__ */ s("div", { className: f.itemLabel, children: e.label })
|
|
204
202
|
]
|
|
205
203
|
},
|
|
206
204
|
e.value
|
|
207
205
|
)),
|
|
208
|
-
|
|
206
|
+
U.length === 0 && /* @__PURE__ */ s("div", { className: `${f.noResults} textSmall`, children: "Aucun résultat" })
|
|
209
207
|
] })
|
|
210
208
|
] })
|
|
211
209
|
}
|
|
@@ -213,5 +211,5 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
213
211
|
] });
|
|
214
212
|
};
|
|
215
213
|
export {
|
|
216
|
-
|
|
214
|
+
de as Select
|
|
217
215
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import "../button/Button.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { Input as
|
|
4
|
+
import { Input as a } from "../input/Input.js";
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
6
|
import "../modal/Modal.js";
|
|
7
7
|
import "../theme/ThemeContext.js";
|
|
8
8
|
import '../../styles/Size.css';import '../../styles/SelectFilterInputTags.css';/* empty css */
|
|
9
|
-
const
|
|
10
|
-
listTagSelect:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
o,
|
|
9
|
+
const c = "_listTagSelect_2v3fb_6", p = {
|
|
10
|
+
listTagSelect: c
|
|
11
|
+
}, v = ({ children: s, inputValue: l, handleInputChange: o, handleKeyDown: i }) => /* @__PURE__ */ e("div", { className: p.listTagSelect, children: /* @__PURE__ */ r("div", { children: [
|
|
12
|
+
s,
|
|
14
13
|
/* @__PURE__ */ e("div", { className: "flexAutoSize", children: /* @__PURE__ */ e(
|
|
15
|
-
|
|
14
|
+
a,
|
|
16
15
|
{
|
|
17
16
|
type: "text",
|
|
18
17
|
value: l,
|
|
19
18
|
onKeyDown: (t) => {
|
|
20
19
|
t.key === "Enter" && i && i(t);
|
|
21
20
|
},
|
|
22
|
-
onChange: (t) =>
|
|
21
|
+
onChange: (t) => o(t.target.value),
|
|
23
22
|
autoFocus: !0,
|
|
24
23
|
placeholder: "",
|
|
25
24
|
status: "ghost",
|
|
@@ -28,5 +27,5 @@ const a = "_listTagSelect_2v3fb_6", p = "_flexAutoSize_2v3fb_24", u = {
|
|
|
28
27
|
) })
|
|
29
28
|
] }) });
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
v as SelectFilterInputTags
|
|
32
31
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useState as _, useRef as h } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { n as v, s as C, a as x } from "../../X.es-BEJ-zMPl.mjs";
|
|
4
4
|
import { Button as M } from "../button/Button.js";
|
|
5
5
|
import "../icon-button/IconButton.js";
|
|
6
|
-
import { TagCounter as
|
|
7
|
-
import { Modal as
|
|
6
|
+
import { TagCounter as w } from "../tag-counter/TagCounter.js";
|
|
7
|
+
import { Modal as y } from "../modal/Modal.js";
|
|
8
8
|
import "../theme/ThemeContext.js";
|
|
9
9
|
import '../../styles/Size.css';import '../../styles/SelectMultiItems.css';/* empty css */
|
|
10
|
-
const
|
|
11
|
-
relative:
|
|
12
|
-
tagCounter:
|
|
13
|
-
modal:
|
|
14
|
-
},
|
|
15
|
-
label:
|
|
10
|
+
const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18", r = {
|
|
11
|
+
relative: N,
|
|
12
|
+
tagCounter: R,
|
|
13
|
+
modal: b
|
|
14
|
+
}, $ = ({
|
|
15
|
+
label: i,
|
|
16
16
|
iconButton: l,
|
|
17
17
|
selectedCount: t = 0,
|
|
18
18
|
onClearSelection: n,
|
|
@@ -20,25 +20,25 @@ const y = "_relative_w7e9a_6", I = "_tagCounter_w7e9a_10", N = "_modal_w7e9a_18"
|
|
|
20
20
|
size: c = "m",
|
|
21
21
|
align: p = "right"
|
|
22
22
|
}) => {
|
|
23
|
-
const [e,
|
|
24
|
-
return /* @__PURE__ */
|
|
23
|
+
const [e, s] = _(!1), d = h(null), f = () => s(!1), g = t > 0 ? /* @__PURE__ */ o(v, { onClick: n }) : e ? /* @__PURE__ */ o(C, {}) : /* @__PURE__ */ o(x, {}), u = t > 0 ? "secondary" : "tertiary";
|
|
24
|
+
return /* @__PURE__ */ a("div", { className: r.relative, children: [
|
|
25
25
|
/* @__PURE__ */ o(
|
|
26
26
|
M,
|
|
27
27
|
{
|
|
28
|
-
label:
|
|
28
|
+
label: i,
|
|
29
29
|
mode: u,
|
|
30
30
|
size: c,
|
|
31
31
|
childrenLeft: l,
|
|
32
|
-
childrenRight: /* @__PURE__ */
|
|
33
|
-
t > 0 && /* @__PURE__ */ o(
|
|
32
|
+
childrenRight: /* @__PURE__ */ a("div", { className: r.tagCounter, children: [
|
|
33
|
+
t > 0 && /* @__PURE__ */ o(w, { size: "s", label: t }),
|
|
34
34
|
g
|
|
35
35
|
] }),
|
|
36
|
-
onClick: () =>
|
|
36
|
+
onClick: () => s(!e)
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
|
-
/* @__PURE__ */ o(
|
|
39
|
+
/* @__PURE__ */ o(y, { ref: d, open: e, onClose: f, className: r.modal, position: { top: "calc(100% + 6px)", ...p === "right" ? { left: "0" } : { right: "0" } }, children: m })
|
|
40
40
|
] });
|
|
41
41
|
};
|
|
42
42
|
export {
|
|
43
|
-
|
|
43
|
+
$ as SelectMultiItems
|
|
44
44
|
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import '../../styles/Tag.css';const
|
|
4
|
-
tag:
|
|
1
|
+
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as c } from "react";
|
|
3
|
+
import '../../styles/Tag.css';const d = "_tag_qjzpb_6", u = "_icon_qjzpb_15", b = "_label_qjzpb_70", p = "_flexHorizontalCenter_qjzpb_74", x = "_flexHorizontal_qjzpb_74", t = {
|
|
4
|
+
tag: d,
|
|
5
5
|
icon: u,
|
|
6
|
-
"tag-children": "_tag-
|
|
7
|
-
"tag-size-xl": "_tag-size-
|
|
8
|
-
"tag-size-xl-round": "_tag-size-xl-
|
|
9
|
-
"tag-size-l": "_tag-size-
|
|
10
|
-
"tag-size-l-round": "_tag-size-l-
|
|
11
|
-
"tag-size-m": "_tag-size-
|
|
12
|
-
"tag-size-m-round": "_tag-size-m-
|
|
13
|
-
"tag-size-s": "_tag-size-
|
|
14
|
-
"tag-size-s-round": "_tag-size-s-
|
|
15
|
-
label:
|
|
16
|
-
flexHorizontalCenter:
|
|
6
|
+
"tag-children": "_tag-children_qjzpb_20",
|
|
7
|
+
"tag-size-xl": "_tag-size-xl_qjzpb_30",
|
|
8
|
+
"tag-size-xl-round": "_tag-size-xl-round_qjzpb_34",
|
|
9
|
+
"tag-size-l": "_tag-size-l_qjzpb_40",
|
|
10
|
+
"tag-size-l-round": "_tag-size-l-round_qjzpb_44",
|
|
11
|
+
"tag-size-m": "_tag-size-m_qjzpb_50",
|
|
12
|
+
"tag-size-m-round": "_tag-size-m-round_qjzpb_54",
|
|
13
|
+
"tag-size-s": "_tag-size-s_qjzpb_60",
|
|
14
|
+
"tag-size-s-round": "_tag-size-s-round_qjzpb_64",
|
|
15
|
+
label: b,
|
|
16
|
+
flexHorizontalCenter: p,
|
|
17
17
|
flexHorizontal: x
|
|
18
18
|
}, s = ["light", "dark", "gray", "blue-gray", "blue", "blue-situaction", "purple", "pink", "gold", "brown", "emerald"], f = ({
|
|
19
19
|
label: n,
|
|
20
20
|
color: e,
|
|
21
|
-
deletable:
|
|
22
|
-
size:
|
|
21
|
+
deletable: r = !1,
|
|
22
|
+
size: o = "m",
|
|
23
23
|
children: i,
|
|
24
|
-
onClick:
|
|
24
|
+
onClick: l
|
|
25
25
|
}) => {
|
|
26
|
-
|
|
26
|
+
c(() => {
|
|
27
27
|
e && !s.includes(e) && console.warn(`Warning: The color "${e}" is not a valid option. Expected one of: ${s.join(", ")}.`);
|
|
28
28
|
}, [e]);
|
|
29
29
|
const _ = [
|
|
30
30
|
t.tag,
|
|
31
|
-
i && !n && t[`tag-size-${
|
|
32
|
-
t[`tag-size-${
|
|
31
|
+
i && !n && t[`tag-size-${o}-round`],
|
|
32
|
+
t[`tag-size-${o}`],
|
|
33
33
|
t.flexHorizontalCenter
|
|
34
|
-
].join(" "),
|
|
34
|
+
].join(" "), z = {
|
|
35
35
|
"--dynamic-background": e && s.includes(e) ? `var(--color-${e}-200)` : "var(--color-blue-situaction-200)",
|
|
36
36
|
"--dynamic-color-text": e && s.includes(e) ? `var(--color-${e}-950)` : "var(--color-blue-situaction-950)"
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ g(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
41
|
className: _,
|
|
42
|
-
style:
|
|
42
|
+
style: z,
|
|
43
43
|
children: [
|
|
44
44
|
i && /* @__PURE__ */ a("div", { className: `${t.flexHorizontalCenter} ${t["tag-children"]}`, children: i }),
|
|
45
45
|
n && /* @__PURE__ */ a("label", { className: `${t.flexHorizontal} ${t.label}`, children: n }),
|
|
46
|
-
|
|
46
|
+
r && /* @__PURE__ */ a("div", { className: t.icon, onClick: () => l == null ? void 0 : l(), children: /* @__PURE__ */ a(
|
|
47
47
|
"svg",
|
|
48
48
|
{
|
|
49
49
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -222,4 +222,15 @@ export declare const variables_dark: {
|
|
|
222
222
|
'--archive-background-tab': string;
|
|
223
223
|
'--archive-border': string;
|
|
224
224
|
'--archive-icon-text-tab': string;
|
|
225
|
+
'--calendar-cell-base-disabled-num': string;
|
|
226
|
+
'--calendar-cell-base-disabled-background': string;
|
|
227
|
+
'--drag-n-drop-background-active': string;
|
|
228
|
+
'--drag-n-drop-title-icon': string;
|
|
229
|
+
'--drag-n-drop-subtitle': string;
|
|
230
|
+
'--spinner-background-stroke': string;
|
|
231
|
+
'--spinner-background': string;
|
|
232
|
+
'--spinner-icons': string;
|
|
233
|
+
'--carrousel-0-gradient': string;
|
|
234
|
+
'--carrousel-100-gradient': string;
|
|
235
|
+
'--carrousel-card-img-title': string;
|
|
225
236
|
};
|
|
@@ -221,7 +221,18 @@ const r = {
|
|
|
221
221
|
"--switch-default-on-background": "var(--color-light-100)",
|
|
222
222
|
"--archive-background-tab": "var(--color-purple-dark-100)",
|
|
223
223
|
"--archive-border": "var(--color-purple-dark-100)",
|
|
224
|
-
"--archive-icon-text-tab": "var(--color-purple-dark-950)"
|
|
224
|
+
"--archive-icon-text-tab": "var(--color-purple-dark-950)",
|
|
225
|
+
"--calendar-cell-base-disabled-num": "var(--color-light-30)",
|
|
226
|
+
"--calendar-cell-base-disabled-background": "var(--color-purple-trans-20)",
|
|
227
|
+
"--drag-n-drop-background-active": "var(--color-light-5)",
|
|
228
|
+
"--drag-n-drop-title-icon": "var(--general-text-icons)",
|
|
229
|
+
"--drag-n-drop-subtitle": "var(--color-light-50)",
|
|
230
|
+
"--spinner-background-stroke": "var(--color-purple-trans-60)",
|
|
231
|
+
"--spinner-background": "var(--color-purple-trans-60)",
|
|
232
|
+
"--spinner-icons": "var(--general-text-icons)",
|
|
233
|
+
"--carrousel-0-gradient": "#2F2B37",
|
|
234
|
+
"--carrousel-100-gradient": "var(--background-primary)",
|
|
235
|
+
"--carrousel-card-img-title": "var(--color-gray-trans-100)"
|
|
225
236
|
};
|
|
226
237
|
export {
|
|
227
238
|
r as variables_dark
|
|
@@ -222,4 +222,15 @@ export declare const variables_light: {
|
|
|
222
222
|
'--archive-background-tab': string;
|
|
223
223
|
'--archive-border': string;
|
|
224
224
|
'--archive-icon-text-tab': string;
|
|
225
|
+
'--calendar-cell-base-disabled-num': string;
|
|
226
|
+
'--calendar-cell-base-disabled-background': string;
|
|
227
|
+
'--drag-n-drop-background-active': string;
|
|
228
|
+
'--drag-n-drop-title-icon': string;
|
|
229
|
+
'--drag-n-drop-subtitle': string;
|
|
230
|
+
'--spinner-background-stroke': string;
|
|
231
|
+
'--spinner-background': string;
|
|
232
|
+
'--spinner-icons': string;
|
|
233
|
+
'--carrousel-0-gradient': string;
|
|
234
|
+
'--carrousel-100-gradient': string;
|
|
235
|
+
'--carrousel-card-img-title': string;
|
|
225
236
|
};
|
|
@@ -221,7 +221,18 @@ const r = {
|
|
|
221
221
|
"--switch-default-on-background": "var(--color-purple-dark-950)",
|
|
222
222
|
"--archive-background-tab": "var(--color-purple-dark-950)",
|
|
223
223
|
"--archive-border": "var(--color-purple-dark-950)",
|
|
224
|
-
"--archive-icon-text-tab": "var(--color-light-100)"
|
|
224
|
+
"--archive-icon-text-tab": "var(--color-light-100)",
|
|
225
|
+
"--calendar-cell-base-disabled-num": "var(--color-gray-trans-50)",
|
|
226
|
+
"--calendar-cell-base-disabled-background": "var(--color-gray-trans-20)",
|
|
227
|
+
"--drag-n-drop-background-active": "var(--color-sable-trans-10)",
|
|
228
|
+
"--drag-n-drop-title-icon": "var(--general-text-icons)",
|
|
229
|
+
"--drag-n-drop-subtitle": "var(--color-dark-50)",
|
|
230
|
+
"--spinner-background-stroke": "var(--color-sable-trans-60)",
|
|
231
|
+
"--spinner-background": "var(--color-sable-trans-60)",
|
|
232
|
+
"--spinner-icons": "var(--color-purple-dark-900)",
|
|
233
|
+
"--carrousel-0-gradient": "#FFFFFF",
|
|
234
|
+
"--carrousel-100-gradient": "var(--background-primary)",
|
|
235
|
+
"--carrousel-card-img-title": "var(--color-gray-trans-100)"
|
|
225
236
|
};
|
|
226
237
|
export {
|
|
227
238
|
r as variables_light
|
|
@@ -1,62 +1,62 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { IconButton as
|
|
5
|
-
import '../../styles/Toast.css';const
|
|
6
|
-
toast:
|
|
7
|
-
"toast-header": "_toast-
|
|
8
|
-
"toast-title-container": "_toast-title-
|
|
9
|
-
"toast-title": "_toast-
|
|
10
|
-
"toast-content": "_toast-
|
|
11
|
-
base:
|
|
12
|
-
success:
|
|
2
|
+
import { useState as u, useEffect as h } from "react";
|
|
3
|
+
import { Icon as j } from "../icon/Icon.js";
|
|
4
|
+
import { IconButton as x } from "../icon-button/IconButton.js";
|
|
5
|
+
import '../../styles/Toast.css';const C = "_toast_1ygaj_30", I = "_base_1ygaj_69", z = "_success_1ygaj_73", k = "_error_1ygaj_77", w = "_closing_1ygaj_104", t = {
|
|
6
|
+
toast: C,
|
|
7
|
+
"toast-header": "_toast-header_1ygaj_49",
|
|
8
|
+
"toast-title-container": "_toast-title-container_1ygaj_55",
|
|
9
|
+
"toast-title": "_toast-title_1ygaj_55",
|
|
10
|
+
"toast-content": "_toast-content_1ygaj_65",
|
|
11
|
+
base: I,
|
|
12
|
+
success: z,
|
|
13
13
|
error: k,
|
|
14
|
-
"bottom-right": "_bottom-
|
|
15
|
-
"bottom-left": "_bottom-
|
|
16
|
-
"top-right": "_top-
|
|
17
|
-
"top-left": "_top-
|
|
18
|
-
closing:
|
|
19
|
-
},
|
|
14
|
+
"bottom-right": "_bottom-right_1ygaj_84",
|
|
15
|
+
"bottom-left": "_bottom-left_1ygaj_89",
|
|
16
|
+
"top-right": "_top-right_1ygaj_94",
|
|
17
|
+
"top-left": "_top-left_1ygaj_99",
|
|
18
|
+
closing: w
|
|
19
|
+
}, W = ({
|
|
20
20
|
title: d,
|
|
21
|
-
icon:
|
|
21
|
+
icon: y,
|
|
22
22
|
children: l,
|
|
23
|
-
closable:
|
|
24
|
-
error:
|
|
25
|
-
success:
|
|
23
|
+
closable: a = !0,
|
|
24
|
+
error: i = !1,
|
|
25
|
+
success: r = !1,
|
|
26
26
|
autoCloseDelay: _ = 3e3,
|
|
27
27
|
open: s = !0,
|
|
28
|
-
position:
|
|
28
|
+
position: b = "bottom-right",
|
|
29
29
|
// ✅ Valeur par défaut
|
|
30
|
-
onClose:
|
|
30
|
+
onClose: g
|
|
31
31
|
}) => {
|
|
32
|
-
const [
|
|
32
|
+
const [v, f] = u(s), [p, m] = u(!1);
|
|
33
33
|
let o = "";
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
i ? o = t.error : r ? o = t.success : o = t.base;
|
|
35
|
+
const N = i ? "Warning" : r ? "CheckCircle" : "Info", T = i ? "var(--color-error-500)" : r ? "var(--color-succes-500)" : "var(--general-text-icons)", c = () => {
|
|
36
|
+
m(!0), setTimeout(() => {
|
|
37
|
+
f(!1), g && g();
|
|
38
38
|
}, 300);
|
|
39
39
|
};
|
|
40
40
|
return h(() => {
|
|
41
|
-
s ? (
|
|
41
|
+
s ? (f(!0), m(!1)) : c();
|
|
42
42
|
}, [s]), h(() => {
|
|
43
|
-
if (!
|
|
44
|
-
const
|
|
45
|
-
|
|
43
|
+
if (!a && s) {
|
|
44
|
+
const $ = setTimeout(() => {
|
|
45
|
+
c();
|
|
46
46
|
}, _);
|
|
47
|
-
return () => clearTimeout(
|
|
47
|
+
return () => clearTimeout($);
|
|
48
48
|
}
|
|
49
|
-
}, [
|
|
49
|
+
}, [a, _, s]), v ? /* @__PURE__ */ n(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
|
-
className: `${t.toast} ${o} ${
|
|
52
|
+
className: `${t.toast} ${o} ${p ? t.closing : ""} ${t[b]}`,
|
|
53
53
|
children: [
|
|
54
54
|
/* @__PURE__ */ n("div", { className: t["toast-header"], children: [
|
|
55
55
|
/* @__PURE__ */ n("div", { className: t["toast-title-container"], children: [
|
|
56
|
-
/* @__PURE__ */ e(
|
|
56
|
+
/* @__PURE__ */ e(j, { icon: y || N, size: 24, color: T }),
|
|
57
57
|
/* @__PURE__ */ e("span", { className: t["toast-title"], children: d })
|
|
58
58
|
] }),
|
|
59
|
-
|
|
59
|
+
a && /* @__PURE__ */ e(x, { mode: "ghost", size: "s", onClick: c, children: /* @__PURE__ */ e(j, { icon: "X", size: 16, weight: "regular" }) })
|
|
60
60
|
] }),
|
|
61
61
|
l && /* @__PURE__ */ e("div", { className: `${t["toast-content"]}`, children: l })
|
|
62
62
|
]
|
|
@@ -64,5 +64,5 @@ import '../../styles/Toast.css';const I = "_toast_10w18_30", z = "_base_10w18_69
|
|
|
64
64
|
) : null;
|
|
65
65
|
};
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
W as Toast
|
|
68
68
|
};
|
package/dist/main.d.ts
CHANGED
|
@@ -29,4 +29,6 @@ export { InputLabel } from './components/input-label/InputLabel';
|
|
|
29
29
|
export { EditableField } from './components/editable-field/EditableField';
|
|
30
30
|
export { EditableSelect } from './components/editable-select/EditableSelect';
|
|
31
31
|
export { Toast } from './components/toast/Toast';
|
|
32
|
+
export { DragAndDrop } from './components/drag-and-drop/DragAndDrop';
|
|
33
|
+
export { Loading } from './components/loading/Loading';
|
|
32
34
|
export { ThemeProvider, useTheme } from './components/theme/ThemeContext';
|