@prokodo/ui 0.0.41 → 0.0.43
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/README.md +5 -2
- package/dist/components/accordion/Accordion.client.js +1 -1
- package/dist/components/animatedText/AnimatedText.client.js +4 -4
- package/dist/components/dialog/Dialog.client.js +9 -3
- package/dist/components/dialog/Dialog.module.scss.js +2 -0
- package/dist/components/dialog/Dialog.view.js +72 -57
- package/dist/components/dynamic-list/DynamicList.client.js +91 -0
- package/dist/components/dynamic-list/DynamicList.js +12 -0
- package/dist/components/dynamic-list/DynamicList.lazy.js +12 -0
- package/dist/components/dynamic-list/DynamicList.module.scss.js +20 -0
- package/dist/components/dynamic-list/DynamicList.server.js +15 -0
- package/dist/components/dynamic-list/DynamicList.view.js +128 -0
- package/dist/components/dynamic-list/index.js +4 -0
- package/dist/components/form/Form.client.js +4 -0
- package/dist/components/form/Form.server.js +2 -0
- package/dist/components/form/Form.view.js +2 -3
- package/dist/components/form/FormField.client.js +22 -1
- package/dist/components/form/FormField.server.js +3 -1
- package/dist/components/form/FormResponse.js +1 -0
- package/dist/components/label/Label.js +48 -38
- package/dist/components/list/List.js +11 -10
- package/dist/components/list/List.module.scss.js +1 -0
- package/dist/components/progressBar/ProgressBar.client.js +34 -0
- package/dist/components/progressBar/ProgressBar.js +13 -0
- package/dist/components/progressBar/ProgressBar.lazy.js +15 -0
- package/dist/components/progressBar/ProgressBar.module.scss.js +35 -0
- package/dist/components/progressBar/ProgressBar.server.js +11 -0
- package/dist/components/progressBar/ProgressBar.view.js +55 -0
- package/dist/components/progressBar/index.js +4 -0
- package/dist/components/select/Select.view.js +10 -1
- package/dist/components/sidenav/SideNav.client.js +22 -2
- package/dist/components/sidenav/SideNav.module.scss.js +1 -0
- package/dist/components/sidenav/SideNav.view.js +2 -2
- package/dist/components/snackbar/Snackbar.client.js +38 -0
- package/dist/components/snackbar/Snackbar.js +12 -0
- package/dist/components/snackbar/Snackbar.lazy.js +12 -0
- package/dist/components/snackbar/Snackbar.module.scss.js +30 -0
- package/dist/components/snackbar/Snackbar.server.js +12 -0
- package/dist/components/snackbar/Snackbar.view.js +55 -0
- package/dist/components/snackbar/SnackbarProvider.client.js +79 -0
- package/dist/components/snackbar/SnackbarProvider.context.js +11 -0
- package/dist/components/snackbar/SnackbarProvider.js +14 -0
- package/dist/components/snackbar/SnackbarProvider.lazy.js +15 -0
- package/dist/components/snackbar/index.js +10 -0
- package/dist/components/stepper/Stepper.view.js +5 -2
- package/dist/components/table/Table.js +9 -8
- package/dist/components/table/TableCell.js +4 -3
- package/dist/constants/project.js +1 -1
- package/dist/helpers/createIsland.js +8 -5
- package/dist/helpers/createLazyWrapper.js +13 -8
- package/dist/index.js +6 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/accordion/Accordion.d.ts +1 -1
- package/dist/types/components/accordion/Accordion.lazy.d.ts +1 -1
- package/dist/types/components/accordion/Accordion.model.d.ts +1 -1
- package/dist/types/components/dialog/Dialog.d.ts +1 -1
- package/dist/types/components/dialog/Dialog.lazy.d.ts +1 -1
- package/dist/types/components/dialog/Dialog.model.d.ts +7 -3
- package/dist/types/components/dialog/Dialog.view.d.ts +1 -1
- package/dist/types/components/dynamic-list/DynamicList.client.d.ts +4 -0
- package/dist/types/components/dynamic-list/DynamicList.d.ts +4 -0
- package/dist/types/components/dynamic-list/DynamicList.lazy.d.ts +5 -0
- package/dist/types/components/dynamic-list/DynamicList.model.d.ts +32 -0
- package/dist/types/components/dynamic-list/DynamicList.server.d.ts +3 -0
- package/dist/types/components/dynamic-list/DynamicList.view.d.ts +12 -0
- package/dist/types/components/dynamic-list/index.d.ts +2 -0
- package/dist/types/components/form/Form.d.ts +1 -1
- package/dist/types/components/form/Form.lazy.d.ts +1 -1
- package/dist/types/components/form/Form.model.d.ts +9 -5
- package/dist/types/components/form/index.d.ts +1 -2
- package/dist/types/components/label/Label.model.d.ts +9 -2
- package/dist/types/components/link/Link.model.d.ts +2 -2
- package/dist/types/components/list/List.model.d.ts +11 -5
- package/dist/types/components/progressBar/ProgressBar.client.d.ts +3 -0
- package/dist/types/components/progressBar/ProgressBar.d.ts +12 -0
- package/dist/types/components/progressBar/ProgressBar.lazy.d.ts +13 -0
- package/dist/types/components/progressBar/ProgressBar.model.d.ts +14 -0
- package/dist/types/components/progressBar/ProgressBar.server.d.ts +3 -0
- package/dist/types/components/progressBar/ProgressBar.view.d.ts +3 -0
- package/dist/types/components/progressBar/index.d.ts +2 -0
- package/dist/types/components/select/Select.model.d.ts +3 -2
- package/dist/types/components/sidenav/SideNav.client.d.ts +1 -1
- package/dist/types/components/sidenav/SideNav.model.d.ts +2 -0
- package/dist/types/components/snackbar/Snackbar.client.d.ts +5 -0
- package/dist/types/components/snackbar/Snackbar.d.ts +4 -0
- package/dist/types/components/snackbar/Snackbar.lazy.d.ts +5 -0
- package/dist/types/components/snackbar/Snackbar.model.d.ts +20 -0
- package/dist/types/components/snackbar/Snackbar.server.d.ts +3 -0
- package/dist/types/components/snackbar/Snackbar.view.d.ts +7 -0
- package/dist/types/components/snackbar/SnackbarProvider.client.d.ts +4 -0
- package/dist/types/components/snackbar/SnackbarProvider.context.d.ts +6 -0
- package/dist/types/components/snackbar/SnackbarProvider.d.ts +3 -0
- package/dist/types/components/snackbar/SnackbarProvider.lazy.d.ts +5 -0
- package/dist/types/components/snackbar/SnackbarProvider.model.d.ts +25 -0
- package/dist/types/components/snackbar/index.d.ts +6 -0
- package/dist/types/components/stepper/Stepper.model.d.ts +1 -1
- package/dist/types/components/table/Table.model.d.ts +3 -2
- package/dist/types/index.d.ts +3 -0
- package/dist/ui.css +745 -16
- package/package.json +14 -2
|
@@ -7,7 +7,7 @@ export declare const Accordion: import("react").ComponentType<{
|
|
|
7
7
|
iconProps?: import("../icon").IconProps;
|
|
8
8
|
items: import("./Accordion.model").AccordionItem[];
|
|
9
9
|
schema?: import("../../types/schema").Schema;
|
|
10
|
-
onChange?: (index
|
|
10
|
+
onChange?: (index?: number, e?: import("react").SyntheticEvent, expanded?: boolean) => void;
|
|
11
11
|
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
12
12
|
priority?: boolean;
|
|
13
13
|
}>;
|
|
@@ -7,7 +7,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
7
7
|
iconProps?: import("../icon").IconProps;
|
|
8
8
|
items: import("./Accordion.model").AccordionItem[];
|
|
9
9
|
schema?: import("../../types/schema").Schema;
|
|
10
|
-
onChange?: (index
|
|
10
|
+
onChange?: (index?: number, e?: import("react").SyntheticEvent, expanded?: boolean) => void;
|
|
11
11
|
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "onChange"> & {
|
|
12
12
|
priority?: boolean;
|
|
13
13
|
}>;
|
|
@@ -24,7 +24,7 @@ export type AccordionProps = {
|
|
|
24
24
|
iconProps?: IconProps;
|
|
25
25
|
items: AccordionItem[];
|
|
26
26
|
schema?: Schema;
|
|
27
|
-
onChange?: (index
|
|
27
|
+
onChange?: (index?: number, e?: SyntheticEvent, expanded?: boolean) => void;
|
|
28
28
|
} & Omit<HTMLAttributes<HTMLDivElement>, "onChange">;
|
|
29
29
|
export type AccordionViewProps = Omit<AccordionProps, 'expanded' | 'onChange' | 'onToggle'> & {
|
|
30
30
|
expandedIndex?: number | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Dialog: import("react").ComponentType<Omit<import("./Dialog.model").DialogViewProps, "onChange" | "open"> & {
|
|
1
|
+
export declare const Dialog: import("react").ComponentType<Omit<import("./Dialog.model").DialogViewProps, "onChange" | "open" | "onCloseKeyDown"> & {
|
|
2
2
|
open?: boolean;
|
|
3
3
|
onChange?: (event: unknown, reason: import("./Dialog.model").DialogChangeReson, state: boolean) => void;
|
|
4
4
|
ref?: import("react").Ref<import("./Dialog.model").DialogRef>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: import("react").ComponentType<Omit<import("./Dialog.model").DialogViewProps, "onChange" | "open"> & {
|
|
1
|
+
declare const _default: import("react").ComponentType<Omit<import("./Dialog.model").DialogViewProps, "onChange" | "open" | "onCloseKeyDown"> & {
|
|
2
2
|
open?: boolean;
|
|
3
3
|
onChange?: (event: unknown, reason: import("./Dialog.model").DialogChangeReson, state: boolean) => void;
|
|
4
4
|
ref?: import("react").Ref<import("./Dialog.model").DialogRef>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ButtonProps } from "@/components/button";
|
|
2
2
|
import type { HeadlineProps } from "@/components/headline";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IconProps } from "@/components/icon";
|
|
4
|
+
import type { Ref, ReactNode, HTMLAttributes, KeyboardEvent } from "react";
|
|
4
5
|
export type DialogChangeReson = 'backdropClick' | 'escapeKeyDown';
|
|
5
6
|
export type DialogRef = {
|
|
6
7
|
openDialog: () => void;
|
|
@@ -31,13 +32,16 @@ export type DialogViewProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
31
32
|
scroll?: 'paper' | 'body';
|
|
32
33
|
fullScreen?: boolean;
|
|
33
34
|
onClose?: () => void;
|
|
35
|
+
onCloseKeyDown?: (e: KeyboardEvent<HTMLButtonElement>) => void;
|
|
34
36
|
children?: ReactNode;
|
|
35
37
|
closeOnBackdropClick?: boolean;
|
|
36
|
-
closeButtonProps?: Omit<
|
|
38
|
+
closeButtonProps?: Omit<HTMLAttributes<HTMLButtonElement>, "ref" | "onClick" | "onKeyDown"> & {
|
|
39
|
+
iconProps?: IconProps;
|
|
40
|
+
};
|
|
37
41
|
closeButtonRef?: Ref<HTMLButtonElement>;
|
|
38
42
|
containerRef?: Ref<HTMLDivElement>;
|
|
39
43
|
};
|
|
40
|
-
export type DialogProps = Omit<DialogViewProps, 'open' | 'onChange'> & {
|
|
44
|
+
export type DialogProps = Omit<DialogViewProps, 'open' | 'onChange' | 'onCloseKeyDown'> & {
|
|
41
45
|
open?: boolean;
|
|
42
46
|
onChange?: (event: unknown, reason: DialogChangeReson, state: boolean) => void;
|
|
43
47
|
ref?: Ref<DialogRef>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DialogViewProps } from './Dialog.model';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
|
-
export declare function DialogView({ open, title, containerRef, hideTitle, renderHeader, hideCloseButton, translations, actions, contentProps, contentRef, containerChildren, className, classNameHeader, scroll, fullScreen, titleProps, children, onClose, wrapperProps, closeOnBackdropClick, closeButtonProps, closeButtonRef, ...rest }: DialogViewProps): JSX.Element;
|
|
3
|
+
export declare function DialogView({ open, title, containerRef, hideTitle, renderHeader, hideCloseButton, translations, actions, contentProps, contentRef, containerChildren, className, classNameHeader, scroll, fullScreen, titleProps, children, onClose, onCloseKeyDown, wrapperProps, closeOnBackdropClick, closeButtonProps, closeButtonRef, ...rest }: DialogViewProps): JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { DynamicListProps } from "./DynamicList.model";
|
|
2
|
+
declare function DynamicListClient({ fields, value: controlledItems, onChange, buttonAddProps, buttonDeleteProps, ...props }: DynamicListProps): import("react").JSX.Element;
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<typeof DynamicListClient>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ButtonProps } from "../button";
|
|
2
|
+
import type { InputProps } from "../input";
|
|
3
|
+
import type { LabelProps } from "../label";
|
|
4
|
+
import type { MouseEvent } from "react";
|
|
5
|
+
export type DynamicListField = InputProps;
|
|
6
|
+
export type DynamicListDefault = {
|
|
7
|
+
id?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
classNameList?: string;
|
|
11
|
+
buttonAddProps?: ButtonProps;
|
|
12
|
+
buttonDeleteProps?: Omit<ButtonProps, "onClick"> & {
|
|
13
|
+
onClick?: (e: MouseEvent<HTMLButtonElement>, index: number) => void;
|
|
14
|
+
};
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
label?: string;
|
|
17
|
+
labelProps?: Omit<LabelProps, "label" | "required" | "error" | "htmlFor">;
|
|
18
|
+
required?: boolean;
|
|
19
|
+
errorText?: string;
|
|
20
|
+
helperText?: string;
|
|
21
|
+
};
|
|
22
|
+
export type DynamicListPropsSingle = DynamicListDefault & {
|
|
23
|
+
fields: [DynamicListField];
|
|
24
|
+
value?: string[];
|
|
25
|
+
onChange?: (value: string[]) => void;
|
|
26
|
+
};
|
|
27
|
+
export type DynamicListPropsMulti = DynamicListDefault & {
|
|
28
|
+
fields: DynamicListField[];
|
|
29
|
+
value?: Record<string, string>[];
|
|
30
|
+
onChange?: (value: Record<string, string>[]) => void;
|
|
31
|
+
};
|
|
32
|
+
export type DynamicListProps = DynamicListPropsSingle | DynamicListPropsMulti;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ButtonProps } from "../button";
|
|
2
|
+
import { type InputProps } from "../input";
|
|
3
|
+
import type { DynamicListProps } from "./DynamicList.model";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
type DynamicListViewProps = Omit<DynamicListProps, "onChange" | "buttonAddProps" | "buttonDeleteProps"> & {
|
|
6
|
+
fieldProps?: Omit<InputProps, "fieldType" | "multiline" | "rows" | "minRows" | "maxRows" | "type" | "name">;
|
|
7
|
+
buttonAddProps?: Omit<ButtonProps, "title">;
|
|
8
|
+
buttonDeleteProps?: Omit<ButtonProps, "title">;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function DynamicListView({ id, label, labelProps, disabled, required, className, classNameList, fields, value, fieldProps, buttonAddProps, buttonDeleteProps, name, errorText, helperText, }: DynamicListViewProps): ReactNode;
|
|
12
|
+
export {};
|
|
@@ -9,7 +9,7 @@ export declare const Form: import("react").ComponentType<{
|
|
|
9
9
|
defaultFields?: import("./Form.model").FormField[];
|
|
10
10
|
messages?: import("./Form.model").FormMessages;
|
|
11
11
|
messagesFields?: import("./Form.model").FormFieldMessages;
|
|
12
|
-
button
|
|
12
|
+
button?: import("./Form.model").FormButton;
|
|
13
13
|
onSubmit?: (fields: import("./Form.model").FormField[]) => void;
|
|
14
14
|
onChangeForm?: import("./Form.model").OnChangeFormHandler;
|
|
15
15
|
} & Omit<import("react").FormHTMLAttributes<HTMLFormElement>, "onSubmit"> & {
|
|
@@ -9,7 +9,7 @@ declare const _default: import("react").ComponentType<{
|
|
|
9
9
|
defaultFields?: import("./Form.model").FormField[];
|
|
10
10
|
messages?: import("./Form.model").FormMessages;
|
|
11
11
|
messagesFields?: import("./Form.model").FormFieldMessages;
|
|
12
|
-
button
|
|
12
|
+
button?: import("./Form.model").FormButton;
|
|
13
13
|
onSubmit?: (fields: import("./Form.model").FormField[]) => void;
|
|
14
14
|
onChangeForm?: import("./Form.model").OnChangeFormHandler;
|
|
15
15
|
} & Omit<import("react").FormHTMLAttributes<HTMLFormElement>, "onSubmit"> & {
|
|
@@ -2,6 +2,7 @@ import type { FormEvent, ReactElement, FormHTMLAttributes, HTMLAttributes, Input
|
|
|
2
2
|
import type { ButtonProps } from "../button";
|
|
3
3
|
import type { HeadlineProps } from "../headline";
|
|
4
4
|
import { DatePicker, type DatePickerProps, type DatePickerErrorTranslations } from "../datePicker";
|
|
5
|
+
import { DynamicList, type DynamicListProps } from "../dynamic-list";
|
|
5
6
|
import { Input, type InputProps, type InputErrorTranslations } from "../input";
|
|
6
7
|
import { InputOTP } from "../inputOTP";
|
|
7
8
|
import { Select, type SelectProps } from "../select";
|
|
@@ -9,8 +10,8 @@ import { Slider, type SliderProps } from "../slider";
|
|
|
9
10
|
import { Switch, type SwitchProps } from "../switch";
|
|
10
11
|
import type { FormFieldProps } from "./FormField.client";
|
|
11
12
|
export type FormVariants = "inherit" | "primary" | "secondary" | "success" | "error" | "info" | "warning";
|
|
12
|
-
export type FormFieldTypes = "input" | "select" | "switch" | "slider" | "date";
|
|
13
|
-
export type FormFieldValue = string | boolean | string[] | undefined;
|
|
13
|
+
export type FormFieldTypes = "input" | "select" | "switch" | "slider" | "date" | "dynamic-list";
|
|
14
|
+
export type FormFieldValue = string | boolean | string[] | Record<string, string>[] | undefined;
|
|
14
15
|
export type FormFieldCondition = {
|
|
15
16
|
fieldId: string;
|
|
16
17
|
equalTo: boolean | string | string[];
|
|
@@ -37,7 +38,10 @@ export type FormFieldSlider = FormFieldOptionals & {
|
|
|
37
38
|
export type FormFieldDate = FormFieldOptionals & {
|
|
38
39
|
fieldType: "date";
|
|
39
40
|
} & DatePickerProps;
|
|
40
|
-
export type
|
|
41
|
+
export type FormFieldDynamicList = FormFieldOptionals & {
|
|
42
|
+
fieldType: "dynamic-list";
|
|
43
|
+
} & DynamicListProps;
|
|
44
|
+
export type FormField = FormFieldInput | FormFieldSelect | FormFieldSwitch | FormFieldSlider | FormFieldDate | FormFieldDynamicList;
|
|
41
45
|
export type FormMessagesErrors = {
|
|
42
46
|
[key: string]: string[];
|
|
43
47
|
};
|
|
@@ -55,7 +59,7 @@ export type FormFieldMessagesErrors = {
|
|
|
55
59
|
export type FormFieldMessages = {
|
|
56
60
|
errors?: FormFieldMessagesErrors;
|
|
57
61
|
};
|
|
58
|
-
export type FormAllowedChildren = ReactElement<typeof DatePicker> | ReactElement<typeof Input> | ReactElement<typeof InputOTP> | ReactElement<typeof Select> | ReactElement<typeof Slider> | ReactElement<typeof Switch>;
|
|
62
|
+
export type FormAllowedChildren = ReactElement<typeof DatePicker> | ReactElement<typeof Input> | ReactElement<typeof InputOTP> | ReactElement<typeof Select> | ReactElement<typeof Slider> | ReactElement<typeof Switch> | ReactElement<typeof DynamicList>;
|
|
59
63
|
export type ParentComponentProps = {
|
|
60
64
|
children: FormAllowedChildren | FormAllowedChildren[];
|
|
61
65
|
};
|
|
@@ -77,7 +81,7 @@ export type FormProps = {
|
|
|
77
81
|
defaultFields?: FormField[];
|
|
78
82
|
messages?: FormMessages;
|
|
79
83
|
messagesFields?: FormFieldMessages;
|
|
80
|
-
button
|
|
84
|
+
button?: FormButton;
|
|
81
85
|
onSubmit?: (fields: FormField[]) => void;
|
|
82
86
|
onChangeForm?: OnChangeFormHandler;
|
|
83
87
|
} & Omit<FormHTMLAttributes<HTMLFormElement>, "onSubmit">;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export * from "./Form";
|
|
2
2
|
export * from "./FormResponse";
|
|
3
|
-
export type { FormProps, FormField, FormFieldTypes, FormAllowedChildren, FormFieldCondition, FormFieldDate, FormFieldInput, FormFieldMessages, FormFieldMessagesErrors, FormFieldMessagesErrorsDate, FormFieldMessagesErrorsInput, FormFieldOptionals, FormFieldSelect, FormFieldSlider, FormFieldSwitch, FormFieldValue, FormMessages, FormMessagesErrors, FormResponseProps, FormVariants, } from "./Form.model";
|
|
4
|
-
export type {} from "./";
|
|
3
|
+
export type { FormProps, FormField, FormFieldTypes, FormAllowedChildren, FormFieldCondition, FormFieldDate, FormFieldInput, FormFieldDynamicList, FormFieldMessages, FormFieldMessagesErrors, FormFieldMessagesErrorsDate, FormFieldMessagesErrorsInput, FormFieldOptionals, FormFieldSelect, FormFieldSlider, FormFieldSwitch, FormFieldValue, FormMessages, FormMessagesErrors, FormResponseProps, FormVariants, } from "./Form.model";
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { LabelHTMLAttributes, HTMLAttributes } from "react";
|
|
2
|
-
export type
|
|
2
|
+
export type LabelDefaultrops = {
|
|
3
3
|
required?: boolean;
|
|
4
4
|
error?: boolean;
|
|
5
5
|
label?: string;
|
|
6
6
|
contentProps?: HTMLAttributes<HTMLSpanElement>;
|
|
7
7
|
textProps?: HTMLAttributes<HTMLElement>;
|
|
8
|
-
htmlFor?: string;
|
|
9
8
|
};
|
|
9
|
+
export type LabelLegendProps = HTMLAttributes<HTMLLegendElement> & {
|
|
10
|
+
type?: "legend";
|
|
11
|
+
} & LabelDefaultrops;
|
|
12
|
+
export type LabelElementProps = Omit<LabelHTMLAttributes<HTMLLegendElement>, "htmlFor"> & {
|
|
13
|
+
type?: "label";
|
|
14
|
+
htmlFor?: string;
|
|
15
|
+
} & LabelDefaultrops;
|
|
16
|
+
export type LabelProps = LabelElementProps | LabelLegendProps;
|
|
@@ -11,13 +11,13 @@ export type LinkDefaultProps = BaseLinkProps & {
|
|
|
11
11
|
classNames?: LinkClassNames;
|
|
12
12
|
hasBackground?: boolean;
|
|
13
13
|
ariaLabel?: string;
|
|
14
|
-
|
|
14
|
+
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
15
15
|
};
|
|
16
16
|
export type LinkHrefProps = LinkDefaultProps & {
|
|
17
17
|
href: string;
|
|
18
18
|
};
|
|
19
19
|
export type LinkClickProps = LinkDefaultProps & {
|
|
20
|
-
|
|
20
|
+
onClick: MouseEventHandler<HTMLAnchorElement>;
|
|
21
21
|
};
|
|
22
22
|
export type LinkProps = LinkHrefProps | LinkClickProps;
|
|
23
23
|
export type LinkViewProps = LinkProps & {
|
|
@@ -5,21 +5,27 @@ import type { Variants } from "@/types/variants";
|
|
|
5
5
|
import type { HTMLAttributes, ReactNode } from "react";
|
|
6
6
|
export type ListType = "default" | "icon" | "card";
|
|
7
7
|
export type ListVariant = Omit<Variants, "white">;
|
|
8
|
-
export type
|
|
8
|
+
export type ListItemTitle = {
|
|
9
|
+
id?: string;
|
|
9
10
|
title: string;
|
|
11
|
+
};
|
|
12
|
+
export type ListItemTitleNode = {
|
|
13
|
+
id: string;
|
|
14
|
+
title: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export type ListCardItemProps = (ListItemTitle | ListItemTitleNode) & {
|
|
10
17
|
desc?: string | ReactNode;
|
|
11
|
-
icon?: IconName;
|
|
18
|
+
icon?: IconName | ReactNode;
|
|
12
19
|
variant?: ListVariant;
|
|
13
20
|
iconProps?: IconProps;
|
|
14
21
|
redirect?: LinkProps;
|
|
15
22
|
innerClassName?: string;
|
|
16
23
|
onClick?: (e?: ListCardItemProps) => void;
|
|
17
24
|
} & Omit<CardProps, "children">;
|
|
18
|
-
export type ListDefaultItemProps = {
|
|
19
|
-
title: string;
|
|
25
|
+
export type ListDefaultItemProps = (ListItemTitle | ListItemTitleNode) & {
|
|
20
26
|
desc?: string | ReactNode;
|
|
21
27
|
className?: string;
|
|
22
|
-
icon?: IconName;
|
|
28
|
+
icon?: IconName | ReactNode;
|
|
23
29
|
variant?: ListVariant;
|
|
24
30
|
redirect?: LinkProps;
|
|
25
31
|
onClick?: (e?: ListDefaultItemProps) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ProgressBar: import("react").ComponentType<{
|
|
2
|
+
id: string;
|
|
3
|
+
value?: number;
|
|
4
|
+
label?: string;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
variant?: import("./ProgressBar.model").ProgressBarVariant;
|
|
7
|
+
infinity?: boolean;
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
11
|
+
priority?: boolean;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const _default: import("react").ComponentType<{
|
|
2
|
+
id: string;
|
|
3
|
+
value?: number;
|
|
4
|
+
label?: string;
|
|
5
|
+
hideLabel?: boolean;
|
|
6
|
+
variant?: import("./ProgressBar.model").ProgressBarVariant;
|
|
7
|
+
infinity?: boolean;
|
|
8
|
+
animated?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
11
|
+
priority?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Variants } from "@/types/variants";
|
|
2
|
+
import type { HTMLAttributes } from "react";
|
|
3
|
+
export type ProgressBarVariant = Omit<Variants, "white">;
|
|
4
|
+
export type ProgressBarProps = {
|
|
5
|
+
id: string;
|
|
6
|
+
value?: number;
|
|
7
|
+
label?: string;
|
|
8
|
+
hideLabel?: boolean;
|
|
9
|
+
variant?: ProgressBarVariant;
|
|
10
|
+
infinity?: boolean;
|
|
11
|
+
animated?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "children">;
|
|
14
|
+
export type ProgressBarViewProps = ProgressBarProps;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LabelProps } from "../label";
|
|
2
|
+
import type { ChangeEvent, RefObject, ReactNode, Ref, MouseEventHandler, KeyboardEventHandler } from "react";
|
|
2
3
|
export type SelectEvent = ChangeEvent<HTMLSelectElement> | null;
|
|
3
4
|
export interface SelectItem<Value extends string = string> {
|
|
4
5
|
value: Value;
|
|
@@ -25,7 +26,7 @@ export interface SelectProps<Value extends string = string> {
|
|
|
25
26
|
className?: string;
|
|
26
27
|
fieldClassName?: string;
|
|
27
28
|
selectClassName?: string;
|
|
28
|
-
labelProps?:
|
|
29
|
+
labelProps?: LabelProps;
|
|
29
30
|
ref?: Ref<HTMLSelectElement>;
|
|
30
31
|
}
|
|
31
32
|
type SelectClientState<V extends string = string> = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IconProps, IconName } from "../icon";
|
|
2
2
|
import type { LinkProps } from "../link";
|
|
3
3
|
export type SideNavItem = {
|
|
4
|
+
active?: boolean;
|
|
4
5
|
label: string;
|
|
5
6
|
icon: IconProps;
|
|
6
7
|
redirect?: LinkProps;
|
|
@@ -16,6 +17,7 @@ export type SideNavProps = {
|
|
|
16
17
|
iconProps?: Omit<IconProps, "name">;
|
|
17
18
|
ariaLabel?: string;
|
|
18
19
|
className?: string;
|
|
20
|
+
onChange?: (e: SideNavItem) => void;
|
|
19
21
|
};
|
|
20
22
|
export type SideNavViewProps = SideNavProps & {
|
|
21
23
|
collapsed: boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type JSX } from "react";
|
|
2
|
+
import type { SnackbarProps } from "./Snackbar.model";
|
|
3
|
+
declare function SnackbarClient({ open: openProp, autoHideDuration, onClose, ...rest }: SnackbarProps): JSX.Element | null;
|
|
4
|
+
declare const _default: import("react").MemoExoticComponent<typeof SnackbarClient>;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type SnackbarVariant = "default" | "success" | "error" | "warning" | "info";
|
|
3
|
+
export type SnackbarAnchorOrigin = {
|
|
4
|
+
vertical: "top" | "bottom";
|
|
5
|
+
horizontal: "left" | "center" | "right";
|
|
6
|
+
};
|
|
7
|
+
export type SnackbarCloseReason = "timeout" | "clickaway" | "actionClick" | "closeIcon";
|
|
8
|
+
export type SnackbarCloseHandler = (reason: SnackbarCloseReason, event?: unknown) => void;
|
|
9
|
+
export interface SnackbarProps {
|
|
10
|
+
message: ReactNode;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
autoHideDuration?: number;
|
|
13
|
+
variant?: SnackbarVariant;
|
|
14
|
+
anchorOrigin?: SnackbarAnchorOrigin;
|
|
15
|
+
action?: ReactNode;
|
|
16
|
+
closeable?: boolean;
|
|
17
|
+
elevation?: number;
|
|
18
|
+
onClose?: SnackbarCloseHandler;
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SnackbarProps, SnackbarCloseHandler } from "./Snackbar.model";
|
|
2
|
+
import type { JSX } from "react";
|
|
3
|
+
export interface SnackbarViewProps extends Omit<SnackbarProps, "open"> {
|
|
4
|
+
onClose?: SnackbarCloseHandler;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function SnackbarView({ message, variant, anchorOrigin, action, closeable, elevation, className, onClose, readOnly, }: SnackbarViewProps): JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { SnackbarProviderProps, SnackbarContextValue } from "./SnackbarProvider.model";
|
|
3
|
+
export declare function useSnackbar(): SnackbarContextValue;
|
|
4
|
+
export default function SnackbarProvider({ className, maxSnack, anchorOrigin, children, }: SnackbarProviderProps): ReactNode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { SnackbarVariant } from "./Snackbar.model";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export interface SnackbarPayload {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
message: ReactNode;
|
|
7
|
+
variant?: SnackbarVariant;
|
|
8
|
+
autoHideDuration?: number;
|
|
9
|
+
action?: ReactNode;
|
|
10
|
+
anchorOrigin?: {
|
|
11
|
+
vertical: "top" | "bottom";
|
|
12
|
+
horizontal: "left" | "center" | "right";
|
|
13
|
+
};
|
|
14
|
+
closeable?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface SnackbarContextValue {
|
|
17
|
+
enqueue: (s: SnackbarPayload) => string;
|
|
18
|
+
close: (id: string) => void;
|
|
19
|
+
}
|
|
20
|
+
export type SnackbarProviderProps = {
|
|
21
|
+
className?: string;
|
|
22
|
+
maxSnack?: number;
|
|
23
|
+
anchorOrigin?: SnackbarPayload["anchorOrigin"];
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from "./Snackbar";
|
|
2
|
+
export * from "./SnackbarProvider";
|
|
3
|
+
export { SnackbarCtx } from "./SnackbarProvider.context";
|
|
4
|
+
export { useSnackbar } from "./SnackbarProvider.client";
|
|
5
|
+
export type { SnackbarProps, SnackbarVariant, SnackbarAnchorOrigin, } from "./Snackbar.model";
|
|
6
|
+
export type { SnackbarPayload, SnackbarContextValue, SnackbarProviderProps, } from "./SnackbarProvider.model";
|
|
@@ -32,7 +32,7 @@ export interface StepperViewProps extends Omit<StepperViewPropsCommon, "ref"> {
|
|
|
32
32
|
export interface StepperViewPropsCommon extends StepperPropsCommon {
|
|
33
33
|
}
|
|
34
34
|
export interface StepperPropsCommon {
|
|
35
|
-
stepRefs
|
|
35
|
+
stepRefs?: RefObject<Array<HTMLDivElement | null>>;
|
|
36
36
|
steps: Step[];
|
|
37
37
|
translations?: StepperTranslations;
|
|
38
38
|
className?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HeadlineProps } from "../headline";
|
|
2
2
|
import type { IconProps } from "../icon";
|
|
3
3
|
import type { LinkProps } from "../link";
|
|
4
|
-
import type { TableHTMLAttributes } from "react";
|
|
4
|
+
import type { TableHTMLAttributes, ReactNode } from "react";
|
|
5
5
|
export type TableType = "double" | "single";
|
|
6
6
|
export type TableHeaderCellProps = {
|
|
7
7
|
label?: string;
|
|
@@ -10,7 +10,8 @@ export type TableHeaderCellProps = {
|
|
|
10
10
|
className?: string;
|
|
11
11
|
};
|
|
12
12
|
export type TableBodyCellProps = {
|
|
13
|
-
|
|
13
|
+
id?: string;
|
|
14
|
+
label?: string | ReactNode;
|
|
14
15
|
icon?: IconProps;
|
|
15
16
|
classNameInner?: string;
|
|
16
17
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export { Chip } from "./components/chip";
|
|
|
11
11
|
export { DatePicker } from "./components/datePicker";
|
|
12
12
|
export { Dialog } from "./components/dialog";
|
|
13
13
|
export { Drawer } from "./components/drawer";
|
|
14
|
+
export { DynamicList } from "./components/dynamic-list";
|
|
14
15
|
export { Form, FormResponse } from "./components/form";
|
|
15
16
|
export { Grid, GridRow } from "./components/grid";
|
|
16
17
|
export { Headline } from "./components/headline";
|
|
@@ -29,12 +30,14 @@ export { PostItem } from "./components/post-item";
|
|
|
29
30
|
export { PostTeaser } from "./components/post-teaser";
|
|
30
31
|
export { PostWidget } from "./components/post-widget";
|
|
31
32
|
export { PostWidgetCarousel } from "./components/post-widget-carousel";
|
|
33
|
+
export { ProgressBar } from "./components/progressBar";
|
|
32
34
|
export { Quote } from "./components/quote";
|
|
33
35
|
export { RichText } from "./components/rich-text";
|
|
34
36
|
export { Select } from "./components/select";
|
|
35
37
|
export { SideNav } from "./components/sidenav";
|
|
36
38
|
export { Skeleton } from "./components/skeleton";
|
|
37
39
|
export { Slider } from "./components/slider";
|
|
40
|
+
export { Snackbar } from "./components/snackbar";
|
|
38
41
|
export { Stepper } from "./components/stepper";
|
|
39
42
|
export { Switch } from "./components/switch";
|
|
40
43
|
export { Table } from "./components/table";
|