oneslash-design-system 2.2.0 → 2.3.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 +2 -2
- package/dist/designTokens.d.ts +10 -0
- package/dist/designTokens.js +10 -1
- package/dist/tailwind-preset-auto.js +15 -4
- package/dist/tailwind-preset.js +15 -4
- package/dist/typography.css +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,10 +15,10 @@ The package ships Tailwind class names, CSS variables and untranspiled `.jsx`. E
|
|
|
15
15
|
3. **Tailwind v4:** import `oneslash-design-system/theme.css` (toggle) or `theme-auto.css` (OS), plus `typography.css` if you want the type scale.
|
|
16
16
|
4. **Next.js:** `transpilePackages: ["oneslash-design-system"]` in `next.config`.
|
|
17
17
|
5. **Scan the components:** v3 `content` gets `./node_modules/oneslash-design-system/dist/**/*.{js,jsx}`; v4 CSS gets `@source "../node_modules/oneslash-design-system/dist/**/*.jsx";`.
|
|
18
|
-
6. **Load the fonts:** the package names Inter (`font-inter`) and
|
|
18
|
+
6. **Load the fonts:** the package names Inter (`font-inter`) and Fira Code (`font-mono`, for code, identifiers and type names; use it with `text-code`, the 14px weight-300 code style) but does not ship them. Load both under their real family names, for example with one Google Fonts link in `<head>`:
|
|
19
19
|
|
|
20
20
|
```html
|
|
21
|
-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400&family=
|
|
21
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Fira+Code:wght@300;400&display=swap">
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
`next/font/google` registers a hashed family name instead, so with it apply `mono.className` to the code element rather than relying on `font-mono`.
|
package/dist/designTokens.d.ts
CHANGED
|
@@ -1646,6 +1646,16 @@ export declare namespace typography {
|
|
|
1646
1646
|
let letterSpacing_10: string;
|
|
1647
1647
|
export { letterSpacing_10 as letterSpacing };
|
|
1648
1648
|
}
|
|
1649
|
+
namespace code {
|
|
1650
|
+
let weight_11: string;
|
|
1651
|
+
export { weight_11 as weight };
|
|
1652
|
+
let size_11: string;
|
|
1653
|
+
export { size_11 as size };
|
|
1654
|
+
let lineHeight_11: string;
|
|
1655
|
+
export { lineHeight_11 as lineHeight };
|
|
1656
|
+
let letterSpacing_11: string;
|
|
1657
|
+
export { letterSpacing_11 as letterSpacing };
|
|
1658
|
+
}
|
|
1649
1659
|
namespace alignments {
|
|
1650
1660
|
let left: string;
|
|
1651
1661
|
let center: string;
|
package/dist/designTokens.js
CHANGED
|
@@ -189,7 +189,7 @@ var base = {
|
|
|
189
189
|
},
|
|
190
190
|
typography: {
|
|
191
191
|
family: 'Inter, sans-serif',
|
|
192
|
-
monoFamily: "'
|
|
192
|
+
monoFamily: "'Fira Code', ui-monospace, monospace",
|
|
193
193
|
h1: {
|
|
194
194
|
weight: '400',
|
|
195
195
|
size: '96px',
|
|
@@ -256,6 +256,15 @@ var base = {
|
|
|
256
256
|
lineHeight: '18px',
|
|
257
257
|
letterSpacing: '0.5px',
|
|
258
258
|
},
|
|
259
|
+
// Code, identifiers and type names; pair with font-mono. Light weight
|
|
260
|
+
// because Fira Code's regular is dark next to Inter; 0 tracking because
|
|
261
|
+
// letter-spacing disables its ligatures.
|
|
262
|
+
code: {
|
|
263
|
+
weight: '300',
|
|
264
|
+
size: '14px',
|
|
265
|
+
lineHeight: '21px',
|
|
266
|
+
letterSpacing: '0px',
|
|
267
|
+
},
|
|
259
268
|
alignments: {
|
|
260
269
|
left: 'left',
|
|
261
270
|
center: 'center',
|
|
@@ -356,11 +356,19 @@ module.exports = {
|
|
|
356
356
|
"letterSpacing": "0.5px",
|
|
357
357
|
"fontWeight": "400"
|
|
358
358
|
}
|
|
359
|
+
],
|
|
360
|
+
"code": [
|
|
361
|
+
"14px",
|
|
362
|
+
{
|
|
363
|
+
"lineHeight": "21px",
|
|
364
|
+
"letterSpacing": "0px",
|
|
365
|
+
"fontWeight": "300"
|
|
366
|
+
}
|
|
359
367
|
]
|
|
360
368
|
},
|
|
361
369
|
"fontFamily": {
|
|
362
370
|
"inter": "Inter, sans-serif",
|
|
363
|
-
"mono": "'
|
|
371
|
+
"mono": "'Fira Code', ui-monospace, monospace"
|
|
364
372
|
},
|
|
365
373
|
"fontWeight": {
|
|
366
374
|
"h1": "400",
|
|
@@ -373,7 +381,8 @@ module.exports = {
|
|
|
373
381
|
"subtitle2": "400",
|
|
374
382
|
"body1": "400",
|
|
375
383
|
"body2": "400",
|
|
376
|
-
"caption": "400"
|
|
384
|
+
"caption": "400",
|
|
385
|
+
"code": "300"
|
|
377
386
|
},
|
|
378
387
|
"letterSpacing": {
|
|
379
388
|
"h1": "-1.5px",
|
|
@@ -386,7 +395,8 @@ module.exports = {
|
|
|
386
395
|
"subtitle2": "0.1px",
|
|
387
396
|
"body1": "0.2px",
|
|
388
397
|
"body2": "0.2px",
|
|
389
|
-
"caption": "0.5px"
|
|
398
|
+
"caption": "0.5px",
|
|
399
|
+
"code": "0px"
|
|
390
400
|
},
|
|
391
401
|
"lineHeight": {
|
|
392
402
|
"h1": "115px",
|
|
@@ -399,7 +409,8 @@ module.exports = {
|
|
|
399
409
|
"subtitle2": "21px",
|
|
400
410
|
"body1": "24px",
|
|
401
411
|
"body2": "21px",
|
|
402
|
-
"caption": "18px"
|
|
412
|
+
"caption": "18px",
|
|
413
|
+
"code": "21px"
|
|
403
414
|
}
|
|
404
415
|
}
|
|
405
416
|
}
|
package/dist/tailwind-preset.js
CHANGED
|
@@ -350,11 +350,19 @@ module.exports = {
|
|
|
350
350
|
"letterSpacing": "0.5px",
|
|
351
351
|
"fontWeight": "400"
|
|
352
352
|
}
|
|
353
|
+
],
|
|
354
|
+
"code": [
|
|
355
|
+
"14px",
|
|
356
|
+
{
|
|
357
|
+
"lineHeight": "21px",
|
|
358
|
+
"letterSpacing": "0px",
|
|
359
|
+
"fontWeight": "300"
|
|
360
|
+
}
|
|
353
361
|
]
|
|
354
362
|
},
|
|
355
363
|
"fontFamily": {
|
|
356
364
|
"inter": "Inter, sans-serif",
|
|
357
|
-
"mono": "'
|
|
365
|
+
"mono": "'Fira Code', ui-monospace, monospace"
|
|
358
366
|
},
|
|
359
367
|
"fontWeight": {
|
|
360
368
|
"h1": "400",
|
|
@@ -367,7 +375,8 @@ module.exports = {
|
|
|
367
375
|
"subtitle2": "400",
|
|
368
376
|
"body1": "400",
|
|
369
377
|
"body2": "400",
|
|
370
|
-
"caption": "400"
|
|
378
|
+
"caption": "400",
|
|
379
|
+
"code": "300"
|
|
371
380
|
},
|
|
372
381
|
"letterSpacing": {
|
|
373
382
|
"h1": "-1.5px",
|
|
@@ -380,7 +389,8 @@ module.exports = {
|
|
|
380
389
|
"subtitle2": "0.1px",
|
|
381
390
|
"body1": "0.2px",
|
|
382
391
|
"body2": "0.2px",
|
|
383
|
-
"caption": "0.5px"
|
|
392
|
+
"caption": "0.5px",
|
|
393
|
+
"code": "0px"
|
|
384
394
|
},
|
|
385
395
|
"lineHeight": {
|
|
386
396
|
"h1": "115px",
|
|
@@ -393,7 +403,8 @@ module.exports = {
|
|
|
393
403
|
"subtitle2": "21px",
|
|
394
404
|
"body1": "24px",
|
|
395
405
|
"body2": "21px",
|
|
396
|
-
"caption": "18px"
|
|
406
|
+
"caption": "18px",
|
|
407
|
+
"code": "21px"
|
|
397
408
|
}
|
|
398
409
|
}
|
|
399
410
|
}
|
package/dist/typography.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* Generated from designTokens.js by scripts/build-tokens.js. Do not edit. */
|
|
2
2
|
@theme inline {
|
|
3
3
|
--font-inter: Inter, sans-serif;
|
|
4
|
-
--font-mono: '
|
|
4
|
+
--font-mono: 'Fira Code', ui-monospace, monospace;
|
|
5
5
|
--text-h1: 96px;
|
|
6
6
|
--text-h1--line-height: 115px;
|
|
7
7
|
--text-h1--letter-spacing: -1.5px;
|
|
@@ -79,4 +79,11 @@
|
|
|
79
79
|
--font-weight-caption: 400;
|
|
80
80
|
--leading-caption: 18px;
|
|
81
81
|
--tracking-caption: 0.5px;
|
|
82
|
+
--text-code: 14px;
|
|
83
|
+
--text-code--line-height: 21px;
|
|
84
|
+
--text-code--letter-spacing: 0px;
|
|
85
|
+
--text-code--font-weight: 300;
|
|
86
|
+
--font-weight-code: 300;
|
|
87
|
+
--leading-code: 21px;
|
|
88
|
+
--tracking-code: 0px;
|
|
82
89
|
}
|