@krosoft/react 0.0.307 → 0.0.309
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/{AppActions-CvT8dDnQ.js → AppActions-DBxmXROG.js} +2 -2
- package/dist/{AppSubTitle-DJQjeSdC.js → AppSubTitle-Ck4UmLrQ.js} +2 -2
- package/dist/{AppTitle-C8t_LSuG.js → AppTitle-CA3AuX6v.js} +1 -1
- package/dist/{ErrorAlert-DrjpMJu6.js → ErrorAlert-BuKadO9Z.js} +1 -1
- package/dist/{GenericForm-DBLeKiPm.js → GenericForm-tZkFJ7mA.js} +6 -6
- package/dist/{ImageInput-B6NH8JDS.js → ImageInput-BT08niR9.js} +2 -2
- package/dist/MultiSelect-D7AFiC_X.js +228 -0
- package/dist/{SearchInput-sg_-w8UW.js → SearchInput-tvcgwvmw.js} +106 -90
- package/dist/{behavior-UUjjj8qt.js → behavior-C2896MtZ.js} +1 -1
- package/dist/{cards-DUbAISUO.js → cards-m0h-usz_.js} +2 -2
- package/dist/{charts-BDlyl5wa.js → charts-B1R8vOM7.js} +1 -1
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/charts/index.js +1 -1
- package/dist/components/core/dialogs/index.js +3 -3
- package/dist/components/core/filters/index.js +5 -5
- package/dist/components/core/forms/index.js +1 -1
- package/dist/components/core/index.js +18 -18
- package/dist/components/core/inputs/MultiSelect.d.ts +8 -1
- package/dist/components/core/inputs/MultiSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/SingleSelect.d.ts.map +1 -1
- package/dist/components/core/inputs/index.js +4 -4
- package/dist/components/core/inputs/select.helper.d.ts +22 -0
- package/dist/components/core/inputs/select.helper.d.ts.map +1 -1
- package/dist/components/core/language/index.js +1 -1
- package/dist/components/core/layouts/index.js +8 -8
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/states/index.js +2 -2
- package/dist/components/core/table/index.js +2 -2
- package/dist/components/core/tabs/index.js +5 -5
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +18 -18
- package/dist/components/ui/index.js +2 -2
- package/dist/{dialogs-BwObbaoM.js → dialogs--0dbPy6W.js} +5 -5
- package/dist/hooks/behavior/index.js +1 -1
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/ui/index.js +4 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/krosoftLocales.d.ts +2 -0
- package/dist/i18n/krosoftLocales.d.ts.map +1 -1
- package/dist/{i18n-Iyf3fyzr.js → i18n-DbPbmPRj.js} +2 -0
- package/dist/{inputs-Cxz5kfwF.js → inputs-2cwQbuBl.js} +3 -3
- package/dist/{language-DgO7XgOg.js → language-9LfgyTr7.js} +2 -2
- package/dist/{navbar-tmnNnH3O.js → navbar-DKgwZj74.js} +3 -3
- package/dist/pwa/index.js +1 -1
- package/dist/{sheet-C2vx5V6Q.js → sheet-w_xag5lP.js} +1 -1
- package/dist/{states-Bs9lIWQe.js → states-Ceb6VL--.js} +2 -2
- package/dist/{theme-DpbtnjRk.js → theme-BMH6B6jL.js} +2 -2
- package/dist/{ui-O4O5BzZ0.js → ui-CfT3vbQZ.js} +3 -3
- package/dist/{ui-BdLutnCT.js → ui-k3NqEwlP.js} +1 -1
- package/dist/{useDocumentTitle--JeBsMsb.js → useDocumentTitle-BISAg9M7.js} +1 -1
- package/dist/{useLanguage-0bm0Xoa9.js → useLanguage-BVuLE78e.js} +1 -1
- package/dist/{useTheme-CFOgsA9n.js → useTheme-DRWux5vA.js} +1 -1
- package/package.json +1 -1
- package/dist/MultiSelect-0iYNlt_e.js +0 -157
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import { r as t, t as n } from "./i18n-
|
|
3
|
-
import { En as r } from "./ui-
|
|
2
|
+
import { r as t, t as n } from "./i18n-DbPbmPRj.js";
|
|
3
|
+
import { En as r } from "./ui-k3NqEwlP.js";
|
|
4
4
|
import { c as i, o as a, s as o } from "./tooltip-_geGvbS7.js";
|
|
5
|
-
import { g as s, h as c, m as l, p as u } from "./sheet-
|
|
5
|
+
import { g as s, h as c, m as l, p as u } from "./sheet-w_xag5lP.js";
|
|
6
6
|
import { i as d, l as f, n as p, t as m, u as h } from "./select-KWMg2_7Z.js";
|
|
7
|
-
import { n as g } from "./MultiSelect-
|
|
8
|
-
import * as
|
|
9
|
-
import { useEffect as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { CalendarIcon as
|
|
7
|
+
import { n as g, r as _ } from "./MultiSelect-D7AFiC_X.js";
|
|
8
|
+
import * as v from "react";
|
|
9
|
+
import { useEffect as y, useMemo as b, useRef as x, useState as S } from "react";
|
|
10
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
11
|
+
import { CalendarIcon as T, CheckIcon as E, ChevronDownIcon as ee, PlusIcon as D, SearchIcon as O, XIcon as k } from "lucide-react";
|
|
12
12
|
import { Command as A } from "cmdk";
|
|
13
13
|
import { format as j } from "date-fns";
|
|
14
14
|
//#region src/components/core/inputs/DatePicker.tsx
|
|
15
15
|
var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
16
|
-
let s = t(), [c, l] =
|
|
17
|
-
return
|
|
16
|
+
let s = t(), [c, l] = S(!1), u = x(null);
|
|
17
|
+
return y(() => {
|
|
18
18
|
if (!c) return;
|
|
19
19
|
let e = (e) => {
|
|
20
20
|
u.current !== null && !u.current.contains(e.target) && l(!1);
|
|
@@ -22,20 +22,20 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
22
22
|
return document.addEventListener("mousedown", e), () => {
|
|
23
23
|
document.removeEventListener("mousedown", e);
|
|
24
24
|
};
|
|
25
|
-
}, [c]), /* @__PURE__ */
|
|
25
|
+
}, [c]), /* @__PURE__ */ w("div", {
|
|
26
26
|
ref: u,
|
|
27
27
|
className: "relative w-full",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ w(i, {
|
|
29
29
|
variant: "outline",
|
|
30
30
|
type: "button",
|
|
31
31
|
onClick: () => {
|
|
32
32
|
l((e) => !e);
|
|
33
33
|
},
|
|
34
34
|
className: e("w-full justify-start text-left font-normal focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", c && "ring-2 ring-ring ring-offset-2", n === void 0 && "text-muted-foreground"),
|
|
35
|
-
children: [/* @__PURE__ */
|
|
36
|
-
}), c ? /* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ C(T, { className: "mr-2 size-4 shrink-0" }), n === void 0 ? /* @__PURE__ */ C("span", { children: o }) : j(n, "dd/MM/yyyy", { locale: s })]
|
|
36
|
+
}), c ? /* @__PURE__ */ C("div", {
|
|
37
37
|
className: "absolute left-0 top-[calc(100%+4px)] z-[100] rounded-surface border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 slide-in-from-top-2",
|
|
38
|
-
children: /* @__PURE__ */
|
|
38
|
+
children: /* @__PURE__ */ C(r, {
|
|
39
39
|
mode: "single",
|
|
40
40
|
locale: s,
|
|
41
41
|
defaultMonth: n,
|
|
@@ -50,24 +50,24 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
50
50
|
from: e.from,
|
|
51
51
|
to: e.to
|
|
52
52
|
} : void 0, P = ({ value: a, onChange: o, placeholder: s, className: d }) => {
|
|
53
|
-
let { t: f } = n(), p = t(), [m, h] =
|
|
54
|
-
return
|
|
55
|
-
m &&
|
|
56
|
-
}, [m, a]), /* @__PURE__ */
|
|
53
|
+
let { t: f } = n(), p = t(), [m, h] = v.useState(!1), [g, _] = v.useState(N(a));
|
|
54
|
+
return v.useEffect(() => {
|
|
55
|
+
m && _(N(a));
|
|
56
|
+
}, [m, a]), /* @__PURE__ */ C("div", {
|
|
57
57
|
className: e("grid gap-2", d),
|
|
58
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ w(u, {
|
|
59
59
|
open: m,
|
|
60
60
|
onOpenChange: h,
|
|
61
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ C(c, {
|
|
62
62
|
asChild: !0,
|
|
63
|
-
children: /* @__PURE__ */
|
|
63
|
+
children: /* @__PURE__ */ w(i, {
|
|
64
64
|
id: "date",
|
|
65
65
|
variant: "outline",
|
|
66
66
|
className: e("w-[300px] justify-start text-left font-normal", !a?.from && "text-muted-foreground"),
|
|
67
67
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ C(T, { className: "mr-2 size-4" }),
|
|
69
69
|
((e) => e?.from ? !e.to || e.from.getTime() === e.to.getTime() ? j(e.from, "dd MMM yyyy", { locale: p }) : `${j(e.from, "dd MMM yyyy", { locale: p })} - ${j(e.to, "dd MMM yyyy", { locale: p })}` : s ?? f("date.pickPeriod"))(a),
|
|
70
|
-
a?.from && /* @__PURE__ */
|
|
70
|
+
a?.from && /* @__PURE__ */ C(i, {
|
|
71
71
|
type: "button",
|
|
72
72
|
variant: "ghost",
|
|
73
73
|
size: "icon",
|
|
@@ -76,43 +76,43 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
76
76
|
onClick: (e) => {
|
|
77
77
|
e.stopPropagation(), o(void 0), h(!1);
|
|
78
78
|
},
|
|
79
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ C(k, { className: "size-4" })
|
|
80
80
|
})
|
|
81
81
|
]
|
|
82
82
|
})
|
|
83
|
-
}), /* @__PURE__ */
|
|
83
|
+
}), /* @__PURE__ */ w(l, {
|
|
84
84
|
className: "w-auto p-0",
|
|
85
85
|
align: "start",
|
|
86
86
|
side: "bottom",
|
|
87
87
|
sideOffset: 4,
|
|
88
|
-
children: [/* @__PURE__ */
|
|
88
|
+
children: [/* @__PURE__ */ C(r, {
|
|
89
89
|
mode: "range",
|
|
90
90
|
resetOnSelect: !0,
|
|
91
91
|
defaultMonth: g?.from,
|
|
92
92
|
selected: g,
|
|
93
|
-
onSelect:
|
|
93
|
+
onSelect: _,
|
|
94
94
|
numberOfMonths: 2,
|
|
95
95
|
locale: p,
|
|
96
96
|
className: "pointer-events-auto p-3"
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ w("div", {
|
|
98
98
|
className: "flex items-center justify-between border-t border-border px-3 py-2",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ C(i, {
|
|
100
100
|
variant: "ghost",
|
|
101
101
|
size: "sm",
|
|
102
102
|
onClick: () => {
|
|
103
|
-
|
|
103
|
+
_(void 0);
|
|
104
104
|
},
|
|
105
105
|
children: f("actions.clear")
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ w("div", {
|
|
107
107
|
className: "flex gap-2",
|
|
108
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ C(i, {
|
|
109
109
|
variant: "ghost",
|
|
110
110
|
size: "sm",
|
|
111
111
|
onClick: () => {
|
|
112
|
-
|
|
112
|
+
_(N(a)), h(!1);
|
|
113
113
|
},
|
|
114
114
|
children: f("actions.cancel")
|
|
115
|
-
}), /* @__PURE__ */
|
|
115
|
+
}), /* @__PURE__ */ C(i, {
|
|
116
116
|
size: "sm",
|
|
117
117
|
onClick: () => {
|
|
118
118
|
o(g), h(!1);
|
|
@@ -124,36 +124,40 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
124
124
|
})]
|
|
125
125
|
})
|
|
126
126
|
});
|
|
127
|
-
}, F = ({ options: t = [], value: r, onChange: i, onClear: s, searchable:
|
|
128
|
-
let { t: R } = n(), [z, B] =
|
|
127
|
+
}, F = ({ options: t = [], value: r, onChange: i, onClear: s, searchable: v = !1, onCreate: y, placeholder: x, searchPlaceholder: T, emptyLabel: j, createLabel: M, disabled: N = !1, modal: P = !0, variant: F = "input", className: I, ...L }) => {
|
|
128
|
+
let { t: R } = n(), [z, B] = S(!1), [V, H] = S(""), U = F === "filter" ? a : void 0, W = r !== void 0 && r !== "", G = b(() => W ? t.find((e) => e.value === r) : void 0, [
|
|
129
129
|
W,
|
|
130
130
|
t,
|
|
131
131
|
r
|
|
132
|
-
]),
|
|
133
|
-
|
|
132
|
+
]), te = W ? G?.label ?? r : void 0, K = V.trim(), q = b(() => {
|
|
133
|
+
if (K === "") return t;
|
|
134
|
+
let e = K.toLowerCase();
|
|
135
|
+
return t.filter((t) => `${t.label} ${t.description ?? ""}`.toLowerCase().includes(e));
|
|
136
|
+
}, [t, K]), { listRef: ne, virtualized: J, startIndex: re, endIndex: ie, padTop: Y, padBottom: X, onScroll: ae, resetScroll: Z } = _(z, q.length, t.some((e) => e.imageUrl !== void 0)), oe = J ? q.slice(re, ie) : q;
|
|
137
|
+
if (!v) return /* @__PURE__ */ w(m, {
|
|
134
138
|
value: r ?? "",
|
|
135
139
|
onValueChange: i,
|
|
136
140
|
disabled: N,
|
|
137
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ C(f, {
|
|
138
142
|
...L,
|
|
139
143
|
className: e(!W && "text-muted-foreground", U, I),
|
|
140
144
|
onClear: s !== void 0 && W && !N ? (e) => {
|
|
141
145
|
e.preventDefault(), e.stopPropagation(), s();
|
|
142
146
|
} : void 0,
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
}), /* @__PURE__ */
|
|
147
|
+
children: /* @__PURE__ */ C(h, { placeholder: x ?? R("select.placeholder") })
|
|
148
|
+
}), /* @__PURE__ */ C(p, { children: t.map((e) => /* @__PURE__ */ C(d, {
|
|
145
149
|
value: e.value,
|
|
146
150
|
disabled: e.disabled,
|
|
147
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ w("span", {
|
|
148
152
|
className: "flex items-center",
|
|
149
153
|
children: [
|
|
150
154
|
g(e.imageUrl, "mr-2"),
|
|
151
|
-
e.color !== void 0 && /* @__PURE__ */
|
|
155
|
+
e.color !== void 0 && /* @__PURE__ */ C("span", {
|
|
152
156
|
className: "mr-2 size-2.5 shrink-0 rounded-full",
|
|
153
157
|
style: { backgroundColor: e.color }
|
|
154
158
|
}),
|
|
155
159
|
e.label,
|
|
156
|
-
e.description !== void 0 && /* @__PURE__ */
|
|
160
|
+
e.description !== void 0 && /* @__PURE__ */ w("span", {
|
|
157
161
|
className: "ml-1 text-muted-foreground",
|
|
158
162
|
children: [
|
|
159
163
|
"(",
|
|
@@ -165,39 +169,41 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
165
169
|
})
|
|
166
170
|
}, e.value)) })]
|
|
167
171
|
});
|
|
168
|
-
let
|
|
169
|
-
B(e), e
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
-
|
|
172
|
+
let Q = y !== void 0 && K !== "" && !t.some((e) => e.label.toLowerCase() === K.toLowerCase()), $ = (e) => {
|
|
173
|
+
B(e), e ? Z() : H("");
|
|
174
|
+
}, se = (e) => {
|
|
175
|
+
H(e), Z();
|
|
176
|
+
}, ce = (e) => {
|
|
177
|
+
i(e), $(!1);
|
|
178
|
+
}, le = () => {
|
|
179
|
+
y?.(K), $(!1);
|
|
174
180
|
};
|
|
175
|
-
return /* @__PURE__ */
|
|
181
|
+
return /* @__PURE__ */ w(u, {
|
|
176
182
|
open: z,
|
|
177
|
-
onOpenChange:
|
|
183
|
+
onOpenChange: $,
|
|
178
184
|
modal: P,
|
|
179
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ C(c, {
|
|
180
186
|
asChild: !0,
|
|
181
|
-
children: /* @__PURE__ */
|
|
187
|
+
children: /* @__PURE__ */ w("button", {
|
|
182
188
|
...L,
|
|
183
189
|
type: "button",
|
|
184
190
|
role: "combobox",
|
|
185
191
|
"aria-expanded": z,
|
|
186
192
|
disabled: N,
|
|
187
193
|
className: e(o, "w-full", U, "data-[state=open]:ring-2 data-[state=open]:ring-ring data-[state=open]:ring-offset-2", !W && "text-muted-foreground", I),
|
|
188
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ w("div", {
|
|
189
195
|
className: "flex min-w-0 items-center truncate",
|
|
190
196
|
children: [
|
|
191
197
|
g(G?.imageUrl, "mr-2 h-6 w-8"),
|
|
192
|
-
G?.color && /* @__PURE__ */
|
|
198
|
+
G?.color && /* @__PURE__ */ C("span", {
|
|
193
199
|
className: "mr-2 size-2.5 shrink-0 rounded-full",
|
|
194
200
|
style: { backgroundColor: G.color }
|
|
195
201
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ C("span", {
|
|
197
203
|
className: "truncate",
|
|
198
|
-
children:
|
|
204
|
+
children: te ?? x ?? R("select.placeholder")
|
|
199
205
|
}),
|
|
200
|
-
G?.description !== void 0 && /* @__PURE__ */
|
|
206
|
+
G?.description !== void 0 && /* @__PURE__ */ w("span", {
|
|
201
207
|
className: "ml-1 truncate text-muted-foreground",
|
|
202
208
|
children: [
|
|
203
209
|
"(",
|
|
@@ -206,9 +212,9 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
206
212
|
]
|
|
207
213
|
})
|
|
208
214
|
]
|
|
209
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ w("div", {
|
|
210
216
|
className: "flex items-center gap-1",
|
|
211
|
-
children: [s && W && !N && /* @__PURE__ */
|
|
217
|
+
children: [s && W && !N && /* @__PURE__ */ C("span", {
|
|
212
218
|
role: "button",
|
|
213
219
|
tabIndex: -1,
|
|
214
220
|
onClick: (e) => {
|
|
@@ -218,55 +224,61 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
218
224
|
e.preventDefault(), e.stopPropagation(), s();
|
|
219
225
|
},
|
|
220
226
|
className: "text-muted-foreground hover:text-foreground",
|
|
221
|
-
children: /* @__PURE__ */
|
|
222
|
-
}), /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ C(k, { className: "size-4" })
|
|
228
|
+
}), /* @__PURE__ */ C(ee, { className: e("size-4 shrink-0 opacity-50 transition-transform", z && "rotate-180") })]
|
|
223
229
|
})]
|
|
224
230
|
})
|
|
225
|
-
}), /* @__PURE__ */
|
|
231
|
+
}), /* @__PURE__ */ C(l, {
|
|
226
232
|
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
227
233
|
align: "start",
|
|
228
|
-
children: /* @__PURE__ */
|
|
234
|
+
children: /* @__PURE__ */ w(A, {
|
|
235
|
+
shouldFilter: !1,
|
|
229
236
|
className: "flex flex-col",
|
|
230
|
-
|
|
231
|
-
children: [/* @__PURE__ */ S("div", {
|
|
237
|
+
children: [/* @__PURE__ */ C("div", {
|
|
232
238
|
className: "border-b border-border p-2",
|
|
233
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ w("div", {
|
|
234
240
|
className: "relative",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
241
|
+
children: [/* @__PURE__ */ C(O, { className: "absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground" }), /* @__PURE__ */ C(A.Input, {
|
|
236
242
|
value: V,
|
|
237
|
-
onValueChange:
|
|
238
|
-
placeholder:
|
|
243
|
+
onValueChange: se,
|
|
244
|
+
placeholder: T ?? R("search.placeholder"),
|
|
239
245
|
className: "w-full rounded-control bg-muted/50 py-1.5 pl-7 pr-2 text-sm text-foreground placeholder:text-muted-foreground outline-none focus:ring-1 focus:ring-ring",
|
|
240
246
|
autoFocus: !0
|
|
241
247
|
})]
|
|
242
248
|
})
|
|
243
|
-
}), /* @__PURE__ */
|
|
244
|
-
|
|
249
|
+
}), /* @__PURE__ */ w(A.List, {
|
|
250
|
+
ref: ne,
|
|
251
|
+
onScroll: ae,
|
|
252
|
+
className: e("flex flex-col max-h-56 overflow-y-auto overflow-x-hidden p-1.5 scrollbar-thin scrollbar-thumb-rounded scrollbar-thumb-muted-foreground/20 scrollbar-track-transparent [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20 [&::-webkit-scrollbar-track]:bg-transparent", !J && "gap-0.5"),
|
|
245
253
|
children: [
|
|
246
|
-
!
|
|
254
|
+
q.length === 0 && !Q && /* @__PURE__ */ C("div", {
|
|
247
255
|
className: "px-2 py-3 text-center text-xs text-muted-foreground",
|
|
248
256
|
children: j ?? R("states.noResult")
|
|
249
257
|
}),
|
|
250
|
-
|
|
258
|
+
Y > 0 && /* @__PURE__ */ C("div", {
|
|
259
|
+
"aria-hidden": !0,
|
|
260
|
+
style: { height: Y }
|
|
261
|
+
}),
|
|
262
|
+
oe.map((t) => /* @__PURE__ */ w(A.Item, {
|
|
251
263
|
value: t.value,
|
|
252
264
|
keywords: [t.label, t.description ?? ""],
|
|
253
265
|
disabled: t.disabled,
|
|
254
266
|
onSelect: () => {
|
|
255
|
-
|
|
267
|
+
ce(t.value);
|
|
256
268
|
},
|
|
257
269
|
className: "flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",
|
|
258
270
|
children: [
|
|
259
271
|
g(t.imageUrl),
|
|
260
|
-
t.color && /* @__PURE__ */
|
|
272
|
+
t.color && /* @__PURE__ */ C("span", {
|
|
261
273
|
className: "size-2.5 shrink-0 rounded-full",
|
|
262
274
|
style: { backgroundColor: t.color }
|
|
263
275
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ C("span", {
|
|
265
277
|
className: "min-w-0 flex-1 truncate",
|
|
266
278
|
title: t.label,
|
|
267
279
|
children: t.label
|
|
268
280
|
}),
|
|
269
|
-
t.description !== void 0 && /* @__PURE__ */
|
|
281
|
+
t.description !== void 0 && /* @__PURE__ */ w("span", {
|
|
270
282
|
className: "shrink-0 truncate text-muted-foreground",
|
|
271
283
|
children: [
|
|
272
284
|
"(",
|
|
@@ -274,17 +286,21 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
274
286
|
")"
|
|
275
287
|
]
|
|
276
288
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ C(E, { className: e("ml-auto size-4 shrink-0", r === t.value ? "opacity-100" : "opacity-0") })
|
|
278
290
|
]
|
|
279
291
|
}, t.value)),
|
|
280
|
-
|
|
292
|
+
X > 0 && /* @__PURE__ */ C("div", {
|
|
293
|
+
"aria-hidden": !0,
|
|
294
|
+
style: { height: X }
|
|
295
|
+
}),
|
|
296
|
+
Q && /* @__PURE__ */ w(A.Item, {
|
|
281
297
|
forceMount: !0,
|
|
282
298
|
value: "__create__",
|
|
283
|
-
onSelect:
|
|
299
|
+
onSelect: le,
|
|
284
300
|
className: "flex min-w-0 items-center gap-2.5 rounded-md px-2 py-2 text-sm cursor-pointer transition-colors data-[selected=true]:bg-muted",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ C(D, { className: "size-4 shrink-0" }), /* @__PURE__ */ C("span", {
|
|
286
302
|
className: "truncate",
|
|
287
|
-
children: M ? M(
|
|
303
|
+
children: M ? M(K) : R("select.create", { search: K })
|
|
288
304
|
})]
|
|
289
305
|
})
|
|
290
306
|
]
|
|
@@ -294,11 +310,11 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
294
310
|
});
|
|
295
311
|
}, I = ({ searchQuery: t, search: r, placeholder: i, onSearch: a, onSubmit: o, onClear: c, className: l }) => {
|
|
296
312
|
let { t: u } = n(), d = t ?? r ?? "";
|
|
297
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ w("div", {
|
|
298
314
|
className: e("relative h-fit w-full md:w-64", l),
|
|
299
315
|
children: [
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ C(O, { className: "absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4" }),
|
|
317
|
+
/* @__PURE__ */ C(s, {
|
|
302
318
|
placeholder: i ?? u("search.placeholder"),
|
|
303
319
|
value: d,
|
|
304
320
|
onChange: (e) => {
|
|
@@ -309,13 +325,13 @@ var M = ({ date: n, onDateChange: a, placeholder: o }) => {
|
|
|
309
325
|
e.key === "Enter" && o !== void 0 && (e.preventDefault(), o());
|
|
310
326
|
}
|
|
311
327
|
}),
|
|
312
|
-
d === "" ? null : /* @__PURE__ */
|
|
328
|
+
d === "" ? null : /* @__PURE__ */ C("button", {
|
|
313
329
|
onClick: () => {
|
|
314
330
|
a(""), c !== void 0 && c();
|
|
315
331
|
},
|
|
316
332
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-700",
|
|
317
333
|
type: "button",
|
|
318
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ C(k, { className: "size-4" })
|
|
319
335
|
})
|
|
320
336
|
]
|
|
321
337
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
2
|
import { c as t, d as n, f as r, s as i } from "./chart-Dq3AIrue.js";
|
|
3
|
-
import { t as a } from "./i18n-
|
|
4
|
-
import "./ui-
|
|
3
|
+
import { t as a } from "./i18n-DbPbmPRj.js";
|
|
4
|
+
import "./ui-k3NqEwlP.js";
|
|
5
5
|
import { t as o } from "./skeleton-D6Ga4BLw.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./tailwind.helper-CJaRYBmL.js";
|
|
2
2
|
import { a as t, c as n, d as r, f as i, l as a, n as o, o as s, r as c, s as l, t as u } from "./chart-Dq3AIrue.js";
|
|
3
|
-
import { t as d } from "./i18n-
|
|
3
|
+
import { t as d } from "./i18n-DbPbmPRj.js";
|
|
4
4
|
import { t as f } from "./skeleton-D6Ga4BLw.js";
|
|
5
5
|
import { t as p } from "./useMobile-pTQ8lWvt.js";
|
|
6
6
|
import * as m from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../../../cards-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../../cards-m0h-usz_.js";
|
|
2
2
|
export { r as DashboardCard, e as KpiCard, t as KpiCards, i as MetricCard, n as SkeletonCard, a as SkeletonCards };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../../../charts-
|
|
1
|
+
import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../../../charts-B1R8vOM7.js";
|
|
2
2
|
export { t as BarChartHorizontal, o as BarChartVertical, e as CHART_COLORS, n as ChartCard, a as CircularGauge, r as LineChart, s as PieChart, i as getChartColor };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as e } from "../../../ui-
|
|
2
|
-
import { A as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, j as l, k as u } from "../../../sheet-
|
|
3
|
-
import { n as d, r as f, t as p } from "../../../dialogs
|
|
1
|
+
import { I as e } from "../../../ui-k3NqEwlP.js";
|
|
2
|
+
import { A as t, D as n, E as r, F as i, M as a, N as o, O as s, P as c, j as l, k as u } from "../../../sheet-w_xag5lP.js";
|
|
3
|
+
import { n as d, r as f, t as p } from "../../../dialogs--0dbPy6W.js";
|
|
4
4
|
export { f as AppDialog, p as ConfirmationDialog, r as Dialog, n as DialogClose, s as DialogContent, u as DialogDescription, t as DialogFooter, l as DialogHeader, a as DialogOverlay, o as DialogPortal, c as DialogTitle, i as DialogTrigger, d as FormDialog, e as Progress };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "../../../tailwind.helper-CJaRYBmL.js";
|
|
2
|
-
import { t } from "../../../i18n-
|
|
3
|
-
import { At as n, Pn as r } from "../../../ui-
|
|
2
|
+
import { t } from "../../../i18n-DbPbmPRj.js";
|
|
3
|
+
import { At as n, Pn as r } from "../../../ui-k3NqEwlP.js";
|
|
4
4
|
import { c as i } from "../../../tooltip-_geGvbS7.js";
|
|
5
|
-
import { a, g as o, l as s, o as c, r as l, t as u, u as d } from "../../../sheet-
|
|
6
|
-
import { t as f } from "../../../MultiSelect-
|
|
7
|
-
import { i as p, n as m, r as h, t as g } from "../../../SearchInput-
|
|
5
|
+
import { a, g as o, l as s, o as c, r as l, t as u, u as d } from "../../../sheet-w_xag5lP.js";
|
|
6
|
+
import { t as f } from "../../../MultiSelect-D7AFiC_X.js";
|
|
7
|
+
import { i as p, n as m, r as h, t as g } from "../../../SearchInput-tvcgwvmw.js";
|
|
8
8
|
import { useEffect as _, useMemo as v, useState as y } from "react";
|
|
9
9
|
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
10
|
import { getLocale as S } from "@krosoft/core/helpers";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../GenericForm-
|
|
1
|
+
import { t as e } from "../../../GenericForm-tZkFJ7mA.js";
|
|
2
2
|
export { e as GenericForm };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { a as e, i as t, n, o as r, r as i, t as a } from "../../cards-
|
|
2
|
-
import { I as o } from "../../ui-
|
|
3
|
-
import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-
|
|
4
|
-
import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "../../charts-
|
|
5
|
-
import { t as T } from "../../ErrorAlert-
|
|
6
|
-
import { n as E, r as D, t as O } from "../../dialogs
|
|
7
|
-
import { t as k } from "../../ImageInput-
|
|
8
|
-
import { t as A } from "../../AppActions-
|
|
9
|
-
import { t as j } from "../../AppSubTitle-
|
|
10
|
-
import { t as M } from "../../MultiSelect-
|
|
11
|
-
import { t as N } from "../../GenericForm-
|
|
12
|
-
import { i as P, n as F, r as I, t as L } from "../../SearchInput-
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../../cards-m0h-usz_.js";
|
|
2
|
+
import { I as o } from "../../ui-k3NqEwlP.js";
|
|
3
|
+
import { A as s, D as c, E as l, F as u, M as d, N as f, O as p, P as m, j as h, k as g } from "../../sheet-w_xag5lP.js";
|
|
4
|
+
import { a as _, c as v, i as y, n as b, o as x, r as S, s as C, t as w } from "../../charts-B1R8vOM7.js";
|
|
5
|
+
import { t as T } from "../../ErrorAlert-BuKadO9Z.js";
|
|
6
|
+
import { n as E, r as D, t as O } from "../../dialogs--0dbPy6W.js";
|
|
7
|
+
import { t as k } from "../../ImageInput-BT08niR9.js";
|
|
8
|
+
import { t as A } from "../../AppActions-DBxmXROG.js";
|
|
9
|
+
import { t as j } from "../../AppSubTitle-Ck4UmLrQ.js";
|
|
10
|
+
import { t as M } from "../../MultiSelect-D7AFiC_X.js";
|
|
11
|
+
import { t as N } from "../../GenericForm-tZkFJ7mA.js";
|
|
12
|
+
import { i as P, n as F, r as I, t as L } from "../../SearchInput-tvcgwvmw.js";
|
|
13
13
|
import { ActiveFilters as R, AdvancedFilters as z, FilterField as B, FilterPills as V, FilterPillsGroup as H, TableFilter as U } from "./filters/index.js";
|
|
14
14
|
import "./forms/index.js";
|
|
15
15
|
import { n as W, t as G } from "../../icons-n0m_1w7z.js";
|
|
16
|
-
import { t as K } from "../../inputs-
|
|
17
|
-
import { t as q } from "../../language-
|
|
18
|
-
import { t as J } from "../../AppTitle-
|
|
19
|
-
import { n as Y, t as X } from "../../states-
|
|
16
|
+
import { t as K } from "../../inputs-2cwQbuBl.js";
|
|
17
|
+
import { t as q } from "../../language-9LfgyTr7.js";
|
|
18
|
+
import { t as J } from "../../AppTitle-CA3AuX6v.js";
|
|
19
|
+
import { n as Y, t as X } from "../../states-Ceb6VL--.js";
|
|
20
20
|
import { AppPageHeader as Z, KpiCardsLayout as Q } from "./layouts/index.js";
|
|
21
|
-
import { a as $, i as ee, n as te, o as ne, r as re, t as ie } from "../../navbar-
|
|
21
|
+
import { a as $, i as ee, n as te, o as ne, r as re, t as ie } from "../../navbar-DKgwZj74.js";
|
|
22
22
|
import { DataTable as ae, JsonTableOutput as oe, TableActions as se, TableBody as ce, TableBulkActions as le, TableHeader as ue, TablePagination as de, TableSettings as fe } from "./table/index.js";
|
|
23
23
|
import { AppTabContainer as pe, AppTabHeader as me, AppTabs as he, AppVerticalTabs as ge } from "./tabs/index.js";
|
|
24
|
-
import { t as _e } from "../../theme-
|
|
24
|
+
import { t as _e } from "../../theme-BMH6B6jL.js";
|
|
25
25
|
export { R as ActiveFilters, z as AdvancedFilters, A as AppActions, D as AppDialog, Z as AppPageHeader, j as AppSubTitle, pe as AppTabContainer, me as AppTabHeader, he as AppTabs, J as AppTitle, ge as AppVerticalTabs, v as BarChartHorizontal, C as BarChartVertical, _ as CHART_COLORS, y as ChartCard, S as CircularGauge, O as ConfirmationDialog, r as DashboardCard, ae as DataTable, P as DatePicker, I as DateRangePicker, l as Dialog, c as DialogClose, p as DialogContent, g as DialogDescription, s as DialogFooter, h as DialogHeader, d as DialogOverlay, f as DialogPortal, m as DialogTitle, u as DialogTrigger, T as ErrorAlert, Y as ErrorState, B as FilterField, V as FilterPills, H as FilterPillsGroup, W as FlagFrIcon, G as FlagGbIcon, E as FormDialog, N as GenericForm, ne as GlobalSearch, k as ImageInput, oe as JsonTableOutput, e as KpiCard, t as KpiCards, Q as KpiCardsLayout, q as LanguageSelector, b as LineChart, X as LoadingState, i as MetricCard, M as MultiSelect, $ as NotificationsBell, w as PieChart, o as Progress, K as RatingInput, L as SearchInput, re as Sidebar, te as SidebarHeader, ee as SidebarNavItem, F as SingleSelect, n as SkeletonCard, a as SkeletonCards, se as TableActions, ce as TableBody, le as TableBulkActions, U as TableFilter, ue as TableHeader, de as TablePagination, fe as TableSettings, _e as ThemeSelector, ie as Topbar, x as getChartColor };
|
|
@@ -31,10 +31,17 @@ interface MultiSelectProps<T extends string = string> extends Omit<React.Compone
|
|
|
31
31
|
searchable?: boolean;
|
|
32
32
|
searchPlaceholder?: string;
|
|
33
33
|
disabled?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Panneau rendu en modal (défaut, comme le `Select`). À laisser tel quel dans une boîte de
|
|
36
|
+
* dialogue : sans ça, le `Dialog` neutralise les clics et le scroll sur le panneau porté dans le portail.
|
|
37
|
+
*/
|
|
38
|
+
modal?: boolean;
|
|
39
|
+
/** Affiche les options sélectionnées en pastilles retirables sous le contrôle (`variant="input"`). */
|
|
40
|
+
chips?: boolean;
|
|
34
41
|
/** Nombre de libellés affichés dans le trigger (variant `"input"`), le reste est résumé par un compteur `+N`. */
|
|
35
42
|
maxCount?: number;
|
|
36
43
|
className?: string;
|
|
37
44
|
}
|
|
38
|
-
export declare const MultiSelect: <T extends string = string>({ options, selected, onToggle, onClear, onSelectAll, variant, placeholder, labelKey, searchable, searchPlaceholder, disabled, maxCount, className, ...triggerProps }: MultiSelectProps<T>) => React.ReactElement;
|
|
45
|
+
export declare const MultiSelect: <T extends string = string>({ options, selected, onToggle, onClear, onSelectAll, variant, placeholder, labelKey, searchable, searchPlaceholder, disabled, modal, chips, maxCount, className, ...triggerProps }: MultiSelectProps<T>) => React.ReactElement;
|
|
39
46
|
export {};
|
|
40
47
|
//# sourceMappingURL=MultiSelect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelect.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/MultiSelect.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACrD,uHAAuH;IACvH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sJAAsJ;IACtJ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;GAKG;AACH,UAAU,gBAAgB,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AC,YAmN5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../../../ImageInput-
|
|
2
|
-
import { t } from "../../../MultiSelect-
|
|
3
|
-
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-
|
|
4
|
-
import { t as o } from "../../../inputs-
|
|
1
|
+
import { t as e } from "../../../ImageInput-BT08niR9.js";
|
|
2
|
+
import { t } from "../../../MultiSelect-D7AFiC_X.js";
|
|
3
|
+
import { i as n, n as r, r as i, t as a } from "../../../SearchInput-tvcgwvmw.js";
|
|
4
|
+
import { t as o } from "../../../inputs-2cwQbuBl.js";
|
|
5
5
|
export { n as DatePicker, i as DateRangePicker, e as ImageInput, t as MultiSelect, o as RatingInput, a as SearchInput, r as SingleSelect };
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export interface OptionWindow {
|
|
3
|
+
listRef: React.RefObject<HTMLDivElement | null>;
|
|
4
|
+
/** `true` quand le fenêtrage est actif (au-delà du seuil). En dessous : rendu classique. */
|
|
5
|
+
virtualized: boolean;
|
|
6
|
+
startIndex: number;
|
|
7
|
+
endIndex: number;
|
|
8
|
+
/** Cales à insérer avant / après la tranche visible pour préserver hauteur et position de scroll. */
|
|
9
|
+
padTop: number;
|
|
10
|
+
padBottom: number;
|
|
11
|
+
onScroll: ((e: React.UIEvent<HTMLDivElement>) => void) | undefined;
|
|
12
|
+
/** Remet la liste tout en haut (à l'ouverture / au changement de filtre). */
|
|
13
|
+
resetScroll: () => void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Fenêtrage partagé par `SingleSelect` et `MultiSelect` : au-delà de {@link VIRTUALIZE_THRESHOLD}
|
|
17
|
+
* options, seule la tranche visible (+ marge) est montée, encadrée de cales haut/bas. En dessous du
|
|
18
|
+
* seuil, rendu classique — aucun changement de comportement, navigation clavier cmdk intacte.
|
|
19
|
+
*
|
|
20
|
+
* La liste doit être à hauteur de ligne uniforme (cas des selects) : la hauteur réelle d'une ligne
|
|
21
|
+
* est mesurée pour affiner la fenêtre, avec un repli estimé selon la présence de vignettes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useOptionWindow(open: boolean, itemCount: number, hasThumbnails: boolean): OptionWindow;
|
|
2
24
|
/**
|
|
3
25
|
* Vignette d'une option de select (partagée par `SingleSelect` et `MultiSelect`).
|
|
4
26
|
* URL → image ; `null`/`""` → placeholder gris ; `undefined` → rien (option sans vignette).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.helper.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/select.helper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"select.helper.d.ts","sourceRoot":"","sources":["../../../../src/components/core/inputs/select.helper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAU9E,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAChD,4FAA4F;IAC5F,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,qGAAqG;IACrG,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACnE,6EAA6E;IAC7E,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,GAAG,YAAY,CAyCtG;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAU,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,YAAY,MAAM,KAAG,KAAK,CAAC,SASrG,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../language-
|
|
1
|
+
import { t as e } from "../../../language-9LfgyTr7.js";
|
|
2
2
|
export { e as LanguageSelector };
|