@publicplan/kern-react-kit 1.3.1 → 1.3.3
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 +235 -187
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +24 -0
- package/dist/index.d.cts +52 -44
- package/dist/index.d.ts +52 -44
- package/dist/index.js +235 -188
- package/dist/index.js.map +1 -1
- package/dist/skills/kern-react-kit/SKILL.md +343 -0
- package/dist/skills/kern-react-kit/references/COMPONENTS.md +686 -0
- package/dist/skills/kern-react-kit/references/REFERENCE.md +316 -0
- package/dist/skills/skills.index.json +10 -0
- package/package.json +10 -4
package/dist/index.cjs
CHANGED
|
@@ -131,9 +131,9 @@ function _objectSpread2(e) {
|
|
|
131
131
|
|
|
132
132
|
//#endregion
|
|
133
133
|
//#region src/components/Accordion/Content.tsx
|
|
134
|
-
const _excluded$
|
|
134
|
+
const _excluded$94 = ["children", "className"];
|
|
135
135
|
const AccordionContent = (_ref) => {
|
|
136
|
-
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
136
|
+
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$94);
|
|
137
137
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
138
138
|
className: cn("kern-accordion__body", className),
|
|
139
139
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
@@ -146,7 +146,7 @@ AccordionContent.displayName = "Accordion.Content";
|
|
|
146
146
|
|
|
147
147
|
//#endregion
|
|
148
148
|
//#region src/components/Accordion/Root.tsx
|
|
149
|
-
const _excluded$
|
|
149
|
+
const _excluded$93 = [
|
|
150
150
|
"className",
|
|
151
151
|
"children",
|
|
152
152
|
"isOpened",
|
|
@@ -154,7 +154,7 @@ const _excluded$94 = [
|
|
|
154
154
|
"totalItems"
|
|
155
155
|
];
|
|
156
156
|
const AccordionRoot = (_ref) => {
|
|
157
|
-
let { className, children, isOpened, position = 0, totalItems = 0 } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
157
|
+
let { className, children, isOpened, position = 0, totalItems = 0 } = _ref, rest = _objectWithoutProperties(_ref, _excluded$93);
|
|
158
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
159
|
className: "kern-sr-only",
|
|
160
160
|
children: `Item ${position} of ${totalItems}`
|
|
@@ -164,7 +164,7 @@ AccordionRoot.displayName = "Accordion.Root";
|
|
|
164
164
|
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region src/components/Title/Title.tsx
|
|
167
|
-
const _excluded$
|
|
167
|
+
const _excluded$92 = [
|
|
168
168
|
"variant",
|
|
169
169
|
"textWrapper",
|
|
170
170
|
"title",
|
|
@@ -172,7 +172,7 @@ const _excluded$93 = [
|
|
|
172
172
|
"className"
|
|
173
173
|
];
|
|
174
174
|
const Title = (_ref) => {
|
|
175
|
-
let { variant = "default", textWrapper = "h2", title, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
175
|
+
let { variant = "default", textWrapper = "h2", title, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$92);
|
|
176
176
|
const Wrapper = textWrapper;
|
|
177
177
|
const titleClass = cn("kern-title", `kern-title--${variant}`, className);
|
|
178
178
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
@@ -183,14 +183,14 @@ const Title = (_ref) => {
|
|
|
183
183
|
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region src/components/Accordion/Group.tsx
|
|
186
|
-
const _excluded$
|
|
186
|
+
const _excluded$91 = [
|
|
187
187
|
"aria-label",
|
|
188
188
|
"className",
|
|
189
189
|
"title",
|
|
190
190
|
"children"
|
|
191
191
|
];
|
|
192
192
|
const AccordionGroup = (_ref) => {
|
|
193
|
-
let { "aria-label": ariaLabel, className, title, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
193
|
+
let { "aria-label": ariaLabel, className, title, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$91);
|
|
194
194
|
const totalItems = react.default.Children.count(children);
|
|
195
195
|
const isAccordionItem = (child) => {
|
|
196
196
|
if (!react.default.isValidElement(child)) return false;
|
|
@@ -210,9 +210,9 @@ AccordionGroup.displayName = "Accordion.Group";
|
|
|
210
210
|
|
|
211
211
|
//#endregion
|
|
212
212
|
//#region src/components/Accordion/Summary.tsx
|
|
213
|
-
const _excluded$
|
|
213
|
+
const _excluded$90 = ["title", "className"];
|
|
214
214
|
const AccordionSummary = (_ref) => {
|
|
215
|
-
let { title, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
215
|
+
let { title, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$90);
|
|
216
216
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
217
217
|
className: cn("kern-accordion__header", className),
|
|
218
218
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, _objectSpread2({}, title))
|
|
@@ -231,9 +231,9 @@ var Accordion_exports = /* @__PURE__ */ __export({
|
|
|
231
231
|
|
|
232
232
|
//#endregion
|
|
233
233
|
//#region src/components/Alert/Body.tsx
|
|
234
|
-
const _excluded$
|
|
234
|
+
const _excluded$89 = ["children", "className"];
|
|
235
235
|
const AlertBody = (_ref) => {
|
|
236
|
-
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
236
|
+
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$89);
|
|
237
237
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
238
238
|
className: cn("kern-alert__body", className),
|
|
239
239
|
children
|
|
@@ -243,7 +243,7 @@ AlertBody.displayName = "Alert.Body";
|
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
245
|
//#region src/components/Icon/Icon.tsx
|
|
246
|
-
const _excluded$
|
|
246
|
+
const _excluded$88 = [
|
|
247
247
|
"name",
|
|
248
248
|
"aria-hidden",
|
|
249
249
|
"size",
|
|
@@ -251,7 +251,7 @@ const _excluded$89 = [
|
|
|
251
251
|
"className"
|
|
252
252
|
];
|
|
253
253
|
const Icon = (_ref) => {
|
|
254
|
-
let { name = "home", "aria-hidden": ariaHidden = true, size = "default", role, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
254
|
+
let { name = "home", "aria-hidden": ariaHidden = true, size = "default", role, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$88);
|
|
255
255
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
256
256
|
className: cn("kern-icon", `kern-icon--${name}`, `kern-icon--${size}`, className),
|
|
257
257
|
"aria-hidden": ariaHidden,
|
|
@@ -268,14 +268,14 @@ function useAlertVariant() {
|
|
|
268
268
|
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/components/Alert/Header.tsx
|
|
271
|
-
const _excluded$
|
|
271
|
+
const _excluded$87 = [
|
|
272
272
|
"hasIcon",
|
|
273
273
|
"icon",
|
|
274
274
|
"title",
|
|
275
275
|
"className"
|
|
276
276
|
];
|
|
277
277
|
const AlertHeader = (_ref) => {
|
|
278
|
-
let { hasIcon = true, icon, title, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
278
|
+
let { hasIcon = true, icon, title, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$87);
|
|
279
279
|
const variant = useAlertVariant();
|
|
280
280
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
281
281
|
className: cn("kern-alert__header", className),
|
|
@@ -289,7 +289,7 @@ AlertHeader.displayName = "Alert.Header";
|
|
|
289
289
|
|
|
290
290
|
//#endregion
|
|
291
291
|
//#region src/components/Link/Link.tsx
|
|
292
|
-
const _excluded$
|
|
292
|
+
const _excluded$86 = [
|
|
293
293
|
"variant",
|
|
294
294
|
"icon",
|
|
295
295
|
"iconLeft",
|
|
@@ -299,21 +299,21 @@ const _excluded$87 = [
|
|
|
299
299
|
"isStretched",
|
|
300
300
|
"className"
|
|
301
301
|
];
|
|
302
|
-
const getIcon
|
|
302
|
+
const getIcon = (iconProps) => iconProps ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
303
303
|
name: iconProps.name,
|
|
304
304
|
size: iconProps.size
|
|
305
305
|
}) : null;
|
|
306
306
|
const Link = (_ref) => {
|
|
307
|
-
let { variant = "default", icon, iconLeft, title, target = "_self", children, isStretched, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
307
|
+
let { variant = "default", icon, iconLeft, title, target = "_self", children, isStretched, className } = _ref, props = _objectWithoutProperties(_ref, _excluded$86);
|
|
308
308
|
const linkText = title !== null && title !== void 0 ? title : children;
|
|
309
309
|
const linkClass = cn(isStretched ? "kern-link--stretched" : "kern-link", variant === "small" && "kern-link--small", className);
|
|
310
310
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", _objectSpread2(_objectSpread2({}, props), {}, {
|
|
311
311
|
className: linkClass,
|
|
312
312
|
target: (icon === null || icon === void 0 ? void 0 : icon.name) === "open-in-new" ? "_blank" : target,
|
|
313
313
|
children: [
|
|
314
|
-
iconLeft && getIcon
|
|
314
|
+
iconLeft && getIcon(icon),
|
|
315
315
|
linkText,
|
|
316
|
-
!iconLeft && getIcon
|
|
316
|
+
!iconLeft && getIcon(icon)
|
|
317
317
|
]
|
|
318
318
|
}));
|
|
319
319
|
};
|
|
@@ -328,13 +328,13 @@ AlertLink.displayName = "Alert.Link";
|
|
|
328
328
|
|
|
329
329
|
//#endregion
|
|
330
330
|
//#region src/components/Alert/Root.tsx
|
|
331
|
-
const _excluded$
|
|
331
|
+
const _excluded$85 = [
|
|
332
332
|
"children",
|
|
333
333
|
"variant",
|
|
334
334
|
"className"
|
|
335
335
|
];
|
|
336
336
|
const AlertRoot = (_ref) => {
|
|
337
|
-
let { children = null, variant, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
337
|
+
let { children = null, variant, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$85);
|
|
338
338
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertVariantContext.Provider, {
|
|
339
339
|
value: variant,
|
|
340
340
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
@@ -357,9 +357,9 @@ var Alert_exports = /* @__PURE__ */ __export({
|
|
|
357
357
|
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region src/components/Card/Body.tsx
|
|
360
|
-
const _excluded$
|
|
360
|
+
const _excluded$84 = ["className", "children"];
|
|
361
361
|
const CardBody = (_ref) => {
|
|
362
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
362
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$84);
|
|
363
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
364
|
className: "kern-body",
|
|
365
365
|
children
|
|
@@ -369,9 +369,9 @@ CardBody.displayName = "Card.Body";
|
|
|
369
369
|
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/components/Card/Container.tsx
|
|
372
|
-
const _excluded$
|
|
372
|
+
const _excluded$83 = ["className", "children"];
|
|
373
373
|
const CardContainer = (_ref) => {
|
|
374
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
374
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$83);
|
|
375
375
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
376
376
|
className: cn("kern-card__container", className),
|
|
377
377
|
children
|
|
@@ -381,9 +381,9 @@ CardContainer.displayName = "Card.Container";
|
|
|
381
381
|
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region src/components/Card/Footer.tsx
|
|
384
|
-
const _excluded$
|
|
384
|
+
const _excluded$82 = ["className", "children"];
|
|
385
385
|
const CardFooter = (_ref) => {
|
|
386
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
386
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$82);
|
|
387
387
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
388
388
|
className: cn("kern-card__footer", className),
|
|
389
389
|
children
|
|
@@ -393,9 +393,9 @@ CardFooter.displayName = "Card.Footer";
|
|
|
393
393
|
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region src/components/Card/Header.tsx
|
|
396
|
-
const _excluded$
|
|
396
|
+
const _excluded$81 = ["className", "children"];
|
|
397
397
|
const CardHeader = (_ref) => {
|
|
398
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
398
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$81);
|
|
399
399
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
400
400
|
className: cn("kern-card__header", className),
|
|
401
401
|
children
|
|
@@ -405,7 +405,7 @@ CardHeader.displayName = "Card.Header";
|
|
|
405
405
|
|
|
406
406
|
//#endregion
|
|
407
407
|
//#region src/components/Card/Media.tsx
|
|
408
|
-
const _excluded$
|
|
408
|
+
const _excluded$80 = [
|
|
409
409
|
"src",
|
|
410
410
|
"alt",
|
|
411
411
|
"width",
|
|
@@ -413,7 +413,7 @@ const _excluded$81 = [
|
|
|
413
413
|
"className"
|
|
414
414
|
];
|
|
415
415
|
const CardMedia = (_ref) => {
|
|
416
|
-
let { src, alt, width, height, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
416
|
+
let { src, alt, width, height, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$80);
|
|
417
417
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
418
418
|
className: cn("kern-card__media", className),
|
|
419
419
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
@@ -428,9 +428,9 @@ CardMedia.displayName = "Card.Media";
|
|
|
428
428
|
|
|
429
429
|
//#endregion
|
|
430
430
|
//#region src/components/Card/Preline.tsx
|
|
431
|
-
const _excluded$
|
|
431
|
+
const _excluded$79 = ["className", "children"];
|
|
432
432
|
const CardPreline = (_ref) => {
|
|
433
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
433
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$79);
|
|
434
434
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
435
435
|
className: cn("kern-preline", className),
|
|
436
436
|
children
|
|
@@ -440,7 +440,7 @@ CardPreline.displayName = "Card.Preline";
|
|
|
440
440
|
|
|
441
441
|
//#endregion
|
|
442
442
|
//#region src/components/Card/Root.tsx
|
|
443
|
-
const _excluded$
|
|
443
|
+
const _excluded$78 = [
|
|
444
444
|
"className",
|
|
445
445
|
"style",
|
|
446
446
|
"children",
|
|
@@ -449,7 +449,7 @@ const _excluded$79 = [
|
|
|
449
449
|
"isCardHug"
|
|
450
450
|
];
|
|
451
451
|
const CardRoot = (_ref) => {
|
|
452
|
-
let { className, style, children, active = false, size = "medium", isCardHug = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
452
|
+
let { className, style, children, active = false, size = "medium", isCardHug = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$78);
|
|
453
453
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
454
454
|
className: cn("kern-card", active && "kern-card--active", size && `kern-card--${size}`, isCardHug && ` kern-card--hug`, className),
|
|
455
455
|
style,
|
|
@@ -460,9 +460,9 @@ CardRoot.displayName = "Card.Root";
|
|
|
460
460
|
|
|
461
461
|
//#endregion
|
|
462
462
|
//#region src/components/Card/Subline.tsx
|
|
463
|
-
const _excluded$
|
|
463
|
+
const _excluded$77 = ["className", "children"];
|
|
464
464
|
const CardSubline = (_ref) => {
|
|
465
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
465
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$77);
|
|
466
466
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
467
467
|
className: cn("kern-subline", className),
|
|
468
468
|
children
|
|
@@ -472,13 +472,13 @@ CardSubline.displayName = "Card.Subline";
|
|
|
472
472
|
|
|
473
473
|
//#endregion
|
|
474
474
|
//#region src/components/Card/Title.tsx
|
|
475
|
-
const _excluded$
|
|
475
|
+
const _excluded$76 = [
|
|
476
476
|
"className",
|
|
477
477
|
"children",
|
|
478
478
|
"textWrapper"
|
|
479
479
|
];
|
|
480
480
|
const CardTitle = (_ref) => {
|
|
481
|
-
let { className, children, textWrapper = "h2" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
481
|
+
let { className, children, textWrapper = "h2" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$76);
|
|
482
482
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(textWrapper, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
483
483
|
className: cn("kern-title", className),
|
|
484
484
|
children
|
|
@@ -502,13 +502,13 @@ var Card_exports = /* @__PURE__ */ __export({
|
|
|
502
502
|
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src/components/DescriptionList/Heading.tsx
|
|
505
|
-
const _excluded$
|
|
505
|
+
const _excluded$75 = [
|
|
506
506
|
"title",
|
|
507
507
|
"children",
|
|
508
508
|
"className"
|
|
509
509
|
];
|
|
510
510
|
const DescriptionListHeading = (_ref) => {
|
|
511
|
-
let { title, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
511
|
+
let { title, children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$75);
|
|
512
512
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
513
513
|
className: cn("kern-description-list__heading", className),
|
|
514
514
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Title, _objectSpread2({}, title)), children]
|
|
@@ -518,9 +518,9 @@ DescriptionListHeading.displayName = "DescriptionList.Heading";
|
|
|
518
518
|
|
|
519
519
|
//#endregion
|
|
520
520
|
//#region src/components/DescriptionList/Item.tsx
|
|
521
|
-
const _excluded$
|
|
521
|
+
const _excluded$74 = ["children", "className"];
|
|
522
522
|
const DescriptionListItem = (_ref) => {
|
|
523
|
-
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
523
|
+
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$74);
|
|
524
524
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
525
525
|
className: cn(`kern-description-list-item`, className),
|
|
526
526
|
children
|
|
@@ -530,9 +530,9 @@ DescriptionListItem.displayName = "DescriptionList.Item";
|
|
|
530
530
|
|
|
531
531
|
//#endregion
|
|
532
532
|
//#region src/components/DescriptionList/Key.tsx
|
|
533
|
-
const _excluded$
|
|
533
|
+
const _excluded$73 = ["children", "className"];
|
|
534
534
|
const DescriptionListKey = (_ref) => {
|
|
535
|
-
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
535
|
+
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$73);
|
|
536
536
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
537
537
|
className: cn("kern-description-list-item__key", className),
|
|
538
538
|
children
|
|
@@ -542,13 +542,13 @@ DescriptionListKey.displayName = "DescriptionList.Key";
|
|
|
542
542
|
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region src/components/DescriptionList/Root.tsx
|
|
545
|
-
const _excluded$
|
|
545
|
+
const _excluded$72 = [
|
|
546
546
|
"variant",
|
|
547
547
|
"children",
|
|
548
548
|
"className"
|
|
549
549
|
];
|
|
550
550
|
const DescriptionListRoot = (_ref) => {
|
|
551
|
-
let { variant = "row", children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
551
|
+
let { variant = "row", children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$72);
|
|
552
552
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dl", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
553
553
|
className: cn("kern-description-list", variant === "column" && "kern-description-list--col", className),
|
|
554
554
|
children
|
|
@@ -558,9 +558,9 @@ DescriptionListRoot.displayName = "DescriptionList.Root";
|
|
|
558
558
|
|
|
559
559
|
//#endregion
|
|
560
560
|
//#region src/components/DescriptionList/Value.tsx
|
|
561
|
-
const _excluded$
|
|
561
|
+
const _excluded$71 = ["children", "className"];
|
|
562
562
|
const DescriptionListValue = (_ref) => {
|
|
563
|
-
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
563
|
+
let { children, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$71);
|
|
564
564
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
565
565
|
className: cn("kern-description-list-item__value", className),
|
|
566
566
|
children
|
|
@@ -580,20 +580,22 @@ var DescriptionList_exports = /* @__PURE__ */ __export({
|
|
|
580
580
|
|
|
581
581
|
//#endregion
|
|
582
582
|
//#region src/components/Button/Button.tsx
|
|
583
|
-
const _excluded$
|
|
583
|
+
const _excluded$70 = [
|
|
584
584
|
"variant",
|
|
585
585
|
"isBlock",
|
|
586
586
|
"icon",
|
|
587
|
+
"iconSize",
|
|
587
588
|
"iconOnly",
|
|
588
589
|
"iconLeft",
|
|
589
590
|
"text",
|
|
590
591
|
"children",
|
|
591
592
|
"className"
|
|
593
|
+
], _excluded2 = [
|
|
594
|
+
"href",
|
|
595
|
+
"target",
|
|
596
|
+
"disabled"
|
|
592
597
|
];
|
|
593
|
-
const
|
|
594
|
-
name: iconProps.name,
|
|
595
|
-
size: iconProps.size
|
|
596
|
-
}) : null;
|
|
598
|
+
const isIconProps = (icon) => typeof icon === "object" && icon !== null && "name" in icon && !react.default.isValidElement(icon);
|
|
597
599
|
const IconOnlyLabel = ({ labelText }) => {
|
|
598
600
|
if (!labelText) return null;
|
|
599
601
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -601,26 +603,80 @@ const IconOnlyLabel = ({ labelText }) => {
|
|
|
601
603
|
children: labelText.replace(/^./, (c) => c.toUpperCase())
|
|
602
604
|
});
|
|
603
605
|
};
|
|
604
|
-
const Button = (
|
|
605
|
-
|
|
606
|
+
const Button = react.default.forwardRef((props, ref) => {
|
|
607
|
+
const { variant = "primary", isBlock, icon, iconSize = "default", iconOnly, iconLeft, text, children, className } = props, rest = _objectWithoutProperties(props, _excluded$70);
|
|
606
608
|
const classes = cn("kern-btn", isBlock && "kern-btn--block", `kern-btn--${variant}`, className);
|
|
607
|
-
|
|
608
|
-
if (
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
609
|
+
let iconElement = null;
|
|
610
|
+
if (icon && (typeof icon === "object" && "name" in icon && icon.name.length > 0 || react.default.isValidElement(icon))) {
|
|
611
|
+
if (isIconProps(icon)) iconElement = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
612
|
+
name: icon.name,
|
|
613
|
+
size: icon.size
|
|
614
|
+
});
|
|
615
|
+
else if (react.default.isValidElement(icon)) iconElement = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
616
|
+
className: cn("kern-icon", `kern-icon--${iconSize}`),
|
|
617
|
+
style: {
|
|
618
|
+
mask: "none",
|
|
619
|
+
WebkitMask: "none",
|
|
620
|
+
background: "none",
|
|
621
|
+
display: "inline-flex"
|
|
622
|
+
},
|
|
623
|
+
"aria-hidden": true,
|
|
624
|
+
children: icon
|
|
625
|
+
});
|
|
626
|
+
}
|
|
627
|
+
if ("as" in props && props.as === "a" && props.href) {
|
|
628
|
+
const _ref = rest, { href, target, disabled } = _ref, anchorRest = _objectWithoutProperties(_ref, _excluded2);
|
|
629
|
+
if (iconOnly) {
|
|
630
|
+
const labelText = text || (isIconProps(icon) ? icon.name : void 0);
|
|
631
|
+
const ariaDisabled = disabled ? {
|
|
632
|
+
"aria-disabled": true,
|
|
633
|
+
tabIndex: -1,
|
|
634
|
+
onClick: (e) => e.preventDefault(),
|
|
635
|
+
href: void 0
|
|
636
|
+
} : {};
|
|
637
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", _objectSpread2(_objectSpread2(_objectSpread2({
|
|
638
|
+
ref,
|
|
639
|
+
href,
|
|
640
|
+
target,
|
|
641
|
+
className: classes
|
|
642
|
+
}, anchorRest), ariaDisabled), {}, { children: [iconElement, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconOnlyLabel, { labelText })] }));
|
|
643
|
+
}
|
|
644
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", _objectSpread2(_objectSpread2({
|
|
645
|
+
ref,
|
|
646
|
+
href,
|
|
647
|
+
target,
|
|
648
|
+
className: classes
|
|
649
|
+
}, anchorRest), {}, { children: [
|
|
615
650
|
iconLeft && iconElement,
|
|
616
|
-
|
|
651
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
617
652
|
className: "kern-label",
|
|
618
653
|
children: children || text
|
|
619
654
|
}),
|
|
620
655
|
!iconLeft && iconElement
|
|
621
|
-
]
|
|
622
|
-
}
|
|
623
|
-
|
|
656
|
+
] }));
|
|
657
|
+
}
|
|
658
|
+
const buttonRest = rest;
|
|
659
|
+
if (iconOnly) {
|
|
660
|
+
const labelText = text || (isIconProps(icon) ? icon.name : void 0);
|
|
661
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", _objectSpread2(_objectSpread2({
|
|
662
|
+
ref,
|
|
663
|
+
type: "button",
|
|
664
|
+
className: classes
|
|
665
|
+
}, buttonRest), {}, { children: [iconElement, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconOnlyLabel, { labelText })] }));
|
|
666
|
+
}
|
|
667
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", _objectSpread2(_objectSpread2({
|
|
668
|
+
ref,
|
|
669
|
+
type: "button",
|
|
670
|
+
className: classes
|
|
671
|
+
}, buttonRest), {}, { children: [
|
|
672
|
+
iconLeft && iconElement,
|
|
673
|
+
text && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
674
|
+
className: "kern-label",
|
|
675
|
+
children: children || text
|
|
676
|
+
}),
|
|
677
|
+
!iconLeft && iconElement
|
|
678
|
+
] }));
|
|
679
|
+
});
|
|
624
680
|
Button.isInteractive = true;
|
|
625
681
|
|
|
626
682
|
//#endregion
|
|
@@ -634,9 +690,9 @@ const useDialogContext = () => {
|
|
|
634
690
|
|
|
635
691
|
//#endregion
|
|
636
692
|
//#region src/components/Dialog/Button.tsx
|
|
637
|
-
const _excluded$
|
|
693
|
+
const _excluded$69 = ["onClick", "title"];
|
|
638
694
|
const DialogButton = (_ref) => {
|
|
639
|
-
let { onClick, title } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
695
|
+
let { onClick, title } = _ref, props = _objectWithoutProperties(_ref, _excluded$69);
|
|
640
696
|
const { closeDialog } = useDialogContext();
|
|
641
697
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
642
698
|
text: title,
|
|
@@ -650,9 +706,9 @@ DialogButton.displayName = "Dialog.Button";
|
|
|
650
706
|
|
|
651
707
|
//#endregion
|
|
652
708
|
//#region src/components/Dialog/Content.tsx
|
|
653
|
-
const _excluded$
|
|
709
|
+
const _excluded$68 = ["className", "children"];
|
|
654
710
|
const DialogContent = (_ref) => {
|
|
655
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
711
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$68);
|
|
656
712
|
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
713
|
className: "kern-body",
|
|
658
714
|
children
|
|
@@ -662,9 +718,9 @@ DialogContent.displayName = "Dialog.Content";
|
|
|
662
718
|
|
|
663
719
|
//#endregion
|
|
664
720
|
//#region src/components/Dialog/Footer.tsx
|
|
665
|
-
const _excluded$
|
|
721
|
+
const _excluded$67 = ["className", "children"];
|
|
666
722
|
const DialogFooter = (_ref) => {
|
|
667
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
723
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$67);
|
|
668
724
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
669
725
|
className: cn("kern-dialog__footer", className),
|
|
670
726
|
children
|
|
@@ -674,14 +730,14 @@ DialogFooter.displayName = "Dialog.Footer";
|
|
|
674
730
|
|
|
675
731
|
//#endregion
|
|
676
732
|
//#region src/components/Dialog/Header.tsx
|
|
677
|
-
const _excluded$
|
|
733
|
+
const _excluded$66 = [
|
|
678
734
|
"dialogTitle",
|
|
679
735
|
"hasCloseButton",
|
|
680
736
|
"aria-label",
|
|
681
737
|
"className"
|
|
682
738
|
];
|
|
683
739
|
const DialogHeader = (_ref) => {
|
|
684
|
-
let { dialogTitle, hasCloseButton = true, "aria-label": ariaLabel = "Schließen", className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
740
|
+
let { dialogTitle, hasCloseButton = true, "aria-label": ariaLabel = "Schließen", className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$66);
|
|
685
741
|
const { closeDialog, id } = useDialogContext();
|
|
686
742
|
const headerClass = cn("kern-dialog__header", className);
|
|
687
743
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
@@ -709,9 +765,9 @@ DialogHeader.displayName = "Dialog.Header";
|
|
|
709
765
|
|
|
710
766
|
//#endregion
|
|
711
767
|
//#region src/components/Dialog/Modal.tsx
|
|
712
|
-
const _excluded$
|
|
768
|
+
const _excluded$65 = ["className", "children"];
|
|
713
769
|
const DialogModal = (_ref) => {
|
|
714
|
-
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
770
|
+
let { className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$65);
|
|
715
771
|
const { dialogRef, closeDialog, isOpen, disableOverlayClose, id } = useDialogContext();
|
|
716
772
|
const handleOverlayClick = (e) => {
|
|
717
773
|
if (disableOverlayClose && e.target === dialogRef.current) e.preventDefault();
|
|
@@ -764,13 +820,13 @@ DialogModal.displayName = "Dialog.Modal";
|
|
|
764
820
|
|
|
765
821
|
//#endregion
|
|
766
822
|
//#region src/components/Dialog/Root.tsx
|
|
767
|
-
const _excluded$
|
|
823
|
+
const _excluded$64 = [
|
|
768
824
|
"disableOverlayClose",
|
|
769
825
|
"children",
|
|
770
826
|
"id"
|
|
771
827
|
];
|
|
772
828
|
const DialogRoot = (_ref) => {
|
|
773
|
-
let { disableOverlayClose = false, children, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
829
|
+
let { disableOverlayClose = false, children, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$64);
|
|
774
830
|
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
775
831
|
const dialogRef = (0, react.useRef)(null);
|
|
776
832
|
const openDialog = () => {
|
|
@@ -857,13 +913,13 @@ FieldsetContent.displayName = "Fieldset.Content";
|
|
|
857
913
|
|
|
858
914
|
//#endregion
|
|
859
915
|
//#region src/components/Fieldset/Error.tsx
|
|
860
|
-
const _excluded$
|
|
916
|
+
const _excluded$63 = [
|
|
861
917
|
"children",
|
|
862
918
|
"className",
|
|
863
919
|
"id"
|
|
864
920
|
];
|
|
865
921
|
const FieldsetError = (_ref) => {
|
|
866
|
-
let { children, className, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
922
|
+
let { children, className, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$63);
|
|
867
923
|
const errorId = id || `error-${Math.random().toString(36).substr(2, 9)}`;
|
|
868
924
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
869
925
|
className: cn(`kern-error`, className),
|
|
@@ -882,13 +938,13 @@ FieldsetError.displayName = "Fieldset.Error";
|
|
|
882
938
|
|
|
883
939
|
//#endregion
|
|
884
940
|
//#region src/components/Fieldset/Hint.tsx
|
|
885
|
-
const _excluded$
|
|
941
|
+
const _excluded$62 = [
|
|
886
942
|
"children",
|
|
887
943
|
"className",
|
|
888
944
|
"id"
|
|
889
945
|
];
|
|
890
946
|
const FieldsetHint = (_ref) => {
|
|
891
|
-
let { children, className, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
947
|
+
let { children, className, id } = _ref, rest = _objectWithoutProperties(_ref, _excluded$62);
|
|
892
948
|
const hintId = id || `hint-${Math.random().toString(36).substr(2, 9)}`;
|
|
893
949
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
894
950
|
className: cn(`kern-hint`, className),
|
|
@@ -900,9 +956,9 @@ FieldsetHint.displayName = "Fieldset.Hint";
|
|
|
900
956
|
|
|
901
957
|
//#endregion
|
|
902
958
|
//#region src/components/Fieldset/Legend.tsx
|
|
903
|
-
const _excluded$
|
|
959
|
+
const _excluded$61 = ["children", "hasOptionalLabel"];
|
|
904
960
|
const FieldsetLegend = (_ref) => {
|
|
905
|
-
let { children, hasOptionalLabel } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
961
|
+
let { children, hasOptionalLabel } = _ref, rest = _objectWithoutProperties(_ref, _excluded$61);
|
|
906
962
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("legend", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
907
963
|
className: cn(`kern-label`, rest.className),
|
|
908
964
|
children: [children, hasOptionalLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -915,9 +971,9 @@ FieldsetLegend.displayName = "Fieldset.Legend";
|
|
|
915
971
|
|
|
916
972
|
//#endregion
|
|
917
973
|
//#region src/components/Input/Primitives/Checkbox/CheckboxInput.tsx
|
|
918
|
-
const _excluded$
|
|
974
|
+
const _excluded$60 = ["erroneous", "required"];
|
|
919
975
|
const CheckboxInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
920
|
-
let { erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
976
|
+
let { erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$60);
|
|
921
977
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
922
978
|
ref,
|
|
923
979
|
type: "checkbox",
|
|
@@ -928,13 +984,13 @@ const CheckboxInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
928
984
|
|
|
929
985
|
//#endregion
|
|
930
986
|
//#region src/components/Input/Primitives/Email/EmailInput.tsx
|
|
931
|
-
const _excluded$
|
|
987
|
+
const _excluded$59 = [
|
|
932
988
|
"erroneous",
|
|
933
989
|
"autoComplete",
|
|
934
990
|
"required"
|
|
935
991
|
];
|
|
936
992
|
const EmailInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
937
|
-
let { erroneous = false, autoComplete = "email", required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
993
|
+
let { erroneous = false, autoComplete = "email", required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$59);
|
|
938
994
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
939
995
|
ref,
|
|
940
996
|
required,
|
|
@@ -946,9 +1002,9 @@ const EmailInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
946
1002
|
|
|
947
1003
|
//#endregion
|
|
948
1004
|
//#region src/components/Input/Primitives/Error.tsx
|
|
949
|
-
const _excluded$
|
|
1005
|
+
const _excluded$58 = ["className", "message"];
|
|
950
1006
|
const InputError = (_ref) => {
|
|
951
|
-
let { className, message } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
1007
|
+
let { className, message } = _ref, props = _objectWithoutProperties(_ref, _excluded$58);
|
|
952
1008
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", _objectSpread2(_objectSpread2({
|
|
953
1009
|
className: cn("kern-error", className),
|
|
954
1010
|
role: "alert"
|
|
@@ -960,14 +1016,14 @@ const InputError = (_ref) => {
|
|
|
960
1016
|
|
|
961
1017
|
//#endregion
|
|
962
1018
|
//#region src/components/Input/Primitives/File/FileInput.tsx
|
|
963
|
-
const _excluded$
|
|
1019
|
+
const _excluded$57 = [
|
|
964
1020
|
"supportedFormats",
|
|
965
1021
|
"erroneous",
|
|
966
1022
|
"required"
|
|
967
1023
|
];
|
|
968
1024
|
const FileInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
969
1025
|
var _rest$accept;
|
|
970
|
-
let { supportedFormats = [], erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1026
|
+
let { supportedFormats = [], erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$57);
|
|
971
1027
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
972
1028
|
ref,
|
|
973
1029
|
type: "file",
|
|
@@ -979,15 +1035,15 @@ const FileInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
979
1035
|
|
|
980
1036
|
//#endregion
|
|
981
1037
|
//#region src/components/Input/Primitives/Hint.tsx
|
|
982
|
-
const _excluded$
|
|
1038
|
+
const _excluded$56 = ["className", "children"];
|
|
983
1039
|
const Hint = (_ref) => {
|
|
984
|
-
let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
1040
|
+
let { className, children } = _ref, props = _objectWithoutProperties(_ref, _excluded$56);
|
|
985
1041
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({ className: cn("kern-hint", className) }, props), {}, { children }));
|
|
986
1042
|
};
|
|
987
1043
|
|
|
988
1044
|
//#endregion
|
|
989
1045
|
//#region src/components/Label/Label.tsx
|
|
990
|
-
const _excluded$
|
|
1046
|
+
const _excluded$55 = [
|
|
991
1047
|
"variant",
|
|
992
1048
|
"textWrapper",
|
|
993
1049
|
"className",
|
|
@@ -995,7 +1051,7 @@ const _excluded$56 = [
|
|
|
995
1051
|
"text"
|
|
996
1052
|
];
|
|
997
1053
|
const Label = (_ref) => {
|
|
998
|
-
let { variant = "default", textWrapper = "label", className, children, text } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1054
|
+
let { variant = "default", textWrapper = "label", className, children, text } = _ref, rest = _objectWithoutProperties(_ref, _excluded$55);
|
|
999
1055
|
const Wrapper = textWrapper;
|
|
1000
1056
|
const labelClass = cn("kern-label", variant ? `kern-label--${variant}` : "", className, className);
|
|
1001
1057
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Wrapper, _objectSpread2(_objectSpread2({ className: labelClass }, rest), {}, { children: text || children }));
|
|
@@ -1003,9 +1059,9 @@ const Label = (_ref) => {
|
|
|
1003
1059
|
|
|
1004
1060
|
//#endregion
|
|
1005
1061
|
//#region src/components/Input/Primitives/Label.tsx
|
|
1006
|
-
const _excluded$
|
|
1062
|
+
const _excluded$54 = ["children", "isOptional"];
|
|
1007
1063
|
const Label$1 = (_ref) => {
|
|
1008
|
-
let { children, isOptional } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
1064
|
+
let { children, isOptional } = _ref, props = _objectWithoutProperties(_ref, _excluded$54);
|
|
1009
1065
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Label, _objectSpread2(_objectSpread2({ textWrapper: "label" }, props), {}, { children: [children, isOptional && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1010
1066
|
className: "kern-label__optional",
|
|
1011
1067
|
children: "– Optional"
|
|
@@ -1014,13 +1070,13 @@ const Label$1 = (_ref) => {
|
|
|
1014
1070
|
|
|
1015
1071
|
//#endregion
|
|
1016
1072
|
//#region src/components/Input/Primitives/Password/PasswordInput.tsx
|
|
1017
|
-
const _excluded$
|
|
1073
|
+
const _excluded$53 = [
|
|
1018
1074
|
"erroneous",
|
|
1019
1075
|
"required",
|
|
1020
1076
|
"autoComplete"
|
|
1021
1077
|
];
|
|
1022
1078
|
const PasswordInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1023
|
-
let { erroneous = false, required, autoComplete = "password" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1079
|
+
let { erroneous = false, required, autoComplete = "password" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$53);
|
|
1024
1080
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1025
1081
|
ref,
|
|
1026
1082
|
type: "password",
|
|
@@ -1032,13 +1088,13 @@ const PasswordInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1032
1088
|
|
|
1033
1089
|
//#endregion
|
|
1034
1090
|
//#region src/components/Input/Primitives/Radio/RadioInput.tsx
|
|
1035
|
-
const _excluded$
|
|
1091
|
+
const _excluded$52 = [
|
|
1036
1092
|
"erroneous",
|
|
1037
1093
|
"required",
|
|
1038
1094
|
"autoComplete"
|
|
1039
1095
|
];
|
|
1040
1096
|
const RadioInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1041
|
-
let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1097
|
+
let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$52);
|
|
1042
1098
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1043
1099
|
ref,
|
|
1044
1100
|
type: "radio",
|
|
@@ -1050,22 +1106,22 @@ const RadioInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1050
1106
|
|
|
1051
1107
|
//#endregion
|
|
1052
1108
|
//#region src/components/Input/Primitives/Root.tsx
|
|
1053
|
-
const _excluded$
|
|
1109
|
+
const _excluded$51 = ["className", "erroneous"];
|
|
1054
1110
|
const Root = (_ref) => {
|
|
1055
|
-
let { className, erroneous } = _ref, props = _objectWithoutProperties(_ref, _excluded$
|
|
1111
|
+
let { className, erroneous } = _ref, props = _objectWithoutProperties(_ref, _excluded$51);
|
|
1056
1112
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2({ className: cn("kern-form-input", erroneous && "kern-form-input--error", className) }, props));
|
|
1057
1113
|
};
|
|
1058
1114
|
|
|
1059
1115
|
//#endregion
|
|
1060
1116
|
//#region src/components/Input/Primitives/Select/SelectInput.tsx
|
|
1061
|
-
const _excluded$
|
|
1117
|
+
const _excluded$50 = [
|
|
1062
1118
|
"erroneous",
|
|
1063
1119
|
"required",
|
|
1064
1120
|
"autoComplete",
|
|
1065
1121
|
"options"
|
|
1066
1122
|
];
|
|
1067
1123
|
const SelectInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1068
|
-
let { erroneous = false, required, autoComplete = "", options = [] } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1124
|
+
let { erroneous = false, required, autoComplete = "", options = [] } = _ref, rest = _objectWithoutProperties(_ref, _excluded$50);
|
|
1069
1125
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1070
1126
|
className: "kern-form-input__select-wrapper",
|
|
1071
1127
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
@@ -1083,9 +1139,9 @@ const SelectInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1083
1139
|
|
|
1084
1140
|
//#endregion
|
|
1085
1141
|
//#region src/components/Input/Primitives/Tel/TelInput.tsx
|
|
1086
|
-
const _excluded$
|
|
1142
|
+
const _excluded$49 = ["erroneous", "required"];
|
|
1087
1143
|
const TelInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1088
|
-
let { erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1144
|
+
let { erroneous = false, required } = _ref, rest = _objectWithoutProperties(_ref, _excluded$49);
|
|
1089
1145
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1090
1146
|
ref,
|
|
1091
1147
|
required,
|
|
@@ -1098,13 +1154,13 @@ const TelInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1098
1154
|
|
|
1099
1155
|
//#endregion
|
|
1100
1156
|
//#region src/components/Input/Primitives/Text/TextInput.tsx
|
|
1101
|
-
const _excluded$
|
|
1157
|
+
const _excluded$48 = [
|
|
1102
1158
|
"erroneous",
|
|
1103
1159
|
"required",
|
|
1104
1160
|
"autoComplete"
|
|
1105
1161
|
];
|
|
1106
1162
|
const TextInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1107
|
-
let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1163
|
+
let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$48);
|
|
1108
1164
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1109
1165
|
ref,
|
|
1110
1166
|
type: "text",
|
|
@@ -1116,13 +1172,13 @@ const TextInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1116
1172
|
|
|
1117
1173
|
//#endregion
|
|
1118
1174
|
//#region src/components/Input/Primitives/Textarea/TextareaInput.tsx
|
|
1119
|
-
const _excluded$
|
|
1175
|
+
const _excluded$47 = [
|
|
1120
1176
|
"erroneous",
|
|
1121
1177
|
"required",
|
|
1122
1178
|
"autoComplete"
|
|
1123
1179
|
];
|
|
1124
1180
|
const TextareaInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1125
|
-
let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1181
|
+
let { erroneous = false, required, autoComplete } = _ref, rest = _objectWithoutProperties(_ref, _excluded$47);
|
|
1126
1182
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1127
1183
|
ref,
|
|
1128
1184
|
required,
|
|
@@ -1133,13 +1189,13 @@ const TextareaInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
|
1133
1189
|
|
|
1134
1190
|
//#endregion
|
|
1135
1191
|
//#region src/components/Input/Primitives/Url/UrlInput.tsx
|
|
1136
|
-
const _excluded$
|
|
1192
|
+
const _excluded$46 = [
|
|
1137
1193
|
"erroneous",
|
|
1138
1194
|
"required",
|
|
1139
1195
|
"autoComplete"
|
|
1140
1196
|
];
|
|
1141
1197
|
const UrlInput$1 = (0, react.forwardRef)((_ref, ref) => {
|
|
1142
|
-
let { erroneous = false, required, autoComplete = "url" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1198
|
+
let { erroneous = false, required, autoComplete = "url" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$46);
|
|
1143
1199
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1144
1200
|
required,
|
|
1145
1201
|
autoComplete,
|
|
@@ -1171,7 +1227,7 @@ var Primitives_exports = /* @__PURE__ */ __export({
|
|
|
1171
1227
|
|
|
1172
1228
|
//#endregion
|
|
1173
1229
|
//#region src/components/Input/Checkbox/index.tsx
|
|
1174
|
-
const _excluded$
|
|
1230
|
+
const _excluded$45 = [
|
|
1175
1231
|
"id",
|
|
1176
1232
|
"error",
|
|
1177
1233
|
"disabled",
|
|
@@ -1181,7 +1237,7 @@ const _excluded$46 = [
|
|
|
1181
1237
|
"style"
|
|
1182
1238
|
];
|
|
1183
1239
|
const CheckboxInput = (_ref) => {
|
|
1184
|
-
let { id, error = false, disabled = false, hasOptionalLabel = false, label, className, style } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1240
|
+
let { id, error = false, disabled = false, hasOptionalLabel = false, label, className, style } = _ref, rest = _objectWithoutProperties(_ref, _excluded$45);
|
|
1185
1241
|
const isErrorString = typeof error === "string";
|
|
1186
1242
|
const errorId = `${id}-error`;
|
|
1187
1243
|
const describedBy = rest["aria-describedby"] ? [rest["aria-describedby"]] : [];
|
|
@@ -1228,7 +1284,6 @@ const FieldsetRoot = ({ children, id, className, style, error = false }) => {
|
|
|
1228
1284
|
className: cn(`kern-fieldset`, error && "kern-fieldset--error", className),
|
|
1229
1285
|
style,
|
|
1230
1286
|
id,
|
|
1231
|
-
role: "group",
|
|
1232
1287
|
"aria-describedby": hintText,
|
|
1233
1288
|
children
|
|
1234
1289
|
});
|
|
@@ -1247,7 +1302,7 @@ var Fieldset_exports = /* @__PURE__ */ __export({
|
|
|
1247
1302
|
|
|
1248
1303
|
//#endregion
|
|
1249
1304
|
//#region src/components/Grid/Column.tsx
|
|
1250
|
-
const _excluded$
|
|
1305
|
+
const _excluded$44 = [
|
|
1251
1306
|
"children",
|
|
1252
1307
|
"breakpoint",
|
|
1253
1308
|
"width",
|
|
@@ -1257,7 +1312,7 @@ const _excluded$45 = [
|
|
|
1257
1312
|
"className"
|
|
1258
1313
|
];
|
|
1259
1314
|
const GridColumn = (_ref) => {
|
|
1260
|
-
let { children, breakpoint, width, isOffset, offsetWidth, alignItem, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1315
|
+
let { children, breakpoint, width, isOffset, offsetWidth, alignItem, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$44);
|
|
1261
1316
|
const classes = cn(...[
|
|
1262
1317
|
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
1318
|
alignItem ? `kern-align-self-${alignItem}` : "",
|
|
@@ -1272,13 +1327,13 @@ GridColumn.displayName = "Grid.Column";
|
|
|
1272
1327
|
|
|
1273
1328
|
//#endregion
|
|
1274
1329
|
//#region src/components/Grid/Root.tsx
|
|
1275
|
-
const _excluded$
|
|
1330
|
+
const _excluded$43 = [
|
|
1276
1331
|
"type",
|
|
1277
1332
|
"className",
|
|
1278
1333
|
"children"
|
|
1279
1334
|
];
|
|
1280
1335
|
const GridRoot = (_ref) => {
|
|
1281
|
-
let { type, className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1336
|
+
let { type, className, children } = _ref, rest = _objectWithoutProperties(_ref, _excluded$43);
|
|
1282
1337
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1283
1338
|
className: cn(type ? `kern-container-${type}` : "kern-container", className),
|
|
1284
1339
|
children
|
|
@@ -1288,14 +1343,14 @@ GridRoot.displayName = "Grid.Root";
|
|
|
1288
1343
|
|
|
1289
1344
|
//#endregion
|
|
1290
1345
|
//#region src/components/Grid/Row.tsx
|
|
1291
|
-
const _excluded$
|
|
1346
|
+
const _excluded$42 = [
|
|
1292
1347
|
"children",
|
|
1293
1348
|
"alignItems",
|
|
1294
1349
|
"horizontalAlignment",
|
|
1295
1350
|
"className"
|
|
1296
1351
|
];
|
|
1297
1352
|
const GridRow = (_ref) => {
|
|
1298
|
-
let { children, alignItems, horizontalAlignment, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1353
|
+
let { children, alignItems, horizontalAlignment, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$42);
|
|
1299
1354
|
const rowClasses = cn("kern-row", alignItems && `kern-align-items-${alignItems}`, horizontalAlignment && `kern-justify-content-${horizontalAlignment}`, className);
|
|
1300
1355
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1301
1356
|
className: rowClasses,
|
|
@@ -1314,16 +1369,17 @@ var Grid_exports = /* @__PURE__ */ __export({
|
|
|
1314
1369
|
|
|
1315
1370
|
//#endregion
|
|
1316
1371
|
//#region src/components/Lists/Root.tsx
|
|
1317
|
-
const _excluded$
|
|
1372
|
+
const _excluded$41 = [
|
|
1318
1373
|
"children",
|
|
1319
1374
|
"className",
|
|
1320
1375
|
"size",
|
|
1321
|
-
"type"
|
|
1376
|
+
"type",
|
|
1377
|
+
"horizontal"
|
|
1322
1378
|
];
|
|
1323
1379
|
const ListsRoot = (_ref) => {
|
|
1324
|
-
let { children, className, size = "default", type = "bullet" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1380
|
+
let { children, className, size = "default", type = "bullet", horizontal = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$41);
|
|
1325
1381
|
const Component = type === "number" ? "ol" : "ul";
|
|
1326
|
-
const listClasses = cn("kern-list", size !== "default" && `kern-list--${size}`, type && `kern-list--${type}`, className);
|
|
1382
|
+
const listClasses = cn("kern-list", size !== "default" && `kern-list--${size}`, type && `kern-list--${type}`, horizontal && "kern-list--horizontal", className);
|
|
1327
1383
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Component, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1328
1384
|
className: listClasses,
|
|
1329
1385
|
children
|
|
@@ -1342,13 +1398,13 @@ ListsItem.displayName = "Lists.Item";
|
|
|
1342
1398
|
|
|
1343
1399
|
//#endregion
|
|
1344
1400
|
//#region src/components/Lists/Bullet.tsx
|
|
1345
|
-
const _excluded$
|
|
1401
|
+
const _excluded$40 = [
|
|
1346
1402
|
"title",
|
|
1347
1403
|
"items",
|
|
1348
1404
|
"className"
|
|
1349
1405
|
];
|
|
1350
1406
|
const ListsBullet = (_ref) => {
|
|
1351
|
-
let { title, items, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1407
|
+
let { title, items, className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$40);
|
|
1352
1408
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1353
1409
|
className: cn(className),
|
|
1354
1410
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -1364,14 +1420,14 @@ ListsBullet.displayName = "Lists.Bullet";
|
|
|
1364
1420
|
|
|
1365
1421
|
//#endregion
|
|
1366
1422
|
//#region src/components/Lists/Number.tsx
|
|
1367
|
-
const _excluded$
|
|
1423
|
+
const _excluded$39 = [
|
|
1368
1424
|
"children",
|
|
1369
1425
|
"className",
|
|
1370
1426
|
"size",
|
|
1371
1427
|
"type"
|
|
1372
1428
|
];
|
|
1373
1429
|
const ListsNumber = (_ref) => {
|
|
1374
|
-
let { children, className, size = "default", type } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1430
|
+
let { children, className, size = "default", type } = _ref, rest = _objectWithoutProperties(_ref, _excluded$39);
|
|
1375
1431
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1376
1432
|
className: cn("kern-list", size && `kern-list--${size}`, type && `kern-list--${type}`, className),
|
|
1377
1433
|
children
|
|
@@ -1390,7 +1446,7 @@ var Lists_exports = /* @__PURE__ */ __export({
|
|
|
1390
1446
|
|
|
1391
1447
|
//#endregion
|
|
1392
1448
|
//#region src/components/Progress/Root.tsx
|
|
1393
|
-
const _excluded$
|
|
1449
|
+
const _excluded$38 = [
|
|
1394
1450
|
"value",
|
|
1395
1451
|
"max",
|
|
1396
1452
|
"className",
|
|
@@ -1404,7 +1460,7 @@ const useProgressContext = () => {
|
|
|
1404
1460
|
return context;
|
|
1405
1461
|
};
|
|
1406
1462
|
const ProgressRoot = (_ref) => {
|
|
1407
|
-
let { value = 0, max = 100, className, children, progressId: propProgressId } = _ref, rest = _objectWithoutProperties(_ref, _excluded$
|
|
1463
|
+
let { value = 0, max = 100, className, children, progressId: propProgressId } = _ref, rest = _objectWithoutProperties(_ref, _excluded$38);
|
|
1408
1464
|
const percentage = Math.round(value / max * 100);
|
|
1409
1465
|
const progressId = react.default.useMemo(() => propProgressId || `progress-${Math.random().toString(36).slice(2, 11)}`, [propProgressId]);
|
|
1410
1466
|
const contextValue = {
|
|
@@ -1425,39 +1481,19 @@ ProgressRoot.displayName = "Progress.Root";
|
|
|
1425
1481
|
|
|
1426
1482
|
//#endregion
|
|
1427
1483
|
//#region src/components/Progress/Bar.tsx
|
|
1428
|
-
const _excluded$
|
|
1484
|
+
const _excluded$37 = ["className"];
|
|
1429
1485
|
const ProgressBar = (_ref) => {
|
|
1430
|
-
let { className
|
|
1486
|
+
let { className } = _ref, rest = _objectWithoutProperties(_ref, _excluded$37);
|
|
1431
1487
|
const { value, max, progressId } = useProgressContext();
|
|
1432
1488
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("progress", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1433
1489
|
id: progressId,
|
|
1490
|
+
className,
|
|
1434
1491
|
value,
|
|
1435
|
-
|
|
1436
|
-
max,
|
|
1437
|
-
className
|
|
1492
|
+
max
|
|
1438
1493
|
}));
|
|
1439
1494
|
};
|
|
1440
1495
|
ProgressBar.displayName = "Progress.Bar";
|
|
1441
1496
|
|
|
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
1497
|
//#endregion
|
|
1462
1498
|
//#region src/components/Progress/Header.tsx
|
|
1463
1499
|
const ProgressHeader = ({ className, style, children }) => {
|
|
@@ -1488,27 +1524,12 @@ const ProgressLabel = (_ref) => {
|
|
|
1488
1524
|
};
|
|
1489
1525
|
ProgressLabel.displayName = "Progress.Label";
|
|
1490
1526
|
|
|
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
1527
|
//#endregion
|
|
1505
1528
|
//#region src/components/Progress/index.ts
|
|
1506
1529
|
var Progress_exports = /* @__PURE__ */ __export({
|
|
1507
1530
|
Bar: () => ProgressBar,
|
|
1508
|
-
Cancel: () => ProgressCancel,
|
|
1509
1531
|
Header: () => ProgressHeader,
|
|
1510
1532
|
Label: () => ProgressLabel,
|
|
1511
|
-
Percentage: () => ProgressPercentage,
|
|
1512
1533
|
Root: () => ProgressRoot
|
|
1513
1534
|
});
|
|
1514
1535
|
|
|
@@ -1942,23 +1963,39 @@ const _excluded$18 = [
|
|
|
1942
1963
|
"variant",
|
|
1943
1964
|
"className",
|
|
1944
1965
|
"icon",
|
|
1966
|
+
"iconSize",
|
|
1945
1967
|
"showIcon"
|
|
1946
1968
|
];
|
|
1947
1969
|
const Badge = (_ref) => {
|
|
1948
|
-
let { title, variant, className, icon, showIcon = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
1970
|
+
let { title, variant, className, icon, iconSize = "default", showIcon = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
1971
|
+
const customIconElement = icon ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1972
|
+
className: cn("kern-icon", `kern-icon--${iconSize}`),
|
|
1973
|
+
style: {
|
|
1974
|
+
mask: "none",
|
|
1975
|
+
WebkitMask: "none",
|
|
1976
|
+
background: "none",
|
|
1977
|
+
display: "inline-flex"
|
|
1978
|
+
},
|
|
1979
|
+
"aria-hidden": true,
|
|
1980
|
+
children: icon
|
|
1981
|
+
}) : null;
|
|
1949
1982
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1950
1983
|
role: "status",
|
|
1951
1984
|
className: cn(`kern-badge kern-badge--${variant}`, className),
|
|
1952
|
-
children: [
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1985
|
+
children: [
|
|
1986
|
+
customIconElement,
|
|
1987
|
+
!icon && showIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, {
|
|
1988
|
+
"aria-hidden": true,
|
|
1989
|
+
name: variant
|
|
1990
|
+
}),
|
|
1991
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
1992
|
+
className: "kern-label kern-label-small",
|
|
1993
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1994
|
+
className: "kern-label kern-sr-only",
|
|
1995
|
+
children: variant.replace(/^./, (c) => c.toUpperCase())
|
|
1996
|
+
}), title]
|
|
1997
|
+
})
|
|
1998
|
+
]
|
|
1962
1999
|
}));
|
|
1963
2000
|
};
|
|
1964
2001
|
|
|
@@ -2509,6 +2546,16 @@ const Kopfzeile = (_ref) => {
|
|
|
2509
2546
|
})), customStyle] });
|
|
2510
2547
|
};
|
|
2511
2548
|
|
|
2549
|
+
//#endregion
|
|
2550
|
+
//#region src/components/LinkButton/LinkButton.tsx
|
|
2551
|
+
const LinkButton = (props) => {
|
|
2552
|
+
if (!props.href) {
|
|
2553
|
+
console.error("href ist für LinkButton erforderlich");
|
|
2554
|
+
return null;
|
|
2555
|
+
}
|
|
2556
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, _objectSpread2({ as: "a" }, props));
|
|
2557
|
+
};
|
|
2558
|
+
|
|
2512
2559
|
//#endregion
|
|
2513
2560
|
//#region src/components/Loader/Loader.tsx
|
|
2514
2561
|
const _excluded$3 = [
|
|
@@ -2675,6 +2722,7 @@ exports.InputPrimitive = InputPrimitive;
|
|
|
2675
2722
|
exports.Kopfzeile = Kopfzeile;
|
|
2676
2723
|
exports.Label = Label;
|
|
2677
2724
|
exports.Link = Link;
|
|
2725
|
+
exports.LinkButton = LinkButton;
|
|
2678
2726
|
exports.Lists = Lists;
|
|
2679
2727
|
exports.Loader = Loader;
|
|
2680
2728
|
exports.NumberInput = NumberInput;
|