@zendeskgarden/react-typography 9.10.1 → 9.11.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/esm/elements/Blockquote.js +1 -0
- package/dist/esm/elements/Code.js +1 -0
- package/dist/esm/elements/CodeBlock.js +1 -0
- package/dist/esm/elements/Ellipsis.js +1 -0
- package/dist/esm/elements/Kbd.js +40 -0
- package/dist/esm/elements/LG.js +1 -0
- package/dist/esm/elements/MD.js +1 -0
- package/dist/esm/elements/Paragraph.js +1 -0
- package/dist/esm/elements/SM.js +1 -0
- package/dist/esm/elements/XL.js +1 -0
- package/dist/esm/elements/XXL.js +1 -0
- package/dist/esm/elements/XXXL.js +1 -0
- package/dist/esm/elements/lists/OrderedList.js +1 -0
- package/dist/esm/elements/lists/OrderedListItem.js +1 -0
- package/dist/esm/elements/lists/UnorderedList.js +1 -0
- package/dist/esm/elements/lists/UnorderedListItem.js +1 -0
- package/dist/esm/elements/span/Icon.js +1 -0
- package/dist/esm/elements/span/Span.js +1 -0
- package/dist/esm/elements/span/StartIcon.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/styled/StyledBlockquote.js +1 -1
- package/dist/esm/styled/StyledCode.js +1 -1
- 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 +1 -1
- package/dist/esm/styled/StyledIcon.js +1 -1
- package/dist/esm/styled/StyledKbd.js +52 -0
- package/dist/esm/styled/StyledList.js +2 -2
- package/dist/esm/styled/StyledListItem.js +2 -2
- package/dist/esm/styled/StyledParagraph.js +1 -1
- package/dist/index.cjs.js +91 -34
- package/dist/typings/elements/Kbd.d.ts +12 -0
- package/dist/typings/index.d.ts +2 -1
- package/dist/typings/styled/StyledKbd.d.ts +17 -0
- package/dist/typings/styled/index.d.ts +1 -0
- package/dist/typings/types/index.d.ts +4 -0
- package/package.json +3 -3
|
@@ -16,6 +16,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
16
16
|
import '../styled/StyledEllipsis.js';
|
|
17
17
|
import '../styled/StyledFont.js';
|
|
18
18
|
import '../styled/StyledIcon.js';
|
|
19
|
+
import '../styled/StyledKbd.js';
|
|
19
20
|
import '../styled/StyledList.js';
|
|
20
21
|
import '../styled/StyledListItem.js';
|
|
21
22
|
import '../styled/StyledParagraph.js';
|
|
@@ -16,6 +16,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
16
16
|
import '../styled/StyledEllipsis.js';
|
|
17
17
|
import '../styled/StyledFont.js';
|
|
18
18
|
import '../styled/StyledIcon.js';
|
|
19
|
+
import '../styled/StyledKbd.js';
|
|
19
20
|
import '../styled/StyledList.js';
|
|
20
21
|
import '../styled/StyledListItem.js';
|
|
21
22
|
import '../styled/StyledParagraph.js';
|
|
@@ -18,6 +18,7 @@ import { StyledCodeBlockToken } from '../styled/StyledCodeBlockToken.js';
|
|
|
18
18
|
import '../styled/StyledEllipsis.js';
|
|
19
19
|
import '../styled/StyledFont.js';
|
|
20
20
|
import '../styled/StyledIcon.js';
|
|
21
|
+
import '../styled/StyledKbd.js';
|
|
21
22
|
import '../styled/StyledList.js';
|
|
22
23
|
import '../styled/StyledListItem.js';
|
|
23
24
|
import '../styled/StyledParagraph.js';
|
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import { StyledEllipsis } from '../styled/StyledEllipsis.js';
|
|
16
16
|
import '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React, { forwardRef } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import '../styled/StyledBlockquote.js';
|
|
10
|
+
import '../styled/StyledCode.js';
|
|
11
|
+
import '../styled/StyledCodeBlock.js';
|
|
12
|
+
import '../styled/StyledCodeBlockContainer.js';
|
|
13
|
+
import '../styled/StyledCodeBlockLine.js';
|
|
14
|
+
import '../styled/StyledCodeBlockToken.js';
|
|
15
|
+
import '../styled/StyledEllipsis.js';
|
|
16
|
+
import '../styled/StyledFont.js';
|
|
17
|
+
import '../styled/StyledIcon.js';
|
|
18
|
+
import { StyledKbd } from '../styled/StyledKbd.js';
|
|
19
|
+
import '../styled/StyledList.js';
|
|
20
|
+
import '../styled/StyledListItem.js';
|
|
21
|
+
import '../styled/StyledParagraph.js';
|
|
22
|
+
import { INHERIT_SIZE } from '../types/index.js';
|
|
23
|
+
|
|
24
|
+
const Kbd = forwardRef((_ref, ref) => {
|
|
25
|
+
let {
|
|
26
|
+
size = 'inherit',
|
|
27
|
+
...other
|
|
28
|
+
} = _ref;
|
|
29
|
+
return React.createElement(StyledKbd, Object.assign({
|
|
30
|
+
$size: size
|
|
31
|
+
}, other, {
|
|
32
|
+
ref: ref
|
|
33
|
+
}));
|
|
34
|
+
});
|
|
35
|
+
Kbd.displayName = 'Kbd';
|
|
36
|
+
Kbd.propTypes = {
|
|
37
|
+
size: PropTypes.oneOf(INHERIT_SIZE)
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export { Kbd };
|
package/dist/esm/elements/LG.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
package/dist/esm/elements/MD.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
|
@@ -16,6 +16,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
16
16
|
import '../styled/StyledEllipsis.js';
|
|
17
17
|
import '../styled/StyledFont.js';
|
|
18
18
|
import '../styled/StyledIcon.js';
|
|
19
|
+
import '../styled/StyledKbd.js';
|
|
19
20
|
import '../styled/StyledList.js';
|
|
20
21
|
import '../styled/StyledListItem.js';
|
|
21
22
|
import { StyledParagraph } from '../styled/StyledParagraph.js';
|
package/dist/esm/elements/SM.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
package/dist/esm/elements/XL.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
package/dist/esm/elements/XXL.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
|
@@ -15,6 +15,7 @@ import '../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../styled/StyledFont.js';
|
|
17
17
|
import '../styled/StyledIcon.js';
|
|
18
|
+
import '../styled/StyledKbd.js';
|
|
18
19
|
import '../styled/StyledList.js';
|
|
19
20
|
import '../styled/StyledListItem.js';
|
|
20
21
|
import '../styled/StyledParagraph.js';
|
|
@@ -18,6 +18,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
18
18
|
import '../../styled/StyledEllipsis.js';
|
|
19
19
|
import '../../styled/StyledFont.js';
|
|
20
20
|
import '../../styled/StyledIcon.js';
|
|
21
|
+
import '../../styled/StyledKbd.js';
|
|
21
22
|
import { StyledOrderedList } from '../../styled/StyledList.js';
|
|
22
23
|
import '../../styled/StyledListItem.js';
|
|
23
24
|
import '../../styled/StyledParagraph.js';
|
|
@@ -15,6 +15,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../../styled/StyledEllipsis.js';
|
|
16
16
|
import '../../styled/StyledFont.js';
|
|
17
17
|
import '../../styled/StyledIcon.js';
|
|
18
|
+
import '../../styled/StyledKbd.js';
|
|
18
19
|
import '../../styled/StyledList.js';
|
|
19
20
|
import { StyledOrderedListItem } from '../../styled/StyledListItem.js';
|
|
20
21
|
import '../../styled/StyledParagraph.js';
|
|
@@ -18,6 +18,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
18
18
|
import '../../styled/StyledEllipsis.js';
|
|
19
19
|
import '../../styled/StyledFont.js';
|
|
20
20
|
import '../../styled/StyledIcon.js';
|
|
21
|
+
import '../../styled/StyledKbd.js';
|
|
21
22
|
import { StyledUnorderedList } from '../../styled/StyledList.js';
|
|
22
23
|
import '../../styled/StyledListItem.js';
|
|
23
24
|
import '../../styled/StyledParagraph.js';
|
|
@@ -15,6 +15,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../../styled/StyledEllipsis.js';
|
|
16
16
|
import '../../styled/StyledFont.js';
|
|
17
17
|
import '../../styled/StyledIcon.js';
|
|
18
|
+
import '../../styled/StyledKbd.js';
|
|
18
19
|
import '../../styled/StyledList.js';
|
|
19
20
|
import { StyledUnorderedListItem } from '../../styled/StyledListItem.js';
|
|
20
21
|
import '../../styled/StyledParagraph.js';
|
|
@@ -14,6 +14,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
14
14
|
import '../../styled/StyledEllipsis.js';
|
|
15
15
|
import '../../styled/StyledFont.js';
|
|
16
16
|
import { StyledIcon } from '../../styled/StyledIcon.js';
|
|
17
|
+
import '../../styled/StyledKbd.js';
|
|
17
18
|
import '../../styled/StyledList.js';
|
|
18
19
|
import '../../styled/StyledListItem.js';
|
|
19
20
|
import '../../styled/StyledParagraph.js';
|
|
@@ -15,6 +15,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
15
15
|
import '../../styled/StyledEllipsis.js';
|
|
16
16
|
import { StyledFont } from '../../styled/StyledFont.js';
|
|
17
17
|
import '../../styled/StyledIcon.js';
|
|
18
|
+
import '../../styled/StyledKbd.js';
|
|
18
19
|
import '../../styled/StyledList.js';
|
|
19
20
|
import '../../styled/StyledListItem.js';
|
|
20
21
|
import '../../styled/StyledParagraph.js';
|
|
@@ -14,6 +14,7 @@ import '../../styled/StyledCodeBlockToken.js';
|
|
|
14
14
|
import '../../styled/StyledEllipsis.js';
|
|
15
15
|
import '../../styled/StyledFont.js';
|
|
16
16
|
import { StyledIcon } from '../../styled/StyledIcon.js';
|
|
17
|
+
import '../../styled/StyledKbd.js';
|
|
17
18
|
import '../../styled/StyledList.js';
|
|
18
19
|
import '../../styled/StyledListItem.js';
|
|
19
20
|
import '../../styled/StyledParagraph.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export { Blockquote } from './elements/Blockquote.js';
|
|
|
14
14
|
export { Code } from './elements/Code.js';
|
|
15
15
|
export { CodeBlock } from './elements/CodeBlock.js';
|
|
16
16
|
export { Ellipsis } from './elements/Ellipsis.js';
|
|
17
|
+
export { Kbd } from './elements/Kbd.js';
|
|
17
18
|
export { Paragraph } from './elements/Paragraph.js';
|
|
18
19
|
export { OrderedList } from './elements/lists/OrderedList.js';
|
|
19
20
|
export { UnorderedList } from './elements/lists/UnorderedList.js';
|
|
@@ -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.
|
|
14
|
+
'data-garden-version': '9.11.1'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledBlockquote",
|
|
17
17
|
componentId: "sc-1tt3ye0-0"
|
|
@@ -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.
|
|
27
|
+
'data-garden-version': '9.11.1'
|
|
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.
|
|
13
|
+
'data-garden-version': '9.11.1'
|
|
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.
|
|
89
|
+
'data-garden-version': '9.11.1',
|
|
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.
|
|
174
|
+
'data-garden-version': '9.11.1'
|
|
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.
|
|
13
|
+
'data-garden-version': '9.11.1'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledEllipsis",
|
|
16
16
|
componentId: "sc-1u4uqmy-0"
|
|
@@ -67,7 +67,7 @@ const fontStyles = _ref => {
|
|
|
67
67
|
};
|
|
68
68
|
const StyledFont = styled.div.attrs({
|
|
69
69
|
'data-garden-id': COMPONENT_ID,
|
|
70
|
-
'data-garden-version': '9.
|
|
70
|
+
'data-garden-version': '9.11.1'
|
|
71
71
|
}).withConfig({
|
|
72
72
|
displayName: "StyledFont",
|
|
73
73
|
componentId: "sc-1iildbo-0"
|
|
@@ -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.
|
|
18
|
+
'data-garden-version': '9.11.1'
|
|
19
19
|
}).withConfig({
|
|
20
20
|
displayName: "StyledIcon",
|
|
21
21
|
componentId: "sc-10rfb5b-0"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import styled, { css } from 'styled-components';
|
|
8
|
+
import { stripUnit, math } from 'polished';
|
|
9
|
+
import { componentStyles } from '@zendeskgarden/react-theming';
|
|
10
|
+
import { StyledCode } from './StyledCode.js';
|
|
11
|
+
|
|
12
|
+
const COMPONENT_ID = 'typography.kbd';
|
|
13
|
+
const sizeStyles = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
theme,
|
|
16
|
+
$size
|
|
17
|
+
} = _ref;
|
|
18
|
+
let minWidth;
|
|
19
|
+
let paddingHorizontal;
|
|
20
|
+
let paddingVertical = '0';
|
|
21
|
+
switch ($size) {
|
|
22
|
+
case 'small':
|
|
23
|
+
minWidth = math(`${theme.lineHeights.sm} - 1px`);
|
|
24
|
+
paddingHorizontal = `${theme.space.base}px`;
|
|
25
|
+
break;
|
|
26
|
+
case 'medium':
|
|
27
|
+
minWidth = math(`${theme.lineHeights.md} - 1px`);
|
|
28
|
+
paddingHorizontal = `${theme.space.base * 1.5}px`;
|
|
29
|
+
break;
|
|
30
|
+
case 'large':
|
|
31
|
+
minWidth = math(`${theme.lineHeights.lg} - 1px`);
|
|
32
|
+
paddingHorizontal = `${theme.space.base * 1.75}px`;
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
minWidth = 'calc(1.2em + 3px)';
|
|
36
|
+
paddingHorizontal = `${stripUnit(math(`${theme.space.base * 1.5} / (${theme.fontSizes.md} - 1px)`))}em`;
|
|
37
|
+
paddingVertical = '1.5px';
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
const padding = `${paddingVertical} ${paddingHorizontal}`;
|
|
41
|
+
return css(["&&{box-sizing:border-box;padding:", ";min-width:", ";}"], padding, minWidth);
|
|
42
|
+
};
|
|
43
|
+
const StyledKbd = styled(StyledCode).attrs({
|
|
44
|
+
'data-garden-id': COMPONENT_ID,
|
|
45
|
+
'data-garden-version': '9.11.1',
|
|
46
|
+
as: 'kbd'
|
|
47
|
+
}).withConfig({
|
|
48
|
+
displayName: "StyledKbd",
|
|
49
|
+
componentId: "sc-1gzk2wp-0"
|
|
50
|
+
})(["display:inline-block;direction:ltr;text-align:center;font-family:sans-serif;", ";", ";"], sizeStyles, componentStyles);
|
|
51
|
+
|
|
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.
|
|
17
|
+
'data-garden-version': '9.11.1'
|
|
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.
|
|
25
|
+
'data-garden-version': '9.11.1'
|
|
26
26
|
}).withConfig({
|
|
27
27
|
displayName: "StyledList__StyledUnorderedList",
|
|
28
28
|
componentId: "sc-jdbsfi-1"
|
|
@@ -21,7 +21,7 @@ const listItemStyles = props => {
|
|
|
21
21
|
const ORDERED_ID = 'typography.ordered_list_item';
|
|
22
22
|
const StyledOrderedListItem = styled(StyledFont).attrs({
|
|
23
23
|
'data-garden-id': ORDERED_ID,
|
|
24
|
-
'data-garden-version': '9.
|
|
24
|
+
'data-garden-version': '9.11.1',
|
|
25
25
|
as: 'li'
|
|
26
26
|
}).withConfig({
|
|
27
27
|
displayName: "StyledListItem__StyledOrderedListItem",
|
|
@@ -34,7 +34,7 @@ StyledOrderedListItem.defaultProps = {
|
|
|
34
34
|
const UNORDERED_ID = 'typography.unordered_list_item';
|
|
35
35
|
const StyledUnorderedListItem = styled(StyledFont).attrs({
|
|
36
36
|
'data-garden-id': UNORDERED_ID,
|
|
37
|
-
'data-garden-version': '9.
|
|
37
|
+
'data-garden-version': '9.11.1',
|
|
38
38
|
as: 'li'
|
|
39
39
|
}).withConfig({
|
|
40
40
|
displayName: "StyledListItem__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.
|
|
14
|
+
'data-garden-version': '9.11.1'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledParagraph",
|
|
17
17
|
componentId: "sc-zkuftz-0"
|
package/dist/index.cjs.js
CHANGED
|
@@ -28,7 +28,7 @@ const TYPE_ORDERED_LIST = ['decimal', 'decimal-leading-zero', 'lower-alpha', 'lo
|
|
|
28
28
|
const TYPE_UNORDERED_LIST = ['circle', 'disc', 'square'];
|
|
29
29
|
const LANGUAGES = ['bash', 'css', 'diff', 'graphql', 'javascript', 'json', 'jsx', 'markdown', 'markup', 'python', 'typescript', 'tsx', 'yaml'];
|
|
30
30
|
|
|
31
|
-
const COMPONENT_ID$
|
|
31
|
+
const COMPONENT_ID$a = 'typography.font';
|
|
32
32
|
[...SIZE, 'extralarge', '2xlarge', '3xlarge'];
|
|
33
33
|
const THEME_SIZES = {
|
|
34
34
|
small: 'sm',
|
|
@@ -85,8 +85,8 @@ const fontStyles = _ref => {
|
|
|
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
87
|
const StyledFont = styled__default.default.div.attrs({
|
|
88
|
-
'data-garden-id': COMPONENT_ID$
|
|
89
|
-
'data-garden-version': '9.
|
|
88
|
+
'data-garden-id': COMPONENT_ID$a,
|
|
89
|
+
'data-garden-version': '9.11.1'
|
|
90
90
|
}).withConfig({
|
|
91
91
|
displayName: "StyledFont",
|
|
92
92
|
componentId: "sc-1iildbo-0"
|
|
@@ -95,10 +95,10 @@ StyledFont.defaultProps = {
|
|
|
95
95
|
$size: 'inherit'
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
const COMPONENT_ID$
|
|
98
|
+
const COMPONENT_ID$9 = 'typography.blockquote';
|
|
99
99
|
const StyledBlockquote = styled__default.default.blockquote.attrs({
|
|
100
|
-
'data-garden-id': COMPONENT_ID$
|
|
101
|
-
'data-garden-version': '9.
|
|
100
|
+
'data-garden-id': COMPONENT_ID$9,
|
|
101
|
+
'data-garden-version': '9.11.1'
|
|
102
102
|
}).withConfig({
|
|
103
103
|
displayName: "StyledBlockquote",
|
|
104
104
|
componentId: "sc-1tt3ye0-0"
|
|
@@ -107,7 +107,7 @@ const StyledBlockquote = styled__default.default.blockquote.attrs({
|
|
|
107
107
|
variable: 'border.default'
|
|
108
108
|
}), props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 4, props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.lineHeights[THEME_SIZES[props.size]], reactTheming.componentStyles);
|
|
109
109
|
|
|
110
|
-
const COMPONENT_ID$
|
|
110
|
+
const COMPONENT_ID$8 = 'typography.code';
|
|
111
111
|
const colorStyles$3 = _ref => {
|
|
112
112
|
let {
|
|
113
113
|
$hue,
|
|
@@ -148,8 +148,8 @@ const colorStyles$3 = _ref => {
|
|
|
148
148
|
return styled.css(["background-color:", ";color:", ";a &{color:inherit;}"], backgroundColor, foregroundColor);
|
|
149
149
|
};
|
|
150
150
|
const StyledCode = styled__default.default(StyledFont).attrs({
|
|
151
|
-
'data-garden-id': COMPONENT_ID$
|
|
152
|
-
'data-garden-version': '9.
|
|
151
|
+
'data-garden-id': COMPONENT_ID$8,
|
|
152
|
+
'data-garden-version': '9.11.1',
|
|
153
153
|
as: 'code',
|
|
154
154
|
$isMonospace: true
|
|
155
155
|
}).withConfig({
|
|
@@ -162,7 +162,7 @@ StyledCode.defaultProps = {
|
|
|
162
162
|
$size: 'inherit'
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
-
const COMPONENT_ID$
|
|
165
|
+
const COMPONENT_ID$7 = 'typography.codeblock';
|
|
166
166
|
const colorStyles$2 = _ref => {
|
|
167
167
|
let {
|
|
168
168
|
theme
|
|
@@ -178,17 +178,17 @@ const colorStyles$2 = _ref => {
|
|
|
178
178
|
return styled.css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
179
179
|
};
|
|
180
180
|
const StyledCodeBlock = styled__default.default.pre.attrs({
|
|
181
|
-
'data-garden-id': COMPONENT_ID$
|
|
182
|
-
'data-garden-version': '9.
|
|
181
|
+
'data-garden-id': COMPONENT_ID$7,
|
|
182
|
+
'data-garden-version': '9.11.1'
|
|
183
183
|
}).withConfig({
|
|
184
184
|
displayName: "StyledCodeBlock",
|
|
185
185
|
componentId: "sc-5wky57-0"
|
|
186
186
|
})(["display:table;margin:0;padding:", "px;box-sizing:border-box;width:100%;direction:ltr;white-space:pre;counter-reset:linenumber;", ";", ";"], props => props.theme.space.base * 3, colorStyles$2, reactTheming.componentStyles);
|
|
187
187
|
|
|
188
|
-
const COMPONENT_ID$
|
|
188
|
+
const COMPONENT_ID$6 = 'typography.codeblock_container';
|
|
189
189
|
const StyledCodeBlockContainer = styled__default.default.div.attrs({
|
|
190
|
-
'data-garden-id': COMPONENT_ID$
|
|
191
|
-
'data-garden-version': '9.
|
|
190
|
+
'data-garden-id': COMPONENT_ID$6,
|
|
191
|
+
'data-garden-version': '9.11.1'
|
|
192
192
|
}).withConfig({
|
|
193
193
|
displayName: "StyledCodeBlockContainer",
|
|
194
194
|
componentId: "sc-14zgbfw-0"
|
|
@@ -196,7 +196,7 @@ const StyledCodeBlockContainer = styled__default.default.div.attrs({
|
|
|
196
196
|
theme: props.theme
|
|
197
197
|
}), reactTheming.componentStyles);
|
|
198
198
|
|
|
199
|
-
const COMPONENT_ID$
|
|
199
|
+
const COMPONENT_ID$5 = 'typography.codeblock_code';
|
|
200
200
|
const colorStyles$1 = _ref => {
|
|
201
201
|
let {
|
|
202
202
|
theme,
|
|
@@ -273,8 +273,8 @@ const lineNumberStyles = _ref2 => {
|
|
|
273
273
|
`;
|
|
274
274
|
};
|
|
275
275
|
const StyledCodeBlockLine = styled__default.default(StyledFont).attrs({
|
|
276
|
-
'data-garden-id': COMPONENT_ID$
|
|
277
|
-
'data-garden-version': '9.
|
|
276
|
+
'data-garden-id': COMPONENT_ID$5,
|
|
277
|
+
'data-garden-version': '9.11.1',
|
|
278
278
|
as: 'code',
|
|
279
279
|
$isMonospace: true
|
|
280
280
|
}).withConfig({
|
|
@@ -282,7 +282,7 @@ const StyledCodeBlockLine = styled__default.default(StyledFont).attrs({
|
|
|
282
282
|
componentId: "sc-1goay17-0"
|
|
283
283
|
})(["display:table-row;height:", ";direction:ltr;", ";", ";&::after{display:inline-block;width:", "px;content:'';}", ";"], props => props.theme.lineHeights[THEME_SIZES[props.$size]], colorStyles$1, props => props.$isNumbered && lineNumberStyles(props), props => props.theme.space.base * 3, reactTheming.componentStyles);
|
|
284
284
|
|
|
285
|
-
const COMPONENT_ID$
|
|
285
|
+
const COMPONENT_ID$4 = 'typography.codeblock_token';
|
|
286
286
|
const colorStyles = _ref => {
|
|
287
287
|
let {
|
|
288
288
|
theme
|
|
@@ -444,35 +444,75 @@ const colorStyles = _ref => {
|
|
|
444
444
|
return styled.css(["&.builtin,&.class-name,&.tag:not(.punctuation):not(.attr-name):not(.attr-value):not(.script){color:", ";}&.doctype,&.prolog,&.tag.punctuation:not(.attr-value):not(.script):not(.spread){color:", ";}&.attribute.value,&.attr-value,&.atrule,&.cdata,&.string,&.url.content{color:", ";}&.constant,&.interpolation-punctuation{color:", ";}&.attr-name,&.attr-value.spread,&.environment,&.interpolation,&.parameter,&.property,&.property-access,&.variable{color:", ";}&.parameter.punctuation,&.attr-name + .attr-value.punctuation{color:inherit;}&.regex{color:", ";}&.boolean,&.bold:not(.diff),&.entity,&.important,&.tag:not(.punctuation):not(.attr-name):not(.attr-value):not(.script):not(.class-name){color:", ";}&.number,&.unit{color:", ";}&.assign-left,&.function,&.selector:not(.attribute){color:", ";}&.atrule.rule,&.keyword{color:", ";}&.blockquote,&.comment,&.shebang{color:", ";}", ".language-css &&.plain{color:", ";}", ".language-diff &&.coord{color:", ";}", ".language-diff &&.deleted{color:", ";}", ".language-diff &&.diff{color:", ";}", ".language-diff &&.inserted{color:", ";}"], colors.builtin, colors.punctuation, colors.value, colors.constant, colors.name, colors.regex, colors.boolean, colors.number, colors.function, colors.keyword, colors.comment, StyledCodeBlock, colors.value, StyledCodeBlock, colors.coord, StyledCodeBlock, colors.deleted, StyledCodeBlock, colors.diff, StyledCodeBlock, colors.inserted);
|
|
445
445
|
};
|
|
446
446
|
const StyledCodeBlockToken = styled__default.default.span.attrs({
|
|
447
|
-
'data-garden-id': COMPONENT_ID$
|
|
448
|
-
'data-garden-version': '9.
|
|
447
|
+
'data-garden-id': COMPONENT_ID$4,
|
|
448
|
+
'data-garden-version': '9.11.1'
|
|
449
449
|
}).withConfig({
|
|
450
450
|
displayName: "StyledCodeBlockToken",
|
|
451
451
|
componentId: "sc-1hkshdq-0"
|
|
452
452
|
})(["display:inline-block;&.bold:not(.diff){font-weight:", ";}&.coord{padding-left:0.75em;}&.italic{font-style:italic;}&.prefix{width:2em;text-align:center;}", ";", ";"], props => props.theme.fontWeights.semibold, colorStyles, reactTheming.componentStyles);
|
|
453
453
|
|
|
454
|
-
const COMPONENT_ID$
|
|
454
|
+
const COMPONENT_ID$3 = 'typography.ellipsis';
|
|
455
455
|
const StyledEllipsis = styled__default.default.div.attrs({
|
|
456
|
-
'data-garden-id': COMPONENT_ID$
|
|
457
|
-
'data-garden-version': '9.
|
|
456
|
+
'data-garden-id': COMPONENT_ID$3,
|
|
457
|
+
'data-garden-version': '9.11.1'
|
|
458
458
|
}).withConfig({
|
|
459
459
|
displayName: "StyledEllipsis",
|
|
460
460
|
componentId: "sc-1u4uqmy-0"
|
|
461
461
|
})(["overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:", ";", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', reactTheming.componentStyles);
|
|
462
462
|
|
|
463
|
-
const COMPONENT_ID$
|
|
464
|
-
const sizeStyles = props => {
|
|
463
|
+
const COMPONENT_ID$2 = 'typography.icon';
|
|
464
|
+
const sizeStyles$1 = props => {
|
|
465
465
|
const margin = props.$isStart && `${props.theme.space.base * 2}px`;
|
|
466
466
|
const size = props.theme.iconSizes.md;
|
|
467
467
|
return styled.css(["margin-", ":", ";width:", ";height:", ";"], props.theme.rtl ? 'left' : 'right', margin, size, size);
|
|
468
468
|
};
|
|
469
469
|
const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
470
|
-
'data-garden-id': COMPONENT_ID$
|
|
471
|
-
'data-garden-version': '9.
|
|
470
|
+
'data-garden-id': COMPONENT_ID$2,
|
|
471
|
+
'data-garden-version': '9.11.1'
|
|
472
472
|
}).withConfig({
|
|
473
473
|
displayName: "StyledIcon",
|
|
474
474
|
componentId: "sc-10rfb5b-0"
|
|
475
|
-
})(["position:relative;top:-1px;vertical-align:middle;", ";", ";"], props => sizeStyles(props), reactTheming.componentStyles);
|
|
475
|
+
})(["position:relative;top:-1px;vertical-align:middle;", ";", ";"], props => sizeStyles$1(props), reactTheming.componentStyles);
|
|
476
|
+
|
|
477
|
+
const COMPONENT_ID$1 = 'typography.kbd';
|
|
478
|
+
const sizeStyles = _ref => {
|
|
479
|
+
let {
|
|
480
|
+
theme,
|
|
481
|
+
$size
|
|
482
|
+
} = _ref;
|
|
483
|
+
let minWidth;
|
|
484
|
+
let paddingHorizontal;
|
|
485
|
+
let paddingVertical = '0';
|
|
486
|
+
switch ($size) {
|
|
487
|
+
case 'small':
|
|
488
|
+
minWidth = polished.math(`${theme.lineHeights.sm} - 1px`);
|
|
489
|
+
paddingHorizontal = `${theme.space.base}px`;
|
|
490
|
+
break;
|
|
491
|
+
case 'medium':
|
|
492
|
+
minWidth = polished.math(`${theme.lineHeights.md} - 1px`);
|
|
493
|
+
paddingHorizontal = `${theme.space.base * 1.5}px`;
|
|
494
|
+
break;
|
|
495
|
+
case 'large':
|
|
496
|
+
minWidth = polished.math(`${theme.lineHeights.lg} - 1px`);
|
|
497
|
+
paddingHorizontal = `${theme.space.base * 1.75}px`;
|
|
498
|
+
break;
|
|
499
|
+
default:
|
|
500
|
+
minWidth = 'calc(1.2em + 3px)';
|
|
501
|
+
paddingHorizontal = `${polished.stripUnit(polished.math(`${theme.space.base * 1.5} / (${theme.fontSizes.md} - 1px)`))}em`;
|
|
502
|
+
paddingVertical = '1.5px';
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
const padding = `${paddingVertical} ${paddingHorizontal}`;
|
|
506
|
+
return styled.css(["&&{box-sizing:border-box;padding:", ";min-width:", ";}"], padding, minWidth);
|
|
507
|
+
};
|
|
508
|
+
const StyledKbd = styled__default.default(StyledCode).attrs({
|
|
509
|
+
'data-garden-id': COMPONENT_ID$1,
|
|
510
|
+
'data-garden-version': '9.11.1',
|
|
511
|
+
as: 'kbd'
|
|
512
|
+
}).withConfig({
|
|
513
|
+
displayName: "StyledKbd",
|
|
514
|
+
componentId: "sc-1gzk2wp-0"
|
|
515
|
+
})(["display:inline-block;direction:ltr;text-align:center;font-family:sans-serif;", ";", ";"], sizeStyles, reactTheming.componentStyles);
|
|
476
516
|
|
|
477
517
|
const listStyles = props => {
|
|
478
518
|
const rtl = props.theme.rtl;
|
|
@@ -481,7 +521,7 @@ const listStyles = props => {
|
|
|
481
521
|
const ORDERED_ID$1 = 'typography.ordered_list';
|
|
482
522
|
const StyledOrderedList = styled__default.default.ol.attrs({
|
|
483
523
|
'data-garden-id': ORDERED_ID$1,
|
|
484
|
-
'data-garden-version': '9.
|
|
524
|
+
'data-garden-version': '9.11.1'
|
|
485
525
|
}).withConfig({
|
|
486
526
|
displayName: "StyledList__StyledOrderedList",
|
|
487
527
|
componentId: "sc-jdbsfi-0"
|
|
@@ -489,7 +529,7 @@ const StyledOrderedList = styled__default.default.ol.attrs({
|
|
|
489
529
|
const UNORDERED_ID$1 = 'typography.unordered_list';
|
|
490
530
|
const StyledUnorderedList = styled__default.default.ul.attrs({
|
|
491
531
|
'data-garden-id': UNORDERED_ID$1,
|
|
492
|
-
'data-garden-version': '9.
|
|
532
|
+
'data-garden-version': '9.11.1'
|
|
493
533
|
}).withConfig({
|
|
494
534
|
displayName: "StyledList__StyledUnorderedList",
|
|
495
535
|
componentId: "sc-jdbsfi-1"
|
|
@@ -506,7 +546,7 @@ const listItemStyles = props => {
|
|
|
506
546
|
const ORDERED_ID = 'typography.ordered_list_item';
|
|
507
547
|
const StyledOrderedListItem = styled__default.default(StyledFont).attrs({
|
|
508
548
|
'data-garden-id': ORDERED_ID,
|
|
509
|
-
'data-garden-version': '9.
|
|
549
|
+
'data-garden-version': '9.11.1',
|
|
510
550
|
as: 'li'
|
|
511
551
|
}).withConfig({
|
|
512
552
|
displayName: "StyledListItem__StyledOrderedListItem",
|
|
@@ -519,7 +559,7 @@ StyledOrderedListItem.defaultProps = {
|
|
|
519
559
|
const UNORDERED_ID = 'typography.unordered_list_item';
|
|
520
560
|
const StyledUnorderedListItem = styled__default.default(StyledFont).attrs({
|
|
521
561
|
'data-garden-id': UNORDERED_ID,
|
|
522
|
-
'data-garden-version': '9.
|
|
562
|
+
'data-garden-version': '9.11.1',
|
|
523
563
|
as: 'li'
|
|
524
564
|
}).withConfig({
|
|
525
565
|
displayName: "StyledListItem__StyledUnorderedListItem",
|
|
@@ -533,7 +573,7 @@ StyledUnorderedListItem.defaultProps = {
|
|
|
533
573
|
const COMPONENT_ID = 'typography.paragraph';
|
|
534
574
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
535
575
|
'data-garden-id': COMPONENT_ID,
|
|
536
|
-
'data-garden-version': '9.
|
|
576
|
+
'data-garden-version': '9.11.1'
|
|
537
577
|
}).withConfig({
|
|
538
578
|
displayName: "StyledParagraph",
|
|
539
579
|
componentId: "sc-zkuftz-0"
|
|
@@ -824,6 +864,22 @@ Ellipsis.defaultProps = {
|
|
|
824
864
|
tag: 'div'
|
|
825
865
|
};
|
|
826
866
|
|
|
867
|
+
const Kbd = React.forwardRef((_ref, ref) => {
|
|
868
|
+
let {
|
|
869
|
+
size = 'inherit',
|
|
870
|
+
...other
|
|
871
|
+
} = _ref;
|
|
872
|
+
return React__default.default.createElement(StyledKbd, Object.assign({
|
|
873
|
+
$size: size
|
|
874
|
+
}, other, {
|
|
875
|
+
ref: ref
|
|
876
|
+
}));
|
|
877
|
+
});
|
|
878
|
+
Kbd.displayName = 'Kbd';
|
|
879
|
+
Kbd.propTypes = {
|
|
880
|
+
size: PropTypes__default.default.oneOf(INHERIT_SIZE)
|
|
881
|
+
};
|
|
882
|
+
|
|
827
883
|
const Paragraph = React.forwardRef((props, ref) => React__default.default.createElement(StyledParagraph, Object.assign({
|
|
828
884
|
ref: ref
|
|
829
885
|
}, props)));
|
|
@@ -978,6 +1034,7 @@ exports.Blockquote = Blockquote;
|
|
|
978
1034
|
exports.Code = Code;
|
|
979
1035
|
exports.CodeBlock = CodeBlock;
|
|
980
1036
|
exports.Ellipsis = Ellipsis;
|
|
1037
|
+
exports.Kbd = Kbd;
|
|
981
1038
|
exports.LG = LG;
|
|
982
1039
|
exports.MD = MD;
|
|
983
1040
|
exports.OrderedList = OrderedList;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IKbdProps } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* @extends HTMLAttributes<HTMLElement>
|
|
11
|
+
*/
|
|
12
|
+
export declare const Kbd: React.ForwardRefExoticComponent<IKbdProps & React.RefAttributes<HTMLElement>>;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ export { Blockquote } from './elements/Blockquote';
|
|
|
14
14
|
export { Code } from './elements/Code';
|
|
15
15
|
export { CodeBlock } from './elements/CodeBlock';
|
|
16
16
|
export { Ellipsis } from './elements/Ellipsis';
|
|
17
|
+
export { Kbd } from './elements/Kbd';
|
|
17
18
|
export { Paragraph } from './elements/Paragraph';
|
|
18
19
|
export { OrderedList } from './elements/lists/OrderedList';
|
|
19
20
|
export { UnorderedList } from './elements/lists/UnorderedList';
|
|
20
21
|
export { Span } from './elements/span/Span';
|
|
21
|
-
export type { ITypescaleMonospaceProps as ISMProps, ITypescaleMonospaceProps as IMDProps, ITypescaleMonospaceProps as ILGProps, ITypescaleProps as IXLProps, ITypescaleProps as IXXLProps, ITypescaleProps as IXXXLProps, IBlockquoteProps, ICodeProps, ICodeBlockProps, IEllipsisProps, IParagraphProps, IOrderedListProps, IUnorderedListProps, ISpanProps } from './types';
|
|
22
|
+
export type { ITypescaleMonospaceProps as ISMProps, ITypescaleMonospaceProps as IMDProps, ITypescaleMonospaceProps as ILGProps, ITypescaleProps as IXLProps, ITypescaleProps as IXXLProps, ITypescaleProps as IXXXLProps, IBlockquoteProps, ICodeProps, ICodeBlockProps, IEllipsisProps, IKbdProps, IParagraphProps, IOrderedListProps, IUnorderedListProps, ISpanProps } from './types';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { DefaultTheme, ThemeProps } from 'styled-components';
|
|
8
|
+
import { IKbdProps } from '../types';
|
|
9
|
+
interface IStyledKbdProps extends ThemeProps<DefaultTheme> {
|
|
10
|
+
$size?: IKbdProps['size'];
|
|
11
|
+
}
|
|
12
|
+
export declare const StyledKbd: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
13
|
+
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;
|
|
14
|
+
}, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
15
|
+
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;
|
|
16
|
+
}>, never>, IStyledKbdProps>> & string;
|
|
17
|
+
export {};
|
|
@@ -13,6 +13,7 @@ export * from './StyledCodeBlockToken';
|
|
|
13
13
|
export * from './StyledEllipsis';
|
|
14
14
|
export * from './StyledFont';
|
|
15
15
|
export * from './StyledIcon';
|
|
16
|
+
export * from './StyledKbd';
|
|
16
17
|
export * from './StyledList';
|
|
17
18
|
export * from './StyledListItem';
|
|
18
19
|
export * from './StyledParagraph';
|
|
@@ -53,6 +53,10 @@ export interface IEllipsisProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
53
53
|
/** Updates the element's HTML tag */
|
|
54
54
|
tag?: any;
|
|
55
55
|
}
|
|
56
|
+
export interface IKbdProps extends HTMLAttributes<HTMLElement> {
|
|
57
|
+
/** Adjusts the font size. By default font size is inherited from the surrounding text. */
|
|
58
|
+
size?: (typeof INHERIT_SIZE)[number];
|
|
59
|
+
}
|
|
56
60
|
export interface IParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
57
61
|
/** Controls the spacing between sibling paragraphs */
|
|
58
62
|
size?: Size;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-typography",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.11.1",
|
|
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.
|
|
36
|
+
"@zendeskgarden/react-theming": "^9.11.1"
|
|
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": "c45a8893e0ed1fd9f1cf257b2badf6bbeae90bc0"
|
|
49
49
|
}
|