@muraldevkit/ui-toolkit 2.90.1 → 3.1.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/link/MrlLink/index.d.ts +1 -0
- package/dist/components/link/MrlLinkButton/MrlLinkButton.d.ts +54 -0
- package/dist/components/link/MrlLinkButton/index.d.ts +1 -0
- package/dist/components/link/constants.d.ts +3 -0
- package/dist/components/link/index.d.ts +2 -1
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/MrlAvatar/module.scss +2 -2
- package/dist/styles/MrlLinkButton/global.scss +4 -0
- package/dist/styles.css +90 -0
- package/package.json +150 -149
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlLink';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MrlButtonSize, IconPosition } from '../../button/constants';
|
|
3
|
+
import { LinkTargetType, MrlLinkButtonKind } from '../constants';
|
|
4
|
+
import { TooltipConfig } from '../../';
|
|
5
|
+
import { MrlComponentProps } from '../../../utils';
|
|
6
|
+
import './MrlLinkButton.global.scss';
|
|
7
|
+
export interface MrlLinkButtonProps extends Omit<MrlComponentProps, 'style'>, React.ComponentProps<'a'> {
|
|
8
|
+
/** Specifies where to redirect the linked document */
|
|
9
|
+
href: string;
|
|
10
|
+
/** Specifies how to open the linked document */
|
|
11
|
+
target?: LinkTargetType;
|
|
12
|
+
/**
|
|
13
|
+
* Allow developers to add icon to buttons.
|
|
14
|
+
*/
|
|
15
|
+
icon?: React.ReactElement;
|
|
16
|
+
/**
|
|
17
|
+
* Allows developers to right-align an icon within a button.
|
|
18
|
+
*/
|
|
19
|
+
iconPos?: IconPosition;
|
|
20
|
+
/**
|
|
21
|
+
* Changes the visual emphasis of the button.
|
|
22
|
+
*/
|
|
23
|
+
kind?: MrlLinkButtonKind;
|
|
24
|
+
/**
|
|
25
|
+
* Displays a spinner in the button to indicate some action is in progress.
|
|
26
|
+
*/
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Text for the spinner when the button is in a loading state.
|
|
30
|
+
*/
|
|
31
|
+
loadingText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* onClick event for the button.
|
|
34
|
+
*/
|
|
35
|
+
onClick?: (e: React.SyntheticEvent<HTMLAnchorElement>) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Changes the size of the button so it can scale with its surrounding context.
|
|
38
|
+
*/
|
|
39
|
+
size?: MrlButtonSize;
|
|
40
|
+
/**
|
|
41
|
+
* The textual label describing the button's purpose/action.
|
|
42
|
+
* Icon buttons require a text label to ensure accessibility.
|
|
43
|
+
*/
|
|
44
|
+
text: string;
|
|
45
|
+
/**
|
|
46
|
+
* Tooltip configuration for the button
|
|
47
|
+
*/
|
|
48
|
+
tooltip?: TooltipConfig;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Warning: use this component with care. Our links generally do not look like buttons.
|
|
52
|
+
* If this interaction does not navigate the user - use `MrlButton`.
|
|
53
|
+
*/
|
|
54
|
+
export declare const MrlLinkButton: React.ForwardRefExoticComponent<Pick<MrlLinkButtonProps, "slot" | "style" | "title" | "text" | "dir" | "children" | "download" | "key" | "placeholder" | "id" | "defaultValue" | "kind" | "size" | "attrs" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "spellCheck" | "tabIndex" | "inputMode" | "is" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "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" | "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" | "media" | "target" | "type" | "href" | "loading" | "loadingText" | "tooltip" | "icon" | "iconPos" | "hrefLang" | "ping" | "rel" | "referrerPolicy"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlLinkButton';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const allowedValues: {
|
|
2
2
|
colors: readonly ["default", "mono", "inverse"];
|
|
3
3
|
kind: readonly ["bold", "simple"];
|
|
4
|
+
linkButtonKind: readonly ["secondary", "primary", "inverse"];
|
|
4
5
|
sizes: readonly ["default", "large", "medium", "small", "xsmall"];
|
|
5
6
|
targets: readonly ["_blank", "_parent", "_top", "_self"];
|
|
6
7
|
};
|
|
@@ -8,9 +9,11 @@ export type LinkColor = (typeof allowedValues.colors)[number];
|
|
|
8
9
|
export type LinkKind = (typeof allowedValues.kind)[number];
|
|
9
10
|
export type LinkSize = (typeof allowedValues.sizes)[number];
|
|
10
11
|
export type LinkTargetType = (typeof allowedValues.targets)[number];
|
|
12
|
+
export type MrlLinkButtonKind = (typeof allowedValues.linkButtonKind)[number];
|
|
11
13
|
export interface LinkDefaults {
|
|
12
14
|
color: LinkColor;
|
|
13
15
|
kind: LinkKind;
|
|
16
|
+
linkButtonKind: MrlLinkButtonKind;
|
|
14
17
|
size: LinkSize;
|
|
15
18
|
target: LinkTargetType;
|
|
16
19
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './MrlLink
|
|
1
|
+
export * from './MrlLink';
|
|
2
|
+
export * from './MrlLinkButton';
|