@khanacademy/wonder-blocks-typography 3.1.3 → 3.2.0
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/CHANGELOG.md +12 -0
- package/dist/es/index.js +19 -355
- package/dist/index.js +19 -359
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-typography
|
|
2
2
|
|
|
3
|
+
## 3.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b9e4946: Update Typography components to use font tokens with REM units instead of pixels for user-scalable font-sizing and line-heights.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [b9e4946]
|
|
12
|
+
- @khanacademy/wonder-blocks-tokens@10.0.0
|
|
13
|
+
- @khanacademy/wonder-blocks-core@12.2.1
|
|
14
|
+
|
|
3
15
|
## 3.1.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/es/index.js
CHANGED
|
@@ -1,377 +1,41 @@
|
|
|
1
|
-
import _extends from '@babel/runtime/helpers/extends';
|
|
2
1
|
import { StyleSheet } from 'aphrodite';
|
|
3
|
-
import
|
|
2
|
+
import { font, breakpoint } from '@khanacademy/wonder-blocks-tokens';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { Text } from '@khanacademy/wonder-blocks-core';
|
|
6
6
|
|
|
7
|
-
const
|
|
8
|
-
const Bold = 700;
|
|
9
|
-
const Black = 900;
|
|
10
|
-
const mobile = "@media (max-width: 1023px)";
|
|
11
|
-
const desktop = "@media (min-width: 1024px)";
|
|
12
|
-
const common = {
|
|
13
|
-
display: "block"
|
|
14
|
-
};
|
|
15
|
-
const SansFamily = 'Lato, "Noto Sans", sans-serif';
|
|
16
|
-
const SerifFamily = '"Noto Serif", serif';
|
|
17
|
-
const InconsolataFamily = "Inconsolata, monospace";
|
|
18
|
-
const styles = StyleSheet.create({
|
|
19
|
-
Title: _extends({}, common, {
|
|
20
|
-
fontFamily: SansFamily,
|
|
21
|
-
fontWeight: Black,
|
|
22
|
-
[desktop]: {
|
|
23
|
-
fontSize: 36,
|
|
24
|
-
lineHeight: "40px"
|
|
25
|
-
},
|
|
26
|
-
[mobile]: {
|
|
27
|
-
fontSize: 28,
|
|
28
|
-
lineHeight: "32px"
|
|
29
|
-
}
|
|
30
|
-
}),
|
|
31
|
-
Tagline: _extends({}, common, {
|
|
32
|
-
fontFamily: SansFamily,
|
|
33
|
-
fontWeight: Regular,
|
|
34
|
-
fontSize: 20,
|
|
35
|
-
lineHeight: "24px"
|
|
36
|
-
}),
|
|
37
|
-
HeadingLarge: _extends({}, common, {
|
|
38
|
-
fontFamily: SansFamily,
|
|
39
|
-
fontWeight: Bold,
|
|
40
|
-
[desktop]: {
|
|
41
|
-
fontSize: 28,
|
|
42
|
-
lineHeight: "32px"
|
|
43
|
-
},
|
|
44
|
-
[mobile]: {
|
|
45
|
-
fontSize: 24,
|
|
46
|
-
lineHeight: "28px"
|
|
47
|
-
}
|
|
48
|
-
}),
|
|
49
|
-
HeadingMedium: _extends({}, common, {
|
|
50
|
-
fontFamily: SansFamily,
|
|
51
|
-
fontWeight: Bold,
|
|
52
|
-
[desktop]: {
|
|
53
|
-
fontSize: 24,
|
|
54
|
-
lineHeight: "28px"
|
|
55
|
-
},
|
|
56
|
-
[mobile]: {
|
|
57
|
-
fontSize: 22,
|
|
58
|
-
lineHeight: "26px"
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
HeadingSmall: _extends({}, common, {
|
|
62
|
-
fontFamily: SansFamily,
|
|
63
|
-
fontWeight: Bold,
|
|
64
|
-
fontSize: 20,
|
|
65
|
-
lineHeight: "24px"
|
|
66
|
-
}),
|
|
67
|
-
HeadingXSmall: _extends({}, common, {
|
|
68
|
-
fontFamily: SansFamily,
|
|
69
|
-
fontWeight: Bold,
|
|
70
|
-
fontSize: 12,
|
|
71
|
-
lineHeight: "16px",
|
|
72
|
-
letterSpacing: 0.6,
|
|
73
|
-
textTransform: "uppercase"
|
|
74
|
-
}),
|
|
75
|
-
BodySerifBlock: _extends({}, common, {
|
|
76
|
-
fontFamily: SerifFamily,
|
|
77
|
-
fontWeight: Regular,
|
|
78
|
-
fontSize: 22,
|
|
79
|
-
lineHeight: "28px"
|
|
80
|
-
}),
|
|
81
|
-
BodySerif: _extends({}, common, {
|
|
82
|
-
fontFamily: SerifFamily,
|
|
83
|
-
fontWeight: Regular,
|
|
84
|
-
fontSize: 18,
|
|
85
|
-
lineHeight: "22px"
|
|
86
|
-
}),
|
|
87
|
-
BodyMonospace: _extends({}, common, {
|
|
88
|
-
fontFamily: InconsolataFamily,
|
|
89
|
-
fontWeight: Regular,
|
|
90
|
-
fontSize: 17,
|
|
91
|
-
lineHeight: "22px"
|
|
92
|
-
}),
|
|
93
|
-
Body: _extends({}, common, {
|
|
94
|
-
fontFamily: SansFamily,
|
|
95
|
-
fontWeight: Regular,
|
|
96
|
-
fontSize: 16,
|
|
97
|
-
lineHeight: "22px"
|
|
98
|
-
}),
|
|
99
|
-
LabelLarge: _extends({}, common, {
|
|
100
|
-
fontFamily: SansFamily,
|
|
101
|
-
fontWeight: Bold,
|
|
102
|
-
fontSize: 16,
|
|
103
|
-
lineHeight: "20px"
|
|
104
|
-
}),
|
|
105
|
-
LabelMedium: _extends({}, common, {
|
|
106
|
-
fontFamily: SansFamily,
|
|
107
|
-
fontWeight: Regular,
|
|
108
|
-
fontSize: 16,
|
|
109
|
-
lineHeight: "20px"
|
|
110
|
-
}),
|
|
111
|
-
LabelSmall: _extends({}, common, {
|
|
112
|
-
fontFamily: SansFamily,
|
|
113
|
-
fontWeight: Regular,
|
|
114
|
-
fontSize: 14,
|
|
115
|
-
lineHeight: "18px"
|
|
116
|
-
}),
|
|
117
|
-
LabelXSmall: _extends({}, common, {
|
|
118
|
-
fontFamily: SansFamily,
|
|
119
|
-
fontWeight: Regular,
|
|
120
|
-
fontSize: 12,
|
|
121
|
-
lineHeight: "16px"
|
|
122
|
-
}),
|
|
123
|
-
Caption: _extends({}, common, {
|
|
124
|
-
fontFamily: SansFamily,
|
|
125
|
-
fontWeight: Regular,
|
|
126
|
-
fontSize: 14,
|
|
127
|
-
lineHeight: "20px"
|
|
128
|
-
}),
|
|
129
|
-
Footnote: _extends({}, common, {
|
|
130
|
-
fontFamily: SansFamily,
|
|
131
|
-
fontWeight: Regular,
|
|
132
|
-
fontSize: 12,
|
|
133
|
-
lineHeight: "18px"
|
|
134
|
-
})
|
|
135
|
-
});
|
|
7
|
+
const common={display:"block"};const styles=StyleSheet.create({Title:{...common,fontFamily:font.family.sans,fontWeight:font.weight.black,[breakpoint.mediaQuery.xl]:{fontSize:font.size.xxxLarge,lineHeight:font.lineHeight.xxxLarge},[breakpoint.mediaQuery.mdOrSmaller]:{fontSize:font.size.xxLarge,lineHeight:font.lineHeight.xxLarge}},Tagline:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.large,lineHeight:font.lineHeight.large},HeadingLarge:{...common,fontFamily:font.family.sans,fontWeight:font.weight.bold,[breakpoint.mediaQuery.xl]:{fontSize:font.size.xxLarge,lineHeight:font.lineHeight.xxLarge},[breakpoint.mediaQuery.mdOrSmaller]:{fontSize:font.size.xLarge,lineHeight:font.lineHeight.xLarge}},HeadingMedium:{...common,fontFamily:font.family.sans,fontWeight:font.weight.bold,[breakpoint.mediaQuery.xl]:{fontSize:font.size.xLarge,lineHeight:font.lineHeight.xLarge},[breakpoint.mediaQuery.mdOrSmaller]:{fontSize:"2.2rem",lineHeight:"2.6rem"}},HeadingSmall:{...common,fontFamily:font.family.sans,fontWeight:font.weight.bold,fontSize:font.size.large,lineHeight:font.lineHeight.large},HeadingXSmall:{...common,fontFamily:font.family.sans,fontWeight:font.weight.bold,fontSize:font.size.xSmall,lineHeight:font.lineHeight.xSmall,letterSpacing:.6,textTransform:"uppercase"},BodySerifBlock:{...common,fontFamily:font.family.serif,fontWeight:font.weight.regular,fontSize:font.size.large,lineHeight:font.lineHeight.large},BodySerif:{...common,fontFamily:font.family.serif,fontWeight:font.weight.regular,fontSize:font.size.medium,lineHeight:font.size.medium},BodyMonospace:{...common,fontFamily:font.family.mono,fontWeight:font.weight.regular,fontSize:font.size.medium,lineHeight:font.lineHeight.medium},Body:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.medium,lineHeight:font.lineHeight.xMedium},LabelLarge:{...common,fontFamily:font.family.sans,fontWeight:font.weight.bold,fontSize:font.size.medium,lineHeight:font.lineHeight.medium},LabelMedium:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.medium,lineHeight:font.lineHeight.medium},LabelSmall:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.small,lineHeight:font.lineHeight.small},LabelXSmall:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.xSmall,lineHeight:font.lineHeight.xSmall},Caption:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.small,lineHeight:font.lineHeight.medium},Footnote:{...common,fontFamily:font.family.sans,fontWeight:font.weight.regular,fontSize:font.size.xSmall,lineHeight:font.lineHeight.small}});
|
|
136
8
|
|
|
137
|
-
const
|
|
138
|
-
const Title = React.forwardRef(function Title(_ref, ref) {
|
|
139
|
-
let {
|
|
140
|
-
style,
|
|
141
|
-
children,
|
|
142
|
-
tag = "h1"
|
|
143
|
-
} = _ref,
|
|
144
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$f);
|
|
145
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
146
|
-
tag: tag,
|
|
147
|
-
style: [styles.Title, style],
|
|
148
|
-
ref: ref
|
|
149
|
-
}), children);
|
|
150
|
-
});
|
|
9
|
+
const Title=React.forwardRef(function Title({style,children,tag="h1",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.Title,style],ref:ref,children:children})});
|
|
151
10
|
|
|
152
|
-
const
|
|
153
|
-
const HeadingLarge = React.forwardRef(function HeadingLarge(_ref, ref) {
|
|
154
|
-
let {
|
|
155
|
-
style,
|
|
156
|
-
children,
|
|
157
|
-
tag = "h2"
|
|
158
|
-
} = _ref,
|
|
159
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$e);
|
|
160
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
161
|
-
tag: tag,
|
|
162
|
-
style: [styles.HeadingLarge, style],
|
|
163
|
-
ref: ref
|
|
164
|
-
}), children);
|
|
165
|
-
});
|
|
11
|
+
const HeadingLarge=React.forwardRef(function HeadingLarge({style,children,tag="h2",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.HeadingLarge,style],ref:ref,children:children})});
|
|
166
12
|
|
|
167
|
-
const
|
|
168
|
-
const HeadingMedium = React.forwardRef(function HeadingMedium(_ref, ref) {
|
|
169
|
-
let {
|
|
170
|
-
style,
|
|
171
|
-
children,
|
|
172
|
-
tag = "h3"
|
|
173
|
-
} = _ref,
|
|
174
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$d);
|
|
175
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
176
|
-
tag: tag,
|
|
177
|
-
style: [styles.HeadingMedium, style],
|
|
178
|
-
ref: ref
|
|
179
|
-
}), children);
|
|
180
|
-
});
|
|
13
|
+
const HeadingMedium=React.forwardRef(function HeadingMedium({style,children,tag="h3",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.HeadingMedium,style],ref:ref,children:children})});
|
|
181
14
|
|
|
182
|
-
const
|
|
183
|
-
const HeadingSmall = React.forwardRef(function HeadingSmall(_ref, ref) {
|
|
184
|
-
let {
|
|
185
|
-
style,
|
|
186
|
-
children,
|
|
187
|
-
tag = "h4"
|
|
188
|
-
} = _ref,
|
|
189
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
190
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
191
|
-
tag: tag,
|
|
192
|
-
style: [styles.HeadingSmall, style],
|
|
193
|
-
ref: ref
|
|
194
|
-
}), children);
|
|
195
|
-
});
|
|
15
|
+
const HeadingSmall=React.forwardRef(function HeadingSmall({style,children,tag="h4",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.HeadingSmall,style],ref:ref,children:children})});
|
|
196
16
|
|
|
197
|
-
const
|
|
198
|
-
const HeadingXSmall = React.forwardRef(function HeadingXSmall(_ref, ref) {
|
|
199
|
-
let {
|
|
200
|
-
style,
|
|
201
|
-
children,
|
|
202
|
-
tag = "h4"
|
|
203
|
-
} = _ref,
|
|
204
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
205
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
206
|
-
tag: tag,
|
|
207
|
-
style: [styles.HeadingXSmall, style],
|
|
208
|
-
ref: ref
|
|
209
|
-
}), children);
|
|
210
|
-
});
|
|
17
|
+
const HeadingXSmall=React.forwardRef(function HeadingXSmall({style,children,tag="h4",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.HeadingXSmall,style],ref:ref,children:children})});
|
|
211
18
|
|
|
212
|
-
const
|
|
213
|
-
const BodySerifBlock = React.forwardRef(function BodySerifBlock(_ref, ref) {
|
|
214
|
-
let {
|
|
215
|
-
style,
|
|
216
|
-
children,
|
|
217
|
-
tag = "span"
|
|
218
|
-
} = _ref,
|
|
219
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
220
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
221
|
-
tag: tag,
|
|
222
|
-
style: [styles.BodySerifBlock, style],
|
|
223
|
-
ref: ref
|
|
224
|
-
}), children);
|
|
225
|
-
});
|
|
19
|
+
const BodySerifBlock=React.forwardRef(function BodySerifBlock({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.BodySerifBlock,style],ref:ref,children:children})});
|
|
226
20
|
|
|
227
|
-
const
|
|
228
|
-
const BodySerif = React.forwardRef(function BodySerif(_ref, ref) {
|
|
229
|
-
let {
|
|
230
|
-
style,
|
|
231
|
-
children,
|
|
232
|
-
tag = "span"
|
|
233
|
-
} = _ref,
|
|
234
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
235
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
236
|
-
tag: tag,
|
|
237
|
-
style: [styles.BodySerif, style],
|
|
238
|
-
ref: ref
|
|
239
|
-
}), children);
|
|
240
|
-
});
|
|
21
|
+
const BodySerif=React.forwardRef(function BodySerif({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.BodySerif,style],ref:ref,children:children})});
|
|
241
22
|
|
|
242
|
-
const
|
|
243
|
-
const BodyMonospace = React.forwardRef(function BodyMonospace(_ref, ref) {
|
|
244
|
-
let {
|
|
245
|
-
style,
|
|
246
|
-
children,
|
|
247
|
-
tag = "span"
|
|
248
|
-
} = _ref,
|
|
249
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
250
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
251
|
-
tag: tag,
|
|
252
|
-
style: [styles.BodyMonospace, style],
|
|
253
|
-
ref: ref
|
|
254
|
-
}), children);
|
|
255
|
-
});
|
|
23
|
+
const BodyMonospace=React.forwardRef(function BodyMonospace({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.BodyMonospace,style],ref:ref,children:children})});
|
|
256
24
|
|
|
257
|
-
const
|
|
258
|
-
const Body = React.forwardRef(function Body(_ref, ref) {
|
|
259
|
-
let {
|
|
260
|
-
style,
|
|
261
|
-
children,
|
|
262
|
-
tag = "span"
|
|
263
|
-
} = _ref,
|
|
264
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
265
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
266
|
-
tag: tag,
|
|
267
|
-
style: [styles.Body, style],
|
|
268
|
-
ref: ref
|
|
269
|
-
}), children);
|
|
270
|
-
});
|
|
25
|
+
const Body=React.forwardRef(function Body({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.Body,style],ref:ref,children:children})});
|
|
271
26
|
|
|
272
|
-
const
|
|
273
|
-
const LabelLarge = React.forwardRef(function LabelLarge(_ref, ref) {
|
|
274
|
-
let {
|
|
275
|
-
style,
|
|
276
|
-
children,
|
|
277
|
-
tag = "span"
|
|
278
|
-
} = _ref,
|
|
279
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
280
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
281
|
-
tag: tag,
|
|
282
|
-
style: [styles.LabelLarge, style],
|
|
283
|
-
ref: ref
|
|
284
|
-
}), children);
|
|
285
|
-
});
|
|
27
|
+
const LabelLarge=React.forwardRef(function LabelLarge({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.LabelLarge,style],ref:ref,children:children})});
|
|
286
28
|
|
|
287
|
-
const
|
|
288
|
-
const LabelMedium = React.forwardRef(function LabelMedium(_ref, ref) {
|
|
289
|
-
let {
|
|
290
|
-
style,
|
|
291
|
-
children,
|
|
292
|
-
tag = "span"
|
|
293
|
-
} = _ref,
|
|
294
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
295
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
296
|
-
tag: tag,
|
|
297
|
-
style: [styles.LabelMedium, style],
|
|
298
|
-
ref: ref
|
|
299
|
-
}), children);
|
|
300
|
-
});
|
|
29
|
+
const LabelMedium=React.forwardRef(function LabelMedium({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.LabelMedium,style],ref:ref,children:children})});
|
|
301
30
|
|
|
302
|
-
const
|
|
303
|
-
const LabelSmall = React.forwardRef(function LabelSmall(_ref, ref) {
|
|
304
|
-
let {
|
|
305
|
-
style,
|
|
306
|
-
children,
|
|
307
|
-
tag = "span"
|
|
308
|
-
} = _ref,
|
|
309
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
310
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
311
|
-
tag: tag,
|
|
312
|
-
style: [styles.LabelSmall, style],
|
|
313
|
-
ref: ref
|
|
314
|
-
}), children);
|
|
315
|
-
});
|
|
31
|
+
const LabelSmall=React.forwardRef(function LabelSmall({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.LabelSmall,style],ref:ref,children:children})});
|
|
316
32
|
|
|
317
|
-
const
|
|
318
|
-
const LabelXSmall = React.forwardRef(function LabelXSmall(_ref, ref) {
|
|
319
|
-
let {
|
|
320
|
-
style,
|
|
321
|
-
children,
|
|
322
|
-
tag = "span"
|
|
323
|
-
} = _ref,
|
|
324
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
325
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
326
|
-
tag: tag,
|
|
327
|
-
style: [styles.LabelXSmall, style],
|
|
328
|
-
ref: ref
|
|
329
|
-
}), children);
|
|
330
|
-
});
|
|
33
|
+
const LabelXSmall=React.forwardRef(function LabelXSmall({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.LabelXSmall,style],ref:ref,children:children})});
|
|
331
34
|
|
|
332
|
-
const
|
|
333
|
-
const Tagline = React.forwardRef(function Tagline(_ref, ref) {
|
|
334
|
-
let {
|
|
335
|
-
style,
|
|
336
|
-
children,
|
|
337
|
-
tag = "span"
|
|
338
|
-
} = _ref,
|
|
339
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
340
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
341
|
-
tag: tag,
|
|
342
|
-
style: [styles.Tagline, style],
|
|
343
|
-
ref: ref
|
|
344
|
-
}), children);
|
|
345
|
-
});
|
|
35
|
+
const Tagline=React.forwardRef(function Tagline({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.Tagline,style],ref:ref,children:children})});
|
|
346
36
|
|
|
347
|
-
const
|
|
348
|
-
const Caption = React.forwardRef(function Caption(_ref, ref) {
|
|
349
|
-
let {
|
|
350
|
-
style,
|
|
351
|
-
children,
|
|
352
|
-
tag = "span"
|
|
353
|
-
} = _ref,
|
|
354
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
355
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
356
|
-
tag: tag,
|
|
357
|
-
style: [styles.Caption, style],
|
|
358
|
-
ref: ref
|
|
359
|
-
}), children);
|
|
360
|
-
});
|
|
37
|
+
const Caption=React.forwardRef(function Caption({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.Caption,style],ref:ref,children:children})});
|
|
361
38
|
|
|
362
|
-
const
|
|
363
|
-
const Footnote = React.forwardRef(function Footnote(_ref, ref) {
|
|
364
|
-
let {
|
|
365
|
-
style,
|
|
366
|
-
children,
|
|
367
|
-
tag = "span"
|
|
368
|
-
} = _ref,
|
|
369
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
370
|
-
return React.createElement(Text, _extends({}, otherProps, {
|
|
371
|
-
tag: tag,
|
|
372
|
-
style: [styles.Footnote, style],
|
|
373
|
-
ref: ref
|
|
374
|
-
}), children);
|
|
375
|
-
});
|
|
39
|
+
const Footnote=React.forwardRef(function Footnote({style,children,tag="span",...otherProps},ref){return jsx(Text,{...otherProps,tag:tag,style:[styles.Footnote,style],ref:ref,children:children})});
|
|
376
40
|
|
|
377
41
|
export { Body, BodyMonospace, BodySerif, BodySerifBlock, Caption, Footnote, HeadingLarge, HeadingMedium, HeadingSmall, HeadingXSmall, LabelLarge, LabelMedium, LabelSmall, LabelXSmall, Tagline, Title, styles };
|
package/dist/index.js
CHANGED
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _extends = require('@babel/runtime/helpers/extends');
|
|
6
5
|
var aphrodite = require('aphrodite');
|
|
7
|
-
var
|
|
6
|
+
var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
|
|
10
10
|
|
|
11
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
|
-
|
|
13
11
|
function _interopNamespace(e) {
|
|
14
12
|
if (e && e.__esModule) return e;
|
|
15
13
|
var n = Object.create(null);
|
|
@@ -28,379 +26,41 @@ function _interopNamespace(e) {
|
|
|
28
26
|
return Object.freeze(n);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
32
|
-
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
|
|
33
29
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
34
30
|
|
|
35
|
-
const
|
|
36
|
-
const Bold = 700;
|
|
37
|
-
const Black = 900;
|
|
38
|
-
const mobile = "@media (max-width: 1023px)";
|
|
39
|
-
const desktop = "@media (min-width: 1024px)";
|
|
40
|
-
const common = {
|
|
41
|
-
display: "block"
|
|
42
|
-
};
|
|
43
|
-
const SansFamily = 'Lato, "Noto Sans", sans-serif';
|
|
44
|
-
const SerifFamily = '"Noto Serif", serif';
|
|
45
|
-
const InconsolataFamily = "Inconsolata, monospace";
|
|
46
|
-
const styles = aphrodite.StyleSheet.create({
|
|
47
|
-
Title: _extends__default["default"]({}, common, {
|
|
48
|
-
fontFamily: SansFamily,
|
|
49
|
-
fontWeight: Black,
|
|
50
|
-
[desktop]: {
|
|
51
|
-
fontSize: 36,
|
|
52
|
-
lineHeight: "40px"
|
|
53
|
-
},
|
|
54
|
-
[mobile]: {
|
|
55
|
-
fontSize: 28,
|
|
56
|
-
lineHeight: "32px"
|
|
57
|
-
}
|
|
58
|
-
}),
|
|
59
|
-
Tagline: _extends__default["default"]({}, common, {
|
|
60
|
-
fontFamily: SansFamily,
|
|
61
|
-
fontWeight: Regular,
|
|
62
|
-
fontSize: 20,
|
|
63
|
-
lineHeight: "24px"
|
|
64
|
-
}),
|
|
65
|
-
HeadingLarge: _extends__default["default"]({}, common, {
|
|
66
|
-
fontFamily: SansFamily,
|
|
67
|
-
fontWeight: Bold,
|
|
68
|
-
[desktop]: {
|
|
69
|
-
fontSize: 28,
|
|
70
|
-
lineHeight: "32px"
|
|
71
|
-
},
|
|
72
|
-
[mobile]: {
|
|
73
|
-
fontSize: 24,
|
|
74
|
-
lineHeight: "28px"
|
|
75
|
-
}
|
|
76
|
-
}),
|
|
77
|
-
HeadingMedium: _extends__default["default"]({}, common, {
|
|
78
|
-
fontFamily: SansFamily,
|
|
79
|
-
fontWeight: Bold,
|
|
80
|
-
[desktop]: {
|
|
81
|
-
fontSize: 24,
|
|
82
|
-
lineHeight: "28px"
|
|
83
|
-
},
|
|
84
|
-
[mobile]: {
|
|
85
|
-
fontSize: 22,
|
|
86
|
-
lineHeight: "26px"
|
|
87
|
-
}
|
|
88
|
-
}),
|
|
89
|
-
HeadingSmall: _extends__default["default"]({}, common, {
|
|
90
|
-
fontFamily: SansFamily,
|
|
91
|
-
fontWeight: Bold,
|
|
92
|
-
fontSize: 20,
|
|
93
|
-
lineHeight: "24px"
|
|
94
|
-
}),
|
|
95
|
-
HeadingXSmall: _extends__default["default"]({}, common, {
|
|
96
|
-
fontFamily: SansFamily,
|
|
97
|
-
fontWeight: Bold,
|
|
98
|
-
fontSize: 12,
|
|
99
|
-
lineHeight: "16px",
|
|
100
|
-
letterSpacing: 0.6,
|
|
101
|
-
textTransform: "uppercase"
|
|
102
|
-
}),
|
|
103
|
-
BodySerifBlock: _extends__default["default"]({}, common, {
|
|
104
|
-
fontFamily: SerifFamily,
|
|
105
|
-
fontWeight: Regular,
|
|
106
|
-
fontSize: 22,
|
|
107
|
-
lineHeight: "28px"
|
|
108
|
-
}),
|
|
109
|
-
BodySerif: _extends__default["default"]({}, common, {
|
|
110
|
-
fontFamily: SerifFamily,
|
|
111
|
-
fontWeight: Regular,
|
|
112
|
-
fontSize: 18,
|
|
113
|
-
lineHeight: "22px"
|
|
114
|
-
}),
|
|
115
|
-
BodyMonospace: _extends__default["default"]({}, common, {
|
|
116
|
-
fontFamily: InconsolataFamily,
|
|
117
|
-
fontWeight: Regular,
|
|
118
|
-
fontSize: 17,
|
|
119
|
-
lineHeight: "22px"
|
|
120
|
-
}),
|
|
121
|
-
Body: _extends__default["default"]({}, common, {
|
|
122
|
-
fontFamily: SansFamily,
|
|
123
|
-
fontWeight: Regular,
|
|
124
|
-
fontSize: 16,
|
|
125
|
-
lineHeight: "22px"
|
|
126
|
-
}),
|
|
127
|
-
LabelLarge: _extends__default["default"]({}, common, {
|
|
128
|
-
fontFamily: SansFamily,
|
|
129
|
-
fontWeight: Bold,
|
|
130
|
-
fontSize: 16,
|
|
131
|
-
lineHeight: "20px"
|
|
132
|
-
}),
|
|
133
|
-
LabelMedium: _extends__default["default"]({}, common, {
|
|
134
|
-
fontFamily: SansFamily,
|
|
135
|
-
fontWeight: Regular,
|
|
136
|
-
fontSize: 16,
|
|
137
|
-
lineHeight: "20px"
|
|
138
|
-
}),
|
|
139
|
-
LabelSmall: _extends__default["default"]({}, common, {
|
|
140
|
-
fontFamily: SansFamily,
|
|
141
|
-
fontWeight: Regular,
|
|
142
|
-
fontSize: 14,
|
|
143
|
-
lineHeight: "18px"
|
|
144
|
-
}),
|
|
145
|
-
LabelXSmall: _extends__default["default"]({}, common, {
|
|
146
|
-
fontFamily: SansFamily,
|
|
147
|
-
fontWeight: Regular,
|
|
148
|
-
fontSize: 12,
|
|
149
|
-
lineHeight: "16px"
|
|
150
|
-
}),
|
|
151
|
-
Caption: _extends__default["default"]({}, common, {
|
|
152
|
-
fontFamily: SansFamily,
|
|
153
|
-
fontWeight: Regular,
|
|
154
|
-
fontSize: 14,
|
|
155
|
-
lineHeight: "20px"
|
|
156
|
-
}),
|
|
157
|
-
Footnote: _extends__default["default"]({}, common, {
|
|
158
|
-
fontFamily: SansFamily,
|
|
159
|
-
fontWeight: Regular,
|
|
160
|
-
fontSize: 12,
|
|
161
|
-
lineHeight: "18px"
|
|
162
|
-
})
|
|
163
|
-
});
|
|
31
|
+
const common={display:"block"};const styles=aphrodite.StyleSheet.create({Title:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.black,[wonderBlocksTokens.breakpoint.mediaQuery.xl]:{fontSize:wonderBlocksTokens.font.size.xxxLarge,lineHeight:wonderBlocksTokens.font.lineHeight.xxxLarge},[wonderBlocksTokens.breakpoint.mediaQuery.mdOrSmaller]:{fontSize:wonderBlocksTokens.font.size.xxLarge,lineHeight:wonderBlocksTokens.font.lineHeight.xxLarge}},Tagline:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.large,lineHeight:wonderBlocksTokens.font.lineHeight.large},HeadingLarge:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.bold,[wonderBlocksTokens.breakpoint.mediaQuery.xl]:{fontSize:wonderBlocksTokens.font.size.xxLarge,lineHeight:wonderBlocksTokens.font.lineHeight.xxLarge},[wonderBlocksTokens.breakpoint.mediaQuery.mdOrSmaller]:{fontSize:wonderBlocksTokens.font.size.xLarge,lineHeight:wonderBlocksTokens.font.lineHeight.xLarge}},HeadingMedium:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.bold,[wonderBlocksTokens.breakpoint.mediaQuery.xl]:{fontSize:wonderBlocksTokens.font.size.xLarge,lineHeight:wonderBlocksTokens.font.lineHeight.xLarge},[wonderBlocksTokens.breakpoint.mediaQuery.mdOrSmaller]:{fontSize:"2.2rem",lineHeight:"2.6rem"}},HeadingSmall:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.bold,fontSize:wonderBlocksTokens.font.size.large,lineHeight:wonderBlocksTokens.font.lineHeight.large},HeadingXSmall:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.bold,fontSize:wonderBlocksTokens.font.size.xSmall,lineHeight:wonderBlocksTokens.font.lineHeight.xSmall,letterSpacing:.6,textTransform:"uppercase"},BodySerifBlock:{...common,fontFamily:wonderBlocksTokens.font.family.serif,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.large,lineHeight:wonderBlocksTokens.font.lineHeight.large},BodySerif:{...common,fontFamily:wonderBlocksTokens.font.family.serif,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.medium,lineHeight:wonderBlocksTokens.font.size.medium},BodyMonospace:{...common,fontFamily:wonderBlocksTokens.font.family.mono,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.medium,lineHeight:wonderBlocksTokens.font.lineHeight.medium},Body:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.medium,lineHeight:wonderBlocksTokens.font.lineHeight.xMedium},LabelLarge:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.bold,fontSize:wonderBlocksTokens.font.size.medium,lineHeight:wonderBlocksTokens.font.lineHeight.medium},LabelMedium:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.medium,lineHeight:wonderBlocksTokens.font.lineHeight.medium},LabelSmall:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.small,lineHeight:wonderBlocksTokens.font.lineHeight.small},LabelXSmall:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.xSmall,lineHeight:wonderBlocksTokens.font.lineHeight.xSmall},Caption:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.small,lineHeight:wonderBlocksTokens.font.lineHeight.medium},Footnote:{...common,fontFamily:wonderBlocksTokens.font.family.sans,fontWeight:wonderBlocksTokens.font.weight.regular,fontSize:wonderBlocksTokens.font.size.xSmall,lineHeight:wonderBlocksTokens.font.lineHeight.small}});
|
|
164
32
|
|
|
165
|
-
const
|
|
166
|
-
const Title = React__namespace.forwardRef(function Title(_ref, ref) {
|
|
167
|
-
let {
|
|
168
|
-
style,
|
|
169
|
-
children,
|
|
170
|
-
tag = "h1"
|
|
171
|
-
} = _ref,
|
|
172
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$f);
|
|
173
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
174
|
-
tag: tag,
|
|
175
|
-
style: [styles.Title, style],
|
|
176
|
-
ref: ref
|
|
177
|
-
}), children);
|
|
178
|
-
});
|
|
33
|
+
const Title=React__namespace.forwardRef(function Title({style,children,tag="h1",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.Title,style],ref:ref,children:children})});
|
|
179
34
|
|
|
180
|
-
const
|
|
181
|
-
const HeadingLarge = React__namespace.forwardRef(function HeadingLarge(_ref, ref) {
|
|
182
|
-
let {
|
|
183
|
-
style,
|
|
184
|
-
children,
|
|
185
|
-
tag = "h2"
|
|
186
|
-
} = _ref,
|
|
187
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$e);
|
|
188
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
189
|
-
tag: tag,
|
|
190
|
-
style: [styles.HeadingLarge, style],
|
|
191
|
-
ref: ref
|
|
192
|
-
}), children);
|
|
193
|
-
});
|
|
35
|
+
const HeadingLarge=React__namespace.forwardRef(function HeadingLarge({style,children,tag="h2",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.HeadingLarge,style],ref:ref,children:children})});
|
|
194
36
|
|
|
195
|
-
const
|
|
196
|
-
const HeadingMedium = React__namespace.forwardRef(function HeadingMedium(_ref, ref) {
|
|
197
|
-
let {
|
|
198
|
-
style,
|
|
199
|
-
children,
|
|
200
|
-
tag = "h3"
|
|
201
|
-
} = _ref,
|
|
202
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$d);
|
|
203
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
204
|
-
tag: tag,
|
|
205
|
-
style: [styles.HeadingMedium, style],
|
|
206
|
-
ref: ref
|
|
207
|
-
}), children);
|
|
208
|
-
});
|
|
37
|
+
const HeadingMedium=React__namespace.forwardRef(function HeadingMedium({style,children,tag="h3",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.HeadingMedium,style],ref:ref,children:children})});
|
|
209
38
|
|
|
210
|
-
const
|
|
211
|
-
const HeadingSmall = React__namespace.forwardRef(function HeadingSmall(_ref, ref) {
|
|
212
|
-
let {
|
|
213
|
-
style,
|
|
214
|
-
children,
|
|
215
|
-
tag = "h4"
|
|
216
|
-
} = _ref,
|
|
217
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$c);
|
|
218
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
219
|
-
tag: tag,
|
|
220
|
-
style: [styles.HeadingSmall, style],
|
|
221
|
-
ref: ref
|
|
222
|
-
}), children);
|
|
223
|
-
});
|
|
39
|
+
const HeadingSmall=React__namespace.forwardRef(function HeadingSmall({style,children,tag="h4",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.HeadingSmall,style],ref:ref,children:children})});
|
|
224
40
|
|
|
225
|
-
const
|
|
226
|
-
const HeadingXSmall = React__namespace.forwardRef(function HeadingXSmall(_ref, ref) {
|
|
227
|
-
let {
|
|
228
|
-
style,
|
|
229
|
-
children,
|
|
230
|
-
tag = "h4"
|
|
231
|
-
} = _ref,
|
|
232
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$b);
|
|
233
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
234
|
-
tag: tag,
|
|
235
|
-
style: [styles.HeadingXSmall, style],
|
|
236
|
-
ref: ref
|
|
237
|
-
}), children);
|
|
238
|
-
});
|
|
41
|
+
const HeadingXSmall=React__namespace.forwardRef(function HeadingXSmall({style,children,tag="h4",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.HeadingXSmall,style],ref:ref,children:children})});
|
|
239
42
|
|
|
240
|
-
const
|
|
241
|
-
const BodySerifBlock = React__namespace.forwardRef(function BodySerifBlock(_ref, ref) {
|
|
242
|
-
let {
|
|
243
|
-
style,
|
|
244
|
-
children,
|
|
245
|
-
tag = "span"
|
|
246
|
-
} = _ref,
|
|
247
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$a);
|
|
248
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
249
|
-
tag: tag,
|
|
250
|
-
style: [styles.BodySerifBlock, style],
|
|
251
|
-
ref: ref
|
|
252
|
-
}), children);
|
|
253
|
-
});
|
|
43
|
+
const BodySerifBlock=React__namespace.forwardRef(function BodySerifBlock({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.BodySerifBlock,style],ref:ref,children:children})});
|
|
254
44
|
|
|
255
|
-
const
|
|
256
|
-
const BodySerif = React__namespace.forwardRef(function BodySerif(_ref, ref) {
|
|
257
|
-
let {
|
|
258
|
-
style,
|
|
259
|
-
children,
|
|
260
|
-
tag = "span"
|
|
261
|
-
} = _ref,
|
|
262
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$9);
|
|
263
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
264
|
-
tag: tag,
|
|
265
|
-
style: [styles.BodySerif, style],
|
|
266
|
-
ref: ref
|
|
267
|
-
}), children);
|
|
268
|
-
});
|
|
45
|
+
const BodySerif=React__namespace.forwardRef(function BodySerif({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.BodySerif,style],ref:ref,children:children})});
|
|
269
46
|
|
|
270
|
-
const
|
|
271
|
-
const BodyMonospace = React__namespace.forwardRef(function BodyMonospace(_ref, ref) {
|
|
272
|
-
let {
|
|
273
|
-
style,
|
|
274
|
-
children,
|
|
275
|
-
tag = "span"
|
|
276
|
-
} = _ref,
|
|
277
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$8);
|
|
278
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
279
|
-
tag: tag,
|
|
280
|
-
style: [styles.BodyMonospace, style],
|
|
281
|
-
ref: ref
|
|
282
|
-
}), children);
|
|
283
|
-
});
|
|
47
|
+
const BodyMonospace=React__namespace.forwardRef(function BodyMonospace({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.BodyMonospace,style],ref:ref,children:children})});
|
|
284
48
|
|
|
285
|
-
const
|
|
286
|
-
const Body = React__namespace.forwardRef(function Body(_ref, ref) {
|
|
287
|
-
let {
|
|
288
|
-
style,
|
|
289
|
-
children,
|
|
290
|
-
tag = "span"
|
|
291
|
-
} = _ref,
|
|
292
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$7);
|
|
293
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
294
|
-
tag: tag,
|
|
295
|
-
style: [styles.Body, style],
|
|
296
|
-
ref: ref
|
|
297
|
-
}), children);
|
|
298
|
-
});
|
|
49
|
+
const Body=React__namespace.forwardRef(function Body({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.Body,style],ref:ref,children:children})});
|
|
299
50
|
|
|
300
|
-
const
|
|
301
|
-
const LabelLarge = React__namespace.forwardRef(function LabelLarge(_ref, ref) {
|
|
302
|
-
let {
|
|
303
|
-
style,
|
|
304
|
-
children,
|
|
305
|
-
tag = "span"
|
|
306
|
-
} = _ref,
|
|
307
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$6);
|
|
308
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
309
|
-
tag: tag,
|
|
310
|
-
style: [styles.LabelLarge, style],
|
|
311
|
-
ref: ref
|
|
312
|
-
}), children);
|
|
313
|
-
});
|
|
51
|
+
const LabelLarge=React__namespace.forwardRef(function LabelLarge({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.LabelLarge,style],ref:ref,children:children})});
|
|
314
52
|
|
|
315
|
-
const
|
|
316
|
-
const LabelMedium = React__namespace.forwardRef(function LabelMedium(_ref, ref) {
|
|
317
|
-
let {
|
|
318
|
-
style,
|
|
319
|
-
children,
|
|
320
|
-
tag = "span"
|
|
321
|
-
} = _ref,
|
|
322
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$5);
|
|
323
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
324
|
-
tag: tag,
|
|
325
|
-
style: [styles.LabelMedium, style],
|
|
326
|
-
ref: ref
|
|
327
|
-
}), children);
|
|
328
|
-
});
|
|
53
|
+
const LabelMedium=React__namespace.forwardRef(function LabelMedium({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.LabelMedium,style],ref:ref,children:children})});
|
|
329
54
|
|
|
330
|
-
const
|
|
331
|
-
const LabelSmall = React__namespace.forwardRef(function LabelSmall(_ref, ref) {
|
|
332
|
-
let {
|
|
333
|
-
style,
|
|
334
|
-
children,
|
|
335
|
-
tag = "span"
|
|
336
|
-
} = _ref,
|
|
337
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$4);
|
|
338
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
339
|
-
tag: tag,
|
|
340
|
-
style: [styles.LabelSmall, style],
|
|
341
|
-
ref: ref
|
|
342
|
-
}), children);
|
|
343
|
-
});
|
|
55
|
+
const LabelSmall=React__namespace.forwardRef(function LabelSmall({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.LabelSmall,style],ref:ref,children:children})});
|
|
344
56
|
|
|
345
|
-
const
|
|
346
|
-
const LabelXSmall = React__namespace.forwardRef(function LabelXSmall(_ref, ref) {
|
|
347
|
-
let {
|
|
348
|
-
style,
|
|
349
|
-
children,
|
|
350
|
-
tag = "span"
|
|
351
|
-
} = _ref,
|
|
352
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$3);
|
|
353
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
354
|
-
tag: tag,
|
|
355
|
-
style: [styles.LabelXSmall, style],
|
|
356
|
-
ref: ref
|
|
357
|
-
}), children);
|
|
358
|
-
});
|
|
57
|
+
const LabelXSmall=React__namespace.forwardRef(function LabelXSmall({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.LabelXSmall,style],ref:ref,children:children})});
|
|
359
58
|
|
|
360
|
-
const
|
|
361
|
-
const Tagline = React__namespace.forwardRef(function Tagline(_ref, ref) {
|
|
362
|
-
let {
|
|
363
|
-
style,
|
|
364
|
-
children,
|
|
365
|
-
tag = "span"
|
|
366
|
-
} = _ref,
|
|
367
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$2);
|
|
368
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
369
|
-
tag: tag,
|
|
370
|
-
style: [styles.Tagline, style],
|
|
371
|
-
ref: ref
|
|
372
|
-
}), children);
|
|
373
|
-
});
|
|
59
|
+
const Tagline=React__namespace.forwardRef(function Tagline({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.Tagline,style],ref:ref,children:children})});
|
|
374
60
|
|
|
375
|
-
const
|
|
376
|
-
const Caption = React__namespace.forwardRef(function Caption(_ref, ref) {
|
|
377
|
-
let {
|
|
378
|
-
style,
|
|
379
|
-
children,
|
|
380
|
-
tag = "span"
|
|
381
|
-
} = _ref,
|
|
382
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded$1);
|
|
383
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
384
|
-
tag: tag,
|
|
385
|
-
style: [styles.Caption, style],
|
|
386
|
-
ref: ref
|
|
387
|
-
}), children);
|
|
388
|
-
});
|
|
61
|
+
const Caption=React__namespace.forwardRef(function Caption({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.Caption,style],ref:ref,children:children})});
|
|
389
62
|
|
|
390
|
-
const
|
|
391
|
-
const Footnote = React__namespace.forwardRef(function Footnote(_ref, ref) {
|
|
392
|
-
let {
|
|
393
|
-
style,
|
|
394
|
-
children,
|
|
395
|
-
tag = "span"
|
|
396
|
-
} = _ref,
|
|
397
|
-
otherProps = _objectWithoutPropertiesLoose__default["default"](_ref, _excluded);
|
|
398
|
-
return React__namespace.createElement(wonderBlocksCore.Text, _extends__default["default"]({}, otherProps, {
|
|
399
|
-
tag: tag,
|
|
400
|
-
style: [styles.Footnote, style],
|
|
401
|
-
ref: ref
|
|
402
|
-
}), children);
|
|
403
|
-
});
|
|
63
|
+
const Footnote=React__namespace.forwardRef(function Footnote({style,children,tag="span",...otherProps},ref){return jsxRuntime.jsx(wonderBlocksCore.Text,{...otherProps,tag:tag,style:[styles.Footnote,style],ref:ref,children:children})});
|
|
404
64
|
|
|
405
65
|
exports.Body = Body;
|
|
406
66
|
exports.BodyMonospace = BodyMonospace;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-typography",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"design": "v2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
"author": "",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"@khanacademy/wonder-blocks-
|
|
15
|
+
"@khanacademy/wonder-blocks-core": "12.2.1",
|
|
16
|
+
"@khanacademy/wonder-blocks-tokens": "10.0.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"aphrodite": "^1.2.5",
|
|
20
20
|
"react": "18.2.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@khanacademy/wb-dev-build-settings": "
|
|
23
|
+
"@khanacademy/wb-dev-build-settings": "3.0.0"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"test": "echo \"Error: no test specified\" && exit 1"
|