@muraldevkit/ui-toolkit 1.27.0 → 1.28.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/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/button/MrlIconButton/MrlIconButton.d.ts +1 -1
- package/dist/components/text/MrlText/MrlText.d.ts +4 -21
- package/dist/components/text/MrlTextHeading/MrlTextHeading.d.ts +2 -3
- package/dist/components/text/constants.d.ts +3 -7
- package/dist/index.js +1 -1
- package/dist/styles/MrlText/variables.scss +0 -17
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ export interface MrlButtonProps extends Omit<MrlComponentProps, 'style'>, React.
|
|
|
36
36
|
/**
|
|
37
37
|
* onClick event for the button.
|
|
38
38
|
*/
|
|
39
|
-
onClick
|
|
39
|
+
onClick?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
40
40
|
/**
|
|
41
41
|
* Changes the size of the button so it can scale with its surrounding context.
|
|
42
42
|
*/
|
|
@@ -32,7 +32,7 @@ export interface MrlIconButtonProps extends Omit<MrlComponentProps, 'style'>, Re
|
|
|
32
32
|
/**
|
|
33
33
|
* onClick event for the button.
|
|
34
34
|
*/
|
|
35
|
-
onClick
|
|
35
|
+
onClick?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
36
36
|
/**
|
|
37
37
|
* The placement of the tooltip in relation to the button.
|
|
38
38
|
*/
|
|
@@ -1,33 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AttrsObject } from '../../../utils';
|
|
3
|
-
import {
|
|
4
|
-
interface
|
|
3
|
+
import { TextSizes } from '../constants';
|
|
4
|
+
interface MrlTextProps {
|
|
5
5
|
/** Applies additional HTML attributes to the text element */
|
|
6
6
|
attrs?: AttrsObject;
|
|
7
7
|
/** Children to be rendered within the text component */
|
|
8
8
|
children?: React.ReactNode | string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** Visual size of the text element */
|
|
10
|
+
size?: TextSizes;
|
|
11
11
|
/** Textual content when it's a static string; if you have nested elements, use children to provide content */
|
|
12
12
|
text?: string;
|
|
13
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
14
|
/**
|
|
32
15
|
* MrlText Component
|
|
33
16
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AttrsObject } from '../../../utils';
|
|
3
|
-
import { LevelType, HeadingSizes, TextSizes,
|
|
3
|
+
import { LevelType, HeadingHierarchies, HeadingSizes, TextSizes, HeadingKinds } from '../constants';
|
|
4
4
|
interface MrlTextHeadingProps {
|
|
5
5
|
/** Applies additional HTML attributes to the text element */
|
|
6
6
|
attrs?: AttrsObject;
|
|
@@ -16,9 +16,8 @@ interface MrlTextHeadingProps {
|
|
|
16
16
|
*/
|
|
17
17
|
size?: HeadingSizes | TextSizes;
|
|
18
18
|
/** Clear and concise description of the content that the heading describes */
|
|
19
|
+
hierarchy?: HeadingHierarchies;
|
|
19
20
|
text?: string;
|
|
20
|
-
/** Hierarchy level within the use case and sizing scales */
|
|
21
|
-
hierarchy?: TextHierarchies;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* MuralTextHeading component
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import { AttrsObject } from '../../utils';
|
|
2
2
|
export type TextSizes = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large';
|
|
3
|
-
export type TextHierarchies = 'primary' | 'secondary';
|
|
4
|
-
export type TextKinds = 'default' | 'body' | 'meta' | 'supporting';
|
|
5
3
|
export interface TextDefaults {
|
|
6
4
|
attrs: AttrsObject;
|
|
7
|
-
hierarchy: TextHierarchies;
|
|
8
5
|
size: TextSizes;
|
|
9
|
-
kind: TextKinds;
|
|
10
6
|
}
|
|
11
7
|
export declare const textAllowedValues: {
|
|
12
|
-
hierarchy: string[];
|
|
13
|
-
kind: string[];
|
|
14
8
|
sizes: string[];
|
|
15
9
|
};
|
|
16
10
|
/**
|
|
@@ -21,9 +15,10 @@ export declare const textDefaults: TextDefaults;
|
|
|
21
15
|
export type LevelType = '1' | '2' | '3' | '4' | '5' | '6';
|
|
22
16
|
export type HeadingKinds = 'poster' | 'display' | 'headline' | 'title';
|
|
23
17
|
export type HeadingSizes = 'small' | 'medium' | 'large';
|
|
18
|
+
export type HeadingHierarchies = 'primary' | 'secondary';
|
|
24
19
|
export interface HeadingDefaults {
|
|
25
20
|
attrs: AttrsObject;
|
|
26
|
-
hierarchy:
|
|
21
|
+
hierarchy: HeadingHierarchies;
|
|
27
22
|
kind: HeadingKinds;
|
|
28
23
|
level: LevelType;
|
|
29
24
|
size: HeadingSizes | TextSizes;
|
|
@@ -33,6 +28,7 @@ export interface HeadingDefaults {
|
|
|
33
28
|
* used for Storybook and testing
|
|
34
29
|
*/
|
|
35
30
|
export declare const headingAllowedValues: {
|
|
31
|
+
hierarchy: string[];
|
|
36
32
|
kinds: string[];
|
|
37
33
|
level: string[];
|
|
38
34
|
sizes: string[];
|