@situaction/traq-ui-ste 1.2.13 → 1.2.16
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/carousel/Carousel.d.ts +33 -0
- package/dist/components/carousel/Carousel.js +328 -0
- 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/list/list-controls/ListControls.js +9 -8
- package/dist/components/list/nested-list/NestedList.js +6 -5
- package/dist/components/list/nested-list/item/NestedListItem.js +3 -2
- package/dist/components/loading/Loading.d.ts +38 -0
- package/dist/components/loading/Loading.js +87 -0
- package/dist/components/menu/Menu.js +61 -63
- package/dist/components/panel/side-panel/SidePanel.js +18 -19
- package/dist/components/panel/side-panel-header/SidePanelHeader.js +3 -2
- package/dist/components/select/Select.js +68 -69
- package/dist/components/select-filter-input-tags/SelectFilterInputTags.js +11 -11
- package/dist/components/select-multi-items/SelectMultiItems.js +19 -18
- package/dist/components/switch/Switch.js +11 -10
- 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 +3 -0
- package/dist/main.js +33 -27
- package/dist/styles/Button.css +1 -1
- package/dist/styles/Carousel.css +1 -0
- 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,46 +1,45 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as _, useRef as
|
|
3
|
-
import '../../../styles/SidePanel.css';const
|
|
4
|
-
panel:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
panelRight: B,
|
|
2
|
+
import { useState as _, useRef as L, useEffect as f } from "react";
|
|
3
|
+
import '../../../styles/SidePanel.css';const P = "_panel_lk5yy_1", x = "_box_lk5yy_18", v = "_panelLeft_lk5yy_29", b = "_panelRight_lk5yy_36", C = "_panelOpenedLeft_lk5yy_43", H = "_panelOpenedRight_lk5yy_47", S = "_panelHidden_lk5yy_51", E = "_displayPanel_lk5yy_55", N = "_hidePanel_lk5yy_59", e = {
|
|
4
|
+
panel: P,
|
|
5
|
+
box: x,
|
|
6
|
+
panelLeft: v,
|
|
7
|
+
panelRight: b,
|
|
9
8
|
panelOpenedLeft: C,
|
|
10
9
|
panelOpenedRight: H,
|
|
11
10
|
panelHidden: S,
|
|
12
11
|
displayPanel: E,
|
|
13
12
|
hidePanel: N
|
|
14
13
|
}, $ = ({
|
|
15
|
-
children:
|
|
14
|
+
children: y,
|
|
16
15
|
width: a,
|
|
17
|
-
left:
|
|
16
|
+
left: d = !0,
|
|
18
17
|
opened: n = !1,
|
|
19
18
|
onToggle: t
|
|
20
19
|
}) => {
|
|
21
|
-
const [l, s] = _(n), [u, i] = _(n), p =
|
|
20
|
+
const [l, s] = _(n), [u, i] = _(n), p = L(null), m = {
|
|
22
21
|
"--dynamic-left": `-${a}`,
|
|
23
22
|
"--dynamic-right": `-${a}`,
|
|
24
23
|
width: a
|
|
25
|
-
}, h =
|
|
24
|
+
}, h = d ? e.panelLeft : e.panelRight, O = d ? e.panelOpenedLeft : e.panelOpenedRight, R = [
|
|
26
25
|
e.panel,
|
|
27
26
|
h,
|
|
28
27
|
!l && e.panelHidden,
|
|
29
|
-
l &&
|
|
28
|
+
l && O,
|
|
30
29
|
u ? e.displayPanel : e.hidePanel
|
|
31
30
|
].filter(Boolean).join(" ");
|
|
32
|
-
return
|
|
31
|
+
return f(() => {
|
|
33
32
|
n ? (i(!0), setTimeout(() => s(!0), 10)) : (s(!1), setTimeout(() => i(!1), 300));
|
|
34
|
-
}, [n]),
|
|
35
|
-
const
|
|
36
|
-
const c =
|
|
33
|
+
}, [n]), f(() => {
|
|
34
|
+
const o = (k) => {
|
|
35
|
+
const c = k.target;
|
|
37
36
|
c.closest("[data-ignore-outside-click]") || p.current && !p.current.contains(c) && (s(!1), t == null || t(!1), setTimeout(() => i(!1), 300));
|
|
38
37
|
};
|
|
39
38
|
if (l)
|
|
40
|
-
return document.addEventListener("mousedown",
|
|
41
|
-
document.removeEventListener("mousedown",
|
|
39
|
+
return document.addEventListener("mousedown", o), () => {
|
|
40
|
+
document.removeEventListener("mousedown", o);
|
|
42
41
|
};
|
|
43
|
-
}, [l, t]), /* @__PURE__ */ r("div", { style: m, className:
|
|
42
|
+
}, [l, t]), /* @__PURE__ */ r("div", { style: m, className: R, children: /* @__PURE__ */ r("div", { ref: p, className: e.box, children: y }) });
|
|
44
43
|
};
|
|
45
44
|
export {
|
|
46
45
|
$ as SidePanel
|
|
@@ -4,13 +4,14 @@ import "react";
|
|
|
4
4
|
import { IconButton as i } from "../../icon-button/IconButton.js";
|
|
5
5
|
import { Icon as t } from "../../icon/Icon.js";
|
|
6
6
|
import "../../modal/Modal.js";
|
|
7
|
+
import "../../carousel/Carousel.js";
|
|
7
8
|
import "../../theme/ThemeContext.js";
|
|
8
9
|
import '../../../styles/Size.css';import '../../../styles/SidePanelHeader.css';/* empty css */
|
|
9
10
|
const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_72g7b_20", r = {
|
|
10
11
|
sidePanelHeader: c,
|
|
11
12
|
buttonArrow: m,
|
|
12
13
|
title: h
|
|
13
|
-
},
|
|
14
|
+
}, z = ({
|
|
14
15
|
title: s,
|
|
15
16
|
icon: o,
|
|
16
17
|
onClickBack: L,
|
|
@@ -72,5 +73,5 @@ const c = "_sidePanelHeader_72g7b_6", m = "_buttonArrow_72g7b_13", h = "_title_7
|
|
|
72
73
|
)
|
|
73
74
|
] });
|
|
74
75
|
export {
|
|
75
|
-
|
|
76
|
+
z as SidePanelHeader
|
|
76
77
|
};
|
|
@@ -1,59 +1,58 @@
|
|
|
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
|
+
import "../carousel/Carousel.js";
|
|
8
9
|
import "../theme/ThemeContext.js";
|
|
9
10
|
import '../../styles/Size.css';import '../../styles/Select.css';/* empty css */
|
|
10
|
-
const
|
|
11
|
-
selectContainer:
|
|
12
|
-
selected: Q,
|
|
11
|
+
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 = {
|
|
12
|
+
selectContainer: Q,
|
|
13
13
|
children: X,
|
|
14
14
|
active: Y,
|
|
15
15
|
selectList: Z,
|
|
16
16
|
modal: O,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}, he = ({
|
|
17
|
+
itemLabel: I,
|
|
18
|
+
searchWrapper: ee,
|
|
19
|
+
noResults: te
|
|
20
|
+
}, fe = ({
|
|
22
21
|
selected: k,
|
|
23
22
|
size: g = "m",
|
|
24
23
|
listItem: h,
|
|
25
24
|
modeDisplay: E = "all",
|
|
26
25
|
onSelect: B,
|
|
27
|
-
positionOverride:
|
|
26
|
+
positionOverride: b,
|
|
28
27
|
placeholder: x = "Sélectionner",
|
|
29
|
-
searchPlaceholder:
|
|
30
|
-
autoCloseCondition:
|
|
31
|
-
searchable:
|
|
28
|
+
searchPlaceholder: V,
|
|
29
|
+
autoCloseCondition: w,
|
|
30
|
+
searchable: z = !1,
|
|
32
31
|
fullWidth: T = !1
|
|
33
32
|
}) => {
|
|
34
|
-
const [t,
|
|
33
|
+
const [t, l] = y(!1), [A, K] = y({
|
|
35
34
|
top: "calc(100% + 6px)",
|
|
36
35
|
left: "0px"
|
|
37
|
-
}), [n, S] =
|
|
36
|
+
}), [n, S] = y(k ?? null), [$, F] = y(""), u = v(null), j = v(null), N = v(null), P = v({}), D = v({}), p = v(null);
|
|
38
37
|
d(() => {
|
|
39
38
|
S(k || null);
|
|
40
39
|
}, [k]), d(() => {
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
const
|
|
44
|
-
S(e),
|
|
45
|
-
},
|
|
40
|
+
b && K(b);
|
|
41
|
+
}, [b]);
|
|
42
|
+
const M = (e) => {
|
|
43
|
+
S(e), l(!1), B && B(e);
|
|
44
|
+
}, q = () => {
|
|
46
45
|
const e = n == null ? void 0 : n.icon, r = (n == null ? void 0 : n.label) ?? x;
|
|
47
|
-
return E === "icon" && e ? /* @__PURE__ */ s(
|
|
46
|
+
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
47
|
W,
|
|
49
48
|
{
|
|
50
49
|
ref: u,
|
|
51
50
|
mode: "tertiary",
|
|
52
51
|
label: n ? r : x,
|
|
53
|
-
childrenRight: /* @__PURE__ */ s(
|
|
52
|
+
childrenRight: /* @__PURE__ */ s(_, { icon: t ? "CaretUp" : "CaretDown", size: 14, weight: "bold" }),
|
|
54
53
|
size: g,
|
|
55
54
|
fullWidth: T,
|
|
56
|
-
onClick: () =>
|
|
55
|
+
onClick: () => l(!t),
|
|
57
56
|
"aria-expanded": t,
|
|
58
57
|
"aria-haspopup": "listbox"
|
|
59
58
|
}
|
|
@@ -65,9 +64,9 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
65
64
|
label: n ? r : x,
|
|
66
65
|
size: g,
|
|
67
66
|
fullWidth: T,
|
|
68
|
-
childrenLeft: e && /* @__PURE__ */ s(
|
|
69
|
-
childrenRight: /* @__PURE__ */ s(
|
|
70
|
-
onClick: () =>
|
|
67
|
+
childrenLeft: e && /* @__PURE__ */ s(_, { icon: n.icon }),
|
|
68
|
+
childrenRight: /* @__PURE__ */ s(_, { icon: t ? "CaretUp" : "CaretDown", size: 14, weight: "bold" }),
|
|
69
|
+
onClick: () => l(!t),
|
|
71
70
|
"aria-expanded": t,
|
|
72
71
|
"aria-haspopup": "listbox"
|
|
73
72
|
}
|
|
@@ -79,24 +78,24 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
79
78
|
fullWidth: T,
|
|
80
79
|
label: x ?? "Sélectionner",
|
|
81
80
|
size: g,
|
|
82
|
-
onClick: () =>
|
|
81
|
+
onClick: () => l(!t),
|
|
83
82
|
"aria-expanded": t,
|
|
84
83
|
"aria-haspopup": "listbox"
|
|
85
84
|
}
|
|
86
85
|
);
|
|
87
|
-
},
|
|
88
|
-
(e) => String(e.label ?? "").toLowerCase().includes(
|
|
89
|
-
), [C, R] =
|
|
86
|
+
}, U = h.filter(
|
|
87
|
+
(e) => String(e.label ?? "").toLowerCase().includes($.toLowerCase())
|
|
88
|
+
), [C, R] = y("");
|
|
90
89
|
return d(() => {
|
|
91
90
|
if (t) {
|
|
92
91
|
const e = (r) => {
|
|
93
92
|
const c = r.key.length === 1 ? r.key.toLowerCase() : "";
|
|
94
93
|
if (!c) return;
|
|
95
|
-
const
|
|
96
|
-
R(
|
|
94
|
+
const i = C + c;
|
|
95
|
+
R(i);
|
|
97
96
|
const o = h.find((a) => {
|
|
98
97
|
var m;
|
|
99
|
-
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(
|
|
98
|
+
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(i);
|
|
100
99
|
});
|
|
101
100
|
if (o) {
|
|
102
101
|
const a = P.current[o.value];
|
|
@@ -111,12 +110,12 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
111
110
|
if (!t) return;
|
|
112
111
|
const c = r.key.length === 1 ? r.key.toLowerCase() : "";
|
|
113
112
|
if (!c) return;
|
|
114
|
-
const
|
|
115
|
-
R(
|
|
113
|
+
const i = C + c;
|
|
114
|
+
R(i);
|
|
116
115
|
const o = h.find(
|
|
117
116
|
(a) => {
|
|
118
117
|
var m;
|
|
119
|
-
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(
|
|
118
|
+
return (m = a.label) == null ? void 0 : m.toLowerCase().startsWith(i);
|
|
120
119
|
}
|
|
121
120
|
);
|
|
122
121
|
if (o && N.current && P.current[o.value]) {
|
|
@@ -131,12 +130,12 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
131
130
|
const e = (r) => {
|
|
132
131
|
const c = r.key.toLowerCase();
|
|
133
132
|
if (c.length === 1) {
|
|
134
|
-
const
|
|
133
|
+
const i = h.find((o) => {
|
|
135
134
|
var a;
|
|
136
135
|
return (a = o.label) == null ? void 0 : a.toLowerCase().startsWith(c);
|
|
137
136
|
});
|
|
138
|
-
if (
|
|
139
|
-
const o =
|
|
137
|
+
if (i) {
|
|
138
|
+
const o = D.current[i.value];
|
|
140
139
|
o && o.scrollIntoView({ block: "start", behavior: "smooth" });
|
|
141
140
|
}
|
|
142
141
|
}
|
|
@@ -145,67 +144,67 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
145
144
|
}, [t, h]), d(() => {
|
|
146
145
|
if (t && u.current) {
|
|
147
146
|
const e = u.current.getBoundingClientRect().height;
|
|
148
|
-
|
|
147
|
+
K(b || { top: `${e + 6}px`, left: "0px" });
|
|
149
148
|
}
|
|
150
|
-
}, [t,
|
|
151
|
-
if (!t || !
|
|
149
|
+
}, [t, b]), d(() => {
|
|
150
|
+
if (!t || !w) return;
|
|
152
151
|
const e = (r) => {
|
|
153
|
-
const c = r.target,
|
|
154
|
-
|
|
152
|
+
const c = r.target, i = u.current, o = j.current;
|
|
153
|
+
i && i.contains(c) || o && o.contains(c) || l(!1);
|
|
155
154
|
};
|
|
156
155
|
return document.addEventListener("mousedown", e), document.addEventListener("touchstart", e, { passive: !0 }), () => {
|
|
157
156
|
document.removeEventListener("mousedown", e), document.removeEventListener("touchstart", e);
|
|
158
157
|
};
|
|
159
|
-
}, [t,
|
|
160
|
-
if (!t || !
|
|
158
|
+
}, [t, w]), d(() => {
|
|
159
|
+
if (!t || !w) return;
|
|
161
160
|
const e = (r) => {
|
|
162
|
-
r.key === "Escape" &&
|
|
161
|
+
r.key === "Escape" && l(!1);
|
|
163
162
|
};
|
|
164
163
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
165
|
-
}, [t,
|
|
166
|
-
|
|
164
|
+
}, [t, w]), /* @__PURE__ */ L("div", { className: f.selectContainer, children: [
|
|
165
|
+
q(),
|
|
167
166
|
/* @__PURE__ */ s(
|
|
168
|
-
|
|
167
|
+
J,
|
|
169
168
|
{
|
|
170
169
|
anchorRef: u,
|
|
171
170
|
open: t,
|
|
172
|
-
onClose: () =>
|
|
173
|
-
position:
|
|
171
|
+
onClose: () => l(!1),
|
|
172
|
+
position: A,
|
|
174
173
|
disableOverlay: !0,
|
|
175
174
|
className: f.modal,
|
|
176
|
-
autoCloseCondition:
|
|
177
|
-
children: /* @__PURE__ */ L("div", { ref:
|
|
178
|
-
|
|
175
|
+
autoCloseCondition: w,
|
|
176
|
+
children: /* @__PURE__ */ L("div", { ref: j, children: [
|
|
177
|
+
z && /* @__PURE__ */ L("div", { children: [
|
|
179
178
|
/* @__PURE__ */ s(
|
|
180
|
-
|
|
179
|
+
G,
|
|
181
180
|
{
|
|
182
181
|
type: "text",
|
|
183
|
-
placeholder:
|
|
182
|
+
placeholder: V,
|
|
184
183
|
status: "ghost",
|
|
185
184
|
sizeStyle: "s",
|
|
186
|
-
value:
|
|
187
|
-
onChange: (e) =>
|
|
185
|
+
value: $,
|
|
186
|
+
onChange: (e) => F(e.target.value)
|
|
188
187
|
}
|
|
189
188
|
),
|
|
190
189
|
/* @__PURE__ */ s("div", { className: f.searchWrapper })
|
|
191
190
|
] }),
|
|
192
191
|
/* @__PURE__ */ L("div", { className: f.selectList, ref: N, children: [
|
|
193
|
-
|
|
192
|
+
U.map((e) => /* @__PURE__ */ L(
|
|
194
193
|
"div",
|
|
195
194
|
{
|
|
196
|
-
ref: (r) =>
|
|
195
|
+
ref: (r) => D.current[e.value] = r,
|
|
197
196
|
className: `${f.children} ${(n == null ? void 0 : n.value) === e.value ? f.active : ""}`,
|
|
198
|
-
onClick: () =>
|
|
197
|
+
onClick: () => M(e),
|
|
199
198
|
role: "option",
|
|
200
199
|
"aria-selected": (n == null ? void 0 : n.value) === e.value,
|
|
201
200
|
children: [
|
|
202
|
-
e.icon && /* @__PURE__ */ s(
|
|
201
|
+
e.icon && /* @__PURE__ */ s(_, { icon: e.icon, size: 16 }),
|
|
203
202
|
e.label && /* @__PURE__ */ s("div", { className: f.itemLabel, children: e.label })
|
|
204
203
|
]
|
|
205
204
|
},
|
|
206
205
|
e.value
|
|
207
206
|
)),
|
|
208
|
-
|
|
207
|
+
U.length === 0 && /* @__PURE__ */ s("div", { className: `${f.noResults} textSmall`, children: "Aucun résultat" })
|
|
209
208
|
] })
|
|
210
209
|
] })
|
|
211
210
|
}
|
|
@@ -213,5 +212,5 @@ const J = "_selectContainer_133eb_54", Q = "_selected_133eb_57", X = "_children_
|
|
|
213
212
|
] });
|
|
214
213
|
};
|
|
215
214
|
export {
|
|
216
|
-
|
|
215
|
+
fe as Select
|
|
217
216
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as l } 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
|
+
import "../carousel/Carousel.js";
|
|
7
8
|
import "../theme/ThemeContext.js";
|
|
8
9
|
import '../../styles/Size.css';import '../../styles/SelectFilterInputTags.css';/* empty css */
|
|
9
|
-
const
|
|
10
|
-
listTagSelect:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
o,
|
|
10
|
+
const c = "_listTagSelect_2v3fb_6", p = {
|
|
11
|
+
listTagSelect: c
|
|
12
|
+
}, x = ({ children: s, inputValue: o, handleInputChange: r, handleKeyDown: i }) => /* @__PURE__ */ e("div", { className: p.listTagSelect, children: /* @__PURE__ */ l("div", { children: [
|
|
13
|
+
s,
|
|
14
14
|
/* @__PURE__ */ e("div", { className: "flexAutoSize", children: /* @__PURE__ */ e(
|
|
15
|
-
|
|
15
|
+
a,
|
|
16
16
|
{
|
|
17
17
|
type: "text",
|
|
18
|
-
value:
|
|
18
|
+
value: o,
|
|
19
19
|
onKeyDown: (t) => {
|
|
20
20
|
t.key === "Enter" && i && i(t);
|
|
21
21
|
},
|
|
22
|
-
onChange: (t) =>
|
|
22
|
+
onChange: (t) => r(t.target.value),
|
|
23
23
|
autoFocus: !0,
|
|
24
24
|
placeholder: "",
|
|
25
25
|
status: "ghost",
|
|
@@ -28,5 +28,5 @@ const a = "_listTagSelect_2v3fb_6", p = "_flexAutoSize_2v3fb_24", u = {
|
|
|
28
28
|
) })
|
|
29
29
|
] }) });
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
x as SelectFilterInputTags
|
|
32
32
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
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
|
+
import "../carousel/Carousel.js";
|
|
8
9
|
import "../theme/ThemeContext.js";
|
|
9
10
|
import '../../styles/Size.css';import '../../styles/SelectMultiItems.css';/* empty css */
|
|
10
|
-
const
|
|
11
|
-
relative:
|
|
12
|
-
tagCounter:
|
|
13
|
-
modal:
|
|
14
|
-
},
|
|
15
|
-
label:
|
|
11
|
+
const N = "_relative_w7e9a_6", R = "_tagCounter_w7e9a_10", b = "_modal_w7e9a_18", r = {
|
|
12
|
+
relative: N,
|
|
13
|
+
tagCounter: R,
|
|
14
|
+
modal: b
|
|
15
|
+
}, q = ({
|
|
16
|
+
label: i,
|
|
16
17
|
iconButton: l,
|
|
17
18
|
selectedCount: t = 0,
|
|
18
19
|
onClearSelection: n,
|
|
@@ -20,25 +21,25 @@ const y = "_relative_w7e9a_6", I = "_tagCounter_w7e9a_10", N = "_modal_w7e9a_18"
|
|
|
20
21
|
size: c = "m",
|
|
21
22
|
align: p = "right"
|
|
22
23
|
}) => {
|
|
23
|
-
const [e,
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
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";
|
|
25
|
+
return /* @__PURE__ */ a("div", { className: r.relative, children: [
|
|
25
26
|
/* @__PURE__ */ o(
|
|
26
27
|
M,
|
|
27
28
|
{
|
|
28
|
-
label:
|
|
29
|
+
label: i,
|
|
29
30
|
mode: u,
|
|
30
31
|
size: c,
|
|
31
32
|
childrenLeft: l,
|
|
32
|
-
childrenRight: /* @__PURE__ */
|
|
33
|
-
t > 0 && /* @__PURE__ */ o(
|
|
33
|
+
childrenRight: /* @__PURE__ */ a("div", { className: r.tagCounter, children: [
|
|
34
|
+
t > 0 && /* @__PURE__ */ o(w, { size: "s", label: t }),
|
|
34
35
|
g
|
|
35
36
|
] }),
|
|
36
|
-
onClick: () =>
|
|
37
|
+
onClick: () => s(!e)
|
|
37
38
|
}
|
|
38
39
|
),
|
|
39
|
-
/* @__PURE__ */ o(
|
|
40
|
+
/* @__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
41
|
] });
|
|
41
42
|
};
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
q as SelectMultiItems
|
|
44
45
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as n, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { useState as $, useEffect as b } from "react";
|
|
3
3
|
import "../button/Button.js";
|
|
4
4
|
import { IconButton as k } from "../icon-button/IconButton.js";
|
|
5
5
|
import { Icon as g } from "../icon/Icon.js";
|
|
6
6
|
import "../modal/Modal.js";
|
|
7
|
+
import "../carousel/Carousel.js";
|
|
7
8
|
import "../theme/ThemeContext.js";
|
|
8
9
|
import '../../styles/Size.css';import '../../styles/Switch.css';/* empty css */
|
|
9
10
|
const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk_75", j = "_xl_1mxgk_92", B = "_disabled_1mxgk_110", E = "_wrapper_1mxgk_121", R = "_button_1mxgk_136", T = "_active_1mxgk_145", t = {
|
|
@@ -17,7 +18,7 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
17
18
|
wrapper: E,
|
|
18
19
|
button: R,
|
|
19
20
|
active: T
|
|
20
|
-
},
|
|
21
|
+
}, L = ({
|
|
21
22
|
size: i = "m",
|
|
22
23
|
variant: w = "classic",
|
|
23
24
|
checked: l,
|
|
@@ -27,14 +28,14 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
27
28
|
defaultChecked: h = !1,
|
|
28
29
|
icons: a = { left: "Table", right: "Rows" }
|
|
29
30
|
}) => {
|
|
30
|
-
const o = l !== void 0, [p,
|
|
31
|
-
o ||
|
|
31
|
+
const o = l !== void 0, [p, m] = $(h), u = o ? l : p, d = (e) => {
|
|
32
|
+
o || m(e), s == null || s(e);
|
|
32
33
|
}, v = (e) => {
|
|
33
34
|
const f = e.target.checked;
|
|
34
|
-
r || (o ||
|
|
35
|
+
r || (o || m(f), s == null || s(f));
|
|
35
36
|
};
|
|
36
37
|
b(() => {
|
|
37
|
-
o &&
|
|
38
|
+
o && m(l);
|
|
38
39
|
}, [l, o]);
|
|
39
40
|
const x = () => {
|
|
40
41
|
switch (i) {
|
|
@@ -50,8 +51,8 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
50
51
|
return 18;
|
|
51
52
|
}
|
|
52
53
|
};
|
|
53
|
-
return w === "icon" ? /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */
|
|
54
|
+
return w === "icon" ? /* @__PURE__ */ n("div", { className: `${t.switch} ${t[i]}`, children: [
|
|
55
|
+
/* @__PURE__ */ n("div", { className: `${t.wrapper} ${r ? t.disabled : ""}`, children: [
|
|
55
56
|
/* @__PURE__ */ c(
|
|
56
57
|
k,
|
|
57
58
|
{
|
|
@@ -74,7 +75,7 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
74
75
|
)
|
|
75
76
|
] }),
|
|
76
77
|
_
|
|
77
|
-
] }) : /* @__PURE__ */
|
|
78
|
+
] }) : /* @__PURE__ */ n("div", { className: `${t.switch} ${t[i]} ${r ? t.disabled : ""}`, children: [
|
|
78
79
|
/* @__PURE__ */ c(
|
|
79
80
|
"input",
|
|
80
81
|
{
|
|
@@ -89,5 +90,5 @@ const y = "_slider_1mxgk_21", I = "_s_1mxgk_6", N = "_m_1mxgk_58", S = "_l_1mxgk
|
|
|
89
90
|
] });
|
|
90
91
|
};
|
|
91
92
|
export {
|
|
92
|
-
|
|
93
|
+
L as Switch
|
|
93
94
|
};
|
|
@@ -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
|