suus-component-library 0.1.16 → 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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/suus-component-library.css +1 -1
- package/dist/suus-component-library.js +224 -169
- 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,7 @@ 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 = {
|
|
332
387
|
iconButton: "_iconButton_14rp3_1",
|
|
333
388
|
withFrame: "_withFrame_14rp3_17",
|
|
334
389
|
withoutFrame: "_withoutFrame_14rp3_24",
|
|
@@ -341,7 +396,7 @@ var w = {
|
|
|
341
396
|
};
|
|
342
397
|
//#endregion
|
|
343
398
|
//#region src/components/form/icon-button/IconButton.tsx
|
|
344
|
-
function
|
|
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 }) {
|
|
345
400
|
return /* @__PURE__ */ t("button", {
|
|
346
401
|
type: c,
|
|
347
402
|
"aria-label": e,
|
|
@@ -349,23 +404,23 @@ function T({ label: e, icon: n, variant: r = "default", frame: i = !0, active: a
|
|
|
349
404
|
"aria-pressed": a,
|
|
350
405
|
disabled: l,
|
|
351
406
|
className: [
|
|
352
|
-
|
|
353
|
-
i ?
|
|
354
|
-
r === "glassy" ?
|
|
355
|
-
a ?
|
|
356
|
-
o === "small" ?
|
|
357
|
-
o === "large" ?
|
|
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 : "",
|
|
358
413
|
s ?? ""
|
|
359
414
|
].filter(Boolean).join(" "),
|
|
360
415
|
...u,
|
|
361
416
|
children: /* @__PURE__ */ t("span", {
|
|
362
|
-
className:
|
|
417
|
+
className: D.icon,
|
|
363
418
|
"aria-hidden": "true",
|
|
364
419
|
children: n
|
|
365
420
|
})
|
|
366
421
|
});
|
|
367
422
|
}
|
|
368
|
-
var
|
|
423
|
+
var k = {
|
|
369
424
|
passwordInputWrapper: "_passwordInputWrapper_18lit_1",
|
|
370
425
|
inputTextField: "_inputTextField_18lit_6",
|
|
371
426
|
inputTextFieldGlassy: "_inputTextFieldGlassy_18lit_18",
|
|
@@ -376,7 +431,7 @@ var E = {
|
|
|
376
431
|
};
|
|
377
432
|
//#endregion
|
|
378
433
|
//#region src/components/form/password/Password.tsx
|
|
379
|
-
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 }) {
|
|
380
435
|
let [p, m] = s(!1), h = i ?? r;
|
|
381
436
|
function g() {
|
|
382
437
|
m((e) => !e);
|
|
@@ -390,7 +445,7 @@ function D({ label: e, name: r, id: i, error: a, variant: o = "default", classNa
|
|
|
390
445
|
children: e
|
|
391
446
|
}),
|
|
392
447
|
/* @__PURE__ */ n("div", {
|
|
393
|
-
className:
|
|
448
|
+
className: k.passwordInputWrapper,
|
|
394
449
|
children: [/* @__PURE__ */ t("input", {
|
|
395
450
|
id: h,
|
|
396
451
|
name: r,
|
|
@@ -399,9 +454,9 @@ function D({ label: e, name: r, id: i, error: a, variant: o = "default", classNa
|
|
|
399
454
|
disabled: l,
|
|
400
455
|
autoComplete: d,
|
|
401
456
|
className: [
|
|
402
|
-
|
|
403
|
-
o === "glassy" ?
|
|
404
|
-
a ?
|
|
457
|
+
k.inputTextField,
|
|
458
|
+
o === "glassy" ? k.inputTextFieldGlassy : "",
|
|
459
|
+
a ? k.inputError : "",
|
|
405
460
|
c ?? ""
|
|
406
461
|
].filter(Boolean).join(" "),
|
|
407
462
|
"aria-invalid": !!a,
|
|
@@ -409,25 +464,25 @@ function D({ label: e, name: r, id: i, error: a, variant: o = "default", classNa
|
|
|
409
464
|
...f
|
|
410
465
|
}), /* @__PURE__ */ t("button", {
|
|
411
466
|
type: "button",
|
|
412
|
-
className:
|
|
467
|
+
className: k.togglePasswordButton,
|
|
413
468
|
onClick: g,
|
|
414
469
|
disabled: l,
|
|
415
470
|
"aria-label": p ? "Passwort ausblenden" : "Passwort anzeigen",
|
|
416
471
|
"aria-pressed": p,
|
|
417
|
-
children: t(p ?
|
|
472
|
+
children: t(p ? M : j, {})
|
|
418
473
|
})]
|
|
419
474
|
}),
|
|
420
475
|
a && /* @__PURE__ */ t("span", {
|
|
421
476
|
id: `${r}-error`,
|
|
422
|
-
className:
|
|
477
|
+
className: k.errorMessage,
|
|
423
478
|
children: a
|
|
424
479
|
})
|
|
425
480
|
]
|
|
426
481
|
});
|
|
427
482
|
}
|
|
428
|
-
function
|
|
483
|
+
function j() {
|
|
429
484
|
return /* @__PURE__ */ n("svg", {
|
|
430
|
-
className:
|
|
485
|
+
className: k.icon,
|
|
431
486
|
xmlns: "http://www.w3.org/2000/svg",
|
|
432
487
|
viewBox: "0 0 24 24",
|
|
433
488
|
fill: "none",
|
|
@@ -439,9 +494,9 @@ function O() {
|
|
|
439
494
|
})]
|
|
440
495
|
});
|
|
441
496
|
}
|
|
442
|
-
function
|
|
497
|
+
function M() {
|
|
443
498
|
return /* @__PURE__ */ t("svg", {
|
|
444
|
-
className:
|
|
499
|
+
className: k.icon,
|
|
445
500
|
xmlns: "http://www.w3.org/2000/svg",
|
|
446
501
|
viewBox: "0 0 24 24",
|
|
447
502
|
fill: "none",
|
|
@@ -449,7 +504,7 @@ function k() {
|
|
|
449
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" })
|
|
450
505
|
});
|
|
451
506
|
}
|
|
452
|
-
var
|
|
507
|
+
var N = {
|
|
453
508
|
inputWrapper: "_inputWrapper_3w4be_1",
|
|
454
509
|
inputTextField: "_inputTextField_3w4be_6",
|
|
455
510
|
inputTextFieldGlassy: "_inputTextFieldGlassy_3w4be_18",
|
|
@@ -464,12 +519,12 @@ var A = {
|
|
|
464
519
|
};
|
|
465
520
|
//#endregion
|
|
466
521
|
//#region src/components/form/postal-code/PostalCode.tsx
|
|
467
|
-
function
|
|
468
|
-
let b = i(), x = c ?? `${a}-${b}`, S = o(null), C = o(!1), [w, T] = s(""), [E, D] = s([]), [O, k] = s(!1), [
|
|
469
|
-
|
|
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(() => {
|
|
470
525
|
let e = w.trim();
|
|
471
526
|
if (e.length < 2) {
|
|
472
|
-
D([]),
|
|
527
|
+
D([]), j(!1);
|
|
473
528
|
return;
|
|
474
529
|
}
|
|
475
530
|
if (C.current) {
|
|
@@ -490,10 +545,10 @@ function j({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
490
545
|
postalCode: e.postalCode,
|
|
491
546
|
locality: e.name
|
|
492
547
|
}];
|
|
493
|
-
})).values()).slice(0, 10)),
|
|
548
|
+
})).values()).slice(0, 10)), j(!0);
|
|
494
549
|
} catch (e) {
|
|
495
550
|
if (t.signal.aborted) return;
|
|
496
|
-
console.error(e), D([]),
|
|
551
|
+
console.error(e), D([]), j(!0);
|
|
497
552
|
} finally {
|
|
498
553
|
t.signal.aborted || k(!1);
|
|
499
554
|
}
|
|
@@ -511,7 +566,7 @@ function j({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
511
566
|
T(t), _?.(t), h?.(e);
|
|
512
567
|
}
|
|
513
568
|
function W(e) {
|
|
514
|
-
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 })));
|
|
515
570
|
}
|
|
516
571
|
return /* @__PURE__ */ n("div", {
|
|
517
572
|
className: "inputBlockVertical",
|
|
@@ -522,7 +577,7 @@ function j({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
522
577
|
children: e
|
|
523
578
|
}),
|
|
524
579
|
/* @__PURE__ */ n("div", {
|
|
525
|
-
className:
|
|
580
|
+
className: N.inputWrapper,
|
|
526
581
|
children: [
|
|
527
582
|
/* @__PURE__ */ t("input", {
|
|
528
583
|
id: x,
|
|
@@ -537,10 +592,10 @@ function j({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
537
592
|
onChange: U,
|
|
538
593
|
onBlur: g,
|
|
539
594
|
className: [
|
|
540
|
-
|
|
541
|
-
u === "glassy" ?
|
|
542
|
-
B || L ?
|
|
543
|
-
V || l ?
|
|
595
|
+
N.inputTextField,
|
|
596
|
+
u === "glassy" ? N.inputTextFieldGlassy : "",
|
|
597
|
+
B || L ? N.inputValid : "",
|
|
598
|
+
V || l ? N.inputError : "",
|
|
544
599
|
d ?? ""
|
|
545
600
|
].filter(Boolean).join(" "),
|
|
546
601
|
"aria-invalid": !!l || V,
|
|
@@ -548,49 +603,49 @@ function j({ label: e, name: a, id: c, error: l, variant: u = "default", classNa
|
|
|
548
603
|
...y
|
|
549
604
|
}),
|
|
550
605
|
O && /* @__PURE__ */ t("span", {
|
|
551
|
-
className:
|
|
606
|
+
className: N.loading,
|
|
552
607
|
children: "Lädt…"
|
|
553
608
|
}),
|
|
554
609
|
E.length > 0 && /* @__PURE__ */ t("ul", {
|
|
555
|
-
className:
|
|
610
|
+
className: N.suggestionList,
|
|
556
611
|
children: E.map((e) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ n("button", {
|
|
557
612
|
type: "button",
|
|
558
|
-
className:
|
|
613
|
+
className: N.suggestionItem,
|
|
559
614
|
onMouseDown: (e) => e.preventDefault(),
|
|
560
615
|
onClick: () => W(e),
|
|
561
616
|
children: [/* @__PURE__ */ t("span", { children: e.postalCode }), /* @__PURE__ */ t("span", {
|
|
562
|
-
className:
|
|
617
|
+
className: N.locality,
|
|
563
618
|
children: e.locality
|
|
564
619
|
})]
|
|
565
620
|
}) }, e.label))
|
|
566
621
|
}),
|
|
567
|
-
|
|
568
|
-
className:
|
|
622
|
+
A && w.trim().length >= 2 && E.length === 0 && !O && !L && !V && /* @__PURE__ */ t("div", {
|
|
623
|
+
className: N.emptyState,
|
|
569
624
|
children: "Keine Schweizer PLZ oder Ortschaft gefunden."
|
|
570
625
|
})
|
|
571
626
|
]
|
|
572
627
|
}),
|
|
573
628
|
B && /* @__PURE__ */ t("span", {
|
|
574
|
-
className:
|
|
629
|
+
className: N.successMessage,
|
|
575
630
|
children: "Gültige Schweizer Postleitzahl"
|
|
576
631
|
}),
|
|
577
632
|
L && /* @__PURE__ */ t("span", {
|
|
578
|
-
className:
|
|
633
|
+
className: N.successMessage,
|
|
579
634
|
children: "Gültige Schweizer Postleitzahl"
|
|
580
635
|
}),
|
|
581
636
|
V && /* @__PURE__ */ t("span", {
|
|
582
|
-
className:
|
|
637
|
+
className: N.errorMessage,
|
|
583
638
|
children: "Diese Schweizer Postleitzahl wurde nicht gefunden."
|
|
584
639
|
}),
|
|
585
640
|
l && /* @__PURE__ */ t("span", {
|
|
586
641
|
id: `${a}-error`,
|
|
587
|
-
className:
|
|
642
|
+
className: N.errorMessage,
|
|
588
643
|
children: l
|
|
589
644
|
})
|
|
590
645
|
]
|
|
591
646
|
});
|
|
592
647
|
}
|
|
593
|
-
var
|
|
648
|
+
var F = {
|
|
594
649
|
radioGroup: "_radioGroup_1ba3g_5",
|
|
595
650
|
optionGroup: "_optionGroup_1ba3g_17",
|
|
596
651
|
optionWrapper: "_optionWrapper_1ba3g_24",
|
|
@@ -607,43 +662,43 @@ var M = {
|
|
|
607
662
|
};
|
|
608
663
|
//#endregion
|
|
609
664
|
//#region src/components/form/radiobutton/RadioButton.tsx
|
|
610
|
-
function
|
|
665
|
+
function I({ label: e, name: r, options: i, error: a, variant: o = "default", disabled: s, value: c, defaultValue: l, onChange: u, ...d }) {
|
|
611
666
|
let f = c !== void 0;
|
|
612
667
|
return /* @__PURE__ */ n("fieldset", {
|
|
613
|
-
className: [
|
|
668
|
+
className: [F.radioGroup].filter(Boolean).join(" "),
|
|
614
669
|
"aria-invalid": !!a,
|
|
615
670
|
"aria-describedby": a ? `${r}-error` : void 0,
|
|
616
671
|
children: [
|
|
617
672
|
e && /* @__PURE__ */ t("legend", {
|
|
618
|
-
className: [
|
|
673
|
+
className: [F.radioLegend, o === "glassy" ? "inputLabelGlassy" : "inputLabel"].filter(Boolean).join(" "),
|
|
619
674
|
children: e
|
|
620
675
|
}),
|
|
621
676
|
/* @__PURE__ */ t("div", {
|
|
622
|
-
className:
|
|
677
|
+
className: F.optionGroup,
|
|
623
678
|
children: i.map((e) => {
|
|
624
679
|
let i = f ? { checked: c === e.value } : { defaultChecked: l === e.value };
|
|
625
680
|
return /* @__PURE__ */ n("label", {
|
|
626
|
-
className: [
|
|
681
|
+
className: [F.optionWrapper, s ? F.optionWrapperDisabled : ""].filter(Boolean).join(" "),
|
|
627
682
|
children: [/* @__PURE__ */ t("input", {
|
|
628
683
|
type: "radio",
|
|
629
684
|
name: r,
|
|
630
685
|
value: e.value,
|
|
631
686
|
disabled: s,
|
|
632
|
-
className:
|
|
687
|
+
className: F.radioInput,
|
|
633
688
|
onChange: u,
|
|
634
689
|
...i,
|
|
635
690
|
...d
|
|
636
691
|
}), /* @__PURE__ */ n("span", {
|
|
637
692
|
className: [
|
|
638
|
-
|
|
639
|
-
o === "glassy" ?
|
|
640
|
-
a ?
|
|
693
|
+
F.optionButton,
|
|
694
|
+
o === "glassy" ? F.optionButtonGlassy : F.optionButtonDefault,
|
|
695
|
+
a ? F.optionButtonError : ""
|
|
641
696
|
].filter(Boolean).join(" "),
|
|
642
697
|
children: [/* @__PURE__ */ t("span", {
|
|
643
|
-
className:
|
|
698
|
+
className: F.optionTitle,
|
|
644
699
|
children: e.label
|
|
645
700
|
}), e.description && /* @__PURE__ */ t("span", {
|
|
646
|
-
className:
|
|
701
|
+
className: F.optionDescription,
|
|
647
702
|
children: e.description
|
|
648
703
|
})]
|
|
649
704
|
})]
|
|
@@ -652,13 +707,13 @@ function N({ label: e, name: r, options: i, error: a, variant: o = "default", di
|
|
|
652
707
|
}),
|
|
653
708
|
a && /* @__PURE__ */ t("span", {
|
|
654
709
|
id: `${r}-error`,
|
|
655
|
-
className:
|
|
710
|
+
className: F.errorMessage,
|
|
656
711
|
children: a
|
|
657
712
|
})
|
|
658
713
|
]
|
|
659
714
|
});
|
|
660
715
|
}
|
|
661
|
-
var
|
|
716
|
+
var L = {
|
|
662
717
|
switchWrapper: "_switchWrapper_bre5n_1",
|
|
663
718
|
switchCheckbox: "_switchCheckbox_bre5n_7",
|
|
664
719
|
switchLabel: "_switchLabel_bre5n_15",
|
|
@@ -675,51 +730,51 @@ var P = {
|
|
|
675
730
|
};
|
|
676
731
|
//#endregion
|
|
677
732
|
//#region src/components/form/switch/Switch.tsx
|
|
678
|
-
function
|
|
733
|
+
function R({ name: e, id: r, label: i, error: a, variant: o = "default", className: s, disabled: c, ...l }) {
|
|
679
734
|
let u = r ?? `${e}-switch`;
|
|
680
735
|
return /* @__PURE__ */ n("div", {
|
|
681
|
-
className: [
|
|
736
|
+
className: [L.switchWrapper, s ?? ""].filter(Boolean).join(" "),
|
|
682
737
|
children: [
|
|
683
738
|
/* @__PURE__ */ t("input", {
|
|
684
739
|
id: u,
|
|
685
740
|
name: e,
|
|
686
741
|
type: "checkbox",
|
|
687
742
|
disabled: c,
|
|
688
|
-
className:
|
|
743
|
+
className: L.switchCheckbox,
|
|
689
744
|
"aria-invalid": !!a,
|
|
690
745
|
"aria-describedby": a ? `${e}-error` : void 0,
|
|
691
746
|
...l
|
|
692
747
|
}),
|
|
693
748
|
/* @__PURE__ */ n("label", {
|
|
694
749
|
htmlFor: u,
|
|
695
|
-
className: [
|
|
750
|
+
className: [L.switchLabel, o === "glassy" ? L.switchLabelGlassy : L.switchLabelDefault].filter(Boolean).join(" "),
|
|
696
751
|
children: [/* @__PURE__ */ t("span", {
|
|
697
|
-
className: [
|
|
752
|
+
className: [L.switchBackground, o === "glassy" ? L.switchBackgroundGlassy : L.switchBackgroundDefault].filter(Boolean).join(" "),
|
|
698
753
|
children: /* @__PURE__ */ n("span", {
|
|
699
|
-
className:
|
|
754
|
+
className: L.switchButton,
|
|
700
755
|
"aria-hidden": "true",
|
|
701
756
|
children: [/* @__PURE__ */ t("span", {
|
|
702
|
-
className:
|
|
703
|
-
children: /* @__PURE__ */ t(
|
|
757
|
+
className: L.iconChecked,
|
|
758
|
+
children: /* @__PURE__ */ t(z, {})
|
|
704
759
|
}), /* @__PURE__ */ t("span", {
|
|
705
|
-
className:
|
|
706
|
-
children: /* @__PURE__ */ t(
|
|
760
|
+
className: L.iconUnchecked,
|
|
761
|
+
children: /* @__PURE__ */ t(B, {})
|
|
707
762
|
})]
|
|
708
763
|
})
|
|
709
764
|
}), i && /* @__PURE__ */ t("span", {
|
|
710
|
-
className:
|
|
765
|
+
className: L.switchText,
|
|
711
766
|
children: i
|
|
712
767
|
})]
|
|
713
768
|
}),
|
|
714
769
|
a && /* @__PURE__ */ t("span", {
|
|
715
770
|
id: `${e}-error`,
|
|
716
|
-
className:
|
|
771
|
+
className: L.errorMessage,
|
|
717
772
|
children: a
|
|
718
773
|
})
|
|
719
774
|
]
|
|
720
775
|
});
|
|
721
776
|
}
|
|
722
|
-
function
|
|
777
|
+
function z() {
|
|
723
778
|
return /* @__PURE__ */ t("svg", {
|
|
724
779
|
width: "16",
|
|
725
780
|
height: "16",
|
|
@@ -735,7 +790,7 @@ function I() {
|
|
|
735
790
|
})
|
|
736
791
|
});
|
|
737
792
|
}
|
|
738
|
-
function
|
|
793
|
+
function B() {
|
|
739
794
|
return /* @__PURE__ */ t("svg", {
|
|
740
795
|
width: "16",
|
|
741
796
|
height: "16",
|
|
@@ -750,7 +805,7 @@ function L() {
|
|
|
750
805
|
})
|
|
751
806
|
});
|
|
752
807
|
}
|
|
753
|
-
var
|
|
808
|
+
var V = {
|
|
754
809
|
inputBlockVerticalTight: "_inputBlockVerticalTight_b8zs9_1",
|
|
755
810
|
inputTextField: "_inputTextField_b8zs9_6",
|
|
756
811
|
inputTextFieldGlassy: "_inputTextFieldGlassy_b8zs9_23",
|
|
@@ -759,9 +814,9 @@ var R = {
|
|
|
759
814
|
};
|
|
760
815
|
//#endregion
|
|
761
816
|
//#region src/components/form/textfield/TextField.tsx
|
|
762
|
-
function
|
|
817
|
+
function H({ label: e, name: r, error: i, placeholder: a, variant: o = "default", className: s, ref: c, ...l }) {
|
|
763
818
|
return /* @__PURE__ */ n("div", {
|
|
764
|
-
className: ["inputBlockVertical",
|
|
819
|
+
className: ["inputBlockVertical", V.inputBlockVerticalTight].filter(Boolean).join(" "),
|
|
765
820
|
children: [
|
|
766
821
|
/* @__PURE__ */ t("label", {
|
|
767
822
|
htmlFor: r,
|
|
@@ -774,9 +829,9 @@ function z({ label: e, name: r, error: i, placeholder: a, variant: o = "default"
|
|
|
774
829
|
ref: c,
|
|
775
830
|
placeholder: a,
|
|
776
831
|
className: [
|
|
777
|
-
|
|
778
|
-
o === "glassy" ?
|
|
779
|
-
i ?
|
|
832
|
+
V.inputTextField,
|
|
833
|
+
o === "glassy" ? V.inputTextFieldGlassy : "",
|
|
834
|
+
i ? V.inputError : "",
|
|
780
835
|
s ?? ""
|
|
781
836
|
].filter(Boolean).join(" "),
|
|
782
837
|
"aria-invalid": !!i,
|
|
@@ -785,13 +840,13 @@ function z({ label: e, name: r, error: i, placeholder: a, variant: o = "default"
|
|
|
785
840
|
}),
|
|
786
841
|
i && /* @__PURE__ */ t("span", {
|
|
787
842
|
id: `${r}-error`,
|
|
788
|
-
className:
|
|
843
|
+
className: V.errorMessage,
|
|
789
844
|
children: i
|
|
790
845
|
})
|
|
791
846
|
]
|
|
792
847
|
});
|
|
793
848
|
}
|
|
794
|
-
var
|
|
849
|
+
var U = {
|
|
795
850
|
wrapper: "_wrapper_8acbw_1",
|
|
796
851
|
label: "_label_8acbw_7",
|
|
797
852
|
labelGlassy: "_labelGlassy_8acbw_13",
|
|
@@ -816,7 +871,7 @@ var B = {
|
|
|
816
871
|
};
|
|
817
872
|
//#endregion
|
|
818
873
|
//#region src/components/form/upload/Upload.tsx
|
|
819
|
-
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 }) {
|
|
820
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]);
|
|
821
876
|
r(() => {
|
|
822
877
|
T && w(l ?? null);
|
|
@@ -847,20 +902,20 @@ function V({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
847
902
|
}
|
|
848
903
|
let F = Math.round(p / (1024 * 1024));
|
|
849
904
|
return /* @__PURE__ */ n("div", {
|
|
850
|
-
className: [
|
|
905
|
+
className: [U.wrapper, h ?? ""].filter(Boolean).join(" "),
|
|
851
906
|
children: [
|
|
852
907
|
/* @__PURE__ */ t("label", {
|
|
853
|
-
className: [
|
|
908
|
+
className: [U.label, d === "glassy" ? U.labelGlassy : ""].filter(Boolean).join(" "),
|
|
854
909
|
htmlFor: b,
|
|
855
910
|
children: e
|
|
856
911
|
}),
|
|
857
912
|
/* @__PURE__ */ n("div", {
|
|
858
913
|
className: [
|
|
859
|
-
|
|
860
|
-
d === "glassy" ?
|
|
861
|
-
x ?
|
|
862
|
-
u ?
|
|
863
|
-
m ?
|
|
914
|
+
U.dropzone,
|
|
915
|
+
d === "glassy" ? U.dropzoneGlassy : "",
|
|
916
|
+
x ? U.dragOver : "",
|
|
917
|
+
u ? U.errorState : "",
|
|
918
|
+
m ? U.disabled : ""
|
|
864
919
|
].filter(Boolean).join(" "),
|
|
865
920
|
onDragOver: j,
|
|
866
921
|
onDragLeave: M,
|
|
@@ -869,7 +924,7 @@ function V({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
869
924
|
/* @__PURE__ */ t("input", {
|
|
870
925
|
id: b,
|
|
871
926
|
name: o,
|
|
872
|
-
className:
|
|
927
|
+
className: U.hiddenInput,
|
|
873
928
|
type: "file",
|
|
874
929
|
accept: f,
|
|
875
930
|
disabled: m,
|
|
@@ -880,20 +935,20 @@ function V({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
880
935
|
}),
|
|
881
936
|
/* @__PURE__ */ t("label", {
|
|
882
937
|
htmlFor: b,
|
|
883
|
-
className:
|
|
938
|
+
className: U.dropzoneContent,
|
|
884
939
|
children: E ? /* @__PURE__ */ n("span", {
|
|
885
|
-
className:
|
|
940
|
+
className: U.selected,
|
|
886
941
|
children: [D && /* @__PURE__ */ t("img", {
|
|
887
|
-
className:
|
|
942
|
+
className: U.preview,
|
|
888
943
|
src: D,
|
|
889
944
|
alt: `Vorschau von ${E.name}`
|
|
890
945
|
}), /* @__PURE__ */ n("span", {
|
|
891
|
-
className:
|
|
946
|
+
className: U.fileMeta,
|
|
892
947
|
children: [/* @__PURE__ */ t("span", {
|
|
893
|
-
className:
|
|
948
|
+
className: U.fileName,
|
|
894
949
|
children: E.name
|
|
895
950
|
}), /* @__PURE__ */ n("span", {
|
|
896
|
-
className:
|
|
951
|
+
className: U.fileSize,
|
|
897
952
|
children: [
|
|
898
953
|
(E.size / 1024).toFixed(0),
|
|
899
954
|
" KB ·",
|
|
@@ -903,18 +958,18 @@ function V({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
903
958
|
})]
|
|
904
959
|
})]
|
|
905
960
|
}) : /* @__PURE__ */ n("span", {
|
|
906
|
-
className:
|
|
961
|
+
className: U.placeholder,
|
|
907
962
|
children: [
|
|
908
963
|
/* @__PURE__ */ t("span", {
|
|
909
|
-
className:
|
|
964
|
+
className: U.big,
|
|
910
965
|
children: "Datei hier reinziehen"
|
|
911
966
|
}),
|
|
912
967
|
/* @__PURE__ */ t("span", {
|
|
913
|
-
className:
|
|
968
|
+
className: U.small,
|
|
914
969
|
children: "…oder klicken, um auszuwählen"
|
|
915
970
|
}),
|
|
916
971
|
/* @__PURE__ */ n("span", {
|
|
917
|
-
className:
|
|
972
|
+
className: U.hint,
|
|
918
973
|
children: [
|
|
919
974
|
"Erlaubt: ",
|
|
920
975
|
f,
|
|
@@ -928,7 +983,7 @@ function V({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
928
983
|
}),
|
|
929
984
|
E && /* @__PURE__ */ t("button", {
|
|
930
985
|
type: "button",
|
|
931
|
-
className:
|
|
986
|
+
className: U.remove,
|
|
932
987
|
onClick: P,
|
|
933
988
|
disabled: m,
|
|
934
989
|
children: "Entfernen"
|
|
@@ -937,11 +992,11 @@ function V({ label: e, name: o, id: c, file: l, error: u, variant: d = "default"
|
|
|
937
992
|
}),
|
|
938
993
|
u && /* @__PURE__ */ t("span", {
|
|
939
994
|
id: `${o}-error`,
|
|
940
|
-
className:
|
|
995
|
+
className: U.errorMessage,
|
|
941
996
|
children: u
|
|
942
997
|
})
|
|
943
998
|
]
|
|
944
999
|
});
|
|
945
1000
|
}
|
|
946
1001
|
//#endregion
|
|
947
|
-
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 };
|