@publicplan/kern-react-kit 1.0.1 → 1.2.0

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/index.cjs DELETED
@@ -1,2696 +0,0 @@
1
- //#region rolldown:runtime
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (all) => {
9
- let target = {};
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: true
13
- });
14
- return target;
15
- };
16
- var __copyProps = (to, from, except, desc) => {
17
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
18
- key = keys[i];
19
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
20
- get: ((k) => from[k]).bind(null, key),
21
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
22
- });
23
- }
24
- return to;
25
- };
26
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
27
- value: mod,
28
- enumerable: true
29
- }) : target, mod));
30
-
31
- //#endregion
32
- let react_jsx_runtime = require("react/jsx-runtime");
33
- react_jsx_runtime = __toESM(react_jsx_runtime);
34
- let react = require("react");
35
- react = __toESM(react);
36
-
37
- //#region src/lib/cn.ts
38
- function cn(...classes) {
39
- return classes.filter((cls) => typeof cls === "string" && cls.trim().length > 0).map((cls) => cls.trim()).join(" ").replace(/\s+/g, " ").trim();
40
- }
41
-
42
- //#endregion
43
- //#region \0@oxc-project+runtime@0.93.0/helpers/objectWithoutPropertiesLoose.js
44
- function _objectWithoutPropertiesLoose(r, e) {
45
- if (null == r) return {};
46
- var t = {};
47
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
48
- if (e.includes(n)) continue;
49
- t[n] = r[n];
50
- }
51
- return t;
52
- }
53
-
54
- //#endregion
55
- //#region \0@oxc-project+runtime@0.93.0/helpers/objectWithoutProperties.js
56
- function _objectWithoutProperties(e, t) {
57
- if (null == e) return {};
58
- var o, r, i = _objectWithoutPropertiesLoose(e, t);
59
- if (Object.getOwnPropertySymbols) {
60
- var s = Object.getOwnPropertySymbols(e);
61
- for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
62
- }
63
- return i;
64
- }
65
-
66
- //#endregion
67
- //#region \0@oxc-project+runtime@0.93.0/helpers/typeof.js
68
- function _typeof(o) {
69
- "@babel/helpers - typeof";
70
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
71
- return typeof o$1;
72
- } : function(o$1) {
73
- return o$1 && "function" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? "symbol" : typeof o$1;
74
- }, _typeof(o);
75
- }
76
-
77
- //#endregion
78
- //#region \0@oxc-project+runtime@0.93.0/helpers/toPrimitive.js
79
- function toPrimitive(t, r) {
80
- if ("object" != _typeof(t) || !t) return t;
81
- var e = t[Symbol.toPrimitive];
82
- if (void 0 !== e) {
83
- var i = e.call(t, r || "default");
84
- if ("object" != _typeof(i)) return i;
85
- throw new TypeError("@@toPrimitive must return a primitive value.");
86
- }
87
- return ("string" === r ? String : Number)(t);
88
- }
89
-
90
- //#endregion
91
- //#region \0@oxc-project+runtime@0.93.0/helpers/toPropertyKey.js
92
- function toPropertyKey(t) {
93
- var i = toPrimitive(t, "string");
94
- return "symbol" == _typeof(i) ? i : i + "";
95
- }
96
-
97
- //#endregion
98
- //#region \0@oxc-project+runtime@0.93.0/helpers/defineProperty.js
99
- function _defineProperty(e, r, t) {
100
- return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
101
- value: t,
102
- enumerable: !0,
103
- configurable: !0,
104
- writable: !0
105
- }) : e[r] = t, e;
106
- }
107
-
108
- //#endregion
109
- //#region \0@oxc-project+runtime@0.93.0/helpers/objectSpread2.js
110
- function ownKeys(e, r) {
111
- var t = Object.keys(e);
112
- if (Object.getOwnPropertySymbols) {
113
- var o = Object.getOwnPropertySymbols(e);
114
- r && (o = o.filter(function(r$1) {
115
- return Object.getOwnPropertyDescriptor(e, r$1).enumerable;
116
- })), t.push.apply(t, o);
117
- }
118
- return t;
119
- }
120
- function _objectSpread2(e) {
121
- for (var r = 1; r < arguments.length; r++) {
122
- var t = null != arguments[r] ? arguments[r] : {};
123
- r % 2 ? ownKeys(Object(t), !0).forEach(function(r$1) {
124
- _defineProperty(e, r$1, t[r$1]);
125
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r$1) {
126
- Object.defineProperty(e, r$1, Object.getOwnPropertyDescriptor(t, r$1));
127
- });
128
- }
129
- return e;
130
- }
131
-
132
- //#endregion
133
- //#region src/components/Accordion/Content.tsx
134
- const _excluded$95 = ["children", "className"];
135
- const AccordionContent = (_ref) => {
136
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$95);
137
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", _objectSpread2(_objectSpread2({}, rest), {}, {
138
- className: cn("kern-accordion__body", className),
139
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
140
- className: "kern-body",
141
- children
142
- })
143
- }));
144
- };
145
- AccordionContent.displayName = "Accordion.Content";
146
-
147
- //#endregion
148
- //#region src/components/Accordion/Root.tsx
149
- const _excluded$94 = [
150
- "className",
151
- "children",
152
- "isOpened",
153
- "position",
154
- "totalItems"
155
- ];
156
- const AccordionRoot = (_ref) => {
157
- let { className, children, isOpened, position = 0, totalItems = 0 } = _ref, rest = _objectWithoutProperties(_ref, _excluded$94);
158
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", _objectSpread2(_objectSpread2(_objectSpread2({}, rest), {}, { className: cn("kern-accordion", className) }, isOpened ? { open: true } : {}), {}, { children: [position > 0 && totalItems > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
159
- className: "kern-sr-only",
160
- children: `Item ${position} of ${totalItems}`
161
- }), children] }));
162
- };
163
- AccordionRoot.displayName = "Accordion.Root";
164
-
165
- //#endregion
166
- //#region src/components/Title/Title.tsx
167
- const _excluded$93 = [
168
- "variant",
169
- "textWrapper",
170
- "title",
171
- "children",
172
- "className"
173
- ];
174
- const Title = (_ref) => {
175
- let { variant = "default", textWrapper = "h2", title, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$93);
176
- const Wrapper = textWrapper;
177
- const titleClass = cn("kern-title", `kern-title--${variant}`, className);
178
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, _objectSpread2(_objectSpread2({}, rest), {}, {
179
- className: titleClass,
180
- children: children || title
181
- }));
182
- };
183
-
184
- //#endregion
185
- //#region src/components/Accordion/Group.tsx
186
- const _excluded$92 = [
187
- "aria-label",
188
- "className",
189
- "title",
190
- "children"
191
- ];
192
- const AccordionGroup = (_ref) => {
193
- let { "aria-label": ariaLabel, className, title, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$92);
194
- const totalItems = react.default.Children.count(children);
195
- const isAccordionItem = (child) => {
196
- if (!react.default.isValidElement(child)) return false;
197
- return child.type === AccordionRoot;
198
- };
199
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
200
- role: "group",
201
- "aria-label": [ariaLabel && `${ariaLabel},`, `${totalItems} Elemente`].filter(Boolean).join(" "),
202
- className: cn("kern-accordion-group", className),
203
- children: [title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, _objectSpread2({}, title)), react.default.Children.map(children, (child, index) => isAccordionItem(child) ? react.default.cloneElement(child, {
204
- position: index + 1,
205
- totalItems
206
- }) : child)]
207
- }));
208
- };
209
- AccordionGroup.displayName = "Accordion.Group";
210
-
211
- //#endregion
212
- //#region src/components/Accordion/Summary.tsx
213
- const _excluded$91 = ["title", "className"];
214
- const AccordionSummary = (_ref) => {
215
- let { title, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$91);
216
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", _objectSpread2(_objectSpread2({}, rest), {}, {
217
- className: cn("kern-accordion__header", className),
218
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, _objectSpread2({}, title))
219
- }));
220
- };
221
- AccordionSummary.displayName = "Accordion.Summary";
222
-
223
- //#endregion
224
- //#region src/components/Accordion/index.ts
225
- var Accordion_exports = /* @__PURE__ */ __export({
226
- Content: () => AccordionContent,
227
- Group: () => AccordionGroup,
228
- Root: () => AccordionRoot,
229
- Summary: () => AccordionSummary
230
- });
231
-
232
- //#endregion
233
- //#region src/components/Alert/Body.tsx
234
- const _excluded$90 = ["children", "className"];
235
- const AlertBody = (_ref) => {
236
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$90);
237
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
238
- className: cn("kern-alert__body", className),
239
- children
240
- }));
241
- };
242
- AlertBody.displayName = "Alert.Body";
243
-
244
- //#endregion
245
- //#region src/components/Icon/Icon.tsx
246
- const _excluded$89 = [
247
- "name",
248
- "aria-hidden",
249
- "size",
250
- "role",
251
- "className"
252
- ];
253
- const Icon = (_ref) => {
254
- let { name = "home", "aria-hidden": ariaHidden = true, size = "default", role, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$89);
255
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", _objectSpread2(_objectSpread2({}, rest), {}, {
256
- className: cn("kern-icon", `kern-icon--${name}`, `kern-icon--${size}`, className),
257
- "aria-hidden": ariaHidden,
258
- role
259
- }));
260
- };
261
-
262
- //#endregion
263
- //#region src/components/Alert/Context.ts
264
- const AlertVariantContext = (0, react.createContext)("info");
265
- function useAlertVariant() {
266
- return (0, react.useContext)(AlertVariantContext);
267
- }
268
-
269
- //#endregion
270
- //#region src/components/Alert/Header.tsx
271
- const _excluded$88 = [
272
- "hasIcon",
273
- "icon",
274
- "title",
275
- "className"
276
- ];
277
- const AlertHeader = (_ref) => {
278
- let { hasIcon = true, icon, title, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$88);
279
- const variant = useAlertVariant();
280
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
281
- className: cn("kern-alert__header", className),
282
- children: [hasIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, _objectSpread2(_objectSpread2({}, icon), {}, { name: variant })), title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, {
283
- title,
284
- textWrapper: "span"
285
- })]
286
- }));
287
- };
288
- AlertHeader.displayName = "Alert.Header";
289
-
290
- //#endregion
291
- //#region src/components/Link/Link.tsx
292
- const _excluded$87 = [
293
- "variant",
294
- "icon",
295
- "iconLeft",
296
- "title",
297
- "target",
298
- "children",
299
- "isStretched",
300
- "className"
301
- ];
302
- const getIcon$1 = (iconProps) => iconProps ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
303
- name: iconProps.name,
304
- size: iconProps.size
305
- }) : null;
306
- const Link = (_ref) => {
307
- let { variant = "default", icon, iconLeft, title, target = "_self", children, isStretched, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$87);
308
- const linkText = title !== null && title !== void 0 ? title : children;
309
- const linkClass = cn(isStretched ? "kern-link--stretched" : "kern-link", variant === "small" && "kern-link--small", className);
310
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", _objectSpread2(_objectSpread2({}, props), {}, {
311
- className: linkClass,
312
- target: (icon === null || icon === void 0 ? void 0 : icon.name) === "open-in-new" ? "_blank" : target,
313
- children: [
314
- iconLeft && getIcon$1(icon),
315
- linkText,
316
- !iconLeft && getIcon$1(icon)
317
- ]
318
- }));
319
- };
320
- Link.isInteractive = true;
321
-
322
- //#endregion
323
- //#region src/components/Alert/Link.tsx
324
- const AlertLink = (props) => {
325
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Link, _objectSpread2(_objectSpread2({}, props), {}, { className: cn("kern-alert__link", props.className) }));
326
- };
327
- AlertLink.displayName = "Alert.Link";
328
-
329
- //#endregion
330
- //#region src/components/Alert/Root.tsx
331
- const _excluded$86 = [
332
- "children",
333
- "variant",
334
- "className"
335
- ];
336
- const AlertRoot = (_ref) => {
337
- let { children = null, variant, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$86);
338
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertVariantContext.Provider, {
339
- value: variant,
340
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
341
- className: cn("kern-alert", `kern-alert--${variant}`, className),
342
- role: "alert",
343
- children
344
- }))
345
- });
346
- };
347
- AlertRoot.displayName = "Alert.Root";
348
-
349
- //#endregion
350
- //#region src/components/Alert/index.ts
351
- var Alert_exports = /* @__PURE__ */ __export({
352
- Body: () => AlertBody,
353
- Header: () => AlertHeader,
354
- Link: () => AlertLink,
355
- Root: () => AlertRoot
356
- });
357
-
358
- //#endregion
359
- //#region src/components/Card/Body.tsx
360
- const _excluded$85 = ["className", "children"];
361
- const CardBody = (_ref) => {
362
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$85);
363
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", _objectSpread2(_objectSpread2({ className: cn("kern-card__body", className) }, rest), {}, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
364
- className: "kern-body",
365
- children
366
- }) }));
367
- };
368
- CardBody.displayName = "Card.Body";
369
-
370
- //#endregion
371
- //#region src/components/Card/Container.tsx
372
- const _excluded$84 = ["className", "children"];
373
- const CardContainer = (_ref) => {
374
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$84);
375
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
376
- className: cn("kern-card__container", className),
377
- children
378
- }));
379
- };
380
- CardContainer.displayName = "Card.Container";
381
-
382
- //#endregion
383
- //#region src/components/Card/Footer.tsx
384
- const _excluded$83 = ["className", "children"];
385
- const CardFooter = (_ref) => {
386
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$83);
387
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", _objectSpread2(_objectSpread2({}, rest), {}, {
388
- className: cn("kern-card__footer", className),
389
- children
390
- }));
391
- };
392
- CardFooter.displayName = "Card.Footer";
393
-
394
- //#endregion
395
- //#region src/components/Card/Header.tsx
396
- const _excluded$82 = ["className", "children"];
397
- const CardHeader = (_ref) => {
398
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$82);
399
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", _objectSpread2(_objectSpread2({}, rest), {}, {
400
- className: cn("kern-card__header", className),
401
- children
402
- }));
403
- };
404
- CardHeader.displayName = "Card.Header";
405
-
406
- //#endregion
407
- //#region src/components/Card/Media.tsx
408
- const _excluded$81 = [
409
- "src",
410
- "alt",
411
- "width",
412
- "height",
413
- "className"
414
- ];
415
- const CardMedia = (_ref) => {
416
- let { src, alt, width, height, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$81);
417
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
418
- className: cn("kern-card__media", className),
419
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
420
- src,
421
- alt,
422
- width,
423
- height
424
- })
425
- }));
426
- };
427
- CardMedia.displayName = "Card.Media";
428
-
429
- //#endregion
430
- //#region src/components/Card/Preline.tsx
431
- const _excluded$80 = ["className", "children"];
432
- const CardPreline = (_ref) => {
433
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$80);
434
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", _objectSpread2(_objectSpread2({}, rest), {}, {
435
- className: cn("kern-preline", className),
436
- children
437
- }));
438
- };
439
- CardPreline.displayName = "Card.Preline";
440
-
441
- //#endregion
442
- //#region src/components/Card/Root.tsx
443
- const _excluded$79 = [
444
- "className",
445
- "style",
446
- "children",
447
- "active",
448
- "size",
449
- "isCardHug"
450
- ];
451
- const CardRoot = (_ref) => {
452
- let { className, style, children, active = false, size = "medium", isCardHug = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$79);
453
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", _objectSpread2(_objectSpread2({}, rest), {}, {
454
- className: cn("kern-card", active && "kern-card--active", size && `kern-card--${size}`, isCardHug && ` kern-card--hug`, className),
455
- style,
456
- children
457
- }));
458
- };
459
- CardRoot.displayName = "Card.Root";
460
-
461
- //#endregion
462
- //#region src/components/Card/Subline.tsx
463
- const _excluded$78 = ["className", "children"];
464
- const CardSubline = (_ref) => {
465
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$78);
466
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", _objectSpread2(_objectSpread2({}, rest), {}, {
467
- className: cn("kern-subline", className),
468
- children
469
- }));
470
- };
471
- CardSubline.displayName = "Card.Subline";
472
-
473
- //#endregion
474
- //#region src/components/Card/Title.tsx
475
- const _excluded$77 = [
476
- "className",
477
- "children",
478
- "textWrapper"
479
- ];
480
- const CardTitle = (_ref) => {
481
- let { className, children, textWrapper = "h2" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$77);
482
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(textWrapper, _objectSpread2(_objectSpread2({}, rest), {}, {
483
- className: cn("kern-title", className),
484
- children
485
- }));
486
- };
487
- CardTitle.displayName = "Card.Title";
488
-
489
- //#endregion
490
- //#region src/components/Card/index.ts
491
- var Card_exports = /* @__PURE__ */ __export({
492
- Body: () => CardBody,
493
- Container: () => CardContainer,
494
- Footer: () => CardFooter,
495
- Header: () => CardHeader,
496
- Media: () => CardMedia,
497
- Preline: () => CardPreline,
498
- Root: () => CardRoot,
499
- Subline: () => CardSubline,
500
- Title: () => CardTitle
501
- });
502
-
503
- //#endregion
504
- //#region src/components/DescriptionList/Heading.tsx
505
- const _excluded$76 = [
506
- "title",
507
- "children",
508
- "className"
509
- ];
510
- const DescriptionListHeading = (_ref) => {
511
- let { title, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$76);
512
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
513
- className: cn("kern-description-list__heading", className),
514
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, _objectSpread2({}, title)), children]
515
- }));
516
- };
517
- DescriptionListHeading.displayName = "DescriptionList.Heading";
518
-
519
- //#endregion
520
- //#region src/components/DescriptionList/Item.tsx
521
- const _excluded$75 = ["children", "className"];
522
- const DescriptionListItem = (_ref) => {
523
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$75);
524
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
525
- className: cn(`kern-description-list-item`, className),
526
- children
527
- }));
528
- };
529
- DescriptionListItem.displayName = "DescriptionList.Item";
530
-
531
- //#endregion
532
- //#region src/components/DescriptionList/Key.tsx
533
- const _excluded$74 = ["children", "className"];
534
- const DescriptionListKey = (_ref) => {
535
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$74);
536
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", _objectSpread2(_objectSpread2({}, rest), {}, {
537
- className: cn("kern-description-list-item__key", className),
538
- children
539
- }));
540
- };
541
- DescriptionListKey.displayName = "DescriptionList.Key";
542
-
543
- //#endregion
544
- //#region src/components/DescriptionList/Root.tsx
545
- const _excluded$73 = [
546
- "variant",
547
- "children",
548
- "className"
549
- ];
550
- const DescriptionListRoot = (_ref) => {
551
- let { variant = "row", children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$73);
552
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", _objectSpread2(_objectSpread2({}, rest), {}, {
553
- className: cn("kern-description-list", variant === "column" && "kern-description-list--col", className),
554
- children
555
- }));
556
- };
557
- DescriptionListRoot.displayName = "DescriptionList.Root";
558
-
559
- //#endregion
560
- //#region src/components/DescriptionList/Value.tsx
561
- const _excluded$72 = ["children", "className"];
562
- const DescriptionListValue = (_ref) => {
563
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$72);
564
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", _objectSpread2(_objectSpread2({}, rest), {}, {
565
- className: cn("kern-description-list-item__value", className),
566
- children
567
- }));
568
- };
569
- DescriptionListValue.displayName = "DescriptionList.Value";
570
-
571
- //#endregion
572
- //#region src/components/DescriptionList/index.ts
573
- var DescriptionList_exports = /* @__PURE__ */ __export({
574
- Heading: () => DescriptionListHeading,
575
- Item: () => DescriptionListItem,
576
- Key: () => DescriptionListKey,
577
- Root: () => DescriptionListRoot,
578
- Value: () => DescriptionListValue
579
- });
580
-
581
- //#endregion
582
- //#region src/components/Button/Button.tsx
583
- const _excluded$71 = [
584
- "variant",
585
- "isBlock",
586
- "icon",
587
- "iconOnly",
588
- "iconLeft",
589
- "text",
590
- "children",
591
- "className"
592
- ];
593
- const getIcon = (iconProps) => iconProps ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
594
- name: iconProps.name,
595
- size: iconProps.size
596
- }) : null;
597
- const IconOnlyLabel = ({ labelText }) => {
598
- if (!labelText) return null;
599
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
600
- className: "kern-label kern-sr-only",
601
- children: labelText.replace(/^./, (c) => c.toUpperCase())
602
- });
603
- };
604
- const Button = (_ref) => {
605
- let { variant = "primary", isBlock, icon, iconOnly, iconLeft, text, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$71);
606
- const classes = cn("kern-btn", isBlock && "kern-btn--block", `kern-btn--${variant}`, className);
607
- const iconElement = getIcon(icon);
608
- if (iconOnly) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", _objectSpread2(_objectSpread2({}, rest), {}, {
609
- className: classes,
610
- children: [iconElement, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconOnlyLabel, { labelText: icon === null || icon === void 0 ? void 0 : icon.name })]
611
- }));
612
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", _objectSpread2(_objectSpread2({}, rest), {}, {
613
- className: classes,
614
- children: [
615
- iconLeft && iconElement,
616
- text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
617
- className: "kern-label",
618
- children: children || text
619
- }),
620
- !iconLeft && iconElement
621
- ]
622
- }));
623
- };
624
- Button.isInteractive = true;
625
-
626
- //#endregion
627
- //#region src/components/Dialog/Context.ts
628
- const DialogContext = (0, react.createContext)(null);
629
- const useDialogContext = () => {
630
- const context = (0, react.useContext)(DialogContext);
631
- if (!context) throw new Error("Dialog sub-components must be used within Dialog.Root");
632
- return context;
633
- };
634
-
635
- //#endregion
636
- //#region src/components/Dialog/Button.tsx
637
- const _excluded$70 = ["onClick", "title"];
638
- const DialogButton = (_ref) => {
639
- let { onClick, title } = _ref, props = _objectWithoutProperties(_ref, _excluded$70);
640
- const { closeDialog } = useDialogContext();
641
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, _objectSpread2(_objectSpread2({}, props), {}, {
642
- text: title,
643
- onClick: (e) => {
644
- if (onClick) onClick(e, { closeDialog });
645
- else closeDialog();
646
- }
647
- }));
648
- };
649
- DialogButton.displayName = "Dialog.Button";
650
-
651
- //#endregion
652
- //#region src/components/Dialog/Content.tsx
653
- const _excluded$69 = ["className", "children"];
654
- const DialogContent = (_ref) => {
655
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$69);
656
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", _objectSpread2(_objectSpread2({ className: cn("kern-dialog__body", className) }, rest), {}, { children: typeof children === "string" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
657
- className: "kern-body",
658
- children
659
- }) : children }));
660
- };
661
- DialogContent.displayName = "Dialog.Content";
662
-
663
- //#endregion
664
- //#region src/components/Dialog/Footer.tsx
665
- const _excluded$68 = ["className", "children"];
666
- const DialogFooter = (_ref) => {
667
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$68);
668
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", _objectSpread2(_objectSpread2({}, rest), {}, {
669
- className: cn("kern-dialog__footer", className),
670
- children
671
- }));
672
- };
673
- DialogFooter.displayName = "Dialog.Footer";
674
-
675
- //#endregion
676
- //#region src/components/Dialog/Header.tsx
677
- const _excluded$67 = [
678
- "dialogTitle",
679
- "hasCloseButton",
680
- "aria-label",
681
- "className"
682
- ];
683
- const DialogHeader = (_ref) => {
684
- let { dialogTitle, hasCloseButton = true, "aria-label": ariaLabel = "Schließen", className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$67);
685
- const { closeDialog, id } = useDialogContext();
686
- const headerClass = cn("kern-dialog__header", className);
687
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", _objectSpread2(_objectSpread2({}, rest), {}, {
688
- className: headerClass,
689
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
690
- id,
691
- className: "kern-title kern-title--large",
692
- children: dialogTitle
693
- }), hasCloseButton && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
694
- type: "button",
695
- className: "kern-btn kern-btn--tertiary",
696
- onClick: closeDialog,
697
- "aria-label": ariaLabel,
698
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
699
- className: "kern-icon kern-icon--close",
700
- "aria-hidden": "true"
701
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
702
- className: "kern-sr-only",
703
- children: ariaLabel
704
- })]
705
- })]
706
- }));
707
- };
708
- DialogHeader.displayName = "Dialog.Header";
709
-
710
- //#endregion
711
- //#region src/components/Dialog/Modal.tsx
712
- const _excluded$66 = ["className", "children"];
713
- const DialogModal = (_ref) => {
714
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$66);
715
- const { dialogRef, closeDialog, isOpen, disableOverlayClose, id } = useDialogContext();
716
- const handleOverlayClick = (e) => {
717
- if (disableOverlayClose && e.target === dialogRef.current) e.preventDefault();
718
- else if (e.target === dialogRef.current) closeDialog();
719
- };
720
- const handleKeyDown = (e) => {
721
- if (e.key === "Escape") {
722
- e.stopPropagation();
723
- closeDialog();
724
- return;
725
- }
726
- if (e.key !== "Tab") return;
727
- const dialog = dialogRef.current;
728
- if (!dialog) return;
729
- const focusables = dialog.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])");
730
- if (!focusables.length) return;
731
- const first = focusables[0];
732
- const last = focusables[focusables.length - 1];
733
- if (e.shiftKey && document.activeElement === first) {
734
- e.preventDefault();
735
- last.focus();
736
- } else if (!e.shiftKey && document.activeElement === last) {
737
- e.preventDefault();
738
- first.focus();
739
- }
740
- };
741
- (0, react.useEffect)(() => {
742
- var _focusables$;
743
- if (!isOpen) return;
744
- const dialog = dialogRef.current;
745
- if (!dialog) return;
746
- ((_focusables$ = dialog.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])")[0]) !== null && _focusables$ !== void 0 ? _focusables$ : dialog).focus();
747
- }, [isOpen, dialogRef]);
748
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dialog", _objectSpread2(_objectSpread2({}, rest), {}, {
749
- className: cn("kern-dialog", className),
750
- ref: dialogRef,
751
- onClick: handleOverlayClick,
752
- onKeyDown: handleKeyDown,
753
- open: isOpen,
754
- "aria-labelledby": id,
755
- "aria-modal": "true",
756
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
757
- method: "dialog",
758
- className: "kern-dialog__form",
759
- children
760
- })
761
- }));
762
- };
763
- DialogModal.displayName = "Dialog.Modal";
764
-
765
- //#endregion
766
- //#region src/components/Dialog/Root.tsx
767
- const _excluded$65 = [
768
- "disableOverlayClose",
769
- "children",
770
- "id"
771
- ];
772
- const DialogRoot = (_ref) => {
773
- let { disableOverlayClose = false, children, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$65);
774
- const [isOpen, setIsOpen] = (0, react.useState)(false);
775
- const dialogRef = (0, react.useRef)(null);
776
- const openDialog = () => {
777
- var _dialogRef$current, _dialogRef$current$sh;
778
- setIsOpen(true);
779
- (_dialogRef$current = dialogRef.current) === null || _dialogRef$current === void 0 || (_dialogRef$current$sh = _dialogRef$current.showModal) === null || _dialogRef$current$sh === void 0 || _dialogRef$current$sh.call(_dialogRef$current);
780
- };
781
- const closeDialog = () => {
782
- var _dialogRef$current2, _dialogRef$current2$c;
783
- setIsOpen(false);
784
- (_dialogRef$current2 = dialogRef.current) === null || _dialogRef$current2 === void 0 || (_dialogRef$current2$c = _dialogRef$current2.close) === null || _dialogRef$current2$c === void 0 || _dialogRef$current2$c.call(_dialogRef$current2);
785
- };
786
- const contextValue = {
787
- isOpen,
788
- openDialog,
789
- closeDialog,
790
- dialogRef,
791
- disableOverlayClose,
792
- id: id !== null && id !== void 0 ? id : "kern-modal"
793
- };
794
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogContext.Provider, {
795
- value: contextValue,
796
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, { children }))
797
- });
798
- };
799
- DialogRoot.displayName = "Dialog.Root";
800
-
801
- //#endregion
802
- //#region src/components/Dialog/Trigger.tsx
803
- const DialogTrigger = ({ children }) => {
804
- const { openDialog } = useDialogContext();
805
- if (react.default.isValidElement(children) && children.type === Button) {
806
- var _children$props$class;
807
- return react.default.cloneElement(children, {
808
- onClick: (e) => {
809
- if (children.props.onClick) children.props.onClick(e);
810
- openDialog();
811
- },
812
- onKeyDown: (e) => {
813
- if (children.props.onKeyDown) children.props.onKeyDown(e);
814
- if (e.key === "Enter" || e.key === " ") {
815
- e.preventDefault();
816
- openDialog();
817
- }
818
- },
819
- className: (_children$props$class = children.props.className) !== null && _children$props$class !== void 0 ? _children$props$class : ""
820
- });
821
- }
822
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
823
- onClick: openDialog,
824
- role: "button",
825
- tabIndex: 0,
826
- onKeyDown: (e) => {
827
- if (e.key === "Enter" || e.key === " ") {
828
- e.preventDefault();
829
- openDialog();
830
- }
831
- },
832
- children
833
- });
834
- };
835
- DialogTrigger.displayName = "DialogTrigger";
836
-
837
- //#endregion
838
- //#region src/components/Dialog/index.ts
839
- var Dialog_exports = /* @__PURE__ */ __export({
840
- Button: () => DialogButton,
841
- Content: () => DialogContent,
842
- Footer: () => DialogFooter,
843
- Header: () => DialogHeader,
844
- Modal: () => DialogModal,
845
- Root: () => DialogRoot,
846
- Trigger: () => DialogTrigger
847
- });
848
-
849
- //#endregion
850
- //#region src/components/Fieldset/Content.tsx
851
- const FieldsetContent = ({ children, horizontal, className, style }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
852
- className: cn(`kern-fieldset__body${horizontal ? " kern-fieldset__body--horizontal" : ""}`, className),
853
- style,
854
- children
855
- });
856
- FieldsetContent.displayName = "Fieldset.Content";
857
-
858
- //#endregion
859
- //#region src/components/Fieldset/Error.tsx
860
- const _excluded$64 = [
861
- "children",
862
- "className",
863
- "id"
864
- ];
865
- const FieldsetError = (_ref) => {
866
- let { children, className, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$64);
867
- const errorId = id || `error-${Math.random().toString(36).substr(2, 9)}`;
868
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", _objectSpread2(_objectSpread2({}, rest), {}, {
869
- className: cn(`kern-error`, className),
870
- id: errorId,
871
- role: "alert",
872
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
873
- name: "danger",
874
- size: "default"
875
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
876
- className: "kern-body",
877
- children
878
- })]
879
- }));
880
- };
881
- FieldsetError.displayName = "Fieldset.Error";
882
-
883
- //#endregion
884
- //#region src/components/Fieldset/Hint.tsx
885
- const _excluded$63 = [
886
- "children",
887
- "className",
888
- "id"
889
- ];
890
- const FieldsetHint = (_ref) => {
891
- let { children, className, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$63);
892
- const hintId = id || `hint-${Math.random().toString(36).substr(2, 9)}`;
893
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
894
- className: cn(`kern-hint`, className),
895
- id: hintId,
896
- children
897
- }));
898
- };
899
- FieldsetHint.displayName = "Fieldset.Hint";
900
-
901
- //#endregion
902
- //#region src/components/Fieldset/Legend.tsx
903
- const _excluded$62 = ["children", "hasOptionalLabel"];
904
- const FieldsetLegend = (_ref) => {
905
- let { children, hasOptionalLabel } = _ref, rest = _objectWithoutProperties(_ref, _excluded$62);
906
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("legend", _objectSpread2(_objectSpread2({}, rest), {}, {
907
- className: cn(`kern-label`, rest.className),
908
- children: [children, hasOptionalLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
909
- className: "kern-label__optional",
910
- children: "- Optional"
911
- })]
912
- }));
913
- };
914
- FieldsetLegend.displayName = "Fieldset.Legend";
915
-
916
- //#endregion
917
- //#region src/components/Input/Primitives/Checkbox/CheckboxInput.tsx
918
- const _excluded$61 = ["erroneous", "required"];
919
- const CheckboxInput$1 = (0, react.forwardRef)((_ref, ref) => {
920
- let { erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$61);
921
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
922
- ref,
923
- type: "checkbox",
924
- required,
925
- className: cn("kern-form-check__checkbox", erroneous && "kern-form-check__checkbox--error", rest.className)
926
- }));
927
- });
928
-
929
- //#endregion
930
- //#region src/components/Input/Primitives/Email/EmailInput.tsx
931
- const _excluded$60 = [
932
- "erroneous",
933
- "autoComplete",
934
- "required"
935
- ];
936
- const EmailInput$1 = (0, react.forwardRef)((_ref, ref) => {
937
- let { erroneous = false, autoComplete = "email", required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$60);
938
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
939
- ref,
940
- required,
941
- type: "email",
942
- autoComplete,
943
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className)
944
- }));
945
- });
946
-
947
- //#endregion
948
- //#region src/components/Input/Primitives/Error.tsx
949
- const _excluded$59 = ["className", "message"];
950
- const InputError = (_ref) => {
951
- let { className, message } = _ref, props = _objectWithoutProperties(_ref, _excluded$59);
952
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", _objectSpread2(_objectSpread2({
953
- className: cn("kern-error", className),
954
- role: "alert"
955
- }, props), {}, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { name: "danger" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
956
- className: "kern-body",
957
- children: message
958
- })] }));
959
- };
960
-
961
- //#endregion
962
- //#region src/components/Input/Primitives/File/FileInput.tsx
963
- const _excluded$58 = [
964
- "supportedFormats",
965
- "erroneous",
966
- "required"
967
- ];
968
- const FileInput$1 = (0, react.forwardRef)((_ref, ref) => {
969
- var _rest$accept;
970
- let { supportedFormats = [], erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$58);
971
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
972
- ref,
973
- type: "file",
974
- required,
975
- accept: (_rest$accept = rest.accept) !== null && _rest$accept !== void 0 ? _rest$accept : supportedFormats.join(","),
976
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className)
977
- }));
978
- });
979
-
980
- //#endregion
981
- //#region src/components/Input/Primitives/Hint.tsx
982
- const _excluded$57 = ["className", "children"];
983
- const Hint = (_ref) => {
984
- let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$57);
985
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({ className: cn("kern-hint", className) }, props), {}, { children }));
986
- };
987
-
988
- //#endregion
989
- //#region src/components/Label/Label.tsx
990
- const _excluded$56 = [
991
- "variant",
992
- "textWrapper",
993
- "className",
994
- "children",
995
- "text"
996
- ];
997
- const Label = (_ref) => {
998
- let { variant = "default", textWrapper = "label", className, children, text } = _ref, rest = _objectWithoutProperties(_ref, _excluded$56);
999
- const Wrapper = textWrapper;
1000
- const labelClass = cn("kern-label", variant ? `kern-label--${variant}` : "", className, className);
1001
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, _objectSpread2(_objectSpread2({ className: labelClass }, rest), {}, { children: text || children }));
1002
- };
1003
-
1004
- //#endregion
1005
- //#region src/components/Input/Primitives/Label.tsx
1006
- const _excluded$55 = ["children", "isOptional"];
1007
- const Label$1 = (_ref) => {
1008
- let { children, isOptional } = _ref, props = _objectWithoutProperties(_ref, _excluded$55);
1009
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label, _objectSpread2(_objectSpread2({ textWrapper: "label" }, props), {}, { children: [children, isOptional && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1010
- className: "kern-label__optional",
1011
- children: "– Optional"
1012
- })] }));
1013
- };
1014
-
1015
- //#endregion
1016
- //#region src/components/Input/Primitives/Password/PasswordInput.tsx
1017
- const _excluded$54 = [
1018
- "erroneous",
1019
- "required",
1020
- "autoComplete"
1021
- ];
1022
- const PasswordInput$1 = (0, react.forwardRef)((_ref, ref) => {
1023
- let { erroneous = false, required, autoComplete = "password" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$54);
1024
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
1025
- ref,
1026
- type: "password",
1027
- required,
1028
- autoComplete,
1029
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className)
1030
- }));
1031
- });
1032
-
1033
- //#endregion
1034
- //#region src/components/Input/Primitives/Radio/RadioInput.tsx
1035
- const _excluded$53 = [
1036
- "erroneous",
1037
- "required",
1038
- "autoComplete"
1039
- ];
1040
- const RadioInput$1 = (0, react.forwardRef)((_ref, ref) => {
1041
- let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$53);
1042
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
1043
- ref,
1044
- type: "radio",
1045
- required,
1046
- autoComplete,
1047
- className: cn("kern-form-check__radio", erroneous && "kern-form-check__radio--error", rest.className)
1048
- }));
1049
- });
1050
-
1051
- //#endregion
1052
- //#region src/components/Input/Primitives/Root.tsx
1053
- const _excluded$52 = ["className", "erroneous"];
1054
- const Root = (_ref) => {
1055
- let { className, erroneous } = _ref, props = _objectWithoutProperties(_ref, _excluded$52);
1056
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2({ className: cn("kern-form-input", erroneous && "kern-form-input--error", className) }, props));
1057
- };
1058
-
1059
- //#endregion
1060
- //#region src/components/Input/Primitives/Select/SelectInput.tsx
1061
- const _excluded$51 = [
1062
- "erroneous",
1063
- "required",
1064
- "autoComplete",
1065
- "options"
1066
- ];
1067
- const SelectInput$1 = (0, react.forwardRef)((_ref, ref) => {
1068
- let { erroneous = false, required, autoComplete = "", options = [] } = _ref, rest = _objectWithoutProperties(_ref, _excluded$51);
1069
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1070
- className: "kern-form-input__select-wrapper",
1071
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", _objectSpread2(_objectSpread2({}, rest), {}, {
1072
- ref,
1073
- className: cn("kern-form-input__select", erroneous && "kern-form-input__select--error", rest.className),
1074
- required,
1075
- autoComplete,
1076
- children: options.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
1077
- value: option.value,
1078
- children: option.label
1079
- }, option.value))
1080
- }))
1081
- });
1082
- });
1083
-
1084
- //#endregion
1085
- //#region src/components/Input/Primitives/Tel/TelInput.tsx
1086
- const _excluded$50 = ["erroneous", "required"];
1087
- const TelInput$1 = (0, react.forwardRef)((_ref, ref) => {
1088
- let { erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$50);
1089
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
1090
- ref,
1091
- required,
1092
- type: "tel",
1093
- autoComplete: "tel",
1094
- "aria-describedby": rest["aria-describedby"],
1095
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className)
1096
- }));
1097
- });
1098
-
1099
- //#endregion
1100
- //#region src/components/Input/Primitives/Text/TextInput.tsx
1101
- const _excluded$49 = [
1102
- "erroneous",
1103
- "required",
1104
- "autoComplete"
1105
- ];
1106
- const TextInput$1 = (0, react.forwardRef)((_ref, ref) => {
1107
- let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$49);
1108
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
1109
- ref,
1110
- type: "text",
1111
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className),
1112
- required,
1113
- autoComplete
1114
- }));
1115
- });
1116
-
1117
- //#endregion
1118
- //#region src/components/Input/Primitives/Textarea/TextareaInput.tsx
1119
- const _excluded$48 = [
1120
- "erroneous",
1121
- "required",
1122
- "autoComplete"
1123
- ];
1124
- const TextareaInput$1 = (0, react.forwardRef)((_ref, ref) => {
1125
- let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$48);
1126
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", _objectSpread2(_objectSpread2({}, rest), {}, {
1127
- ref,
1128
- required,
1129
- autoComplete,
1130
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className)
1131
- }));
1132
- });
1133
-
1134
- //#endregion
1135
- //#region src/components/Input/Primitives/Url/UrlInput.tsx
1136
- const _excluded$47 = [
1137
- "erroneous",
1138
- "required",
1139
- "autoComplete"
1140
- ];
1141
- const UrlInput$1 = (0, react.forwardRef)((_ref, ref) => {
1142
- let { erroneous = false, required, autoComplete = "url" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$47);
1143
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
1144
- required,
1145
- autoComplete,
1146
- ref,
1147
- type: "url",
1148
- "aria-describedby": rest["aria-describedby"],
1149
- className: cn("kern-form-input__input", erroneous && "kern-form-input__input--error", rest.className)
1150
- }));
1151
- });
1152
-
1153
- //#endregion
1154
- //#region src/components/Input/Primitives/index.ts
1155
- var Primitives_exports = /* @__PURE__ */ __export({
1156
- Checkbox: () => CheckboxInput$1,
1157
- Email: () => EmailInput$1,
1158
- Error: () => InputError,
1159
- File: () => FileInput$1,
1160
- Hint: () => Hint,
1161
- Label: () => Label$1,
1162
- Password: () => PasswordInput$1,
1163
- Radio: () => RadioInput$1,
1164
- Root: () => Root,
1165
- Select: () => SelectInput$1,
1166
- Tel: () => TelInput$1,
1167
- Text: () => TextInput$1,
1168
- Textarea: () => TextareaInput$1,
1169
- Url: () => UrlInput$1
1170
- });
1171
-
1172
- //#endregion
1173
- //#region src/components/Input/Checkbox/index.tsx
1174
- const _excluded$46 = [
1175
- "id",
1176
- "error",
1177
- "disabled",
1178
- "hasOptionalLabel",
1179
- "label",
1180
- "className",
1181
- "style"
1182
- ];
1183
- const CheckboxInput = (_ref) => {
1184
- let { id, error = false, disabled = false, hasOptionalLabel = false, label, className, style } = _ref, rest = _objectWithoutProperties(_ref, _excluded$46);
1185
- const isErrorString = typeof error === "string";
1186
- const errorId = `${id}-error`;
1187
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
1188
- if (isErrorString) describedBy.push(errorId);
1189
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1190
- className: cn("kern-form-check", isErrorString && "kern-form-check--error", className),
1191
- style,
1192
- children: [
1193
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckboxInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
1194
- id,
1195
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
1196
- erroneous: isErrorString ? true : error,
1197
- disabled
1198
- })),
1199
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
1200
- htmlFor: id,
1201
- isOptional: hasOptionalLabel,
1202
- children: label
1203
- }),
1204
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
1205
- id: errorId,
1206
- message: error
1207
- })
1208
- ]
1209
- });
1210
- };
1211
- CheckboxInput.isInteractive = true;
1212
-
1213
- //#endregion
1214
- //#region src/components/Fieldset/Root.tsx
1215
- const FieldsetRoot = ({ children, id, className, style, error = false }) => {
1216
- const countCheckboxes = (children$1) => {
1217
- return react.default.Children.toArray(children$1).reduce((count, child) => {
1218
- if (react.default.isValidElement(child)) {
1219
- if (child.type === CheckboxInput) return count + 1;
1220
- if (child.props && child.props.children) return count + countCheckboxes(child.props.children);
1221
- }
1222
- return count;
1223
- }, 0);
1224
- };
1225
- const checkboxCount = countCheckboxes(children);
1226
- const hintText = checkboxCount ? `${checkboxCount} Optionen verfügbar.` : "hint-text kern-input-error";
1227
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("fieldset", {
1228
- className: cn(`kern-fieldset`, error && "kern-fieldset--error", className),
1229
- style,
1230
- id,
1231
- role: "group",
1232
- "aria-describedby": hintText,
1233
- children
1234
- });
1235
- };
1236
- FieldsetRoot.displayName = "Fieldset.Root";
1237
-
1238
- //#endregion
1239
- //#region src/components/Fieldset/index.ts
1240
- var Fieldset_exports = /* @__PURE__ */ __export({
1241
- Content: () => FieldsetContent,
1242
- Error: () => FieldsetError,
1243
- Hint: () => FieldsetHint,
1244
- Legend: () => FieldsetLegend,
1245
- Root: () => FieldsetRoot
1246
- });
1247
-
1248
- //#endregion
1249
- //#region src/components/Grid/Column.tsx
1250
- const _excluded$45 = [
1251
- "children",
1252
- "breakpoint",
1253
- "width",
1254
- "isOffset",
1255
- "offsetWidth",
1256
- "alignItem",
1257
- "className"
1258
- ];
1259
- const GridColumn = (_ref) => {
1260
- let { children, breakpoint, width, isOffset, offsetWidth, alignItem, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$45);
1261
- const classes = cn(...[
1262
- isOffset && offsetWidth && breakpoint && width ? `kern-col-${width + offsetWidth} kern-col-${breakpoint}-${width} kern-col-${breakpoint}-offset-${offsetWidth}` : breakpoint && width ? `kern-col-${breakpoint}-${width}` : width ? `kern-col-${width}` : "kern-col",
1263
- alignItem ? `kern-align-self-${alignItem}` : "",
1264
- className
1265
- ]);
1266
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1267
- className: classes,
1268
- children
1269
- }));
1270
- };
1271
- GridColumn.displayName = "Grid.Column";
1272
-
1273
- //#endregion
1274
- //#region src/components/Grid/Root.tsx
1275
- const _excluded$44 = [
1276
- "type",
1277
- "className",
1278
- "children"
1279
- ];
1280
- const GridRoot = (_ref) => {
1281
- let { type, className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$44);
1282
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1283
- className: cn(type ? `kern-container-${type}` : "kern-container", className),
1284
- children
1285
- }));
1286
- };
1287
- GridRoot.displayName = "Grid.Root";
1288
-
1289
- //#endregion
1290
- //#region src/components/Grid/Row.tsx
1291
- const _excluded$43 = [
1292
- "children",
1293
- "alignItems",
1294
- "horizontalAlignment",
1295
- "className"
1296
- ];
1297
- const GridRow = (_ref) => {
1298
- let { children, alignItems, horizontalAlignment, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$43);
1299
- const rowClasses = cn("kern-row", alignItems && `kern-align-items-${alignItems}`, horizontalAlignment && `kern-justify-content-${horizontalAlignment}`, className);
1300
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1301
- className: rowClasses,
1302
- children
1303
- }));
1304
- };
1305
- GridRow.displayName = "Grid.Row";
1306
-
1307
- //#endregion
1308
- //#region src/components/Grid/index.ts
1309
- var Grid_exports = /* @__PURE__ */ __export({
1310
- Column: () => GridColumn,
1311
- Root: () => GridRoot,
1312
- Row: () => GridRow
1313
- });
1314
-
1315
- //#endregion
1316
- //#region src/components/Lists/Root.tsx
1317
- const _excluded$42 = [
1318
- "children",
1319
- "className",
1320
- "size",
1321
- "type"
1322
- ];
1323
- const ListsRoot = (_ref) => {
1324
- let { children, className, size = "default", type = "bullet" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$42);
1325
- const Component = type === "number" ? "ol" : "ul";
1326
- const listClasses = cn("kern-list", size !== "default" && `kern-list--${size}`, type && `kern-list--${type}`, className);
1327
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, _objectSpread2(_objectSpread2({}, rest), {}, {
1328
- className: listClasses,
1329
- children
1330
- }));
1331
- };
1332
- ListsRoot.displayName = "Lists.Root";
1333
-
1334
- //#endregion
1335
- //#region src/components/Lists/Item.tsx
1336
- const ListsItem = ({ children, text, className, style }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
1337
- className,
1338
- style,
1339
- children: [react.default.Children.map(children, (child) => react.default.isValidElement(child) ? react.default.cloneElement(child, { style: _objectSpread2(_objectSpread2({}, style), child.props && child.props.style) }) : child), text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: text })]
1340
- });
1341
- ListsItem.displayName = "Lists.Item";
1342
-
1343
- //#endregion
1344
- //#region src/components/Lists/Bullet.tsx
1345
- const _excluded$41 = [
1346
- "title",
1347
- "items",
1348
- "className"
1349
- ];
1350
- const ListsBullet = (_ref) => {
1351
- let { title, items, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$41);
1352
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1353
- className: cn(className),
1354
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1355
- className: "kern-body kern-body--bold",
1356
- children: title
1357
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", {
1358
- className: "kern-list kern-list--bullet",
1359
- children: items.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: item }, index))
1360
- })]
1361
- }));
1362
- };
1363
- ListsBullet.displayName = "Lists.Bullet";
1364
-
1365
- //#endregion
1366
- //#region src/components/Lists/Number.tsx
1367
- const _excluded$40 = [
1368
- "children",
1369
- "className",
1370
- "size",
1371
- "type"
1372
- ];
1373
- const ListsNumber = (_ref) => {
1374
- let { children, className, size = "default", type } = _ref, rest = _objectWithoutProperties(_ref, _excluded$40);
1375
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", _objectSpread2(_objectSpread2({}, rest), {}, {
1376
- className: cn("kern-list", size && `kern-list--${size}`, type && `kern-list--${type}`, className),
1377
- children
1378
- }));
1379
- };
1380
- ListsNumber.displayName = "Lists.Number";
1381
-
1382
- //#endregion
1383
- //#region src/components/Lists/index.ts
1384
- var Lists_exports = /* @__PURE__ */ __export({
1385
- Bullet: () => ListsBullet,
1386
- Item: () => ListsItem,
1387
- Number: () => ListsNumber,
1388
- Root: () => ListsRoot
1389
- });
1390
-
1391
- //#endregion
1392
- //#region src/components/Progress/Root.tsx
1393
- const _excluded$39 = [
1394
- "value",
1395
- "max",
1396
- "className",
1397
- "children",
1398
- "progressId"
1399
- ];
1400
- const ProgressContext = react.default.createContext(null);
1401
- const useProgressContext = () => {
1402
- const context = react.default.useContext(ProgressContext);
1403
- if (!context) throw new Error("Progress subcomponents must be used within Progress.Root");
1404
- return context;
1405
- };
1406
- const ProgressRoot = (_ref) => {
1407
- let { value = 0, max = 100, className, children, progressId: propProgressId } = _ref, rest = _objectWithoutProperties(_ref, _excluded$39);
1408
- const percentage = Math.round(value / max * 100);
1409
- const progressId = react.default.useMemo(() => propProgressId || `progress-${Math.random().toString(36).slice(2, 11)}`, [propProgressId]);
1410
- const contextValue = {
1411
- value,
1412
- max,
1413
- percentage,
1414
- progressId
1415
- };
1416
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressContext.Provider, {
1417
- value: contextValue,
1418
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1419
- className: cn("kern-progress", className),
1420
- children
1421
- }))
1422
- });
1423
- };
1424
- ProgressRoot.displayName = "Progress.Root";
1425
-
1426
- //#endregion
1427
- //#region src/components/Progress/Bar.tsx
1428
- const _excluded$38 = ["className", "aria-label"];
1429
- const ProgressBar = (_ref) => {
1430
- let { className, "aria-label": ariaLabel } = _ref, rest = _objectWithoutProperties(_ref, _excluded$38);
1431
- const { value, max, progressId } = useProgressContext();
1432
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("progress", _objectSpread2(_objectSpread2({}, rest), {}, {
1433
- id: progressId,
1434
- value,
1435
- "aria-label": ariaLabel || `Progress: ${value.toString()}%`,
1436
- max,
1437
- className
1438
- }));
1439
- };
1440
- ProgressBar.displayName = "Progress.Bar";
1441
-
1442
- //#endregion
1443
- //#region src/components/Progress/Cancel.tsx
1444
- const _excluded$37 = ["children", "onCancel"];
1445
- const ProgressCancel = (_ref) => {
1446
- let { children = "Abbrechen", onCancel } = _ref, rest = _objectWithoutProperties(_ref, _excluded$37);
1447
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, _objectSpread2(_objectSpread2({}, rest), {}, {
1448
- variant: "tertiary",
1449
- text: typeof children === "string" ? children : void 0,
1450
- icon: {
1451
- name: "close",
1452
- size: "small"
1453
- },
1454
- iconLeft: true,
1455
- onClick: onCancel,
1456
- children: typeof children !== "string" ? children : void 0
1457
- }));
1458
- };
1459
- ProgressCancel.displayName = "Progress.Cancel";
1460
-
1461
- //#endregion
1462
- //#region src/components/Progress/Header.tsx
1463
- const ProgressHeader = ({ className, style, children }) => {
1464
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1465
- className: cn("kern-progress__header", className),
1466
- style: _objectSpread2({
1467
- display: "flex",
1468
- width: "100%",
1469
- justifyContent: "space-between",
1470
- alignItems: "center"
1471
- }, style),
1472
- children
1473
- });
1474
- };
1475
- ProgressHeader.displayName = "Progress.Header";
1476
-
1477
- //#endregion
1478
- //#region src/components/Progress/Label.tsx
1479
- const _excluded$36 = ["className", "children"];
1480
- const ProgressLabel = (_ref) => {
1481
- let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$36);
1482
- const { progressId } = useProgressContext();
1483
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", _objectSpread2(_objectSpread2({}, rest), {}, {
1484
- className: cn("kern-label", className),
1485
- htmlFor: progressId,
1486
- children
1487
- }));
1488
- };
1489
- ProgressLabel.displayName = "Progress.Label";
1490
-
1491
- //#endregion
1492
- //#region src/components/Progress/Percentage.tsx
1493
- const ProgressPercentage = ({ className, style, formatter }) => {
1494
- const { percentage } = useProgressContext();
1495
- const displayText = formatter ? formatter(percentage) : `${percentage}%`;
1496
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1497
- className: cn("kern-body--small", className),
1498
- style: _objectSpread2({ color: "var(--kern-color-layout-text-muted, #404565)" }, style),
1499
- children: displayText
1500
- });
1501
- };
1502
- ProgressPercentage.displayName = "Progress.Percentage";
1503
-
1504
- //#endregion
1505
- //#region src/components/Progress/index.ts
1506
- var Progress_exports = /* @__PURE__ */ __export({
1507
- Bar: () => ProgressBar,
1508
- Cancel: () => ProgressCancel,
1509
- Header: () => ProgressHeader,
1510
- Label: () => ProgressLabel,
1511
- Percentage: () => ProgressPercentage,
1512
- Root: () => ProgressRoot
1513
- });
1514
-
1515
- //#endregion
1516
- //#region src/components/Summary/Heading.tsx
1517
- const _excluded$35 = [
1518
- "title",
1519
- "number",
1520
- "className"
1521
- ];
1522
- const SummaryHeading = (_ref) => {
1523
- var _useContext;
1524
- let { title, number, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$35);
1525
- const headingID = (_useContext = (0, react.useContext)(SummaryContext)) === null || _useContext === void 0 ? void 0 : _useContext.headingID;
1526
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1527
- className: cn("kern-summary__header", className),
1528
- children: [number && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1529
- className: "kern-number",
1530
- children: number
1531
- }), title && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, _objectSpread2(_objectSpread2({}, title), {}, { id: headingID }))]
1532
- }));
1533
- };
1534
- SummaryHeading.displayName = "Summary.Heading";
1535
-
1536
- //#endregion
1537
- //#region src/components/Summary/Root.tsx
1538
- const _excluded$34 = [
1539
- "variant",
1540
- "headingID",
1541
- "children",
1542
- "className",
1543
- "style"
1544
- ];
1545
- const SummaryContext = react.default.createContext(null);
1546
- const useSummaryContext = () => {
1547
- const context = react.default.useContext(SummaryContext);
1548
- if (!context) throw new Error("Summary subcomponents must be used within Summary.Root");
1549
- return context;
1550
- };
1551
- const SummaryRoot = (_ref) => {
1552
- let { variant = "row", headingID, children, className = "", style = {} } = _ref, rest = _objectWithoutProperties(_ref, _excluded$34);
1553
- if (!react.default.Children.toArray(children).some((child) => react.default.isValidElement(child) && child.type === SummaryHeading)) throw new Error("Summary requires a Summary.Heading subcomponent.");
1554
- const contextValue = { headingID };
1555
- const summaryClass = cn("kern-summary", variant === "column" && "kern-description-list--col", className);
1556
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SummaryContext.Provider, {
1557
- value: contextValue,
1558
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1559
- className: summaryClass,
1560
- style,
1561
- children
1562
- }))
1563
- });
1564
- };
1565
- SummaryRoot.displayName = "Summary.Root";
1566
-
1567
- //#endregion
1568
- //#region src/components/Summary/Actions.tsx
1569
- const _excluded$33 = ["children", "className"];
1570
- const SummaryActions = (_ref) => {
1571
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$33);
1572
- const headingID = useSummaryContext().headingID;
1573
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1574
- className: cn("kern-summary__actions", className),
1575
- children: react.default.Children.map(children, (child) => react.default.isValidElement(child) ? react.default.cloneElement(child, { "aria-describedBy": headingID }) : child)
1576
- }));
1577
- };
1578
- SummaryActions.displayName = "Summary.Actions";
1579
-
1580
- //#endregion
1581
- //#region src/components/Summary/Body.tsx
1582
- const _excluded$32 = ["children", "className"];
1583
- const SummaryBody = (_ref) => {
1584
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$32);
1585
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1586
- className: cn("kern-summary__body", className),
1587
- children
1588
- }));
1589
- };
1590
- SummaryBody.displayName = "Summary.Body";
1591
-
1592
- //#endregion
1593
- //#region src/components/Summary/Group.tsx
1594
- const _excluded$31 = ["children", "className"];
1595
- const SummaryGroup = (_ref) => {
1596
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$31);
1597
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1598
- className: cn("kern-summary-group", className),
1599
- children
1600
- }));
1601
- };
1602
- SummaryGroup.displayName = "Summary.Group";
1603
-
1604
- //#endregion
1605
- //#region src/components/Heading/Heading.tsx
1606
- const _excluded$30 = [
1607
- "className",
1608
- "headerElement",
1609
- "type",
1610
- "title",
1611
- "children"
1612
- ];
1613
- const Heading = (_ref) => {
1614
- let { className, headerElement = "h1", type, title, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$30);
1615
- const Wrapper = headerElement;
1616
- const headingClass = cn(`kern-heading-${type}`, className);
1617
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, _objectSpread2(_objectSpread2({}, rest), {}, {
1618
- className: headingClass,
1619
- children: children || title
1620
- }));
1621
- };
1622
-
1623
- //#endregion
1624
- //#region src/components/Summary/GroupHeading.tsx
1625
- const _excluded$29 = ["heading", "className"];
1626
- const SummaryGroupHeading = (_ref) => {
1627
- let { heading, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$29);
1628
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1629
- className: cn("kern-summary-group__header", className),
1630
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, _objectSpread2({}, heading))
1631
- }));
1632
- };
1633
- SummaryGroupHeading.displayName = "Summary.GroupHeading";
1634
-
1635
- //#endregion
1636
- //#region src/components/Summary/index.ts
1637
- var Summary_exports = /* @__PURE__ */ __export({
1638
- Actions: () => SummaryActions,
1639
- Body: () => SummaryBody,
1640
- Group: () => SummaryGroup,
1641
- GroupHeading: () => SummaryGroupHeading,
1642
- Heading: () => SummaryHeading,
1643
- Root: () => SummaryRoot
1644
- });
1645
-
1646
- //#endregion
1647
- //#region src/components/Table/Body.tsx
1648
- const _excluded$28 = ["children", "className"];
1649
- const TableBody = (_ref) => {
1650
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$28);
1651
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", _objectSpread2(_objectSpread2({}, rest), {}, {
1652
- className: cn("kern-table__body", className),
1653
- children
1654
- }));
1655
- };
1656
- TableBody.displayName = "Table.Body";
1657
-
1658
- //#endregion
1659
- //#region src/components/Table/Cell.tsx
1660
- const _excluded$27 = [
1661
- "numeric",
1662
- "children",
1663
- "className"
1664
- ];
1665
- const TableCell = (_ref) => {
1666
- let { numeric, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$27);
1667
- const cellClasses = cn("kern-table__cell", numeric ? "kern-table__cell--numeric" : "", className);
1668
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", _objectSpread2(_objectSpread2({}, rest), {}, {
1669
- className: cellClasses,
1670
- children
1671
- }));
1672
- };
1673
- TableCell.displayName = "Table.Cell";
1674
-
1675
- //#endregion
1676
- //#region src/components/Table/Column.tsx
1677
- const _excluded$26 = [
1678
- "numeric",
1679
- "scope",
1680
- "children",
1681
- "className"
1682
- ];
1683
- const TableColumn = (_ref) => {
1684
- let { numeric, scope, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$26);
1685
- const columnClasses = cn("kern-table__header", numeric ? "kern-table__header--numeric" : "", className);
1686
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", _objectSpread2(_objectSpread2({}, rest), {}, {
1687
- scope,
1688
- className: columnClasses,
1689
- children
1690
- }));
1691
- };
1692
- TableColumn.displayName = "Table.Column";
1693
-
1694
- //#endregion
1695
- //#region src/components/Table/Footer.tsx
1696
- const _excluded$25 = ["children", "className"];
1697
- const TableFooter = (_ref) => {
1698
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$25);
1699
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tfoot", _objectSpread2(_objectSpread2({}, rest), {}, {
1700
- className: cn("kern-table__footer", className),
1701
- children
1702
- }));
1703
- };
1704
- TableFooter.displayName = "Table.Footer";
1705
-
1706
- //#endregion
1707
- //#region src/components/Table/Header.tsx
1708
- const _excluded$24 = ["children", "className"];
1709
- const TableHeader = (_ref) => {
1710
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$24);
1711
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", _objectSpread2(_objectSpread2({}, rest), {}, {
1712
- className: cn("kern-table__head", className),
1713
- children
1714
- }));
1715
- };
1716
- TableHeader.displayName = "Table.Header";
1717
-
1718
- //#endregion
1719
- //#region src/components/Table/Root.tsx
1720
- const _excluded$23 = [
1721
- "caption",
1722
- "striped",
1723
- "responsive",
1724
- "variant",
1725
- "children",
1726
- "className"
1727
- ];
1728
- const TableRoot = (_ref) => {
1729
- let { caption = "", striped = false, responsive = false, variant = "default", children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$23);
1730
- const captionId = (0, react.useId)();
1731
- const tableClasses = cn("kern-table", striped ? "kern-table--striped" : "", variant === "small" ? "kern-table--small" : "", className);
1732
- const table = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", _objectSpread2(_objectSpread2({}, rest), {}, {
1733
- className: tableClasses,
1734
- "aria-describedby": caption ? captionId : void 0,
1735
- children: [caption && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("caption", {
1736
- id: captionId,
1737
- className: "kern-title",
1738
- children: caption
1739
- }), children]
1740
- }));
1741
- return responsive ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1742
- className: "kern-table-responsive",
1743
- tabIndex: 0,
1744
- children: table
1745
- }) : table;
1746
- };
1747
- TableRoot.displayName = "Table.Root";
1748
-
1749
- //#endregion
1750
- //#region src/components/Table/Row.tsx
1751
- const _excluded$22 = ["children", "className"];
1752
- const TableRow = (_ref) => {
1753
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$22);
1754
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", _objectSpread2(_objectSpread2({}, rest), {}, {
1755
- className: cn("kern-table__row", className),
1756
- children
1757
- }));
1758
- };
1759
- TableRow.displayName = "Table.Row";
1760
-
1761
- //#endregion
1762
- //#region src/components/Table/index.ts
1763
- var Table_exports = /* @__PURE__ */ __export({
1764
- Body: () => TableBody,
1765
- Cell: () => TableCell,
1766
- Column: () => TableColumn,
1767
- Footer: () => TableFooter,
1768
- Header: () => TableHeader,
1769
- Root: () => TableRoot,
1770
- Row: () => TableRow
1771
- });
1772
-
1773
- //#endregion
1774
- //#region src/components/TaskList/Item.tsx
1775
- const TaskListItem = ({ number, title, href, asParagraph = false, status, statusLabel, titleId, statusId, stretchedLink = true, className = "", style = {} }) => {
1776
- const linkClasses = cn("kern-link", stretchedLink && "kern-link--stretched");
1777
- const isInteractive = !!href && !asParagraph;
1778
- const isNonInteractive = asParagraph || !href;
1779
- const describedBy = status && statusId ? statusId : void 0;
1780
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", {
1781
- className: cn("kern-task-list__item", className),
1782
- style,
1783
- tabIndex: isNonInteractive ? -1 : void 0,
1784
- "data-noninteractive": isNonInteractive ? "true" : void 0,
1785
- onMouseDown: isNonInteractive ? (e) => e.currentTarget.focus() : void 0,
1786
- children: [number !== void 0 && number !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1787
- className: "kern-number",
1788
- children: number
1789
- }) : null, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1790
- className: "kern-task-list__title",
1791
- id: titleId,
1792
- children: [asParagraph ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1793
- className: "kern-body",
1794
- "aria-describedby": describedBy,
1795
- onMouseDown: (e) => e.currentTarget.focus(),
1796
- children: title
1797
- }) : isInteractive ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
1798
- href,
1799
- className: linkClasses,
1800
- "aria-describedby": describedBy,
1801
- children: title
1802
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1803
- className: "kern-link",
1804
- "aria-describedby": describedBy,
1805
- tabIndex: -1,
1806
- "data-noninteractive": "true",
1807
- onMouseDown: (e) => e.currentTarget.focus(),
1808
- children: title
1809
- }), status && statusLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1810
- className: "kern-task-list__status",
1811
- id: statusId,
1812
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1813
- className: cn("kern-badge", `kern-badge--${status}`),
1814
- children: [status === "success" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1815
- className: cn("kern-icon", "kern-icon--success", "kern-icon--sm"),
1816
- "aria-hidden": "true"
1817
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1818
- className: "kern-label kern-label--small",
1819
- children: statusLabel
1820
- })]
1821
- })
1822
- }) : null]
1823
- })]
1824
- });
1825
- };
1826
- TaskListItem.displayName = "TaskList.Item";
1827
-
1828
- //#endregion
1829
- //#region src/components/TaskList/List.tsx
1830
- const _excluded$21 = [
1831
- "children",
1832
- "items",
1833
- "className",
1834
- "style"
1835
- ];
1836
- const TaskList$1 = (_ref) => {
1837
- let { children, items, className, style } = _ref, rest = _objectWithoutProperties(_ref, _excluded$21);
1838
- const listRef = (0, react.useRef)(null);
1839
- const onKeyDown = (0, react.useCallback)((e) => {
1840
- var _ref2, _list$closest;
1841
- const list = listRef.current;
1842
- if (!list) return;
1843
- const boundary = (_ref2 = (_list$closest = list.closest("[data-tasklist-group]")) !== null && _list$closest !== void 0 ? _list$closest : list.closest("[data-tasklist-root]")) !== null && _ref2 !== void 0 ? _ref2 : list;
1844
- if (e.key === "ArrowDown" || e.key === "ArrowUp") {
1845
- const nonInteractive = Array.from(boundary.querySelectorAll("li[data-noninteractive=\"true\"]"));
1846
- if (!nonInteractive.length) return;
1847
- const target = document.activeElement || e.target;
1848
- const currentIndex = nonInteractive.findIndex((el) => el === target || el.contains(target));
1849
- if (currentIndex === -1) {
1850
- e.preventDefault();
1851
- if (e.key === "ArrowDown") {
1852
- const nextEl = nonInteractive.find((el) => !!(target.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING));
1853
- (nextEl !== null && nextEl !== void 0 ? nextEl : nonInteractive[0]).focus();
1854
- } else {
1855
- var _prevEl;
1856
- let prevEl;
1857
- for (let i = nonInteractive.length - 1; i >= 0; i--) {
1858
- const el = nonInteractive[i];
1859
- if (target.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_PRECEDING) {
1860
- prevEl = el;
1861
- break;
1862
- }
1863
- }
1864
- ((_prevEl = prevEl) !== null && _prevEl !== void 0 ? _prevEl : nonInteractive[nonInteractive.length - 1]).focus();
1865
- }
1866
- return;
1867
- }
1868
- e.preventDefault();
1869
- const dir = e.key === "ArrowDown" ? 1 : -1;
1870
- const nextIndex = (currentIndex + dir + nonInteractive.length) % nonInteractive.length;
1871
- nonInteractive[nextIndex].focus();
1872
- return;
1873
- }
1874
- }, []);
1875
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", _objectSpread2(_objectSpread2({}, rest), {}, {
1876
- ref: listRef,
1877
- onKeyDown,
1878
- className: cn("kern-task-list__list", className),
1879
- style,
1880
- children: items ? items.map((rest$1, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskListItem, _objectSpread2({}, rest$1), i)) : children
1881
- }));
1882
- };
1883
- TaskList$1.displayName = "TaskList.List";
1884
-
1885
- //#endregion
1886
- //#region src/components/TaskList/Group.tsx
1887
- const _excluded$20 = [
1888
- "children",
1889
- "className",
1890
- "style"
1891
- ];
1892
- const TaskListGroup = (_ref) => {
1893
- let { children, className, style } = _ref, rest = _objectWithoutProperties(_ref, _excluded$20);
1894
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1895
- "data-tasklist-group": true,
1896
- className: cn("kern-task-list-group", className),
1897
- style,
1898
- children
1899
- }));
1900
- };
1901
- TaskListGroup.displayName = "TaskList.Group";
1902
-
1903
- //#endregion
1904
- //#region src/components/TaskList/Heading.tsx
1905
- const TaskListHeading = ({ title, type = "medium", headerElement = "h2", className = "", style = {} }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1906
- className: cn("kern-task-list__header", className),
1907
- style,
1908
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, {
1909
- headerElement,
1910
- type,
1911
- title
1912
- })
1913
- });
1914
- TaskListHeading.displayName = "TaskList.Heading";
1915
-
1916
- //#endregion
1917
- //#region src/components/TaskList/Root.tsx
1918
- const _excluded$19 = ["children", "className"];
1919
- const TaskListRoot = (_ref) => {
1920
- let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$19);
1921
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
1922
- className: cn("kern-task-list", className),
1923
- children
1924
- }));
1925
- };
1926
- TaskListRoot.displayName = "TaskList.Root";
1927
-
1928
- //#endregion
1929
- //#region src/components/TaskList/index.ts
1930
- var TaskList_exports = /* @__PURE__ */ __export({
1931
- Group: () => TaskListGroup,
1932
- Heading: () => TaskListHeading,
1933
- Item: () => TaskListItem,
1934
- List: () => TaskList$1,
1935
- Root: () => TaskListRoot
1936
- });
1937
-
1938
- //#endregion
1939
- //#region src/components/Badge/Badge.tsx
1940
- const _excluded$18 = [
1941
- "title",
1942
- "variant",
1943
- "className",
1944
- "icon",
1945
- "showIcon"
1946
- ];
1947
- const Badge = (_ref) => {
1948
- let { title, variant, className, icon, showIcon = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$18);
1949
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", _objectSpread2(_objectSpread2({}, rest), {}, {
1950
- role: "status",
1951
- className: cn(`kern-badge kern-badge--${variant}`, className),
1952
- children: [showIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, _objectSpread2(_objectSpread2({}, icon), {}, {
1953
- "aria-hidden": true,
1954
- name: variant
1955
- })), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
1956
- className: "kern-label kern-label-small",
1957
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
1958
- className: "kern-label kern-sr-only",
1959
- children: variant.replace(/^./, (c) => c.toUpperCase())
1960
- }), title]
1961
- })]
1962
- }));
1963
- };
1964
-
1965
- //#endregion
1966
- //#region src/components/Body/Body.tsx
1967
- const _excluded$17 = [
1968
- "isBold",
1969
- "isMuted",
1970
- "size",
1971
- "children",
1972
- "text",
1973
- "className"
1974
- ];
1975
- const Body = (_ref) => {
1976
- let { isBold, isMuted, size, children, text, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$17);
1977
- const textClasses = cn("kern-body", size && `kern-body--${size}`, isBold && "kern-body--bold", isMuted && "kern-body--muted", className);
1978
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", _objectSpread2(_objectSpread2({ className: textClasses }, restProps), {}, { children: children || text }));
1979
- };
1980
-
1981
- //#endregion
1982
- //#region src/components/Divider/Divider.tsx
1983
- const _excluded$16 = ["className"];
1984
- const Divider = (_ref) => {
1985
- let { className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$16);
1986
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("hr", _objectSpread2(_objectSpread2({}, rest), {}, {
1987
- className: cn("kern-divider", className),
1988
- "aria-hidden": "true"
1989
- }));
1990
- };
1991
-
1992
- //#endregion
1993
- //#region src/components/Input/Date/index.tsx
1994
- const _excluded$15 = [
1995
- "id",
1996
- "error",
1997
- "label",
1998
- "dateType",
1999
- "hasOptionalLabel"
2000
- ];
2001
- const dateInputClassNames = {
2002
- day: "kern-form-input__input--width-2",
2003
- month: "kern-form-input__input--width-2",
2004
- year: "kern-form-input__input--width-4"
2005
- };
2006
- const DateInput = (_ref) => {
2007
- let { id, error = false, label, dateType, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$15);
2008
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2009
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2010
- erroneous: false,
2011
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2012
- htmlFor: id,
2013
- isOptional: hasOptionalLabel,
2014
- children: label
2015
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2016
- className: dateInputClassNames[dateType],
2017
- id,
2018
- inputMode: "numeric",
2019
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2020
- erroneous: error
2021
- }))]
2022
- });
2023
- };
2024
- DateInput.isInteractive = true;
2025
-
2026
- //#endregion
2027
- //#region src/components/Input/Email/index.tsx
2028
- const _excluded$14 = [
2029
- "id",
2030
- "error",
2031
- "hintText",
2032
- "label",
2033
- "hasOptionalLabel"
2034
- ];
2035
- const EmailInput = (_ref) => {
2036
- let { id, error = false, hintText, label, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$14);
2037
- const errorId = `${id}-error`;
2038
- const hintId = `${id}-hint`;
2039
- const isErrorString = typeof error === "string";
2040
- const hasHint = Boolean(hintText);
2041
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2042
- if (isErrorString) describedBy.push(errorId);
2043
- if (hasHint) describedBy.push(hintId);
2044
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2045
- erroneous: isErrorString,
2046
- children: [
2047
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2048
- htmlFor: id,
2049
- isOptional: hasOptionalLabel,
2050
- children: label
2051
- }),
2052
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2053
- id: hintId,
2054
- children: hintText
2055
- }),
2056
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmailInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2057
- id,
2058
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2059
- erroneous: isErrorString ? true : error
2060
- })),
2061
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2062
- id: errorId,
2063
- message: error
2064
- })
2065
- ]
2066
- });
2067
- };
2068
- EmailInput.isInteractive = true;
2069
-
2070
- //#endregion
2071
- //#region src/components/Input/File/index.tsx
2072
- const _excluded$13 = [
2073
- "id",
2074
- "errorMessage",
2075
- "hintText",
2076
- "title",
2077
- "supportedFormats",
2078
- "hasOptionalLabel"
2079
- ];
2080
- const FileInput = (_ref) => {
2081
- let { id, errorMessage, hintText, title, supportedFormats, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$13);
2082
- const errorId = `${id}-error`;
2083
- const hintId = `${id}-hint`;
2084
- const erroneous = Boolean(errorMessage);
2085
- const hasHint = Boolean(hintText) || supportedFormats && supportedFormats.length > 0;
2086
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2087
- if (errorMessage) describedBy.push(errorId);
2088
- if (hasHint) describedBy.push(hintId);
2089
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2090
- erroneous,
2091
- children: [
2092
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2093
- htmlFor: id,
2094
- isOptional: hasOptionalLabel,
2095
- children: title
2096
- }),
2097
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2098
- id: hintId,
2099
- children: hintText || `Erlaubte Formate: ${supportedFormats.join(", ")}`
2100
- }),
2101
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FileInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2102
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2103
- erroneous,
2104
- supportedFormats
2105
- })),
2106
- errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2107
- id: errorId,
2108
- message: errorMessage
2109
- })
2110
- ]
2111
- });
2112
- };
2113
- FileInput.isInteractive = true;
2114
-
2115
- //#endregion
2116
- //#region src/components/Input/Number/index.tsx
2117
- const _excluded$12 = [
2118
- "id",
2119
- "error",
2120
- "hintText",
2121
- "label",
2122
- "hasOptionalLabel"
2123
- ];
2124
- const NumberInput = (_ref) => {
2125
- let { id, error = false, hintText, label, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$12);
2126
- const errorId = `${id}-error`;
2127
- const hintId = `${id}-hint`;
2128
- const isErrorString = typeof error === "string";
2129
- const hasHint = Boolean(hintText);
2130
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2131
- if (isErrorString) describedBy.push(errorId);
2132
- if (hasHint) describedBy.push(hintId);
2133
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2134
- erroneous: isErrorString,
2135
- children: [
2136
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2137
- htmlFor: id,
2138
- isOptional: hasOptionalLabel,
2139
- children: label
2140
- }),
2141
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2142
- id: hintId,
2143
- children: hintText
2144
- }),
2145
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2146
- id,
2147
- inputMode: "numeric",
2148
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2149
- erroneous: isErrorString ? true : error
2150
- })),
2151
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2152
- id: errorId,
2153
- message: error
2154
- })
2155
- ]
2156
- });
2157
- };
2158
- NumberInput.isInteractive = true;
2159
-
2160
- //#endregion
2161
- //#region src/components/Input/Password/index.tsx
2162
- const _excluded$11 = [
2163
- "id",
2164
- "error",
2165
- "hintText",
2166
- "label",
2167
- "hasOptionalLabel"
2168
- ];
2169
- const PasswordInput = (_ref) => {
2170
- let { id, error = false, hintText, label, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$11);
2171
- const errorId = `${id}-error`;
2172
- const hintId = `${id}-hint`;
2173
- const isErrorString = typeof error === "string";
2174
- const hasHint = Boolean(hintText);
2175
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2176
- if (isErrorString) describedBy.push(errorId);
2177
- if (hasHint) describedBy.push(hintId);
2178
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2179
- erroneous: isErrorString,
2180
- children: [
2181
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2182
- htmlFor: id,
2183
- isOptional: hasOptionalLabel,
2184
- children: label
2185
- }),
2186
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2187
- id: hintId,
2188
- children: hintText
2189
- }),
2190
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PasswordInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2191
- id,
2192
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2193
- erroneous: isErrorString ? true : error
2194
- })),
2195
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2196
- id: errorId,
2197
- message: error
2198
- })
2199
- ]
2200
- });
2201
- };
2202
- PasswordInput.isInteractive = true;
2203
-
2204
- //#endregion
2205
- //#region src/components/Input/Radio/index.tsx
2206
- const _excluded$10 = [
2207
- "id",
2208
- "error",
2209
- "disabled",
2210
- "label",
2211
- "className",
2212
- "hasOptionalLabel"
2213
- ];
2214
- const RadioInput = (_ref) => {
2215
- let { id, error = false, disabled = false, label, className = "", hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$10);
2216
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2217
- className: cn("kern-form-check", className),
2218
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RadioInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2219
- id,
2220
- erroneous: error,
2221
- disabled
2222
- })), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2223
- htmlFor: id,
2224
- isOptional: hasOptionalLabel,
2225
- children: label
2226
- })]
2227
- });
2228
- };
2229
- RadioInput.isInteractive = true;
2230
-
2231
- //#endregion
2232
- //#region src/components/Input/Select/index.tsx
2233
- const _excluded$9 = [
2234
- "id",
2235
- "errorMessage",
2236
- "hintText",
2237
- "label",
2238
- "hasOptionalLabel",
2239
- "options"
2240
- ];
2241
- const SelectInput = (_ref) => {
2242
- let { id, errorMessage, hintText, label, hasOptionalLabel = false, options = [] } = _ref, props = _objectWithoutProperties(_ref, _excluded$9);
2243
- const errorId = `${id}-error`;
2244
- const hintId = `${id}-hint`;
2245
- const erroneous = Boolean(errorMessage);
2246
- const hasHint = Boolean(hintText);
2247
- const describedBy = props["aria-describedby"] ? [props["aria-describedby"]] : [];
2248
- if (errorMessage) describedBy.push(errorId);
2249
- if (hasHint) describedBy.push(hintId);
2250
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2251
- erroneous,
2252
- children: [
2253
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2254
- htmlFor: id,
2255
- isOptional: hasOptionalLabel,
2256
- children: label
2257
- }),
2258
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2259
- id: hintId,
2260
- children: hintText
2261
- }),
2262
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectInput$1, _objectSpread2(_objectSpread2({}, props), {}, {
2263
- id,
2264
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2265
- erroneous,
2266
- options
2267
- })),
2268
- errorMessage && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2269
- id: errorId,
2270
- message: errorMessage
2271
- })
2272
- ]
2273
- });
2274
- };
2275
- SelectInput.isInteractive = true;
2276
-
2277
- //#endregion
2278
- //#region src/components/Input/Tel/index.tsx
2279
- const _excluded$8 = [
2280
- "id",
2281
- "error",
2282
- "hintText",
2283
- "label",
2284
- "hasOptionalLabel"
2285
- ];
2286
- const TelInput = (_ref) => {
2287
- let { id, error = false, hintText, label, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$8);
2288
- const errorId = `${id}-error`;
2289
- const hintId = `${id}-hint`;
2290
- const isErrorString = typeof error === "string";
2291
- const hasHint = Boolean(hintText);
2292
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2293
- if (isErrorString) describedBy.push(errorId);
2294
- if (hasHint) describedBy.push(hintId);
2295
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2296
- erroneous: isErrorString,
2297
- children: [
2298
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2299
- htmlFor: id,
2300
- isOptional: hasOptionalLabel,
2301
- children: label
2302
- }),
2303
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2304
- id: hintId,
2305
- children: hintText
2306
- }),
2307
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TelInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2308
- id,
2309
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2310
- erroneous: isErrorString ? true : error
2311
- })),
2312
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2313
- id: errorId,
2314
- message: error
2315
- })
2316
- ]
2317
- });
2318
- };
2319
- TelInput.isInteractive = true;
2320
-
2321
- //#endregion
2322
- //#region src/components/Input/Text/index.tsx
2323
- const _excluded$7 = [
2324
- "id",
2325
- "hintText",
2326
- "label",
2327
- "error",
2328
- "hasOptionalLabel"
2329
- ];
2330
- const TextInput = (_ref) => {
2331
- let { id, hintText, label, error = false, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$7);
2332
- const isErrorString = typeof error === "string";
2333
- const errorId = `${id}-error`;
2334
- const hintId = `${id}-hint`;
2335
- const hasHint = Boolean(hintText);
2336
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2337
- if (isErrorString) describedBy.push(errorId);
2338
- if (hasHint) describedBy.push(hintId);
2339
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2340
- erroneous: isErrorString,
2341
- children: [
2342
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2343
- htmlFor: id,
2344
- isOptional: hasOptionalLabel,
2345
- children: label
2346
- }),
2347
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2348
- id: hintId,
2349
- children: hintText
2350
- }),
2351
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2352
- id,
2353
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2354
- erroneous: isErrorString ? true : error
2355
- })),
2356
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2357
- id: errorId,
2358
- message: error
2359
- })
2360
- ]
2361
- });
2362
- };
2363
- TextInput.isInteractive = true;
2364
-
2365
- //#endregion
2366
- //#region src/components/Input/Textarea/index.tsx
2367
- const _excluded$6 = [
2368
- "id",
2369
- "error",
2370
- "hintText",
2371
- "label",
2372
- "hasOptionalLabel"
2373
- ];
2374
- const TextareaInput = (_ref) => {
2375
- let { id, error = false, hintText, label, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$6);
2376
- const errorId = `${id}-error`;
2377
- const hintId = `${id}-hint`;
2378
- const isErrorString = typeof error === "string";
2379
- const hasHint = Boolean(hintText);
2380
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2381
- if (isErrorString) describedBy.push(errorId);
2382
- if (hasHint) describedBy.push(hintId);
2383
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2384
- erroneous: isErrorString,
2385
- children: [
2386
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2387
- htmlFor: id,
2388
- isOptional: hasOptionalLabel,
2389
- children: label
2390
- }),
2391
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2392
- id: hintId,
2393
- children: hintText
2394
- }),
2395
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TextareaInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2396
- id,
2397
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2398
- erroneous: isErrorString ? true : error
2399
- })),
2400
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2401
- id: errorId,
2402
- message: error
2403
- })
2404
- ]
2405
- });
2406
- };
2407
- TextareaInput.isInteractive = true;
2408
-
2409
- //#endregion
2410
- //#region src/components/Input/Url/index.tsx
2411
- const _excluded$5 = [
2412
- "id",
2413
- "error",
2414
- "hintText",
2415
- "label",
2416
- "hasOptionalLabel"
2417
- ];
2418
- const UrlInput = (_ref) => {
2419
- let { id, error = false, hintText, label, hasOptionalLabel = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$5);
2420
- const errorId = `${id}-error`;
2421
- const hintId = `${id}-hint`;
2422
- const isErrorString = typeof error === "string";
2423
- const hasHint = Boolean(hintText);
2424
- const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
2425
- if (isErrorString) describedBy.push(errorId);
2426
- if (hasHint) describedBy.push(hintId);
2427
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Root, {
2428
- erroneous: isErrorString,
2429
- children: [
2430
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label$1, {
2431
- htmlFor: id,
2432
- isOptional: hasOptionalLabel,
2433
- children: label
2434
- }),
2435
- hasHint && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Hint, {
2436
- id: hintId,
2437
- children: hintText
2438
- }),
2439
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UrlInput$1, _objectSpread2(_objectSpread2({}, rest), {}, {
2440
- id,
2441
- "aria-describedby": describedBy.length > 0 ? describedBy.join(" ") : void 0,
2442
- erroneous: isErrorString ? true : error
2443
- })),
2444
- isErrorString && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputError, {
2445
- id: errorId,
2446
- message: error
2447
- })
2448
- ]
2449
- });
2450
- };
2451
- UrlInput.isInteractive = true;
2452
-
2453
- //#endregion
2454
- //#region src/components/Kopfzeile/Kopfzeile.tsx
2455
- const _excluded$4 = [
2456
- "label",
2457
- "fluid",
2458
- "flag",
2459
- "breakpoints",
2460
- "className"
2461
- ];
2462
- const Kopfzeile = (_ref) => {
2463
- let { label = "Offizielle Website - Bundesrepublik Deutschland", fluid = false, flag = true, breakpoints, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$4);
2464
- const kopfzeileClass = cn("kern-kopfzeile", className);
2465
- let customStyle = null;
2466
- if (breakpoints) {
2467
- const rules = breakpoints.split(",").map((bp) => {
2468
- const [minWidth, maxWidth] = bp.split(":").map((s) => s.trim());
2469
- return `@media (min-width: ${minWidth}) { .kern-container { max-width: ${maxWidth} !important; } }`;
2470
- }).join("\n");
2471
- customStyle = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { children: rules });
2472
- }
2473
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
2474
- className: kopfzeileClass,
2475
- role: "banner",
2476
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
2477
- className: `kern-container${fluid ? "-fluid" : ""}`,
2478
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2479
- className: "kern-kopfzeile__content",
2480
- children: [flag && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2481
- className: "kern-kopfzeile__flagge",
2482
- "aria-hidden": "true",
2483
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
2484
- xmlns: "http://www.w3.org/2000/svg",
2485
- fill: "none",
2486
- viewBox: "0 0 24 16",
2487
- style: { maxWidth: 24 },
2488
- children: [
2489
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
2490
- fill: "#000",
2491
- d: "M0 .5h24v5.333H0z"
2492
- }),
2493
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
2494
- fill: "red",
2495
- d: "M0 5.833h24v5.333H0z"
2496
- }),
2497
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
2498
- fill: "#FACA2C",
2499
- d: "M0 11.167h24V16.5H0z"
2500
- })
2501
- ]
2502
- })
2503
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2504
- className: "kern-kopfzeile__label",
2505
- children: label
2506
- })]
2507
- })
2508
- })
2509
- })), customStyle] });
2510
- };
2511
-
2512
- //#endregion
2513
- //#region src/components/Loader/Loader.tsx
2514
- const _excluded$3 = [
2515
- "visible",
2516
- "srDescription",
2517
- "className"
2518
- ];
2519
- const Loader = (_ref) => {
2520
- let { visible = false, srDescription = "Wird geladen...", className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$3);
2521
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
2522
- className: cn("kern-loader", visible && "kern-loader--visible", className),
2523
- role: "status",
2524
- "aria-atomic": "true",
2525
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2526
- className: "kern-sr-only",
2527
- children: srDescription
2528
- })
2529
- }));
2530
- };
2531
-
2532
- //#endregion
2533
- //#region src/components/Preline/Preline.tsx
2534
- const _excluded$2 = [
2535
- "variant",
2536
- "text",
2537
- "children",
2538
- "className"
2539
- ];
2540
- const Preline = (_ref) => {
2541
- let { variant = "default", text, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$2);
2542
- const prelineClass = cn("kern-preline", `kern-preline--${variant}`, className);
2543
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", _objectSpread2(_objectSpread2({}, rest), {}, {
2544
- className: prelineClass,
2545
- children: children || text
2546
- }));
2547
- };
2548
-
2549
- //#endregion
2550
- //#region src/components/Subline/Subline.tsx
2551
- const _excluded$1 = [
2552
- "text",
2553
- "children",
2554
- "className",
2555
- "variant"
2556
- ];
2557
- const Subline = (_ref) => {
2558
- let { text, children, className, variant = "default" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$1);
2559
- const sublineClass = cn("kern-subline", `kern-subline--${variant}`, className);
2560
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", _objectSpread2(_objectSpread2({}, rest), {}, {
2561
- className: sublineClass,
2562
- children: children || text
2563
- }));
2564
- };
2565
-
2566
- //#endregion
2567
- //#region src/components/ThemeProvider/ThemeProvider.tsx
2568
- const _excluded = [
2569
- "theme",
2570
- "children",
2571
- "global",
2572
- "className",
2573
- "style"
2574
- ];
2575
- const flattenThemeToVariables = (obj, prefix = "--kern") => {
2576
- const variables = {};
2577
- const toKebabCase = (str) => {
2578
- return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
2579
- };
2580
- const traverse = (current, path) => {
2581
- if (current && typeof current === "object" && !Array.isArray(current)) Object.entries(current).forEach(([key, value]) => {
2582
- if (typeof value === "string" || typeof value === "number") {
2583
- const kebabKey = toKebabCase(key);
2584
- const variableName = [...path, kebabKey].join("-");
2585
- variables[variableName] = String(value);
2586
- } else if (typeof value === "object" && value !== null && !Array.isArray(value)) {
2587
- const kebabKey = toKebabCase(key);
2588
- traverse(value, [...path, kebabKey]);
2589
- }
2590
- });
2591
- };
2592
- traverse(obj, [prefix]);
2593
- return variables;
2594
- };
2595
- const generateModeCSS = (theme, _mode) => {
2596
- const variables = flattenThemeToVariables(theme);
2597
- return Object.entries(variables).map(([key, value]) => ` ${key}: ${value};`).join("\n");
2598
- };
2599
- const ThemeProvider = (_ref) => {
2600
- let { theme = {}, children, global = true, className = "", style = {} } = _ref, props = _objectWithoutProperties(_ref, _excluded);
2601
- const { light, dark, color, metric, typography, component } = theme;
2602
- const id = (0, react.useId)();
2603
- const uniqueId = (0, react.useMemo)(() => id.replace(/:/g, "-"), [id]);
2604
- const baseTheme = {
2605
- color,
2606
- metric,
2607
- typography,
2608
- component
2609
- };
2610
- const baseStyle = Object.keys(baseTheme).some((key) => baseTheme[key]) ? flattenThemeToVariables(baseTheme) : {};
2611
- const lightCSS = light ? generateModeCSS(light, "light") : "";
2612
- const darkCSS = dark ? generateModeCSS(dark, "dark") : "";
2613
- const modeCSS = global ? `
2614
- ${lightCSS ? `[data-kern-theme="light"] { ${lightCSS} }` : ""}
2615
- ${darkCSS ? `[data-kern-theme="dark"] { ${darkCSS} }` : ""}
2616
- `.trim() : `
2617
- ${lightCSS ? `.kern-theme-provider-${uniqueId}[data-kern-theme="light"], .kern-theme-provider-${uniqueId} [data-kern-theme="light"], .kern-theme-provider-${uniqueId}[data-kern-theme="light"] *, .kern-theme-provider-${uniqueId} [data-kern-theme="light"] * { ${lightCSS} }` : ""}
2618
- ${darkCSS ? `.kern-theme-provider-${uniqueId}[data-kern-theme="dark"], .kern-theme-provider-${uniqueId} [data-kern-theme="dark"], .kern-theme-provider-${uniqueId}[data-kern-theme="dark"] *, .kern-theme-provider-${uniqueId} [data-kern-theme="dark"] * { ${darkCSS} }` : ""}
2619
- `.trim();
2620
- const baseCSS = Object.keys(baseStyle).length > 0 ? global ? `
2621
- :root {
2622
- ${Object.entries(baseStyle).map(([key, value]) => `${key}: ${value};`).join("\n ")}
2623
- }
2624
- ` : `
2625
- .kern-theme-provider-${uniqueId}, .kern-theme-provider-${uniqueId} * {
2626
- ${Object.entries(baseStyle).map(([key, value]) => `${key}: ${value};`).join("\n ")}
2627
- }
2628
- ` : "";
2629
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
2630
- modeCSS && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: modeCSS } }),
2631
- baseCSS && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("style", { dangerouslySetInnerHTML: { __html: baseCSS } }),
2632
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, props), {}, {
2633
- className: `kern-theme-provider-${uniqueId} ${className || ""}`,
2634
- style: _objectSpread2(_objectSpread2({}, style), baseStyle),
2635
- children
2636
- }))
2637
- ] });
2638
- };
2639
-
2640
- //#endregion
2641
- //#region src/index.ts
2642
- const Accordion = Object.assign(AccordionRoot, Accordion_exports);
2643
- const Alert = Object.assign(AlertRoot, Alert_exports);
2644
- const Card = Object.assign(CardRoot, Card_exports);
2645
- const DescriptionList = Object.assign(DescriptionListRoot, DescriptionList_exports);
2646
- const Dialog = Object.assign(DialogRoot, Dialog_exports);
2647
- const Fieldset = Object.assign(FieldsetRoot, Fieldset_exports);
2648
- const Grid = Object.assign(GridRoot, Grid_exports);
2649
- const InputPrimitive = Object.assign(Root, Primitives_exports);
2650
- const Lists = Object.assign(ListsRoot, Lists_exports);
2651
- const Table = Object.assign(TableRoot, Table_exports);
2652
- const Progress = Object.assign(ProgressRoot, Progress_exports);
2653
- const Summary = Object.assign(SummaryRoot, Summary_exports);
2654
- const TaskList = Object.assign(TaskListRoot, TaskList_exports);
2655
-
2656
- //#endregion
2657
- exports.Accordion = Accordion;
2658
- exports.Alert = Alert;
2659
- exports.Badge = Badge;
2660
- exports.Body = Body;
2661
- exports.Button = Button;
2662
- exports.Card = Card;
2663
- exports.CheckboxInput = CheckboxInput;
2664
- exports.DateInput = DateInput;
2665
- exports.DescriptionList = DescriptionList;
2666
- exports.Dialog = Dialog;
2667
- exports.Divider = Divider;
2668
- exports.EmailInput = EmailInput;
2669
- exports.Fieldset = Fieldset;
2670
- exports.FileInput = FileInput;
2671
- exports.Grid = Grid;
2672
- exports.Heading = Heading;
2673
- exports.Icon = Icon;
2674
- exports.InputPrimitive = InputPrimitive;
2675
- exports.Kopfzeile = Kopfzeile;
2676
- exports.Label = Label;
2677
- exports.Link = Link;
2678
- exports.Lists = Lists;
2679
- exports.Loader = Loader;
2680
- exports.NumberInput = NumberInput;
2681
- exports.PasswordInput = PasswordInput;
2682
- exports.Preline = Preline;
2683
- exports.Progress = Progress;
2684
- exports.RadioInput = RadioInput;
2685
- exports.SelectInput = SelectInput;
2686
- exports.Subline = Subline;
2687
- exports.Summary = Summary;
2688
- exports.Table = Table;
2689
- exports.TaskList = TaskList;
2690
- exports.TelInput = TelInput;
2691
- exports.TextInput = TextInput;
2692
- exports.TextareaInput = TextareaInput;
2693
- exports.ThemeProvider = ThemeProvider;
2694
- exports.Title = Title;
2695
- exports.UrlInput = UrlInput;
2696
- //# sourceMappingURL=index.cjs.map