@platned/ui 0.8.3 → 0.9.1
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 +20 -0
- package/dist/index.cjs +2088 -1744
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +192 -25
- package/dist/index.d.ts +192 -25
- package/dist/index.js +1983 -1640
- package/dist/index.js.map +1 -1
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens.css +1 -0
- package/package.json +4 -2
- package/tailwind-preset.cjs +7 -1
package/README.md
CHANGED
|
@@ -58,6 +58,25 @@ module.exports = {
|
|
|
58
58
|
Use the preset's unprefixed names — `bg-brand`, `text-default`, `border-default`. A class the
|
|
59
59
|
preset does not define silently produces no CSS.
|
|
60
60
|
|
|
61
|
+
On **Tailwind v3**, don't load `@platned/ui/styles` next to your own stylesheet. It is a second
|
|
62
|
+
compiled Tailwind sheet, with its own preflight and its own copy of every utility. v3 has no
|
|
63
|
+
cascade layers, so its rules re-order your classes by load order. Instead, scan the library in
|
|
64
|
+
`content` and import only the tokens:
|
|
65
|
+
|
|
66
|
+
```js
|
|
67
|
+
// tailwind.config.js (Tailwind v3)
|
|
68
|
+
module.exports = {
|
|
69
|
+
presets: [require('@platned/ui/tailwind-preset')],
|
|
70
|
+
content: ['./src/**/*.{ts,tsx}', './node_modules/@platned/ui/dist/**/*.js'],
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import '@platned/ui/tokens' // custom properties only: no preflight, no utilities, no fonts
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
On Tailwind v4, import `@platned/ui/styles` into a cascade layer between `base` and `utilities`.
|
|
79
|
+
|
|
61
80
|
### App sidebar
|
|
62
81
|
|
|
63
82
|
The collapsible nav rail is a separate entry point because it needs `react-router-dom`, which
|
|
@@ -96,6 +115,7 @@ const [collapsed, setCollapsed] = useState(false)
|
|
|
96
115
|
| `@platned/ui` | Every UI component |
|
|
97
116
|
| `@platned/ui/sidebar` | `AppSidebar`, `SidebarUserCard`, `NavTabs` — needs `react-router-dom` |
|
|
98
117
|
| `@platned/ui/styles` | Pre-built stylesheet. Import once at the app root |
|
|
118
|
+
| `@platned/ui/tokens` | Design tokens only, as CSS custom properties. For Tailwind v3 apps that scan the library in `content` |
|
|
99
119
|
| `@platned/ui/tailwind-preset` | CJS Tailwind preset |
|
|
100
120
|
|
|
101
121
|
## Components
|