@zendeskgarden/react-typography 9.11.0 → 9.11.2
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/esm/elements/Blockquote.js +10 -6
- package/dist/esm/elements/Code.js +2 -6
- package/dist/esm/elements/Ellipsis.js +1 -4
- package/dist/esm/elements/LG.js +1 -4
- package/dist/esm/elements/MD.js +1 -4
- package/dist/esm/elements/Paragraph.js +10 -6
- package/dist/esm/elements/SM.js +1 -4
- package/dist/esm/elements/XL.js +1 -4
- package/dist/esm/elements/XXL.js +1 -4
- package/dist/esm/elements/XXXL.js +1 -4
- package/dist/esm/elements/lists/OrderedList.js +2 -6
- package/dist/esm/elements/lists/UnorderedList.js +2 -6
- package/dist/esm/elements/span/Span.js +1 -4
- package/dist/esm/styled/StyledBlockquote.js +1 -1
- package/dist/esm/styled/StyledCode.js +7 -10
- package/dist/esm/styled/StyledCodeBlock.js +1 -1
- package/dist/esm/styled/StyledCodeBlockContainer.js +1 -1
- package/dist/esm/styled/StyledCodeBlockLine.js +1 -1
- package/dist/esm/styled/StyledCodeBlockToken.js +1 -1
- package/dist/esm/styled/StyledEllipsis.js +1 -1
- package/dist/esm/styled/StyledFont.js +4 -6
- package/dist/esm/styled/StyledIcon.js +1 -1
- package/dist/esm/styled/StyledKbd.js +8 -3
- package/dist/esm/styled/StyledList.js +2 -2
- package/dist/esm/styled/StyledListItem.js +11 -17
- package/dist/esm/styled/StyledParagraph.js +1 -1
- package/dist/index.cjs.js +72 -106
- package/dist/typings/styled/StyledCode.d.ts +2 -2
- package/dist/typings/styled/StyledFont.d.ts +2 -2
- package/dist/typings/styled/StyledListItem.d.ts +4 -4
- package/package.json +3 -3
|
@@ -21,15 +21,19 @@ import '../styled/StyledList.js';
|
|
|
21
21
|
import '../styled/StyledListItem.js';
|
|
22
22
|
import '../styled/StyledParagraph.js';
|
|
23
23
|
|
|
24
|
-
const Blockquote = forwardRef((
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const Blockquote = forwardRef((_ref, ref) => {
|
|
25
|
+
let {
|
|
26
|
+
size = 'medium',
|
|
27
|
+
...props
|
|
28
|
+
} = _ref;
|
|
29
|
+
return React.createElement(StyledBlockquote, Object.assign({
|
|
30
|
+
ref: ref,
|
|
31
|
+
size: size
|
|
32
|
+
}, props));
|
|
33
|
+
});
|
|
27
34
|
Blockquote.displayName = 'Blockquote';
|
|
28
35
|
Blockquote.propTypes = {
|
|
29
36
|
size: PropTypes.oneOf(SIZE)
|
|
30
37
|
};
|
|
31
|
-
Blockquote.defaultProps = {
|
|
32
|
-
size: 'medium'
|
|
33
|
-
};
|
|
34
38
|
|
|
35
39
|
export { Blockquote };
|
|
@@ -23,8 +23,8 @@ import '../styled/StyledParagraph.js';
|
|
|
23
23
|
|
|
24
24
|
const Code = forwardRef((_ref, ref) => {
|
|
25
25
|
let {
|
|
26
|
-
hue,
|
|
27
|
-
size,
|
|
26
|
+
hue = 'grey',
|
|
27
|
+
size = 'inherit',
|
|
28
28
|
...other
|
|
29
29
|
} = _ref;
|
|
30
30
|
return React.createElement(StyledCode, Object.assign({
|
|
@@ -38,9 +38,5 @@ Code.propTypes = {
|
|
|
38
38
|
hue: PropTypes.oneOf(HUE),
|
|
39
39
|
size: PropTypes.oneOf(INHERIT_SIZE)
|
|
40
40
|
};
|
|
41
|
-
Code.defaultProps = {
|
|
42
|
-
hue: 'grey',
|
|
43
|
-
size: 'inherit'
|
|
44
|
-
};
|
|
45
41
|
|
|
46
42
|
export { Code };
|
|
@@ -24,7 +24,7 @@ const Ellipsis = forwardRef((_ref, ref) => {
|
|
|
24
24
|
let {
|
|
25
25
|
children,
|
|
26
26
|
title,
|
|
27
|
-
tag,
|
|
27
|
+
tag = 'div',
|
|
28
28
|
...other
|
|
29
29
|
} = _ref;
|
|
30
30
|
let textContent = undefined;
|
|
@@ -44,8 +44,5 @@ Ellipsis.propTypes = {
|
|
|
44
44
|
title: PropTypes.string,
|
|
45
45
|
tag: PropTypes.any
|
|
46
46
|
};
|
|
47
|
-
Ellipsis.defaultProps = {
|
|
48
|
-
tag: 'div'
|
|
49
|
-
};
|
|
50
47
|
|
|
51
48
|
export { Ellipsis };
|
package/dist/esm/elements/LG.js
CHANGED
|
@@ -24,7 +24,7 @@ const LG = forwardRef((_ref, ref) => {
|
|
|
24
24
|
let {
|
|
25
25
|
isBold,
|
|
26
26
|
isMonospace,
|
|
27
|
-
tag,
|
|
27
|
+
tag = 'div',
|
|
28
28
|
...other
|
|
29
29
|
} = _ref;
|
|
30
30
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -41,8 +41,5 @@ LG.propTypes = {
|
|
|
41
41
|
isBold: PropTypes.bool,
|
|
42
42
|
isMonospace: PropTypes.bool
|
|
43
43
|
};
|
|
44
|
-
LG.defaultProps = {
|
|
45
|
-
tag: 'div'
|
|
46
|
-
};
|
|
47
44
|
|
|
48
45
|
export { LG };
|
package/dist/esm/elements/MD.js
CHANGED
|
@@ -24,7 +24,7 @@ const MD = forwardRef((_ref, ref) => {
|
|
|
24
24
|
let {
|
|
25
25
|
isBold,
|
|
26
26
|
isMonospace,
|
|
27
|
-
tag,
|
|
27
|
+
tag = 'div',
|
|
28
28
|
...other
|
|
29
29
|
} = _ref;
|
|
30
30
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -41,8 +41,5 @@ MD.propTypes = {
|
|
|
41
41
|
isBold: PropTypes.bool,
|
|
42
42
|
isMonospace: PropTypes.bool
|
|
43
43
|
};
|
|
44
|
-
MD.defaultProps = {
|
|
45
|
-
tag: 'div'
|
|
46
|
-
};
|
|
47
44
|
|
|
48
45
|
export { MD };
|
|
@@ -21,15 +21,19 @@ import '../styled/StyledList.js';
|
|
|
21
21
|
import '../styled/StyledListItem.js';
|
|
22
22
|
import { StyledParagraph } from '../styled/StyledParagraph.js';
|
|
23
23
|
|
|
24
|
-
const Paragraph = forwardRef((
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const Paragraph = forwardRef((_ref, ref) => {
|
|
25
|
+
let {
|
|
26
|
+
size = 'medium',
|
|
27
|
+
...props
|
|
28
|
+
} = _ref;
|
|
29
|
+
return React.createElement(StyledParagraph, Object.assign({
|
|
30
|
+
ref: ref,
|
|
31
|
+
size: size
|
|
32
|
+
}, props));
|
|
33
|
+
});
|
|
27
34
|
Paragraph.displayName = 'Paragraph';
|
|
28
35
|
Paragraph.propTypes = {
|
|
29
36
|
size: PropTypes.oneOf(SIZE)
|
|
30
37
|
};
|
|
31
|
-
Paragraph.defaultProps = {
|
|
32
|
-
size: 'medium'
|
|
33
|
-
};
|
|
34
38
|
|
|
35
39
|
export { Paragraph };
|
package/dist/esm/elements/SM.js
CHANGED
|
@@ -24,7 +24,7 @@ const SM = forwardRef((_ref, ref) => {
|
|
|
24
24
|
let {
|
|
25
25
|
isBold,
|
|
26
26
|
isMonospace,
|
|
27
|
-
tag,
|
|
27
|
+
tag = 'div',
|
|
28
28
|
...other
|
|
29
29
|
} = _ref;
|
|
30
30
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -41,8 +41,5 @@ SM.propTypes = {
|
|
|
41
41
|
isBold: PropTypes.bool,
|
|
42
42
|
isMonospace: PropTypes.bool
|
|
43
43
|
};
|
|
44
|
-
SM.defaultProps = {
|
|
45
|
-
tag: 'div'
|
|
46
|
-
};
|
|
47
44
|
|
|
48
45
|
export { SM };
|
package/dist/esm/elements/XL.js
CHANGED
|
@@ -23,7 +23,7 @@ import '../styled/StyledParagraph.js';
|
|
|
23
23
|
const XL = forwardRef((_ref, ref) => {
|
|
24
24
|
let {
|
|
25
25
|
isBold,
|
|
26
|
-
tag,
|
|
26
|
+
tag = 'div',
|
|
27
27
|
...other
|
|
28
28
|
} = _ref;
|
|
29
29
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -38,8 +38,5 @@ XL.propTypes = {
|
|
|
38
38
|
tag: PropTypes.any,
|
|
39
39
|
isBold: PropTypes.bool
|
|
40
40
|
};
|
|
41
|
-
XL.defaultProps = {
|
|
42
|
-
tag: 'div'
|
|
43
|
-
};
|
|
44
41
|
|
|
45
42
|
export { XL };
|
package/dist/esm/elements/XXL.js
CHANGED
|
@@ -23,7 +23,7 @@ import '../styled/StyledParagraph.js';
|
|
|
23
23
|
const XXL = forwardRef((_ref, ref) => {
|
|
24
24
|
let {
|
|
25
25
|
isBold,
|
|
26
|
-
tag,
|
|
26
|
+
tag = 'div',
|
|
27
27
|
...other
|
|
28
28
|
} = _ref;
|
|
29
29
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -38,8 +38,5 @@ XXL.propTypes = {
|
|
|
38
38
|
tag: PropTypes.any,
|
|
39
39
|
isBold: PropTypes.bool
|
|
40
40
|
};
|
|
41
|
-
XXL.defaultProps = {
|
|
42
|
-
tag: 'div'
|
|
43
|
-
};
|
|
44
41
|
|
|
45
42
|
export { XXL };
|
|
@@ -23,7 +23,7 @@ import '../styled/StyledParagraph.js';
|
|
|
23
23
|
const XXXL = forwardRef((_ref, ref) => {
|
|
24
24
|
let {
|
|
25
25
|
isBold,
|
|
26
|
-
tag,
|
|
26
|
+
tag = 'div',
|
|
27
27
|
...other
|
|
28
28
|
} = _ref;
|
|
29
29
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -39,8 +39,5 @@ XXXL.propTypes = {
|
|
|
39
39
|
tag: PropTypes.any,
|
|
40
40
|
isBold: PropTypes.bool
|
|
41
41
|
};
|
|
42
|
-
XXXL.defaultProps = {
|
|
43
|
-
tag: 'div'
|
|
44
|
-
};
|
|
45
42
|
|
|
46
43
|
export { XXXL };
|
|
@@ -25,8 +25,8 @@ import '../../styled/StyledParagraph.js';
|
|
|
25
25
|
|
|
26
26
|
const OrderedListComponent = React.forwardRef((_ref, ref) => {
|
|
27
27
|
let {
|
|
28
|
-
size,
|
|
29
|
-
type,
|
|
28
|
+
size = 'medium',
|
|
29
|
+
type = 'decimal',
|
|
30
30
|
...other
|
|
31
31
|
} = _ref;
|
|
32
32
|
const value = useMemo(() => ({
|
|
@@ -44,10 +44,6 @@ OrderedListComponent.propTypes = {
|
|
|
44
44
|
size: PropTypes.oneOf(SIZE),
|
|
45
45
|
type: PropTypes.oneOf(TYPE_ORDERED_LIST)
|
|
46
46
|
};
|
|
47
|
-
OrderedListComponent.defaultProps = {
|
|
48
|
-
size: 'medium',
|
|
49
|
-
type: 'decimal'
|
|
50
|
-
};
|
|
51
47
|
const OrderedList = OrderedListComponent;
|
|
52
48
|
OrderedList.Item = Item;
|
|
53
49
|
|
|
@@ -25,8 +25,8 @@ import '../../styled/StyledParagraph.js';
|
|
|
25
25
|
|
|
26
26
|
const UnorderedListComponent = forwardRef((_ref, ref) => {
|
|
27
27
|
let {
|
|
28
|
-
size,
|
|
29
|
-
type,
|
|
28
|
+
size = 'medium',
|
|
29
|
+
type = 'disc',
|
|
30
30
|
...other
|
|
31
31
|
} = _ref;
|
|
32
32
|
const value = useMemo(() => ({
|
|
@@ -44,10 +44,6 @@ UnorderedListComponent.propTypes = {
|
|
|
44
44
|
size: PropTypes.oneOf(SIZE),
|
|
45
45
|
type: PropTypes.oneOf(TYPE_UNORDERED_LIST)
|
|
46
46
|
};
|
|
47
|
-
UnorderedListComponent.defaultProps = {
|
|
48
|
-
size: 'medium',
|
|
49
|
-
type: 'disc'
|
|
50
|
-
};
|
|
51
47
|
const UnorderedList = UnorderedListComponent;
|
|
52
48
|
UnorderedList.Item = Item;
|
|
53
49
|
|
|
@@ -27,7 +27,7 @@ const SpanComponent = forwardRef((_ref, ref) => {
|
|
|
27
27
|
hue,
|
|
28
28
|
isBold,
|
|
29
29
|
isMonospace,
|
|
30
|
-
tag,
|
|
30
|
+
tag = 'span',
|
|
31
31
|
...other
|
|
32
32
|
} = _ref;
|
|
33
33
|
return React.createElement(StyledFont, Object.assign({
|
|
@@ -46,9 +46,6 @@ SpanComponent.propTypes = {
|
|
|
46
46
|
isMonospace: PropTypes.bool,
|
|
47
47
|
hue: PropTypes.string
|
|
48
48
|
};
|
|
49
|
-
SpanComponent.defaultProps = {
|
|
50
|
-
tag: 'span'
|
|
51
|
-
};
|
|
52
49
|
const Span = SpanComponent;
|
|
53
50
|
Span.Icon = Icon;
|
|
54
51
|
Span.StartIcon = StartIcon;
|
|
@@ -11,7 +11,7 @@ import { THEME_SIZES } from './StyledFont.js';
|
|
|
11
11
|
const COMPONENT_ID = 'typography.blockquote';
|
|
12
12
|
const StyledBlockquote = styled.blockquote.attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.11.
|
|
14
|
+
'data-garden-version': '9.11.2'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledBlockquote",
|
|
17
17
|
componentId: "sc-1tt3ye0-0"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
|
-
import { componentStyles,
|
|
8
|
+
import { componentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
import { StyledFont } from './StyledFont.js';
|
|
10
10
|
|
|
11
11
|
const COMPONENT_ID = 'typography.code';
|
|
@@ -48,19 +48,16 @@ const colorStyles = _ref => {
|
|
|
48
48
|
const foregroundColor = getColor(fgColorArgs);
|
|
49
49
|
return css(["background-color:", ";color:", ";a &{color:inherit;}"], backgroundColor, foregroundColor);
|
|
50
50
|
};
|
|
51
|
-
const StyledCode = styled(StyledFont).attrs({
|
|
51
|
+
const StyledCode = styled(StyledFont).attrs(props => ({
|
|
52
52
|
'data-garden-id': COMPONENT_ID,
|
|
53
|
-
'data-garden-version': '9.11.
|
|
53
|
+
'data-garden-version': '9.11.2',
|
|
54
54
|
as: 'code',
|
|
55
|
-
$isMonospace: true
|
|
56
|
-
|
|
55
|
+
$isMonospace: true,
|
|
56
|
+
$hue: props.$hue ?? 'grey',
|
|
57
|
+
$size: props.$size ?? 'inherit'
|
|
58
|
+
})).withConfig({
|
|
57
59
|
displayName: "StyledCode",
|
|
58
60
|
componentId: "sc-l8yvmf-0"
|
|
59
61
|
})(["border-radius:", ";padding:1.5px;", ";", ";"], props => props.theme.borderRadii.sm, props => colorStyles(props), componentStyles);
|
|
60
|
-
StyledCode.defaultProps = {
|
|
61
|
-
theme: DEFAULT_THEME,
|
|
62
|
-
$hue: 'grey',
|
|
63
|
-
$size: 'inherit'
|
|
64
|
-
};
|
|
65
62
|
|
|
66
63
|
export { StyledCode };
|
|
@@ -24,7 +24,7 @@ const colorStyles = _ref => {
|
|
|
24
24
|
};
|
|
25
25
|
const StyledCodeBlock = styled.pre.attrs({
|
|
26
26
|
'data-garden-id': COMPONENT_ID,
|
|
27
|
-
'data-garden-version': '9.11.
|
|
27
|
+
'data-garden-version': '9.11.2'
|
|
28
28
|
}).withConfig({
|
|
29
29
|
displayName: "StyledCodeBlock",
|
|
30
30
|
componentId: "sc-5wky57-0"
|
|
@@ -10,7 +10,7 @@ import { focusStyles, componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'typography.codeblock_container';
|
|
11
11
|
const StyledCodeBlockContainer = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.11.
|
|
13
|
+
'data-garden-version': '9.11.2'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledCodeBlockContainer",
|
|
16
16
|
componentId: "sc-14zgbfw-0"
|
|
@@ -86,7 +86,7 @@ const lineNumberStyles = _ref2 => {
|
|
|
86
86
|
};
|
|
87
87
|
const StyledCodeBlockLine = styled(StyledFont).attrs({
|
|
88
88
|
'data-garden-id': COMPONENT_ID,
|
|
89
|
-
'data-garden-version': '9.11.
|
|
89
|
+
'data-garden-version': '9.11.2',
|
|
90
90
|
as: 'code',
|
|
91
91
|
$isMonospace: true
|
|
92
92
|
}).withConfig({
|
|
@@ -171,7 +171,7 @@ const colorStyles = _ref => {
|
|
|
171
171
|
};
|
|
172
172
|
const StyledCodeBlockToken = styled.span.attrs({
|
|
173
173
|
'data-garden-id': COMPONENT_ID,
|
|
174
|
-
'data-garden-version': '9.11.
|
|
174
|
+
'data-garden-version': '9.11.2'
|
|
175
175
|
}).withConfig({
|
|
176
176
|
displayName: "StyledCodeBlockToken",
|
|
177
177
|
componentId: "sc-1hkshdq-0"
|
|
@@ -10,7 +10,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'typography.ellipsis';
|
|
11
11
|
const StyledEllipsis = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.11.
|
|
13
|
+
'data-garden-version': '9.11.2'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledEllipsis",
|
|
16
16
|
componentId: "sc-1u4uqmy-0"
|
|
@@ -65,15 +65,13 @@ const fontStyles = _ref => {
|
|
|
65
65
|
}
|
|
66
66
|
return css(["transition:color 0.1s ease-in-out;line-height:", ";color:", ";font-family:", ";font-size:", ";font-weight:", ";direction:", ";"], lineHeight, color, fontFamily, fontSize, fontWeight, direction);
|
|
67
67
|
};
|
|
68
|
-
const StyledFont = styled.div.attrs({
|
|
68
|
+
const StyledFont = styled.div.attrs(props => ({
|
|
69
69
|
'data-garden-id': COMPONENT_ID,
|
|
70
|
-
'data-garden-version': '9.11.
|
|
71
|
-
|
|
70
|
+
'data-garden-version': '9.11.2',
|
|
71
|
+
$size: props.$size ?? 'inherit'
|
|
72
|
+
})).withConfig({
|
|
72
73
|
displayName: "StyledFont",
|
|
73
74
|
componentId: "sc-1iildbo-0"
|
|
74
75
|
})(["", ";&[hidden]{display:inline;", ";}", ";"], props => !props.hidden && fontStyles(props), hideVisually(), componentStyles);
|
|
75
|
-
StyledFont.defaultProps = {
|
|
76
|
-
$size: 'inherit'
|
|
77
|
-
};
|
|
78
76
|
|
|
79
77
|
export { StyledFont, THEME_SIZES };
|
|
@@ -15,7 +15,7 @@ const sizeStyles = props => {
|
|
|
15
15
|
};
|
|
16
16
|
const StyledIcon = styled(StyledBaseIcon).attrs({
|
|
17
17
|
'data-garden-id': COMPONENT_ID,
|
|
18
|
-
'data-garden-version': '9.11.
|
|
18
|
+
'data-garden-version': '9.11.2'
|
|
19
19
|
}).withConfig({
|
|
20
20
|
displayName: "StyledIcon",
|
|
21
21
|
componentId: "sc-10rfb5b-0"
|
|
@@ -15,33 +15,38 @@ const sizeStyles = _ref => {
|
|
|
15
15
|
theme,
|
|
16
16
|
$size
|
|
17
17
|
} = _ref;
|
|
18
|
+
let minWidth;
|
|
18
19
|
let paddingHorizontal;
|
|
19
20
|
let paddingVertical = '0';
|
|
20
21
|
switch ($size) {
|
|
21
22
|
case 'small':
|
|
23
|
+
minWidth = math(`${theme.lineHeights.sm} - 1px`);
|
|
22
24
|
paddingHorizontal = `${theme.space.base}px`;
|
|
23
25
|
break;
|
|
24
26
|
case 'medium':
|
|
27
|
+
minWidth = math(`${theme.lineHeights.md} - 1px`);
|
|
25
28
|
paddingHorizontal = `${theme.space.base * 1.5}px`;
|
|
26
29
|
break;
|
|
27
30
|
case 'large':
|
|
31
|
+
minWidth = math(`${theme.lineHeights.lg} - 1px`);
|
|
28
32
|
paddingHorizontal = `${theme.space.base * 1.75}px`;
|
|
29
33
|
break;
|
|
30
34
|
default:
|
|
35
|
+
minWidth = 'calc(1.2em + 3px)';
|
|
31
36
|
paddingHorizontal = `${stripUnit(math(`${theme.space.base * 1.5} / (${theme.fontSizes.md} - 1px)`))}em`;
|
|
32
37
|
paddingVertical = '1.5px';
|
|
33
38
|
break;
|
|
34
39
|
}
|
|
35
40
|
const padding = `${paddingVertical} ${paddingHorizontal}`;
|
|
36
|
-
return css(["&&{padding:", ";}"], padding);
|
|
41
|
+
return css(["&&{box-sizing:border-box;padding:", ";min-width:", ";}"], padding, minWidth);
|
|
37
42
|
};
|
|
38
43
|
const StyledKbd = styled(StyledCode).attrs({
|
|
39
44
|
'data-garden-id': COMPONENT_ID,
|
|
40
|
-
'data-garden-version': '9.11.
|
|
45
|
+
'data-garden-version': '9.11.2',
|
|
41
46
|
as: 'kbd'
|
|
42
47
|
}).withConfig({
|
|
43
48
|
displayName: "StyledKbd",
|
|
44
49
|
componentId: "sc-1gzk2wp-0"
|
|
45
|
-
})(["display:inline-block;direction:ltr;", ";", ";"], sizeStyles, componentStyles);
|
|
50
|
+
})(["display:inline-block;direction:ltr;text-align:center;font-family:sans-serif;", ";", ";"], sizeStyles, componentStyles);
|
|
46
51
|
|
|
47
52
|
export { StyledKbd };
|
|
@@ -14,7 +14,7 @@ const listStyles = props => {
|
|
|
14
14
|
const ORDERED_ID = 'typography.ordered_list';
|
|
15
15
|
const StyledOrderedList = styled.ol.attrs({
|
|
16
16
|
'data-garden-id': ORDERED_ID,
|
|
17
|
-
'data-garden-version': '9.11.
|
|
17
|
+
'data-garden-version': '9.11.2'
|
|
18
18
|
}).withConfig({
|
|
19
19
|
displayName: "StyledList__StyledOrderedList",
|
|
20
20
|
componentId: "sc-jdbsfi-0"
|
|
@@ -22,7 +22,7 @@ const StyledOrderedList = styled.ol.attrs({
|
|
|
22
22
|
const UNORDERED_ID = 'typography.unordered_list';
|
|
23
23
|
const StyledUnorderedList = styled.ul.attrs({
|
|
24
24
|
'data-garden-id': UNORDERED_ID,
|
|
25
|
-
'data-garden-version': '9.11.
|
|
25
|
+
'data-garden-version': '9.11.2'
|
|
26
26
|
}).withConfig({
|
|
27
27
|
displayName: "StyledList__StyledUnorderedList",
|
|
28
28
|
componentId: "sc-jdbsfi-1"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { math } from 'polished';
|
|
9
|
-
import { componentStyles,
|
|
9
|
+
import { componentStyles, getLineHeight } from '@zendeskgarden/react-theming';
|
|
10
10
|
import { StyledOrderedList, StyledUnorderedList } from './StyledList.js';
|
|
11
11
|
import { StyledFont } from './StyledFont.js';
|
|
12
12
|
|
|
@@ -19,30 +19,24 @@ const listItemStyles = props => {
|
|
|
19
19
|
return css(["line-height:", ";", ";"], getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props.$space !== 'small' && listItemPaddingStyles(props));
|
|
20
20
|
};
|
|
21
21
|
const ORDERED_ID = 'typography.ordered_list_item';
|
|
22
|
-
const StyledOrderedListItem = styled(StyledFont).attrs({
|
|
22
|
+
const StyledOrderedListItem = styled(StyledFont).attrs(props => ({
|
|
23
23
|
'data-garden-id': ORDERED_ID,
|
|
24
|
-
'data-garden-version': '9.11.
|
|
25
|
-
as: 'li'
|
|
26
|
-
|
|
24
|
+
'data-garden-version': '9.11.2',
|
|
25
|
+
as: 'li',
|
|
26
|
+
$space: props.$space ?? 'medium'
|
|
27
|
+
})).withConfig({
|
|
27
28
|
displayName: "StyledListItem__StyledOrderedListItem",
|
|
28
29
|
componentId: "sc-9rsipg-0"
|
|
29
30
|
})(["margin-", ":", ";padding-", ":", ";", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => math(`${props.theme.space.base} * -1px`), props => props.theme.rtl ? 'right' : 'left', props => math(`${props.theme.space.base} * 1px`), listItemStyles, componentStyles);
|
|
30
|
-
StyledOrderedListItem.defaultProps = {
|
|
31
|
-
$space: 'medium',
|
|
32
|
-
theme: DEFAULT_THEME
|
|
33
|
-
};
|
|
34
31
|
const UNORDERED_ID = 'typography.unordered_list_item';
|
|
35
|
-
const StyledUnorderedListItem = styled(StyledFont).attrs({
|
|
32
|
+
const StyledUnorderedListItem = styled(StyledFont).attrs(props => ({
|
|
36
33
|
'data-garden-id': UNORDERED_ID,
|
|
37
|
-
'data-garden-version': '9.11.
|
|
38
|
-
as: 'li'
|
|
39
|
-
|
|
34
|
+
'data-garden-version': '9.11.2',
|
|
35
|
+
as: 'li',
|
|
36
|
+
$space: props.$space ?? 'medium'
|
|
37
|
+
})).withConfig({
|
|
40
38
|
displayName: "StyledListItem__StyledUnorderedListItem",
|
|
41
39
|
componentId: "sc-9rsipg-1"
|
|
42
40
|
})(["", ";", ";"], listItemStyles, componentStyles);
|
|
43
|
-
StyledUnorderedListItem.defaultProps = {
|
|
44
|
-
$space: 'medium',
|
|
45
|
-
theme: DEFAULT_THEME
|
|
46
|
-
};
|
|
47
41
|
|
|
48
42
|
export { StyledOrderedListItem, StyledUnorderedListItem };
|
|
@@ -11,7 +11,7 @@ import { THEME_SIZES } from './StyledFont.js';
|
|
|
11
11
|
const COMPONENT_ID = 'typography.paragraph';
|
|
12
12
|
const StyledParagraph = styled.p.attrs({
|
|
13
13
|
'data-garden-id': COMPONENT_ID,
|
|
14
|
-
'data-garden-version': '9.11.
|
|
14
|
+
'data-garden-version': '9.11.2'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledParagraph",
|
|
17
17
|
componentId: "sc-zkuftz-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -84,21 +84,19 @@ const fontStyles = _ref => {
|
|
|
84
84
|
}
|
|
85
85
|
return styled.css(["transition:color 0.1s ease-in-out;line-height:", ";color:", ";font-family:", ";font-size:", ";font-weight:", ";direction:", ";"], lineHeight, color, fontFamily, fontSize, fontWeight, direction);
|
|
86
86
|
};
|
|
87
|
-
const StyledFont = styled__default.default.div.attrs({
|
|
87
|
+
const StyledFont = styled__default.default.div.attrs(props => ({
|
|
88
88
|
'data-garden-id': COMPONENT_ID$a,
|
|
89
|
-
'data-garden-version': '9.11.
|
|
90
|
-
|
|
89
|
+
'data-garden-version': '9.11.2',
|
|
90
|
+
$size: props.$size ?? 'inherit'
|
|
91
|
+
})).withConfig({
|
|
91
92
|
displayName: "StyledFont",
|
|
92
93
|
componentId: "sc-1iildbo-0"
|
|
93
94
|
})(["", ";&[hidden]{display:inline;", ";}", ";"], props => !props.hidden && fontStyles(props), polished.hideVisually(), reactTheming.componentStyles);
|
|
94
|
-
StyledFont.defaultProps = {
|
|
95
|
-
$size: 'inherit'
|
|
96
|
-
};
|
|
97
95
|
|
|
98
96
|
const COMPONENT_ID$9 = 'typography.blockquote';
|
|
99
97
|
const StyledBlockquote = styled__default.default.blockquote.attrs({
|
|
100
98
|
'data-garden-id': COMPONENT_ID$9,
|
|
101
|
-
'data-garden-version': '9.11.
|
|
99
|
+
'data-garden-version': '9.11.2'
|
|
102
100
|
}).withConfig({
|
|
103
101
|
displayName: "StyledBlockquote",
|
|
104
102
|
componentId: "sc-1tt3ye0-0"
|
|
@@ -147,20 +145,17 @@ const colorStyles$3 = _ref => {
|
|
|
147
145
|
const foregroundColor = reactTheming.getColor(fgColorArgs);
|
|
148
146
|
return styled.css(["background-color:", ";color:", ";a &{color:inherit;}"], backgroundColor, foregroundColor);
|
|
149
147
|
};
|
|
150
|
-
const StyledCode = styled__default.default(StyledFont).attrs({
|
|
148
|
+
const StyledCode = styled__default.default(StyledFont).attrs(props => ({
|
|
151
149
|
'data-garden-id': COMPONENT_ID$8,
|
|
152
|
-
'data-garden-version': '9.11.
|
|
150
|
+
'data-garden-version': '9.11.2',
|
|
153
151
|
as: 'code',
|
|
154
|
-
$isMonospace: true
|
|
155
|
-
|
|
152
|
+
$isMonospace: true,
|
|
153
|
+
$hue: props.$hue ?? 'grey',
|
|
154
|
+
$size: props.$size ?? 'inherit'
|
|
155
|
+
})).withConfig({
|
|
156
156
|
displayName: "StyledCode",
|
|
157
157
|
componentId: "sc-l8yvmf-0"
|
|
158
158
|
})(["border-radius:", ";padding:1.5px;", ";", ";"], props => props.theme.borderRadii.sm, props => colorStyles$3(props), reactTheming.componentStyles);
|
|
159
|
-
StyledCode.defaultProps = {
|
|
160
|
-
theme: reactTheming.DEFAULT_THEME,
|
|
161
|
-
$hue: 'grey',
|
|
162
|
-
$size: 'inherit'
|
|
163
|
-
};
|
|
164
159
|
|
|
165
160
|
const COMPONENT_ID$7 = 'typography.codeblock';
|
|
166
161
|
const colorStyles$2 = _ref => {
|
|
@@ -179,7 +174,7 @@ const colorStyles$2 = _ref => {
|
|
|
179
174
|
};
|
|
180
175
|
const StyledCodeBlock = styled__default.default.pre.attrs({
|
|
181
176
|
'data-garden-id': COMPONENT_ID$7,
|
|
182
|
-
'data-garden-version': '9.11.
|
|
177
|
+
'data-garden-version': '9.11.2'
|
|
183
178
|
}).withConfig({
|
|
184
179
|
displayName: "StyledCodeBlock",
|
|
185
180
|
componentId: "sc-5wky57-0"
|
|
@@ -188,7 +183,7 @@ const StyledCodeBlock = styled__default.default.pre.attrs({
|
|
|
188
183
|
const COMPONENT_ID$6 = 'typography.codeblock_container';
|
|
189
184
|
const StyledCodeBlockContainer = styled__default.default.div.attrs({
|
|
190
185
|
'data-garden-id': COMPONENT_ID$6,
|
|
191
|
-
'data-garden-version': '9.11.
|
|
186
|
+
'data-garden-version': '9.11.2'
|
|
192
187
|
}).withConfig({
|
|
193
188
|
displayName: "StyledCodeBlockContainer",
|
|
194
189
|
componentId: "sc-14zgbfw-0"
|
|
@@ -274,7 +269,7 @@ const lineNumberStyles = _ref2 => {
|
|
|
274
269
|
};
|
|
275
270
|
const StyledCodeBlockLine = styled__default.default(StyledFont).attrs({
|
|
276
271
|
'data-garden-id': COMPONENT_ID$5,
|
|
277
|
-
'data-garden-version': '9.11.
|
|
272
|
+
'data-garden-version': '9.11.2',
|
|
278
273
|
as: 'code',
|
|
279
274
|
$isMonospace: true
|
|
280
275
|
}).withConfig({
|
|
@@ -445,7 +440,7 @@ const colorStyles = _ref => {
|
|
|
445
440
|
};
|
|
446
441
|
const StyledCodeBlockToken = styled__default.default.span.attrs({
|
|
447
442
|
'data-garden-id': COMPONENT_ID$4,
|
|
448
|
-
'data-garden-version': '9.11.
|
|
443
|
+
'data-garden-version': '9.11.2'
|
|
449
444
|
}).withConfig({
|
|
450
445
|
displayName: "StyledCodeBlockToken",
|
|
451
446
|
componentId: "sc-1hkshdq-0"
|
|
@@ -454,7 +449,7 @@ const StyledCodeBlockToken = styled__default.default.span.attrs({
|
|
|
454
449
|
const COMPONENT_ID$3 = 'typography.ellipsis';
|
|
455
450
|
const StyledEllipsis = styled__default.default.div.attrs({
|
|
456
451
|
'data-garden-id': COMPONENT_ID$3,
|
|
457
|
-
'data-garden-version': '9.11.
|
|
452
|
+
'data-garden-version': '9.11.2'
|
|
458
453
|
}).withConfig({
|
|
459
454
|
displayName: "StyledEllipsis",
|
|
460
455
|
componentId: "sc-1u4uqmy-0"
|
|
@@ -468,7 +463,7 @@ const sizeStyles$1 = props => {
|
|
|
468
463
|
};
|
|
469
464
|
const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
470
465
|
'data-garden-id': COMPONENT_ID$2,
|
|
471
|
-
'data-garden-version': '9.11.
|
|
466
|
+
'data-garden-version': '9.11.2'
|
|
472
467
|
}).withConfig({
|
|
473
468
|
displayName: "StyledIcon",
|
|
474
469
|
componentId: "sc-10rfb5b-0"
|
|
@@ -480,34 +475,39 @@ const sizeStyles = _ref => {
|
|
|
480
475
|
theme,
|
|
481
476
|
$size
|
|
482
477
|
} = _ref;
|
|
478
|
+
let minWidth;
|
|
483
479
|
let paddingHorizontal;
|
|
484
480
|
let paddingVertical = '0';
|
|
485
481
|
switch ($size) {
|
|
486
482
|
case 'small':
|
|
483
|
+
minWidth = polished.math(`${theme.lineHeights.sm} - 1px`);
|
|
487
484
|
paddingHorizontal = `${theme.space.base}px`;
|
|
488
485
|
break;
|
|
489
486
|
case 'medium':
|
|
487
|
+
minWidth = polished.math(`${theme.lineHeights.md} - 1px`);
|
|
490
488
|
paddingHorizontal = `${theme.space.base * 1.5}px`;
|
|
491
489
|
break;
|
|
492
490
|
case 'large':
|
|
491
|
+
minWidth = polished.math(`${theme.lineHeights.lg} - 1px`);
|
|
493
492
|
paddingHorizontal = `${theme.space.base * 1.75}px`;
|
|
494
493
|
break;
|
|
495
494
|
default:
|
|
495
|
+
minWidth = 'calc(1.2em + 3px)';
|
|
496
496
|
paddingHorizontal = `${polished.stripUnit(polished.math(`${theme.space.base * 1.5} / (${theme.fontSizes.md} - 1px)`))}em`;
|
|
497
497
|
paddingVertical = '1.5px';
|
|
498
498
|
break;
|
|
499
499
|
}
|
|
500
500
|
const padding = `${paddingVertical} ${paddingHorizontal}`;
|
|
501
|
-
return styled.css(["&&{padding:", ";}"], padding);
|
|
501
|
+
return styled.css(["&&{box-sizing:border-box;padding:", ";min-width:", ";}"], padding, minWidth);
|
|
502
502
|
};
|
|
503
503
|
const StyledKbd = styled__default.default(StyledCode).attrs({
|
|
504
504
|
'data-garden-id': COMPONENT_ID$1,
|
|
505
|
-
'data-garden-version': '9.11.
|
|
505
|
+
'data-garden-version': '9.11.2',
|
|
506
506
|
as: 'kbd'
|
|
507
507
|
}).withConfig({
|
|
508
508
|
displayName: "StyledKbd",
|
|
509
509
|
componentId: "sc-1gzk2wp-0"
|
|
510
|
-
})(["display:inline-block;direction:ltr;", ";", ";"], sizeStyles, reactTheming.componentStyles);
|
|
510
|
+
})(["display:inline-block;direction:ltr;text-align:center;font-family:sans-serif;", ";", ";"], sizeStyles, reactTheming.componentStyles);
|
|
511
511
|
|
|
512
512
|
const listStyles = props => {
|
|
513
513
|
const rtl = props.theme.rtl;
|
|
@@ -516,7 +516,7 @@ const listStyles = props => {
|
|
|
516
516
|
const ORDERED_ID$1 = 'typography.ordered_list';
|
|
517
517
|
const StyledOrderedList = styled__default.default.ol.attrs({
|
|
518
518
|
'data-garden-id': ORDERED_ID$1,
|
|
519
|
-
'data-garden-version': '9.11.
|
|
519
|
+
'data-garden-version': '9.11.2'
|
|
520
520
|
}).withConfig({
|
|
521
521
|
displayName: "StyledList__StyledOrderedList",
|
|
522
522
|
componentId: "sc-jdbsfi-0"
|
|
@@ -524,7 +524,7 @@ const StyledOrderedList = styled__default.default.ol.attrs({
|
|
|
524
524
|
const UNORDERED_ID$1 = 'typography.unordered_list';
|
|
525
525
|
const StyledUnorderedList = styled__default.default.ul.attrs({
|
|
526
526
|
'data-garden-id': UNORDERED_ID$1,
|
|
527
|
-
'data-garden-version': '9.11.
|
|
527
|
+
'data-garden-version': '9.11.2'
|
|
528
528
|
}).withConfig({
|
|
529
529
|
displayName: "StyledList__StyledUnorderedList",
|
|
530
530
|
componentId: "sc-jdbsfi-1"
|
|
@@ -539,36 +539,30 @@ const listItemStyles = props => {
|
|
|
539
539
|
return styled.css(["line-height:", ";", ";"], reactTheming.getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props.$space !== 'small' && listItemPaddingStyles(props));
|
|
540
540
|
};
|
|
541
541
|
const ORDERED_ID = 'typography.ordered_list_item';
|
|
542
|
-
const StyledOrderedListItem = styled__default.default(StyledFont).attrs({
|
|
542
|
+
const StyledOrderedListItem = styled__default.default(StyledFont).attrs(props => ({
|
|
543
543
|
'data-garden-id': ORDERED_ID,
|
|
544
|
-
'data-garden-version': '9.11.
|
|
545
|
-
as: 'li'
|
|
546
|
-
|
|
544
|
+
'data-garden-version': '9.11.2',
|
|
545
|
+
as: 'li',
|
|
546
|
+
$space: props.$space ?? 'medium'
|
|
547
|
+
})).withConfig({
|
|
547
548
|
displayName: "StyledListItem__StyledOrderedListItem",
|
|
548
549
|
componentId: "sc-9rsipg-0"
|
|
549
550
|
})(["margin-", ":", ";padding-", ":", ";", ";", ";"], props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * -1px`), props => props.theme.rtl ? 'right' : 'left', props => polished.math(`${props.theme.space.base} * 1px`), listItemStyles, reactTheming.componentStyles);
|
|
550
|
-
StyledOrderedListItem.defaultProps = {
|
|
551
|
-
$space: 'medium',
|
|
552
|
-
theme: reactTheming.DEFAULT_THEME
|
|
553
|
-
};
|
|
554
551
|
const UNORDERED_ID = 'typography.unordered_list_item';
|
|
555
|
-
const StyledUnorderedListItem = styled__default.default(StyledFont).attrs({
|
|
552
|
+
const StyledUnorderedListItem = styled__default.default(StyledFont).attrs(props => ({
|
|
556
553
|
'data-garden-id': UNORDERED_ID,
|
|
557
|
-
'data-garden-version': '9.11.
|
|
558
|
-
as: 'li'
|
|
559
|
-
|
|
554
|
+
'data-garden-version': '9.11.2',
|
|
555
|
+
as: 'li',
|
|
556
|
+
$space: props.$space ?? 'medium'
|
|
557
|
+
})).withConfig({
|
|
560
558
|
displayName: "StyledListItem__StyledUnorderedListItem",
|
|
561
559
|
componentId: "sc-9rsipg-1"
|
|
562
560
|
})(["", ";", ";"], listItemStyles, reactTheming.componentStyles);
|
|
563
|
-
StyledUnorderedListItem.defaultProps = {
|
|
564
|
-
$space: 'medium',
|
|
565
|
-
theme: reactTheming.DEFAULT_THEME
|
|
566
|
-
};
|
|
567
561
|
|
|
568
562
|
const COMPONENT_ID = 'typography.paragraph';
|
|
569
563
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
570
564
|
'data-garden-id': COMPONENT_ID,
|
|
571
|
-
'data-garden-version': '9.11.
|
|
565
|
+
'data-garden-version': '9.11.2'
|
|
572
566
|
}).withConfig({
|
|
573
567
|
displayName: "StyledParagraph",
|
|
574
568
|
componentId: "sc-zkuftz-0"
|
|
@@ -578,7 +572,7 @@ const SM = React.forwardRef((_ref, ref) => {
|
|
|
578
572
|
let {
|
|
579
573
|
isBold,
|
|
580
574
|
isMonospace,
|
|
581
|
-
tag,
|
|
575
|
+
tag = 'div',
|
|
582
576
|
...other
|
|
583
577
|
} = _ref;
|
|
584
578
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -595,15 +589,12 @@ SM.propTypes = {
|
|
|
595
589
|
isBold: PropTypes__default.default.bool,
|
|
596
590
|
isMonospace: PropTypes__default.default.bool
|
|
597
591
|
};
|
|
598
|
-
SM.defaultProps = {
|
|
599
|
-
tag: 'div'
|
|
600
|
-
};
|
|
601
592
|
|
|
602
593
|
const MD = React.forwardRef((_ref, ref) => {
|
|
603
594
|
let {
|
|
604
595
|
isBold,
|
|
605
596
|
isMonospace,
|
|
606
|
-
tag,
|
|
597
|
+
tag = 'div',
|
|
607
598
|
...other
|
|
608
599
|
} = _ref;
|
|
609
600
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -620,15 +611,12 @@ MD.propTypes = {
|
|
|
620
611
|
isBold: PropTypes__default.default.bool,
|
|
621
612
|
isMonospace: PropTypes__default.default.bool
|
|
622
613
|
};
|
|
623
|
-
MD.defaultProps = {
|
|
624
|
-
tag: 'div'
|
|
625
|
-
};
|
|
626
614
|
|
|
627
615
|
const LG = React.forwardRef((_ref, ref) => {
|
|
628
616
|
let {
|
|
629
617
|
isBold,
|
|
630
618
|
isMonospace,
|
|
631
|
-
tag,
|
|
619
|
+
tag = 'div',
|
|
632
620
|
...other
|
|
633
621
|
} = _ref;
|
|
634
622
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -645,14 +633,11 @@ LG.propTypes = {
|
|
|
645
633
|
isBold: PropTypes__default.default.bool,
|
|
646
634
|
isMonospace: PropTypes__default.default.bool
|
|
647
635
|
};
|
|
648
|
-
LG.defaultProps = {
|
|
649
|
-
tag: 'div'
|
|
650
|
-
};
|
|
651
636
|
|
|
652
637
|
const XL = React.forwardRef((_ref, ref) => {
|
|
653
638
|
let {
|
|
654
639
|
isBold,
|
|
655
|
-
tag,
|
|
640
|
+
tag = 'div',
|
|
656
641
|
...other
|
|
657
642
|
} = _ref;
|
|
658
643
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -667,14 +652,11 @@ XL.propTypes = {
|
|
|
667
652
|
tag: PropTypes__default.default.any,
|
|
668
653
|
isBold: PropTypes__default.default.bool
|
|
669
654
|
};
|
|
670
|
-
XL.defaultProps = {
|
|
671
|
-
tag: 'div'
|
|
672
|
-
};
|
|
673
655
|
|
|
674
656
|
const XXL = React.forwardRef((_ref, ref) => {
|
|
675
657
|
let {
|
|
676
658
|
isBold,
|
|
677
|
-
tag,
|
|
659
|
+
tag = 'div',
|
|
678
660
|
...other
|
|
679
661
|
} = _ref;
|
|
680
662
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -689,14 +671,11 @@ XXL.propTypes = {
|
|
|
689
671
|
tag: PropTypes__default.default.any,
|
|
690
672
|
isBold: PropTypes__default.default.bool
|
|
691
673
|
};
|
|
692
|
-
XXL.defaultProps = {
|
|
693
|
-
tag: 'div'
|
|
694
|
-
};
|
|
695
674
|
|
|
696
675
|
const XXXL = React.forwardRef((_ref, ref) => {
|
|
697
676
|
let {
|
|
698
677
|
isBold,
|
|
699
|
-
tag,
|
|
678
|
+
tag = 'div',
|
|
700
679
|
...other
|
|
701
680
|
} = _ref;
|
|
702
681
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -712,25 +691,26 @@ XXXL.propTypes = {
|
|
|
712
691
|
tag: PropTypes__default.default.any,
|
|
713
692
|
isBold: PropTypes__default.default.bool
|
|
714
693
|
};
|
|
715
|
-
XXXL.defaultProps = {
|
|
716
|
-
tag: 'div'
|
|
717
|
-
};
|
|
718
694
|
|
|
719
|
-
const Blockquote = React.forwardRef((
|
|
720
|
-
|
|
721
|
-
|
|
695
|
+
const Blockquote = React.forwardRef((_ref, ref) => {
|
|
696
|
+
let {
|
|
697
|
+
size = 'medium',
|
|
698
|
+
...props
|
|
699
|
+
} = _ref;
|
|
700
|
+
return React__default.default.createElement(StyledBlockquote, Object.assign({
|
|
701
|
+
ref: ref,
|
|
702
|
+
size: size
|
|
703
|
+
}, props));
|
|
704
|
+
});
|
|
722
705
|
Blockquote.displayName = 'Blockquote';
|
|
723
706
|
Blockquote.propTypes = {
|
|
724
707
|
size: PropTypes__default.default.oneOf(SIZE)
|
|
725
708
|
};
|
|
726
|
-
Blockquote.defaultProps = {
|
|
727
|
-
size: 'medium'
|
|
728
|
-
};
|
|
729
709
|
|
|
730
710
|
const Code = React.forwardRef((_ref, ref) => {
|
|
731
711
|
let {
|
|
732
|
-
hue,
|
|
733
|
-
size,
|
|
712
|
+
hue = 'grey',
|
|
713
|
+
size = 'inherit',
|
|
734
714
|
...other
|
|
735
715
|
} = _ref;
|
|
736
716
|
return React__default.default.createElement(StyledCode, Object.assign({
|
|
@@ -744,10 +724,6 @@ Code.propTypes = {
|
|
|
744
724
|
hue: PropTypes__default.default.oneOf(HUE),
|
|
745
725
|
size: PropTypes__default.default.oneOf(INHERIT_SIZE)
|
|
746
726
|
};
|
|
747
|
-
Code.defaultProps = {
|
|
748
|
-
hue: 'grey',
|
|
749
|
-
size: 'inherit'
|
|
750
|
-
};
|
|
751
727
|
|
|
752
728
|
const CodeBlock = React__default.default.forwardRef((_ref, ref) => {
|
|
753
729
|
let {
|
|
@@ -835,7 +811,7 @@ const Ellipsis = React.forwardRef((_ref, ref) => {
|
|
|
835
811
|
let {
|
|
836
812
|
children,
|
|
837
813
|
title,
|
|
838
|
-
tag,
|
|
814
|
+
tag = 'div',
|
|
839
815
|
...other
|
|
840
816
|
} = _ref;
|
|
841
817
|
let textContent = undefined;
|
|
@@ -855,9 +831,6 @@ Ellipsis.propTypes = {
|
|
|
855
831
|
title: PropTypes__default.default.string,
|
|
856
832
|
tag: PropTypes__default.default.any
|
|
857
833
|
};
|
|
858
|
-
Ellipsis.defaultProps = {
|
|
859
|
-
tag: 'div'
|
|
860
|
-
};
|
|
861
834
|
|
|
862
835
|
const Kbd = React.forwardRef((_ref, ref) => {
|
|
863
836
|
let {
|
|
@@ -875,16 +848,20 @@ Kbd.propTypes = {
|
|
|
875
848
|
size: PropTypes__default.default.oneOf(INHERIT_SIZE)
|
|
876
849
|
};
|
|
877
850
|
|
|
878
|
-
const Paragraph = React.forwardRef((
|
|
879
|
-
|
|
880
|
-
|
|
851
|
+
const Paragraph = React.forwardRef((_ref, ref) => {
|
|
852
|
+
let {
|
|
853
|
+
size = 'medium',
|
|
854
|
+
...props
|
|
855
|
+
} = _ref;
|
|
856
|
+
return React__default.default.createElement(StyledParagraph, Object.assign({
|
|
857
|
+
ref: ref,
|
|
858
|
+
size: size
|
|
859
|
+
}, props));
|
|
860
|
+
});
|
|
881
861
|
Paragraph.displayName = 'Paragraph';
|
|
882
862
|
Paragraph.propTypes = {
|
|
883
863
|
size: PropTypes__default.default.oneOf(SIZE)
|
|
884
864
|
};
|
|
885
|
-
Paragraph.defaultProps = {
|
|
886
|
-
size: 'medium'
|
|
887
|
-
};
|
|
888
865
|
|
|
889
866
|
const OrderedListContext = React.createContext(undefined);
|
|
890
867
|
const useOrderedListContext = () => {
|
|
@@ -909,8 +886,8 @@ const Item$1 = OrderedListItem;
|
|
|
909
886
|
|
|
910
887
|
const OrderedListComponent = React__default.default.forwardRef((_ref, ref) => {
|
|
911
888
|
let {
|
|
912
|
-
size,
|
|
913
|
-
type,
|
|
889
|
+
size = 'medium',
|
|
890
|
+
type = 'decimal',
|
|
914
891
|
...other
|
|
915
892
|
} = _ref;
|
|
916
893
|
const value = React.useMemo(() => ({
|
|
@@ -928,10 +905,6 @@ OrderedListComponent.propTypes = {
|
|
|
928
905
|
size: PropTypes__default.default.oneOf(SIZE),
|
|
929
906
|
type: PropTypes__default.default.oneOf(TYPE_ORDERED_LIST)
|
|
930
907
|
};
|
|
931
|
-
OrderedListComponent.defaultProps = {
|
|
932
|
-
size: 'medium',
|
|
933
|
-
type: 'decimal'
|
|
934
|
-
};
|
|
935
908
|
const OrderedList = OrderedListComponent;
|
|
936
909
|
OrderedList.Item = Item$1;
|
|
937
910
|
|
|
@@ -958,8 +931,8 @@ const Item = UnorderedListItem;
|
|
|
958
931
|
|
|
959
932
|
const UnorderedListComponent = React.forwardRef((_ref, ref) => {
|
|
960
933
|
let {
|
|
961
|
-
size,
|
|
962
|
-
type,
|
|
934
|
+
size = 'medium',
|
|
935
|
+
type = 'disc',
|
|
963
936
|
...other
|
|
964
937
|
} = _ref;
|
|
965
938
|
const value = React.useMemo(() => ({
|
|
@@ -977,10 +950,6 @@ UnorderedListComponent.propTypes = {
|
|
|
977
950
|
size: PropTypes__default.default.oneOf(SIZE),
|
|
978
951
|
type: PropTypes__default.default.oneOf(TYPE_UNORDERED_LIST)
|
|
979
952
|
};
|
|
980
|
-
UnorderedListComponent.defaultProps = {
|
|
981
|
-
size: 'medium',
|
|
982
|
-
type: 'disc'
|
|
983
|
-
};
|
|
984
953
|
const UnorderedList = UnorderedListComponent;
|
|
985
954
|
UnorderedList.Item = Item;
|
|
986
955
|
|
|
@@ -999,7 +968,7 @@ const SpanComponent = React.forwardRef((_ref, ref) => {
|
|
|
999
968
|
hue,
|
|
1000
969
|
isBold,
|
|
1001
970
|
isMonospace,
|
|
1002
|
-
tag,
|
|
971
|
+
tag = 'span',
|
|
1003
972
|
...other
|
|
1004
973
|
} = _ref;
|
|
1005
974
|
return React__default.default.createElement(StyledFont, Object.assign({
|
|
@@ -1018,9 +987,6 @@ SpanComponent.propTypes = {
|
|
|
1018
987
|
isMonospace: PropTypes__default.default.bool,
|
|
1019
988
|
hue: PropTypes__default.default.string
|
|
1020
989
|
};
|
|
1021
|
-
SpanComponent.defaultProps = {
|
|
1022
|
-
tag: 'span'
|
|
1023
|
-
};
|
|
1024
990
|
const Span = SpanComponent;
|
|
1025
991
|
Span.Icon = Icon;
|
|
1026
992
|
Span.StartIcon = StartIcon;
|
|
@@ -10,9 +10,9 @@ interface IStyledCodeProps extends Omit<IStyledFontProps, 'size'> {
|
|
|
10
10
|
$hue?: ICodeProps['hue'];
|
|
11
11
|
$size?: ICodeProps['size'];
|
|
12
12
|
}
|
|
13
|
-
export declare const StyledCode: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").
|
|
13
|
+
export declare const StyledCode: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
14
14
|
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
15
15
|
}, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
16
16
|
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
17
|
-
}>,
|
|
17
|
+
}>, IStyledCodeProps>, IStyledCodeProps>> & string;
|
|
18
18
|
export {};
|
|
@@ -16,7 +16,7 @@ export interface IStyledFontProps {
|
|
|
16
16
|
$size?: (typeof FONT_SIZE)[number];
|
|
17
17
|
$hue?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare const StyledFont: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").
|
|
19
|
+
export declare const StyledFont: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
20
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
21
|
-
}>,
|
|
21
|
+
}>, IStyledFontProps>, IStyledFontProps>> & string;
|
|
22
22
|
export {};
|
|
@@ -8,14 +8,14 @@ import { Size } from '../types';
|
|
|
8
8
|
interface IStyledListItemProps {
|
|
9
9
|
$space?: Size;
|
|
10
10
|
}
|
|
11
|
-
export declare const StyledOrderedListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").
|
|
11
|
+
export declare const StyledOrderedListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
12
12
|
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
13
13
|
}, Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
14
14
|
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
15
|
-
}>,
|
|
16
|
-
export declare const StyledUnorderedListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").
|
|
15
|
+
}>, IStyledListItemProps>, IStyledListItemProps>> & string;
|
|
16
|
+
export declare const StyledUnorderedListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
17
17
|
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
18
18
|
}, Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
19
19
|
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
20
|
-
}>,
|
|
20
|
+
}>, IStyledListItemProps>, IStyledListItemProps>> & string;
|
|
21
21
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-typography",
|
|
3
|
-
"version": "9.11.
|
|
3
|
+
"version": "9.11.2",
|
|
4
4
|
"description": "Components relating to typography in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"styled-components": "^5.3.1 || ^6.0.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@zendeskgarden/react-theming": "^9.11.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.11.2"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"components",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"zendeskgarden:src": "src/index.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "3adb38d25d0a3fa38ff21c7707950623f22b5db7"
|
|
49
49
|
}
|