@digital-ai/dot-components 1.19.1 → 1.20.0
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/CHANGE_LOG.md +25 -4
- package/index.esm.js +2055 -1494
- package/index.umd.js +2096 -1530
- package/lib/components/alert-banner/AlertBanner.d.ts +3 -1
- package/lib/components/input-form-fields/InputFormFields.propTypes.d.ts +8 -0
- package/lib/components/input-form-fields/InputFormFields.styles.d.ts +4 -1
- package/lib/components/input-form-fields/InputLabel.d.ts +17 -0
- package/lib/components/input-form-fields/InputSelect.d.ts +1 -3
- package/lib/components/input-form-fields/InputText.d.ts +11 -4
- package/lib/components/navigation-rail/NavigationRail.d.ts +4 -0
- package/lib/components/navigation-rail/NavigationRail.stories.data.d.ts +9 -0
- package/lib/components/navigation-rail/NavigationRail.stories.styles.d.ts +2 -0
- package/lib/components/typography/Typography.d.ts +3 -1
- package/package.json +1 -1
|
@@ -9,9 +9,11 @@ export interface AlertBannerProps extends CommonProps {
|
|
|
9
9
|
children: ReactNode | string;
|
|
10
10
|
/** callback which is triggered when alert banner is closed */
|
|
11
11
|
onClose?: (event: MouseEvent) => void;
|
|
12
|
+
/** If true, the alert banner will have rounded corners */
|
|
13
|
+
roundedCorners?: boolean;
|
|
12
14
|
/** will determine color and icon being used */
|
|
13
15
|
severity: AlertBannerSeverity;
|
|
14
16
|
/** when specified, will control the text that is used inside the alert banner */
|
|
15
17
|
textVariant?: TypographyVariant;
|
|
16
18
|
}
|
|
17
|
-
export declare const DotAlertBanner: ({ action, ariaLabel, children, className, "data-testid": dataTestId, onClose, severity, textVariant, }: AlertBannerProps) => JSX.Element;
|
|
19
|
+
export declare const DotAlertBanner: ({ action, ariaLabel, children, className, "data-testid": dataTestId, onClose, roundedCorners, severity, textVariant, }: AlertBannerProps) => JSX.Element;
|
|
@@ -37,17 +37,25 @@ export interface InputProps extends CommonProps {
|
|
|
37
37
|
onKeyDown?: (event: KeyboardEvent) => void;
|
|
38
38
|
/** A function that executes when a user releases a mouse button over an element. */
|
|
39
39
|
onMouseUp?: (event: MouseEvent) => void;
|
|
40
|
+
/** If true, the label will be persistently displayed outside of the field */
|
|
41
|
+
persistentLabel?: boolean;
|
|
40
42
|
/** If true, the label is displayed as required and the input element` will be required. */
|
|
41
43
|
required?: boolean;
|
|
44
|
+
/** If specified, the label being shrunk/unshrunk must be controlled by the consumer */
|
|
45
|
+
shrink?: boolean;
|
|
42
46
|
/** Size of the input */
|
|
43
47
|
size?: inputSizeOptions;
|
|
44
48
|
/** Icon placed before the children. */
|
|
45
49
|
startIcon?: ReactNode;
|
|
50
|
+
/** If true, the label and field will be displayed in a success state */
|
|
51
|
+
success?: boolean;
|
|
46
52
|
/**
|
|
47
53
|
* Type of input should be a valid HTML 5 input type
|
|
48
54
|
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
49
55
|
*/
|
|
50
56
|
type?: string;
|
|
57
|
+
/** value of input field */
|
|
58
|
+
value?: string;
|
|
51
59
|
/** If true, the label will be displayed in an warning state. */
|
|
52
60
|
warning?: boolean;
|
|
53
61
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { TextField } from '@material-ui/core';
|
|
1
|
+
import { TextField, InputLabel } from '@material-ui/core';
|
|
2
2
|
export declare const rootClassName = "dot-text-field";
|
|
3
3
|
export declare const rootSelectClassName = "dot-select-field";
|
|
4
|
+
export declare const labelClassName = "dot-input-label";
|
|
4
5
|
export declare const warningClassName = "dot-warning";
|
|
6
|
+
export declare const successClassName = "dot-success";
|
|
5
7
|
export declare const adornmentIconClassName = "dot-adornment-icon";
|
|
6
8
|
export declare const StyledAdornment: import("styled-components").StyledComponent<import("@material-ui/core/OverridableComponent").OverridableComponent<import("@material-ui/core").InputAdornmentTypeMap<{}, "div">>, any, {}, never>;
|
|
9
|
+
export declare const StyledInputLabel: import("styled-components").StyledComponent<typeof InputLabel, any, {}, never>;
|
|
7
10
|
export declare const StyledTextField: import("styled-components").StyledComponent<typeof TextField, any, {}, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface InputLabelProps {
|
|
3
|
+
/** If true, the input will be disabled. */
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
/** If true, the label will be displayed in an error state. */
|
|
6
|
+
error?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* id to identify the element, also used to create label "for" and helper text id attribute
|
|
9
|
+
* values while it's optional, it is considered required for accessiblity best practice.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/** The label content. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** If true, the label is displayed as required and the input element` will be required. */
|
|
15
|
+
required?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const DotInputLabel: ({ disabled, error, id, label, required, }: InputLabelProps) => JSX.Element;
|
|
@@ -12,7 +12,5 @@ export interface InputSelectProps extends InputProps {
|
|
|
12
12
|
defaultValue?: string;
|
|
13
13
|
/** options of select dropdown */
|
|
14
14
|
options: Array<OptionType>;
|
|
15
|
-
/** value of input field */
|
|
16
|
-
value?: string;
|
|
17
15
|
}
|
|
18
|
-
export declare const DotInputSelect: ({ ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, disabled, endIcon, error, fullWidth, helperText, id, inputRef, label, name, onBlur, onChange, onFocus, onKeyDown, options, required, size, startIcon, value, warning, }: InputSelectProps) => JSX.Element;
|
|
16
|
+
export declare const DotInputSelect: ({ ariaLabel, autoFocus, className, "data-testid": dataTestId, defaultValue, disabled, endIcon, error, fullWidth, helperText, id, inputRef, label, name, onBlur, onChange, onFocus, onKeyDown, options, persistentLabel, required, shrink, size, startIcon, success, value, warning, }: InputSelectProps) => JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
import { InputProps } from './InputFormFields.propTypes';
|
|
3
3
|
export declare const DELAY_MS = 300;
|
|
4
|
+
export declare type endAdornmentIconType = 'warning' | 'error' | 'check';
|
|
4
5
|
export interface InputTextProps extends InputProps {
|
|
5
6
|
/** The HTML autocomplete property to pass along to the input tag. Used for
|
|
6
7
|
controlling autofill behavior in forms. This property follows this HTML spec:
|
|
@@ -20,7 +21,13 @@ export interface InputTextProps extends InputProps {
|
|
|
20
21
|
rows?: number;
|
|
21
22
|
/** max of rows for multiline line */
|
|
22
23
|
rowsMax?: number;
|
|
23
|
-
/** value of the InputText */
|
|
24
|
-
value?: string;
|
|
25
24
|
}
|
|
26
|
-
export
|
|
25
|
+
export interface EndIconProps {
|
|
26
|
+
dataTestId?: string;
|
|
27
|
+
endAdornmentTooltip?: string;
|
|
28
|
+
endIcon?: ReactNode;
|
|
29
|
+
error?: boolean;
|
|
30
|
+
success?: boolean;
|
|
31
|
+
warning?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export declare const DotInputText: ({ autoComplete, autoFocus, className, defaultValue, "data-testid": dataTestId, disabled, error, endAdornmentTooltip, fullWidth, hasDebounce, helperText, endIcon, id, inputRef, label, multiline, name, onBlur, onChange, onFocus, onKeyDown, onMouseUp, persistentLabel, placeholder, readOnly, required, rows, rowsMax, shrink, startIcon, size, success, type, value, warning, }: InputTextProps) => JSX.Element;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CommonProps } from '../CommonProps';
|
|
3
|
+
import { BadgeProps } from '../badge';
|
|
3
4
|
export declare type RailItemsPosition = 'flex-start' | 'center' | 'flex-end';
|
|
5
|
+
export declare type RailIconBadge = Omit<BadgeProps, 'children'>;
|
|
4
6
|
export interface RailItem {
|
|
5
7
|
/** Defines a string value that labels the current element **/
|
|
6
8
|
ariaLabel?: string;
|
|
9
|
+
/** Optional badge which will be displayed over an icon **/
|
|
10
|
+
iconBadge?: RailIconBadge;
|
|
7
11
|
/** Id of the icon shown in the rail item */
|
|
8
12
|
iconId: string;
|
|
9
13
|
/** text displayed or title text if icon used */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RailItem } from './NavigationRail';
|
|
2
|
+
export interface BadgeCount {
|
|
3
|
+
activity: number;
|
|
4
|
+
conditions: number;
|
|
5
|
+
properties: number;
|
|
6
|
+
scheduling: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const mockRailItems: Array<RailItem>;
|
|
9
|
+
export declare const getBadgeRailItems: ({ activity, conditions, properties, scheduling, }: BadgeCount) => RailItem[];
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const programmaticNavigationClassName = "dot-programmatic-navigation-story";
|
|
2
|
+
export declare const withBadgesClassName = "dot-with-badges-story";
|
|
2
3
|
export declare const StyledWithProgrammaticNavigation: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const StyledWithBadges: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -6,9 +6,11 @@ export interface TypographyProps extends CommonProps {
|
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
/** The component used for the root node. Either a string to use a HTML element or a component. */
|
|
8
8
|
component?: ElementType;
|
|
9
|
+
/** If true, the typography will not have a bottom margin set */
|
|
10
|
+
noMarginBottom?: boolean;
|
|
9
11
|
/** If true, the text will wrap and not be truncated */
|
|
10
12
|
noWrap?: boolean;
|
|
11
13
|
/** Applies the theme typography styles. */
|
|
12
14
|
variant?: TypographyVariant;
|
|
13
15
|
}
|
|
14
|
-
export declare const DotTypography: ({ ariaLabel, className, "data-testid": dataTestId, children, component, noWrap, variant, }: TypographyProps) => JSX.Element;
|
|
16
|
+
export declare const DotTypography: ({ ariaLabel, className, "data-testid": dataTestId, children, component, noMarginBottom, noWrap, variant, }: TypographyProps) => JSX.Element;
|