@muraldevkit/ui-toolkit 1.11.0 → 1.12.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/button/MrlAnimatedIconButton/MrlAnimatedIconButton.d.ts +1 -1
- package/dist/components/button/MrlButton/MrlButton.d.ts +3 -3
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/text/MrlText/MrlText.d.ts +38 -0
- package/dist/components/text/MrlText/index.d.ts +1 -0
- package/dist/components/text/MrlTextHeading/MrlTextHeading.d.ts +31 -0
- package/dist/components/text/MrlTextHeading/index.d.ts +1 -0
- package/dist/components/text/constants.d.ts +44 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlText/module.scss +14 -0
- package/dist/styles/MrlText/variables.scss +39 -0
- package/dist/styles/MrlTextHeading/module.scss +35 -0
- package/dist/styles/MrlTextHeading/variables.scss +53 -0
- package/package.json +1 -1
|
@@ -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<MrlAnimatedIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export declare const MrlAnimatedIconButton: React.ForwardRefExoticComponent<Pick<MrlAnimatedIconButtonProps, "className" | "color" | "size" | "attrs" | "onClick" | "text" | "form" | "style" | "title" | "children" | "role" | "name" | "slot" | "id" | "lang" | "type" | "tabIndex" | "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" | "key" | "value" | "state" | "position" | "kind" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "inputMode" | "is" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "disabled" | "badge" | "disableEvents" | "icon" | "toggleAria" | "toggleStyle" | "tipAnchor" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MrlButtonKind, MrlButtonSize, MrlButtonState, ToggleAria, ToggleStyle, IconPosition } from '../constants';
|
|
3
|
-
import { AttrsObject } from '../../../utils';
|
|
3
|
+
import { AttrsObject, MrlComponentProps } from '../../../utils';
|
|
4
4
|
import './MrlButton.global.scss';
|
|
5
|
-
interface MrlButtonProps {
|
|
5
|
+
interface MrlButtonProps extends Omit<MrlComponentProps, 'style'>, React.ComponentProps<'button'> {
|
|
6
6
|
/**
|
|
7
7
|
* Applies additional HTML attributes to the button element.
|
|
8
8
|
*/
|
|
@@ -71,5 +71,5 @@ interface MrlButtonProps {
|
|
|
71
71
|
*/
|
|
72
72
|
toggleStyle?: ToggleStyle;
|
|
73
73
|
}
|
|
74
|
-
export declare const MrlButton: React.ForwardRefExoticComponent<MrlButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
74
|
+
export declare const MrlButton: React.ForwardRefExoticComponent<Pick<MrlButtonProps, "className" | "color" | "size" | "attrs" | "onClick" | "text" | "form" | "style" | "title" | "children" | "role" | "name" | "slot" | "id" | "lang" | "type" | "tabIndex" | "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" | "key" | "value" | "state" | "kind" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "inputMode" | "is" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "disabled" | "badge" | "disableEvents" | "icon" | "toggleAria" | "toggleStyle" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "iconPos"> & React.RefAttributes<HTMLButtonElement>>;
|
|
75
75
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MrlButtonKind, MrlButtonSize, MrlButtonState, MrlGhostIconButtonSize, ToggleAria, ToggleStyle } from '../constants';
|
|
3
|
-
import { AttrsObject } from '../../../utils';
|
|
3
|
+
import { AttrsObject, MrlComponentProps } from '../../../utils';
|
|
4
4
|
import { MrlTooltipAnchor, MrlTooltipPosition } from '../../tooltip/constants';
|
|
5
5
|
import './MrlIconButton.scss';
|
|
6
|
-
export interface MrlIconButtonProps {
|
|
6
|
+
export interface MrlIconButtonProps extends Omit<MrlComponentProps, 'style'>, React.ComponentProps<'button'> {
|
|
7
7
|
/**
|
|
8
8
|
* Applies additional HTML attributes to the button element.
|
|
9
9
|
*/
|
|
@@ -71,4 +71,4 @@ export interface MrlIconButtonProps {
|
|
|
71
71
|
*/
|
|
72
72
|
toggleStyle?: ToggleStyle;
|
|
73
73
|
}
|
|
74
|
-
export declare const MrlIconButton: React.ForwardRefExoticComponent<MrlIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
74
|
+
export declare const MrlIconButton: React.ForwardRefExoticComponent<Pick<MrlIconButtonProps, "className" | "color" | "size" | "attrs" | "onClick" | "text" | "form" | "style" | "title" | "children" | "role" | "name" | "slot" | "id" | "lang" | "type" | "tabIndex" | "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" | "key" | "value" | "state" | "position" | "kind" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "inputMode" | "is" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "disabled" | "badge" | "disableEvents" | "icon" | "toggleAria" | "toggleStyle" | "tipAnchor" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AttrsObject } from '../../../utils';
|
|
3
|
+
import { TextHierarchies, TextKinds, TextSizes } from '../constants';
|
|
4
|
+
interface CommonProps {
|
|
5
|
+
/** Applies additional HTML attributes to the text element */
|
|
6
|
+
attrs?: AttrsObject;
|
|
7
|
+
/** Children to be rendered within the text component */
|
|
8
|
+
children?: React.ReactNode | string;
|
|
9
|
+
/** Hierarchy level within the use case and sizing scales */
|
|
10
|
+
hierarchy?: TextHierarchies;
|
|
11
|
+
/** Textual content when it's a static string; if you have nested elements, use children to provide content */
|
|
12
|
+
text?: string;
|
|
13
|
+
}
|
|
14
|
+
interface DefaultKindWithSize extends CommonProps {
|
|
15
|
+
/**
|
|
16
|
+
* Visual kind of the text
|
|
17
|
+
* If the value is default it allows to change the "size" prop
|
|
18
|
+
*/
|
|
19
|
+
kind: 'default';
|
|
20
|
+
/** Visual size of the text, only applies if kind="default" */
|
|
21
|
+
size: TextSizes;
|
|
22
|
+
}
|
|
23
|
+
interface KindWithoutSize extends CommonProps {
|
|
24
|
+
/**
|
|
25
|
+
* Visual kind of the text
|
|
26
|
+
* If the value is default it allows to change the "size" prop
|
|
27
|
+
*/
|
|
28
|
+
kind: Exclude<TextKinds, 'default'>;
|
|
29
|
+
}
|
|
30
|
+
type MrlTextProps = DefaultKindWithSize | KindWithoutSize;
|
|
31
|
+
/**
|
|
32
|
+
* MrlText Component
|
|
33
|
+
*
|
|
34
|
+
* @param {MrlTextProps} props - MrlText component props
|
|
35
|
+
* @returns a paragraph element
|
|
36
|
+
*/
|
|
37
|
+
export declare function MrlText(props: MrlTextProps): JSX.Element;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlText';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AttrsObject } from '../../../utils';
|
|
3
|
+
import { LevelType, HeadingSizes, TextSizes, TextHierarchies, HeadingKinds } from '../constants';
|
|
4
|
+
interface MrlTextHeadingProps {
|
|
5
|
+
/** Applies additional HTML attributes to the text element */
|
|
6
|
+
attrs?: AttrsObject;
|
|
7
|
+
/** Children to be rendered within the text heading component */
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/** Set the semantic level of the heading based on its usage in the page hierarchy */
|
|
10
|
+
level?: LevelType;
|
|
11
|
+
/** Visual styling use case for the heading */
|
|
12
|
+
kind?: HeadingKinds;
|
|
13
|
+
/**
|
|
14
|
+
* Visual size of the heading
|
|
15
|
+
* xsmall and xxsmall are only supported when kind="title"
|
|
16
|
+
*/
|
|
17
|
+
size?: HeadingSizes | TextSizes;
|
|
18
|
+
/** Clear and concise description of the content that the heading describes */
|
|
19
|
+
text?: string;
|
|
20
|
+
/** Hierarchy level within the use case and sizing scales */
|
|
21
|
+
hierarchy?: TextHierarchies;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* MuralTextHeading component
|
|
25
|
+
* Used for creating semantic headings within a page
|
|
26
|
+
*
|
|
27
|
+
* @param {MrlTextHeadingProps} props - MrlTextHeading component props
|
|
28
|
+
* @returns a heading element
|
|
29
|
+
*/
|
|
30
|
+
export declare function MrlTextHeading({ attrs, children, hierarchy, kind, level, size, text }: MrlTextHeadingProps): JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlTextHeading';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AttrsObject } from '../../utils';
|
|
2
|
+
export type TextSizes = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large';
|
|
3
|
+
export type TextHierarchies = 'primary' | 'secondary';
|
|
4
|
+
export type TextKinds = 'default' | 'body' | 'meta' | 'supporting';
|
|
5
|
+
export interface TextDefaults {
|
|
6
|
+
attrs: AttrsObject;
|
|
7
|
+
hierarchy: TextHierarchies;
|
|
8
|
+
size: TextSizes;
|
|
9
|
+
kind: TextKinds;
|
|
10
|
+
}
|
|
11
|
+
export declare const textAllowedValues: {
|
|
12
|
+
hierarchy: string[];
|
|
13
|
+
kind: string[];
|
|
14
|
+
sizes: string[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Default values for props on the Text component;
|
|
18
|
+
* Shared between the component and Storybook
|
|
19
|
+
*/
|
|
20
|
+
export declare const textDefaults: TextDefaults;
|
|
21
|
+
export type LevelType = '1' | '2' | '3' | '4' | '5' | '6';
|
|
22
|
+
export type HeadingKinds = 'poster' | 'display' | 'headline' | 'title';
|
|
23
|
+
export type HeadingSizes = 'small' | 'medium' | 'large';
|
|
24
|
+
export interface HeadingDefaults {
|
|
25
|
+
attrs: AttrsObject;
|
|
26
|
+
hierarchy: TextHierarchies;
|
|
27
|
+
kind: HeadingKinds;
|
|
28
|
+
level: LevelType;
|
|
29
|
+
size: HeadingSizes | TextSizes;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Defines all of classes allowed for the type attribute;
|
|
33
|
+
* used for Storybook and testing
|
|
34
|
+
*/
|
|
35
|
+
export declare const headingAllowedValues: {
|
|
36
|
+
kinds: string[];
|
|
37
|
+
level: string[];
|
|
38
|
+
sizes: string[];
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Default values for props on the Text component;
|
|
42
|
+
* Shared between the component and Storybook
|
|
43
|
+
*/
|
|
44
|
+
export declare const headingDefaults: HeadingDefaults;
|