react-magma-dom 3.8.0 → 3.9.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/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
- package/dist/components/Hyperlink/Hyperlink.stories.d.ts +30 -2
- package/dist/components/Hyperlink/index.d.ts +19 -3
- package/dist/components/Input/Input.stories.d.ts +19 -0
- package/dist/components/InputBase/index.d.ts +8 -0
- package/dist/components/Modal/Modal.d.ts +4 -0
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +15 -0
- package/dist/components/ProgressBar/index.d.ts +1 -1
- package/dist/components/Stepper/Step.d.ts +53 -0
- package/dist/components/Stepper/Stepper.d.ts +53 -0
- package/dist/components/Stepper/Stepper.stories.d.ts +6 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/esm/index.js +603 -190
- package/dist/esm/index.js.map +1 -1
- package/dist/i18n/interface.d.ts +5 -0
- package/dist/index.d.ts +3 -1
- package/dist/properties.json +351 -101
- package/dist/react-magma-dom.cjs.development.js +595 -188
- package/dist/react-magma-dom.cjs.development.js.map +1 -1
- package/dist/react-magma-dom.cjs.production.min.js +1 -1
- package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { HyperlinkIconPosition } from '.';
|
|
2
3
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
4
|
export default _default;
|
|
4
|
-
export declare const Default:
|
|
5
|
-
|
|
5
|
+
export declare const Default: {
|
|
6
|
+
(args: any): JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
styledAs: string;
|
|
9
|
+
isInverse: boolean;
|
|
10
|
+
to: string;
|
|
11
|
+
hasUnderline: boolean;
|
|
12
|
+
icon: JSX.Element;
|
|
13
|
+
iconPosition: HyperlinkIconPosition;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const All: {
|
|
17
|
+
(args: any): JSX.Element;
|
|
18
|
+
args: {};
|
|
19
|
+
parameters: {
|
|
20
|
+
controls: {
|
|
21
|
+
exclude: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const Inverse: {
|
|
26
|
+
(args: any): JSX.Element;
|
|
27
|
+
args: {};
|
|
28
|
+
parameters: {
|
|
29
|
+
controls: {
|
|
30
|
+
exclude: string[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonStyles } from '../Button';
|
|
3
3
|
import { Omit } from '../../utils';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { IconProps } from 'react-magma-icons';
|
|
5
|
+
export declare enum HyperlinkIconPosition {
|
|
6
|
+
left = "left",
|
|
7
|
+
right = "right",
|
|
8
|
+
both = "both"
|
|
9
|
+
}
|
|
7
10
|
export interface HyperlinkProps extends ButtonStyles, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> {
|
|
11
|
+
/**
|
|
12
|
+
* @children required
|
|
13
|
+
*/
|
|
8
14
|
children: React.ReactNode;
|
|
9
15
|
/**
|
|
10
16
|
* How the hyperlink is styled (can look like either a plain link or a button)
|
|
@@ -19,5 +25,15 @@ export interface HyperlinkProps extends ButtonStyles, Omit<React.AnchorHTMLAttri
|
|
|
19
25
|
* The href value of the link
|
|
20
26
|
*/
|
|
21
27
|
to: string;
|
|
28
|
+
hasUnderline?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Icon to display within the component
|
|
31
|
+
*/
|
|
32
|
+
icon?: React.ReactElement<IconProps> | Array<React.ReactElement<IconProps>>;
|
|
33
|
+
/**
|
|
34
|
+
* Position within the link for the icon to appear
|
|
35
|
+
* @default HyperlinkIconPosition.right
|
|
36
|
+
*/
|
|
37
|
+
iconPosition?: HyperlinkIconPosition;
|
|
22
38
|
}
|
|
23
39
|
export declare const Hyperlink: React.ForwardRefExoticComponent<HyperlinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -35,11 +35,13 @@ export declare const IconPositions: {
|
|
|
35
35
|
iconAriaLabel?: string;
|
|
36
36
|
iconRef?: React.Ref<HTMLButtonElement>;
|
|
37
37
|
inputStyle?: React.CSSProperties;
|
|
38
|
+
inputWrapperStyle?: React.CSSProperties;
|
|
38
39
|
isClearable?: boolean;
|
|
39
40
|
onClear?: () => void;
|
|
40
41
|
isPredictive?: boolean;
|
|
41
42
|
onIconClick?: () => void;
|
|
42
43
|
onIconKeyDown?: (event: any) => void;
|
|
44
|
+
onDateChange?: (event: any) => void;
|
|
43
45
|
theme?: any;
|
|
44
46
|
type?: InputType;
|
|
45
47
|
isPasswordInput?: boolean;
|
|
@@ -364,11 +366,13 @@ export declare const WithChildren: {
|
|
|
364
366
|
iconAriaLabel?: string;
|
|
365
367
|
iconRef?: React.Ref<HTMLButtonElement>;
|
|
366
368
|
inputStyle?: React.CSSProperties;
|
|
369
|
+
inputWrapperStyle?: React.CSSProperties;
|
|
367
370
|
isClearable?: boolean;
|
|
368
371
|
onClear?: () => void;
|
|
369
372
|
isPredictive?: boolean;
|
|
370
373
|
onIconClick?: () => void;
|
|
371
374
|
onIconKeyDown?: (event: any) => void;
|
|
375
|
+
onDateChange?: (event: any) => void;
|
|
372
376
|
theme?: any;
|
|
373
377
|
type?: InputType;
|
|
374
378
|
isPasswordInput?: boolean;
|
|
@@ -691,11 +695,13 @@ export declare const WithTwoIcons: {
|
|
|
691
695
|
iconAriaLabel?: string;
|
|
692
696
|
iconRef?: React.Ref<HTMLButtonElement>;
|
|
693
697
|
inputStyle?: React.CSSProperties;
|
|
698
|
+
inputWrapperStyle?: React.CSSProperties;
|
|
694
699
|
isClearable?: boolean;
|
|
695
700
|
onClear?: () => void;
|
|
696
701
|
isPredictive?: boolean;
|
|
697
702
|
onIconClick?: () => void;
|
|
698
703
|
onIconKeyDown?: (event: any) => void;
|
|
704
|
+
onDateChange?: (event: any) => void;
|
|
699
705
|
theme?: any;
|
|
700
706
|
type?: InputType;
|
|
701
707
|
isPasswordInput?: boolean;
|
|
@@ -991,3 +997,16 @@ export declare const WithTwoIcons: {
|
|
|
991
997
|
};
|
|
992
998
|
};
|
|
993
999
|
};
|
|
1000
|
+
export declare const NumberInput: {
|
|
1001
|
+
(args: any): JSX.Element;
|
|
1002
|
+
args: {
|
|
1003
|
+
disabled: boolean;
|
|
1004
|
+
helperMessage: string;
|
|
1005
|
+
isClearable: boolean;
|
|
1006
|
+
};
|
|
1007
|
+
parameters: {
|
|
1008
|
+
controls: {
|
|
1009
|
+
exclude: string[];
|
|
1010
|
+
};
|
|
1011
|
+
};
|
|
1012
|
+
};
|
|
@@ -64,6 +64,10 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
64
64
|
* Style properties for the input element
|
|
65
65
|
*/
|
|
66
66
|
inputStyle?: React.CSSProperties;
|
|
67
|
+
/**
|
|
68
|
+
* Style properties for input wrapper element
|
|
69
|
+
*/
|
|
70
|
+
inputWrapperStyle?: React.CSSProperties;
|
|
67
71
|
/**
|
|
68
72
|
* Total number of characters in an input.
|
|
69
73
|
*/
|
|
@@ -99,6 +103,10 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
99
103
|
* Action that will fire when icon receives keypress
|
|
100
104
|
*/
|
|
101
105
|
onIconKeyDown?: (event: any) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Action that will synchronize chosenDate with input value
|
|
108
|
+
*/
|
|
109
|
+
onDateChange?: (event: any) => void;
|
|
102
110
|
/**
|
|
103
111
|
* @internal
|
|
104
112
|
*/
|
|
@@ -11,6 +11,10 @@ export declare enum ModalSize {
|
|
|
11
11
|
* @children required
|
|
12
12
|
*/
|
|
13
13
|
export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
/**
|
|
15
|
+
* Custom aria label ONLY for modals that do not have a header
|
|
16
|
+
*/
|
|
17
|
+
ariaLabel?: string;
|
|
14
18
|
/**
|
|
15
19
|
* The text read by screen readers for the close button
|
|
16
20
|
* @default "Close dialog"
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ProgressBarProps } from '.';
|
|
2
3
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
4
|
export default _default;
|
|
4
5
|
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ProgressBarProps>;
|
|
5
6
|
export declare const Inverse: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ProgressBarProps>;
|
|
7
|
+
export declare const CustomColor: {
|
|
8
|
+
(args: any): JSX.Element;
|
|
9
|
+
args: {
|
|
10
|
+
percentage: number;
|
|
11
|
+
isInverse: boolean;
|
|
12
|
+
height: string;
|
|
13
|
+
color: string;
|
|
14
|
+
};
|
|
15
|
+
parameters: {
|
|
16
|
+
controls: {
|
|
17
|
+
exclude: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -4,7 +4,7 @@ export interface ProgressBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
* The color variant of the progress bar
|
|
5
5
|
* @default ProgressBarColor.primary
|
|
6
6
|
*/
|
|
7
|
-
color?: ProgressBarColor;
|
|
7
|
+
color?: ProgressBarColor | string;
|
|
8
8
|
/**
|
|
9
9
|
* The height of the progress bar. Can be a string or number; if number is provided height is in px
|
|
10
10
|
* @default 8
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
3
|
+
import { StepperLayout } from './Stepper';
|
|
4
|
+
export interface StepProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Error state for each step.
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
hasError?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
layout?: StepperLayout;
|
|
14
|
+
/**
|
|
15
|
+
* Label beneath each step.
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Sub label beneath each step.
|
|
20
|
+
*/
|
|
21
|
+
secondaryLabel?: string;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
stepStatus?: StepStatus;
|
|
26
|
+
/**
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
index?: number;
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
isInverse?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
stepLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
testId?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
theme?: ThemeInterface;
|
|
46
|
+
}
|
|
47
|
+
export declare enum StepStatus {
|
|
48
|
+
active = "active",
|
|
49
|
+
completed = "completed",
|
|
50
|
+
incomplete = "incomplete"
|
|
51
|
+
}
|
|
52
|
+
export declare const HiddenLabelText: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "slot" | "style" | "title" | "color" | "translate" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css">, ThemeInterface>;
|
|
53
|
+
export declare const Step: React.ForwardRefExoticComponent<StepProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
3
|
+
export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Customizable aria-label for accessibility.
|
|
10
|
+
*/
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom number for responsive styling, uses a minimum 'breakpoint' width from the set number.
|
|
14
|
+
*/
|
|
15
|
+
breakpoint?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Changes the Stepper view for responsive layouts, needs a minimum 'breakpoint' number.
|
|
18
|
+
*/
|
|
19
|
+
breakpointLayout?: StepperLayout;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the Stepper view
|
|
22
|
+
* @default StepperLayout.showLabels
|
|
23
|
+
*/
|
|
24
|
+
layout?: StepperLayout;
|
|
25
|
+
/**
|
|
26
|
+
* Sets a custom label for the Step count # of #.
|
|
27
|
+
* @default 'Step'
|
|
28
|
+
*/
|
|
29
|
+
stepLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Sets a custom label for the completed Step.
|
|
32
|
+
* @default 'All steps completed'
|
|
33
|
+
*/
|
|
34
|
+
completionLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Current step value.
|
|
37
|
+
*/
|
|
38
|
+
currentStep: number;
|
|
39
|
+
/**
|
|
40
|
+
* Inverse styling.
|
|
41
|
+
*/
|
|
42
|
+
isInverse?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
theme?: ThemeInterface;
|
|
47
|
+
}
|
|
48
|
+
export declare enum StepperLayout {
|
|
49
|
+
showLabels = "showLabels",
|
|
50
|
+
hideLabels = "hideLabels",
|
|
51
|
+
summaryView = "summaryView"
|
|
52
|
+
}
|
|
53
|
+
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { StepperProps } from './';
|
|
2
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, StepperProps>;
|
|
5
|
+
export declare const RealWorldExample: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, StepperProps>;
|
|
6
|
+
export declare const WithError: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, StepperProps>;
|