@zendeskgarden/react-typography 9.0.0-next.2 → 9.0.0-next.20
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 +34 -0
- package/dist/esm/elements/Code.js +43 -0
- package/dist/esm/elements/CodeBlock.js +124 -0
- package/dist/esm/elements/Ellipsis.js +50 -0
- package/dist/esm/elements/LG.js +43 -0
- package/dist/esm/elements/MD.js +43 -0
- package/dist/esm/elements/Paragraph.js +34 -0
- package/dist/esm/elements/SM.js +43 -0
- package/dist/esm/elements/XL.js +42 -0
- package/dist/esm/elements/XXL.js +42 -0
- package/dist/esm/elements/XXXL.js +42 -0
- package/dist/esm/elements/lists/OrderedList.js +53 -0
- package/dist/esm/elements/lists/OrderedListItem.js +34 -0
- package/dist/esm/elements/lists/UnorderedList.js +53 -0
- package/dist/esm/elements/lists/UnorderedListItem.js +34 -0
- package/dist/esm/elements/span/Icon.js +25 -0
- package/dist/esm/elements/span/Span.js +49 -0
- package/dist/esm/elements/span/StartIcon.js +27 -0
- package/dist/esm/index.js +20 -0
- package/dist/esm/styled/StyledBlockquote.js +26 -0
- package/dist/esm/styled/StyledCode.js +66 -0
- package/dist/esm/styled/StyledCodeBlock.js +36 -0
- package/dist/esm/styled/StyledCodeBlockContainer.js +24 -0
- package/dist/esm/styled/StyledCodeBlockLine.js +100 -0
- package/dist/esm/styled/StyledCodeBlockToken.js +183 -0
- package/dist/esm/styled/StyledEllipsis.js +22 -0
- package/dist/esm/styled/StyledFont.js +76 -0
- package/dist/esm/styled/StyledIcon.js +27 -0
- package/dist/esm/styled/StyledList.js +37 -0
- package/dist/esm/styled/StyledListItem.js +48 -0
- package/dist/esm/styled/StyledParagraph.js +23 -0
- package/dist/esm/types/index.js +14 -0
- package/dist/esm/utils/useOrderedListContext.js +18 -0
- package/dist/esm/utils/useUnorderedListContext.js +18 -0
- package/dist/index.cjs.js +377 -162
- package/dist/typings/elements/span/Icon.d.ts +3 -3
- package/dist/typings/elements/span/StartIcon.d.ts +3 -3
- package/dist/typings/styled/StyledCode.d.ts +3 -2
- package/dist/typings/styled/StyledCodeBlock.d.ts +1 -4
- package/dist/typings/styled/StyledCodeBlockLine.d.ts +0 -5
- package/dist/typings/styled/StyledCodeBlockToken.d.ts +1 -4
- package/dist/typings/styled/StyledIcon.d.ts +3 -3
- package/dist/typings/types/index.d.ts +1 -1
- package/package.json +10 -9
- package/dist/index.esm.js +0 -769
package/dist/index.cjs.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
*/
|
|
8
7
|
'use strict';
|
|
9
8
|
|
|
10
9
|
var React = require('react');
|
|
@@ -12,7 +11,7 @@ var PropTypes = require('prop-types');
|
|
|
12
11
|
var styled = require('styled-components');
|
|
13
12
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
14
13
|
var polished = require('polished');
|
|
15
|
-
var
|
|
14
|
+
var prismReactRenderer = require('prism-react-renderer');
|
|
16
15
|
var containerScrollregion = require('@zendeskgarden/container-scrollregion');
|
|
17
16
|
|
|
18
17
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -20,29 +19,13 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
20
19
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
21
20
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
22
21
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
23
|
-
var Highlight__default = /*#__PURE__*/_interopDefault(Highlight);
|
|
24
|
-
|
|
25
|
-
function _extends() {
|
|
26
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
27
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
28
|
-
var source = arguments[i];
|
|
29
|
-
for (var key in source) {
|
|
30
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
31
|
-
target[key] = source[key];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return target;
|
|
36
|
-
};
|
|
37
|
-
return _extends.apply(this, arguments);
|
|
38
|
-
}
|
|
39
22
|
|
|
40
23
|
const HUE = ['grey', 'red', 'green', 'yellow'];
|
|
41
24
|
const SIZE = ['small', 'medium', 'large'];
|
|
42
25
|
const INHERIT_SIZE = ['inherit', ...SIZE];
|
|
43
26
|
const TYPE_ORDERED_LIST = ['decimal', 'decimal-leading-zero', 'lower-alpha', 'lower-roman', 'upper-alpha', 'upper-roman'];
|
|
44
27
|
const TYPE_UNORDERED_LIST = ['circle', 'disc', 'square'];
|
|
45
|
-
const LANGUAGES = ['
|
|
28
|
+
const LANGUAGES = ['bash', 'css', 'diff', 'graphql', 'javascript', 'json', 'jsx', 'markdown', 'markup', 'python', 'typescript', 'tsx', 'yaml'];
|
|
46
29
|
|
|
47
30
|
const COMPONENT_ID$9 = 'typography.font';
|
|
48
31
|
[...SIZE, 'extralarge', '2xlarge', '3xlarge'];
|
|
@@ -54,42 +37,51 @@ const THEME_SIZES = {
|
|
|
54
37
|
'2xlarge': 'xxl',
|
|
55
38
|
'3xlarge': 'xxxl'
|
|
56
39
|
};
|
|
57
|
-
const fontStyles =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
40
|
+
const fontStyles = _ref => {
|
|
41
|
+
let {
|
|
42
|
+
hue,
|
|
43
|
+
isBold,
|
|
44
|
+
isMonospace,
|
|
45
|
+
size,
|
|
46
|
+
theme
|
|
47
|
+
} = _ref;
|
|
48
|
+
const monospace = isMonospace && ['inherit', 'small', 'medium', 'large'].indexOf(size) !== -1;
|
|
49
|
+
const fontFamily = monospace && theme.fonts.mono;
|
|
50
|
+
const direction = theme.rtl ? 'rtl' : 'ltr';
|
|
61
51
|
let fontSize;
|
|
62
52
|
let fontWeight;
|
|
63
53
|
let lineHeight;
|
|
64
54
|
let color;
|
|
65
55
|
if (monospace) {
|
|
66
|
-
if (
|
|
56
|
+
if (size === 'inherit') {
|
|
67
57
|
fontSize = 'calc(1em - 1px)';
|
|
68
58
|
lineHeight = 'normal';
|
|
69
59
|
} else {
|
|
70
|
-
const themeSize = THEME_SIZES[
|
|
71
|
-
fontSize = polished.math(`${
|
|
72
|
-
lineHeight = polished.math(`${
|
|
60
|
+
const themeSize = THEME_SIZES[size];
|
|
61
|
+
fontSize = polished.math(`${theme.fontSizes[themeSize]} - 1px`);
|
|
62
|
+
lineHeight = polished.math(`${theme.lineHeights[themeSize]} - 1px`);
|
|
73
63
|
}
|
|
74
|
-
} else if (
|
|
75
|
-
const themeSize = THEME_SIZES[
|
|
76
|
-
fontSize =
|
|
77
|
-
lineHeight =
|
|
64
|
+
} else if (size !== 'inherit') {
|
|
65
|
+
const themeSize = THEME_SIZES[size];
|
|
66
|
+
fontSize = theme.fontSizes[themeSize];
|
|
67
|
+
lineHeight = theme.lineHeights[themeSize];
|
|
78
68
|
}
|
|
79
|
-
if (
|
|
80
|
-
fontWeight =
|
|
81
|
-
} else if (
|
|
82
|
-
fontWeight =
|
|
69
|
+
if (isBold === true) {
|
|
70
|
+
fontWeight = theme.fontWeights.semibold;
|
|
71
|
+
} else if (isBold === false || size !== 'inherit') {
|
|
72
|
+
fontWeight = theme.fontWeights.regular;
|
|
83
73
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
|
|
74
|
+
if (hue) {
|
|
75
|
+
color = reactTheming.getColor({
|
|
76
|
+
hue,
|
|
77
|
+
theme
|
|
78
|
+
});
|
|
87
79
|
}
|
|
88
80
|
return styled.css(["line-height:", ";color:", ";font-family:", ";font-size:", ";font-weight:", ";direction:", ";"], lineHeight, color, fontFamily, fontSize, fontWeight, direction);
|
|
89
81
|
};
|
|
90
82
|
const StyledFont = styled__default.default.div.attrs({
|
|
91
83
|
'data-garden-id': COMPONENT_ID$9,
|
|
92
|
-
'data-garden-version': '9.0.0-next.
|
|
84
|
+
'data-garden-version': '9.0.0-next.20'
|
|
93
85
|
}).withConfig({
|
|
94
86
|
displayName: "StyledFont",
|
|
95
87
|
componentId: "sc-1iildbo-0"
|
|
@@ -102,51 +94,95 @@ StyledFont.defaultProps = {
|
|
|
102
94
|
const COMPONENT_ID$8 = 'typography.blockquote';
|
|
103
95
|
const StyledBlockquote = styled__default.default.blockquote.attrs({
|
|
104
96
|
'data-garden-id': COMPONENT_ID$8,
|
|
105
|
-
'data-garden-version': '9.0.0-next.
|
|
97
|
+
'data-garden-version': '9.0.0-next.20'
|
|
106
98
|
}).withConfig({
|
|
107
99
|
displayName: "StyledBlockquote",
|
|
108
100
|
componentId: "sc-1tt3ye0-0"
|
|
109
|
-
})(["margin:0;border-", ":", " solid;border-color:", ";padding:0;padding-", ":", "px;direction:", ";& + &,p + &{margin-top:", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.shadowWidths.sm, props => reactTheming.getColor(
|
|
101
|
+
})(["margin:0;border-", ":", " solid;border-color:", ";padding:0;padding-", ":", "px;direction:", ";& + &,p + &{margin-top:", ";}", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.shadowWidths.sm, props => reactTheming.getColor({
|
|
102
|
+
theme: props.theme,
|
|
103
|
+
variable: 'border.default'
|
|
104
|
+
}), 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]], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
110
105
|
StyledBlockquote.defaultProps = {
|
|
111
106
|
theme: reactTheming.DEFAULT_THEME
|
|
112
107
|
};
|
|
113
108
|
|
|
114
109
|
const COMPONENT_ID$7 = 'typography.code';
|
|
115
|
-
const colorStyles$3 =
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
const colorStyles$3 = _ref => {
|
|
111
|
+
let {
|
|
112
|
+
hue,
|
|
113
|
+
theme
|
|
114
|
+
} = _ref;
|
|
115
|
+
const bgColorArgs = {
|
|
116
|
+
theme,
|
|
117
|
+
light: {
|
|
118
|
+
offset: 100
|
|
119
|
+
},
|
|
120
|
+
dark: {
|
|
121
|
+
offset: -100
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const fgColorArgs = {
|
|
125
|
+
theme
|
|
126
|
+
};
|
|
127
|
+
switch (hue) {
|
|
128
|
+
case 'green':
|
|
129
|
+
bgColorArgs.variable = 'background.success';
|
|
130
|
+
fgColorArgs.variable = 'foreground.successEmphasis';
|
|
131
|
+
break;
|
|
132
|
+
case 'red':
|
|
133
|
+
bgColorArgs.variable = 'background.danger';
|
|
134
|
+
fgColorArgs.variable = 'foreground.dangerEmphasis';
|
|
135
|
+
break;
|
|
136
|
+
case 'yellow':
|
|
137
|
+
bgColorArgs.variable = 'background.warning';
|
|
138
|
+
fgColorArgs.variable = 'foreground.warningEmphasis';
|
|
139
|
+
break;
|
|
140
|
+
default:
|
|
141
|
+
fgColorArgs.variable = 'foreground.default';
|
|
142
|
+
bgColorArgs.variable = 'background.subtle';
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
const backgroundColor = reactTheming.getColor(bgColorArgs);
|
|
146
|
+
const foregroundColor = reactTheming.getColor(fgColorArgs);
|
|
120
147
|
return styled.css(["background-color:", ";color:", ";a &{color:inherit;}"], backgroundColor, foregroundColor);
|
|
121
148
|
};
|
|
122
149
|
const StyledCode = styled__default.default(StyledFont).attrs({
|
|
123
150
|
'data-garden-id': COMPONENT_ID$7,
|
|
124
|
-
'data-garden-version': '9.0.0-next.
|
|
125
|
-
as: 'code'
|
|
151
|
+
'data-garden-version': '9.0.0-next.20',
|
|
152
|
+
as: 'code',
|
|
153
|
+
isMonospace: true
|
|
126
154
|
}).withConfig({
|
|
127
155
|
displayName: "StyledCode",
|
|
128
156
|
componentId: "sc-l8yvmf-0"
|
|
129
157
|
})(["border-radius:", ";padding:1.5px;", ";", ";"], props => props.theme.borderRadii.sm, props => colorStyles$3(props), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
130
158
|
StyledCode.defaultProps = {
|
|
131
159
|
theme: reactTheming.DEFAULT_THEME,
|
|
132
|
-
|
|
133
|
-
hue: 'neutralHue',
|
|
160
|
+
hue: 'grey',
|
|
134
161
|
size: 'inherit'
|
|
135
162
|
};
|
|
136
163
|
|
|
137
164
|
const COMPONENT_ID$6 = 'typography.codeblock';
|
|
138
|
-
const colorStyles$2 =
|
|
139
|
-
|
|
140
|
-
|
|
165
|
+
const colorStyles$2 = _ref => {
|
|
166
|
+
let {
|
|
167
|
+
theme
|
|
168
|
+
} = _ref;
|
|
169
|
+
const backgroundColor = reactTheming.getColor({
|
|
170
|
+
theme,
|
|
171
|
+
variable: theme.colors.base === 'light' ? 'background.subtle' : 'background.default'
|
|
172
|
+
});
|
|
173
|
+
const foregroundColor = reactTheming.getColor({
|
|
174
|
+
theme,
|
|
175
|
+
variable: 'foreground.default'
|
|
176
|
+
});
|
|
141
177
|
return styled.css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
142
178
|
};
|
|
143
179
|
const StyledCodeBlock = styled__default.default.pre.attrs({
|
|
144
180
|
'data-garden-id': COMPONENT_ID$6,
|
|
145
|
-
'data-garden-version': '9.0.0-next.
|
|
181
|
+
'data-garden-version': '9.0.0-next.20'
|
|
146
182
|
}).withConfig({
|
|
147
183
|
displayName: "StyledCodeBlock",
|
|
148
184
|
componentId: "sc-5wky57-0"
|
|
149
|
-
})(["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,
|
|
185
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
150
186
|
StyledCodeBlock.defaultProps = {
|
|
151
187
|
theme: reactTheming.DEFAULT_THEME
|
|
152
188
|
};
|
|
@@ -154,7 +190,7 @@ StyledCodeBlock.defaultProps = {
|
|
|
154
190
|
const COMPONENT_ID$5 = 'typography.codeblock_container';
|
|
155
191
|
const StyledCodeBlockContainer = styled__default.default.div.attrs({
|
|
156
192
|
'data-garden-id': COMPONENT_ID$5,
|
|
157
|
-
'data-garden-version': '9.0.0-next.
|
|
193
|
+
'data-garden-version': '9.0.0-next.20'
|
|
158
194
|
}).withConfig({
|
|
159
195
|
displayName: "StyledCodeBlockContainer",
|
|
160
196
|
componentId: "sc-14zgbfw-0"
|
|
@@ -166,42 +202,68 @@ StyledCodeBlockContainer.defaultProps = {
|
|
|
166
202
|
};
|
|
167
203
|
|
|
168
204
|
const COMPONENT_ID$4 = 'typography.codeblock_code';
|
|
169
|
-
const colorStyles$1 =
|
|
205
|
+
const colorStyles$1 = _ref => {
|
|
206
|
+
let {
|
|
207
|
+
theme,
|
|
208
|
+
diff,
|
|
209
|
+
isHighlighted
|
|
210
|
+
} = _ref;
|
|
170
211
|
let backgroundColor;
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
backgroundColor = reactTheming.getColor(
|
|
212
|
+
if (diff) {
|
|
213
|
+
const hues = {
|
|
214
|
+
hunk: 'royal',
|
|
215
|
+
add: 'lime',
|
|
216
|
+
delete: 'crimson',
|
|
217
|
+
change: 'lemon'
|
|
218
|
+
};
|
|
219
|
+
backgroundColor = reactTheming.getColor({
|
|
220
|
+
theme,
|
|
221
|
+
hue: hues[diff],
|
|
222
|
+
dark: {
|
|
223
|
+
shade: 600
|
|
224
|
+
},
|
|
225
|
+
light: {
|
|
226
|
+
shade: 400
|
|
227
|
+
},
|
|
228
|
+
transparency: theme.opacity[300]
|
|
229
|
+
});
|
|
230
|
+
} else if (isHighlighted) {
|
|
231
|
+
backgroundColor = reactTheming.getColor({
|
|
232
|
+
theme,
|
|
233
|
+
dark: {
|
|
234
|
+
hue: 'white'
|
|
235
|
+
},
|
|
236
|
+
light: {
|
|
237
|
+
hue: 'neutralHue',
|
|
238
|
+
shade: 700
|
|
239
|
+
},
|
|
240
|
+
transparency: theme.opacity[100]
|
|
241
|
+
});
|
|
191
242
|
}
|
|
192
243
|
return styled.css(["background-color:", ";"], backgroundColor);
|
|
193
244
|
};
|
|
194
|
-
const lineNumberStyles =
|
|
195
|
-
|
|
245
|
+
const lineNumberStyles = _ref2 => {
|
|
246
|
+
let {
|
|
247
|
+
theme,
|
|
248
|
+
language,
|
|
249
|
+
size
|
|
250
|
+
} = _ref2;
|
|
251
|
+
const color = reactTheming.getColor({
|
|
252
|
+
theme,
|
|
253
|
+
variable: 'foreground.subtle',
|
|
254
|
+
light: {
|
|
255
|
+
offset: -100
|
|
256
|
+
}
|
|
257
|
+
});
|
|
196
258
|
let padding;
|
|
197
|
-
if (
|
|
259
|
+
if (language && language === 'diff') {
|
|
198
260
|
padding = 0;
|
|
199
|
-
} else if (
|
|
200
|
-
padding =
|
|
201
|
-
} else if (
|
|
202
|
-
padding =
|
|
261
|
+
} else if (size === 'small') {
|
|
262
|
+
padding = theme.space.base * 4;
|
|
263
|
+
} else if (size === 'large') {
|
|
264
|
+
padding = theme.space.base * 7;
|
|
203
265
|
} else {
|
|
204
|
-
padding =
|
|
266
|
+
padding = theme.space.base * 6;
|
|
205
267
|
}
|
|
206
268
|
return `
|
|
207
269
|
&::before {
|
|
@@ -217,46 +279,185 @@ const lineNumberStyles = props => {
|
|
|
217
279
|
};
|
|
218
280
|
const StyledCodeBlockLine = styled__default.default(StyledFont).attrs({
|
|
219
281
|
'data-garden-id': COMPONENT_ID$4,
|
|
220
|
-
'data-garden-version': '9.0.0-next.
|
|
282
|
+
'data-garden-version': '9.0.0-next.20',
|
|
221
283
|
as: 'code',
|
|
222
284
|
isMonospace: true
|
|
223
285
|
}).withConfig({
|
|
224
286
|
displayName: "StyledCodeBlockLine",
|
|
225
287
|
componentId: "sc-1goay17-0"
|
|
226
|
-
})(["display:table-row;height:", ";direction:ltr;", ";", ";&::after{display:inline-block;width:", "px;content:'';}", ";"], props => props.theme.lineHeights[THEME_SIZES[props.size]],
|
|
288
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
227
289
|
StyledCodeBlockLine.defaultProps = {
|
|
228
290
|
theme: reactTheming.DEFAULT_THEME
|
|
229
291
|
};
|
|
230
292
|
|
|
231
293
|
const COMPONENT_ID$3 = 'typography.codeblock_token';
|
|
232
|
-
const colorStyles =
|
|
233
|
-
|
|
294
|
+
const colorStyles = _ref => {
|
|
295
|
+
let {
|
|
296
|
+
theme
|
|
297
|
+
} = _ref;
|
|
234
298
|
const colors = {
|
|
235
|
-
boolean:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
299
|
+
boolean: reactTheming.getColor({
|
|
300
|
+
theme,
|
|
301
|
+
dark: {
|
|
302
|
+
hue: 'azure',
|
|
303
|
+
shade: 600
|
|
304
|
+
},
|
|
305
|
+
light: {
|
|
306
|
+
hue: 'royal',
|
|
307
|
+
shade: 700
|
|
308
|
+
}
|
|
309
|
+
}),
|
|
310
|
+
builtin: reactTheming.getColor({
|
|
311
|
+
theme,
|
|
312
|
+
hue: 'teal',
|
|
313
|
+
dark: {
|
|
314
|
+
shade: 600
|
|
315
|
+
},
|
|
316
|
+
light: {
|
|
317
|
+
shade: 700
|
|
318
|
+
}
|
|
319
|
+
}),
|
|
320
|
+
comment: reactTheming.getColor({
|
|
321
|
+
theme,
|
|
322
|
+
dark: {
|
|
323
|
+
hue: 'mint',
|
|
324
|
+
shade: 600
|
|
325
|
+
},
|
|
326
|
+
light: {
|
|
327
|
+
hue: 'lime',
|
|
328
|
+
shade: 700
|
|
329
|
+
}
|
|
330
|
+
}),
|
|
331
|
+
constant: reactTheming.getColor({
|
|
332
|
+
theme,
|
|
333
|
+
dark: {
|
|
334
|
+
hue: 'blue',
|
|
335
|
+
shade: 600
|
|
336
|
+
},
|
|
337
|
+
light: {
|
|
338
|
+
hue: 'azure',
|
|
339
|
+
shade: 700
|
|
340
|
+
}
|
|
341
|
+
}),
|
|
342
|
+
coord: reactTheming.getColor({
|
|
343
|
+
theme,
|
|
344
|
+
hue: 'blue',
|
|
345
|
+
dark: {
|
|
346
|
+
shade: 200
|
|
347
|
+
},
|
|
348
|
+
light: {
|
|
349
|
+
shade: 800
|
|
350
|
+
}
|
|
351
|
+
}),
|
|
352
|
+
deleted: reactTheming.getColor({
|
|
353
|
+
theme,
|
|
354
|
+
hue: 'red',
|
|
355
|
+
dark: {
|
|
356
|
+
shade: 200
|
|
357
|
+
},
|
|
358
|
+
light: {
|
|
359
|
+
shade: 800
|
|
360
|
+
}
|
|
361
|
+
}),
|
|
362
|
+
diff: reactTheming.getColor({
|
|
363
|
+
theme,
|
|
364
|
+
hue: 'yellow',
|
|
365
|
+
dark: {
|
|
366
|
+
shade: 200
|
|
367
|
+
},
|
|
368
|
+
light: {
|
|
369
|
+
shade: 800
|
|
370
|
+
}
|
|
371
|
+
}),
|
|
372
|
+
function: reactTheming.getColor({
|
|
373
|
+
theme,
|
|
374
|
+
dark: {
|
|
375
|
+
hue: 'yellow',
|
|
376
|
+
shade: 300
|
|
377
|
+
},
|
|
378
|
+
light: {
|
|
379
|
+
hue: 'orange',
|
|
380
|
+
shade: 700
|
|
381
|
+
}
|
|
382
|
+
}),
|
|
383
|
+
inserted: reactTheming.getColor({
|
|
384
|
+
theme,
|
|
385
|
+
hue: 'green',
|
|
386
|
+
dark: {
|
|
387
|
+
shade: 200
|
|
388
|
+
},
|
|
389
|
+
light: {
|
|
390
|
+
shade: 800
|
|
391
|
+
}
|
|
392
|
+
}),
|
|
393
|
+
keyword: reactTheming.getColor({
|
|
394
|
+
theme,
|
|
395
|
+
hue: 'fuschia',
|
|
396
|
+
dark: {
|
|
397
|
+
shade: 600
|
|
398
|
+
},
|
|
399
|
+
light: {
|
|
400
|
+
shade: 700
|
|
401
|
+
}
|
|
402
|
+
}),
|
|
403
|
+
name: reactTheming.getColor({
|
|
404
|
+
theme,
|
|
405
|
+
dark: {
|
|
406
|
+
hue: 'blue',
|
|
407
|
+
shade: 400
|
|
408
|
+
},
|
|
409
|
+
light: {
|
|
410
|
+
hue: 'crimson',
|
|
411
|
+
shade: 700
|
|
412
|
+
}
|
|
413
|
+
}),
|
|
414
|
+
number: reactTheming.getColor({
|
|
415
|
+
theme,
|
|
416
|
+
hue: 'green',
|
|
417
|
+
dark: {
|
|
418
|
+
shade: 400
|
|
419
|
+
},
|
|
420
|
+
light: {
|
|
421
|
+
shade: 700
|
|
422
|
+
}
|
|
423
|
+
}),
|
|
424
|
+
punctuation: reactTheming.getColor({
|
|
425
|
+
theme,
|
|
426
|
+
dark: {
|
|
427
|
+
hue: 'grey',
|
|
428
|
+
shade: 700
|
|
429
|
+
},
|
|
430
|
+
light: {
|
|
431
|
+
hue: 'red',
|
|
432
|
+
shade: 900
|
|
433
|
+
}
|
|
434
|
+
}),
|
|
435
|
+
regex: reactTheming.getColor({
|
|
436
|
+
theme,
|
|
437
|
+
hue: 'red',
|
|
438
|
+
shade: 600
|
|
439
|
+
}),
|
|
440
|
+
value: reactTheming.getColor({
|
|
441
|
+
theme,
|
|
442
|
+
dark: {
|
|
443
|
+
hue: 'crimson',
|
|
444
|
+
shade: 600
|
|
445
|
+
},
|
|
446
|
+
light: {
|
|
447
|
+
hue: 'red',
|
|
448
|
+
shade: 800
|
|
449
|
+
}
|
|
450
|
+
})
|
|
250
451
|
};
|
|
251
452
|
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);
|
|
252
453
|
};
|
|
253
454
|
const StyledCodeBlockToken = styled__default.default.span.attrs({
|
|
254
455
|
'data-garden-id': COMPONENT_ID$3,
|
|
255
|
-
'data-garden-version': '9.0.0-next.
|
|
456
|
+
'data-garden-version': '9.0.0-next.20'
|
|
256
457
|
}).withConfig({
|
|
257
458
|
displayName: "StyledCodeBlockToken",
|
|
258
459
|
componentId: "sc-1hkshdq-0"
|
|
259
|
-
})(["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,
|
|
460
|
+
})(["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, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
260
461
|
StyledCodeBlockToken.defaultProps = {
|
|
261
462
|
theme: reactTheming.DEFAULT_THEME
|
|
262
463
|
};
|
|
@@ -264,7 +465,7 @@ StyledCodeBlockToken.defaultProps = {
|
|
|
264
465
|
const COMPONENT_ID$2 = 'typography.ellipsis';
|
|
265
466
|
const StyledEllipsis = styled__default.default.div.attrs({
|
|
266
467
|
'data-garden-id': COMPONENT_ID$2,
|
|
267
|
-
'data-garden-version': '9.0.0-next.
|
|
468
|
+
'data-garden-version': '9.0.0-next.20'
|
|
268
469
|
}).withConfig({
|
|
269
470
|
displayName: "StyledEllipsis",
|
|
270
471
|
componentId: "sc-1u4uqmy-0"
|
|
@@ -275,20 +476,13 @@ StyledEllipsis.defaultProps = {
|
|
|
275
476
|
|
|
276
477
|
const COMPONENT_ID$1 = 'typography.icon';
|
|
277
478
|
const sizeStyles = props => {
|
|
278
|
-
const margin = props
|
|
479
|
+
const margin = props.$isStart && `${props.theme.space.base * 2}px`;
|
|
279
480
|
const size = props.theme.iconSizes.md;
|
|
280
481
|
return styled.css(["margin-", ":", ";width:", ";height:", ";"], props.theme.rtl ? 'left' : 'right', margin, size, size);
|
|
281
482
|
};
|
|
282
|
-
const StyledIcon = styled__default.default(
|
|
283
|
-
let {
|
|
284
|
-
children,
|
|
285
|
-
isStart,
|
|
286
|
-
...props
|
|
287
|
-
} = _ref;
|
|
288
|
-
return React__default.default.cloneElement(React.Children.only(children), props);
|
|
289
|
-
}).attrs({
|
|
483
|
+
const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
290
484
|
'data-garden-id': COMPONENT_ID$1,
|
|
291
|
-
'data-garden-version': '9.0.0-next.
|
|
485
|
+
'data-garden-version': '9.0.0-next.20'
|
|
292
486
|
}).withConfig({
|
|
293
487
|
displayName: "StyledIcon",
|
|
294
488
|
componentId: "sc-10rfb5b-0"
|
|
@@ -304,7 +498,7 @@ const listStyles = props => {
|
|
|
304
498
|
const ORDERED_ID$1 = 'typography.ordered_list';
|
|
305
499
|
const StyledOrderedList = styled__default.default.ol.attrs({
|
|
306
500
|
'data-garden-id': ORDERED_ID$1,
|
|
307
|
-
'data-garden-version': '9.0.0-next.
|
|
501
|
+
'data-garden-version': '9.0.0-next.20'
|
|
308
502
|
}).withConfig({
|
|
309
503
|
displayName: "StyledList__StyledOrderedList",
|
|
310
504
|
componentId: "sc-jdbsfi-0"
|
|
@@ -315,7 +509,7 @@ StyledOrderedList.defaultProps = {
|
|
|
315
509
|
const UNORDERED_ID$1 = 'typography.unordered_list';
|
|
316
510
|
const StyledUnorderedList = styled__default.default.ul.attrs({
|
|
317
511
|
'data-garden-id': UNORDERED_ID$1,
|
|
318
|
-
'data-garden-version': '9.0.0-next.
|
|
512
|
+
'data-garden-version': '9.0.0-next.20'
|
|
319
513
|
}).withConfig({
|
|
320
514
|
displayName: "StyledList__StyledUnorderedList",
|
|
321
515
|
componentId: "sc-jdbsfi-1"
|
|
@@ -335,7 +529,7 @@ const listItemStyles = props => {
|
|
|
335
529
|
const ORDERED_ID = 'typography.ordered_list_item';
|
|
336
530
|
const StyledOrderedListItem = styled__default.default(StyledFont).attrs({
|
|
337
531
|
'data-garden-id': ORDERED_ID,
|
|
338
|
-
'data-garden-version': '9.0.0-next.
|
|
532
|
+
'data-garden-version': '9.0.0-next.20',
|
|
339
533
|
as: 'li'
|
|
340
534
|
}).withConfig({
|
|
341
535
|
displayName: "StyledListItem__StyledOrderedListItem",
|
|
@@ -348,7 +542,7 @@ StyledOrderedListItem.defaultProps = {
|
|
|
348
542
|
const UNORDERED_ID = 'typography.unordered_list_item';
|
|
349
543
|
const StyledUnorderedListItem = styled__default.default(StyledFont).attrs({
|
|
350
544
|
'data-garden-id': UNORDERED_ID,
|
|
351
|
-
'data-garden-version': '9.0.0-next.
|
|
545
|
+
'data-garden-version': '9.0.0-next.20',
|
|
352
546
|
as: 'li'
|
|
353
547
|
}).withConfig({
|
|
354
548
|
displayName: "StyledListItem__StyledUnorderedListItem",
|
|
@@ -362,7 +556,7 @@ StyledUnorderedListItem.defaultProps = {
|
|
|
362
556
|
const COMPONENT_ID = 'typography.paragraph';
|
|
363
557
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
364
558
|
'data-garden-id': COMPONENT_ID,
|
|
365
|
-
'data-garden-version': '9.0.0-next.
|
|
559
|
+
'data-garden-version': '9.0.0-next.20'
|
|
366
560
|
}).withConfig({
|
|
367
561
|
displayName: "StyledParagraph",
|
|
368
562
|
componentId: "sc-zkuftz-0"
|
|
@@ -376,7 +570,7 @@ const SM = React.forwardRef((_ref, ref) => {
|
|
|
376
570
|
tag,
|
|
377
571
|
...other
|
|
378
572
|
} = _ref;
|
|
379
|
-
return React__default.default.createElement(StyledFont,
|
|
573
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
380
574
|
as: tag,
|
|
381
575
|
ref: ref,
|
|
382
576
|
size: "small"
|
|
@@ -397,7 +591,7 @@ const MD = React.forwardRef((_ref, ref) => {
|
|
|
397
591
|
tag,
|
|
398
592
|
...other
|
|
399
593
|
} = _ref;
|
|
400
|
-
return React__default.default.createElement(StyledFont,
|
|
594
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
401
595
|
as: tag,
|
|
402
596
|
ref: ref,
|
|
403
597
|
size: "medium"
|
|
@@ -418,7 +612,7 @@ const LG = React.forwardRef((_ref, ref) => {
|
|
|
418
612
|
tag,
|
|
419
613
|
...other
|
|
420
614
|
} = _ref;
|
|
421
|
-
return React__default.default.createElement(StyledFont,
|
|
615
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
422
616
|
as: tag,
|
|
423
617
|
ref: ref,
|
|
424
618
|
size: "large"
|
|
@@ -439,7 +633,7 @@ const XL = React.forwardRef((_ref, ref) => {
|
|
|
439
633
|
tag,
|
|
440
634
|
...other
|
|
441
635
|
} = _ref;
|
|
442
|
-
return React__default.default.createElement(StyledFont,
|
|
636
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
443
637
|
as: tag,
|
|
444
638
|
ref: ref,
|
|
445
639
|
size: "extralarge"
|
|
@@ -459,7 +653,7 @@ const XXL = React.forwardRef((_ref, ref) => {
|
|
|
459
653
|
tag,
|
|
460
654
|
...other
|
|
461
655
|
} = _ref;
|
|
462
|
-
return React__default.default.createElement(StyledFont,
|
|
656
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
463
657
|
as: tag,
|
|
464
658
|
ref: ref,
|
|
465
659
|
size: "2xlarge"
|
|
@@ -479,7 +673,7 @@ const XXXL = React.forwardRef((_ref, ref) => {
|
|
|
479
673
|
tag,
|
|
480
674
|
...other
|
|
481
675
|
} = _ref;
|
|
482
|
-
return React__default.default.createElement(StyledFont,
|
|
676
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
483
677
|
as: tag,
|
|
484
678
|
ref: ref,
|
|
485
679
|
size: "3xlarge"
|
|
@@ -494,7 +688,7 @@ XXXL.defaultProps = {
|
|
|
494
688
|
tag: 'div'
|
|
495
689
|
};
|
|
496
690
|
|
|
497
|
-
const Blockquote = React.forwardRef((props, ref) => React__default.default.createElement(StyledBlockquote,
|
|
691
|
+
const Blockquote = React.forwardRef((props, ref) => React__default.default.createElement(StyledBlockquote, Object.assign({
|
|
498
692
|
ref: ref
|
|
499
693
|
}, props)));
|
|
500
694
|
Blockquote.displayName = 'Blockquote';
|
|
@@ -510,7 +704,7 @@ const Code = React.forwardRef((_ref, ref) => {
|
|
|
510
704
|
hue,
|
|
511
705
|
...other
|
|
512
706
|
} = _ref;
|
|
513
|
-
return React__default.default.createElement(StyledCode,
|
|
707
|
+
return React__default.default.createElement(StyledCode, Object.assign({
|
|
514
708
|
ref: ref,
|
|
515
709
|
hue: hue
|
|
516
710
|
}, other));
|
|
@@ -532,8 +726,8 @@ const CodeBlock = React__default.default.forwardRef((_ref, ref) => {
|
|
|
532
726
|
highlightLines,
|
|
533
727
|
isLight,
|
|
534
728
|
isNumbered,
|
|
535
|
-
language,
|
|
536
|
-
size,
|
|
729
|
+
language = 'tsx',
|
|
730
|
+
size = 'medium',
|
|
537
731
|
...other
|
|
538
732
|
} = _ref;
|
|
539
733
|
const containerRef = React.useRef(null);
|
|
@@ -543,6 +737,25 @@ const CodeBlock = React__default.default.forwardRef((_ref, ref) => {
|
|
|
543
737
|
containerRef,
|
|
544
738
|
dependency
|
|
545
739
|
});
|
|
740
|
+
const [isPrismImported, setIsPrismImported] = React.useState(false);
|
|
741
|
+
const win = reactTheming.useWindow();
|
|
742
|
+
const importPrism = React.useCallback(async () => {
|
|
743
|
+
if (win && !isPrismImported) {
|
|
744
|
+
win.Prism = prismReactRenderer.Prism;
|
|
745
|
+
try {
|
|
746
|
+
await import('prismjs/components/prism-bash');
|
|
747
|
+
await import('prismjs/components/prism-diff');
|
|
748
|
+
await import('prismjs/components/prism-json');
|
|
749
|
+
} catch (error) {
|
|
750
|
+
console.error(error);
|
|
751
|
+
} finally {
|
|
752
|
+
setIsPrismImported(true);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}, [win, isPrismImported]);
|
|
756
|
+
React.useEffect(() => {
|
|
757
|
+
importPrism();
|
|
758
|
+
}, [importPrism]);
|
|
546
759
|
const getDiff = line => {
|
|
547
760
|
let retVal;
|
|
548
761
|
if (language === 'diff') {
|
|
@@ -561,11 +774,10 @@ const CodeBlock = React__default.default.forwardRef((_ref, ref) => {
|
|
|
561
774
|
}
|
|
562
775
|
return retVal;
|
|
563
776
|
};
|
|
564
|
-
return React__default.default.createElement(StyledCodeBlockContainer,
|
|
777
|
+
return isPrismImported && React__default.default.createElement(StyledCodeBlockContainer, Object.assign({}, containerProps, {
|
|
565
778
|
ref: containerRef,
|
|
566
779
|
tabIndex: containerTabIndex
|
|
567
|
-
}), React__default.default.createElement(
|
|
568
|
-
Prism: Highlight.Prism,
|
|
780
|
+
}), React__default.default.createElement(prismReactRenderer.Highlight, {
|
|
569
781
|
code: code ? code.trim() : '',
|
|
570
782
|
language: LANGUAGES.includes(language) ? language : 'tsx'
|
|
571
783
|
}, _ref2 => {
|
|
@@ -575,33 +787,36 @@ const CodeBlock = React__default.default.forwardRef((_ref, ref) => {
|
|
|
575
787
|
getLineProps,
|
|
576
788
|
getTokenProps
|
|
577
789
|
} = _ref2;
|
|
578
|
-
return React__default.default.createElement(
|
|
790
|
+
return React__default.default.createElement(reactTheming.ThemeProvider, {
|
|
791
|
+
theme: parentTheme => ({
|
|
792
|
+
...parentTheme,
|
|
793
|
+
colors: {
|
|
794
|
+
...parentTheme.colors,
|
|
795
|
+
base: isLight ? 'light' : 'dark'
|
|
796
|
+
}
|
|
797
|
+
})
|
|
798
|
+
}, React__default.default.createElement(StyledCodeBlock, Object.assign({
|
|
579
799
|
className: className,
|
|
580
|
-
ref: ref
|
|
581
|
-
|
|
582
|
-
}, other), tokens.map((line, index) => React__default.default.createElement(StyledCodeBlockLine, _extends({}, getLineProps({
|
|
800
|
+
ref: ref
|
|
801
|
+
}, other), tokens.map((line, index) => React__default.default.createElement(StyledCodeBlockLine, Object.assign({}, getLineProps({
|
|
583
802
|
line
|
|
584
803
|
}), {
|
|
585
804
|
key: index,
|
|
586
805
|
language: language,
|
|
587
806
|
isHighlighted: highlightLines && highlightLines.includes(index + 1),
|
|
588
|
-
isLight: isLight,
|
|
589
807
|
isNumbered: isNumbered,
|
|
590
808
|
diff: getDiff(line),
|
|
591
|
-
size: size
|
|
592
|
-
|
|
809
|
+
size: size,
|
|
810
|
+
style: undefined
|
|
811
|
+
}), line.map((token, tokenKey) => React__default.default.createElement(StyledCodeBlockToken, Object.assign({}, getTokenProps({
|
|
593
812
|
token
|
|
594
813
|
}), {
|
|
595
814
|
key: tokenKey,
|
|
596
|
-
|
|
597
|
-
}), token.empty ? '\n' : token.content)))));
|
|
815
|
+
style: undefined
|
|
816
|
+
}), token.empty ? '\n' : token.content))))));
|
|
598
817
|
}));
|
|
599
818
|
});
|
|
600
819
|
CodeBlock.displayName = 'CodeBlock';
|
|
601
|
-
CodeBlock.defaultProps = {
|
|
602
|
-
language: 'tsx',
|
|
603
|
-
size: 'medium'
|
|
604
|
-
};
|
|
605
820
|
|
|
606
821
|
const Ellipsis = React.forwardRef((_ref, ref) => {
|
|
607
822
|
let {
|
|
@@ -616,7 +831,7 @@ const Ellipsis = React.forwardRef((_ref, ref) => {
|
|
|
616
831
|
} else if (typeof children === 'string') {
|
|
617
832
|
textContent = children;
|
|
618
833
|
}
|
|
619
|
-
return React__default.default.createElement(StyledEllipsis,
|
|
834
|
+
return React__default.default.createElement(StyledEllipsis, Object.assign({
|
|
620
835
|
as: tag,
|
|
621
836
|
ref: ref,
|
|
622
837
|
title: textContent
|
|
@@ -631,7 +846,7 @@ Ellipsis.defaultProps = {
|
|
|
631
846
|
tag: 'div'
|
|
632
847
|
};
|
|
633
848
|
|
|
634
|
-
const Paragraph = React.forwardRef((props, ref) => React__default.default.createElement(StyledParagraph,
|
|
849
|
+
const Paragraph = React.forwardRef((props, ref) => React__default.default.createElement(StyledParagraph, Object.assign({
|
|
635
850
|
ref: ref
|
|
636
851
|
}, props)));
|
|
637
852
|
Paragraph.displayName = 'Paragraph';
|
|
@@ -655,7 +870,7 @@ const OrderedListItem = React.forwardRef((props, ref) => {
|
|
|
655
870
|
const {
|
|
656
871
|
size
|
|
657
872
|
} = useOrderedListContext();
|
|
658
|
-
return React__default.default.createElement(StyledOrderedListItem,
|
|
873
|
+
return React__default.default.createElement(StyledOrderedListItem, Object.assign({
|
|
659
874
|
ref: ref,
|
|
660
875
|
space: size
|
|
661
876
|
}, props));
|
|
@@ -674,7 +889,7 @@ const OrderedListComponent = React__default.default.forwardRef((_ref, ref) => {
|
|
|
674
889
|
}), [size]);
|
|
675
890
|
return React__default.default.createElement(OrderedListContext.Provider, {
|
|
676
891
|
value: value
|
|
677
|
-
}, React__default.default.createElement(StyledOrderedList,
|
|
892
|
+
}, React__default.default.createElement(StyledOrderedList, Object.assign({
|
|
678
893
|
ref: ref,
|
|
679
894
|
listType: type
|
|
680
895
|
}, other)));
|
|
@@ -704,7 +919,7 @@ const UnorderedListItem = React.forwardRef((props, ref) => {
|
|
|
704
919
|
const {
|
|
705
920
|
size
|
|
706
921
|
} = useUnorderedListContext();
|
|
707
|
-
return React__default.default.createElement(StyledUnorderedListItem,
|
|
922
|
+
return React__default.default.createElement(StyledUnorderedListItem, Object.assign({
|
|
708
923
|
ref: ref,
|
|
709
924
|
space: size
|
|
710
925
|
}, props));
|
|
@@ -723,7 +938,7 @@ const UnorderedListComponent = React.forwardRef((_ref, ref) => {
|
|
|
723
938
|
}), [size]);
|
|
724
939
|
return React__default.default.createElement(UnorderedListContext.Provider, {
|
|
725
940
|
value: value
|
|
726
|
-
}, React__default.default.createElement(StyledUnorderedList,
|
|
941
|
+
}, React__default.default.createElement(StyledUnorderedList, Object.assign({
|
|
727
942
|
ref: ref,
|
|
728
943
|
listType: type
|
|
729
944
|
}, other)));
|
|
@@ -740,8 +955,8 @@ UnorderedListComponent.defaultProps = {
|
|
|
740
955
|
const UnorderedList = UnorderedListComponent;
|
|
741
956
|
UnorderedList.Item = Item;
|
|
742
957
|
|
|
743
|
-
const StartIconComponent = props => React__default.default.createElement(StyledIcon,
|
|
744
|
-
isStart: true
|
|
958
|
+
const StartIconComponent = props => React__default.default.createElement(StyledIcon, Object.assign({
|
|
959
|
+
$isStart: true
|
|
745
960
|
}, props));
|
|
746
961
|
StartIconComponent.displayName = 'Span.StartIcon';
|
|
747
962
|
const StartIcon = StartIconComponent;
|
|
@@ -755,7 +970,7 @@ const SpanComponent = React.forwardRef((_ref, ref) => {
|
|
|
755
970
|
tag,
|
|
756
971
|
...other
|
|
757
972
|
} = _ref;
|
|
758
|
-
return React__default.default.createElement(StyledFont,
|
|
973
|
+
return React__default.default.createElement(StyledFont, Object.assign({
|
|
759
974
|
as: tag,
|
|
760
975
|
ref: ref,
|
|
761
976
|
size: "inherit"
|