@zendeskgarden/react-typography 9.0.0-next.2 → 9.0.0-next.21

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.
Files changed (45) hide show
  1. package/dist/esm/elements/Blockquote.js +34 -0
  2. package/dist/esm/elements/Code.js +43 -0
  3. package/dist/esm/elements/CodeBlock.js +124 -0
  4. package/dist/esm/elements/Ellipsis.js +50 -0
  5. package/dist/esm/elements/LG.js +43 -0
  6. package/dist/esm/elements/MD.js +43 -0
  7. package/dist/esm/elements/Paragraph.js +34 -0
  8. package/dist/esm/elements/SM.js +43 -0
  9. package/dist/esm/elements/XL.js +42 -0
  10. package/dist/esm/elements/XXL.js +42 -0
  11. package/dist/esm/elements/XXXL.js +42 -0
  12. package/dist/esm/elements/lists/OrderedList.js +53 -0
  13. package/dist/esm/elements/lists/OrderedListItem.js +34 -0
  14. package/dist/esm/elements/lists/UnorderedList.js +53 -0
  15. package/dist/esm/elements/lists/UnorderedListItem.js +34 -0
  16. package/dist/esm/elements/span/Icon.js +25 -0
  17. package/dist/esm/elements/span/Span.js +49 -0
  18. package/dist/esm/elements/span/StartIcon.js +27 -0
  19. package/dist/esm/index.js +20 -0
  20. package/dist/esm/styled/StyledBlockquote.js +26 -0
  21. package/dist/esm/styled/StyledCode.js +66 -0
  22. package/dist/esm/styled/StyledCodeBlock.js +36 -0
  23. package/dist/esm/styled/StyledCodeBlockContainer.js +24 -0
  24. package/dist/esm/styled/StyledCodeBlockLine.js +100 -0
  25. package/dist/esm/styled/StyledCodeBlockToken.js +183 -0
  26. package/dist/esm/styled/StyledEllipsis.js +22 -0
  27. package/dist/esm/styled/StyledFont.js +76 -0
  28. package/dist/esm/styled/StyledIcon.js +27 -0
  29. package/dist/esm/styled/StyledList.js +37 -0
  30. package/dist/esm/styled/StyledListItem.js +48 -0
  31. package/dist/esm/styled/StyledParagraph.js +23 -0
  32. package/dist/esm/types/index.js +14 -0
  33. package/dist/esm/utils/useOrderedListContext.js +18 -0
  34. package/dist/esm/utils/useUnorderedListContext.js +18 -0
  35. package/dist/index.cjs.js +377 -162
  36. package/dist/typings/elements/span/Icon.d.ts +3 -3
  37. package/dist/typings/elements/span/StartIcon.d.ts +3 -3
  38. package/dist/typings/styled/StyledCode.d.ts +3 -2
  39. package/dist/typings/styled/StyledCodeBlock.d.ts +1 -4
  40. package/dist/typings/styled/StyledCodeBlockLine.d.ts +0 -5
  41. package/dist/typings/styled/StyledCodeBlockToken.d.ts +1 -4
  42. package/dist/typings/styled/StyledIcon.d.ts +3 -3
  43. package/dist/typings/types/index.d.ts +1 -1
  44. package/package.json +10 -9
  45. package/dist/index.esm.js +0 -769
@@ -0,0 +1,34 @@
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 { SIZE } from '../types/index.js';
10
+ import { StyledBlockquote } from '../styled/StyledBlockquote.js';
11
+ import '../styled/StyledCode.js';
12
+ import '../styled/StyledCodeBlock.js';
13
+ import '../styled/StyledCodeBlockContainer.js';
14
+ import '../styled/StyledCodeBlockLine.js';
15
+ import '../styled/StyledCodeBlockToken.js';
16
+ import '../styled/StyledEllipsis.js';
17
+ import '../styled/StyledFont.js';
18
+ import '../styled/StyledIcon.js';
19
+ import '../styled/StyledList.js';
20
+ import '../styled/StyledListItem.js';
21
+ import '../styled/StyledParagraph.js';
22
+
23
+ const Blockquote = forwardRef((props, ref) => React.createElement(StyledBlockquote, Object.assign({
24
+ ref: ref
25
+ }, props)));
26
+ Blockquote.displayName = 'Blockquote';
27
+ Blockquote.propTypes = {
28
+ size: PropTypes.oneOf(SIZE)
29
+ };
30
+ Blockquote.defaultProps = {
31
+ size: 'medium'
32
+ };
33
+
34
+ export { Blockquote };
@@ -0,0 +1,43 @@
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 { HUE, INHERIT_SIZE } from '../types/index.js';
10
+ import '../styled/StyledBlockquote.js';
11
+ import { StyledCode } from '../styled/StyledCode.js';
12
+ import '../styled/StyledCodeBlock.js';
13
+ import '../styled/StyledCodeBlockContainer.js';
14
+ import '../styled/StyledCodeBlockLine.js';
15
+ import '../styled/StyledCodeBlockToken.js';
16
+ import '../styled/StyledEllipsis.js';
17
+ import '../styled/StyledFont.js';
18
+ import '../styled/StyledIcon.js';
19
+ import '../styled/StyledList.js';
20
+ import '../styled/StyledListItem.js';
21
+ import '../styled/StyledParagraph.js';
22
+
23
+ const Code = forwardRef((_ref, ref) => {
24
+ let {
25
+ hue,
26
+ ...other
27
+ } = _ref;
28
+ return React.createElement(StyledCode, Object.assign({
29
+ ref: ref,
30
+ hue: hue
31
+ }, other));
32
+ });
33
+ Code.displayName = 'Code';
34
+ Code.propTypes = {
35
+ hue: PropTypes.oneOf(HUE),
36
+ size: PropTypes.oneOf(INHERIT_SIZE)
37
+ };
38
+ Code.defaultProps = {
39
+ hue: 'grey',
40
+ size: 'inherit'
41
+ };
42
+
43
+ export { Code };
@@ -0,0 +1,124 @@
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, { useRef, useMemo, useState, useCallback, useEffect } from 'react';
8
+ import { Prism, Highlight } from 'prism-react-renderer';
9
+ import { useScrollRegion } from '@zendeskgarden/container-scrollregion';
10
+ import { useWindow, ThemeProvider } from '@zendeskgarden/react-theming';
11
+ import { LANGUAGES } from '../types/index.js';
12
+ import '../styled/StyledBlockquote.js';
13
+ import '../styled/StyledCode.js';
14
+ import { StyledCodeBlock } from '../styled/StyledCodeBlock.js';
15
+ import { StyledCodeBlockContainer } from '../styled/StyledCodeBlockContainer.js';
16
+ import { StyledCodeBlockLine } from '../styled/StyledCodeBlockLine.js';
17
+ import { StyledCodeBlockToken } from '../styled/StyledCodeBlockToken.js';
18
+ import '../styled/StyledEllipsis.js';
19
+ import '../styled/StyledFont.js';
20
+ import '../styled/StyledIcon.js';
21
+ import '../styled/StyledList.js';
22
+ import '../styled/StyledListItem.js';
23
+ import '../styled/StyledParagraph.js';
24
+
25
+ const CodeBlock = React.forwardRef((_ref, ref) => {
26
+ let {
27
+ children,
28
+ containerProps,
29
+ highlightLines,
30
+ isLight,
31
+ isNumbered,
32
+ language = 'tsx',
33
+ size = 'medium',
34
+ ...other
35
+ } = _ref;
36
+ const containerRef = useRef(null);
37
+ const code = Array.isArray(children) ? children[0] : children;
38
+ const dependency = useMemo(() => [size, children], [size, children]);
39
+ const containerTabIndex = useScrollRegion({
40
+ containerRef,
41
+ dependency
42
+ });
43
+ const [isPrismImported, setIsPrismImported] = useState(false);
44
+ const win = useWindow();
45
+ const importPrism = useCallback(async () => {
46
+ if (win && !isPrismImported) {
47
+ win.Prism = Prism;
48
+ try {
49
+ await import('prismjs/components/prism-bash');
50
+ await import('prismjs/components/prism-diff');
51
+ await import('prismjs/components/prism-json');
52
+ } catch (error) {
53
+ console.error(error);
54
+ } finally {
55
+ setIsPrismImported(true);
56
+ }
57
+ }
58
+ }, [win, isPrismImported]);
59
+ useEffect(() => {
60
+ importPrism();
61
+ }, [importPrism]);
62
+ const getDiff = line => {
63
+ let retVal;
64
+ if (language === 'diff') {
65
+ const token = line.find(value => !(value.empty || value.content === ''));
66
+ if (token) {
67
+ if (token.types.includes('deleted')) {
68
+ retVal = 'delete';
69
+ } else if (token.types.includes('inserted')) {
70
+ retVal = 'add';
71
+ } else if (token.types.includes('coord')) {
72
+ retVal = 'hunk';
73
+ } else if (token.types.includes('diff')) {
74
+ retVal = 'change';
75
+ }
76
+ }
77
+ }
78
+ return retVal;
79
+ };
80
+ return isPrismImported && React.createElement(StyledCodeBlockContainer, Object.assign({}, containerProps, {
81
+ ref: containerRef,
82
+ tabIndex: containerTabIndex
83
+ }), React.createElement(Highlight, {
84
+ code: code ? code.trim() : '',
85
+ language: LANGUAGES.includes(language) ? language : 'tsx'
86
+ }, _ref2 => {
87
+ let {
88
+ className,
89
+ tokens,
90
+ getLineProps,
91
+ getTokenProps
92
+ } = _ref2;
93
+ return React.createElement(ThemeProvider, {
94
+ theme: parentTheme => ({
95
+ ...parentTheme,
96
+ colors: {
97
+ ...parentTheme.colors,
98
+ base: isLight ? 'light' : 'dark'
99
+ }
100
+ })
101
+ }, React.createElement(StyledCodeBlock, Object.assign({
102
+ className: className,
103
+ ref: ref
104
+ }, other), tokens.map((line, index) => React.createElement(StyledCodeBlockLine, Object.assign({}, getLineProps({
105
+ line
106
+ }), {
107
+ key: index,
108
+ language: language,
109
+ isHighlighted: highlightLines && highlightLines.includes(index + 1),
110
+ isNumbered: isNumbered,
111
+ diff: getDiff(line),
112
+ size: size,
113
+ style: undefined
114
+ }), line.map((token, tokenKey) => React.createElement(StyledCodeBlockToken, Object.assign({}, getTokenProps({
115
+ token
116
+ }), {
117
+ key: tokenKey,
118
+ style: undefined
119
+ }), token.empty ? '\n' : token.content))))));
120
+ }));
121
+ });
122
+ CodeBlock.displayName = 'CodeBlock';
123
+
124
+ export { CodeBlock };
@@ -0,0 +1,50 @@
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 { StyledEllipsis } from '../styled/StyledEllipsis.js';
16
+ import '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const Ellipsis = forwardRef((_ref, ref) => {
23
+ let {
24
+ children,
25
+ title,
26
+ tag,
27
+ ...other
28
+ } = _ref;
29
+ let textContent = undefined;
30
+ if (title !== undefined) {
31
+ textContent = title;
32
+ } else if (typeof children === 'string') {
33
+ textContent = children;
34
+ }
35
+ return React.createElement(StyledEllipsis, Object.assign({
36
+ as: tag,
37
+ ref: ref,
38
+ title: textContent
39
+ }, other), children);
40
+ });
41
+ Ellipsis.displayName = 'Ellipsis';
42
+ Ellipsis.propTypes = {
43
+ title: PropTypes.string,
44
+ tag: PropTypes.any
45
+ };
46
+ Ellipsis.defaultProps = {
47
+ tag: 'div'
48
+ };
49
+
50
+ export { Ellipsis };
@@ -0,0 +1,43 @@
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 { StyledFont } from '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const LG = forwardRef((_ref, ref) => {
23
+ let {
24
+ tag,
25
+ ...other
26
+ } = _ref;
27
+ return React.createElement(StyledFont, Object.assign({
28
+ as: tag,
29
+ ref: ref,
30
+ size: "large"
31
+ }, other));
32
+ });
33
+ LG.displayName = 'LG';
34
+ LG.propTypes = {
35
+ tag: PropTypes.any,
36
+ isBold: PropTypes.bool,
37
+ isMonospace: PropTypes.bool
38
+ };
39
+ LG.defaultProps = {
40
+ tag: 'div'
41
+ };
42
+
43
+ export { LG };
@@ -0,0 +1,43 @@
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 { StyledFont } from '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const MD = forwardRef((_ref, ref) => {
23
+ let {
24
+ tag,
25
+ ...other
26
+ } = _ref;
27
+ return React.createElement(StyledFont, Object.assign({
28
+ as: tag,
29
+ ref: ref,
30
+ size: "medium"
31
+ }, other));
32
+ });
33
+ MD.displayName = 'MD';
34
+ MD.propTypes = {
35
+ tag: PropTypes.any,
36
+ isBold: PropTypes.bool,
37
+ isMonospace: PropTypes.bool
38
+ };
39
+ MD.defaultProps = {
40
+ tag: 'div'
41
+ };
42
+
43
+ export { MD };
@@ -0,0 +1,34 @@
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 { SIZE } from '../types/index.js';
10
+ import '../styled/StyledBlockquote.js';
11
+ import '../styled/StyledCode.js';
12
+ import '../styled/StyledCodeBlock.js';
13
+ import '../styled/StyledCodeBlockContainer.js';
14
+ import '../styled/StyledCodeBlockLine.js';
15
+ import '../styled/StyledCodeBlockToken.js';
16
+ import '../styled/StyledEllipsis.js';
17
+ import '../styled/StyledFont.js';
18
+ import '../styled/StyledIcon.js';
19
+ import '../styled/StyledList.js';
20
+ import '../styled/StyledListItem.js';
21
+ import { StyledParagraph } from '../styled/StyledParagraph.js';
22
+
23
+ const Paragraph = forwardRef((props, ref) => React.createElement(StyledParagraph, Object.assign({
24
+ ref: ref
25
+ }, props)));
26
+ Paragraph.displayName = 'Paragraph';
27
+ Paragraph.propTypes = {
28
+ size: PropTypes.oneOf(SIZE)
29
+ };
30
+ Paragraph.defaultProps = {
31
+ size: 'medium'
32
+ };
33
+
34
+ export { Paragraph };
@@ -0,0 +1,43 @@
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 { StyledFont } from '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const SM = forwardRef((_ref, ref) => {
23
+ let {
24
+ tag,
25
+ ...other
26
+ } = _ref;
27
+ return React.createElement(StyledFont, Object.assign({
28
+ as: tag,
29
+ ref: ref,
30
+ size: "small"
31
+ }, other));
32
+ });
33
+ SM.displayName = 'SM';
34
+ SM.propTypes = {
35
+ tag: PropTypes.any,
36
+ isBold: PropTypes.bool,
37
+ isMonospace: PropTypes.bool
38
+ };
39
+ SM.defaultProps = {
40
+ tag: 'div'
41
+ };
42
+
43
+ export { SM };
@@ -0,0 +1,42 @@
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 { StyledFont } from '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const XL = forwardRef((_ref, ref) => {
23
+ let {
24
+ tag,
25
+ ...other
26
+ } = _ref;
27
+ return React.createElement(StyledFont, Object.assign({
28
+ as: tag,
29
+ ref: ref,
30
+ size: "extralarge"
31
+ }, other));
32
+ });
33
+ XL.displayName = 'XL';
34
+ XL.propTypes = {
35
+ tag: PropTypes.any,
36
+ isBold: PropTypes.bool
37
+ };
38
+ XL.defaultProps = {
39
+ tag: 'div'
40
+ };
41
+
42
+ export { XL };
@@ -0,0 +1,42 @@
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 { StyledFont } from '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const XXL = forwardRef((_ref, ref) => {
23
+ let {
24
+ tag,
25
+ ...other
26
+ } = _ref;
27
+ return React.createElement(StyledFont, Object.assign({
28
+ as: tag,
29
+ ref: ref,
30
+ size: "2xlarge"
31
+ }, other));
32
+ });
33
+ XXL.displayName = 'XXL';
34
+ XXL.propTypes = {
35
+ tag: PropTypes.any,
36
+ isBold: PropTypes.bool
37
+ };
38
+ XXL.defaultProps = {
39
+ tag: 'div'
40
+ };
41
+
42
+ export { XXL };
@@ -0,0 +1,42 @@
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 { StyledFont } from '../styled/StyledFont.js';
17
+ import '../styled/StyledIcon.js';
18
+ import '../styled/StyledList.js';
19
+ import '../styled/StyledListItem.js';
20
+ import '../styled/StyledParagraph.js';
21
+
22
+ const XXXL = forwardRef((_ref, ref) => {
23
+ let {
24
+ tag,
25
+ ...other
26
+ } = _ref;
27
+ return React.createElement(StyledFont, Object.assign({
28
+ as: tag,
29
+ ref: ref,
30
+ size: "3xlarge"
31
+ }, other));
32
+ });
33
+ XXXL.displayName = 'XXXL';
34
+ XXXL.propTypes = {
35
+ tag: PropTypes.any,
36
+ isBold: PropTypes.bool
37
+ };
38
+ XXXL.defaultProps = {
39
+ tag: 'div'
40
+ };
41
+
42
+ export { XXXL };
@@ -0,0 +1,53 @@
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, { useMemo } from 'react';
8
+ import PropTypes from 'prop-types';
9
+ import { Item } from './OrderedListItem.js';
10
+ import { SIZE, TYPE_ORDERED_LIST } from '../../types/index.js';
11
+ import { OrderedListContext } from '../../utils/useOrderedListContext.js';
12
+ import '../../styled/StyledBlockquote.js';
13
+ import '../../styled/StyledCode.js';
14
+ import '../../styled/StyledCodeBlock.js';
15
+ import '../../styled/StyledCodeBlockContainer.js';
16
+ import '../../styled/StyledCodeBlockLine.js';
17
+ import '../../styled/StyledCodeBlockToken.js';
18
+ import '../../styled/StyledEllipsis.js';
19
+ import '../../styled/StyledFont.js';
20
+ import '../../styled/StyledIcon.js';
21
+ import { StyledOrderedList } from '../../styled/StyledList.js';
22
+ import '../../styled/StyledListItem.js';
23
+ import '../../styled/StyledParagraph.js';
24
+
25
+ const OrderedListComponent = React.forwardRef((_ref, ref) => {
26
+ let {
27
+ size,
28
+ type,
29
+ ...other
30
+ } = _ref;
31
+ const value = useMemo(() => ({
32
+ size: size
33
+ }), [size]);
34
+ return React.createElement(OrderedListContext.Provider, {
35
+ value: value
36
+ }, React.createElement(StyledOrderedList, Object.assign({
37
+ ref: ref,
38
+ listType: type
39
+ }, other)));
40
+ });
41
+ OrderedListComponent.displayName = 'OrderedList';
42
+ OrderedListComponent.propTypes = {
43
+ size: PropTypes.oneOf(SIZE),
44
+ type: PropTypes.oneOf(TYPE_ORDERED_LIST)
45
+ };
46
+ OrderedListComponent.defaultProps = {
47
+ size: 'medium',
48
+ type: 'decimal'
49
+ };
50
+ const OrderedList = OrderedListComponent;
51
+ OrderedList.Item = Item;
52
+
53
+ export { OrderedList };
@@ -0,0 +1,34 @@
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 useOrderedListContext from '../../utils/useOrderedListContext.js';
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 '../../styled/StyledList.js';
19
+ import { StyledOrderedListItem } from '../../styled/StyledListItem.js';
20
+ import '../../styled/StyledParagraph.js';
21
+
22
+ const OrderedListItem = forwardRef((props, ref) => {
23
+ const {
24
+ size
25
+ } = useOrderedListContext();
26
+ return React.createElement(StyledOrderedListItem, Object.assign({
27
+ ref: ref,
28
+ space: size
29
+ }, props));
30
+ });
31
+ OrderedListItem.displayName = 'OrderedList.Item';
32
+ const Item = OrderedListItem;
33
+
34
+ export { Item };