oneslash-design-system 2.0.5 → 2.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/README.md +8 -0
- package/dist/designTokens.d.ts +919 -0
- package/dist/designTokens.js +48 -2
- package/dist/tailwind-preset-auto.js +2 -1
- package/dist/tailwind-preset.js +2 -1
- package/dist/themes/clay-auto.css +251 -0
- package/dist/themes/clay.css +167 -0
- package/dist/themes/indigo-auto.css +251 -0
- package/dist/themes/indigo.css +167 -0
- package/dist/themes/wine-auto.css +251 -0
- package/dist/themes/wine.css +167 -0
- package/dist/typography.css +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,10 +10,18 @@ The package ships Tailwind class names, CSS variables and untranspiled `.jsx`. E
|
|
|
10
10
|
- light/dark toggle that sets `.dark` on `<html>`: `oneslash-design-system/themes/default.css`
|
|
11
11
|
- follows the OS: `oneslash-design-system/themes/default-auto.css` (`.light` opts out of OS dark)
|
|
12
12
|
- Scindo: `themes/forest.css` / `themes/forest-auto.css`
|
|
13
|
+
- other brand themes: `themes/clay.css`, `themes/indigo.css`, `themes/wine.css` (each with an `-auto` version)
|
|
13
14
|
2. **Tailwind v3:** `presets: [require("oneslash-design-system/tailwind")]` (toggle) or `oneslash-design-system/tailwind-auto` (OS). Without the preset the components render unstyled.
|
|
14
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.
|
|
15
16
|
4. **Next.js:** `transpilePackages: ["oneslash-design-system"]` in `next.config`.
|
|
16
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 JetBrains Mono (`font-mono`, for code, identifiers and type names) 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=JetBrains+Mono:wght@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`.
|
|
17
25
|
|
|
18
26
|
```css
|
|
19
27
|
/* Tailwind v4, OS-driven dark mode */
|