suus-component-library 0.1.15 → 0.1.17
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/components/banner-hero/banner-hero.d.ts +31 -0
- package/dist/components/banner-hero/banner-hero.d.ts.map +1 -0
- package/dist/components/form/button/Button.d.ts +1 -1
- package/dist/components/form/button/Button.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/suus-component-library.css +1 -1
- package/dist/suus-component-library.js +255 -163
- package/dist/suus-component-library.umd.cjs +5 -1
- package/package.json +2 -2
|
@@ -38,7 +38,62 @@ function l({ label: r, onClick: i, type: a = "button", disabled: o = !1, loading
|
|
|
38
38
|
})] })
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/components/banner-hero/banner-hero.tsx
|
|
43
|
+
var u = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 800'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23e8f3ec'/%3E%3Cstop offset='100%25' stop-color='%23d7e6dc'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1600' height='800' fill='url(%23g)'/%3E%3C/svg%3E", d = (e) => e === "--color-juice-sugarcane" || e === "--color-juice-tamarind" || e === "--color-juice-guarana" || e === "--color-juice-icetea";
|
|
44
|
+
function f({ title: e, description: r, colorToken: i, imageBackgroundDesktop: a, imageBackgroundTablet: o, imageBackgroundMobile: c, fallbackImageSrc: f, labelButtonPrimary: p, actionButtonPrimary: m, labelButtonSecondary: h, actionButtonSecondary: g }) {
|
|
45
|
+
let [_, v] = s(null), y = a?.trim(), b = o?.trim(), x = c?.trim(), S = f?.trim() || u, C = [
|
|
46
|
+
y,
|
|
47
|
+
b,
|
|
48
|
+
x
|
|
49
|
+
].filter(Boolean).join("|"), w = !!y && _ !== C, T = d(i) ? i : void 0, E = w ? [
|
|
50
|
+
x ? `${x} 900w` : "",
|
|
51
|
+
b ? `${b} 1600w` : "",
|
|
52
|
+
`${y} 2400w`
|
|
53
|
+
].filter(Boolean).join(", ") : void 0;
|
|
54
|
+
return /* @__PURE__ */ t("div", {
|
|
55
|
+
className: "content-child-max banner-hero",
|
|
56
|
+
children: /* @__PURE__ */ n("div", {
|
|
57
|
+
className: "hero__container",
|
|
58
|
+
children: [/* @__PURE__ */ t("img", {
|
|
59
|
+
src: w ? y : S,
|
|
60
|
+
srcSet: E,
|
|
61
|
+
sizes: E ? "100vw" : void 0,
|
|
62
|
+
className: "image-banner",
|
|
63
|
+
alt: "background",
|
|
64
|
+
onError: w ? () => v(C) : void 0
|
|
65
|
+
}), /* @__PURE__ */ n("div", {
|
|
66
|
+
className: "hero__content",
|
|
67
|
+
style: i ? { color: `var(${i})` } : void 0,
|
|
68
|
+
children: [
|
|
69
|
+
e && e.split("\n").map((r, a) => /* @__PURE__ */ n("span", {
|
|
70
|
+
className: `banner--title ${i || ""}`,
|
|
71
|
+
"data-testid": "bannerHeroTitle",
|
|
72
|
+
children: [r, a < e.split("\n").length - 1 && /* @__PURE__ */ t("br", {})]
|
|
73
|
+
}, a)),
|
|
74
|
+
/* @__PURE__ */ t("p", {
|
|
75
|
+
className: "banner--description",
|
|
76
|
+
children: r && r.split("\n").map((e, i) => /* @__PURE__ */ n("span", { children: [e, i < r.split("\n").length - 1 && /* @__PURE__ */ t("br", {})] }, i))
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ n("div", {
|
|
79
|
+
className: "banner-hero-buttonbar",
|
|
80
|
+
children: [p && /* @__PURE__ */ t(l, {
|
|
81
|
+
label: p,
|
|
82
|
+
variant: "primary",
|
|
83
|
+
colorToken: T,
|
|
84
|
+
onClick: m
|
|
85
|
+
}), h && /* @__PURE__ */ t(l, {
|
|
86
|
+
label: h,
|
|
87
|
+
variant: "secondary",
|
|
88
|
+
onClick: g
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})]
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
var p = {
|
|
42
97
|
checkboxWrapper: "_checkboxWrapper_y1lye_1",
|
|
43
98
|
checkboxInput: "_checkboxInput_y1lye_15",
|
|
44
99
|
checkboxLabel: "_checkboxLabel_y1lye_24",
|
|
@@ -52,54 +107,54 @@ var u = {
|
|
|
52
107
|
};
|
|
53
108
|
//#endregion
|
|
54
109
|
//#region src/components/form/checkbox/Checkbox.tsx
|
|
55
|
-
function
|
|
56
|
-
let
|
|
110
|
+
function m({ label: e, name: r, id: i, error: a, variant: o = "default", className: s, disabled: c, ...l }) {
|
|
111
|
+
let u = i ?? `${r}-checkbox`;
|
|
57
112
|
return /* @__PURE__ */ n("div", {
|
|
58
113
|
className: [
|
|
59
|
-
|
|
60
|
-
o === "glassy" ?
|
|
61
|
-
a ?
|
|
62
|
-
c ?
|
|
114
|
+
p.checkboxWrapper,
|
|
115
|
+
o === "glassy" ? p.checkboxWrapperGlassy : "",
|
|
116
|
+
a ? p.checkboxWrapperError : "",
|
|
117
|
+
c ? p.checkboxWrapperDisabled : "",
|
|
63
118
|
s ?? ""
|
|
64
119
|
].filter(Boolean).join(" "),
|
|
65
120
|
children: [
|
|
66
121
|
/* @__PURE__ */ t("input", {
|
|
67
122
|
type: "checkbox",
|
|
68
|
-
id:
|
|
123
|
+
id: u,
|
|
69
124
|
name: r,
|
|
70
125
|
disabled: c,
|
|
71
|
-
className:
|
|
126
|
+
className: p.checkboxInput,
|
|
72
127
|
"aria-invalid": !!a,
|
|
73
128
|
"aria-describedby": a ? `${r}-error` : void 0,
|
|
74
129
|
...l
|
|
75
130
|
}),
|
|
76
131
|
/* @__PURE__ */ n("label", {
|
|
77
|
-
htmlFor:
|
|
78
|
-
className:
|
|
132
|
+
htmlFor: u,
|
|
133
|
+
className: p.checkboxLabel,
|
|
79
134
|
children: [/* @__PURE__ */ t("span", {
|
|
80
|
-
className:
|
|
135
|
+
className: p.customCheckbox,
|
|
81
136
|
"aria-hidden": "true",
|
|
82
137
|
children: /* @__PURE__ */ t("svg", {
|
|
83
|
-
className:
|
|
138
|
+
className: p.checkIcon,
|
|
84
139
|
viewBox: "0 0 24 24",
|
|
85
140
|
focusable: "false",
|
|
86
141
|
"aria-hidden": "true",
|
|
87
142
|
children: /* @__PURE__ */ t("path", { d: "M20 6L9 17L4 12" })
|
|
88
143
|
})
|
|
89
144
|
}), /* @__PURE__ */ t("span", {
|
|
90
|
-
className:
|
|
145
|
+
className: p.checkboxText,
|
|
91
146
|
children: e
|
|
92
147
|
})]
|
|
93
148
|
}),
|
|
94
149
|
a && /* @__PURE__ */ t("span", {
|
|
95
150
|
id: `${r}-error`,
|
|
96
|
-
className:
|
|
151
|
+
className: p.errorMessage,
|
|
97
152
|
children: a
|
|
98
153
|
})
|
|
99
154
|
]
|
|
100
155
|
});
|
|
101
156
|
}
|
|
102
|
-
var
|
|
157
|
+
var h = {
|
|
103
158
|
chip: "_chip_1po0g_1",
|
|
104
159
|
chipDefault: "_chipDefault_1po0g_21",
|
|
105
160
|
chipGlassy: "_chipGlassy_1po0g_36",
|
|
@@ -108,29 +163,29 @@ var f = {
|
|
|
108
163
|
};
|
|
109
164
|
//#endregion
|
|
110
165
|
//#region src/components/form/chip/Chip.tsx
|
|
111
|
-
function
|
|
112
|
-
let [u, d] = s(a),
|
|
113
|
-
function
|
|
166
|
+
function g({ children: e, variant: n = "default", clickable: r = !0, checked: i, defaultChecked: a = !1, onCheckedChange: o, className: c, ...l }) {
|
|
167
|
+
let [u, d] = s(a), f = typeof i == "boolean", p = f ? i : u;
|
|
168
|
+
function m(e) {
|
|
114
169
|
if (!r) return;
|
|
115
|
-
let t = !
|
|
116
|
-
|
|
170
|
+
let t = !p;
|
|
171
|
+
f || d(t), o?.(t), l.onClick?.(e);
|
|
117
172
|
}
|
|
118
|
-
let g = n === "glassy" ?
|
|
173
|
+
let g = n === "glassy" ? h.chipGlassy : h.chipDefault, _ = p ? h.chipChecked : "", v = r ? "" : h.chipDisabled;
|
|
119
174
|
return r ? /* @__PURE__ */ t("button", {
|
|
120
175
|
type: "button",
|
|
121
|
-
"aria-pressed":
|
|
176
|
+
"aria-pressed": p,
|
|
122
177
|
className: [
|
|
123
|
-
|
|
178
|
+
h.chip,
|
|
124
179
|
g,
|
|
125
180
|
_,
|
|
126
181
|
c ?? ""
|
|
127
182
|
].filter(Boolean).join(" "),
|
|
128
|
-
onClick:
|
|
183
|
+
onClick: m,
|
|
129
184
|
...l,
|
|
130
185
|
children: e
|
|
131
186
|
}) : /* @__PURE__ */ t("span", {
|
|
132
187
|
className: [
|
|
133
|
-
|
|
188
|
+
h.chip,
|
|
134
189
|
g,
|
|
135
190
|
_,
|
|
136
191
|
v,
|
|
@@ -139,7 +194,7 @@ function p({ children: e, variant: n = "default", clickable: r = !0, checked: i,
|
|
|
139
194
|
children: e
|
|
140
195
|
});
|
|
141
196
|
}
|
|
142
|
-
var
|
|
197
|
+
var _ = {
|
|
143
198
|
dateInputWrapper: "_dateInputWrapper_6osqj_1",
|
|
144
199
|
inputDateField: "_inputDateField_6osqj_6",
|
|
145
200
|
inputDateFieldGlassy: "_inputDateFieldGlassy_6osqj_38",
|
|
@@ -150,8 +205,8 @@ var m = {
|
|
|
150
205
|
};
|
|
151
206
|
//#endregion
|
|
152
207
|
//#region src/components/form/date-picker/DatePicker.tsx
|
|
153
|
-
function
|
|
154
|
-
let
|
|
208
|
+
function v({ label: e, name: r, id: i, value: a = null, maxDate: s, minDate: c, error: l, variant: u = "default", className: d, ref: f, onDateChange: p, onBlur: m, disabled: h, ...g }) {
|
|
209
|
+
let v = i ?? r, S = o(null), C = s ?? /* @__PURE__ */ new Date();
|
|
155
210
|
function w(e) {
|
|
156
211
|
S.current = e, typeof f == "function" ? f(e) : f && (f.current = e);
|
|
157
212
|
}
|
|
@@ -161,69 +216,69 @@ function h({ label: e, name: r, id: i, value: a = null, maxDate: s, minDate: c,
|
|
|
161
216
|
p?.(null);
|
|
162
217
|
return;
|
|
163
218
|
}
|
|
164
|
-
p?.(
|
|
219
|
+
p?.(b(t));
|
|
165
220
|
}
|
|
166
221
|
function E() {
|
|
167
|
-
|
|
222
|
+
h || (S.current?.showPicker?.(), S.current?.focus());
|
|
168
223
|
}
|
|
169
224
|
return /* @__PURE__ */ n("div", {
|
|
170
225
|
className: "inputBlockVertical",
|
|
171
226
|
children: [
|
|
172
227
|
/* @__PURE__ */ t("label", {
|
|
173
|
-
htmlFor:
|
|
228
|
+
htmlFor: v,
|
|
174
229
|
className: ["inputLabel", u === "glassy" ? "inputLabelGlassy" : ""].filter(Boolean).join(" "),
|
|
175
230
|
children: e
|
|
176
231
|
}),
|
|
177
232
|
/* @__PURE__ */ n("div", {
|
|
178
|
-
className:
|
|
233
|
+
className: _.dateInputWrapper,
|
|
179
234
|
children: [/* @__PURE__ */ t("input", {
|
|
180
|
-
id:
|
|
235
|
+
id: v,
|
|
181
236
|
name: r,
|
|
182
237
|
ref: w,
|
|
183
238
|
type: "date",
|
|
184
|
-
value:
|
|
185
|
-
max:
|
|
186
|
-
min: c ?
|
|
187
|
-
disabled:
|
|
239
|
+
value: y(a),
|
|
240
|
+
max: y(C),
|
|
241
|
+
min: c ? y(c) : void 0,
|
|
242
|
+
disabled: h,
|
|
188
243
|
onChange: T,
|
|
189
|
-
onBlur:
|
|
244
|
+
onBlur: m,
|
|
190
245
|
className: [
|
|
191
|
-
|
|
192
|
-
u === "glassy" ?
|
|
193
|
-
l ?
|
|
246
|
+
_.inputDateField,
|
|
247
|
+
u === "glassy" ? _.inputDateFieldGlassy : "",
|
|
248
|
+
l ? _.inputError : "",
|
|
194
249
|
d ?? ""
|
|
195
250
|
].filter(Boolean).join(" "),
|
|
196
251
|
"aria-invalid": !!l,
|
|
197
252
|
"aria-describedby": l ? `${r}-error` : void 0,
|
|
198
|
-
...
|
|
253
|
+
...g
|
|
199
254
|
}), /* @__PURE__ */ t("button", {
|
|
200
255
|
type: "button",
|
|
201
|
-
className:
|
|
256
|
+
className: _.calendarIconButton,
|
|
202
257
|
onClick: E,
|
|
203
|
-
disabled:
|
|
258
|
+
disabled: h,
|
|
204
259
|
"aria-label": "Datum auswählen",
|
|
205
260
|
tabIndex: -1,
|
|
206
|
-
children: /* @__PURE__ */ t(
|
|
261
|
+
children: /* @__PURE__ */ t(x, {})
|
|
207
262
|
})]
|
|
208
263
|
}),
|
|
209
264
|
l && /* @__PURE__ */ t("span", {
|
|
210
265
|
id: `${r}-error`,
|
|
211
|
-
className:
|
|
266
|
+
className: _.errorMessage,
|
|
212
267
|
children: l
|
|
213
268
|
})
|
|
214
269
|
]
|
|
215
270
|
});
|
|
216
271
|
}
|
|
217
|
-
function
|
|
272
|
+
function y(e) {
|
|
218
273
|
return e ? `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}` : "";
|
|
219
274
|
}
|
|
220
|
-
function
|
|
275
|
+
function b(e) {
|
|
221
276
|
let [t, n, r] = e.split("-").map(Number);
|
|
222
277
|
return new Date(t, n - 1, r);
|
|
223
278
|
}
|
|
224
|
-
function
|
|
279
|
+
function x() {
|
|
225
280
|
return /* @__PURE__ */ n("svg", {
|
|
226
|
-
className:
|
|
281
|
+
className: _.icon,
|
|
227
282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
228
283
|
viewBox: "0 0 24 24",
|
|
229
284
|
fill: "none",
|
|
@@ -236,7 +291,7 @@ function v() {
|
|
|
236
291
|
]
|
|
237
292
|
});
|
|
238
293
|
}
|
|
239
|
-
var
|
|
294
|
+
var S = {
|
|
240
295
|
inputSelectField: "_inputSelectField_1uwtt_1",
|
|
241
296
|
inputSelectFieldGlassy: "_inputSelectFieldGlassy_1uwtt_12",
|
|
242
297
|
inputError: "_inputError_1uwtt_24",
|
|
@@ -244,7 +299,7 @@ var y = {
|
|
|
244
299
|
};
|
|
245
300
|
//#endregion
|
|
246
301
|
//#region src/components/form/dropdown/Dropdown.tsx
|
|
247
|
-
function
|
|
302
|
+
function C({ label: e, name: r, options: i, placeholder: a, error: o, variant: s = "default", className: c, disabled: l, ...u }) {
|
|
248
303
|
return /* @__PURE__ */ n("div", {
|
|
249
304
|
className: "inputBlockVertical",
|
|
250
305
|
children: [
|
|
@@ -258,9 +313,9 @@ function b({ label: e, name: r, options: i, placeholder: a, error: o, variant: s
|
|
|
258
313
|
name: r,
|
|
259
314
|
disabled: l,
|
|
260
315
|
className: [
|
|
261
|
-
|
|
262
|
-
s === "glassy" ?
|
|
263
|
-
o ?
|
|
316
|
+
S.inputSelectField,
|
|
317
|
+
s === "glassy" ? S.inputSelectFieldGlassy : "",
|
|
318
|
+
o ? S.inputError : "",
|
|
264
319
|
c ?? ""
|
|
265
320
|
].filter(Boolean).join(" "),
|
|
266
321
|
"aria-invalid": !!o,
|
|
@@ -277,13 +332,13 @@ function b({ label: e, name: r, options: i, placeholder: a, error: o, variant: s
|
|
|
277
332
|
}),
|
|
278
333
|
o && /* @__PURE__ */ t("span", {
|
|
279
334
|
id: `${r}-error`,
|
|
280
|
-
className:
|
|
335
|
+
className: S.errorMessage,
|
|
281
336
|
children: o
|
|
282
337
|
})
|
|
283
338
|
]
|
|
284
339
|
});
|
|
285
340
|
}
|
|
286
|
-
var
|
|
341
|
+
var w = {
|
|
287
342
|
appLink: "_appLink_b53rv_1",
|
|
288
343
|
appLinkDefault: "_appLinkDefault_b53rv_19",
|
|
289
344
|
appLinkGlassy: "_appLinkGlassy_b53rv_30",
|
|
@@ -293,7 +348,7 @@ var x = {
|
|
|
293
348
|
};
|
|
294
349
|
//#endregion
|
|
295
350
|
//#region src/components/form/link/Link.tsx
|
|
296
|
-
function
|
|
351
|
+
function T({ children: e, href: r, onClick: i, newTab: a = !1, showArrow: o = !0, variant: s = "default", className: c, ...l }) {
|
|
297
352
|
function u(e) {
|
|
298
353
|
r || e.preventDefault(), i?.(e);
|
|
299
354
|
}
|
|
@@ -303,24 +358,24 @@ function S({ children: e, href: r, onClick: i, newTab: a = !1, showArrow: o = !0
|
|
|
303
358
|
target: r && a ? "_blank" : void 0,
|
|
304
359
|
rel: r && a ? "noopener noreferrer" : void 0,
|
|
305
360
|
className: [
|
|
306
|
-
|
|
307
|
-
s === "glassy" ?
|
|
361
|
+
w.appLink,
|
|
362
|
+
s === "glassy" ? w.appLinkGlassy : w.appLinkDefault,
|
|
308
363
|
c ?? ""
|
|
309
364
|
].filter(Boolean).join(" "),
|
|
310
365
|
...l,
|
|
311
366
|
children: [/* @__PURE__ */ t("span", {
|
|
312
|
-
className:
|
|
367
|
+
className: w.label,
|
|
313
368
|
children: e
|
|
314
369
|
}), o && /* @__PURE__ */ t("span", {
|
|
315
|
-
className:
|
|
370
|
+
className: w.icon,
|
|
316
371
|
"aria-hidden": "true",
|
|
317
|
-
children: /* @__PURE__ */ t(
|
|
372
|
+
children: /* @__PURE__ */ t(E, {})
|
|
318
373
|
})]
|
|
319
374
|
});
|
|
320
375
|
}
|
|
321
|
-
function
|
|
376
|
+
function E() {
|
|
322
377
|
return /* @__PURE__ */ n("svg", {
|
|
323
|
-
className:
|
|
378
|
+
className: w.arrowIcon,
|
|
324
379
|
xmlns: "http://www.w3.org/2000/svg",
|
|
325
380
|
viewBox: "0 0 24 24",
|
|
326
381
|
fill: "none",
|
|
@@ -328,7 +383,44 @@ function C() {
|
|
|
328
383
|
children: [/* @__PURE__ */ t("path", { d: "M5 12H19" }), /* @__PURE__ */ t("path", { d: "M13 6L19 12L13 18" })]
|
|
329
384
|
});
|
|
330
385
|
}
|
|
331
|
-
var
|
|
386
|
+
var D = {
|
|
387
|
+
iconButton: "_iconButton_14rp3_1",
|
|
388
|
+
withFrame: "_withFrame_14rp3_17",
|
|
389
|
+
withoutFrame: "_withoutFrame_14rp3_24",
|
|
390
|
+
glassy: "_glassy_14rp3_57",
|
|
391
|
+
active: "_active_14rp3_75",
|
|
392
|
+
small: "_small_14rp3_84",
|
|
393
|
+
large: "_large_14rp3_90",
|
|
394
|
+
icon: "_icon_14rp3_1",
|
|
395
|
+
svgIcon: "_svgIcon_14rp3_102"
|
|
396
|
+
};
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/components/form/icon-button/IconButton.tsx
|
|
399
|
+
function O({ label: e, icon: n, variant: r = "default", frame: i = !0, active: a = !1, size: o = "default", className: s, type: c = "button", disabled: l, ...u }) {
|
|
400
|
+
return /* @__PURE__ */ t("button", {
|
|
401
|
+
type: c,
|
|
402
|
+
"aria-label": e,
|
|
403
|
+
title: e,
|
|
404
|
+
"aria-pressed": a,
|
|
405
|
+
disabled: l,
|
|
406
|
+
className: [
|
|
407
|
+
D.iconButton,
|
|
408
|
+
i ? D.withFrame : D.withoutFrame,
|
|
409
|
+
r === "glassy" ? D.glassy : "",
|
|
410
|
+
a ? D.active : "",
|
|
411
|
+
o === "small" ? D.small : "",
|
|
412
|
+
o === "large" ? D.large : "",
|
|
413
|
+
s ?? ""
|
|
414
|
+
].filter(Boolean).join(" "),
|
|
415
|
+
...u,
|
|
416
|
+
children: /* @__PURE__ */ t("span", {
|
|
417
|
+
className: D.icon,
|
|
418
|
+
"aria-hidden": "true",
|
|
419
|
+
children: n
|
|
420
|
+
})
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
var k = {
|
|
332
424
|
passwordInputWrapper: "_passwordInputWrapper_18lit_1",
|
|
333
425
|
inputTextField: "_inputTextField_18lit_6",
|
|
334
426
|
inputTextFieldGlassy: "_inputTextFieldGlassy_18lit_18",
|
|
@@ -339,7 +431,7 @@ var w = {
|
|
|
339
431
|
};
|
|
340
432
|
//#endregion
|
|
341
433
|
//#region src/components/form/password/Password.tsx
|
|
342
|
-
function
|
|
434
|
+
function A({ label: e, name: r, id: i, error: a, variant: o = "default", className: c, disabled: l, ref: u, autoComplete: d = "current-password", ...f }) {
|
|
343
435
|
let [p, m] = s(!1), h = i ?? r;
|
|
344
436
|
function g() {
|
|
345
437
|
m((e) => !e);
|
|
@@ -353,7 +445,7 @@ function T({ label: e, name: r, id: i, error: a, variant: o = "default", classNa
|
|
|
353
445
|
children: e
|
|
354
446
|
}),
|
|
355
447
|
/* @__PURE__ */ n("div", {
|
|
356
|
-
className:
|
|
448
|
+
className: k.passwordInputWrapper,
|
|
357
449
|
children: [/* @__PURE__ */ t("input", {
|
|
358
450
|
id: h,
|
|
359
451
|
name: r,
|
|
@@ -362,9 +454,9 @@ function T({ label: e, name: r, id: i, error: a, variant: o = "default", classNa
|
|
|
362
454
|
disabled: l,
|
|
363
455
|
autoComplete: d,
|
|
364
456
|
className: [
|
|
365
|
-
|
|
366
|
-
o === "glassy" ?
|
|
367
|
-
a ?
|
|
457
|
+
k.inputTextField,
|
|
458
|
+
o === "glassy" ? k.inputTextFieldGlassy : "",
|
|
459
|
+
a ? k.inputError : "",
|
|
368
460
|
c ?? ""
|
|
369
461
|
].filter(Boolean).join(" "),
|
|
370
462
|
"aria-invalid": !!a,
|
|
@@ -372,25 +464,25 @@ function T({ label: e, name: r, id: i, error: a, variant: o = "default", classNa
|
|
|
372
464
|
...f
|
|
373
465
|
}), /* @__PURE__ */ t("button", {
|
|
374
466
|
type: "button",
|
|
375
|
-
className:
|
|
467
|
+
className: k.togglePasswordButton,
|
|
376
468
|
onClick: g,
|
|
377
469
|
disabled: l,
|
|
378
470
|
"aria-label": p ? "Passwort ausblenden" : "Passwort anzeigen",
|
|
379
471
|
"aria-pressed": p,
|
|
380
|
-
children: t(p ?
|
|
472
|
+
children: t(p ? M : j, {})
|
|
381
473
|
})]
|
|
382
474
|
}),
|
|
383
475
|
a && /* @__PURE__ */ t("span", {
|
|
384
476
|
id: `${r}-error`,
|
|
385
|
-
className:
|
|
477
|
+
className: k.errorMessage,
|
|
386
478
|
children: a
|
|
387
479
|
})
|
|
388
480
|
]
|
|
389
481
|
});
|
|
390
482
|
}
|
|
391
|
-
function
|
|
483
|
+
function j() {
|
|
392
484
|
return /* @__PURE__ */ n("svg", {
|
|
393
|
-
className:
|
|
485
|
+
className: k.icon,
|
|
394
486
|
xmlns: "http://www.w3.org/2000/svg",
|
|
395
487
|
viewBox: "0 0 24 24",
|
|
396
488
|
fill: "none",
|
|
@@ -402,9 +494,9 @@ function E() {
|
|
|
402
494
|
})]
|
|
403
495
|
});
|
|
404
496
|
}
|
|
405
|
-
function
|
|
497
|
+
function M() {
|
|
406
498
|
return /* @__PURE__ */ t("svg", {
|
|
407
|
-
className:
|
|
499
|
+
className: k.icon,
|
|
408
500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
409
501
|
viewBox: "0 0 24 24",
|
|
410
502
|
fill: "none",
|
|
@@ -412,7 +504,7 @@ function D() {
|
|
|
412
504
|
children: /* @__PURE__ */ t("path", { d: "M17.94 17.94A10.94 10.94 0 0 1 12 20C7 20 2.73 16.11 1 12c.74-1.64 1.82-3.06 3.11-4.24m3.52-2.42A10.94 10.94 0 0 1 12 4c5 0 9.27 3.89 11 8-1.1 2.42-2.91 4.5-5.06 5.94M1 1l22 22" })
|
|
413
505
|
});
|
|
414
506
|
}
|
|
415
|
-
var
|
|
507
|
+
var N = {
|
|
416
508
|
inputWrapper: "_inputWrapper_3w4be_1",
|
|
417
509
|
inputTextField: "_inputTextField_3w4be_6",
|
|
418
510
|
inputTextFieldGlassy: "_inputTextFieldGlassy_3w4be_18",
|
|
@@ -427,12 +519,12 @@ var O = {
|
|
|
427
519
|
};
|
|
428
520
|
//#endregion
|
|
429
521
|
//#region src/components/form/postal-code/PostalCode.tsx
|
|
430
|
-
function
|
|
431
|
-
let b = i(), x = c ?? `${a}-${b}`, S = o(null), C = o(!1), [w, T] = s(""), [E, D] = s([]), [
|
|
432
|
-
|
|
522
|
+
function P({ label: e, name: a, id: c, error: l, variant: u = "default", className: d, disabled: f, placeholder: p = "z.B. 8001 oder Zürich", ref: m, onChange: h, onBlur: g, onValueChange: _, onSuggestionSelect: v, ...y }) {
|
|
523
|
+
let b = i(), x = c ?? `${a}-${b}`, S = o(null), C = o(!1), [w, T] = s(""), [E, D] = s([]), [O, k] = s(!1), [A, j] = s(!1), M = w.trim().match(/^(\d+)\s+(.+)$/), P = !!M, F = M?.[1], I = M?.[2], L = P && E.some((e) => e.postalCode === F && e.locality === I), R = /^\d+$/.test(w.trim()), z = w.trim().length >= 4 && R && !O, B = z && E.some((e) => e.postalCode === w.trim()), V = z && !B;
|
|
524
|
+
A && w.trim().length >= 4 && E.length, r(() => {
|
|
433
525
|
let e = w.trim();
|
|
434
526
|
if (e.length < 2) {
|
|
435
|
-
D([]),
|
|
527
|
+
D([]), j(!1);
|
|
436
528
|
return;
|
|
437
529
|
}
|
|
438
530
|
if (C.current) {
|
|
@@ -441,7 +533,7 @@ function k({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
441
533
|
}
|
|
442
534
|
let t = new AbortController();
|
|
443
535
|
async function n() {
|
|
444
|
-
|
|
536
|
+
k(!0);
|
|
445
537
|
try {
|
|
446
538
|
let n = e.match(/^(\d+)\s/), r = n ? n[1] : e, i = /^\d+$/.test(r) ? `https://openplzapi.org/ch/Localities?postalCode=${r}` : `https://openplzapi.org/ch/Localities?locality=${encodeURIComponent(r)}`, a = await fetch(i, { signal: t.signal });
|
|
447
539
|
if (!a.ok) throw Error("Postal-Code-Suche fehlgeschlagen");
|
|
@@ -453,12 +545,12 @@ function k({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
453
545
|
postalCode: e.postalCode,
|
|
454
546
|
locality: e.name
|
|
455
547
|
}];
|
|
456
|
-
})).values()).slice(0, 10)),
|
|
548
|
+
})).values()).slice(0, 10)), j(!0);
|
|
457
549
|
} catch (e) {
|
|
458
550
|
if (t.signal.aborted) return;
|
|
459
|
-
console.error(e), D([]),
|
|
551
|
+
console.error(e), D([]), j(!0);
|
|
460
552
|
} finally {
|
|
461
|
-
t.signal.aborted ||
|
|
553
|
+
t.signal.aborted || k(!1);
|
|
462
554
|
}
|
|
463
555
|
}
|
|
464
556
|
let r = window.setTimeout(n, 300);
|
|
@@ -474,7 +566,7 @@ function k({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
474
566
|
T(t), _?.(t), h?.(e);
|
|
475
567
|
}
|
|
476
568
|
function W(e) {
|
|
477
|
-
C.current = !0, T(e.label), D([]),
|
|
569
|
+
C.current = !0, T(e.label), D([]), j(!1), _?.(e.label), v?.(e), S.current && (S.current.value = e.label, S.current.dispatchEvent(new Event("input", { bubbles: !0 })));
|
|
478
570
|
}
|
|
479
571
|
return /* @__PURE__ */ n("div", {
|
|
480
572
|
className: "inputBlockVertical",
|
|
@@ -485,7 +577,7 @@ function k({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
485
577
|
children: e
|
|
486
578
|
}),
|
|
487
579
|
/* @__PURE__ */ n("div", {
|
|
488
|
-
className:
|
|
580
|
+
className: N.inputWrapper,
|
|
489
581
|
children: [
|
|
490
582
|
/* @__PURE__ */ t("input", {
|
|
491
583
|
id: x,
|
|
@@ -500,60 +592,60 @@ function k({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
500
592
|
onChange: U,
|
|
501
593
|
onBlur: g,
|
|
502
594
|
className: [
|
|
503
|
-
|
|
504
|
-
u === "glassy" ?
|
|
505
|
-
B || L ?
|
|
506
|
-
V || l ?
|
|
595
|
+
N.inputTextField,
|
|
596
|
+
u === "glassy" ? N.inputTextFieldGlassy : "",
|
|
597
|
+
B || L ? N.inputValid : "",
|
|
598
|
+
V || l ? N.inputError : "",
|
|
507
599
|
d ?? ""
|
|
508
600
|
].filter(Boolean).join(" "),
|
|
509
601
|
"aria-invalid": !!l || V,
|
|
510
602
|
"aria-describedby": l ? `${a}-error` : void 0,
|
|
511
603
|
...y
|
|
512
604
|
}),
|
|
513
|
-
|
|
514
|
-
className:
|
|
605
|
+
O && /* @__PURE__ */ t("span", {
|
|
606
|
+
className: N.loading,
|
|
515
607
|
children: "Lädt…"
|
|
516
608
|
}),
|
|
517
609
|
E.length > 0 && /* @__PURE__ */ t("ul", {
|
|
518
|
-
className:
|
|
610
|
+
className: N.suggestionList,
|
|
519
611
|
children: E.map((e) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ n("button", {
|
|
520
612
|
type: "button",
|
|
521
|
-
className:
|
|
613
|
+
className: N.suggestionItem,
|
|
522
614
|
onMouseDown: (e) => e.preventDefault(),
|
|
523
615
|
onClick: () => W(e),
|
|
524
616
|
children: [/* @__PURE__ */ t("span", { children: e.postalCode }), /* @__PURE__ */ t("span", {
|
|
525
|
-
className:
|
|
617
|
+
className: N.locality,
|
|
526
618
|
children: e.locality
|
|
527
619
|
})]
|
|
528
620
|
}) }, e.label))
|
|
529
621
|
}),
|
|
530
|
-
|
|
531
|
-
className:
|
|
622
|
+
A && w.trim().length >= 2 && E.length === 0 && !O && !L && !V && /* @__PURE__ */ t("div", {
|
|
623
|
+
className: N.emptyState,
|
|
532
624
|
children: "Keine Schweizer PLZ oder Ortschaft gefunden."
|
|
533
625
|
})
|
|
534
626
|
]
|
|
535
627
|
}),
|
|
536
628
|
B && /* @__PURE__ */ t("span", {
|
|
537
|
-
className:
|
|
629
|
+
className: N.successMessage,
|
|
538
630
|
children: "Gültige Schweizer Postleitzahl"
|
|
539
631
|
}),
|
|
540
632
|
L && /* @__PURE__ */ t("span", {
|
|
541
|
-
className:
|
|
633
|
+
className: N.successMessage,
|
|
542
634
|
children: "Gültige Schweizer Postleitzahl"
|
|
543
635
|
}),
|
|
544
636
|
V && /* @__PURE__ */ t("span", {
|
|
545
|
-
className:
|
|
637
|
+
className: N.errorMessage,
|
|
546
638
|
children: "Diese Schweizer Postleitzahl wurde nicht gefunden."
|
|
547
639
|
}),
|
|
548
640
|
l && /* @__PURE__ */ t("span", {
|
|
549
641
|
id: `${a}-error`,
|
|
550
|
-
className:
|
|
642
|
+
className: N.errorMessage,
|
|
551
643
|
children: l
|
|
552
644
|
})
|
|
553
645
|
]
|
|
554
646
|
});
|
|
555
647
|
}
|
|
556
|
-
var
|
|
648
|
+
var F = {
|
|
557
649
|
radioGroup: "_radioGroup_1ba3g_5",
|
|
558
650
|
optionGroup: "_optionGroup_1ba3g_17",
|
|
559
651
|
optionWrapper: "_optionWrapper_1ba3g_24",
|
|
@@ -570,43 +662,43 @@ var A = {
|
|
|
570
662
|
};
|
|
571
663
|
//#endregion
|
|
572
664
|
//#region src/components/form/radiobutton/RadioButton.tsx
|
|
573
|
-
function
|
|
665
|
+
function I({ label: e, name: r, options: i, error: a, variant: o = "default", disabled: s, value: c, defaultValue: l, onChange: u, ...d }) {
|
|
574
666
|
let f = c !== void 0;
|
|
575
667
|
return /* @__PURE__ */ n("fieldset", {
|
|
576
|
-
className: [
|
|
668
|
+
className: [F.radioGroup].filter(Boolean).join(" "),
|
|
577
669
|
"aria-invalid": !!a,
|
|
578
670
|
"aria-describedby": a ? `${r}-error` : void 0,
|
|
579
671
|
children: [
|
|
580
672
|
e && /* @__PURE__ */ t("legend", {
|
|
581
|
-
className: [
|
|
673
|
+
className: [F.radioLegend, o === "glassy" ? "inputLabelGlassy" : "inputLabel"].filter(Boolean).join(" "),
|
|
582
674
|
children: e
|
|
583
675
|
}),
|
|
584
676
|
/* @__PURE__ */ t("div", {
|
|
585
|
-
className:
|
|
677
|
+
className: F.optionGroup,
|
|
586
678
|
children: i.map((e) => {
|
|
587
679
|
let i = f ? { checked: c === e.value } : { defaultChecked: l === e.value };
|
|
588
680
|
return /* @__PURE__ */ n("label", {
|
|
589
|
-
className: [
|
|
681
|
+
className: [F.optionWrapper, s ? F.optionWrapperDisabled : ""].filter(Boolean).join(" "),
|
|
590
682
|
children: [/* @__PURE__ */ t("input", {
|
|
591
683
|
type: "radio",
|
|
592
684
|
name: r,
|
|
593
685
|
value: e.value,
|
|
594
686
|
disabled: s,
|
|
595
|
-
className:
|
|
687
|
+
className: F.radioInput,
|
|
596
688
|
onChange: u,
|
|
597
689
|
...i,
|
|
598
690
|
...d
|
|
599
691
|
}), /* @__PURE__ */ n("span", {
|
|
600
692
|
className: [
|
|
601
|
-
|
|
602
|
-
o === "glassy" ?
|
|
603
|
-
a ?
|
|
693
|
+
F.optionButton,
|
|
694
|
+
o === "glassy" ? F.optionButtonGlassy : F.optionButtonDefault,
|
|
695
|
+
a ? F.optionButtonError : ""
|
|
604
696
|
].filter(Boolean).join(" "),
|
|
605
697
|
children: [/* @__PURE__ */ t("span", {
|
|
606
|
-
className:
|
|
698
|
+
className: F.optionTitle,
|
|
607
699
|
children: e.label
|
|
608
700
|
}), e.description && /* @__PURE__ */ t("span", {
|
|
609
|
-
className:
|
|
701
|
+
className: F.optionDescription,
|
|
610
702
|
children: e.description
|
|
611
703
|
})]
|
|
612
704
|
})]
|
|
@@ -615,13 +707,13 @@ function j({ label: e, name: r, options: i, error: a, variant: o = "default", di
|
|
|
615
707
|
}),
|
|
616
708
|
a && /* @__PURE__ */ t("span", {
|
|
617
709
|
id: `${r}-error`,
|
|
618
|
-
className:
|
|
710
|
+
className: F.errorMessage,
|
|
619
711
|
children: a
|
|
620
712
|
})
|
|
621
713
|
]
|
|
622
714
|
});
|
|
623
715
|
}
|
|
624
|
-
var
|
|
716
|
+
var L = {
|
|
625
717
|
switchWrapper: "_switchWrapper_bre5n_1",
|
|
626
718
|
switchCheckbox: "_switchCheckbox_bre5n_7",
|
|
627
719
|
switchLabel: "_switchLabel_bre5n_15",
|
|
@@ -638,51 +730,51 @@ var M = {
|
|
|
638
730
|
};
|
|
639
731
|
//#endregion
|
|
640
732
|
//#region src/components/form/switch/Switch.tsx
|
|
641
|
-
function
|
|
733
|
+
function R({ name: e, id: r, label: i, error: a, variant: o = "default", className: s, disabled: c, ...l }) {
|
|
642
734
|
let u = r ?? `${e}-switch`;
|
|
643
735
|
return /* @__PURE__ */ n("div", {
|
|
644
|
-
className: [
|
|
736
|
+
className: [L.switchWrapper, s ?? ""].filter(Boolean).join(" "),
|
|
645
737
|
children: [
|
|
646
738
|
/* @__PURE__ */ t("input", {
|
|
647
739
|
id: u,
|
|
648
740
|
name: e,
|
|
649
741
|
type: "checkbox",
|
|
650
742
|
disabled: c,
|
|
651
|
-
className:
|
|
743
|
+
className: L.switchCheckbox,
|
|
652
744
|
"aria-invalid": !!a,
|
|
653
745
|
"aria-describedby": a ? `${e}-error` : void 0,
|
|
654
746
|
...l
|
|
655
747
|
}),
|
|
656
748
|
/* @__PURE__ */ n("label", {
|
|
657
749
|
htmlFor: u,
|
|
658
|
-
className: [
|
|
750
|
+
className: [L.switchLabel, o === "glassy" ? L.switchLabelGlassy : L.switchLabelDefault].filter(Boolean).join(" "),
|
|
659
751
|
children: [/* @__PURE__ */ t("span", {
|
|
660
|
-
className: [
|
|
752
|
+
className: [L.switchBackground, o === "glassy" ? L.switchBackgroundGlassy : L.switchBackgroundDefault].filter(Boolean).join(" "),
|
|
661
753
|
children: /* @__PURE__ */ n("span", {
|
|
662
|
-
className:
|
|
754
|
+
className: L.switchButton,
|
|
663
755
|
"aria-hidden": "true",
|
|
664
756
|
children: [/* @__PURE__ */ t("span", {
|
|
665
|
-
className:
|
|
666
|
-
children: /* @__PURE__ */ t(
|
|
757
|
+
className: L.iconChecked,
|
|
758
|
+
children: /* @__PURE__ */ t(z, {})
|
|
667
759
|
}), /* @__PURE__ */ t("span", {
|
|
668
|
-
className:
|
|
669
|
-
children: /* @__PURE__ */ t(
|
|
760
|
+
className: L.iconUnchecked,
|
|
761
|
+
children: /* @__PURE__ */ t(B, {})
|
|
670
762
|
})]
|
|
671
763
|
})
|
|
672
764
|
}), i && /* @__PURE__ */ t("span", {
|
|
673
|
-
className:
|
|
765
|
+
className: L.switchText,
|
|
674
766
|
children: i
|
|
675
767
|
})]
|
|
676
768
|
}),
|
|
677
769
|
a && /* @__PURE__ */ t("span", {
|
|
678
770
|
id: `${e}-error`,
|
|
679
|
-
className:
|
|
771
|
+
className: L.errorMessage,
|
|
680
772
|
children: a
|
|
681
773
|
})
|
|
682
774
|
]
|
|
683
775
|
});
|
|
684
776
|
}
|
|
685
|
-
function
|
|
777
|
+
function z() {
|
|
686
778
|
return /* @__PURE__ */ t("svg", {
|
|
687
779
|
width: "16",
|
|
688
780
|
height: "16",
|
|
@@ -698,7 +790,7 @@ function P() {
|
|
|
698
790
|
})
|
|
699
791
|
});
|
|
700
792
|
}
|
|
701
|
-
function
|
|
793
|
+
function B() {
|
|
702
794
|
return /* @__PURE__ */ t("svg", {
|
|
703
795
|
width: "16",
|
|
704
796
|
height: "16",
|
|
@@ -713,7 +805,7 @@ function F() {
|
|
|
713
805
|
})
|
|
714
806
|
});
|
|
715
807
|
}
|
|
716
|
-
var
|
|
808
|
+
var V = {
|
|
717
809
|
inputBlockVerticalTight: "_inputBlockVerticalTight_b8zs9_1",
|
|
718
810
|
inputTextField: "_inputTextField_b8zs9_6",
|
|
719
811
|
inputTextFieldGlassy: "_inputTextFieldGlassy_b8zs9_23",
|
|
@@ -722,9 +814,9 @@ var I = {
|
|
|
722
814
|
};
|
|
723
815
|
//#endregion
|
|
724
816
|
//#region src/components/form/textfield/TextField.tsx
|
|
725
|
-
function
|
|
817
|
+
function H({ label: e, name: r, error: i, placeholder: a, variant: o = "default", className: s, ref: c, ...l }) {
|
|
726
818
|
return /* @__PURE__ */ n("div", {
|
|
727
|
-
className: ["inputBlockVertical",
|
|
819
|
+
className: ["inputBlockVertical", V.inputBlockVerticalTight].filter(Boolean).join(" "),
|
|
728
820
|
children: [
|
|
729
821
|
/* @__PURE__ */ t("label", {
|
|
730
822
|
htmlFor: r,
|
|
@@ -737,9 +829,9 @@ function L({ label: e, name: r, error: i, placeholder: a, variant: o = "default"
|
|
|
737
829
|
ref: c,
|
|
738
830
|
placeholder: a,
|
|
739
831
|
className: [
|
|
740
|
-
|
|
741
|
-
o === "glassy" ?
|
|
742
|
-
i ?
|
|
832
|
+
V.inputTextField,
|
|
833
|
+
o === "glassy" ? V.inputTextFieldGlassy : "",
|
|
834
|
+
i ? V.inputError : "",
|
|
743
835
|
s ?? ""
|
|
744
836
|
].filter(Boolean).join(" "),
|
|
745
837
|
"aria-invalid": !!i,
|
|
@@ -748,13 +840,13 @@ function L({ label: e, name: r, error: i, placeholder: a, variant: o = "default"
|
|
|
748
840
|
}),
|
|
749
841
|
i && /* @__PURE__ */ t("span", {
|
|
750
842
|
id: `${r}-error`,
|
|
751
|
-
className:
|
|
843
|
+
className: V.errorMessage,
|
|
752
844
|
children: i
|
|
753
845
|
})
|
|
754
846
|
]
|
|
755
847
|
});
|
|
756
848
|
}
|
|
757
|
-
var
|
|
849
|
+
var U = {
|
|
758
850
|
wrapper: "_wrapper_8acbw_1",
|
|
759
851
|
label: "_label_8acbw_7",
|
|
760
852
|
labelGlassy: "_labelGlassy_8acbw_13",
|
|
@@ -779,7 +871,7 @@ var R = {
|
|
|
779
871
|
};
|
|
780
872
|
//#endregion
|
|
781
873
|
//#region src/components/form/upload/Upload.tsx
|
|
782
|
-
function
|
|
874
|
+
function W({ label: e, name: o, id: c, file: l, error: u, variant: d = "default", accept: f = "image/*", maxSizeBytes: p = 5 * 1024 * 1024, disabled: m, className: h, onChange: g, onFileChange: _, ...v }) {
|
|
783
875
|
let y = i(), b = c ?? `${o}-${y}`, [x, S] = s(!1), [C, w] = s(l ?? null), T = l !== void 0, E = T ? l : C, D = a(() => !E || !E.type.startsWith("image/") ? null : URL.createObjectURL(E), [E]);
|
|
784
876
|
r(() => {
|
|
785
877
|
T && w(l ?? null);
|
|
@@ -810,20 +902,20 @@ function z({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
810
902
|
}
|
|
811
903
|
let F = Math.round(p / (1024 * 1024));
|
|
812
904
|
return /* @__PURE__ */ n("div", {
|
|
813
|
-
className: [
|
|
905
|
+
className: [U.wrapper, h ?? ""].filter(Boolean).join(" "),
|
|
814
906
|
children: [
|
|
815
907
|
/* @__PURE__ */ t("label", {
|
|
816
|
-
className: [
|
|
908
|
+
className: [U.label, d === "glassy" ? U.labelGlassy : ""].filter(Boolean).join(" "),
|
|
817
909
|
htmlFor: b,
|
|
818
910
|
children: e
|
|
819
911
|
}),
|
|
820
912
|
/* @__PURE__ */ n("div", {
|
|
821
913
|
className: [
|
|
822
|
-
|
|
823
|
-
d === "glassy" ?
|
|
824
|
-
x ?
|
|
825
|
-
u ?
|
|
826
|
-
m ?
|
|
914
|
+
U.dropzone,
|
|
915
|
+
d === "glassy" ? U.dropzoneGlassy : "",
|
|
916
|
+
x ? U.dragOver : "",
|
|
917
|
+
u ? U.errorState : "",
|
|
918
|
+
m ? U.disabled : ""
|
|
827
919
|
].filter(Boolean).join(" "),
|
|
828
920
|
onDragOver: j,
|
|
829
921
|
onDragLeave: M,
|
|
@@ -832,7 +924,7 @@ function z({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
832
924
|
/* @__PURE__ */ t("input", {
|
|
833
925
|
id: b,
|
|
834
926
|
name: o,
|
|
835
|
-
className:
|
|
927
|
+
className: U.hiddenInput,
|
|
836
928
|
type: "file",
|
|
837
929
|
accept: f,
|
|
838
930
|
disabled: m,
|
|
@@ -843,20 +935,20 @@ function z({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
843
935
|
}),
|
|
844
936
|
/* @__PURE__ */ t("label", {
|
|
845
937
|
htmlFor: b,
|
|
846
|
-
className:
|
|
938
|
+
className: U.dropzoneContent,
|
|
847
939
|
children: E ? /* @__PURE__ */ n("span", {
|
|
848
|
-
className:
|
|
940
|
+
className: U.selected,
|
|
849
941
|
children: [D && /* @__PURE__ */ t("img", {
|
|
850
|
-
className:
|
|
942
|
+
className: U.preview,
|
|
851
943
|
src: D,
|
|
852
944
|
alt: `Vorschau von ${E.name}`
|
|
853
945
|
}), /* @__PURE__ */ n("span", {
|
|
854
|
-
className:
|
|
946
|
+
className: U.fileMeta,
|
|
855
947
|
children: [/* @__PURE__ */ t("span", {
|
|
856
|
-
className:
|
|
948
|
+
className: U.fileName,
|
|
857
949
|
children: E.name
|
|
858
950
|
}), /* @__PURE__ */ n("span", {
|
|
859
|
-
className:
|
|
951
|
+
className: U.fileSize,
|
|
860
952
|
children: [
|
|
861
953
|
(E.size / 1024).toFixed(0),
|
|
862
954
|
" KB ·",
|
|
@@ -866,18 +958,18 @@ function z({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
866
958
|
})]
|
|
867
959
|
})]
|
|
868
960
|
}) : /* @__PURE__ */ n("span", {
|
|
869
|
-
className:
|
|
961
|
+
className: U.placeholder,
|
|
870
962
|
children: [
|
|
871
963
|
/* @__PURE__ */ t("span", {
|
|
872
|
-
className:
|
|
964
|
+
className: U.big,
|
|
873
965
|
children: "Datei hier reinziehen"
|
|
874
966
|
}),
|
|
875
967
|
/* @__PURE__ */ t("span", {
|
|
876
|
-
className:
|
|
968
|
+
className: U.small,
|
|
877
969
|
children: "…oder klicken, um auszuwählen"
|
|
878
970
|
}),
|
|
879
971
|
/* @__PURE__ */ n("span", {
|
|
880
|
-
className:
|
|
972
|
+
className: U.hint,
|
|
881
973
|
children: [
|
|
882
974
|
"Erlaubt: ",
|
|
883
975
|
f,
|
|
@@ -891,7 +983,7 @@ function z({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
891
983
|
}),
|
|
892
984
|
E && /* @__PURE__ */ t("button", {
|
|
893
985
|
type: "button",
|
|
894
|
-
className:
|
|
986
|
+
className: U.remove,
|
|
895
987
|
onClick: P,
|
|
896
988
|
disabled: m,
|
|
897
989
|
children: "Entfernen"
|
|
@@ -900,11 +992,11 @@ function z({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
900
992
|
}),
|
|
901
993
|
u && /* @__PURE__ */ t("span", {
|
|
902
994
|
id: `${o}-error`,
|
|
903
|
-
className:
|
|
995
|
+
className: U.errorMessage,
|
|
904
996
|
children: u
|
|
905
997
|
})
|
|
906
998
|
]
|
|
907
999
|
});
|
|
908
1000
|
}
|
|
909
1001
|
//#endregion
|
|
910
|
-
export { l as Button,
|
|
1002
|
+
export { f as BannerHero, l as Button, m as Checkbox, g as Chip, v as DatePicker, C as Dropdown, O as IconButton, T as Link, A as Password, P as PostalCode, I as RadioButton, R as Switch, H as TextField, W as Upload };
|