@muraldevkit/ui-toolkit 1.16.1 → 1.16.3
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/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -1
- package/dist/components/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +1 -1
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +6 -3
- package/dist/components/form/select/MrlSelectMenu/MrlSelectMenu.d.ts +1 -6
- package/dist/components/form/select/context/SelectContext.d.ts +9 -2
- package/dist/components/form/select/index.d.ts +1 -1
- package/dist/components/svg/MrlSvg/MrlSvg.d.ts +2 -0
- package/dist/components/svg/MrlSvgAnimate/MrlSvgAnimate.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlSelectItem/module.scss +4 -0
- package/package.json +12 -11
|
@@ -5,5 +5,5 @@ import './MrlAnimatedIconButton.scss';
|
|
|
5
5
|
interface MrlAnimatedIconButtonProps extends Omit<MrlIconButtonProps, 'icon'> {
|
|
6
6
|
icon: MrlSvgAnimateProps;
|
|
7
7
|
}
|
|
8
|
-
export declare const MrlAnimatedIconButton: React.ForwardRefExoticComponent<Pick<MrlAnimatedIconButtonProps, "form" | "slot" | "style" | "title" | "text" | "dir" | "className" | "color" | "size" | "attrs" | "onClick" | "children" | "
|
|
8
|
+
export declare const MrlAnimatedIconButton: React.ForwardRefExoticComponent<Pick<MrlAnimatedIconButtonProps, "form" | "slot" | "style" | "title" | "text" | "dir" | "className" | "color" | "size" | "attrs" | "onClick" | "children" | "id" | "defaultValue" | "state" | "disabled" | "kind" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "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" | "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" | "name" | "type" | "key" | "value" | "badge" | "disableEvents" | "icon" | "position" | "toggleAria" | "toggleStyle" | "tipAnchor" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
export {};
|
|
@@ -67,5 +67,5 @@ interface MrlButtonProps extends Omit<MrlComponentProps, 'style'>, React.Compone
|
|
|
67
67
|
*/
|
|
68
68
|
toggleStyle?: ToggleStyle;
|
|
69
69
|
}
|
|
70
|
-
export declare const MrlButton: React.ForwardRefExoticComponent<Pick<MrlButtonProps, "form" | "slot" | "style" | "title" | "text" | "dir" | "className" | "color" | "size" | "attrs" | "onClick" | "children" | "
|
|
70
|
+
export declare const MrlButton: React.ForwardRefExoticComponent<Pick<MrlButtonProps, "form" | "slot" | "style" | "title" | "text" | "dir" | "className" | "color" | "size" | "attrs" | "onClick" | "children" | "id" | "defaultValue" | "state" | "disabled" | "kind" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "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" | "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" | "name" | "type" | "key" | "value" | "badge" | "disableEvents" | "icon" | "toggleAria" | "toggleStyle" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "iconPos"> & React.RefAttributes<HTMLButtonElement>>;
|
|
71
71
|
export {};
|
|
@@ -71,4 +71,4 @@ export interface MrlIconButtonProps extends Omit<MrlComponentProps, 'style'>, Re
|
|
|
71
71
|
*/
|
|
72
72
|
toggleStyle?: ToggleStyle;
|
|
73
73
|
}
|
|
74
|
-
export declare const MrlIconButton: React.ForwardRefExoticComponent<Pick<MrlIconButtonProps, "form" | "slot" | "style" | "title" | "text" | "dir" | "className" | "color" | "size" | "attrs" | "onClick" | "children" | "
|
|
74
|
+
export declare const MrlIconButton: React.ForwardRefExoticComponent<Pick<MrlIconButtonProps, "form" | "slot" | "style" | "title" | "text" | "dir" | "className" | "color" | "size" | "attrs" | "onClick" | "children" | "id" | "defaultValue" | "state" | "disabled" | "kind" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "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" | "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" | "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" | "name" | "type" | "key" | "value" | "badge" | "disableEvents" | "icon" | "position" | "toggleAria" | "toggleStyle" | "tipAnchor" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -6,8 +6,11 @@ export interface MrlSelectProptypes extends React.HTMLAttributes<HTMLDivElement>
|
|
|
6
6
|
hookChange?: (newValue?: string) => void | undefined;
|
|
7
7
|
/** State of the select element based on user actions or permissions */
|
|
8
8
|
state?: SelectStates;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/**
|
|
10
|
+
* By default, we will select the first item in the list.
|
|
11
|
+
* To select a different option by default, pass that item’s value as the defaultValue to the mrlSelect element.
|
|
12
|
+
*/
|
|
13
|
+
defaultValue?: string;
|
|
11
14
|
/**
|
|
12
15
|
* Because this is a custom element, we can't use a standard "for" attribute setup. The label
|
|
13
16
|
* element needs to have an id and then we reference via the select with aria
|
|
@@ -47,4 +50,4 @@ export interface MrlSelectProptypes extends React.HTMLAttributes<HTMLDivElement>
|
|
|
47
50
|
* @param {MrlSelectProptypes} props the props for your MrlLink
|
|
48
51
|
* @returns {React.ReactElement} an a element containing the text you pass
|
|
49
52
|
*/
|
|
50
|
-
export declare const MrlSelect: ({ attrs, children, kind, labelId, size,
|
|
53
|
+
export declare const MrlSelect: ({ attrs, children, kind, labelId, size, id, ...theRest }: MrlSelectProptypes) => React.ReactElement;
|
|
@@ -11,11 +11,6 @@ export interface MrlSelectMenuProptypes extends React.HTMLAttributes<HTMLDivElem
|
|
|
11
11
|
* Set it to the index of the focused item
|
|
12
12
|
*/
|
|
13
13
|
focused?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Allows the select component to pass through which item should be selected
|
|
16
|
-
* Set it to the id of the selected item
|
|
17
|
-
*/
|
|
18
|
-
selected?: string;
|
|
19
14
|
/**
|
|
20
15
|
* Applies additional HTML attributes to the `mrl-select-menu` elements
|
|
21
16
|
* It is recommended only to use when overwriting an attribute
|
|
@@ -44,4 +39,4 @@ export interface MrlSelectMenuProptypes extends React.HTMLAttributes<HTMLDivElem
|
|
|
44
39
|
* @param {MrlSelectMenuProptypes} props MrlSelectMenuProptypes
|
|
45
40
|
* @returns {React.ReactElement} returns a MrlSelectMenu
|
|
46
41
|
*/
|
|
47
|
-
export declare const MrlSelectMenu: ({ attrs, children,
|
|
42
|
+
export declare const MrlSelectMenu: ({ attrs, children, labelId, position, ...theRest }: MrlSelectMenuProptypes) => React.ReactElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { SelectStates } from '../../constants';
|
|
2
3
|
type Action = {
|
|
3
4
|
type: 'open';
|
|
4
5
|
} | {
|
|
@@ -13,6 +14,9 @@ type Action = {
|
|
|
13
14
|
} | {
|
|
14
15
|
type: 'select';
|
|
15
16
|
payload: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'selectedText';
|
|
19
|
+
payload: React.ReactNode;
|
|
16
20
|
};
|
|
17
21
|
type Dispatch = (action: Action) => void;
|
|
18
22
|
type State = {
|
|
@@ -20,13 +24,16 @@ type State = {
|
|
|
20
24
|
focus: boolean;
|
|
21
25
|
disabled: boolean;
|
|
22
26
|
focusIndex?: number;
|
|
23
|
-
|
|
27
|
+
selectedItem?: string;
|
|
28
|
+
selectedText?: React.ReactNode;
|
|
24
29
|
id?: string;
|
|
25
30
|
};
|
|
26
31
|
type SelectProviderProps = {
|
|
27
32
|
children: React.ReactNode;
|
|
28
33
|
hookChange?: (newValue?: string) => void | undefined;
|
|
29
34
|
id?: string;
|
|
35
|
+
selectState?: SelectStates;
|
|
36
|
+
defaultValue?: string;
|
|
30
37
|
};
|
|
31
38
|
/**
|
|
32
39
|
* Select provider
|
|
@@ -34,7 +41,7 @@ type SelectProviderProps = {
|
|
|
34
41
|
* @param {SelectProviderProps} props SelectProvider props
|
|
35
42
|
* @returns {React.ReactElement} returns a booted select provider.
|
|
36
43
|
*/
|
|
37
|
-
declare function SelectProvider({ children, hookChange, id }: SelectProviderProps): React.ReactElement;
|
|
44
|
+
declare function SelectProvider({ children, hookChange, id, defaultValue, selectState }: SelectProviderProps): React.ReactElement;
|
|
38
45
|
/**
|
|
39
46
|
* useSelect hook
|
|
40
47
|
*
|
|
@@ -6,4 +6,4 @@ import { MrlSelectProptypes } from './MrlSelect';
|
|
|
6
6
|
* @param {MrlSelectProptypes} props MrlSelectProptypes
|
|
7
7
|
* @returns {React.ReactElement} returns a MrlSelect wrapped in a select provider.
|
|
8
8
|
*/
|
|
9
|
-
export declare const MrlSelect: ({ hookChange, id, children, ...rest }: MrlSelectProptypes) => React.ReactElement;
|
|
9
|
+
export declare const MrlSelect: ({ hookChange, id, defaultValue, state, children, ...rest }: MrlSelectProptypes) => React.ReactElement;
|
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { MrlComponentProps } from '../../../utils';
|
|
3
3
|
import { SVGSize } from '../constants';
|
|
4
4
|
export interface SvgPropTypes extends Omit<MrlComponentProps, 'style'>, React.ComponentProps<'svg'> {
|
|
5
|
+
/** Any additional classes to style the SVG's container */
|
|
6
|
+
className?: string;
|
|
5
7
|
/**
|
|
6
8
|
* @todo: Add optional path prop to point to a static SVG url
|
|
7
9
|
* @todo: Make SVG prop optional and must pass one of path or SVG
|
|
@@ -4,6 +4,8 @@ import { AnimatedState } from '../constants';
|
|
|
4
4
|
* Props for MrlSvgAnimate component
|
|
5
5
|
*/
|
|
6
6
|
export interface MrlSvgAnimateProps {
|
|
7
|
+
/** Any additional classes to style the SVG's container */
|
|
8
|
+
className?: string;
|
|
7
9
|
/**
|
|
8
10
|
* JSON file contents used by Lottie to generate an animated SVG to render.
|
|
9
11
|
* This attribute is mutually exclusive with fullPath and cdnFile.
|