@publicplan/kern-react-kit 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +120 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +24 -0
- package/dist/index.d.cts +31 -9
- package/dist/index.d.ts +54 -32
- package/dist/index.js +120 -38
- 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.css
CHANGED
|
@@ -92,3 +92,27 @@
|
|
|
92
92
|
font-size: inherit;
|
|
93
93
|
line-height: inherit;
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
.kern-btn > .kern-icon {
|
|
97
|
+
color: var(--kern-color-action-default, #1A3DA5);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.kern-btn--primary > .kern-icon {
|
|
101
|
+
color: var(--kern-color-action-on-default, #FFF);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.kern-badge--info .kern-icon {
|
|
105
|
+
color: var(--kern-color-feedback-info, #006490);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.kern-badge--success .kern-icon {
|
|
109
|
+
color: var(--kern-color-feedback-success, #006B51);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.kern-badge--warning .kern-icon {
|
|
113
|
+
color: var(--kern-color-feedback-warning, #8A4F00);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.kern-badge--danger .kern-icon {
|
|
117
|
+
color: var(--kern-color-feedback-danger, #BD0F09);
|
|
118
|
+
}
|
package/dist/index.d.cts
CHANGED
|
@@ -395,6 +395,7 @@ interface ListsRootProps extends Omit<React.ComponentPropsWithoutRef<'ol' | 'ul'
|
|
|
395
395
|
style?: React.CSSProperties;
|
|
396
396
|
size?: 'default' | 'large' | 'small';
|
|
397
397
|
type?: 'bullet' | 'number' | 'link';
|
|
398
|
+
horizontal?: boolean;
|
|
398
399
|
}
|
|
399
400
|
declare const ListsRoot: React.FC<ListsRootProps>;
|
|
400
401
|
//#endregion
|
|
@@ -590,13 +591,14 @@ interface TaskListRootProps extends React.ComponentPropsWithoutRef<'div'> {}
|
|
|
590
591
|
declare const TaskListRoot: React.FC<TaskListRootProps>;
|
|
591
592
|
//#endregion
|
|
592
593
|
//#region src/components/Badge/Badge.d.ts
|
|
593
|
-
interface BadgeProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
594
|
+
interface BadgeProps extends React$1.ComponentPropsWithoutRef<'span'> {
|
|
594
595
|
variant: 'info' | 'success' | 'warning' | 'danger';
|
|
595
596
|
title: string;
|
|
596
|
-
icon?:
|
|
597
|
+
icon?: React$1.ReactNode;
|
|
598
|
+
iconSize?: 'small' | 'default' | 'large' | 'x-large';
|
|
597
599
|
showIcon?: boolean;
|
|
598
600
|
}
|
|
599
|
-
declare const Badge: React.FC<BadgeProps>;
|
|
601
|
+
declare const Badge: React$1.FC<BadgeProps>;
|
|
600
602
|
//#endregion
|
|
601
603
|
//#region src/components/Body/Body.d.ts
|
|
602
604
|
interface BodyProps extends Omit<React.ComponentPropsWithoutRef<'p'>, 'text'> {
|
|
@@ -609,16 +611,32 @@ interface BodyProps extends Omit<React.ComponentPropsWithoutRef<'p'>, 'text'> {
|
|
|
609
611
|
declare const Body: React.FC<BodyProps>;
|
|
610
612
|
//#endregion
|
|
611
613
|
//#region src/components/Button/Button.d.ts
|
|
612
|
-
|
|
614
|
+
type CommonProps = {
|
|
613
615
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
614
616
|
isBlock?: boolean;
|
|
615
|
-
icon?: IconProps;
|
|
617
|
+
icon?: IconProps | React$1.ReactNode;
|
|
618
|
+
iconSize?: 'small' | 'default' | 'large' | 'x-large';
|
|
616
619
|
iconOnly?: boolean;
|
|
617
620
|
iconLeft?: boolean;
|
|
618
621
|
text?: string | null;
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
+
children?: React$1.ReactNode;
|
|
623
|
+
className?: string;
|
|
624
|
+
};
|
|
625
|
+
type ButtonAsButton = CommonProps & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'className'> & {
|
|
626
|
+
type: 'button' | 'submit' | 'reset';
|
|
627
|
+
as?: 'button';
|
|
628
|
+
href?: never;
|
|
629
|
+
target?: never;
|
|
630
|
+
};
|
|
631
|
+
type ButtonAsAnchor = CommonProps & Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'type' | 'className'> & {
|
|
632
|
+
as: 'a';
|
|
633
|
+
type?: never;
|
|
634
|
+
href: string;
|
|
635
|
+
target?: '_self' | '_blank';
|
|
636
|
+
disabled?: boolean;
|
|
637
|
+
};
|
|
638
|
+
type ButtonProps = ButtonAsButton | ButtonAsAnchor;
|
|
639
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
622
640
|
//#endregion
|
|
623
641
|
//#region src/components/Divider/Divider.d.ts
|
|
624
642
|
declare const Divider: React.FC<React.ComponentPropsWithoutRef<'hr'>>;
|
|
@@ -759,6 +777,10 @@ interface KopfzeileProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
759
777
|
}
|
|
760
778
|
declare const Kopfzeile: React.FC<KopfzeileProps>;
|
|
761
779
|
//#endregion
|
|
780
|
+
//#region src/components/LinkButton/LinkButton.d.ts
|
|
781
|
+
type LinkButtonProps = Omit<ButtonAsAnchor, 'as'>;
|
|
782
|
+
declare const LinkButton: React$1.FC<LinkButtonProps>;
|
|
783
|
+
//#endregion
|
|
762
784
|
//#region src/components/Loader/Loader.d.ts
|
|
763
785
|
interface LoaderProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'role' | 'aria-atomic'> {
|
|
764
786
|
visible?: boolean;
|
|
@@ -1090,5 +1112,5 @@ declare const Progress: react11.FC<ProgressRootProps> & typeof index_d_exports$9
|
|
|
1090
1112
|
declare const Summary: react11.FC<SummaryProps> & typeof index_d_exports$10;
|
|
1091
1113
|
declare const TaskList: react11.FC<TaskListRootProps> & typeof index_d_exports$12;
|
|
1092
1114
|
//#endregion
|
|
1093
|
-
export { Accordion, type AccordionContentProps, type AccordionGroupProps, type AccordionRootProps, type AccordionSummaryProps, Alert, type AlertBodyProps, type AlertHeaderProps, type AlertRootProps, Badge, type BadgeProps, Body, Button, type ButtonProps, Card, type CardBodyProps, type CardContainerProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardPrelineProps, type CardRootProps, type CardSublineProps, type CardTitleProps, CheckboxInput, type CheckboxInputProps, DateInput, type DateInputProps, DescriptionList, type DescriptionListItemProps, type DescriptionListKeyProps, type DescriptionListRootProps, type DescriptionListValueProps, Dialog, type DialogButtonProps, type DialogContentProps, type DialogFooterProps, type DialogHeaderProps, type DialogModalProps, type DialogRootProps, type DialogTriggerProps, Divider, EmailInput, type EmailInputProps, Fieldset, type FieldsetContentProps, type FieldsetErrorProps, type FieldsetHintProps, type FieldsetLegendProps, type FieldsetRootProps, FileInput, type FileInputProps, Grid, type GridColumnProps, type GridRootProps, type GridRowProps, Heading, Icon, type IconProps, type InputErrorProps, type HintProps as InputHintProps, type LabelProps as InputLabelProps, InputPrimitive, type RootProps as InputRootProps, Kopfzeile, type KopfzeileProps, Label, type LabelProps$1 as LabelProps, Link, type LinkProps, Lists, type ListsBulletProps, type ListsItemProps, type ListsNumberProps, type ListsRootProps, Loader, type LoaderProps, NumberInput, type NumberInputProps, PasswordInput, type PasswordInputProps, Preline, type PrelineProps, Progress, type ProgressBarProps, type ProgressHeaderProps, type ProgressLabelProps, type ProgressRootProps, RadioInput, type RadioInputProps, SelectInput, type SelectInputProps, Subline, type SublineProps, Summary, type SummaryActionsProps, type SummaryBodyProps, type SummaryGroupHeadingProps, type SummaryGroupProps, type SummaryHeadingProps, type SummaryProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableFooterProps, type TableHeaderProps, type TableRootProps, type TableRowProps, TaskList, type TaskListHeadingProps, type TaskListItemProps, type TaskListProps, type TaskListRootProps, TelInput, type TelInputProps, TextInput, type TextInputProps, TextareaInput, type TextareaInputProps, type Theme, ThemeProvider, type ThemeProviderProps, Title, type TitleProps, UrlInput, type UrlInputProps };
|
|
1115
|
+
export { Accordion, type AccordionContentProps, type AccordionGroupProps, type AccordionRootProps, type AccordionSummaryProps, Alert, type AlertBodyProps, type AlertHeaderProps, type AlertRootProps, Badge, type BadgeProps, Body, Button, type ButtonProps, Card, type CardBodyProps, type CardContainerProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardPrelineProps, type CardRootProps, type CardSublineProps, type CardTitleProps, CheckboxInput, type CheckboxInputProps, DateInput, type DateInputProps, DescriptionList, type DescriptionListItemProps, type DescriptionListKeyProps, type DescriptionListRootProps, type DescriptionListValueProps, Dialog, type DialogButtonProps, type DialogContentProps, type DialogFooterProps, type DialogHeaderProps, type DialogModalProps, type DialogRootProps, type DialogTriggerProps, Divider, EmailInput, type EmailInputProps, Fieldset, type FieldsetContentProps, type FieldsetErrorProps, type FieldsetHintProps, type FieldsetLegendProps, type FieldsetRootProps, FileInput, type FileInputProps, Grid, type GridColumnProps, type GridRootProps, type GridRowProps, Heading, Icon, type IconProps, type InputErrorProps, type HintProps as InputHintProps, type LabelProps as InputLabelProps, InputPrimitive, type RootProps as InputRootProps, Kopfzeile, type KopfzeileProps, Label, type LabelProps$1 as LabelProps, Link, LinkButton, type LinkProps, Lists, type ListsBulletProps, type ListsItemProps, type ListsNumberProps, type ListsRootProps, Loader, type LoaderProps, NumberInput, type NumberInputProps, PasswordInput, type PasswordInputProps, Preline, type PrelineProps, Progress, type ProgressBarProps, type ProgressHeaderProps, type ProgressLabelProps, type ProgressRootProps, RadioInput, type RadioInputProps, SelectInput, type SelectInputProps, Subline, type SublineProps, Summary, type SummaryActionsProps, type SummaryBodyProps, type SummaryGroupHeadingProps, type SummaryGroupProps, type SummaryHeadingProps, type SummaryProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableFooterProps, type TableHeaderProps, type TableRootProps, type TableRowProps, TaskList, type TaskListHeadingProps, type TaskListItemProps, type TaskListProps, type TaskListRootProps, TelInput, type TelInputProps, TextInput, type TextInputProps, TextareaInput, type TextareaInputProps, type Theme, ThemeProvider, type ThemeProviderProps, Title, type TitleProps, UrlInput, type UrlInputProps };
|
|
1094
1116
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react13 from "react";
|
|
3
3
|
import React$1 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Accordion/Content.d.ts
|
|
@@ -271,13 +271,13 @@ declare const GridRow: React$1.FC<GridRowProps>;
|
|
|
271
271
|
interface CheckboxInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type' | 'aria-describedby'> {
|
|
272
272
|
erroneous?: boolean;
|
|
273
273
|
}
|
|
274
|
-
declare const CheckboxInput$1:
|
|
274
|
+
declare const CheckboxInput$1: react13.ForwardRefExoticComponent<CheckboxInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region src/components/Input/Primitives/Email/EmailInput.d.ts
|
|
277
277
|
interface EmailInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type'> {
|
|
278
278
|
erroneous?: boolean;
|
|
279
279
|
}
|
|
280
|
-
declare const EmailInput$1:
|
|
280
|
+
declare const EmailInput$1: react13.ForwardRefExoticComponent<EmailInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
281
281
|
//#endregion
|
|
282
282
|
//#region src/components/Input/Primitives/Error.d.ts
|
|
283
283
|
interface InputErrorProps extends Omit<React.ComponentPropsWithoutRef<'p'>, 'role'> {
|
|
@@ -297,7 +297,7 @@ interface FileInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>,
|
|
|
297
297
|
supportedFormats?: (FileExtension | MimeType)[];
|
|
298
298
|
erroneous?: boolean;
|
|
299
299
|
}
|
|
300
|
-
declare const FileInput$1:
|
|
300
|
+
declare const FileInput$1: react13.ForwardRefExoticComponent<FileInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region src/components/Input/Primitives/Hint.d.ts
|
|
303
303
|
interface HintProps extends React.ComponentPropsWithoutRef<'p'> {
|
|
@@ -333,13 +333,13 @@ declare const Label$1: ({
|
|
|
333
333
|
interface PasswordInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type'> {
|
|
334
334
|
erroneous?: boolean;
|
|
335
335
|
}
|
|
336
|
-
declare const PasswordInput$1:
|
|
336
|
+
declare const PasswordInput$1: react13.ForwardRefExoticComponent<PasswordInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
337
337
|
//#endregion
|
|
338
338
|
//#region src/components/Input/Primitives/Radio/RadioInput.d.ts
|
|
339
339
|
interface RadioInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type' | 'aria-describedby'> {
|
|
340
340
|
erroneous?: boolean;
|
|
341
341
|
}
|
|
342
|
-
declare const RadioInput$1:
|
|
342
|
+
declare const RadioInput$1: react13.ForwardRefExoticComponent<RadioInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/components/Input/Primitives/Root.d.ts
|
|
345
345
|
interface RootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -360,31 +360,31 @@ interface SelectInputProps$1 extends React.ComponentPropsWithoutRef<'select'> {
|
|
|
360
360
|
label: string;
|
|
361
361
|
}>;
|
|
362
362
|
}
|
|
363
|
-
declare const SelectInput$1:
|
|
363
|
+
declare const SelectInput$1: react13.ForwardRefExoticComponent<SelectInputProps$1 & react13.RefAttributes<HTMLSelectElement>>;
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/components/Input/Primitives/Tel/TelInput.d.ts
|
|
366
366
|
interface TelInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type' | 'autoComplete'> {
|
|
367
367
|
erroneous?: boolean;
|
|
368
368
|
}
|
|
369
|
-
declare const TelInput$1:
|
|
369
|
+
declare const TelInput$1: react13.ForwardRefExoticComponent<TelInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/components/Input/Primitives/Text/TextInput.d.ts
|
|
372
372
|
interface TextInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type'> {
|
|
373
373
|
erroneous?: boolean;
|
|
374
374
|
}
|
|
375
|
-
declare const TextInput$1:
|
|
375
|
+
declare const TextInput$1: react13.ForwardRefExoticComponent<TextInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/components/Input/Primitives/Textarea/TextareaInput.d.ts
|
|
378
378
|
interface TextareaInputProps$1 extends React.ComponentPropsWithoutRef<'textarea'> {
|
|
379
379
|
erroneous?: boolean;
|
|
380
380
|
}
|
|
381
|
-
declare const TextareaInput$1:
|
|
381
|
+
declare const TextareaInput$1: react13.ForwardRefExoticComponent<TextareaInputProps$1 & react13.RefAttributes<HTMLTextAreaElement>>;
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region src/components/Input/Primitives/Url/UrlInput.d.ts
|
|
384
384
|
interface UrlInputProps$1 extends Omit<React.ComponentPropsWithoutRef<'input'>, 'type'> {
|
|
385
385
|
erroneous?: boolean;
|
|
386
386
|
}
|
|
387
|
-
declare const UrlInput$1:
|
|
387
|
+
declare const UrlInput$1: react13.ForwardRefExoticComponent<UrlInputProps$1 & react13.RefAttributes<HTMLInputElement>>;
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/components/Lists/Root.d.ts
|
|
390
390
|
interface ListsRootProps extends Omit<React.ComponentPropsWithoutRef<'ol' | 'ul'>, 'type'> {
|
|
@@ -393,6 +393,7 @@ interface ListsRootProps extends Omit<React.ComponentPropsWithoutRef<'ol' | 'ul'
|
|
|
393
393
|
style?: React.CSSProperties;
|
|
394
394
|
size?: 'default' | 'large' | 'small';
|
|
395
395
|
type?: 'bullet' | 'number' | 'link';
|
|
396
|
+
horizontal?: boolean;
|
|
396
397
|
}
|
|
397
398
|
declare const ListsRoot: React.FC<ListsRootProps>;
|
|
398
399
|
//#endregion
|
|
@@ -588,13 +589,14 @@ interface TaskListRootProps extends React.ComponentPropsWithoutRef<'div'> {}
|
|
|
588
589
|
declare const TaskListRoot: React.FC<TaskListRootProps>;
|
|
589
590
|
//#endregion
|
|
590
591
|
//#region src/components/Badge/Badge.d.ts
|
|
591
|
-
interface BadgeProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
592
|
+
interface BadgeProps extends React$1.ComponentPropsWithoutRef<'span'> {
|
|
592
593
|
variant: 'info' | 'success' | 'warning' | 'danger';
|
|
593
594
|
title: string;
|
|
594
|
-
icon?:
|
|
595
|
+
icon?: React$1.ReactNode;
|
|
596
|
+
iconSize?: 'small' | 'default' | 'large' | 'x-large';
|
|
595
597
|
showIcon?: boolean;
|
|
596
598
|
}
|
|
597
|
-
declare const Badge: React.FC<BadgeProps>;
|
|
599
|
+
declare const Badge: React$1.FC<BadgeProps>;
|
|
598
600
|
//#endregion
|
|
599
601
|
//#region src/components/Body/Body.d.ts
|
|
600
602
|
interface BodyProps extends Omit<React.ComponentPropsWithoutRef<'p'>, 'text'> {
|
|
@@ -607,16 +609,32 @@ interface BodyProps extends Omit<React.ComponentPropsWithoutRef<'p'>, 'text'> {
|
|
|
607
609
|
declare const Body: React.FC<BodyProps>;
|
|
608
610
|
//#endregion
|
|
609
611
|
//#region src/components/Button/Button.d.ts
|
|
610
|
-
|
|
612
|
+
type CommonProps = {
|
|
611
613
|
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
612
614
|
isBlock?: boolean;
|
|
613
|
-
icon?: IconProps;
|
|
615
|
+
icon?: IconProps | React$1.ReactNode;
|
|
616
|
+
iconSize?: 'small' | 'default' | 'large' | 'x-large';
|
|
614
617
|
iconOnly?: boolean;
|
|
615
618
|
iconLeft?: boolean;
|
|
616
619
|
text?: string | null;
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
+
children?: React$1.ReactNode;
|
|
621
|
+
className?: string;
|
|
622
|
+
};
|
|
623
|
+
type ButtonAsButton = CommonProps & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, 'className'> & {
|
|
624
|
+
type: 'button' | 'submit' | 'reset';
|
|
625
|
+
as?: 'button';
|
|
626
|
+
href?: never;
|
|
627
|
+
target?: never;
|
|
628
|
+
};
|
|
629
|
+
type ButtonAsAnchor = CommonProps & Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, 'type' | 'className'> & {
|
|
630
|
+
as: 'a';
|
|
631
|
+
type?: never;
|
|
632
|
+
href: string;
|
|
633
|
+
target?: '_self' | '_blank';
|
|
634
|
+
disabled?: boolean;
|
|
635
|
+
};
|
|
636
|
+
type ButtonProps = ButtonAsButton | ButtonAsAnchor;
|
|
637
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
620
638
|
//#endregion
|
|
621
639
|
//#region src/components/Divider/Divider.d.ts
|
|
622
640
|
declare const Divider: React.FC<React.ComponentPropsWithoutRef<'hr'>>;
|
|
@@ -757,6 +775,10 @@ interface KopfzeileProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
757
775
|
}
|
|
758
776
|
declare const Kopfzeile: React.FC<KopfzeileProps>;
|
|
759
777
|
//#endregion
|
|
778
|
+
//#region src/components/LinkButton/LinkButton.d.ts
|
|
779
|
+
type LinkButtonProps = Omit<ButtonAsAnchor, 'as'>;
|
|
780
|
+
declare const LinkButton: React$1.FC<LinkButtonProps>;
|
|
781
|
+
//#endregion
|
|
760
782
|
//#region src/components/Loader/Loader.d.ts
|
|
761
783
|
interface LoaderProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'role' | 'aria-atomic'> {
|
|
762
784
|
visible?: boolean;
|
|
@@ -1070,23 +1092,23 @@ declare const ThemeProvider: ({
|
|
|
1070
1092
|
}: ThemeProviderProps) => react_jsx_runtime0.JSX.Element;
|
|
1071
1093
|
//#endregion
|
|
1072
1094
|
//#region src/index.d.ts
|
|
1073
|
-
declare const Accordion:
|
|
1074
|
-
declare const Alert:
|
|
1075
|
-
declare const Card:
|
|
1076
|
-
declare const DescriptionList:
|
|
1077
|
-
declare const Dialog:
|
|
1078
|
-
declare const Fieldset:
|
|
1079
|
-
declare const Grid:
|
|
1095
|
+
declare const Accordion: react13.FC<AccordionRootProps> & typeof index_d_exports;
|
|
1096
|
+
declare const Alert: react13.FC<AlertRootProps> & typeof index_d_exports$1;
|
|
1097
|
+
declare const Card: react13.FC<CardRootProps> & typeof index_d_exports$2;
|
|
1098
|
+
declare const DescriptionList: react13.FC<DescriptionListRootProps> & typeof index_d_exports$3;
|
|
1099
|
+
declare const Dialog: react13.FC<DialogRootProps> & typeof index_d_exports$4;
|
|
1100
|
+
declare const Fieldset: react13.FC<FieldsetRootProps> & typeof index_d_exports$5;
|
|
1101
|
+
declare const Grid: react13.FC<GridRootProps> & typeof index_d_exports$6;
|
|
1080
1102
|
declare const InputPrimitive: (({
|
|
1081
1103
|
className,
|
|
1082
1104
|
erroneous,
|
|
1083
1105
|
...props
|
|
1084
1106
|
}: RootProps) => react_jsx_runtime0.JSX.Element) & typeof index_d_exports$7;
|
|
1085
|
-
declare const Lists:
|
|
1086
|
-
declare const Table:
|
|
1087
|
-
declare const Progress:
|
|
1088
|
-
declare const Summary:
|
|
1089
|
-
declare const TaskList:
|
|
1107
|
+
declare const Lists: react13.FC<ListsRootProps> & typeof index_d_exports$8;
|
|
1108
|
+
declare const Table: react13.FC<TableRootProps> & typeof index_d_exports$11;
|
|
1109
|
+
declare const Progress: react13.FC<ProgressRootProps> & typeof index_d_exports$9;
|
|
1110
|
+
declare const Summary: react13.FC<SummaryProps> & typeof index_d_exports$10;
|
|
1111
|
+
declare const TaskList: react13.FC<TaskListRootProps> & typeof index_d_exports$12;
|
|
1090
1112
|
//#endregion
|
|
1091
|
-
export { Accordion, type AccordionContentProps, type AccordionGroupProps, type AccordionRootProps, type AccordionSummaryProps, Alert, type AlertBodyProps, type AlertHeaderProps, type AlertRootProps, Badge, type BadgeProps, Body, Button, type ButtonProps, Card, type CardBodyProps, type CardContainerProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardPrelineProps, type CardRootProps, type CardSublineProps, type CardTitleProps, CheckboxInput, type CheckboxInputProps, DateInput, type DateInputProps, DescriptionList, type DescriptionListItemProps, type DescriptionListKeyProps, type DescriptionListRootProps, type DescriptionListValueProps, Dialog, type DialogButtonProps, type DialogContentProps, type DialogFooterProps, type DialogHeaderProps, type DialogModalProps, type DialogRootProps, type DialogTriggerProps, Divider, EmailInput, type EmailInputProps, Fieldset, type FieldsetContentProps, type FieldsetErrorProps, type FieldsetHintProps, type FieldsetLegendProps, type FieldsetRootProps, FileInput, type FileInputProps, Grid, type GridColumnProps, type GridRootProps, type GridRowProps, Heading, Icon, type IconProps, type InputErrorProps, type HintProps as InputHintProps, type LabelProps as InputLabelProps, InputPrimitive, type RootProps as InputRootProps, Kopfzeile, type KopfzeileProps, Label, type LabelProps$1 as LabelProps, Link, type LinkProps, Lists, type ListsBulletProps, type ListsItemProps, type ListsNumberProps, type ListsRootProps, Loader, type LoaderProps, NumberInput, type NumberInputProps, PasswordInput, type PasswordInputProps, Preline, type PrelineProps, Progress, type ProgressBarProps, type ProgressHeaderProps, type ProgressLabelProps, type ProgressRootProps, RadioInput, type RadioInputProps, SelectInput, type SelectInputProps, Subline, type SublineProps, Summary, type SummaryActionsProps, type SummaryBodyProps, type SummaryGroupHeadingProps, type SummaryGroupProps, type SummaryHeadingProps, type SummaryProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableFooterProps, type TableHeaderProps, type TableRootProps, type TableRowProps, TaskList, type TaskListHeadingProps, type TaskListItemProps, type TaskListProps, type TaskListRootProps, TelInput, type TelInputProps, TextInput, type TextInputProps, TextareaInput, type TextareaInputProps, type Theme, ThemeProvider, type ThemeProviderProps, Title, type TitleProps, UrlInput, type UrlInputProps };
|
|
1113
|
+
export { Accordion, type AccordionContentProps, type AccordionGroupProps, type AccordionRootProps, type AccordionSummaryProps, Alert, type AlertBodyProps, type AlertHeaderProps, type AlertRootProps, Badge, type BadgeProps, Body, Button, type ButtonProps, Card, type CardBodyProps, type CardContainerProps, type CardFooterProps, type CardHeaderProps, type CardMediaProps, type CardPrelineProps, type CardRootProps, type CardSublineProps, type CardTitleProps, CheckboxInput, type CheckboxInputProps, DateInput, type DateInputProps, DescriptionList, type DescriptionListItemProps, type DescriptionListKeyProps, type DescriptionListRootProps, type DescriptionListValueProps, Dialog, type DialogButtonProps, type DialogContentProps, type DialogFooterProps, type DialogHeaderProps, type DialogModalProps, type DialogRootProps, type DialogTriggerProps, Divider, EmailInput, type EmailInputProps, Fieldset, type FieldsetContentProps, type FieldsetErrorProps, type FieldsetHintProps, type FieldsetLegendProps, type FieldsetRootProps, FileInput, type FileInputProps, Grid, type GridColumnProps, type GridRootProps, type GridRowProps, Heading, Icon, type IconProps, type InputErrorProps, type HintProps as InputHintProps, type LabelProps as InputLabelProps, InputPrimitive, type RootProps as InputRootProps, Kopfzeile, type KopfzeileProps, Label, type LabelProps$1 as LabelProps, Link, LinkButton, type LinkProps, Lists, type ListsBulletProps, type ListsItemProps, type ListsNumberProps, type ListsRootProps, Loader, type LoaderProps, NumberInput, type NumberInputProps, PasswordInput, type PasswordInputProps, Preline, type PrelineProps, Progress, type ProgressBarProps, type ProgressHeaderProps, type ProgressLabelProps, type ProgressRootProps, RadioInput, type RadioInputProps, SelectInput, type SelectInputProps, Subline, type SublineProps, Summary, type SummaryActionsProps, type SummaryBodyProps, type SummaryGroupHeadingProps, type SummaryGroupProps, type SummaryHeadingProps, type SummaryProps, Table, type TableBodyProps, type TableCellProps, type TableColumnProps, type TableFooterProps, type TableHeaderProps, type TableRootProps, type TableRowProps, TaskList, type TaskListHeadingProps, type TaskListItemProps, type TaskListProps, type TaskListRootProps, TelInput, type TelInputProps, TextInput, type TextInputProps, TextareaInput, type TextareaInputProps, type Theme, ThemeProvider, type ThemeProviderProps, Title, type TitleProps, UrlInput, type UrlInputProps };
|
|
1092
1114
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -267,7 +267,7 @@ const _excluded$86 = [
|
|
|
267
267
|
"isStretched",
|
|
268
268
|
"className"
|
|
269
269
|
];
|
|
270
|
-
const getIcon
|
|
270
|
+
const getIcon = (iconProps) => iconProps ? /* @__PURE__ */ jsx(Icon, {
|
|
271
271
|
name: iconProps.name,
|
|
272
272
|
size: iconProps.size
|
|
273
273
|
}) : null;
|
|
@@ -279,9 +279,9 @@ const Link = (_ref) => {
|
|
|
279
279
|
className: linkClass,
|
|
280
280
|
target: (icon === null || icon === void 0 ? void 0 : icon.name) === "open-in-new" ? "_blank" : target,
|
|
281
281
|
children: [
|
|
282
|
-
iconLeft && getIcon
|
|
282
|
+
iconLeft && getIcon(icon),
|
|
283
283
|
linkText,
|
|
284
|
-
!iconLeft && getIcon
|
|
284
|
+
!iconLeft && getIcon(icon)
|
|
285
285
|
]
|
|
286
286
|
}));
|
|
287
287
|
};
|
|
@@ -552,16 +552,18 @@ const _excluded$70 = [
|
|
|
552
552
|
"variant",
|
|
553
553
|
"isBlock",
|
|
554
554
|
"icon",
|
|
555
|
+
"iconSize",
|
|
555
556
|
"iconOnly",
|
|
556
557
|
"iconLeft",
|
|
557
558
|
"text",
|
|
558
559
|
"children",
|
|
559
560
|
"className"
|
|
560
|
-
]
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
561
|
+
], _excluded2 = [
|
|
562
|
+
"href",
|
|
563
|
+
"target",
|
|
564
|
+
"disabled"
|
|
565
|
+
], _excluded3 = ["type"];
|
|
566
|
+
const isIconProps = (icon) => typeof icon === "object" && icon !== null && "name" in icon && !React.isValidElement(icon);
|
|
565
567
|
const IconOnlyLabel = ({ labelText }) => {
|
|
566
568
|
if (!labelText) return null;
|
|
567
569
|
return /* @__PURE__ */ jsx("span", {
|
|
@@ -569,26 +571,80 @@ const IconOnlyLabel = ({ labelText }) => {
|
|
|
569
571
|
children: labelText.replace(/^./, (c) => c.toUpperCase())
|
|
570
572
|
});
|
|
571
573
|
};
|
|
572
|
-
const Button = (
|
|
573
|
-
|
|
574
|
+
const Button = React.forwardRef((props, ref) => {
|
|
575
|
+
const { variant = "primary", isBlock, icon, iconSize = "default", iconOnly, iconLeft, text, children, className } = props, rest = _objectWithoutProperties(props, _excluded$70);
|
|
574
576
|
const classes = cn("kern-btn", isBlock && "kern-btn--block", `kern-btn--${variant}`, className);
|
|
575
|
-
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
577
|
+
let iconElement = null;
|
|
578
|
+
if (icon && (typeof icon === "object" && "name" in icon && icon.name.length > 0 || React.isValidElement(icon))) {
|
|
579
|
+
if (isIconProps(icon)) iconElement = /* @__PURE__ */ jsx(Icon, {
|
|
580
|
+
name: icon.name,
|
|
581
|
+
size: icon.size
|
|
582
|
+
});
|
|
583
|
+
else if (React.isValidElement(icon)) iconElement = /* @__PURE__ */ jsx("span", {
|
|
584
|
+
className: cn("kern-icon", `kern-icon--${iconSize}`),
|
|
585
|
+
style: {
|
|
586
|
+
mask: "none",
|
|
587
|
+
WebkitMask: "none",
|
|
588
|
+
background: "none",
|
|
589
|
+
display: "inline-flex"
|
|
590
|
+
},
|
|
591
|
+
"aria-hidden": true,
|
|
592
|
+
children: icon
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
if ("as" in props && props.as === "a" && props.href) {
|
|
596
|
+
const _ref = rest, { href, target, disabled } = _ref, anchorRest = _objectWithoutProperties(_ref, _excluded2);
|
|
597
|
+
if (iconOnly) {
|
|
598
|
+
const labelText = text || (isIconProps(icon) ? icon.name : void 0);
|
|
599
|
+
const ariaDisabled = disabled ? {
|
|
600
|
+
"aria-disabled": true,
|
|
601
|
+
tabIndex: -1,
|
|
602
|
+
onClick: (e) => e.preventDefault(),
|
|
603
|
+
href: void 0
|
|
604
|
+
} : {};
|
|
605
|
+
return /* @__PURE__ */ jsxs("a", _objectSpread2(_objectSpread2(_objectSpread2({
|
|
606
|
+
ref,
|
|
607
|
+
href,
|
|
608
|
+
target,
|
|
609
|
+
className: classes
|
|
610
|
+
}, anchorRest), ariaDisabled), {}, { children: [iconElement, /* @__PURE__ */ jsx(IconOnlyLabel, { labelText })] }));
|
|
611
|
+
}
|
|
612
|
+
return /* @__PURE__ */ jsxs("a", _objectSpread2(_objectSpread2({
|
|
613
|
+
ref,
|
|
614
|
+
href,
|
|
615
|
+
target,
|
|
616
|
+
className: classes
|
|
617
|
+
}, anchorRest), {}, { children: [
|
|
583
618
|
iconLeft && iconElement,
|
|
584
|
-
|
|
619
|
+
/* @__PURE__ */ jsx("span", {
|
|
585
620
|
className: "kern-label",
|
|
586
621
|
children: children || text
|
|
587
622
|
}),
|
|
588
623
|
!iconLeft && iconElement
|
|
589
|
-
]
|
|
590
|
-
}
|
|
591
|
-
};
|
|
624
|
+
] }));
|
|
625
|
+
}
|
|
626
|
+
const _ref2 = rest, { type } = _ref2, buttonRest = _objectWithoutProperties(_ref2, _excluded3);
|
|
627
|
+
if (iconOnly) {
|
|
628
|
+
const labelText = text || (isIconProps(icon) ? icon.name : void 0);
|
|
629
|
+
return /* @__PURE__ */ jsxs("button", _objectSpread2(_objectSpread2({
|
|
630
|
+
ref,
|
|
631
|
+
className: classes,
|
|
632
|
+
type
|
|
633
|
+
}, buttonRest), {}, { children: [iconElement, /* @__PURE__ */ jsx(IconOnlyLabel, { labelText })] }));
|
|
634
|
+
}
|
|
635
|
+
return /* @__PURE__ */ jsxs("button", _objectSpread2(_objectSpread2({
|
|
636
|
+
ref,
|
|
637
|
+
className: classes,
|
|
638
|
+
type
|
|
639
|
+
}, buttonRest), {}, { children: [
|
|
640
|
+
iconLeft && iconElement,
|
|
641
|
+
text && /* @__PURE__ */ jsx("span", {
|
|
642
|
+
className: "kern-label",
|
|
643
|
+
children: children || text
|
|
644
|
+
}),
|
|
645
|
+
!iconLeft && iconElement
|
|
646
|
+
] }));
|
|
647
|
+
});
|
|
592
648
|
Button.isInteractive = true;
|
|
593
649
|
|
|
594
650
|
//#endregion
|
|
@@ -1196,7 +1252,6 @@ const FieldsetRoot = ({ children, id, className, style, error = false }) => {
|
|
|
1196
1252
|
className: cn(`kern-fieldset`, error && "kern-fieldset--error", className),
|
|
1197
1253
|
style,
|
|
1198
1254
|
id,
|
|
1199
|
-
role: "group",
|
|
1200
1255
|
"aria-describedby": hintText,
|
|
1201
1256
|
children
|
|
1202
1257
|
});
|
|
@@ -1286,12 +1341,13 @@ const _excluded$41 = [
|
|
|
1286
1341
|
"children",
|
|
1287
1342
|
"className",
|
|
1288
1343
|
"size",
|
|
1289
|
-
"type"
|
|
1344
|
+
"type",
|
|
1345
|
+
"horizontal"
|
|
1290
1346
|
];
|
|
1291
1347
|
const ListsRoot = (_ref) => {
|
|
1292
|
-
let { children, className, size = "default", type = "bullet" } = _ref, rest = _objectWithoutProperties(_ref, _excluded$41);
|
|
1348
|
+
let { children, className, size = "default", type = "bullet", horizontal = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$41);
|
|
1293
1349
|
const Component = type === "number" ? "ol" : "ul";
|
|
1294
|
-
const listClasses = cn("kern-list", size !== "default" && `kern-list--${size}`, type && `kern-list--${type}`, className);
|
|
1350
|
+
const listClasses = cn("kern-list", size !== "default" && `kern-list--${size}`, type && `kern-list--${type}`, horizontal && "kern-list--horizontal", className);
|
|
1295
1351
|
return /* @__PURE__ */ jsx(Component, _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1296
1352
|
className: listClasses,
|
|
1297
1353
|
children
|
|
@@ -1875,23 +1931,39 @@ const _excluded$18 = [
|
|
|
1875
1931
|
"variant",
|
|
1876
1932
|
"className",
|
|
1877
1933
|
"icon",
|
|
1934
|
+
"iconSize",
|
|
1878
1935
|
"showIcon"
|
|
1879
1936
|
];
|
|
1880
1937
|
const Badge = (_ref) => {
|
|
1881
|
-
let { title, variant, className, icon, showIcon = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
1938
|
+
let { title, variant, className, icon, iconSize = "default", showIcon = false } = _ref, rest = _objectWithoutProperties(_ref, _excluded$18);
|
|
1939
|
+
const customIconElement = icon ? /* @__PURE__ */ jsx("span", {
|
|
1940
|
+
className: cn("kern-icon", `kern-icon--${iconSize}`),
|
|
1941
|
+
style: {
|
|
1942
|
+
mask: "none",
|
|
1943
|
+
WebkitMask: "none",
|
|
1944
|
+
background: "none",
|
|
1945
|
+
display: "inline-flex"
|
|
1946
|
+
},
|
|
1947
|
+
"aria-hidden": true,
|
|
1948
|
+
children: icon
|
|
1949
|
+
}) : null;
|
|
1882
1950
|
return /* @__PURE__ */ jsxs("span", _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1883
1951
|
role: "status",
|
|
1884
1952
|
className: cn(`kern-badge kern-badge--${variant}`, className),
|
|
1885
|
-
children: [
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1953
|
+
children: [
|
|
1954
|
+
customIconElement,
|
|
1955
|
+
!icon && showIcon && /* @__PURE__ */ jsx(Icon, {
|
|
1956
|
+
"aria-hidden": true,
|
|
1957
|
+
name: variant
|
|
1958
|
+
}),
|
|
1959
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1960
|
+
className: "kern-label kern-label-small",
|
|
1961
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1962
|
+
className: "kern-label kern-sr-only",
|
|
1963
|
+
children: variant.replace(/^./, (c) => c.toUpperCase())
|
|
1964
|
+
}), title]
|
|
1965
|
+
})
|
|
1966
|
+
]
|
|
1895
1967
|
}));
|
|
1896
1968
|
};
|
|
1897
1969
|
|
|
@@ -2442,6 +2514,16 @@ const Kopfzeile = (_ref) => {
|
|
|
2442
2514
|
})), customStyle] });
|
|
2443
2515
|
};
|
|
2444
2516
|
|
|
2517
|
+
//#endregion
|
|
2518
|
+
//#region src/components/LinkButton/LinkButton.tsx
|
|
2519
|
+
const LinkButton = (props) => {
|
|
2520
|
+
if (!props.href) {
|
|
2521
|
+
console.error("href ist für LinkButton erforderlich");
|
|
2522
|
+
return null;
|
|
2523
|
+
}
|
|
2524
|
+
return /* @__PURE__ */ jsx(Button, _objectSpread2({ as: "a" }, props));
|
|
2525
|
+
};
|
|
2526
|
+
|
|
2445
2527
|
//#endregion
|
|
2446
2528
|
//#region src/components/Loader/Loader.tsx
|
|
2447
2529
|
const _excluded$3 = [
|
|
@@ -2587,5 +2669,5 @@ const Summary = Object.assign(SummaryRoot, Summary_exports);
|
|
|
2587
2669
|
const TaskList = Object.assign(TaskListRoot, TaskList_exports);
|
|
2588
2670
|
|
|
2589
2671
|
//#endregion
|
|
2590
|
-
export { Accordion, Alert, Badge, Body, Button, Card, CheckboxInput, DateInput, DescriptionList, Dialog, Divider, EmailInput, Fieldset, FileInput, Grid, Heading, Icon, InputPrimitive, Kopfzeile, Label, Link, Lists, Loader, NumberInput, PasswordInput, Preline, Progress, RadioInput, SelectInput, Subline, Summary, Table, TaskList, TelInput, TextInput, TextareaInput, ThemeProvider, Title, UrlInput };
|
|
2672
|
+
export { Accordion, Alert, Badge, Body, Button, Card, CheckboxInput, DateInput, DescriptionList, Dialog, Divider, EmailInput, Fieldset, FileInput, Grid, Heading, Icon, InputPrimitive, Kopfzeile, Label, Link, LinkButton, Lists, Loader, NumberInput, PasswordInput, Preline, Progress, RadioInput, SelectInput, Subline, Summary, Table, TaskList, TelInput, TextInput, TextareaInput, ThemeProvider, Title, UrlInput };
|
|
2591
2673
|
//# sourceMappingURL=index.js.map
|