@speakapbv/dough-component-library 10.8.0 → 10.9.1
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/components/color-tile/color-tile.d.ts +1 -1
- package/dist/components/containers/box/box.d.ts +1 -1
- package/dist/components/drop-menu/drop-menu.d.ts +1 -1
- package/dist/components/form-elements/select-box/select-box.d.ts +3 -3
- package/dist/components/form-elements/selection-inputs/check-box.d.ts +2 -2
- package/dist/components/form-elements/selection-inputs/radio-group.d.ts +2 -2
- package/dist/components/form-elements/switch/switch.d.ts +1 -1
- package/dist/components/form-elements/text-inputs/numeric-input.d.ts +1 -1
- package/dist/components/form-elements/text-inputs/text-area.d.ts +1 -1
- package/dist/components/form-elements/text-inputs/text-input.d.ts +1 -1
- package/dist/components/form-elements/time-picker/time-picker.d.ts +1 -1
- package/dist/components/form-elements/toggle/toggle.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +208 -239
- package/dist/index.js +268 -299
- package/dist/src/components/alert-textbox/alert-textbox.stories.d.ts +9 -2
- package/dist/src/components/bread-crumb/bread-crumb.stories.d.ts +13 -9
- package/dist/src/components/button/button.stories.d.ts +7 -6
- package/dist/src/components/color-tile/color-tile.stories.d.ts +4 -3
- package/dist/src/components/containers/card/card.stories.d.ts +13 -3
- package/dist/src/components/divider/divider.stories.d.ts +17 -4
- package/dist/src/components/drop-menu/drop-menu.stories.d.ts +4 -3
- package/dist/src/components/form-elements/form-element-base-wrapper.d.ts +1 -1
- package/dist/src/components/form-elements/selection-inputs/check-box.stories.d.ts +5 -4
- package/dist/src/components/overlay/overlay.stories.d.ts +4 -2
- package/dist/src/components/progress-bar/multi-progress-bar.stories.d.ts +25 -6
- package/dist/src/components/progress-bar/progress-bar.stories.d.ts +9 -2
- package/dist/src/components/spinner/spinner.stories.d.ts +9 -2
- package/dist/src/components/tabs/tabs.stories.d.ts +13 -3
- package/dist/src/components/tree/tree.d.ts +1 -1
- package/dist/src/utils/flattenChildren.d.ts +1 -1
- package/dist/utils/constants.d.ts +6 -6
- package/dist/utils/dom-management.d.ts +7 -7
- package/dist/utils/styles.d.ts +1 -1
- package/package.json +8 -5
|
@@ -9,7 +9,7 @@ export interface ColorTileProps {
|
|
|
9
9
|
size: Sizes.SMALL | Sizes.NORMAL | Sizes.LARGE | Sizes.XL;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type ColorTileRef = {
|
|
13
13
|
getAbsoluteColor: () => string | undefined;
|
|
14
14
|
};
|
|
15
15
|
export declare const ColorTile: React.ForwardRefExoticComponent<ColorTileProps & React.RefAttributes<ColorTileRef>>;
|
|
@@ -65,7 +65,6 @@ export interface Positions {
|
|
|
65
65
|
top?: string;
|
|
66
66
|
bottom?: string;
|
|
67
67
|
}
|
|
68
|
-
export declare const ColorToHoverColor: Partial<Record<Exclude<BoxProps["color"], undefined>, string>>;
|
|
69
68
|
export interface BoxProps {
|
|
70
69
|
/** Base properties */
|
|
71
70
|
className?: string;
|
|
@@ -119,4 +118,5 @@ export interface BoxProps {
|
|
|
119
118
|
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
120
119
|
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
121
120
|
}
|
|
121
|
+
export declare const ColorToHoverColor: Partial<Record<Exclude<BoxProps["color"], undefined>, string>>;
|
|
122
122
|
export declare const Box: React.ForwardRefExoticComponent<Pick<BoxProps, "color" | "className" | "children" | "dataAttributes" | "width" | "height" | "minWidth" | "minHeight" | "maxWidth" | "maxHeight" | "absolute" | "zIndex" | "hover" | "border" | "borderRadius" | "rounded" | "shadow" | "padding" | "transform" | "overflow" | "display" | "direction" | "flex" | "basis" | "grow" | "shrink" | "order" | "wrap" | "justifyContent" | "alignItems" | "alignContent" | "alignSelf" | "onScrollReachedBottom" | "onMouseEnter" | "onMouseMove" | "onMouseLeave" | "onClick"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -2,7 +2,7 @@ import React, { ReactNode, MouseEvent, FunctionComponent } from "react";
|
|
|
2
2
|
import { Colors, ColorsText, Sizes, DoughDataAttributes } from "../../utils/constants";
|
|
3
3
|
import { ButtonProps } from "../button/button";
|
|
4
4
|
import "./drop-menu.scss";
|
|
5
|
-
export
|
|
5
|
+
export type DoughDropMenuRef = {
|
|
6
6
|
show(): void;
|
|
7
7
|
hide(): void;
|
|
8
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode, Ref } from "react";
|
|
2
2
|
import "./select-box.scss";
|
|
3
3
|
import { DoughValidationResult, DoughDataAttributes } from "../../../utils/constants";
|
|
4
|
-
export
|
|
4
|
+
export type DoughSelectBoxData = {
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -9,7 +9,7 @@ export declare type DoughSelectBoxData = {
|
|
|
9
9
|
children?: Array<DoughSelectBoxData>;
|
|
10
10
|
extraData?: Record<string, any>;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type DoughSelectBoxInputRef = {
|
|
13
13
|
getValue(): string | DoughSelectBoxData | Array<DoughSelectBoxData> | undefined;
|
|
14
14
|
focus(): void;
|
|
15
15
|
blur(): void;
|
|
@@ -65,6 +65,6 @@ export interface SelectBoxMultipleProps {
|
|
|
65
65
|
validator?(value: Array<DoughSelectBoxData>): DoughValidationResult;
|
|
66
66
|
value?: Array<DoughSelectBoxData>;
|
|
67
67
|
}
|
|
68
|
-
export
|
|
68
|
+
export type SelectBoxProps = SelectBoxCommonProps & (SelectBoxSingleProps | SelectBoxMultipleProps);
|
|
69
69
|
export declare const SelectBox: React.ForwardRefExoticComponent<Pick<SelectBoxProps, "width" | "doNotHighlightSelectedItem" | "dropAreaWidth" | "busy" | "borderless" | "className" | "hideEmptyOption" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "data" | "autoFocus" | "disabled" | "readOnly" | "emptyOptionText" | "filterItems" | "filterInputAutoFocus" | "filterFunction" | "onFilterTextChanged" | "optionComponent" | "filterPlaceholder" | "label" | "mandatory" | "multiple" | "placeholder" | "guidingIcon" | "validationResult" | "onBlur" | "onChange" | "onFocus" | "validator" | "value"> & React.RefAttributes<DoughSelectBoxInputRef>>;
|
|
70
70
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode, Ref } from "react";
|
|
2
2
|
import { Colors, Sizes, DoughBooleanInputRef, DoughDataAttributes } from "../../../utils/constants";
|
|
3
3
|
import "./selection-inputs.scss";
|
|
4
|
-
export
|
|
4
|
+
export type DoughCheckBoxValue = true | false | 0 | 1 | -1 | undefined;
|
|
5
5
|
export declare enum CheckBoxAlignment {
|
|
6
6
|
CENTRAL = "central",
|
|
7
7
|
TOP = "top"
|
|
@@ -38,6 +38,6 @@ interface ActiveCheckBoxProps {
|
|
|
38
38
|
readOnly?: boolean;
|
|
39
39
|
onChange(value: DoughCheckBoxValue): void;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type CheckBoxProps = CommonCheckBoxProps & (DisabledCheckBoxProps | ReadonlyCheckBoxProps | ActiveCheckBoxProps);
|
|
42
42
|
export declare const CheckBox: React.ForwardRefExoticComponent<Pick<CheckBoxProps, "children" | "width" | "className" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "color" | "checkOnly" | "icon" | "disabled" | "readOnly" | "label" | "onChange" | "rounded" | "size" | "value" | "alignment"> & React.RefAttributes<DoughBooleanInputRef>>;
|
|
43
43
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { Colors, Sizes, DoughDataAttributes } from "../../../utils/constants";
|
|
3
|
-
export
|
|
3
|
+
export type DoughRadioGroupData = {
|
|
4
4
|
label: ReactNode;
|
|
5
5
|
value: string;
|
|
6
6
|
};
|
|
@@ -32,7 +32,7 @@ interface ActiveRadioGroupProps {
|
|
|
32
32
|
readOnly?: boolean;
|
|
33
33
|
onChange(value: string): void;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export type RadioGroupProps = CommonRadioGroupProps & (DisabledRadioGroupProps | ReadonlyRadioGroupProps | ActiveRadioGroupProps);
|
|
36
36
|
export declare const RadioGroup: {
|
|
37
37
|
(props: RadioGroupProps): JSX.Element;
|
|
38
38
|
displayName: string;
|
|
@@ -29,6 +29,6 @@ interface ActiveSwitchProps {
|
|
|
29
29
|
readOnly?: boolean;
|
|
30
30
|
onChange(value: boolean): void;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type SwitchProps = CommonSwitchProps & (DisabledSwitchProps | ReadonlySwitchProps | ActiveSwitchProps);
|
|
33
33
|
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "width" | "className" | "children" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "color" | "disabled" | "checkOnly" | "readOnly" | "label" | "onChange" | "value"> & React.RefAttributes<DoughBooleanInputRef>>;
|
|
34
34
|
export {};
|
|
@@ -44,6 +44,6 @@ interface ActiveNumericInputProps {
|
|
|
44
44
|
readOnly?: boolean;
|
|
45
45
|
onChange(value: number): void;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type NumericInputProps = CommonNumericInputProps & (DisabledNumericInputProps | ReadonlyNumericInputProps | ActiveNumericInputProps);
|
|
48
48
|
export declare const NumericInput: React.ForwardRefExoticComponent<Pick<NumericInputProps, "width" | "borderless" | "className" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "autoFocus" | "disabled" | "readOnly" | "label" | "mandatory" | "maxLength" | "max" | "min" | "onBlur" | "onChange" | "onFocus" | "onKeyDown" | "onKeyUp" | "onKeyPress" | "onPaste" | "pattern" | "placeholder" | "startElement" | "endElement" | "validator" | "validationResult" | "value"> & React.RefAttributes<DoughNumericInputRef>>;
|
|
49
49
|
export {};
|
|
@@ -45,6 +45,6 @@ interface ActiveTextAreaProps {
|
|
|
45
45
|
readOnly?: boolean;
|
|
46
46
|
onChange(value: string): void;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
48
|
+
export type TextAreaProps = CommonTextAreaProps & (DisabledTextAreaProps | ReadonlyTextAreaProps | ActiveTextAreaProps);
|
|
49
49
|
export declare const TextArea: React.ForwardRefExoticComponent<Pick<TextAreaProps, "autoCapitalize" | "width" | "borderless" | "allowOneLine" | "className" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "autoComplete" | "autoFocus" | "disabled" | "readOnly" | "endElement" | "label" | "mandatory" | "onBlur" | "onChange" | "onFocus" | "onKeyDown" | "onKeyPress" | "onKeyUp" | "onPaste" | "onScroll" | "maxLength" | "pattern" | "placeholder" | "startElement" | "validator" | "validationResult" | "value"> & React.RefAttributes<DoughTextInputRef>>;
|
|
50
50
|
export {};
|
|
@@ -44,6 +44,6 @@ interface ActiveTextInputProps {
|
|
|
44
44
|
readOnly?: boolean;
|
|
45
45
|
onChange(value: string): void;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type TextInputProps = CommonTextInputProps & (DisabledTextInputProps | ReadonlyTextInputProps | ActiveTextInputProps);
|
|
48
48
|
export declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "autoCapitalize" | "width" | "borderless" | "className" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "autoComplete" | "autoFocus" | "disabled" | "readOnly" | "inputType" | "label" | "mandatory" | "onBlur" | "onChange" | "onFocus" | "onKeyDown" | "onKeyUp" | "onKeyPress" | "onPaste" | "maxLength" | "pattern" | "placeholder" | "startElement" | "endElement" | "validator" | "validationResult" | "value"> & React.RefAttributes<DoughTextInputRef>>;
|
|
49
49
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import "./time-picker.scss";
|
|
3
3
|
import { DoughValidationResult, DoughDataAttributes } from "../../../utils/constants";
|
|
4
|
-
export
|
|
4
|
+
export type DoughTimeObject = {
|
|
5
5
|
hours?: number;
|
|
6
6
|
minutes?: number;
|
|
7
7
|
};
|
|
@@ -28,6 +28,6 @@ interface ActiveToggleProps {
|
|
|
28
28
|
readOnly?: boolean;
|
|
29
29
|
onChange(value: boolean): void;
|
|
30
30
|
}
|
|
31
|
-
export
|
|
31
|
+
export type ToggleProps = CommonToggleProps & (DisabledToggleProps | ReadonlyToggleProps | ActiveToggleProps);
|
|
32
32
|
export declare const Toggle: React.ForwardRefExoticComponent<Pick<ToggleProps, "className" | "inputClassName" | "dataAttributes" | "tabIndex" | "name" | "color" | "colorNotChecked" | "disabled" | "readOnly" | "icon" | "onChange" | "value" | "size"> & React.RefAttributes<DoughBooleanInputRef>>;
|
|
33
33
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export { Table } from "./components/containers/table/table";
|
|
|
57
57
|
export { TableRow, TableRowStyle, } from "./components/containers/table/table-row";
|
|
58
58
|
export { TableCell } from "./components/containers/table/table-cell";
|
|
59
59
|
export { Skeleton, SkeletonShape } from "./components/skeleton/skeleton";
|
|
60
|
-
export { Box, BoxAlign, BoxAlignment, BoxAlignContent, BoxDirection, BoxDisplay, BoxJustifyContent, BoxWrap, BoxOverflow, } from "./components/containers/box/box";
|
|
60
|
+
export { Box, BoxProps, BoxAlign, BoxAlignment, BoxAlignContent, BoxDirection, BoxDisplay, BoxJustifyContent, BoxWrap, BoxOverflow, } from "./components/containers/box/box";
|
|
61
61
|
export { Grid, GridContentAlignment, GridItemsAlignment, GridFlow, } from "./components/containers/grid/grid";
|
|
62
62
|
export { GridItem } from "./components/containers/grid/grid-item";
|
|
63
63
|
export { cancelEvent } from "./utils/event";
|