oneslash-design-system 2.1.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 CHANGED
@@ -15,6 +15,13 @@ 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 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
+
20
+ ```html
21
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400&family=Fira+Code:wght@300;400&display=swap">
22
+ ```
23
+
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`.
18
25
 
19
26
  ```css
20
27
  /* Tailwind v4, OS-driven dark mode */
@@ -1539,6 +1539,7 @@ export declare namespace spacing {
1539
1539
  }
1540
1540
  export declare namespace typography {
1541
1541
  let family: string;
1542
+ let monoFamily: string;
1542
1543
  namespace h1 {
1543
1544
  let weight: string;
1544
1545
  let size: string;
@@ -1645,6 +1646,16 @@ export declare namespace typography {
1645
1646
  let letterSpacing_10: string;
1646
1647
  export { letterSpacing_10 as letterSpacing };
1647
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
+ }
1648
1659
  namespace alignments {
1649
1660
  let left: string;
1650
1661
  let center: string;
@@ -189,6 +189,7 @@ var base = {
189
189
  },
190
190
  typography: {
191
191
  family: 'Inter, sans-serif',
192
+ monoFamily: "'Fira Code', ui-monospace, monospace",
192
193
  h1: {
193
194
  weight: '400',
194
195
  size: '96px',
@@ -255,6 +256,15 @@ var base = {
255
256
  lineHeight: '18px',
256
257
  letterSpacing: '0.5px',
257
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
+ },
258
268
  alignments: {
259
269
  left: 'left',
260
270
  center: 'center',
@@ -356,10 +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
- "inter": "Inter, sans-serif"
370
+ "inter": "Inter, sans-serif",
371
+ "mono": "'Fira Code', ui-monospace, monospace"
363
372
  },
364
373
  "fontWeight": {
365
374
  "h1": "400",
@@ -372,7 +381,8 @@ module.exports = {
372
381
  "subtitle2": "400",
373
382
  "body1": "400",
374
383
  "body2": "400",
375
- "caption": "400"
384
+ "caption": "400",
385
+ "code": "300"
376
386
  },
377
387
  "letterSpacing": {
378
388
  "h1": "-1.5px",
@@ -385,7 +395,8 @@ module.exports = {
385
395
  "subtitle2": "0.1px",
386
396
  "body1": "0.2px",
387
397
  "body2": "0.2px",
388
- "caption": "0.5px"
398
+ "caption": "0.5px",
399
+ "code": "0px"
389
400
  },
390
401
  "lineHeight": {
391
402
  "h1": "115px",
@@ -398,7 +409,8 @@ module.exports = {
398
409
  "subtitle2": "21px",
399
410
  "body1": "24px",
400
411
  "body2": "21px",
401
- "caption": "18px"
412
+ "caption": "18px",
413
+ "code": "21px"
402
414
  }
403
415
  }
404
416
  }
@@ -350,10 +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
- "inter": "Inter, sans-serif"
364
+ "inter": "Inter, sans-serif",
365
+ "mono": "'Fira Code', ui-monospace, monospace"
357
366
  },
358
367
  "fontWeight": {
359
368
  "h1": "400",
@@ -366,7 +375,8 @@ module.exports = {
366
375
  "subtitle2": "400",
367
376
  "body1": "400",
368
377
  "body2": "400",
369
- "caption": "400"
378
+ "caption": "400",
379
+ "code": "300"
370
380
  },
371
381
  "letterSpacing": {
372
382
  "h1": "-1.5px",
@@ -379,7 +389,8 @@ module.exports = {
379
389
  "subtitle2": "0.1px",
380
390
  "body1": "0.2px",
381
391
  "body2": "0.2px",
382
- "caption": "0.5px"
392
+ "caption": "0.5px",
393
+ "code": "0px"
383
394
  },
384
395
  "lineHeight": {
385
396
  "h1": "115px",
@@ -392,7 +403,8 @@ module.exports = {
392
403
  "subtitle2": "21px",
393
404
  "body1": "24px",
394
405
  "body2": "21px",
395
- "caption": "18px"
406
+ "caption": "18px",
407
+ "code": "21px"
396
408
  }
397
409
  }
398
410
  }
@@ -1,6 +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: 'Fira Code', ui-monospace, monospace;
4
5
  --text-h1: 96px;
5
6
  --text-h1--line-height: 115px;
6
7
  --text-h1--letter-spacing: -1.5px;
@@ -78,4 +79,11 @@
78
79
  --font-weight-caption: 400;
79
80
  --leading-caption: 18px;
80
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;
81
89
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oneslash-design-system",
3
3
  "description": "A design system for the Oneslash projects",
4
- "version": "2.1.0",
4
+ "version": "2.3.0",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",