design-system-silkhaus 3.7.2 → 3.7.4
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/app/index.js +34 -34
- package/dist/index.d.ts +3 -3
- package/dist/index.js +327 -319
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/app/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var I = (s, e, a) => e in s ? J(s, e, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
X.call(e, a) && I(s, a, e[a]);
|
|
11
11
|
return s;
|
|
12
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
|
|
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 is, h as os, D as cs, x as us, C as fs, l as xs, k as ms, n as ps } from "../ButtonsGroupSelector-BErKnj7L.js";
|
|
14
14
|
import { w as ks } from "../ButtonsGroupSelector-BErKnj7L.js";
|
|
15
15
|
import { useState as b } from "react";
|
|
16
16
|
const hs = (s) => window.innerWidth < Y ? /* @__PURE__ */ d.jsx(R, x({}, s)) : /* @__PURE__ */ d.jsx(M, x({}, s));
|
|
@@ -20,21 +20,21 @@ const M = ({
|
|
|
20
20
|
trigger: e,
|
|
21
21
|
triggerContainerClassName: a,
|
|
22
22
|
disabled: l,
|
|
23
|
-
onOpenChange:
|
|
23
|
+
onOpenChange: o,
|
|
24
24
|
adjustHeight: n = !0,
|
|
25
25
|
adjustWidth: t = !0,
|
|
26
26
|
options: r,
|
|
27
|
-
getSelectedValueDisplayText:
|
|
27
|
+
getSelectedValueDisplayText: i = P,
|
|
28
28
|
placeholder: u,
|
|
29
29
|
value: f,
|
|
30
30
|
isMultiSelect: y,
|
|
31
31
|
onChange: w
|
|
32
32
|
}) => {
|
|
33
33
|
const [p, N] = b(), h = typeof f == "undefined" ? p : f, c = typeof f == "undefined" ? N : () => {
|
|
34
|
-
}, [
|
|
35
|
-
open:
|
|
34
|
+
}, [A, F] = b(!1), { refs: g, floatingStyles: B, context: j } = Z({
|
|
35
|
+
open: A,
|
|
36
36
|
onOpenChange: (v) => {
|
|
37
|
-
|
|
37
|
+
F(v), o && o(v);
|
|
38
38
|
},
|
|
39
39
|
middleware: [
|
|
40
40
|
_(8),
|
|
@@ -44,19 +44,19 @@ const M = ({
|
|
|
44
44
|
}),
|
|
45
45
|
ss({ padding: 4 }),
|
|
46
46
|
es({
|
|
47
|
-
apply({ availableWidth: v, availableHeight:
|
|
48
|
-
n && (z.floating.style.maxHeight = `${
|
|
47
|
+
apply({ availableWidth: v, availableHeight: q, elements: z }) {
|
|
48
|
+
n && (z.floating.style.maxHeight = `${q - 4}px`), t && (z.floating.style.maxWidth = `${v - 4}px`);
|
|
49
49
|
}
|
|
50
50
|
})
|
|
51
51
|
],
|
|
52
|
-
whileElementsMounted:
|
|
52
|
+
whileElementsMounted: os,
|
|
53
53
|
placement: s
|
|
54
|
-
}), E = ds(j), W = as(j), $ = ls(j), G = ts(j), { getReferenceProps: T, getFloatingProps:
|
|
54
|
+
}), E = ds(j), W = as(j), $ = ls(j), G = ts(j), { getReferenceProps: T, getFloatingProps: H } = rs([E, W, $, G]);
|
|
55
55
|
return e || (e = /* @__PURE__ */ d.jsx(
|
|
56
|
-
|
|
56
|
+
U,
|
|
57
57
|
{
|
|
58
58
|
selectedOption: D(h, r),
|
|
59
|
-
getSelectedValueDisplayText:
|
|
59
|
+
getSelectedValueDisplayText: i,
|
|
60
60
|
placeholder: u
|
|
61
61
|
}
|
|
62
62
|
)), l ? /* @__PURE__ */ d.jsx("div", { className: a, children: e }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
@@ -69,25 +69,25 @@ const M = ({
|
|
|
69
69
|
children: e
|
|
70
70
|
})
|
|
71
71
|
),
|
|
72
|
-
|
|
72
|
+
A && /* @__PURE__ */ d.jsx(ns, { children: /* @__PURE__ */ d.jsx(
|
|
73
73
|
"div",
|
|
74
74
|
k(x({
|
|
75
75
|
ref: g.setFloating,
|
|
76
76
|
style: B
|
|
77
|
-
},
|
|
77
|
+
}, H()), {
|
|
78
78
|
className: m(
|
|
79
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",
|
|
80
80
|
n && "ds-overflow-y-auto",
|
|
81
81
|
t && "ds-overflow-x-auto"
|
|
82
82
|
),
|
|
83
83
|
children: /* @__PURE__ */ d.jsx(
|
|
84
|
-
|
|
84
|
+
V,
|
|
85
85
|
{
|
|
86
86
|
isMultiSelect: y,
|
|
87
87
|
options: r,
|
|
88
88
|
value: h,
|
|
89
89
|
setValue: c,
|
|
90
|
-
setIsOpen:
|
|
90
|
+
setIsOpen: F,
|
|
91
91
|
onChange: w
|
|
92
92
|
}
|
|
93
93
|
)
|
|
@@ -101,21 +101,21 @@ const R = ({
|
|
|
101
101
|
triggerContainerClassName: e,
|
|
102
102
|
disabled: a,
|
|
103
103
|
onOpenChange: l,
|
|
104
|
-
getSelectedValueDisplayText:
|
|
104
|
+
getSelectedValueDisplayText: o = P,
|
|
105
105
|
placeholder: n,
|
|
106
106
|
value: t,
|
|
107
107
|
options: r,
|
|
108
|
-
isMultiSelect:
|
|
108
|
+
isMultiSelect: i,
|
|
109
109
|
onChange: u,
|
|
110
110
|
closeButtonLabel: f = "Close"
|
|
111
111
|
}) => {
|
|
112
112
|
const [y, w] = b(), p = typeof t == "undefined" ? y : t, N = typeof t == "undefined" ? w : () => {
|
|
113
113
|
}, [h, c] = b(!1);
|
|
114
114
|
return s || (s = /* @__PURE__ */ d.jsx(
|
|
115
|
-
|
|
115
|
+
U,
|
|
116
116
|
{
|
|
117
117
|
selectedOption: D(p, r),
|
|
118
|
-
getSelectedValueDisplayText:
|
|
118
|
+
getSelectedValueDisplayText: o,
|
|
119
119
|
placeholder: n
|
|
120
120
|
}
|
|
121
121
|
)), a ? /* @__PURE__ */ d.jsx("div", { className: e, children: s }) : /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
|
@@ -130,7 +130,7 @@ const R = ({
|
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
132
|
/* @__PURE__ */ d.jsx(
|
|
133
|
-
|
|
133
|
+
is,
|
|
134
134
|
{
|
|
135
135
|
animation: "slideUp",
|
|
136
136
|
show: h,
|
|
@@ -140,16 +140,16 @@ const R = ({
|
|
|
140
140
|
contentClassName: m("ds-absolute ds-mb-0 ds-w-full"),
|
|
141
141
|
className: "ds-z-[29999]",
|
|
142
142
|
children: /* @__PURE__ */ d.jsx(
|
|
143
|
-
|
|
143
|
+
S,
|
|
144
144
|
{
|
|
145
145
|
onClose: () => {
|
|
146
146
|
c(!1), l && l(!1);
|
|
147
147
|
},
|
|
148
148
|
closeButtonLabel: f,
|
|
149
149
|
children: /* @__PURE__ */ d.jsx(
|
|
150
|
-
|
|
150
|
+
V,
|
|
151
151
|
{
|
|
152
|
-
isMultiSelect:
|
|
152
|
+
isMultiSelect: i,
|
|
153
153
|
options: r,
|
|
154
154
|
value: p,
|
|
155
155
|
setValue: N,
|
|
@@ -164,7 +164,7 @@ const R = ({
|
|
|
164
164
|
] });
|
|
165
165
|
};
|
|
166
166
|
R.displayName = "MobileDropdown";
|
|
167
|
-
const
|
|
167
|
+
const S = ({ 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
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
169
|
/* @__PURE__ */ d.jsx(
|
|
170
170
|
"div",
|
|
@@ -186,8 +186,8 @@ const U = ({ onClose: s, closeButtonLabel: e, children: a }) => /* @__PURE__ */
|
|
|
186
186
|
}
|
|
187
187
|
) })
|
|
188
188
|
] });
|
|
189
|
-
|
|
190
|
-
const
|
|
189
|
+
S.displayName = "MobilePopoverContentWrapper";
|
|
190
|
+
const U = ({
|
|
191
191
|
selectedOption: s,
|
|
192
192
|
getSelectedValueDisplayText: e,
|
|
193
193
|
placeholder: a
|
|
@@ -202,12 +202,12 @@ const V = ({
|
|
|
202
202
|
children: l
|
|
203
203
|
}
|
|
204
204
|
);
|
|
205
|
-
},
|
|
205
|
+
}, V = ({
|
|
206
206
|
options: s,
|
|
207
207
|
isMultiSelect: e,
|
|
208
208
|
value: a,
|
|
209
209
|
setValue: l,
|
|
210
|
-
setIsOpen:
|
|
210
|
+
setIsOpen: o,
|
|
211
211
|
onChange: n
|
|
212
212
|
}) => s && s.map((t) => /* @__PURE__ */ d.jsx(
|
|
213
213
|
js,
|
|
@@ -215,10 +215,10 @@ const V = ({
|
|
|
215
215
|
onClick: () => {
|
|
216
216
|
let r;
|
|
217
217
|
if (e) {
|
|
218
|
-
const
|
|
219
|
-
|
|
218
|
+
const i = a || [];
|
|
219
|
+
i.includes(t.value) ? r = i.filter((u) => u !== t.value) : r = [...i, t.value];
|
|
220
220
|
} else
|
|
221
|
-
r = t.value,
|
|
221
|
+
r = t.value, o(!1);
|
|
222
222
|
l(r), n && n(D(r, s));
|
|
223
223
|
},
|
|
224
224
|
option: t,
|
|
@@ -236,7 +236,7 @@ const V = ({
|
|
|
236
236
|
{
|
|
237
237
|
onClick: e.disabled ? void 0 : s,
|
|
238
238
|
className: m(
|
|
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-
|
|
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-mediumSubHeadEmphasized 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",
|
|
240
240
|
!l && "ds-transition-[padding] ds-duration-300 hover:ds-px-4"
|
|
241
241
|
),
|
|
242
242
|
children: [
|
|
@@ -268,7 +268,7 @@ const V = ({
|
|
|
268
268
|
)
|
|
269
269
|
]
|
|
270
270
|
}
|
|
271
|
-
), D = (s, e) => Array.isArray(s) ? e.filter((a) => s.includes(a.value)) : e.find((a) => a.value === s),
|
|
271
|
+
), D = (s, e) => Array.isArray(s) ? e.filter((a) => s.includes(a.value)) : e.find((a) => a.value === s), P = (s) => Array.isArray(s) ? s.map((e) => e.label).join(", ") : s.label;
|
|
272
272
|
export {
|
|
273
273
|
cs as Button,
|
|
274
274
|
ks as ButtonsGroupSelector,
|
package/dist/index.d.ts
CHANGED
|
@@ -1285,7 +1285,7 @@ export declare type SelectOption = {
|
|
|
1285
1285
|
value: string;
|
|
1286
1286
|
};
|
|
1287
1287
|
|
|
1288
|
-
export declare const SelectPopover:
|
|
1288
|
+
export declare const SelectPopover: FC<SelectPopoverProps>;
|
|
1289
1289
|
|
|
1290
1290
|
export declare interface SelectPopoverProps {
|
|
1291
1291
|
showPopup?: boolean;
|
|
@@ -1551,9 +1551,9 @@ export declare const TrashIcon: FC<{
|
|
|
1551
1551
|
className?: string;
|
|
1552
1552
|
}>;
|
|
1553
1553
|
|
|
1554
|
-
export declare const TravelList:
|
|
1554
|
+
export declare const TravelList: FC<TravelListProps>;
|
|
1555
1555
|
|
|
1556
|
-
export declare const TravelListItem:
|
|
1556
|
+
export declare const TravelListItem: FC<TravelListItemProps>;
|
|
1557
1557
|
|
|
1558
1558
|
export declare interface TravelListItemProps {
|
|
1559
1559
|
title?: string;
|