@sigx/zero-daisyui 0.4.0 → 0.6.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 +61 -1
- package/dist/audit.json +6963 -3228
- package/dist/components.d.ts +14 -2
- package/dist/components.js +1 -0
- package/dist/css/components/accordion.css +26 -2
- package/dist/css/components/alert.css +2 -0
- package/dist/css/components/avatar.css +2 -0
- package/dist/css/components/badge.css +2 -0
- package/dist/css/components/box.css +2 -0
- package/dist/css/components/breadcrumbs.css +2 -0
- package/dist/css/components/button.css +2 -0
- package/dist/css/components/card.css +2 -0
- package/dist/css/components/carousel.css +2 -0
- package/dist/css/components/center.css +2 -0
- package/dist/css/components/chat.css +2 -0
- package/dist/css/components/checkbox-group.css +98 -0
- package/dist/css/components/checkbox.css +10 -0
- package/dist/css/components/collapsible.css +16 -2
- package/dist/css/components/combobox.css +43 -1
- package/dist/css/components/container.css +2 -0
- package/dist/css/components/countdown.css +2 -0
- package/dist/css/components/dialog.css +2 -0
- package/dist/css/components/diff.css +7 -0
- package/dist/css/components/divider.css +2 -0
- package/dist/css/components/drawer.css +2 -0
- package/dist/css/components/empty-state.css +2 -0
- package/dist/css/components/field.css +2 -0
- package/dist/css/components/file-upload.css +34 -0
- package/dist/css/components/grid.css +2 -0
- package/dist/css/components/indicator.css +2 -0
- package/dist/css/components/input.css +137 -0
- package/dist/css/components/join.css +2 -0
- package/dist/css/components/kbd.css +2 -0
- package/dist/css/components/menu.css +2 -0
- package/dist/css/components/nav-list.css +2 -0
- package/dist/css/components/navbar.css +2 -0
- package/dist/css/components/number-input.css +2 -0
- package/dist/css/components/pagination.css +6 -0
- package/dist/css/components/popover.css +2 -0
- package/dist/css/components/progress.css +2 -0
- package/dist/css/components/radial-progress.css +2 -0
- package/dist/css/components/radio-group.css +10 -4
- package/dist/css/components/rating-group.css +2 -0
- package/dist/css/components/select.css +61 -1
- package/dist/css/components/skeleton.css +2 -0
- package/dist/css/components/slider.css +154 -25
- package/dist/css/components/spacer.css +2 -0
- package/dist/css/components/spinner.css +2 -0
- package/dist/css/components/stack.css +2 -0
- package/dist/css/components/stats.css +68 -16
- package/dist/css/components/status.css +2 -0
- package/dist/css/components/steps.css +2 -0
- package/dist/css/components/swap.css +2 -0
- package/dist/css/components/switch.css +23 -0
- package/dist/css/components/table.css +7 -0
- package/dist/css/components/tabs.css +15 -0
- package/dist/css/components/textarea.css +2 -0
- package/dist/css/components/timeline.css +3 -0
- package/dist/css/components/toast.css +2 -0
- package/dist/css/components/toggle-group.css +2 -0
- package/dist/css/components/toggle.css +2 -0
- package/dist/css/components/tooltip.css +2 -0
- package/dist/css/components/tree-view.css +6 -0
- package/dist/css/index.css +702 -64
- package/dist/css/tokens.css +13 -13
- package/dist/lynx/components/accordion.css +5 -0
- package/dist/lynx/components/alert.css +20 -0
- package/dist/lynx/components/button.css +5 -0
- package/dist/lynx/components/checkbox-group.css +209 -0
- package/dist/lynx/components/checkbox.css +8 -0
- package/dist/lynx/components/combobox.css +53 -0
- package/dist/lynx/components/diff.css +5 -0
- package/dist/lynx/components/drawer.css +4 -0
- package/dist/lynx/components/file-upload.css +47 -0
- package/dist/lynx/components/input.css +178 -0
- package/dist/lynx/components/number-input.css +8 -0
- package/dist/lynx/components/pagination.css +16 -0
- package/dist/lynx/components/progress.css +4 -4
- package/dist/lynx/components/radio-group.css +8 -0
- package/dist/lynx/components/rating-group.css +3 -3
- package/dist/lynx/components/select.css +65 -0
- package/dist/lynx/components/slider.css +106 -25
- package/dist/lynx/components/stats.css +146 -16
- package/dist/lynx/components/steps.css +4 -0
- package/dist/lynx/components/switch.css +4 -0
- package/dist/lynx/components/table.css +5 -0
- package/dist/lynx/components/tabs.css +13 -0
- package/dist/lynx/components/timeline.css +26 -0
- package/dist/lynx/components/toggle.css +5 -0
- package/dist/lynx/components/tree-view.css +4 -0
- package/dist/lynx/index.css +998 -94
- package/dist/lynx/manifest.json +40 -5
- package/dist/lynx/tokens.css +4 -4
- package/dist/manifest.json +38 -3
- package/dist/recipes.d.ts +7 -0
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +658 -60
- package/dist/recipes.js.map +1 -1
- package/dist/register.d.ts +9 -0
- package/dist/report.json +627 -211
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +18 -4
- package/dist/tokens.js.map +1 -1
- package/package.json +5 -5
- package/src/recipes.ts +667 -61
- package/src/tokens.ts +18 -4
package/README.md
CHANGED
|
@@ -28,6 +28,25 @@ each is geometry that interpolates between states, so it rides the size ramp and
|
|
|
28
28
|
animates. Under `forced-colors` and `print` the checkbox swaps to a `✔`/`−`
|
|
29
29
|
glyph; the rating keeps its geometry, since no glyph can say "half".
|
|
30
30
|
|
|
31
|
+
The slider is **rebuilt** with `appearance: none` (#26), like every other skin,
|
|
32
|
+
instead of a stock native range behind `accent-color`: daisy's `range.css` track
|
|
33
|
+
(half the thumb's height, `--radius-selector`) and its real thumb — a `base-100`
|
|
34
|
+
knob in a `.25rem` ring of the fill ink, with the `--depth` shading. The whole
|
|
35
|
+
widget rides daisy's `range-{xs…xl}` ramp through `--slider-thumb-size`
|
|
36
|
+
(×4…×8 of `--size-selector`) and `--slider-track-size` (half of it), `md`
|
|
37
|
+
included, and the composed range parts read the same two tokens. The elapsed
|
|
38
|
+
fill is the progress bar's 90/10 deepened accent, painted from the
|
|
39
|
+
runtime-published `--slider-percent`; `invalid` still turns fill and rings to
|
|
40
|
+
`error` under every colour variant. Under `forced-colors` the native widget
|
|
41
|
+
comes back.
|
|
42
|
+
|
|
43
|
+
The switch knob is `currentColor` background plus shadows, which forced colours
|
|
44
|
+
revalue to `Canvas` and drop. That left two identical empty pill outlines, on and
|
|
45
|
+
off (#189). Under `forced-colors` the knob now opts out of forcing and paints
|
|
46
|
+
`CanvasText` at rest and `Highlight` when checked, without the noise or the
|
|
47
|
+
shadows. A disabled switch paints `GrayText`, the palette's own
|
|
48
|
+
disabled ink. `e2e/switch-forced-colors.spec.ts` measures it in pixels.
|
|
49
|
+
|
|
31
50
|
The palette is daisyUI **5.7.8**'s, role for role, in all five themes — checked
|
|
32
51
|
against its shipped `themes.css` rather than transcribed. `light` and `dark` had
|
|
33
52
|
drifted a major version behind (#231): among others, light's `primary` was
|
|
@@ -35,6 +54,17 @@ drifted a major version behind (#231): among others, light's `primary` was
|
|
|
35
54
|
and dark's `primary-content` was a *dark* ink where 5.7.8 pairs a light one.
|
|
36
55
|
`dim`, `nord` and `sunset` were already exact.
|
|
37
56
|
|
|
57
|
+
Three content-role values are the exception, in `light` and `dark` only (#34):
|
|
58
|
+
two roles across the two themes. daisy ships `secondary-content` at **3.05:1**
|
|
59
|
+
on `secondary` in both themes, and dark `primary-content` at **4.14:1** on
|
|
60
|
+
`primary` — below AA for the label text each pair exists to carry, and the
|
|
61
|
+
kit's validator warned for them on every build.
|
|
62
|
+
Each now takes the lightness the validator suggests, keeping daisy's hue:
|
|
63
|
+
`secondary-content` is a dark ink, `oklch(24.2% 0.028 342.258)`, and dark
|
|
64
|
+
`primary-content` a near-white `oklch(98.9% 0.005 272.314)` (chroma drops to
|
|
65
|
+
what stays in gamut that close to white). `dim`, `nord` and `sunset` clear AA
|
|
66
|
+
as shipped.
|
|
67
|
+
|
|
38
68
|
The checkbox's print fallback names `--print-ink` where real daisy names no ink
|
|
39
69
|
at all — its glyph inherits `--color-primary-content` and prints at 1.37:1, a
|
|
40
70
|
pale lavender on white paper (#233). Fidelity to a mark nobody can see is not
|
|
@@ -53,7 +83,8 @@ daisy's 20% reads 1.44:1 on `nord`, a raw-role `neutral` ghost button 1.22:1 in
|
|
|
53
83
|
every dark theme, and 5.7.8's own lighter `error` 2.87:1 as message text on
|
|
54
84
|
white — and 3:1 is the floor a mark owes the reader. The ratios and their
|
|
55
85
|
per-theme measurements are recorded at each declaration in `src/recipes.ts`;
|
|
56
|
-
every other value in this package is daisy's
|
|
86
|
+
every other value in this package is daisy's, bar the three content-role values
|
|
87
|
+
above.
|
|
57
88
|
|
|
58
89
|
`select`, `combobox` and `number-input` share one field metric — the same
|
|
59
90
|
`--size-field` height ramp, inset and `--shadow-xs` lift — so two controls in a
|
|
@@ -83,6 +114,12 @@ orthogonal: it inks the active tab — `border`'s underline follows via
|
|
|
83
114
|
`currentColor` — while `box` fills the active pill with the role and flips
|
|
84
115
|
its label to the `-content` pair, as daisy's own box examples do.
|
|
85
116
|
|
|
117
|
+
The tabs list scrolls inside its own box when it is wider than its column
|
|
118
|
+
(#45), as Pagination and Stats do. It is padded by `--tabs-ring-room` (4px,
|
|
119
|
+
the focus ring's 2px plus its 2px offset), with matching scroll padding, so
|
|
120
|
+
the ring is never clipped. The `box` flavor's own `space-xs` padding is the
|
|
121
|
+
same 4px.
|
|
122
|
+
|
|
86
123
|
The package declares an **api** (the `defineApi` layer, see
|
|
87
124
|
`docs/architecture.md` §3.6), so beside `/register` it ships a generated
|
|
88
125
|
`./components` module — the daisy-native, single-import, fully-typed surface:
|
|
@@ -93,6 +130,11 @@ import { Button } from '@sigx/zero-daisyui/components';
|
|
|
93
130
|
<Button wide loading variant="dash" color="primary">Save</Button>
|
|
94
131
|
```
|
|
95
132
|
|
|
133
|
+
It is the one published `./components` module, so `pnpm verify:pack` proves
|
|
134
|
+
it from the packed tarball: a scratch app typechecks daisy-native props
|
|
135
|
+
against the emitted d.ts (with a `@ts-expect-error` probe on a colour daisy
|
|
136
|
+
does not have), and Node loads the module through its `import` export.
|
|
137
|
+
|
|
96
138
|
Migrating from the old `@sigx/daisyui` package, prop by prop:
|
|
97
139
|
|
|
98
140
|
| old `@sigx/daisyui` Button | `@sigx/zero-daisyui/components` Button |
|
|
@@ -155,6 +197,24 @@ every tint in the light theme leaned red — warning's came out pink.
|
|
|
155
197
|
|
|
156
198
|
On `./components`, `Steps.Item` takes the same `color` union as the Root.
|
|
157
199
|
|
|
200
|
+
## Per-stat colour
|
|
201
|
+
|
|
202
|
+
`<Stats.Item color="warning">` colours one figure's value while the Root's
|
|
203
|
+
`color` paints the rest of the row (#161). The item re-carries the colour
|
|
204
|
+
axis, so the recipe keys `--stats-accent` on `item`; a root colour reaches
|
|
205
|
+
every item exactly as before.
|
|
206
|
+
|
|
207
|
+
Measuring every role on a stat's value for the first time found the raw
|
|
208
|
+
role unreadable as ink in 13 cells: the light theme's `accent`, `info`,
|
|
209
|
+
`success`, `warning` and `error` (1.8–2.9:1), nord's muted roles
|
|
210
|
+
(1.4–2.5:1) and the dark themes' `neutral`, which is darker than the page
|
|
211
|
+
(1.1–1.3:1). The value now takes `roleInk`, the per-role share of the role
|
|
212
|
+
over `base-content` that field and button text already use. Every cell
|
|
213
|
+
clears 3:1 (worst 3.32:1, dim `neutral`); the value is large text, and 12
|
|
214
|
+
cells sit in the 3–4.5:1 band the audit reports as an AA warning.
|
|
215
|
+
|
|
216
|
+
On `./components`, `Stats.Item` takes the same `color` union as the Root.
|
|
217
|
+
|
|
158
218
|
## Deriving from this skin: the public hooks
|
|
159
219
|
|
|
160
220
|
A product skin built on this one with `extendDesignSystem` (from
|