@readme/markdown 6.75.0-beta.44 → 6.75.0-beta.46
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/components/Callout/index.tsx +2 -2
- package/components/Callout/style.scss +24 -16
- package/dist/main.js +4 -3
- package/dist/main.node.js +87 -781
- package/package.json +1 -1
|
@@ -31,9 +31,9 @@ const Callout = (props: Props) => {
|
|
|
31
31
|
<blockquote {...attributes} className={`callout callout_${theme}`} theme={icon}>
|
|
32
32
|
<h3 className={`callout-heading${empty ? ' empty' : ''}`}>
|
|
33
33
|
<span className="callout-icon">{icon}</span>
|
|
34
|
-
{empty || children[0]}
|
|
34
|
+
{empty || React.Children.toArray(children)[0]}
|
|
35
35
|
</h3>
|
|
36
|
-
{
|
|
36
|
+
{React.Children.toArray(children).slice(1)}
|
|
37
37
|
</blockquote>
|
|
38
38
|
);
|
|
39
39
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@mixin callout
|
|
1
|
+
@mixin callout($l-offset: 1.33rem) {
|
|
2
2
|
--background: #{lighten(#dfe2e5, 8.75%)};
|
|
3
3
|
--border: #{lighten(#6a737d, 12.5%)};
|
|
4
4
|
|
|
@@ -16,32 +16,37 @@
|
|
|
16
16
|
--border: #{lighten($color, 5%)}; // should be #5bc0de
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
&_warn,
|
|
19
|
+
&_warn,
|
|
20
|
+
&_warning {
|
|
20
21
|
$color: #eea236;
|
|
21
22
|
--background: #fcf8f2;
|
|
22
23
|
--title: #{$color};
|
|
23
24
|
--border: #{lighten($color, 5%)};
|
|
24
25
|
}
|
|
25
26
|
|
|
26
|
-
&_ok,
|
|
27
|
+
&_ok,
|
|
28
|
+
&_okay,
|
|
29
|
+
&_success {
|
|
27
30
|
$color: #489e49;
|
|
28
31
|
--background: #f3f8f3;
|
|
29
32
|
--title: #{$color};
|
|
30
33
|
--border: #{lighten($color, 5%)}; // should be #50af51
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
&_err,
|
|
36
|
+
&_err,
|
|
37
|
+
&_error {
|
|
34
38
|
$color: #d43f3a;
|
|
35
39
|
--background: #fdf7f7;
|
|
36
40
|
--title: #{$color};
|
|
37
|
-
--border: #{lighten($color, 5%)};
|
|
41
|
+
--border: #{lighten($color, 5%)}; // should be #d9534f
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
> * {
|
|
41
45
|
margin-left: $l-offset;
|
|
42
46
|
position: relative;
|
|
43
47
|
}
|
|
44
|
-
ul,
|
|
48
|
+
ul,
|
|
49
|
+
ol {
|
|
45
50
|
padding-left: 1.3em;
|
|
46
51
|
}
|
|
47
52
|
|
|
@@ -55,18 +60,20 @@
|
|
|
55
60
|
color: var(--text);
|
|
56
61
|
border-color: var(--border);
|
|
57
62
|
border-width: 3px;
|
|
58
|
-
padding: 0 0 0 .8em;
|
|
63
|
+
padding: 0 0 0 0.8em;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
.callout-heading {
|
|
62
67
|
color: var(--title, --text);
|
|
63
|
-
margin-bottom: calc(#{$l-offset} * .5);
|
|
68
|
+
margin-bottom: calc(#{$l-offset} * 0.5);
|
|
69
|
+
|
|
64
70
|
&:only-child {
|
|
65
71
|
margin-bottom: 0;
|
|
66
72
|
}
|
|
73
|
+
|
|
67
74
|
&.empty {
|
|
68
75
|
float: left;
|
|
69
|
-
margin-top: calc(#{$l-offset} * .5);
|
|
76
|
+
margin-top: calc(#{$l-offset} * 0.5);
|
|
70
77
|
.callout-icon {
|
|
71
78
|
line-height: 0;
|
|
72
79
|
}
|
|
@@ -85,8 +92,8 @@
|
|
|
85
92
|
}
|
|
86
93
|
.callout-icon {
|
|
87
94
|
float: left;
|
|
88
|
-
margin-left: calc(-#{$l-offset} - .5em);
|
|
89
|
-
margin-right:
|
|
95
|
+
margin-left: calc(-#{$l-offset} - 0.5em);
|
|
96
|
+
margin-right: -0.25rem;
|
|
90
97
|
}
|
|
91
98
|
}
|
|
92
99
|
@mixin calloutCustomIcons($R: callout) {
|
|
@@ -113,19 +120,19 @@
|
|
|
113
120
|
--emoji: unset;
|
|
114
121
|
&_okay {
|
|
115
122
|
/* thumbs up */
|
|
116
|
-
--icon:
|
|
123
|
+
--icon: '\f164';
|
|
117
124
|
}
|
|
118
125
|
&_info {
|
|
119
126
|
/* info circle */
|
|
120
|
-
--icon:
|
|
127
|
+
--icon: '\f05a';
|
|
121
128
|
}
|
|
122
129
|
&_warn {
|
|
123
130
|
/* warning triangle */
|
|
124
|
-
--icon:
|
|
131
|
+
--icon: '\f071';
|
|
125
132
|
}
|
|
126
133
|
&_error {
|
|
127
134
|
/* warning circle */
|
|
128
|
-
--icon:
|
|
135
|
+
--icon: '\f06a';
|
|
129
136
|
}
|
|
130
137
|
&_default {
|
|
131
138
|
/* warning circle */
|
|
@@ -135,7 +142,8 @@
|
|
|
135
142
|
}
|
|
136
143
|
|
|
137
144
|
.callout {
|
|
138
|
-
&.callout {
|
|
145
|
+
&.callout {
|
|
146
|
+
// bump specificity
|
|
139
147
|
@include callout;
|
|
140
148
|
}
|
|
141
149
|
@include calloutCustomIcons;
|
package/dist/main.js
CHANGED
|
@@ -60998,8 +60998,8 @@ const Callout = (props) => {
|
|
|
60998
60998
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("blockquote", Object.assign({}, attributes, { className: `callout callout_${theme}`, theme: icon }),
|
|
60999
60999
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("h3", { className: `callout-heading${empty ? ' empty' : ''}` },
|
|
61000
61000
|
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "callout-icon" }, icon),
|
|
61001
|
-
empty || children[0]),
|
|
61002
|
-
|
|
61001
|
+
empty || external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.Children.toArray(children)[0]),
|
|
61002
|
+
external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.Children.toArray(children).slice(1)));
|
|
61003
61003
|
};
|
|
61004
61004
|
/* harmony default export */ const components_Callout = (Callout);
|
|
61005
61005
|
|
|
@@ -61433,6 +61433,7 @@ const calloutTransformer = () => {
|
|
|
61433
61433
|
const [match, icon] = startText.match(callouts_regex) || [];
|
|
61434
61434
|
if (icon && match) {
|
|
61435
61435
|
const heading = startText.slice(match.length);
|
|
61436
|
+
const empty = !heading.length && node.children[0].children.length === 1;
|
|
61436
61437
|
node.children[0].children[0].value = heading;
|
|
61437
61438
|
Object.assign(node, {
|
|
61438
61439
|
type: NodeTypes.callout,
|
|
@@ -61440,7 +61441,7 @@ const calloutTransformer = () => {
|
|
|
61440
61441
|
hName: 'Callout',
|
|
61441
61442
|
hProperties: {
|
|
61442
61443
|
icon,
|
|
61443
|
-
empty
|
|
61444
|
+
empty,
|
|
61444
61445
|
},
|
|
61445
61446
|
},
|
|
61446
61447
|
});
|