@danxbot/ui 2.9.0 → 3.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 +35 -19
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +36 -6
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,10 +8,17 @@ npm install @danxbot/ui
|
|
|
8
8
|
|
|
9
9
|
```tsx
|
|
10
10
|
import { Button, Chat, ThemeMenu } from "@danxbot/ui";
|
|
11
|
-
import "@danxbot/ui/styles.css";
|
|
12
11
|
```
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
```css
|
|
14
|
+
/* your app's Tailwind entry — see Setup, all three lines are required */
|
|
15
|
+
@import "tailwindcss";
|
|
16
|
+
@import "@danxbot/ui/theme.css";
|
|
17
|
+
@import "@danxbot/ui/styles.css";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Requires React 19 and Tailwind CSS 4 **in the consuming build** — the package
|
|
21
|
+
ships no compiled utilities, on purpose. MIT licensed.
|
|
15
22
|
|
|
16
23
|
## What is in it
|
|
17
24
|
|
|
@@ -100,26 +107,35 @@ Two stylesheets, and you want both. In your application's Tailwind entry:
|
|
|
100
107
|
|
|
101
108
|
```css
|
|
102
109
|
@import "tailwindcss";
|
|
103
|
-
@import "@danxbot/ui/theme.css"; /*
|
|
110
|
+
@import "@danxbot/ui/theme.css"; /* @source + the @theme bridge */
|
|
104
111
|
@import "@danxbot/ui/styles.css"; /* the token values, base layer and component CSS */
|
|
105
112
|
```
|
|
106
113
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
That is the whole contract. There is no layer-order statement to remember and
|
|
115
|
+
no path to configure.
|
|
116
|
+
|
|
117
|
+
**Your Tailwind build compiles this library's utilities, not ours.**
|
|
118
|
+
`theme.css` carries `@source "./index.js"`, which points your compiler at the
|
|
119
|
+
shipped bundle; the package itself ships zero generated utilities. That is
|
|
120
|
+
deliberate and it is the fix for a real defect: a compiled stylesheet emits into
|
|
121
|
+
`@layer utilities`, which is *the same layer name your build uses*, at equal
|
|
122
|
+
specificity, imported last — so the library used to win every tie. Measured in a
|
|
123
|
+
consuming app at 1440px, `grid grid-cols-1 xl:grid-cols-[1.6fr_1fr]` rendered
|
|
124
|
+
one column and `md:grid-cols-2 xl:grid-cols-3` rendered two. Nothing was
|
|
125
|
+
misused; `xl:` is supposed to beat `md:` because Tailwind *sorts* breakpoints,
|
|
126
|
+
and that guarantee only holds inside one compiler's output. So there is one
|
|
127
|
+
compiler.
|
|
128
|
+
|
|
129
|
+
`theme.css` also carries the `@theme` bridge, extracted from source at build
|
|
130
|
+
time, mapping every semantic token onto Tailwind's namespaces — without it your
|
|
131
|
+
own `bg-accent-subtle` compiles to nothing, silently. **Order matters**:
|
|
132
|
+
`styles.css` comes after, because it supplies the values the bridge points at.
|
|
133
|
+
|
|
134
|
+
**Not using Tailwind 4?** Then this package will not style anything: you get the
|
|
135
|
+
tokens, the base layer and the hand-written component CSS, and no utilities at
|
|
136
|
+
all. Components render structurally correct and visually unstyled — loudly, on
|
|
137
|
+
the first screen, rather than as one breakpoint quietly misbehaving. Tailwind 4
|
|
138
|
+
in the consuming build is a requirement, not a recommendation.
|
|
123
139
|
|
|
124
140
|
Fonts are self-hosted woff2 subsets rather than CDN-loaded, because a blocked
|
|
125
141
|
CDN renders every design in a system font with no error anywhere. They are
|
package/dist/index.js
CHANGED
|
@@ -20698,7 +20698,7 @@ function x3({
|
|
|
20698
20698
|
"aside",
|
|
20699
20699
|
{
|
|
20700
20700
|
className: q(
|
|
20701
|
-
"hidden shrink-0 flex-col border-r border-border-subtle bg-surface lg:flex",
|
|
20701
|
+
"sticky top-0 hidden h-dvh shrink-0 flex-col border-r border-border-subtle bg-surface lg:flex",
|
|
20702
20702
|
"transition-[var(--tx-colors),width] duration-(--dur-slow) ease-emphasis",
|
|
20703
20703
|
u ? "w-14" : "w-60"
|
|
20704
20704
|
),
|