dibk-design 9.3.5 → 9.3.6
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/dibk-design.css +1 -1
- package/dist/index.cjs.js +6 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +69 -44
- package/dist/index.es.js +1823 -1665
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +6 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -67
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { ReactNode } from 'react';
|
|
|
6
6
|
|
|
7
7
|
export declare const Accordion: ({ title, color, expanded: expandedProp, onToggleExpand, buttonProps, noMargin, initialized: initializedProp, children, ...rest }: AccordionProps) => JSX.Element;
|
|
8
8
|
|
|
9
|
-
declare type AccordionColor =
|
|
9
|
+
declare type AccordionColor = "default" | "secondary" | "info" | "contrast";
|
|
10
10
|
|
|
11
11
|
declare interface AccordionProps {
|
|
12
12
|
title?: string;
|
|
@@ -20,13 +20,13 @@ declare interface AccordionProps {
|
|
|
20
20
|
[key: string]: any;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
declare type ArrowDirection =
|
|
23
|
+
declare type ArrowDirection = "none" | "left" | "right";
|
|
24
24
|
|
|
25
25
|
export declare const Button: ({ content, color, size, arrow, disabled, inputType, defaultChecked, hasErrors, noHover, rounded, noMargin, href, children, iconLeft, iconRight, ...rest }: ButtonProps) => JSX.Element;
|
|
26
26
|
|
|
27
|
-
declare type ButtonColor =
|
|
27
|
+
declare type ButtonColor = "primary" | "secondary";
|
|
28
28
|
|
|
29
|
-
declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
29
|
+
declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
|
|
30
30
|
content?: string;
|
|
31
31
|
color?: ButtonColor;
|
|
32
32
|
size?: ButtonSize;
|
|
@@ -36,7 +36,7 @@ declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLBu
|
|
|
36
36
|
defaultChecked?: boolean;
|
|
37
37
|
required?: boolean;
|
|
38
38
|
hasErrors?: boolean;
|
|
39
|
-
|
|
39
|
+
"aria-describedby"?: string;
|
|
40
40
|
noHover?: boolean;
|
|
41
41
|
rounded?: boolean;
|
|
42
42
|
href?: string;
|
|
@@ -47,16 +47,18 @@ declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLBu
|
|
|
47
47
|
[key: string]: any;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
declare type ButtonSize =
|
|
50
|
+
declare type ButtonSize = "small" | "regular";
|
|
51
|
+
|
|
52
|
+
export declare const CheckBoxIcon: ({ size, checked, disabled, showBox, hasErrors, checkmarkCharacter, }: CheckBoxIconProps) => JSX.Element;
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
size?: string
|
|
54
|
-
checked?: boolean
|
|
55
|
-
disabled?: boolean
|
|
56
|
-
showBox?: boolean
|
|
57
|
-
hasErrors?: boolean
|
|
58
|
-
checkmarkCharacter?: string
|
|
59
|
-
}
|
|
54
|
+
declare interface CheckBoxIconProps {
|
|
55
|
+
size?: string;
|
|
56
|
+
checked?: boolean;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
showBox?: boolean;
|
|
59
|
+
hasErrors?: boolean;
|
|
60
|
+
checkmarkCharacter?: string;
|
|
61
|
+
}
|
|
60
62
|
|
|
61
63
|
export declare const CheckBoxInput: ({ checked, disabled, required, requiredGroup, id, name, onChange, contentOnly, hasErrors, checkmarkCharacter, tabIndex, children, "aria-controls": ariaControls, "aria-describedby": ariaDescribedBy, value, }: CheckBoxInputProps) => JSX.Element;
|
|
62
64
|
|
|
@@ -71,8 +73,8 @@ declare interface CheckBoxInputProps {
|
|
|
71
73
|
contentOnly?: boolean;
|
|
72
74
|
hasErrors?: boolean;
|
|
73
75
|
checkmarkCharacter?: string;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
"aria-controls"?: string;
|
|
77
|
+
"aria-describedby"?: string;
|
|
76
78
|
tabIndex?: number;
|
|
77
79
|
children?: default_2.ReactNode;
|
|
78
80
|
value?: string | number;
|
|
@@ -95,8 +97,8 @@ declare interface CheckBoxListItemProps {
|
|
|
95
97
|
compact?: boolean;
|
|
96
98
|
checkmarkCharacter?: string;
|
|
97
99
|
hasErrors?: boolean;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
"aria-controls"?: string;
|
|
101
|
+
"aria-describedby"?: string;
|
|
100
102
|
children?: default_2.ReactNode;
|
|
101
103
|
}
|
|
102
104
|
|
|
@@ -161,7 +163,7 @@ declare interface DialogProps {
|
|
|
161
163
|
closeButton?: boolean;
|
|
162
164
|
onClickOutside: () => void;
|
|
163
165
|
modal?: boolean;
|
|
164
|
-
attachTo?:
|
|
166
|
+
attachTo?: "left" | "right" | "top" | "bottom" | string;
|
|
165
167
|
hidden?: boolean;
|
|
166
168
|
children?: React.ReactNode;
|
|
167
169
|
}
|
|
@@ -184,13 +186,13 @@ declare interface DragAndDropFileInputProps {
|
|
|
184
186
|
errorMessage?: string | (string | JSX_2.Element)[];
|
|
185
187
|
required?: boolean;
|
|
186
188
|
children?: default_2.ReactNode;
|
|
187
|
-
|
|
189
|
+
"data-transaction-name"?: string;
|
|
188
190
|
}
|
|
189
191
|
|
|
190
192
|
export declare const ErrorBox: React.FC<ErrorBoxProps>;
|
|
191
193
|
|
|
192
194
|
declare interface ErrorBoxProps {
|
|
193
|
-
type?:
|
|
195
|
+
type?: "warning" | "error";
|
|
194
196
|
fullScreen?: boolean;
|
|
195
197
|
children?: React.ReactNode;
|
|
196
198
|
}
|
|
@@ -231,7 +233,7 @@ export declare const InputField: ({ id, onChange, onBlur, name, type, disabled,
|
|
|
231
233
|
|
|
232
234
|
declare interface InputFieldProps {
|
|
233
235
|
id: string;
|
|
234
|
-
onChange
|
|
236
|
+
onChange?: (e: default_2.ChangeEvent<HTMLInputElement>) => void;
|
|
235
237
|
onBlur?: (e: default_2.FocusEvent<HTMLInputElement>) => void;
|
|
236
238
|
name?: string;
|
|
237
239
|
type?: string;
|
|
@@ -239,12 +241,12 @@ declare interface InputFieldProps {
|
|
|
239
241
|
required?: boolean;
|
|
240
242
|
readOnly?: boolean;
|
|
241
243
|
width?: string;
|
|
242
|
-
value?:
|
|
243
|
-
defaultValue?:
|
|
244
|
+
value?: string | number | Date;
|
|
245
|
+
defaultValue?: string | number | Date;
|
|
244
246
|
elementKey?: string;
|
|
245
247
|
label?: default_2.ReactNode;
|
|
246
248
|
contentOnly?: boolean;
|
|
247
|
-
buttonColor?:
|
|
249
|
+
buttonColor?: "primary" | "secondary";
|
|
248
250
|
buttonContent?: string;
|
|
249
251
|
selectedFileName?: string;
|
|
250
252
|
placeholder?: string;
|
|
@@ -252,14 +254,14 @@ declare interface InputFieldProps {
|
|
|
252
254
|
min?: string;
|
|
253
255
|
max?: string;
|
|
254
256
|
role?: string;
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
"aria-describedby"?: string;
|
|
258
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both";
|
|
257
259
|
hasErrors?: boolean;
|
|
258
260
|
errorMessage?: default_2.ReactNode;
|
|
259
261
|
noMargin?: boolean;
|
|
260
262
|
}
|
|
261
263
|
|
|
262
|
-
declare type InputType =
|
|
264
|
+
declare type InputType = "button" | "radio";
|
|
263
265
|
|
|
264
266
|
export declare const Label: ({ inline, normalCursor, htmlTag, children, id, ...rest }: LabelProps) => default_2.DOMElement<{
|
|
265
267
|
className: string;
|
|
@@ -595,6 +597,13 @@ declare interface LoadingAnimationProps {
|
|
|
595
597
|
message?: string;
|
|
596
598
|
}
|
|
597
599
|
|
|
600
|
+
declare interface MultipleSelectProps extends SelectPropsBase {
|
|
601
|
+
multiple: true;
|
|
602
|
+
onChange: (value: (string | number)[]) => void;
|
|
603
|
+
value?: (string | number)[];
|
|
604
|
+
defaultValue?: (string | number)[];
|
|
605
|
+
}
|
|
606
|
+
|
|
598
607
|
export declare const NavigationBar: ({ primaryListItems, secondaryListItems, logoLink, logoLinkTitle, openLogoLinkInNewTab, theme, compact, mainContentId, preventChildElementStacking, children, }: NavigationBarProps) => JSX.Element;
|
|
599
608
|
|
|
600
609
|
export declare const NavigationBarListItem: ({ listItem }: NavigationBarListItemProps) => JSX.Element | null;
|
|
@@ -660,8 +669,8 @@ declare interface RadioButtonInputProps {
|
|
|
660
669
|
inputValue: string;
|
|
661
670
|
tabIndex?: number;
|
|
662
671
|
children?: default_2.ReactNode;
|
|
663
|
-
|
|
664
|
-
|
|
672
|
+
"aria-controls"?: string;
|
|
673
|
+
"aria-describedby"?: string;
|
|
665
674
|
}
|
|
666
675
|
|
|
667
676
|
export declare const RadioButtonList: ({ legend, legendSize, required, compact, children, }: RadioButtonListProps) => JSX.Element;
|
|
@@ -693,19 +702,17 @@ declare interface RadioButtonListProps {
|
|
|
693
702
|
children?: ReactNode;
|
|
694
703
|
}
|
|
695
704
|
|
|
696
|
-
export declare const Select: (
|
|
705
|
+
export declare const Select: (props: SelectProps) => JSX.Element;
|
|
697
706
|
|
|
698
|
-
declare
|
|
707
|
+
declare type SelectProps = SingleSelectProps | MultipleSelectProps;
|
|
708
|
+
|
|
709
|
+
declare interface SelectPropsBase {
|
|
699
710
|
id: string;
|
|
700
|
-
onChange: (value: any) => void;
|
|
701
711
|
name?: string;
|
|
702
712
|
required?: boolean;
|
|
703
713
|
disabled?: boolean;
|
|
704
|
-
multiple?: boolean;
|
|
705
714
|
options?: Option_2[];
|
|
706
715
|
width?: string;
|
|
707
|
-
value?: any;
|
|
708
|
-
defaultValue?: any;
|
|
709
716
|
label?: default_2.ReactNode;
|
|
710
717
|
contentOnly?: boolean;
|
|
711
718
|
keyAsContent?: boolean;
|
|
@@ -713,11 +720,18 @@ declare interface SelectProps {
|
|
|
713
720
|
placeholderValue?: string;
|
|
714
721
|
defaultContent?: string;
|
|
715
722
|
role?: string;
|
|
716
|
-
|
|
723
|
+
"aria-describedby"?: string;
|
|
717
724
|
hasErrors?: boolean;
|
|
718
725
|
errorMessage?: default_2.ReactNode;
|
|
719
726
|
}
|
|
720
727
|
|
|
728
|
+
declare interface SingleSelectProps extends SelectPropsBase {
|
|
729
|
+
multiple?: false;
|
|
730
|
+
onChange: (value: string | number) => void;
|
|
731
|
+
value?: string | number;
|
|
732
|
+
defaultValue?: string | number;
|
|
733
|
+
}
|
|
734
|
+
|
|
721
735
|
declare interface StepData {
|
|
722
736
|
id: string | number;
|
|
723
737
|
name: string;
|
|
@@ -738,12 +752,23 @@ declare interface StepProps {
|
|
|
738
752
|
direction?: 'vertical' | 'horizontal';
|
|
739
753
|
}
|
|
740
754
|
|
|
741
|
-
export declare const Table: ({
|
|
755
|
+
export declare const Table: <T extends object>({ columns, data, caption, getRowId, }: TableProps<T>) => JSX.Element;
|
|
742
756
|
|
|
743
|
-
declare
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
757
|
+
declare type TableColumn<T> = {
|
|
758
|
+
key: string;
|
|
759
|
+
label: string;
|
|
760
|
+
sortable?: boolean;
|
|
761
|
+
accessor?: (item: T) => string | number | null | undefined;
|
|
762
|
+
render?: (item: T) => default_2.ReactNode;
|
|
763
|
+
sortAccessor?: (item: T) => string | number | Date | null | undefined;
|
|
764
|
+
ariaLabel?: string;
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
declare interface TableProps<T> {
|
|
768
|
+
columns: TableColumn<T>[];
|
|
769
|
+
data: T[];
|
|
770
|
+
caption?: string;
|
|
771
|
+
getRowId?: (row: T, index: number) => default_2.Key;
|
|
747
772
|
}
|
|
748
773
|
|
|
749
774
|
export declare const Textarea: ({ id, onChange, onBlur, name, required, readOnly, disabled, width, resize, value, defaultValue, elementKey, rows, label, contentOnly, placeholder, defaultContent, "aria-describedby": ariaDescribedBy, hasErrors, errorMessage, }: TextareaProps) => JSX.Element;
|
|
@@ -757,7 +782,7 @@ declare interface TextareaProps {
|
|
|
757
782
|
readOnly?: boolean;
|
|
758
783
|
disabled?: boolean;
|
|
759
784
|
width?: string;
|
|
760
|
-
resize?:
|
|
785
|
+
resize?: "both" | "horizontal" | "vertical" | "none";
|
|
761
786
|
value?: string;
|
|
762
787
|
defaultValue?: string;
|
|
763
788
|
elementKey?: string;
|
|
@@ -766,7 +791,7 @@ declare interface TextareaProps {
|
|
|
766
791
|
contentOnly?: boolean;
|
|
767
792
|
placeholder?: string;
|
|
768
793
|
defaultContent?: string;
|
|
769
|
-
|
|
794
|
+
"aria-describedby"?: string;
|
|
770
795
|
hasErrors?: boolean;
|
|
771
796
|
errorMessage?: default_2.ReactNode;
|
|
772
797
|
}
|