@octaviaflow/type 1.0.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.
Files changed (49) hide show
  1. package/README.md +239 -0
  2. package/es/index.js +850 -0
  3. package/index.scss +14 -0
  4. package/lib/index.js +922 -0
  5. package/package.json +59 -0
  6. package/scss/_classes.scss +42 -0
  7. package/scss/_default-type.scss +50 -0
  8. package/scss/_font-family.scss +105 -0
  9. package/scss/_prefix.scss +28 -0
  10. package/scss/_reset.scss +42 -0
  11. package/scss/_scale.scss +58 -0
  12. package/scss/_styles.scss +902 -0
  13. package/src/__tests__/__snapshots__/fontFamily-test.js.snap +13 -0
  14. package/src/__tests__/__snapshots__/fontFamily.test.js.snap +13 -0
  15. package/src/__tests__/__snapshots__/fontWeight-test.js.snap +11 -0
  16. package/src/__tests__/__snapshots__/fontWeight.test.js.snap +11 -0
  17. package/src/__tests__/__snapshots__/reset-test.js.snap +11 -0
  18. package/src/__tests__/__snapshots__/reset.test.js.snap +11 -0
  19. package/src/__tests__/__snapshots__/scale-test.js.snap +29 -0
  20. package/src/__tests__/__snapshots__/scale.test.js.snap +29 -0
  21. package/src/__tests__/__snapshots__/styles-test.js.snap +411 -0
  22. package/src/__tests__/__snapshots__/styles.test.js.snap +411 -0
  23. package/src/__tests__/exports-test.js +88 -0
  24. package/src/__tests__/exports.test.js +88 -0
  25. package/src/__tests__/fluid-test.js +71 -0
  26. package/src/__tests__/fluid.test.js +71 -0
  27. package/src/__tests__/fontFamily-test.js +33 -0
  28. package/src/__tests__/fontFamily.test.js +33 -0
  29. package/src/__tests__/fontWeight-test.js +33 -0
  30. package/src/__tests__/fontWeight.test.js +33 -0
  31. package/src/__tests__/reset-test.js +23 -0
  32. package/src/__tests__/reset.test.js +23 -0
  33. package/src/__tests__/scale-test.js +31 -0
  34. package/src/__tests__/scale.test.js +31 -0
  35. package/src/__tests__/styles-test.js +18 -0
  36. package/src/__tests__/styles.test.js +18 -0
  37. package/src/__tests__/tokens-test.js +21 -0
  38. package/src/__tests__/tokens.test.js +21 -0
  39. package/src/fluid.js +89 -0
  40. package/src/fontFamily.js +33 -0
  41. package/src/fontWeight.js +27 -0
  42. package/src/index.js +31 -0
  43. package/src/print.js +39 -0
  44. package/src/reset.js +32 -0
  45. package/src/scale.js +33 -0
  46. package/src/styles.js +491 -0
  47. package/src/tokens.js +132 -0
  48. package/telemetry.yml +16 -0
  49. package/umd/index.js +926 -0
@@ -0,0 +1,13 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`fontFamily should be printable 1`] = `"font-family: 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;"`;
4
+
5
+ exports[`fontFamily should export the supported font families 1`] = `
6
+ Object {
7
+ "mono": "'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",
8
+ "sans": "'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif",
9
+ "sansCondensed": "'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif",
10
+ "sansHebrew": "'IBM Plex Sans Hebrew', 'Helvetica Hebrew', 'Arial Hebrew', sans-serif",
11
+ "serif": "'IBM Plex Serif', 'Georgia', Times, serif",
12
+ }
13
+ `;
@@ -0,0 +1,13 @@
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
+
3
+ exports[`fontFamily should export the supported font families 1`] = `
4
+ {
5
+ "mono": "'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace",
6
+ "sans": "'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif",
7
+ "sansCondensed": "'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif",
8
+ "sansHebrew": "'IBM Plex Sans Hebrew', 'Helvetica Hebrew', 'Arial Hebrew', sans-serif",
9
+ "serif": "'IBM Plex Serif', 'Georgia', Times, serif",
10
+ }
11
+ `;
12
+
13
+ exports[`fontFamily should be printable 1`] = `"font-family: 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;"`;
@@ -0,0 +1,11 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`fontWeight should be printable 1`] = `"font-weight: 400;"`;
4
+
5
+ exports[`fontWeight should export the supported font weights 1`] = `
6
+ Object {
7
+ "light": 300,
8
+ "regular": 400,
9
+ "semibold": 600,
10
+ }
11
+ `;
@@ -0,0 +1,11 @@
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
+
3
+ exports[`fontWeight should export the supported font weights 1`] = `
4
+ {
5
+ "light": 300,
6
+ "regular": 400,
7
+ "semibold": 600,
8
+ }
9
+ `;
10
+
11
+ exports[`fontWeight should be printable 1`] = `"font-weight: 400;"`;
@@ -0,0 +1,11 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`reset should be printable 1`] = `"font-size: 16px;"`;
4
+
5
+ exports[`reset should be printable 2`] = `
6
+ "font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif;
7
+ font-weight: 400;
8
+ text-rendering: optimizeLegibility;
9
+ --webkit--font--smoothing: antialiased;
10
+ --moz--osx--font--smoothing: grayscale;"
11
+ `;
@@ -0,0 +1,11 @@
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
+
3
+ exports[`reset should be printable 1`] = `"font-size: 16px;"`;
4
+
5
+ exports[`reset should be printable 2`] = `
6
+ "font-family: 'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif;
7
+ font-weight: 400;
8
+ text-rendering: optimizeLegibility;
9
+ --webkit--font--smoothing: antialiased;
10
+ --moz--osx--font--smoothing: grayscale;"
11
+ `;
@@ -0,0 +1,29 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`scale should export the type scale 1`] = `
4
+ Array [
5
+ 12,
6
+ 14,
7
+ 16,
8
+ 18,
9
+ 20,
10
+ 24,
11
+ 28,
12
+ 32,
13
+ 36,
14
+ 42,
15
+ 48,
16
+ 54,
17
+ 60,
18
+ 68,
19
+ 76,
20
+ 84,
21
+ 92,
22
+ 102,
23
+ 112,
24
+ 122,
25
+ 132,
26
+ 144,
27
+ 156,
28
+ ]
29
+ `;
@@ -0,0 +1,29 @@
1
+ // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
+
3
+ exports[`scale should export the type scale 1`] = `
4
+ [
5
+ 12,
6
+ 14,
7
+ 16,
8
+ 18,
9
+ 20,
10
+ 24,
11
+ 28,
12
+ 32,
13
+ 36,
14
+ 42,
15
+ 48,
16
+ 54,
17
+ 60,
18
+ 68,
19
+ 76,
20
+ 84,
21
+ 92,
22
+ 102,
23
+ 112,
24
+ 122,
25
+ 132,
26
+ 144,
27
+ 156,
28
+ ]
29
+ `;
@@ -0,0 +1,411 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`styles body01 should be printable 1`] = `
4
+ "font-size: 0.875rem;
5
+ font-weight: 400;
6
+ line-height: 1.42857;
7
+ letter-spacing: 0.16px;"
8
+ `;
9
+
10
+ exports[`styles body02 should be printable 1`] = `
11
+ "font-size: 1rem;
12
+ font-weight: 400;
13
+ line-height: 1.5;
14
+ letter-spacing: 0;"
15
+ `;
16
+
17
+ exports[`styles bodyCompact01 should be printable 1`] = `
18
+ "font-size: 0.875rem;
19
+ font-weight: 400;
20
+ line-height: 1.28572;
21
+ letter-spacing: 0.16px;"
22
+ `;
23
+
24
+ exports[`styles bodyCompact02 should be printable 1`] = `
25
+ "font-size: 1rem;
26
+ font-weight: 400;
27
+ line-height: 1.375;
28
+ letter-spacing: 0;"
29
+ `;
30
+
31
+ exports[`styles bodyLong01 should be printable 1`] = `
32
+ "font-size: 0.875rem;
33
+ font-weight: 400;
34
+ line-height: 1.42857;
35
+ letter-spacing: 0.16px;"
36
+ `;
37
+
38
+ exports[`styles bodyLong02 should be printable 1`] = `
39
+ "font-size: 1rem;
40
+ font-weight: 400;
41
+ line-height: 1.5;
42
+ letter-spacing: 0;"
43
+ `;
44
+
45
+ exports[`styles bodyShort01 should be printable 1`] = `
46
+ "font-size: 0.875rem;
47
+ font-weight: 400;
48
+ line-height: 1.28572;
49
+ letter-spacing: 0.16px;"
50
+ `;
51
+
52
+ exports[`styles bodyShort02 should be printable 1`] = `
53
+ "font-size: 1rem;
54
+ font-weight: 400;
55
+ line-height: 1.375;
56
+ letter-spacing: 0;"
57
+ `;
58
+
59
+ exports[`styles caption01 should be printable 1`] = `
60
+ "font-size: 0.75rem;
61
+ font-weight: 400;
62
+ line-height: 1.33333;
63
+ letter-spacing: 0.32px;"
64
+ `;
65
+
66
+ exports[`styles caption02 should be printable 1`] = `
67
+ "font-size: 0.875rem;
68
+ font-weight: 400;
69
+ line-height: 1.28572;
70
+ letter-spacing: 0.32px;"
71
+ `;
72
+
73
+ exports[`styles code01 should be printable 1`] = `
74
+ "font-family: 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;
75
+ font-size: 0.75rem;
76
+ font-weight: 400;
77
+ line-height: 1.33333;
78
+ letter-spacing: 0.32px;"
79
+ `;
80
+
81
+ exports[`styles code02 should be printable 1`] = `
82
+ "font-family: 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;
83
+ font-size: 0.875rem;
84
+ font-weight: 400;
85
+ line-height: 1.42857;
86
+ letter-spacing: 0.32px;"
87
+ `;
88
+
89
+ exports[`styles display01 should be printable 1`] = `
90
+ "font-size: 2.625rem;
91
+ font-weight: 300;
92
+ line-height: 1.19;
93
+ letter-spacing: 0;"
94
+ `;
95
+
96
+ exports[`styles display02 should be printable 1`] = `
97
+ "font-size: 2.625rem;
98
+ font-weight: 600;
99
+ line-height: 1.19;
100
+ letter-spacing: 0;"
101
+ `;
102
+
103
+ exports[`styles display03 should be printable 1`] = `
104
+ "font-size: 2.625rem;
105
+ font-weight: 300;
106
+ line-height: 1.19;
107
+ letter-spacing: 0;"
108
+ `;
109
+
110
+ exports[`styles display04 should be printable 1`] = `
111
+ "font-size: 2.625rem;
112
+ font-weight: 300;
113
+ line-height: 1.19;
114
+ letter-spacing: 0;"
115
+ `;
116
+
117
+ exports[`styles expressiveHeading01 should be printable 1`] = `
118
+ "font-size: 0.875rem;
119
+ font-weight: 600;
120
+ line-height: 1.25;
121
+ letter-spacing: 0.16px;"
122
+ `;
123
+
124
+ exports[`styles expressiveHeading02 should be printable 1`] = `
125
+ "font-size: 1rem;
126
+ font-weight: 600;
127
+ line-height: 1.5;
128
+ letter-spacing: 0;"
129
+ `;
130
+
131
+ exports[`styles expressiveHeading03 should be printable 1`] = `
132
+ "font-size: 1.25rem;
133
+ font-weight: 400;
134
+ line-height: 1.4;
135
+ letter-spacing: 0;"
136
+ `;
137
+
138
+ exports[`styles expressiveHeading04 should be printable 1`] = `
139
+ "font-size: 1.75rem;
140
+ font-weight: 400;
141
+ line-height: 1.28572;
142
+ letter-spacing: 0;"
143
+ `;
144
+
145
+ exports[`styles expressiveHeading05 should be printable 1`] = `
146
+ "font-size: 2rem;
147
+ font-weight: 400;
148
+ line-height: 1.25;
149
+ letter-spacing: 0;"
150
+ `;
151
+
152
+ exports[`styles expressiveHeading06 should be printable 1`] = `
153
+ "font-size: 2rem;
154
+ font-weight: 600;
155
+ line-height: 1.25;
156
+ letter-spacing: 0;"
157
+ `;
158
+
159
+ exports[`styles expressiveParagraph01 should be printable 1`] = `
160
+ "font-size: 1.5rem;
161
+ font-weight: 300;
162
+ line-height: 1.334;
163
+ letter-spacing: 0;"
164
+ `;
165
+
166
+ exports[`styles fluidDisplay01 should be printable 1`] = `
167
+ "font-size: 2.625rem;
168
+ font-weight: 300;
169
+ line-height: 1.19;
170
+ letter-spacing: 0;"
171
+ `;
172
+
173
+ exports[`styles fluidDisplay02 should be printable 1`] = `
174
+ "font-size: 2.625rem;
175
+ font-weight: 600;
176
+ line-height: 1.19;
177
+ letter-spacing: 0;"
178
+ `;
179
+
180
+ exports[`styles fluidDisplay03 should be printable 1`] = `
181
+ "font-size: 2.625rem;
182
+ font-weight: 300;
183
+ line-height: 1.19;
184
+ letter-spacing: 0;"
185
+ `;
186
+
187
+ exports[`styles fluidDisplay04 should be printable 1`] = `
188
+ "font-size: 2.625rem;
189
+ font-weight: 300;
190
+ line-height: 1.19;
191
+ letter-spacing: 0;"
192
+ `;
193
+
194
+ exports[`styles fluidHeading03 should be printable 1`] = `
195
+ "font-size: 1.25rem;
196
+ font-weight: 400;
197
+ line-height: 1.4;
198
+ letter-spacing: 0;"
199
+ `;
200
+
201
+ exports[`styles fluidHeading04 should be printable 1`] = `
202
+ "font-size: 1.75rem;
203
+ font-weight: 400;
204
+ line-height: 1.28572;
205
+ letter-spacing: 0;"
206
+ `;
207
+
208
+ exports[`styles fluidHeading05 should be printable 1`] = `
209
+ "font-size: 2rem;
210
+ font-weight: 400;
211
+ line-height: 1.25;
212
+ letter-spacing: 0;"
213
+ `;
214
+
215
+ exports[`styles fluidHeading06 should be printable 1`] = `
216
+ "font-size: 2rem;
217
+ font-weight: 600;
218
+ line-height: 1.25;
219
+ letter-spacing: 0;"
220
+ `;
221
+
222
+ exports[`styles fluidParagraph01 should be printable 1`] = `
223
+ "font-size: 1.5rem;
224
+ font-weight: 300;
225
+ line-height: 1.334;
226
+ letter-spacing: 0;"
227
+ `;
228
+
229
+ exports[`styles fluidQuotation01 should be printable 1`] = `
230
+ "font-family: 'IBM Plex Serif', 'Georgia', Times, serif;
231
+ font-size: 1.25rem;
232
+ font-weight: 400;
233
+ line-height: 1.3;
234
+ letter-spacing: 0;"
235
+ `;
236
+
237
+ exports[`styles fluidQuotation02 should be printable 1`] = `
238
+ "font-family: 'IBM Plex Serif', 'Georgia', Times, serif;
239
+ font-size: 2rem;
240
+ font-weight: 300;
241
+ line-height: 1.25;
242
+ letter-spacing: 0;"
243
+ `;
244
+
245
+ exports[`styles heading01 should be printable 1`] = `
246
+ "font-size: 0.875rem;
247
+ font-weight: 600;
248
+ line-height: 1.42857;
249
+ letter-spacing: 0.16px;"
250
+ `;
251
+
252
+ exports[`styles heading02 should be printable 1`] = `
253
+ "font-size: 1rem;
254
+ font-weight: 600;
255
+ line-height: 1.5;
256
+ letter-spacing: 0;"
257
+ `;
258
+
259
+ exports[`styles heading03 should be printable 1`] = `
260
+ "font-size: 1.25rem;
261
+ font-weight: 400;
262
+ line-height: 1.4;
263
+ letter-spacing: 0;"
264
+ `;
265
+
266
+ exports[`styles heading04 should be printable 1`] = `
267
+ "font-size: 1.75rem;
268
+ font-weight: 400;
269
+ line-height: 1.28572;
270
+ letter-spacing: 0;"
271
+ `;
272
+
273
+ exports[`styles heading05 should be printable 1`] = `
274
+ "font-size: 2rem;
275
+ font-weight: 400;
276
+ line-height: 1.25;
277
+ letter-spacing: 0;"
278
+ `;
279
+
280
+ exports[`styles heading06 should be printable 1`] = `
281
+ "font-size: 2.625rem;
282
+ font-weight: 300;
283
+ line-height: 1.199;
284
+ letter-spacing: 0;"
285
+ `;
286
+
287
+ exports[`styles heading07 should be printable 1`] = `
288
+ "font-size: 3.375rem;
289
+ font-weight: 300;
290
+ line-height: 1.199;
291
+ letter-spacing: 0;"
292
+ `;
293
+
294
+ exports[`styles headingCompact01 should be printable 1`] = `
295
+ "font-size: 0.875rem;
296
+ font-weight: 600;
297
+ line-height: 1.28572;
298
+ letter-spacing: 0.16px;"
299
+ `;
300
+
301
+ exports[`styles headingCompact02 should be printable 1`] = `
302
+ "font-size: 1rem;
303
+ font-weight: 600;
304
+ line-height: 1.375;
305
+ letter-spacing: 0;"
306
+ `;
307
+
308
+ exports[`styles helperText01 should be printable 1`] = `
309
+ "font-size: 0.75rem;
310
+ line-height: 1.33333;
311
+ letter-spacing: 0.32px;"
312
+ `;
313
+
314
+ exports[`styles helperText02 should be printable 1`] = `
315
+ "font-size: 0.875rem;
316
+ line-height: 1.28572;
317
+ letter-spacing: 0.16px;"
318
+ `;
319
+
320
+ exports[`styles label01 should be printable 1`] = `
321
+ "font-size: 0.75rem;
322
+ font-weight: 400;
323
+ line-height: 1.33333;
324
+ letter-spacing: 0.32px;"
325
+ `;
326
+
327
+ exports[`styles label02 should be printable 1`] = `
328
+ "font-size: 0.875rem;
329
+ font-weight: 400;
330
+ line-height: 1.28572;
331
+ letter-spacing: 0.16px;"
332
+ `;
333
+
334
+ exports[`styles legal01 should be printable 1`] = `
335
+ "font-size: 0.75rem;
336
+ font-weight: 400;
337
+ line-height: 1.33333;
338
+ letter-spacing: 0.32px;"
339
+ `;
340
+
341
+ exports[`styles legal02 should be printable 1`] = `
342
+ "font-size: 0.875rem;
343
+ font-weight: 400;
344
+ line-height: 1.28572;
345
+ letter-spacing: 0.16px;"
346
+ `;
347
+
348
+ exports[`styles productiveHeading01 should be printable 1`] = `
349
+ "font-size: 0.875rem;
350
+ font-weight: 600;
351
+ line-height: 1.28572;
352
+ letter-spacing: 0.16px;"
353
+ `;
354
+
355
+ exports[`styles productiveHeading02 should be printable 1`] = `
356
+ "font-size: 1rem;
357
+ font-weight: 600;
358
+ line-height: 1.375;
359
+ letter-spacing: 0;"
360
+ `;
361
+
362
+ exports[`styles productiveHeading03 should be printable 1`] = `
363
+ "font-size: 1.25rem;
364
+ font-weight: 400;
365
+ line-height: 1.4;
366
+ letter-spacing: 0;"
367
+ `;
368
+
369
+ exports[`styles productiveHeading04 should be printable 1`] = `
370
+ "font-size: 1.75rem;
371
+ font-weight: 400;
372
+ line-height: 1.28572;
373
+ letter-spacing: 0;"
374
+ `;
375
+
376
+ exports[`styles productiveHeading05 should be printable 1`] = `
377
+ "font-size: 2rem;
378
+ font-weight: 400;
379
+ line-height: 1.25;
380
+ letter-spacing: 0;"
381
+ `;
382
+
383
+ exports[`styles productiveHeading06 should be printable 1`] = `
384
+ "font-size: 2.625rem;
385
+ font-weight: 300;
386
+ line-height: 1.199;
387
+ letter-spacing: 0;"
388
+ `;
389
+
390
+ exports[`styles productiveHeading07 should be printable 1`] = `
391
+ "font-size: 3.375rem;
392
+ font-weight: 300;
393
+ line-height: 1.199;
394
+ letter-spacing: 0;"
395
+ `;
396
+
397
+ exports[`styles quotation01 should be printable 1`] = `
398
+ "font-family: 'IBM Plex Serif', 'Georgia', Times, serif;
399
+ font-size: 1.25rem;
400
+ font-weight: 400;
401
+ line-height: 1.3;
402
+ letter-spacing: 0;"
403
+ `;
404
+
405
+ exports[`styles quotation02 should be printable 1`] = `
406
+ "font-family: 'IBM Plex Serif', 'Georgia', Times, serif;
407
+ font-size: 2rem;
408
+ font-weight: 300;
409
+ line-height: 1.25;
410
+ letter-spacing: 0;"
411
+ `;