@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.
- package/README.md +239 -0
- package/es/index.js +850 -0
- package/index.scss +14 -0
- package/lib/index.js +922 -0
- package/package.json +59 -0
- package/scss/_classes.scss +42 -0
- package/scss/_default-type.scss +50 -0
- package/scss/_font-family.scss +105 -0
- package/scss/_prefix.scss +28 -0
- package/scss/_reset.scss +42 -0
- package/scss/_scale.scss +58 -0
- package/scss/_styles.scss +902 -0
- package/src/__tests__/__snapshots__/fontFamily-test.js.snap +13 -0
- package/src/__tests__/__snapshots__/fontFamily.test.js.snap +13 -0
- package/src/__tests__/__snapshots__/fontWeight-test.js.snap +11 -0
- package/src/__tests__/__snapshots__/fontWeight.test.js.snap +11 -0
- package/src/__tests__/__snapshots__/reset-test.js.snap +11 -0
- package/src/__tests__/__snapshots__/reset.test.js.snap +11 -0
- package/src/__tests__/__snapshots__/scale-test.js.snap +29 -0
- package/src/__tests__/__snapshots__/scale.test.js.snap +29 -0
- package/src/__tests__/__snapshots__/styles-test.js.snap +411 -0
- package/src/__tests__/__snapshots__/styles.test.js.snap +411 -0
- package/src/__tests__/exports-test.js +88 -0
- package/src/__tests__/exports.test.js +88 -0
- package/src/__tests__/fluid-test.js +71 -0
- package/src/__tests__/fluid.test.js +71 -0
- package/src/__tests__/fontFamily-test.js +33 -0
- package/src/__tests__/fontFamily.test.js +33 -0
- package/src/__tests__/fontWeight-test.js +33 -0
- package/src/__tests__/fontWeight.test.js +33 -0
- package/src/__tests__/reset-test.js +23 -0
- package/src/__tests__/reset.test.js +23 -0
- package/src/__tests__/scale-test.js +31 -0
- package/src/__tests__/scale.test.js +31 -0
- package/src/__tests__/styles-test.js +18 -0
- package/src/__tests__/styles.test.js +18 -0
- package/src/__tests__/tokens-test.js +21 -0
- package/src/__tests__/tokens.test.js +21 -0
- package/src/fluid.js +89 -0
- package/src/fontFamily.js +33 -0
- package/src/fontWeight.js +27 -0
- package/src/index.js +31 -0
- package/src/print.js +39 -0
- package/src/reset.js +32 -0
- package/src/scale.js +33 -0
- package/src/styles.js +491 -0
- package/src/tokens.js +132 -0
- package/telemetry.yml +16 -0
- package/umd/index.js +926 -0
package/src/scale.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 11/November/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Get the type size for the given step
|
|
13
|
+
* @param {number} step
|
|
14
|
+
* @returns {number}
|
|
15
|
+
*/
|
|
16
|
+
export function getTypeSize(step) {
|
|
17
|
+
if (step <= 1) {
|
|
18
|
+
return 12;
|
|
19
|
+
}
|
|
20
|
+
// Yn = Yn-1 + {FLOOR[(n - 2) / 4] + 1} * 2
|
|
21
|
+
return getTypeSize(step - 1) + Math.floor((step - 2) / 4 + 1) * 2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The default type scale for 23 steps. Inlined as an array here through running
|
|
26
|
+
* the follow step:
|
|
27
|
+
*
|
|
28
|
+
* > Array.from({ length: 23 }, (_, i) => getTypeSize(i + 1))
|
|
29
|
+
*/
|
|
30
|
+
export const scale = [
|
|
31
|
+
12, 14, 16, 18, 20, 24, 28, 32, 36, 42, 48, 54, 60, 68, 76, 84, 92, 102, 112,
|
|
32
|
+
122, 132, 144, 156,
|
|
33
|
+
];
|
package/src/styles.js
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 11/November/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import { px, rem } from '@octaviaflow/layout';
|
|
12
|
+
import { fontWeights } from './fontWeight';
|
|
13
|
+
import { fontFamilies } from './fontFamily';
|
|
14
|
+
import { scale } from './scale';
|
|
15
|
+
|
|
16
|
+
export const caption01 = {
|
|
17
|
+
fontSize: rem(scale[0]),
|
|
18
|
+
fontWeight: fontWeights.regular,
|
|
19
|
+
lineHeight: 1.33333,
|
|
20
|
+
letterSpacing: px(0.32),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const caption02 = {
|
|
24
|
+
fontSize: rem(scale[1]),
|
|
25
|
+
fontWeight: fontWeights.regular,
|
|
26
|
+
lineHeight: 1.28572,
|
|
27
|
+
letterSpacing: px(0.32),
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const label01 = {
|
|
31
|
+
fontSize: rem(scale[0]),
|
|
32
|
+
fontWeight: fontWeights.regular,
|
|
33
|
+
lineHeight: 1.33333,
|
|
34
|
+
letterSpacing: px(0.32),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const label02 = {
|
|
38
|
+
fontSize: rem(scale[1]),
|
|
39
|
+
fontWeight: fontWeights.regular,
|
|
40
|
+
lineHeight: 1.28572,
|
|
41
|
+
letterSpacing: px(0.16),
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const helperText01 = {
|
|
45
|
+
fontSize: rem(scale[0]),
|
|
46
|
+
lineHeight: 1.33333,
|
|
47
|
+
letterSpacing: px(0.32),
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const helperText02 = {
|
|
51
|
+
fontSize: rem(scale[1]),
|
|
52
|
+
lineHeight: 1.28572,
|
|
53
|
+
letterSpacing: px(0.16),
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const bodyShort01 = {
|
|
57
|
+
fontSize: rem(scale[1]),
|
|
58
|
+
fontWeight: fontWeights.regular,
|
|
59
|
+
lineHeight: 1.28572,
|
|
60
|
+
letterSpacing: px(0.16),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const bodyLong01 = {
|
|
64
|
+
fontSize: rem(scale[1]),
|
|
65
|
+
fontWeight: fontWeights.regular,
|
|
66
|
+
lineHeight: 1.42857,
|
|
67
|
+
letterSpacing: px(0.16),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const bodyShort02 = {
|
|
71
|
+
fontSize: rem(scale[2]),
|
|
72
|
+
fontWeight: fontWeights.regular,
|
|
73
|
+
lineHeight: 1.375,
|
|
74
|
+
letterSpacing: 0,
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const bodyLong02 = {
|
|
78
|
+
fontSize: rem(scale[2]),
|
|
79
|
+
fontWeight: fontWeights.regular,
|
|
80
|
+
lineHeight: 1.5,
|
|
81
|
+
letterSpacing: 0,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const code01 = {
|
|
85
|
+
fontFamily: fontFamilies.mono,
|
|
86
|
+
fontSize: rem(scale[0]),
|
|
87
|
+
fontWeight: fontWeights.regular,
|
|
88
|
+
lineHeight: 1.33333,
|
|
89
|
+
letterSpacing: px(0.32),
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const code02 = {
|
|
93
|
+
fontFamily: fontFamilies.mono,
|
|
94
|
+
fontSize: rem(scale[1]),
|
|
95
|
+
fontWeight: fontWeights.regular,
|
|
96
|
+
lineHeight: 1.42857,
|
|
97
|
+
letterSpacing: px(0.32),
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const heading01 = {
|
|
101
|
+
fontSize: rem(scale[1]),
|
|
102
|
+
fontWeight: fontWeights.semibold,
|
|
103
|
+
lineHeight: 1.42857,
|
|
104
|
+
letterSpacing: px(0.16),
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export const productiveHeading01 = {
|
|
108
|
+
fontSize: rem(scale[1]),
|
|
109
|
+
fontWeight: fontWeights.semibold,
|
|
110
|
+
lineHeight: 1.28572,
|
|
111
|
+
letterSpacing: px(0.16),
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const heading02 = {
|
|
115
|
+
fontSize: rem(scale[2]),
|
|
116
|
+
fontWeight: fontWeights.semibold,
|
|
117
|
+
lineHeight: 1.5,
|
|
118
|
+
letterSpacing: 0,
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const productiveHeading02 = {
|
|
122
|
+
fontSize: rem(scale[2]),
|
|
123
|
+
fontWeight: fontWeights.semibold,
|
|
124
|
+
lineHeight: 1.375,
|
|
125
|
+
letterSpacing: 0,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const productiveHeading03 = {
|
|
129
|
+
fontSize: rem(scale[4]),
|
|
130
|
+
fontWeight: fontWeights.regular,
|
|
131
|
+
lineHeight: 1.4,
|
|
132
|
+
letterSpacing: 0,
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export const productiveHeading04 = {
|
|
136
|
+
fontSize: rem(scale[6]),
|
|
137
|
+
fontWeight: fontWeights.regular,
|
|
138
|
+
lineHeight: 1.28572,
|
|
139
|
+
letterSpacing: 0,
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const productiveHeading05 = {
|
|
143
|
+
fontSize: rem(scale[7]),
|
|
144
|
+
fontWeight: fontWeights.regular,
|
|
145
|
+
lineHeight: 1.25,
|
|
146
|
+
letterSpacing: 0,
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export const productiveHeading06 = {
|
|
150
|
+
fontSize: rem(scale[9]),
|
|
151
|
+
fontWeight: fontWeights.light,
|
|
152
|
+
lineHeight: 1.199,
|
|
153
|
+
letterSpacing: 0,
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const productiveHeading07 = {
|
|
157
|
+
fontSize: rem(scale[11]),
|
|
158
|
+
fontWeight: fontWeights.light,
|
|
159
|
+
lineHeight: 1.199,
|
|
160
|
+
letterSpacing: 0,
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const expressiveHeading01 = {
|
|
164
|
+
...heading01,
|
|
165
|
+
lineHeight: 1.25,
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export const expressiveHeading02 = {
|
|
169
|
+
...heading02,
|
|
170
|
+
lineHeight: 1.5,
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export const expressiveHeading03 = {
|
|
174
|
+
fontSize: rem(scale[4]),
|
|
175
|
+
fontWeight: fontWeights.regular,
|
|
176
|
+
lineHeight: 1.4,
|
|
177
|
+
letterSpacing: 0,
|
|
178
|
+
breakpoints: {
|
|
179
|
+
xlg: {
|
|
180
|
+
fontSize: rem(scale[4]),
|
|
181
|
+
lineHeight: 1.4,
|
|
182
|
+
},
|
|
183
|
+
max: {
|
|
184
|
+
fontSize: rem(scale[5]),
|
|
185
|
+
lineHeight: 1.334,
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export const expressiveHeading04 = {
|
|
191
|
+
fontSize: rem(scale[6]),
|
|
192
|
+
fontWeight: fontWeights.regular,
|
|
193
|
+
lineHeight: 1.28572,
|
|
194
|
+
letterSpacing: 0,
|
|
195
|
+
breakpoints: {
|
|
196
|
+
xlg: {
|
|
197
|
+
fontSize: rem(scale[7]),
|
|
198
|
+
fontWeight: fontWeights.regular,
|
|
199
|
+
lineHeight: 1.25,
|
|
200
|
+
},
|
|
201
|
+
max: {
|
|
202
|
+
fontSize: rem(scale[7]),
|
|
203
|
+
fontWeight: fontWeights.regular,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
export const expressiveHeading05 = {
|
|
209
|
+
fontSize: rem(scale[7]),
|
|
210
|
+
fontWeight: fontWeights.regular,
|
|
211
|
+
lineHeight: 1.25,
|
|
212
|
+
letterSpacing: 0,
|
|
213
|
+
breakpoints: {
|
|
214
|
+
md: {
|
|
215
|
+
fontSize: rem(scale[8]),
|
|
216
|
+
fontWeight: fontWeights.light,
|
|
217
|
+
lineHeight: 1.22,
|
|
218
|
+
letterSpacing: 0,
|
|
219
|
+
},
|
|
220
|
+
lg: {
|
|
221
|
+
fontSize: rem(scale[9]),
|
|
222
|
+
lineHeight: 1.19,
|
|
223
|
+
letterSpacing: 0,
|
|
224
|
+
},
|
|
225
|
+
xlg: {
|
|
226
|
+
fontSize: rem(scale[10]),
|
|
227
|
+
lineHeight: 1.17,
|
|
228
|
+
letterSpacing: 0,
|
|
229
|
+
},
|
|
230
|
+
max: {
|
|
231
|
+
fontSize: rem(scale[12]),
|
|
232
|
+
letterSpacing: 0,
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export const expressiveHeading06 = {
|
|
238
|
+
fontSize: rem(scale[7]),
|
|
239
|
+
fontWeight: fontWeights.semibold,
|
|
240
|
+
lineHeight: 1.25,
|
|
241
|
+
letterSpacing: 0,
|
|
242
|
+
breakpoints: {
|
|
243
|
+
md: {
|
|
244
|
+
fontSize: rem(scale[8]),
|
|
245
|
+
fontWeight: fontWeights.semibold,
|
|
246
|
+
lineHeight: 1.22,
|
|
247
|
+
letterSpacing: 0,
|
|
248
|
+
},
|
|
249
|
+
lg: {
|
|
250
|
+
fontSize: rem(scale[9]),
|
|
251
|
+
fontWeight: fontWeights.semibold,
|
|
252
|
+
lineHeight: 1.19,
|
|
253
|
+
letterSpacing: 0,
|
|
254
|
+
},
|
|
255
|
+
xlg: {
|
|
256
|
+
fontSize: rem(scale[10]),
|
|
257
|
+
fontWeight: fontWeights.semibold,
|
|
258
|
+
lineHeight: 1.17,
|
|
259
|
+
letterSpacing: 0,
|
|
260
|
+
},
|
|
261
|
+
max: {
|
|
262
|
+
fontSize: rem(scale[12]),
|
|
263
|
+
fontWeight: fontWeights.semibold,
|
|
264
|
+
letterSpacing: 0,
|
|
265
|
+
},
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const expressiveParagraph01 = {
|
|
270
|
+
fontSize: rem(scale[5]),
|
|
271
|
+
fontWeight: fontWeights.light,
|
|
272
|
+
lineHeight: 1.334,
|
|
273
|
+
letterSpacing: 0,
|
|
274
|
+
breakpoints: {
|
|
275
|
+
lg: {
|
|
276
|
+
fontSize: rem(scale[6]),
|
|
277
|
+
lineHeight: 1.28572,
|
|
278
|
+
},
|
|
279
|
+
max: {
|
|
280
|
+
fontSize: rem(scale[7]),
|
|
281
|
+
lineHeight: 1.25,
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
export const quotation01 = {
|
|
287
|
+
fontFamily: fontFamilies.serif,
|
|
288
|
+
fontSize: rem(scale[4]),
|
|
289
|
+
fontWeight: fontWeights.regular,
|
|
290
|
+
lineHeight: 1.3,
|
|
291
|
+
letterSpacing: 0,
|
|
292
|
+
breakpoints: {
|
|
293
|
+
md: {
|
|
294
|
+
fontSize: rem(scale[4]),
|
|
295
|
+
fontWeight: fontWeights.regular,
|
|
296
|
+
letterSpacing: 0,
|
|
297
|
+
},
|
|
298
|
+
lg: {
|
|
299
|
+
fontSize: rem(scale[5]),
|
|
300
|
+
fontWeight: fontWeights.regular,
|
|
301
|
+
lineHeight: 1.334,
|
|
302
|
+
letterSpacing: 0,
|
|
303
|
+
},
|
|
304
|
+
xlg: {
|
|
305
|
+
fontSize: rem(scale[6]),
|
|
306
|
+
fontWeight: fontWeights.regular,
|
|
307
|
+
lineHeight: 1.28572,
|
|
308
|
+
letterSpacing: 0,
|
|
309
|
+
},
|
|
310
|
+
max: {
|
|
311
|
+
fontSize: rem(scale[7]),
|
|
312
|
+
fontWeight: fontWeights.regular,
|
|
313
|
+
lineHeight: 1.25,
|
|
314
|
+
letterSpacing: 0,
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
export const quotation02 = {
|
|
320
|
+
fontFamily: fontFamilies.serif,
|
|
321
|
+
fontSize: rem(scale[7]),
|
|
322
|
+
fontWeight: fontWeights.light,
|
|
323
|
+
lineHeight: 1.25,
|
|
324
|
+
letterSpacing: 0,
|
|
325
|
+
breakpoints: {
|
|
326
|
+
md: {
|
|
327
|
+
fontSize: rem(scale[8]),
|
|
328
|
+
lineHeight: 1.22,
|
|
329
|
+
},
|
|
330
|
+
lg: {
|
|
331
|
+
fontSize: rem(scale[9]),
|
|
332
|
+
lineHeight: 1.19,
|
|
333
|
+
},
|
|
334
|
+
xlg: {
|
|
335
|
+
fontSize: rem(scale[10]),
|
|
336
|
+
lineHeight: 1.17,
|
|
337
|
+
},
|
|
338
|
+
max: {
|
|
339
|
+
fontSize: rem(scale[12]),
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
export const display01 = {
|
|
345
|
+
fontSize: rem(scale[9]),
|
|
346
|
+
fontWeight: fontWeights.light,
|
|
347
|
+
lineHeight: 1.19,
|
|
348
|
+
letterSpacing: 0,
|
|
349
|
+
breakpoints: {
|
|
350
|
+
md: {
|
|
351
|
+
fontSize: rem(scale[9]),
|
|
352
|
+
},
|
|
353
|
+
lg: {
|
|
354
|
+
fontSize: rem(scale[11]),
|
|
355
|
+
},
|
|
356
|
+
xlg: {
|
|
357
|
+
fontSize: rem(scale[12]),
|
|
358
|
+
lineHeight: 1.17,
|
|
359
|
+
},
|
|
360
|
+
max: {
|
|
361
|
+
fontSize: rem(scale[14]),
|
|
362
|
+
lineHeight: 1.13,
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export const display02 = {
|
|
368
|
+
fontSize: rem(scale[9]),
|
|
369
|
+
fontWeight: fontWeights.semibold,
|
|
370
|
+
lineHeight: 1.19,
|
|
371
|
+
letterSpacing: 0,
|
|
372
|
+
breakpoints: {
|
|
373
|
+
md: {
|
|
374
|
+
fontSize: rem(scale[9]),
|
|
375
|
+
},
|
|
376
|
+
lg: {
|
|
377
|
+
fontSize: rem(scale[11]),
|
|
378
|
+
},
|
|
379
|
+
xlg: {
|
|
380
|
+
fontSize: rem(scale[12]),
|
|
381
|
+
lineHeight: 1.16,
|
|
382
|
+
},
|
|
383
|
+
max: {
|
|
384
|
+
fontSize: rem(scale[14]),
|
|
385
|
+
lineHeight: 1.13,
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export const display03 = {
|
|
391
|
+
fontSize: rem(scale[9]),
|
|
392
|
+
fontWeight: fontWeights.light,
|
|
393
|
+
lineHeight: 1.19,
|
|
394
|
+
letterSpacing: 0,
|
|
395
|
+
breakpoints: {
|
|
396
|
+
md: {
|
|
397
|
+
fontSize: rem(scale[11]),
|
|
398
|
+
lineHeight: 1.18,
|
|
399
|
+
},
|
|
400
|
+
lg: {
|
|
401
|
+
fontSize: rem(scale[12]),
|
|
402
|
+
lineHeight: 1.16,
|
|
403
|
+
letterSpacing: px(-0.64),
|
|
404
|
+
},
|
|
405
|
+
xlg: {
|
|
406
|
+
fontSize: rem(scale[14]),
|
|
407
|
+
lineHeight: 1.13,
|
|
408
|
+
},
|
|
409
|
+
max: {
|
|
410
|
+
fontSize: rem(scale[15]),
|
|
411
|
+
lineHeight: 1.11,
|
|
412
|
+
letterSpacing: px(-0.96),
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
export const display04 = {
|
|
418
|
+
fontSize: rem(scale[9]),
|
|
419
|
+
fontWeight: fontWeights.light,
|
|
420
|
+
lineHeight: 1.19,
|
|
421
|
+
letterSpacing: 0,
|
|
422
|
+
breakpoints: {
|
|
423
|
+
md: {
|
|
424
|
+
fontSize: rem(scale[13]),
|
|
425
|
+
lineHeight: 1.15,
|
|
426
|
+
},
|
|
427
|
+
lg: {
|
|
428
|
+
fontSize: rem(scale[16]),
|
|
429
|
+
lineHeight: 1.11,
|
|
430
|
+
letterSpacing: px(-0.64),
|
|
431
|
+
},
|
|
432
|
+
xlg: {
|
|
433
|
+
fontSize: rem(scale[19]),
|
|
434
|
+
lineHeight: 1.07,
|
|
435
|
+
letterSpacing: px(-0.64),
|
|
436
|
+
},
|
|
437
|
+
max: {
|
|
438
|
+
fontSize: rem(scale[22]),
|
|
439
|
+
lineHeight: 1.05,
|
|
440
|
+
letterSpacing: px(-0.96),
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
// Type changes - V11
|
|
446
|
+
|
|
447
|
+
// Small styles
|
|
448
|
+
// No changes for code-01, code-02, label-01, label-02
|
|
449
|
+
export const legal01 = {
|
|
450
|
+
fontSize: rem(scale[0]),
|
|
451
|
+
fontWeight: fontWeights.regular,
|
|
452
|
+
lineHeight: 1.33333,
|
|
453
|
+
letterSpacing: px(0.32),
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
export const legal02 = {
|
|
457
|
+
fontSize: rem(scale[1]),
|
|
458
|
+
fontWeight: fontWeights.regular,
|
|
459
|
+
lineHeight: 1.28572,
|
|
460
|
+
letterSpacing: px(0.16),
|
|
461
|
+
};
|
|
462
|
+
|
|
463
|
+
// Body styles
|
|
464
|
+
export const bodyCompact01 = bodyShort01;
|
|
465
|
+
export const bodyCompact02 = bodyShort02;
|
|
466
|
+
export const body01 = bodyLong01;
|
|
467
|
+
export const body02 = bodyLong02;
|
|
468
|
+
|
|
469
|
+
// Fixed heading styles
|
|
470
|
+
export const headingCompact01 = productiveHeading01;
|
|
471
|
+
export const headingCompact02 = productiveHeading02;
|
|
472
|
+
export const heading03 = productiveHeading03;
|
|
473
|
+
export const heading04 = productiveHeading04;
|
|
474
|
+
export const heading05 = productiveHeading05;
|
|
475
|
+
export const heading06 = productiveHeading06;
|
|
476
|
+
export const heading07 = productiveHeading07;
|
|
477
|
+
|
|
478
|
+
// Fluid heading styles
|
|
479
|
+
export const fluidHeading03 = expressiveHeading03;
|
|
480
|
+
export const fluidHeading04 = expressiveHeading04;
|
|
481
|
+
export const fluidHeading05 = expressiveHeading05;
|
|
482
|
+
export const fluidHeading06 = expressiveHeading06;
|
|
483
|
+
|
|
484
|
+
// Additional fluid styles
|
|
485
|
+
export const fluidParagraph01 = expressiveParagraph01;
|
|
486
|
+
export const fluidQuotation01 = quotation01;
|
|
487
|
+
export const fluidQuotation02 = quotation02;
|
|
488
|
+
export const fluidDisplay01 = display01;
|
|
489
|
+
export const fluidDisplay02 = display02;
|
|
490
|
+
export const fluidDisplay03 = display03;
|
|
491
|
+
export const fluidDisplay04 = display04;
|
package/src/tokens.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 11/November/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
// Unstable tokens
|
|
12
|
+
export const caption01 = 'caption01';
|
|
13
|
+
export const caption02 = 'caption02';
|
|
14
|
+
export const label01 = 'label01';
|
|
15
|
+
export const label02 = 'label02';
|
|
16
|
+
export const helperText01 = 'helperText01';
|
|
17
|
+
export const helperText02 = 'helperText02';
|
|
18
|
+
export const bodyShort01 = 'bodyShort01';
|
|
19
|
+
export const bodyLong01 = 'bodyLong01';
|
|
20
|
+
export const bodyShort02 = 'bodyShort02';
|
|
21
|
+
export const bodyLong02 = 'bodyLong02';
|
|
22
|
+
export const code01 = 'code01';
|
|
23
|
+
export const code02 = 'code02';
|
|
24
|
+
export const heading01 = 'heading01';
|
|
25
|
+
export const productiveHeading01 = 'productiveHeading01';
|
|
26
|
+
export const heading02 = 'heading02';
|
|
27
|
+
export const productiveHeading02 = 'productiveHeading02';
|
|
28
|
+
export const productiveHeading03 = 'productiveHeading03';
|
|
29
|
+
export const productiveHeading04 = 'productiveHeading04';
|
|
30
|
+
export const productiveHeading05 = 'productiveHeading05';
|
|
31
|
+
export const productiveHeading06 = 'productiveHeading06';
|
|
32
|
+
export const productiveHeading07 = 'productiveHeading07';
|
|
33
|
+
export const expressiveHeading01 = 'expressiveHeading01';
|
|
34
|
+
export const expressiveHeading02 = 'expressiveHeading02';
|
|
35
|
+
export const expressiveHeading03 = 'expressiveHeading03';
|
|
36
|
+
export const expressiveHeading04 = 'expressiveHeading04';
|
|
37
|
+
export const expressiveHeading05 = 'expressiveHeading05';
|
|
38
|
+
export const expressiveHeading06 = 'expressiveHeading06';
|
|
39
|
+
export const expressiveParagraph01 = 'expressiveParagraph01';
|
|
40
|
+
export const quotation01 = 'quotation01';
|
|
41
|
+
export const quotation02 = 'quotation02';
|
|
42
|
+
export const display01 = 'display01';
|
|
43
|
+
export const display02 = 'display02';
|
|
44
|
+
export const display03 = 'display03';
|
|
45
|
+
export const display04 = 'display04';
|
|
46
|
+
// V11 Tokens
|
|
47
|
+
export const legal01 = 'legal01';
|
|
48
|
+
export const legal02 = 'legal02';
|
|
49
|
+
export const bodyCompact01 = 'bodyCompact01';
|
|
50
|
+
export const bodyCompact02 = 'bodyCompact02';
|
|
51
|
+
export const body01 = 'body01';
|
|
52
|
+
export const body02 = 'body02';
|
|
53
|
+
export const headingCompact01 = 'headingCompact01';
|
|
54
|
+
export const headingCompact02 = 'headingCompact02';
|
|
55
|
+
export const heading03 = 'heading03';
|
|
56
|
+
export const heading04 = 'heading04';
|
|
57
|
+
export const heading05 = 'heading05';
|
|
58
|
+
export const heading06 = 'heading06';
|
|
59
|
+
export const heading07 = 'heading07';
|
|
60
|
+
export const fluidHeading03 = 'fluidHeading03';
|
|
61
|
+
export const fluidHeading04 = 'fluidHeading04';
|
|
62
|
+
export const fluidHeading05 = 'fluidHeading05';
|
|
63
|
+
export const fluidHeading06 = 'fluidHeading06';
|
|
64
|
+
export const fluidParagraph01 = 'fluidParagraph01';
|
|
65
|
+
export const fluidQuotation01 = 'fluidQuotation01';
|
|
66
|
+
export const fluidQuotation02 = 'fluidQuotation02';
|
|
67
|
+
export const fluidDisplay01 = 'fluidDisplay01';
|
|
68
|
+
export const fluidDisplay02 = 'fluidDisplay02';
|
|
69
|
+
export const fluidDisplay03 = 'fluidDisplay03';
|
|
70
|
+
export const fluidDisplay04 = 'fluidDisplay04';
|
|
71
|
+
|
|
72
|
+
export const unstable_tokens = [
|
|
73
|
+
caption01,
|
|
74
|
+
caption02,
|
|
75
|
+
label01,
|
|
76
|
+
label02,
|
|
77
|
+
helperText01,
|
|
78
|
+
helperText02,
|
|
79
|
+
bodyShort01,
|
|
80
|
+
bodyLong01,
|
|
81
|
+
bodyShort02,
|
|
82
|
+
bodyLong02,
|
|
83
|
+
code01,
|
|
84
|
+
code02,
|
|
85
|
+
heading01,
|
|
86
|
+
productiveHeading01,
|
|
87
|
+
heading02,
|
|
88
|
+
productiveHeading02,
|
|
89
|
+
productiveHeading03,
|
|
90
|
+
productiveHeading04,
|
|
91
|
+
productiveHeading05,
|
|
92
|
+
productiveHeading06,
|
|
93
|
+
productiveHeading07,
|
|
94
|
+
expressiveHeading01,
|
|
95
|
+
expressiveHeading02,
|
|
96
|
+
expressiveHeading03,
|
|
97
|
+
expressiveHeading04,
|
|
98
|
+
expressiveHeading05,
|
|
99
|
+
expressiveHeading06,
|
|
100
|
+
expressiveParagraph01,
|
|
101
|
+
quotation01,
|
|
102
|
+
quotation02,
|
|
103
|
+
display01,
|
|
104
|
+
display02,
|
|
105
|
+
display03,
|
|
106
|
+
display04,
|
|
107
|
+
// V11 Tokens
|
|
108
|
+
legal01,
|
|
109
|
+
legal02,
|
|
110
|
+
bodyCompact01,
|
|
111
|
+
bodyCompact02,
|
|
112
|
+
body01,
|
|
113
|
+
body02,
|
|
114
|
+
headingCompact01,
|
|
115
|
+
headingCompact02,
|
|
116
|
+
heading03,
|
|
117
|
+
heading04,
|
|
118
|
+
heading05,
|
|
119
|
+
heading06,
|
|
120
|
+
heading07,
|
|
121
|
+
fluidHeading03,
|
|
122
|
+
fluidHeading04,
|
|
123
|
+
fluidHeading05,
|
|
124
|
+
fluidHeading06,
|
|
125
|
+
fluidParagraph01,
|
|
126
|
+
fluidQuotation01,
|
|
127
|
+
fluidQuotation02,
|
|
128
|
+
fluidDisplay01,
|
|
129
|
+
fluidDisplay02,
|
|
130
|
+
fluidDisplay03,
|
|
131
|
+
fluidDisplay04,
|
|
132
|
+
];
|
package/telemetry.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://unpkg.com/@octaviaflow/telemetry-config-schema@v1/dist/config.schema.json
|
|
2
|
+
version: 1
|
|
3
|
+
projectId: 'octaviaflow-type'
|
|
4
|
+
storage:
|
|
5
|
+
type: 'file'
|
|
6
|
+
file:
|
|
7
|
+
directory: '/Volumes/Main/Projects/OctaviaFlow-Design-System/telemetry-logs'
|
|
8
|
+
fileNamePattern: 'octaviaflow-type-{timestamp}.json'
|
|
9
|
+
maxFileSizeMB: 10
|
|
10
|
+
compress: false
|
|
11
|
+
collect:
|
|
12
|
+
npm:
|
|
13
|
+
dependencies: null
|
|
14
|
+
js:
|
|
15
|
+
functions: {}
|
|
16
|
+
tokens: null
|