design-system-silkhaus 3.6.0 → 3.7.0-beta.localeSelector.2
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/{Checkbox-Bhoxdirv.js → ButtonsGroupSelector-BErKnj7L.js} +1589 -1429
- package/dist/app/index.js +161 -327
- package/dist/index.d.ts +20 -0
- package/dist/index.js +4017 -3924
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/app/index.js
CHANGED
|
@@ -1,326 +1,160 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var a in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var a of
|
|
10
|
-
|
|
1
|
+
var J = Object.defineProperty, K = Object.defineProperties;
|
|
2
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var C = Object.getOwnPropertySymbols;
|
|
4
|
+
var Q = Object.prototype.hasOwnProperty, X = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var I = (s, e, a) => e in s ? J(s, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : s[e] = a, x = (s, e) => {
|
|
6
|
+
for (var a in e || (e = {}))
|
|
7
|
+
Q.call(e, a) && I(s, a, e[a]);
|
|
8
|
+
if (C)
|
|
9
|
+
for (var a of C(e))
|
|
10
|
+
X.call(e, a) && I(s, a, e[a]);
|
|
11
11
|
return s;
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
d.indexOf(t) < 0 && V.call(s, t) && (a[t] = s[t]);
|
|
20
|
-
return a;
|
|
21
|
-
};
|
|
22
|
-
import { j as e, a as v, t as ss, c as es, p as ds, u as as, o as ts, i as rs, s as ls, r as ns, v as cs, d as os, e as is, f as us, g as xs, F as ms, A as ps, h as fs, w as hs, C as bs, l as gs, k as vs, n as ys } from "../Checkbox-Bhoxdirv.js";
|
|
23
|
-
import A, { forwardRef as js, useState as N, useEffect as ws } from "react";
|
|
24
|
-
const T = ({ children: s, size: d = "small" }) => /* @__PURE__ */ e.jsx(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
className: `ds-flex ds-items-center ds-justify-center ${d === "small" ? "ds-h-5 ds-w-5" : "ds-h-6 ds-w-6"}`,
|
|
28
|
-
children: s
|
|
29
|
-
}
|
|
30
|
-
), Ns = {
|
|
31
|
-
primary: "ds-bg-Background-accentEggplant-100 ds-text-Text-textPrimaryDark ds-rounded-sm hover:ds-text-Text-textPrimaryDark hover:ds-bg-Background-accentEggplant-highlight hover:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-bg-Background-accentEggplant-darkened focus:ds-bg-Background-accentEggplant-100 focus:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] disabled:focus:ds-shadow-none disabled:ds-bg-Background-accentEggplant-20 ds-text-mediumFootnoteEmphasized",
|
|
32
|
-
secondary: "ds-bg-white ds-text-black ds-rounded-sm ds-border ds-border-Fills-terciary hover:ds-bg-[#F6F8FC] hover:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] active:ds-bg-[#F6F8FC] active:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] focus:ds-bg-[#F6F8FC] focus:ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] disabled:ds-border disabled:ds-border-Fills-terciary disabled:ds-text-Text-tertiary disabled:ds-bg-transparent ds-text-mediumFootnoteEmphasized"
|
|
33
|
-
}, Fs = {
|
|
34
|
-
primary: "ds-rounded-sm ds-border ds-text-black ds-border-Fills-terciary ds-bg-[#F6F8FC] ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] ds-text-mediumFootnoteEmphasized",
|
|
35
|
-
secondary: "ds-rounded-sm ds-bg-Background-accentEggplant-100 ds-text-Text-textPrimaryDark ds-shadow-[0px_1px_4px_0px_rgba(0,0,0,0.16)] ds-text-mediumFootnoteEmphasized"
|
|
36
|
-
}, I = A.forwardRef(
|
|
37
|
-
(b, y) => {
|
|
38
|
-
var x = b, {
|
|
39
|
-
color: s = "primary",
|
|
40
|
-
disabled: d = !1,
|
|
41
|
-
className: a,
|
|
42
|
-
children: t,
|
|
43
|
-
startIcon: i,
|
|
44
|
-
selected: u,
|
|
45
|
-
endIcon: l,
|
|
46
|
-
trackingId: c,
|
|
47
|
-
helperText: o,
|
|
48
|
-
helpterTextClassName: f,
|
|
49
|
-
buttonClassName: h
|
|
50
|
-
} = x, g = B(x, [
|
|
51
|
-
"color",
|
|
52
|
-
"disabled",
|
|
53
|
-
"className",
|
|
54
|
-
"children",
|
|
55
|
-
"startIcon",
|
|
56
|
-
"selected",
|
|
57
|
-
"endIcon",
|
|
58
|
-
"trackingId",
|
|
59
|
-
"helperText",
|
|
60
|
-
"helpterTextClassName",
|
|
61
|
-
"buttonClassName"
|
|
62
|
-
]);
|
|
63
|
-
return /* @__PURE__ */ e.jsxs("div", { className: v("ds-flex ds-flex-col ds-gap-1", a), children: [
|
|
64
|
-
/* @__PURE__ */ e.jsxs(
|
|
65
|
-
"button",
|
|
66
|
-
_(w({
|
|
67
|
-
"data-tracking-id": c,
|
|
68
|
-
ref: y,
|
|
69
|
-
disabled: d,
|
|
70
|
-
className: ss(
|
|
71
|
-
es(
|
|
72
|
-
{ [Fs[s]]: u, [Ns[s]]: !u },
|
|
73
|
-
"ds-px-2 ds-py-1",
|
|
74
|
-
"ds-flex ds-w-full ds-flex-1 ds-items-center ds-justify-center ds-gap-1",
|
|
75
|
-
h
|
|
76
|
-
)
|
|
77
|
-
)
|
|
78
|
-
}, g), {
|
|
79
|
-
children: [
|
|
80
|
-
i && /* @__PURE__ */ e.jsx(T, { children: i }),
|
|
81
|
-
t && /* @__PURE__ */ e.jsx("div", { children: t }),
|
|
82
|
-
l && /* @__PURE__ */ e.jsx(T, { children: l })
|
|
83
|
-
]
|
|
84
|
-
})
|
|
85
|
-
),
|
|
86
|
-
o && /* @__PURE__ */ e.jsx(
|
|
87
|
-
"div",
|
|
88
|
-
{
|
|
89
|
-
className: v(
|
|
90
|
-
"ds-w-full ds-text-right ds-text-mediumFootnoteRegular",
|
|
91
|
-
f
|
|
92
|
-
),
|
|
93
|
-
children: o
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
] });
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
I.displayName = "Button";
|
|
100
|
-
const _s = js(
|
|
101
|
-
(s, d) => {
|
|
102
|
-
const F = s, {
|
|
103
|
-
value: a,
|
|
104
|
-
options: t,
|
|
105
|
-
onSelectionChange: i = () => {
|
|
106
|
-
},
|
|
107
|
-
isMultiSelect: u,
|
|
108
|
-
noDataError: l,
|
|
109
|
-
buttonMinWidth: c,
|
|
110
|
-
buttonWidth: o,
|
|
111
|
-
minSelectionError: f,
|
|
112
|
-
buttonsContainerClassName: h,
|
|
113
|
-
buttonClassName: g
|
|
114
|
-
} = F, y = B(F, [
|
|
115
|
-
"value",
|
|
116
|
-
"options",
|
|
117
|
-
"onSelectionChange",
|
|
118
|
-
"isMultiSelect",
|
|
119
|
-
"noDataError",
|
|
120
|
-
"buttonMinWidth",
|
|
121
|
-
"buttonWidth",
|
|
122
|
-
"minSelectionError",
|
|
123
|
-
"buttonsContainerClassName",
|
|
124
|
-
"buttonClassName"
|
|
125
|
-
]), [b, x] = N([]), [j, m] = N("");
|
|
126
|
-
ws(() => {
|
|
127
|
-
a && a.length ? x(a) : x([]);
|
|
128
|
-
}, [a]);
|
|
129
|
-
const k = (r, p) => {
|
|
130
|
-
p.currentTarget.blur();
|
|
131
|
-
const n = [...b], C = n.findIndex((z) => z.value === r.value);
|
|
132
|
-
C !== -1 ? n.length > 1 ? (n.splice(C, 1), m("")) : m(f) : (n.push(r), m("")), x(n), i(n);
|
|
133
|
-
}, D = (r, p) => {
|
|
134
|
-
p.currentTarget.blur();
|
|
135
|
-
const n = [r];
|
|
136
|
-
x(n), i(n);
|
|
137
|
-
};
|
|
138
|
-
return /* @__PURE__ */ e.jsxs(
|
|
139
|
-
"div",
|
|
140
|
-
_(w({
|
|
141
|
-
ref: d
|
|
142
|
-
}, y), {
|
|
143
|
-
children: [
|
|
144
|
-
/* @__PURE__ */ e.jsx(
|
|
145
|
-
"div",
|
|
146
|
-
{
|
|
147
|
-
className: v("ds-flex ds-flex-wrap ds-items-center ds-gap-2", h),
|
|
148
|
-
children: t.length > 0 ? t.map((r, p) => r.type === "separator" ? /* @__PURE__ */ e.jsx(A.Fragment, { children: r.component ? r.component : /* @__PURE__ */ e.jsx("div", { className: "ds-h-full ds-min-h-[30px] ds-w-[1px] ds-bg-Fills-terciary" }) }, `separator-${p}`) : /* @__PURE__ */ e.jsx(A.Fragment, { children: u ? /* @__PURE__ */ e.jsx(
|
|
149
|
-
I,
|
|
150
|
-
{
|
|
151
|
-
selected: b.some((n) => n.value === r.value),
|
|
152
|
-
onClick: (n) => k(r, n),
|
|
153
|
-
color: "secondary",
|
|
154
|
-
style: { minWidth: c, width: o },
|
|
155
|
-
className: g,
|
|
156
|
-
startIcon: r.startIcon,
|
|
157
|
-
endIcon: r.endIcon,
|
|
158
|
-
children: r.label
|
|
159
|
-
}
|
|
160
|
-
) : /* @__PURE__ */ e.jsx(
|
|
161
|
-
I,
|
|
162
|
-
{
|
|
163
|
-
selected: b.some((n) => n.value === r.value),
|
|
164
|
-
onClick: (n) => D(r, n),
|
|
165
|
-
color: "secondary",
|
|
166
|
-
style: { minWidth: c, width: o },
|
|
167
|
-
className: g,
|
|
168
|
-
startIcon: r.startIcon,
|
|
169
|
-
endIcon: r.endIcon,
|
|
170
|
-
children: r.label
|
|
171
|
-
}
|
|
172
|
-
) }, r.value)) : /* @__PURE__ */ e.jsx("div", { className: "ds_xSmallSubheadRegular ds-p-2 ds-text-System-red", children: l })
|
|
173
|
-
}
|
|
174
|
-
),
|
|
175
|
-
j && /* @__PURE__ */ e.jsx("div", { className: "ds_xSmallSubheadRegular ds-p-2 ds-text-System-red", children: j })
|
|
176
|
-
]
|
|
177
|
-
})
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
);
|
|
181
|
-
_s.displayName = "ButtonsGroupSelector";
|
|
182
|
-
const ks = (s) => window.innerWidth < ds ? /* @__PURE__ */ e.jsx($, w({}, s)) : /* @__PURE__ */ e.jsx(U, w({}, s));
|
|
183
|
-
ks.displayName = "Dropdown";
|
|
184
|
-
const U = ({
|
|
12
|
+
}, k = (s, e) => K(s, L(e));
|
|
13
|
+
import { j as d, p as Y, u as Z, o as _, i as O, s as ss, r as es, v as ds, d as as, e as ls, f as ts, g as rs, a as m, F as ns, A as os, h as is, D as cs, x as us, C as fs, l as xs, k as ms, n as ps } from "../ButtonsGroupSelector-BErKnj7L.js";
|
|
14
|
+
import { w as ks } from "../ButtonsGroupSelector-BErKnj7L.js";
|
|
15
|
+
import { useState as b } from "react";
|
|
16
|
+
const hs = (s) => window.innerWidth < Y ? /* @__PURE__ */ d.jsx(R, x({}, s)) : /* @__PURE__ */ d.jsx(M, x({}, s));
|
|
17
|
+
hs.displayName = "Dropdown";
|
|
18
|
+
const M = ({
|
|
185
19
|
placement: s = "bottom-start",
|
|
186
|
-
trigger:
|
|
20
|
+
trigger: e,
|
|
187
21
|
triggerContainerClassName: a,
|
|
188
|
-
disabled:
|
|
22
|
+
disabled: l,
|
|
189
23
|
onOpenChange: i,
|
|
190
|
-
adjustHeight:
|
|
191
|
-
adjustWidth:
|
|
192
|
-
options:
|
|
193
|
-
getSelectedValueDisplayText: o =
|
|
194
|
-
placeholder:
|
|
195
|
-
value:
|
|
196
|
-
isMultiSelect:
|
|
197
|
-
onChange:
|
|
24
|
+
adjustHeight: n = !0,
|
|
25
|
+
adjustWidth: t = !0,
|
|
26
|
+
options: r,
|
|
27
|
+
getSelectedValueDisplayText: o = S,
|
|
28
|
+
placeholder: u,
|
|
29
|
+
value: f,
|
|
30
|
+
isMultiSelect: y,
|
|
31
|
+
onChange: w
|
|
198
32
|
}) => {
|
|
199
|
-
const [
|
|
200
|
-
}, [
|
|
201
|
-
open:
|
|
202
|
-
onOpenChange: (
|
|
203
|
-
|
|
33
|
+
const [p, N] = b(), h = typeof f == "undefined" ? p : f, c = typeof f == "undefined" ? N : () => {
|
|
34
|
+
}, [F, A] = b(!1), { refs: g, floatingStyles: B, context: j } = Z({
|
|
35
|
+
open: F,
|
|
36
|
+
onOpenChange: (v) => {
|
|
37
|
+
A(v), i && i(v);
|
|
204
38
|
},
|
|
205
39
|
middleware: [
|
|
206
|
-
|
|
207
|
-
|
|
40
|
+
_(8),
|
|
41
|
+
O({
|
|
208
42
|
crossAxis: s.includes("-"),
|
|
209
43
|
fallbackAxisSideDirection: "end"
|
|
210
44
|
}),
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
apply({ availableWidth:
|
|
214
|
-
|
|
45
|
+
ss({ padding: 4 }),
|
|
46
|
+
es({
|
|
47
|
+
apply({ availableWidth: v, availableHeight: H, elements: z }) {
|
|
48
|
+
n && (z.floating.style.maxHeight = `${H - 4}px`), t && (z.floating.style.maxWidth = `${v - 4}px`);
|
|
215
49
|
}
|
|
216
50
|
})
|
|
217
51
|
],
|
|
218
|
-
whileElementsMounted:
|
|
52
|
+
whileElementsMounted: is,
|
|
219
53
|
placement: s
|
|
220
|
-
}),
|
|
221
|
-
return
|
|
222
|
-
|
|
54
|
+
}), E = ds(j), W = as(j), $ = ls(j), G = ts(j), { getReferenceProps: T, getFloatingProps: q } = rs([E, W, $, G]);
|
|
55
|
+
return e || (e = /* @__PURE__ */ d.jsx(
|
|
56
|
+
V,
|
|
223
57
|
{
|
|
224
|
-
selectedOption:
|
|
58
|
+
selectedOption: D(h, r),
|
|
225
59
|
getSelectedValueDisplayText: o,
|
|
226
|
-
placeholder:
|
|
60
|
+
placeholder: u
|
|
227
61
|
}
|
|
228
|
-
)),
|
|
229
|
-
/* @__PURE__ */
|
|
62
|
+
)), l ? /* @__PURE__ */ d.jsx("div", { className: a, children: e }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
63
|
+
/* @__PURE__ */ d.jsx(
|
|
230
64
|
"div",
|
|
231
|
-
|
|
232
|
-
className:
|
|
233
|
-
ref:
|
|
234
|
-
},
|
|
235
|
-
children:
|
|
65
|
+
k(x({
|
|
66
|
+
className: m("ds-cursor-pointer", a),
|
|
67
|
+
ref: g.setReference
|
|
68
|
+
}, T()), {
|
|
69
|
+
children: e
|
|
236
70
|
})
|
|
237
71
|
),
|
|
238
|
-
|
|
72
|
+
F && /* @__PURE__ */ d.jsx(ns, { children: /* @__PURE__ */ d.jsx(
|
|
239
73
|
"div",
|
|
240
|
-
|
|
241
|
-
ref:
|
|
242
|
-
style:
|
|
243
|
-
},
|
|
244
|
-
className:
|
|
74
|
+
k(x({
|
|
75
|
+
ref: g.setFloating,
|
|
76
|
+
style: B
|
|
77
|
+
}, q()), {
|
|
78
|
+
className: m(
|
|
245
79
|
"ds-z-[29999] ds-flex ds-min-w-[200px] ds-flex-col ds-gap-1 ds-rounded ds-bg-white ds-p-2 ds-shadow-md",
|
|
246
|
-
|
|
247
|
-
|
|
80
|
+
n && "ds-overflow-y-auto",
|
|
81
|
+
t && "ds-overflow-x-auto"
|
|
248
82
|
),
|
|
249
|
-
children: /* @__PURE__ */
|
|
250
|
-
|
|
83
|
+
children: /* @__PURE__ */ d.jsx(
|
|
84
|
+
P,
|
|
251
85
|
{
|
|
252
|
-
isMultiSelect:
|
|
253
|
-
options:
|
|
254
|
-
value:
|
|
255
|
-
setValue:
|
|
256
|
-
setIsOpen:
|
|
257
|
-
onChange:
|
|
86
|
+
isMultiSelect: y,
|
|
87
|
+
options: r,
|
|
88
|
+
value: h,
|
|
89
|
+
setValue: c,
|
|
90
|
+
setIsOpen: A,
|
|
91
|
+
onChange: w
|
|
258
92
|
}
|
|
259
93
|
)
|
|
260
94
|
})
|
|
261
95
|
) })
|
|
262
96
|
] });
|
|
263
97
|
};
|
|
264
|
-
|
|
265
|
-
const
|
|
98
|
+
M.displayName = "DesktopDropdown";
|
|
99
|
+
const R = ({
|
|
266
100
|
trigger: s,
|
|
267
|
-
triggerContainerClassName:
|
|
101
|
+
triggerContainerClassName: e,
|
|
268
102
|
disabled: a,
|
|
269
|
-
onOpenChange:
|
|
270
|
-
getSelectedValueDisplayText: i =
|
|
271
|
-
placeholder:
|
|
272
|
-
value:
|
|
273
|
-
options:
|
|
103
|
+
onOpenChange: l,
|
|
104
|
+
getSelectedValueDisplayText: i = S,
|
|
105
|
+
placeholder: n,
|
|
106
|
+
value: t,
|
|
107
|
+
options: r,
|
|
274
108
|
isMultiSelect: o,
|
|
275
|
-
onChange:
|
|
276
|
-
closeButtonLabel:
|
|
109
|
+
onChange: u,
|
|
110
|
+
closeButtonLabel: f = "Close"
|
|
277
111
|
}) => {
|
|
278
|
-
const [
|
|
279
|
-
}, [
|
|
280
|
-
return s || (s = /* @__PURE__ */
|
|
281
|
-
|
|
112
|
+
const [y, w] = b(), p = typeof t == "undefined" ? y : t, N = typeof t == "undefined" ? w : () => {
|
|
113
|
+
}, [h, c] = b(!1);
|
|
114
|
+
return s || (s = /* @__PURE__ */ d.jsx(
|
|
115
|
+
V,
|
|
282
116
|
{
|
|
283
|
-
selectedOption:
|
|
117
|
+
selectedOption: D(p, r),
|
|
284
118
|
getSelectedValueDisplayText: i,
|
|
285
|
-
placeholder:
|
|
119
|
+
placeholder: n
|
|
286
120
|
}
|
|
287
|
-
)), a ? /* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
121
|
+
)), a ? /* @__PURE__ */ d.jsx("div", { className: e, children: s }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
122
|
+
/* @__PURE__ */ d.jsx(
|
|
289
123
|
"div",
|
|
290
124
|
{
|
|
291
|
-
className:
|
|
125
|
+
className: e,
|
|
292
126
|
onClick: () => {
|
|
293
|
-
|
|
127
|
+
c(!0), l && l(!0);
|
|
294
128
|
},
|
|
295
129
|
children: s
|
|
296
130
|
}
|
|
297
131
|
),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
|
|
132
|
+
/* @__PURE__ */ d.jsx(
|
|
133
|
+
os,
|
|
300
134
|
{
|
|
301
135
|
animation: "slideUp",
|
|
302
|
-
show:
|
|
136
|
+
show: h,
|
|
303
137
|
handleClose: () => {
|
|
304
|
-
|
|
138
|
+
c(!1), l && l(!1);
|
|
305
139
|
},
|
|
306
|
-
contentClassName:
|
|
140
|
+
contentClassName: m("ds-absolute ds-mb-0 ds-w-full"),
|
|
307
141
|
className: "ds-z-[29999]",
|
|
308
|
-
children: /* @__PURE__ */
|
|
309
|
-
|
|
142
|
+
children: /* @__PURE__ */ d.jsx(
|
|
143
|
+
U,
|
|
310
144
|
{
|
|
311
145
|
onClose: () => {
|
|
312
|
-
|
|
146
|
+
c(!1), l && l(!1);
|
|
313
147
|
},
|
|
314
|
-
closeButtonLabel:
|
|
315
|
-
children: /* @__PURE__ */
|
|
316
|
-
|
|
148
|
+
closeButtonLabel: f,
|
|
149
|
+
children: /* @__PURE__ */ d.jsx(
|
|
150
|
+
P,
|
|
317
151
|
{
|
|
318
152
|
isMultiSelect: o,
|
|
319
|
-
options:
|
|
320
|
-
value:
|
|
321
|
-
setValue:
|
|
322
|
-
setIsOpen:
|
|
323
|
-
onChange:
|
|
153
|
+
options: r,
|
|
154
|
+
value: p,
|
|
155
|
+
setValue: N,
|
|
156
|
+
setIsOpen: c,
|
|
157
|
+
onChange: u
|
|
324
158
|
}
|
|
325
159
|
)
|
|
326
160
|
}
|
|
@@ -329,117 +163,117 @@ const $ = ({
|
|
|
329
163
|
)
|
|
330
164
|
] });
|
|
331
165
|
};
|
|
332
|
-
|
|
333
|
-
const
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
/* @__PURE__ */
|
|
166
|
+
R.displayName = "MobileDropdown";
|
|
167
|
+
const U = ({ onClose: s, closeButtonLabel: e, children: a }) => /* @__PURE__ */ d.jsxs("div", { className: "ds-mb-0 ds-flex ds-max-h-dvh ds-w-full ds-flex-col ds-bg-white", children: [
|
|
168
|
+
/* @__PURE__ */ d.jsxs("div", { className: "ds-flex ds-shrink-0 ds-items-center ds-justify-between ds-px-8 ds-py-4", children: [
|
|
169
|
+
/* @__PURE__ */ d.jsx(
|
|
336
170
|
"div",
|
|
337
171
|
{
|
|
338
172
|
onClick: s,
|
|
339
173
|
className: "ds-flex ds-size-5 ds-cursor-pointer ds-items-center ds-justify-center",
|
|
340
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ d.jsx(fs, { className: "ds-size-4" })
|
|
341
175
|
}
|
|
342
176
|
),
|
|
343
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ d.jsx("div", { className: "ds-size-5" })
|
|
344
178
|
] }),
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
|
|
179
|
+
/* @__PURE__ */ d.jsx("div", { className: "ds-grow ds-overflow-y-auto ds-p-4 ds-text-xSmallCalloutRegular", children: a }),
|
|
180
|
+
/* @__PURE__ */ d.jsx("div", { className: "ds-px-8 ds-py-4", children: /* @__PURE__ */ d.jsx(
|
|
181
|
+
xs,
|
|
348
182
|
{
|
|
349
183
|
buttonClassName: "ds-py-3",
|
|
350
184
|
onClick: s,
|
|
351
|
-
children:
|
|
185
|
+
children: e
|
|
352
186
|
}
|
|
353
187
|
) })
|
|
354
188
|
] });
|
|
355
|
-
|
|
356
|
-
const
|
|
189
|
+
U.displayName = "MobilePopoverContentWrapper";
|
|
190
|
+
const V = ({
|
|
357
191
|
selectedOption: s,
|
|
358
|
-
getSelectedValueDisplayText:
|
|
192
|
+
getSelectedValueDisplayText: e,
|
|
359
193
|
placeholder: a
|
|
360
194
|
}) => {
|
|
361
|
-
const
|
|
362
|
-
return /* @__PURE__ */
|
|
363
|
-
|
|
195
|
+
const l = !s || Array.isArray(s) && s.length === 0 ? a || "" : e(s);
|
|
196
|
+
return /* @__PURE__ */ d.jsx(
|
|
197
|
+
cs,
|
|
364
198
|
{
|
|
365
199
|
color: "secondary",
|
|
366
|
-
endIcon: /* @__PURE__ */
|
|
200
|
+
endIcon: /* @__PURE__ */ d.jsx(us, { className: "ds-size-4" }),
|
|
367
201
|
buttonClassName: "ds-justify-between",
|
|
368
|
-
children:
|
|
202
|
+
children: l
|
|
369
203
|
}
|
|
370
204
|
);
|
|
371
|
-
},
|
|
205
|
+
}, P = ({
|
|
372
206
|
options: s,
|
|
373
|
-
isMultiSelect:
|
|
207
|
+
isMultiSelect: e,
|
|
374
208
|
value: a,
|
|
375
|
-
setValue:
|
|
209
|
+
setValue: l,
|
|
376
210
|
setIsOpen: i,
|
|
377
|
-
onChange:
|
|
378
|
-
}) => s && s.map((
|
|
379
|
-
|
|
211
|
+
onChange: n
|
|
212
|
+
}) => s && s.map((t) => /* @__PURE__ */ d.jsx(
|
|
213
|
+
js,
|
|
380
214
|
{
|
|
381
215
|
onClick: () => {
|
|
382
|
-
let
|
|
383
|
-
if (
|
|
216
|
+
let r;
|
|
217
|
+
if (e) {
|
|
384
218
|
const o = a || [];
|
|
385
|
-
o.includes(
|
|
219
|
+
o.includes(t.value) ? r = o.filter((u) => u !== t.value) : r = [...o, t.value];
|
|
386
220
|
} else
|
|
387
|
-
|
|
388
|
-
|
|
221
|
+
r = t.value, i(!1);
|
|
222
|
+
l(r), n && n(D(r, s));
|
|
389
223
|
},
|
|
390
|
-
option:
|
|
391
|
-
isSelected: Array.isArray(a) ? a.some((
|
|
392
|
-
showCheckbox:
|
|
224
|
+
option: t,
|
|
225
|
+
isSelected: Array.isArray(a) ? a.some((r) => r === t.value) : a === t.value,
|
|
226
|
+
showCheckbox: e
|
|
393
227
|
},
|
|
394
|
-
|
|
395
|
-
)),
|
|
228
|
+
t.value
|
|
229
|
+
)), js = ({
|
|
396
230
|
onClick: s,
|
|
397
|
-
option:
|
|
231
|
+
option: e,
|
|
398
232
|
isSelected: a,
|
|
399
|
-
showCheckbox:
|
|
400
|
-
}) => /* @__PURE__ */
|
|
233
|
+
showCheckbox: l
|
|
234
|
+
}) => /* @__PURE__ */ d.jsxs(
|
|
401
235
|
"div",
|
|
402
236
|
{
|
|
403
|
-
onClick:
|
|
404
|
-
className:
|
|
237
|
+
onClick: e.disabled ? void 0 : s,
|
|
238
|
+
className: m(
|
|
405
239
|
"ds-group ds-flex ds-min-h-[72px] ds-cursor-pointer ds-items-center ds-gap-4 ds-rounded ds-px-4 ds-py-2 ds-text-smallFootnoteEmphasized hover:ds-bg-[#F6F8FC] ds-tablet:ds-min-h-[auto] ds-tablet:ds-gap-2 ds-tablet:ds-px-2 ds-desktop:ds-text-mediumFootnoteEmphasized",
|
|
406
|
-
!
|
|
240
|
+
!l && "ds-transition-[padding] ds-duration-300 hover:ds-px-4"
|
|
407
241
|
),
|
|
408
242
|
children: [
|
|
409
|
-
|
|
243
|
+
e.thumbnailUrl && /* @__PURE__ */ d.jsx(
|
|
410
244
|
"img",
|
|
411
245
|
{
|
|
412
|
-
src:
|
|
246
|
+
src: e.thumbnailUrl,
|
|
413
247
|
className: "ds-h-14 ds-w-14 ds-shrink-0 ds-rounded ds-object-cover group-hover:ds-pr-0 ds-tablet:ds-h-6 ds-tablet:ds-w-9 ds-tablet:ds-rounded-sm"
|
|
414
248
|
}
|
|
415
249
|
),
|
|
416
|
-
|
|
417
|
-
/* @__PURE__ */
|
|
250
|
+
e.icon,
|
|
251
|
+
/* @__PURE__ */ d.jsx(
|
|
418
252
|
"div",
|
|
419
253
|
{
|
|
420
|
-
className:
|
|
254
|
+
className: m(
|
|
421
255
|
"ds-flex-grow",
|
|
422
|
-
!
|
|
256
|
+
!l && "ds-transition-[padding] ds-duration-300 group-hover:ds-pr-0 ds-tablet:ds-pr-4"
|
|
423
257
|
),
|
|
424
|
-
children:
|
|
258
|
+
children: e.label
|
|
425
259
|
}
|
|
426
260
|
),
|
|
427
|
-
a && !
|
|
428
|
-
|
|
429
|
-
|
|
261
|
+
a && !l && /* @__PURE__ */ d.jsx(ms, { className: "ds-size-4 ds-shrink-0" }),
|
|
262
|
+
l && /* @__PURE__ */ d.jsx(
|
|
263
|
+
ps,
|
|
430
264
|
{
|
|
431
265
|
isChecked: a,
|
|
432
|
-
disabled:
|
|
266
|
+
disabled: e.disabled
|
|
433
267
|
}
|
|
434
268
|
)
|
|
435
269
|
]
|
|
436
270
|
}
|
|
437
|
-
),
|
|
271
|
+
), D = (s, e) => Array.isArray(s) ? e.filter((a) => s.includes(a.value)) : e.find((a) => a.value === s), S = (s) => Array.isArray(s) ? s.map((e) => e.label).join(", ") : s.label;
|
|
438
272
|
export {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
273
|
+
cs as Button,
|
|
274
|
+
ks as ButtonsGroupSelector,
|
|
275
|
+
M as DesktopDropdown,
|
|
276
|
+
hs as Dropdown,
|
|
277
|
+
R as MobileDropdown,
|
|
278
|
+
D as findOptionByValue
|
|
445
279
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -761,6 +761,21 @@ export declare const LoadingIcon: FC<{
|
|
|
761
761
|
className?: string;
|
|
762
762
|
}>;
|
|
763
763
|
|
|
764
|
+
export declare const LocaleSettingsModal: FC<LocaleSettingsModalProps>;
|
|
765
|
+
|
|
766
|
+
export declare interface LocaleSettingsModalProps {
|
|
767
|
+
languages?: Option_3[];
|
|
768
|
+
currencies?: Option_3[];
|
|
769
|
+
selectedLanguage?: Option_3;
|
|
770
|
+
selectedCurrency?: Option_3;
|
|
771
|
+
show: boolean;
|
|
772
|
+
onSave: (settings: {
|
|
773
|
+
language: Option_3;
|
|
774
|
+
currency: Option_3;
|
|
775
|
+
}) => void;
|
|
776
|
+
onClose: () => void;
|
|
777
|
+
}
|
|
778
|
+
|
|
764
779
|
export declare const LocationIcon: FC<{
|
|
765
780
|
className?: string;
|
|
766
781
|
}>;
|
|
@@ -885,6 +900,11 @@ declare interface Option_2 {
|
|
|
885
900
|
}
|
|
886
901
|
export { Option_2 as Option }
|
|
887
902
|
|
|
903
|
+
declare type Option_3 = {
|
|
904
|
+
value: string;
|
|
905
|
+
label: string;
|
|
906
|
+
};
|
|
907
|
+
|
|
888
908
|
export declare const PartnerIcon: FC<{
|
|
889
909
|
className?: string;
|
|
890
910
|
}>;
|