@zendeskgarden/react-typography 9.12.2 → 9.12.4
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 +7 -10
- package/dist/esm/elements/Code.js +10 -13
- package/dist/esm/elements/CodeBlock.js +43 -47
- package/dist/esm/elements/Ellipsis.js +6 -7
- package/dist/esm/elements/Kbd.js +8 -11
- package/dist/esm/elements/LG.js +12 -15
- package/dist/esm/elements/MD.js +12 -15
- package/dist/esm/elements/Paragraph.js +7 -10
- package/dist/esm/elements/SM.js +12 -15
- package/dist/esm/elements/XL.js +10 -13
- package/dist/esm/elements/XXL.js +10 -13
- package/dist/esm/elements/XXXL.js +11 -14
- package/dist/esm/elements/lists/OrderedList.js +6 -7
- package/dist/esm/elements/lists/OrderedListItem.js +2 -2
- package/dist/esm/elements/lists/UnorderedList.js +6 -7
- package/dist/esm/elements/span/Span.js +14 -17
- package/dist/esm/styled/StyledBlockquote.js +3 -3
- package/dist/esm/styled/StyledCode.js +8 -9
- package/dist/esm/styled/StyledCodeBlock.js +7 -8
- package/dist/esm/styled/StyledCodeBlockContainer.js +3 -3
- package/dist/esm/styled/StyledCodeBlockLine.js +14 -16
- package/dist/esm/styled/StyledCodeBlockToken.js +6 -7
- package/dist/esm/styled/StyledEllipsis.js +3 -3
- package/dist/esm/styled/StyledFont.js +10 -11
- package/dist/esm/styled/StyledIcon.js +5 -5
- package/dist/esm/styled/StyledKbd.js +7 -8
- package/dist/esm/styled/StyledList.js +6 -6
- package/dist/esm/styled/StyledListItem.js +2 -2
- package/dist/esm/styled/StyledParagraph.js +1 -1
- package/dist/index.cjs.js +217 -264
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -38,14 +38,13 @@ const THEME_SIZES = {
|
|
|
38
38
|
'2xlarge': 'xxl',
|
|
39
39
|
'3xlarge': 'xxxl'
|
|
40
40
|
};
|
|
41
|
-
const fontStyles =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = _ref;
|
|
41
|
+
const fontStyles = ({
|
|
42
|
+
$hue,
|
|
43
|
+
$isBold,
|
|
44
|
+
$isMonospace,
|
|
45
|
+
$size,
|
|
46
|
+
theme
|
|
47
|
+
}) => {
|
|
49
48
|
const monospace = $isMonospace && ['inherit', 'small', 'medium', 'large'].indexOf($size) !== -1;
|
|
50
49
|
const fontFamily = monospace && theme.fonts.mono;
|
|
51
50
|
const direction = theme.rtl ? 'rtl' : 'ltr';
|
|
@@ -86,7 +85,7 @@ const fontStyles = _ref => {
|
|
|
86
85
|
};
|
|
87
86
|
const StyledFont = styled__default.default.div.attrs(props => ({
|
|
88
87
|
'data-garden-id': COMPONENT_ID$a,
|
|
89
|
-
'data-garden-version': '9.12.
|
|
88
|
+
'data-garden-version': '9.12.4',
|
|
90
89
|
$size: props.$size ?? 'inherit'
|
|
91
90
|
})).withConfig({
|
|
92
91
|
displayName: "StyledFont",
|
|
@@ -96,7 +95,7 @@ const StyledFont = styled__default.default.div.attrs(props => ({
|
|
|
96
95
|
const COMPONENT_ID$9 = 'typography.blockquote';
|
|
97
96
|
const StyledBlockquote = styled__default.default.blockquote.attrs({
|
|
98
97
|
'data-garden-id': COMPONENT_ID$9,
|
|
99
|
-
'data-garden-version': '9.12.
|
|
98
|
+
'data-garden-version': '9.12.4'
|
|
100
99
|
}).withConfig({
|
|
101
100
|
displayName: "StyledBlockquote",
|
|
102
101
|
componentId: "sc-1tt3ye0-0"
|
|
@@ -106,11 +105,10 @@ const StyledBlockquote = styled__default.default.blockquote.attrs({
|
|
|
106
105
|
}), 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);
|
|
107
106
|
|
|
108
107
|
const COMPONENT_ID$8 = 'typography.code';
|
|
109
|
-
const colorStyles$3 =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} = _ref;
|
|
108
|
+
const colorStyles$3 = ({
|
|
109
|
+
$hue,
|
|
110
|
+
theme
|
|
111
|
+
}) => {
|
|
114
112
|
const bgColorArgs = {
|
|
115
113
|
theme,
|
|
116
114
|
light: {
|
|
@@ -147,7 +145,7 @@ const colorStyles$3 = _ref => {
|
|
|
147
145
|
};
|
|
148
146
|
const StyledCode = styled__default.default(StyledFont).attrs(props => ({
|
|
149
147
|
'data-garden-id': COMPONENT_ID$8,
|
|
150
|
-
'data-garden-version': '9.12.
|
|
148
|
+
'data-garden-version': '9.12.4',
|
|
151
149
|
as: 'code',
|
|
152
150
|
$isMonospace: true,
|
|
153
151
|
$hue: props.$hue ?? 'grey',
|
|
@@ -158,10 +156,9 @@ const StyledCode = styled__default.default(StyledFont).attrs(props => ({
|
|
|
158
156
|
})(["border-radius:", ";padding:1.5px;", ";", ";"], props => props.theme.borderRadii.sm, props => colorStyles$3(props), reactTheming.componentStyles);
|
|
159
157
|
|
|
160
158
|
const COMPONENT_ID$7 = 'typography.codeblock';
|
|
161
|
-
const colorStyles$2 =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
} = _ref;
|
|
159
|
+
const colorStyles$2 = ({
|
|
160
|
+
theme
|
|
161
|
+
}) => {
|
|
165
162
|
const backgroundColor = reactTheming.getColor({
|
|
166
163
|
theme,
|
|
167
164
|
variable: 'background.recessed'
|
|
@@ -174,7 +171,7 @@ const colorStyles$2 = _ref => {
|
|
|
174
171
|
};
|
|
175
172
|
const StyledCodeBlock = styled__default.default.pre.attrs({
|
|
176
173
|
'data-garden-id': COMPONENT_ID$7,
|
|
177
|
-
'data-garden-version': '9.12.
|
|
174
|
+
'data-garden-version': '9.12.4'
|
|
178
175
|
}).withConfig({
|
|
179
176
|
displayName: "StyledCodeBlock",
|
|
180
177
|
componentId: "sc-5wky57-0"
|
|
@@ -183,7 +180,7 @@ const StyledCodeBlock = styled__default.default.pre.attrs({
|
|
|
183
180
|
const COMPONENT_ID$6 = 'typography.codeblock_container';
|
|
184
181
|
const StyledCodeBlockContainer = styled__default.default.div.attrs({
|
|
185
182
|
'data-garden-id': COMPONENT_ID$6,
|
|
186
|
-
'data-garden-version': '9.12.
|
|
183
|
+
'data-garden-version': '9.12.4'
|
|
187
184
|
}).withConfig({
|
|
188
185
|
displayName: "StyledCodeBlockContainer",
|
|
189
186
|
componentId: "sc-14zgbfw-0"
|
|
@@ -192,12 +189,11 @@ const StyledCodeBlockContainer = styled__default.default.div.attrs({
|
|
|
192
189
|
}), reactTheming.componentStyles);
|
|
193
190
|
|
|
194
191
|
const COMPONENT_ID$5 = 'typography.codeblock_code';
|
|
195
|
-
const colorStyles$1 =
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
} = _ref;
|
|
192
|
+
const colorStyles$1 = ({
|
|
193
|
+
theme,
|
|
194
|
+
$diff,
|
|
195
|
+
$isHighlighted
|
|
196
|
+
}) => {
|
|
201
197
|
let backgroundColor;
|
|
202
198
|
if ($diff) {
|
|
203
199
|
const hues = {
|
|
@@ -232,12 +228,11 @@ const colorStyles$1 = _ref => {
|
|
|
232
228
|
}
|
|
233
229
|
return styled.css(["background-color:", ";"], backgroundColor);
|
|
234
230
|
};
|
|
235
|
-
const lineNumberStyles =
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
} = _ref2;
|
|
231
|
+
const lineNumberStyles = ({
|
|
232
|
+
theme,
|
|
233
|
+
$language,
|
|
234
|
+
$size
|
|
235
|
+
}) => {
|
|
241
236
|
const color = reactTheming.getColor({
|
|
242
237
|
theme,
|
|
243
238
|
variable: 'foreground.subtle',
|
|
@@ -269,7 +264,7 @@ const lineNumberStyles = _ref2 => {
|
|
|
269
264
|
};
|
|
270
265
|
const StyledCodeBlockLine = styled__default.default(StyledFont).attrs({
|
|
271
266
|
'data-garden-id': COMPONENT_ID$5,
|
|
272
|
-
'data-garden-version': '9.12.
|
|
267
|
+
'data-garden-version': '9.12.4',
|
|
273
268
|
as: 'code',
|
|
274
269
|
$isMonospace: true
|
|
275
270
|
}).withConfig({
|
|
@@ -278,10 +273,9 @@ const StyledCodeBlockLine = styled__default.default(StyledFont).attrs({
|
|
|
278
273
|
})(["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);
|
|
279
274
|
|
|
280
275
|
const COMPONENT_ID$4 = 'typography.codeblock_token';
|
|
281
|
-
const colorStyles =
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
} = _ref;
|
|
276
|
+
const colorStyles = ({
|
|
277
|
+
theme
|
|
278
|
+
}) => {
|
|
285
279
|
const colors = {
|
|
286
280
|
boolean: reactTheming.getColor({
|
|
287
281
|
theme,
|
|
@@ -440,7 +434,7 @@ const colorStyles = _ref => {
|
|
|
440
434
|
};
|
|
441
435
|
const StyledCodeBlockToken = styled__default.default.span.attrs({
|
|
442
436
|
'data-garden-id': COMPONENT_ID$4,
|
|
443
|
-
'data-garden-version': '9.12.
|
|
437
|
+
'data-garden-version': '9.12.4'
|
|
444
438
|
}).withConfig({
|
|
445
439
|
displayName: "StyledCodeBlockToken",
|
|
446
440
|
componentId: "sc-1hkshdq-0"
|
|
@@ -449,7 +443,7 @@ const StyledCodeBlockToken = styled__default.default.span.attrs({
|
|
|
449
443
|
const COMPONENT_ID$3 = 'typography.ellipsis';
|
|
450
444
|
const StyledEllipsis = styled__default.default.div.attrs({
|
|
451
445
|
'data-garden-id': COMPONENT_ID$3,
|
|
452
|
-
'data-garden-version': '9.12.
|
|
446
|
+
'data-garden-version': '9.12.4'
|
|
453
447
|
}).withConfig({
|
|
454
448
|
displayName: "StyledEllipsis",
|
|
455
449
|
componentId: "sc-1u4uqmy-0"
|
|
@@ -463,18 +457,17 @@ const sizeStyles$1 = props => {
|
|
|
463
457
|
};
|
|
464
458
|
const StyledIcon = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
465
459
|
'data-garden-id': COMPONENT_ID$2,
|
|
466
|
-
'data-garden-version': '9.12.
|
|
460
|
+
'data-garden-version': '9.12.4'
|
|
467
461
|
}).withConfig({
|
|
468
462
|
displayName: "StyledIcon",
|
|
469
463
|
componentId: "sc-10rfb5b-0"
|
|
470
464
|
})(["position:relative;top:-1px;vertical-align:middle;", ";", ";"], props => sizeStyles$1(props), reactTheming.componentStyles);
|
|
471
465
|
|
|
472
466
|
const COMPONENT_ID$1 = 'typography.kbd';
|
|
473
|
-
const sizeStyles =
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
} = _ref;
|
|
467
|
+
const sizeStyles = ({
|
|
468
|
+
theme,
|
|
469
|
+
$size
|
|
470
|
+
}) => {
|
|
478
471
|
let minWidth;
|
|
479
472
|
let paddingHorizontal;
|
|
480
473
|
let paddingVertical = '0';
|
|
@@ -502,7 +495,7 @@ const sizeStyles = _ref => {
|
|
|
502
495
|
};
|
|
503
496
|
const StyledKbd = styled__default.default(StyledCode).attrs({
|
|
504
497
|
'data-garden-id': COMPONENT_ID$1,
|
|
505
|
-
'data-garden-version': '9.12.
|
|
498
|
+
'data-garden-version': '9.12.4',
|
|
506
499
|
as: 'kbd'
|
|
507
500
|
}).withConfig({
|
|
508
501
|
displayName: "StyledKbd",
|
|
@@ -516,7 +509,7 @@ const listStyles = props => {
|
|
|
516
509
|
const ORDERED_ID$1 = 'typography.ordered_list';
|
|
517
510
|
const StyledOrderedList = styled__default.default.ol.attrs({
|
|
518
511
|
'data-garden-id': ORDERED_ID$1,
|
|
519
|
-
'data-garden-version': '9.12.
|
|
512
|
+
'data-garden-version': '9.12.4'
|
|
520
513
|
}).withConfig({
|
|
521
514
|
displayName: "StyledList__StyledOrderedList",
|
|
522
515
|
componentId: "sc-jdbsfi-0"
|
|
@@ -524,7 +517,7 @@ const StyledOrderedList = styled__default.default.ol.attrs({
|
|
|
524
517
|
const UNORDERED_ID$1 = 'typography.unordered_list';
|
|
525
518
|
const StyledUnorderedList = styled__default.default.ul.attrs({
|
|
526
519
|
'data-garden-id': UNORDERED_ID$1,
|
|
527
|
-
'data-garden-version': '9.12.
|
|
520
|
+
'data-garden-version': '9.12.4'
|
|
528
521
|
}).withConfig({
|
|
529
522
|
displayName: "StyledList__StyledUnorderedList",
|
|
530
523
|
componentId: "sc-jdbsfi-1"
|
|
@@ -541,7 +534,7 @@ const listItemStyles = props => {
|
|
|
541
534
|
const ORDERED_ID = 'typography.ordered_list_item';
|
|
542
535
|
const StyledOrderedListItem = styled__default.default(StyledFont).attrs(props => ({
|
|
543
536
|
'data-garden-id': ORDERED_ID,
|
|
544
|
-
'data-garden-version': '9.12.
|
|
537
|
+
'data-garden-version': '9.12.4',
|
|
545
538
|
as: 'li',
|
|
546
539
|
$space: props.$space ?? 'medium'
|
|
547
540
|
})).withConfig({
|
|
@@ -551,7 +544,7 @@ const StyledOrderedListItem = styled__default.default(StyledFont).attrs(props =>
|
|
|
551
544
|
const UNORDERED_ID = 'typography.unordered_list_item';
|
|
552
545
|
const StyledUnorderedListItem = styled__default.default(StyledFont).attrs(props => ({
|
|
553
546
|
'data-garden-id': UNORDERED_ID,
|
|
554
|
-
'data-garden-version': '9.12.
|
|
547
|
+
'data-garden-version': '9.12.4',
|
|
555
548
|
as: 'li',
|
|
556
549
|
$space: props.$space ?? 'medium'
|
|
557
550
|
})).withConfig({
|
|
@@ -562,27 +555,24 @@ const StyledUnorderedListItem = styled__default.default(StyledFont).attrs(props
|
|
|
562
555
|
const COMPONENT_ID = 'typography.paragraph';
|
|
563
556
|
const StyledParagraph = styled__default.default.p.attrs({
|
|
564
557
|
'data-garden-id': COMPONENT_ID,
|
|
565
|
-
'data-garden-version': '9.12.
|
|
558
|
+
'data-garden-version': '9.12.4'
|
|
566
559
|
}).withConfig({
|
|
567
560
|
displayName: "StyledParagraph",
|
|
568
561
|
componentId: "sc-zkuftz-0"
|
|
569
562
|
})(["margin:0;padding:0;direction:", ";& + &,blockquote + &{margin-top:", ";}", ";"], props => props.theme.rtl ? 'rtl' : 'ltr', props => props.theme.lineHeights[THEME_SIZES[props.size]], reactTheming.componentStyles);
|
|
570
563
|
|
|
571
|
-
const SM = React.forwardRef((
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
$size: "small"
|
|
584
|
-
}, other));
|
|
585
|
-
});
|
|
564
|
+
const SM = React.forwardRef(({
|
|
565
|
+
isBold,
|
|
566
|
+
isMonospace,
|
|
567
|
+
tag = 'div',
|
|
568
|
+
...other
|
|
569
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
570
|
+
$isBold: isBold,
|
|
571
|
+
$isMonospace: isMonospace,
|
|
572
|
+
as: tag,
|
|
573
|
+
ref: ref,
|
|
574
|
+
$size: "small"
|
|
575
|
+
}, other)));
|
|
586
576
|
SM.displayName = 'SM';
|
|
587
577
|
SM.propTypes = {
|
|
588
578
|
tag: PropTypes__default.default.any,
|
|
@@ -590,21 +580,18 @@ SM.propTypes = {
|
|
|
590
580
|
isMonospace: PropTypes__default.default.bool
|
|
591
581
|
};
|
|
592
582
|
|
|
593
|
-
const MD = React.forwardRef((
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
ref: ref
|
|
606
|
-
}, other));
|
|
607
|
-
});
|
|
583
|
+
const MD = React.forwardRef(({
|
|
584
|
+
isBold,
|
|
585
|
+
isMonospace,
|
|
586
|
+
tag = 'div',
|
|
587
|
+
...other
|
|
588
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
589
|
+
$isBold: isBold,
|
|
590
|
+
$isMonospace: isMonospace,
|
|
591
|
+
$size: "medium",
|
|
592
|
+
as: tag,
|
|
593
|
+
ref: ref
|
|
594
|
+
}, other)));
|
|
608
595
|
MD.displayName = 'MD';
|
|
609
596
|
MD.propTypes = {
|
|
610
597
|
tag: PropTypes__default.default.any,
|
|
@@ -612,21 +599,18 @@ MD.propTypes = {
|
|
|
612
599
|
isMonospace: PropTypes__default.default.bool
|
|
613
600
|
};
|
|
614
601
|
|
|
615
|
-
const LG = React.forwardRef((
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
ref: ref
|
|
628
|
-
}, other));
|
|
629
|
-
});
|
|
602
|
+
const LG = React.forwardRef(({
|
|
603
|
+
isBold,
|
|
604
|
+
isMonospace,
|
|
605
|
+
tag = 'div',
|
|
606
|
+
...other
|
|
607
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
608
|
+
$isBold: isBold,
|
|
609
|
+
$isMonospace: isMonospace,
|
|
610
|
+
$size: "large",
|
|
611
|
+
as: tag,
|
|
612
|
+
ref: ref
|
|
613
|
+
}, other)));
|
|
630
614
|
LG.displayName = 'LG';
|
|
631
615
|
LG.propTypes = {
|
|
632
616
|
tag: PropTypes__default.default.any,
|
|
@@ -634,108 +618,92 @@ LG.propTypes = {
|
|
|
634
618
|
isMonospace: PropTypes__default.default.bool
|
|
635
619
|
};
|
|
636
620
|
|
|
637
|
-
const XL = React.forwardRef((
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
as: tag
|
|
648
|
-
}, other));
|
|
649
|
-
});
|
|
621
|
+
const XL = React.forwardRef(({
|
|
622
|
+
isBold,
|
|
623
|
+
tag = 'div',
|
|
624
|
+
...other
|
|
625
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
626
|
+
$size: "extralarge",
|
|
627
|
+
$isBold: isBold,
|
|
628
|
+
ref: ref,
|
|
629
|
+
as: tag
|
|
630
|
+
}, other)));
|
|
650
631
|
XL.displayName = 'XL';
|
|
651
632
|
XL.propTypes = {
|
|
652
633
|
tag: PropTypes__default.default.any,
|
|
653
634
|
isBold: PropTypes__default.default.bool
|
|
654
635
|
};
|
|
655
636
|
|
|
656
|
-
const XXL = React.forwardRef((
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
as: tag
|
|
667
|
-
}, other));
|
|
668
|
-
});
|
|
637
|
+
const XXL = React.forwardRef(({
|
|
638
|
+
isBold,
|
|
639
|
+
tag = 'div',
|
|
640
|
+
...other
|
|
641
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
642
|
+
$size: "2xlarge",
|
|
643
|
+
$isBold: isBold,
|
|
644
|
+
ref: ref,
|
|
645
|
+
as: tag
|
|
646
|
+
}, other)));
|
|
669
647
|
XXL.displayName = 'XXL';
|
|
670
648
|
XXL.propTypes = {
|
|
671
649
|
tag: PropTypes__default.default.any,
|
|
672
650
|
isBold: PropTypes__default.default.bool
|
|
673
651
|
};
|
|
674
652
|
|
|
675
|
-
const XXXL = React.forwardRef((
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
ref: ref
|
|
687
|
-
}));
|
|
688
|
-
});
|
|
653
|
+
const XXXL = React.forwardRef(({
|
|
654
|
+
isBold,
|
|
655
|
+
tag = 'div',
|
|
656
|
+
...other
|
|
657
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
658
|
+
$isBold: isBold,
|
|
659
|
+
$size: "3xlarge"
|
|
660
|
+
}, other, {
|
|
661
|
+
as: tag,
|
|
662
|
+
ref: ref
|
|
663
|
+
})));
|
|
689
664
|
XXXL.displayName = 'XXXL';
|
|
690
665
|
XXXL.propTypes = {
|
|
691
666
|
tag: PropTypes__default.default.any,
|
|
692
667
|
isBold: PropTypes__default.default.bool
|
|
693
668
|
};
|
|
694
669
|
|
|
695
|
-
const Blockquote = React.forwardRef((
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
size: size
|
|
703
|
-
}, props));
|
|
704
|
-
});
|
|
670
|
+
const Blockquote = React.forwardRef(({
|
|
671
|
+
size = 'medium',
|
|
672
|
+
...props
|
|
673
|
+
}, ref) => React__default.default.createElement(StyledBlockquote, Object.assign({
|
|
674
|
+
ref: ref,
|
|
675
|
+
size: size
|
|
676
|
+
}, props)));
|
|
705
677
|
Blockquote.displayName = 'Blockquote';
|
|
706
678
|
Blockquote.propTypes = {
|
|
707
679
|
size: PropTypes__default.default.oneOf(SIZE)
|
|
708
680
|
};
|
|
709
681
|
|
|
710
|
-
const Code = React.forwardRef((
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
$size: size
|
|
720
|
-
}, other));
|
|
721
|
-
});
|
|
682
|
+
const Code = React.forwardRef(({
|
|
683
|
+
hue = 'grey',
|
|
684
|
+
size = 'inherit',
|
|
685
|
+
...other
|
|
686
|
+
}, ref) => React__default.default.createElement(StyledCode, Object.assign({
|
|
687
|
+
ref: ref,
|
|
688
|
+
$hue: hue,
|
|
689
|
+
$size: size
|
|
690
|
+
}, other)));
|
|
722
691
|
Code.displayName = 'Code';
|
|
723
692
|
Code.propTypes = {
|
|
724
693
|
hue: PropTypes__default.default.oneOf(HUE),
|
|
725
694
|
size: PropTypes__default.default.oneOf(INHERIT_SIZE)
|
|
726
695
|
};
|
|
727
696
|
|
|
728
|
-
const CodeBlock = React__default.default.forwardRef((
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
} = _ref;
|
|
697
|
+
const CodeBlock = React__default.default.forwardRef(({
|
|
698
|
+
children,
|
|
699
|
+
containerProps,
|
|
700
|
+
highlightLines,
|
|
701
|
+
isLight,
|
|
702
|
+
isNumbered,
|
|
703
|
+
language = 'tsx',
|
|
704
|
+
size = 'medium',
|
|
705
|
+
...other
|
|
706
|
+
}, ref) => {
|
|
739
707
|
const containerRef = React.useRef(null);
|
|
740
708
|
const code = Array.isArray(children) ? children[0] : children;
|
|
741
709
|
const dependency = React.useMemo(() => [size, children], [size, children]);
|
|
@@ -768,52 +736,48 @@ const CodeBlock = React__default.default.forwardRef((_ref, ref) => {
|
|
|
768
736
|
Prism: Highlight.Prism,
|
|
769
737
|
code: code ? code.trim() : '',
|
|
770
738
|
language: LANGUAGES.includes(language) ? language : 'tsx'
|
|
771
|
-
},
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
...parentTheme,
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
style: undefined
|
|
805
|
-
}), token.empty ? '\n' : token.content))))));
|
|
806
|
-
}));
|
|
739
|
+
}, ({
|
|
740
|
+
className,
|
|
741
|
+
tokens,
|
|
742
|
+
getLineProps,
|
|
743
|
+
getTokenProps
|
|
744
|
+
}) => React__default.default.createElement(reactTheming.ThemeProvider, {
|
|
745
|
+
theme: parentTheme => ({
|
|
746
|
+
...parentTheme,
|
|
747
|
+
colors: {
|
|
748
|
+
...parentTheme.colors,
|
|
749
|
+
base: isLight ? 'light' : 'dark'
|
|
750
|
+
}
|
|
751
|
+
})
|
|
752
|
+
}, React__default.default.createElement(StyledCodeBlock, Object.assign({
|
|
753
|
+
className: className,
|
|
754
|
+
ref: ref
|
|
755
|
+
}, other), tokens.map((line, index) =>
|
|
756
|
+
React__default.default.createElement(StyledCodeBlockLine, Object.assign({}, getLineProps({
|
|
757
|
+
line
|
|
758
|
+
}), {
|
|
759
|
+
key: index,
|
|
760
|
+
$language: language,
|
|
761
|
+
$isHighlighted: highlightLines?.includes(index + 1),
|
|
762
|
+
$isNumbered: isNumbered,
|
|
763
|
+
$diff: getDiff(line),
|
|
764
|
+
$size: size,
|
|
765
|
+
style: undefined
|
|
766
|
+
}), line.map((token, tokenKey) => React__default.default.createElement(StyledCodeBlockToken, Object.assign({}, getTokenProps({
|
|
767
|
+
token
|
|
768
|
+
}), {
|
|
769
|
+
key: tokenKey,
|
|
770
|
+
style: undefined
|
|
771
|
+
}), token.empty ? '\n' : token.content))))))));
|
|
807
772
|
});
|
|
808
773
|
CodeBlock.displayName = 'CodeBlock';
|
|
809
774
|
|
|
810
|
-
const Ellipsis = React.forwardRef((
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
} = _ref;
|
|
775
|
+
const Ellipsis = React.forwardRef(({
|
|
776
|
+
children,
|
|
777
|
+
title,
|
|
778
|
+
tag = 'div',
|
|
779
|
+
...other
|
|
780
|
+
}, ref) => {
|
|
817
781
|
let textContent = undefined;
|
|
818
782
|
if (title !== undefined) {
|
|
819
783
|
textContent = title;
|
|
@@ -832,32 +796,26 @@ Ellipsis.propTypes = {
|
|
|
832
796
|
tag: PropTypes__default.default.any
|
|
833
797
|
};
|
|
834
798
|
|
|
835
|
-
const Kbd = React.forwardRef((
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
ref: ref
|
|
844
|
-
}));
|
|
845
|
-
});
|
|
799
|
+
const Kbd = React.forwardRef(({
|
|
800
|
+
size = 'inherit',
|
|
801
|
+
...other
|
|
802
|
+
}, ref) => React__default.default.createElement(StyledKbd, Object.assign({
|
|
803
|
+
$size: size
|
|
804
|
+
}, other, {
|
|
805
|
+
ref: ref
|
|
806
|
+
})));
|
|
846
807
|
Kbd.displayName = 'Kbd';
|
|
847
808
|
Kbd.propTypes = {
|
|
848
809
|
size: PropTypes__default.default.oneOf(INHERIT_SIZE)
|
|
849
810
|
};
|
|
850
811
|
|
|
851
|
-
const Paragraph = React.forwardRef((
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
size: size
|
|
859
|
-
}, props));
|
|
860
|
-
});
|
|
812
|
+
const Paragraph = React.forwardRef(({
|
|
813
|
+
size = 'medium',
|
|
814
|
+
...props
|
|
815
|
+
}, ref) => React__default.default.createElement(StyledParagraph, Object.assign({
|
|
816
|
+
ref: ref,
|
|
817
|
+
size: size
|
|
818
|
+
}, props)));
|
|
861
819
|
Paragraph.displayName = 'Paragraph';
|
|
862
820
|
Paragraph.propTypes = {
|
|
863
821
|
size: PropTypes__default.default.oneOf(SIZE)
|
|
@@ -884,12 +842,11 @@ const OrderedListItem = React.forwardRef((props, ref) => {
|
|
|
884
842
|
OrderedListItem.displayName = 'OrderedList.Item';
|
|
885
843
|
const Item$1 = OrderedListItem;
|
|
886
844
|
|
|
887
|
-
const OrderedListComponent = React__default.default.forwardRef((
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
} = _ref;
|
|
845
|
+
const OrderedListComponent = React__default.default.forwardRef(({
|
|
846
|
+
size = 'medium',
|
|
847
|
+
type = 'decimal',
|
|
848
|
+
...other
|
|
849
|
+
}, ref) => {
|
|
893
850
|
const value = React.useMemo(() => ({
|
|
894
851
|
size: size
|
|
895
852
|
}), [size]);
|
|
@@ -929,12 +886,11 @@ const UnorderedListItem = React.forwardRef((props, ref) => {
|
|
|
929
886
|
UnorderedListItem.displayName = 'UnorderedList.Item';
|
|
930
887
|
const Item = UnorderedListItem;
|
|
931
888
|
|
|
932
|
-
const UnorderedListComponent = React.forwardRef((
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
} = _ref;
|
|
889
|
+
const UnorderedListComponent = React.forwardRef(({
|
|
890
|
+
size = 'medium',
|
|
891
|
+
type = 'disc',
|
|
892
|
+
...other
|
|
893
|
+
}, ref) => {
|
|
938
894
|
const value = React.useMemo(() => ({
|
|
939
895
|
size: size
|
|
940
896
|
}), [size]);
|
|
@@ -963,23 +919,20 @@ const IconComponent = props => React__default.default.createElement(StyledIcon,
|
|
|
963
919
|
IconComponent.displayName = 'Span.Icon';
|
|
964
920
|
const Icon = IconComponent;
|
|
965
921
|
|
|
966
|
-
const SpanComponent = React.forwardRef((
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
ref: ref
|
|
981
|
-
}, other));
|
|
982
|
-
});
|
|
922
|
+
const SpanComponent = React.forwardRef(({
|
|
923
|
+
hue,
|
|
924
|
+
isBold,
|
|
925
|
+
isMonospace,
|
|
926
|
+
tag = 'span',
|
|
927
|
+
...other
|
|
928
|
+
}, ref) => React__default.default.createElement(StyledFont, Object.assign({
|
|
929
|
+
$hue: hue,
|
|
930
|
+
$isBold: isBold,
|
|
931
|
+
$isMonospace: isMonospace,
|
|
932
|
+
$size: "inherit",
|
|
933
|
+
as: tag,
|
|
934
|
+
ref: ref
|
|
935
|
+
}, other)));
|
|
983
936
|
SpanComponent.displayName = 'Span';
|
|
984
937
|
SpanComponent.propTypes = {
|
|
985
938
|
tag: PropTypes__default.default.any,
|