@sigx/zero-daisyui 0.2.0-beta.6 → 0.3.0-beta.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 +78 -5
- package/dist/audit.json +271915 -0
- package/dist/components.d.ts +75 -18
- package/dist/components.js +15 -3
- package/dist/css/breakpoints.css +7 -0
- package/dist/css/components/avatar.css +12 -0
- package/dist/css/components/badge.css +130 -1
- package/dist/css/components/box.css +58 -0
- package/dist/css/components/button.css +17 -17
- package/dist/css/components/center.css +17 -0
- package/dist/css/components/checkbox.css +1 -1
- package/dist/css/components/combobox.css +57 -6
- package/dist/css/components/container.css +16 -0
- package/dist/css/components/countdown.css +5 -0
- package/dist/css/components/dialog.css +3 -2
- package/dist/css/components/drawer.css +102 -6
- package/dist/css/components/empty-state.css +164 -0
- package/dist/css/components/grid.css +32 -0
- package/dist/css/components/kbd.css +1 -1
- package/dist/css/components/menu.css +4 -4
- package/dist/css/components/nav-list.css +165 -0
- package/dist/css/components/radio-group.css +2 -2
- package/dist/css/components/select.css +1 -1
- package/dist/css/components/spacer.css +13 -0
- package/dist/css/components/stack.css +39 -0
- package/dist/css/components/steps.css +109 -28
- package/dist/css/components/table.css +276 -2
- package/dist/css/components/timeline.css +64 -1
- package/dist/css/components/tree-view.css +2 -2
- package/dist/css/index.css +2220 -279
- package/dist/css/index.d.ts +2 -0
- package/dist/css/tokens.css +9 -0
- package/dist/design-system.d.ts.map +1 -1
- package/dist/design-system.js +15 -8
- package/dist/design-system.js.map +1 -1
- package/dist/lynx/components/avatar.css +12 -0
- package/dist/lynx/components/badge.css +56 -1
- package/dist/lynx/components/box.css +54 -0
- package/dist/lynx/components/breadcrumbs.css +10 -10
- package/dist/lynx/components/button.css +15 -4
- package/dist/lynx/components/card.css +5 -5
- package/dist/lynx/components/center.css +13 -0
- package/dist/lynx/components/chat.css +10 -10
- package/dist/lynx/components/checkbox.css +1 -1
- package/dist/lynx/components/combobox.css +49 -6
- package/dist/lynx/components/container.css +11 -0
- package/dist/lynx/components/countdown.css +5 -0
- package/dist/lynx/components/dialog.css +8 -7
- package/dist/lynx/components/drawer.css +18 -0
- package/dist/lynx/components/empty-state.css +342 -0
- package/dist/lynx/components/file-upload.css +10 -10
- package/dist/lynx/components/grid.css +28 -0
- package/dist/lynx/components/kbd.css +1 -1
- package/dist/lynx/components/menu.css +4 -4
- package/dist/lynx/components/nav-list.css +302 -0
- package/dist/lynx/components/pagination.css +5 -5
- package/dist/lynx/components/radial-progress.css +5 -5
- package/dist/lynx/components/radio-group.css +2 -2
- package/dist/lynx/components/rating-group.css +5 -5
- package/dist/lynx/components/select.css +6 -6
- package/dist/lynx/components/spacer.css +11 -0
- package/dist/lynx/components/stack.css +35 -0
- package/dist/lynx/components/stats.css +10 -10
- package/dist/lynx/components/steps.css +99 -59
- package/dist/lynx/components/switch.css +5 -5
- package/dist/lynx/components/table.css +18 -12
- package/dist/lynx/components/tabs.css +5 -5
- package/dist/lynx/components/timeline.css +14 -5
- package/dist/lynx/components/tree-view.css +2 -2
- package/dist/lynx/index.css +1254 -345
- package/dist/lynx/manifest.json +354 -37
- package/dist/lynx/tokens.css +36 -0
- package/dist/manifest.json +351 -34
- package/dist/recipes.d.ts +17 -10
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +582 -173
- package/dist/recipes.js.map +1 -1
- package/dist/register.d.ts +89 -14
- package/dist/report.json +2476 -564
- package/dist/tokens.d.ts +22 -11
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +57 -7
- package/dist/tokens.js.map +1 -1
- package/package.json +28 -10
- package/src/design-system.ts +15 -8
- package/src/recipes.ts +594 -177
- package/src/tokens.ts +54 -7
- package/dist/css/components/native-select.css +0 -128
- package/dist/lynx/components/native-select.css +0 -130
package/README.md
CHANGED
|
@@ -19,6 +19,10 @@ custom properties, because daisy's controls read them directly: `--depth`
|
|
|
19
19
|
`--depth-sheen`; and `--noise` with daisy's fractal tile in `--fx-noise`.
|
|
20
20
|
Override `--depth: 0` on a subtree to flatten it.
|
|
21
21
|
|
|
22
|
+
The modal drawer sheet **slides** in from its edge and back out, the way daisy's
|
|
23
|
+
`drawer-side` does (`translate` over 0.3s), instead of fading (#83). The travel
|
|
24
|
+
flips with the placement and with `dir="rtl"`, and reduced motion drops it.
|
|
25
|
+
|
|
22
26
|
The checkbox tick, the radio dot and the rating fill are **drawn**, not typeset:
|
|
23
27
|
each is geometry that interpolates between states, so it rides the size ramp and
|
|
24
28
|
animates. Under `forced-colors` and `print` the checkbox swaps to a `✔`/`−`
|
|
@@ -63,10 +67,11 @@ components, different look, zero component-code changes.
|
|
|
63
67
|
Button carries daisy 5's full style vocabulary — `variant` takes `solid`,
|
|
64
68
|
`outline`, `soft`, `ghost`, `dash` (`btn-dash`) and `link` (`btn-link`),
|
|
65
69
|
orthogonal to the eight-role `color` axis, exactly as daisy's own CSS composes
|
|
66
|
-
`btn-outline` **with** `btn-primary` — plus
|
|
67
|
-
modifiers as presence-only `data-mod-*`: `wide`, `block`, `square`, `circle
|
|
68
|
-
`active
|
|
69
|
-
|
|
70
|
+
`btn-outline` **with** `btn-primary` — plus five documented `btn-*`
|
|
71
|
+
modifiers as presence-only `data-mod-*`: `wide`, `block`, `square`, `circle`
|
|
72
|
+
and `active`. `loading` is zero's own Button prop (a state, with `aria-busy`
|
|
73
|
+
and a blocked press), and the recipe draws its `spinner` part in
|
|
74
|
+
`currentColor`: that part is daisy's `loading loading-spinner` span.
|
|
70
75
|
daisy 4's `glass` is not carried: daisyUI 5 no longer documents it on any
|
|
71
76
|
component, and the old library never exposed it either.
|
|
72
77
|
|
|
@@ -98,12 +103,80 @@ Migrating from the old `@sigx/daisyui` package, prop by prop:
|
|
|
98
103
|
| `outline` / `soft` / `dash` (booleans) | `variant="outline"` / `"soft"` / `"dash"` |
|
|
99
104
|
| `wide`, `block`, `square`, `circle`, `active`, `loading` | same names, same booleans |
|
|
100
105
|
| `size="xs"` … `size="xl"` | unchanged |
|
|
101
|
-
| `loading` also disabling the button |
|
|
106
|
+
| `loading` also disabling the button | built in: `loading` blocks the press and sets `aria-busy`, and keeps focus |
|
|
102
107
|
|
|
103
108
|
The old fused `ButtonVariant` union (colours + `ghost` + `link` in one prop)
|
|
104
109
|
was a modeling artifact, not daisy's real shape — daisy's CSS composes a style
|
|
105
110
|
class with a colour class, and so does this package.
|
|
106
111
|
|
|
112
|
+
## Countdown in a sentence, and one-sided timelines
|
|
113
|
+
|
|
114
|
+
`<Countdown.Root mods={{ inline: true }}>` sets a countdown inside running
|
|
115
|
+
text: it takes the sentence's size and weight instead of the display
|
|
116
|
+
step, and keeps its tabular digits, its ink and the per-tick entry (#57). A
|
|
117
|
+
Timeline whose content never sits on the start side collapses the start track
|
|
118
|
+
on its own — a `:has()` rule on the root, no prop — so the events sit against
|
|
119
|
+
the axis instead of past an empty half of each item.
|
|
120
|
+
|
|
121
|
+
On `./components` the modifier is a boolean prop like the `btn-*` set:
|
|
122
|
+
`<Countdown inline>`. daisy's own `.countdown` sets no display size at all,
|
|
123
|
+
so `inline` is also the daisy-faithful look.
|
|
124
|
+
|
|
125
|
+
## Per-entry timeline colour
|
|
126
|
+
|
|
127
|
+
`<Timeline.Marker color="error">` colours one entry's dot while the Root's
|
|
128
|
+
`color` paints the rest (#94) — the marker re-carries the colour axis. A
|
|
129
|
+
coloured dot is the role's fill inside a ring in the role's `-content` ink:
|
|
130
|
+
a light role on a light page, or a dark one on a dark page, has no edge of
|
|
131
|
+
its own, while one half of the role's pair clears 3:1 against the page —
|
|
132
|
+
which the contrast audit now measures for every colour and theme. An
|
|
133
|
+
uncoloured marker is the same solid dot as before, and under forced colours
|
|
134
|
+
the ring still draws the whole dot.
|
|
135
|
+
|
|
136
|
+
On `./components`, `Timeline.Marker` takes the same `color` union as the
|
|
137
|
+
Root.
|
|
138
|
+
|
|
139
|
+
## Per-step colour
|
|
140
|
+
|
|
141
|
+
`<Steps.Item color="error">` colours one step — its disc, the bridge toward
|
|
142
|
+
the next step and its title — while the Root's `color` paints the rest of the
|
|
143
|
+
rail (#112), daisy's `step-error` on one `step`. The item re-carries the
|
|
144
|
+
colour axis, so the recipe keys its colour on `item`; a root colour reaches
|
|
145
|
+
every step exactly as before.
|
|
146
|
+
|
|
147
|
+
Measuring every role on a step for the first time found the complete disc's
|
|
148
|
+
digit unreadable in six cells: nord's muted `accent`, `success` and `warning`
|
|
149
|
+
(2.2–2.6:1) and the dark themes' `neutral`, which is darker than the page
|
|
150
|
+
(1.7–2.0:1). The digit now keeps the same share of each role's hue as
|
|
151
|
+
`roleInk` does, capped at the 70% primary always had, so the default digit is
|
|
152
|
+
unchanged. The disc's tint also mixes in OKLAB now: the light theme's
|
|
153
|
+
`oklch(100% 0 0)` page has a 0 hue that an OKLCH mix interpolates toward, so
|
|
154
|
+
every tint in the light theme leaned red — warning's came out pink.
|
|
155
|
+
|
|
156
|
+
On `./components`, `Steps.Item` takes the same `color` union as the Root.
|
|
157
|
+
|
|
158
|
+
## Deriving from this skin: the public hooks
|
|
159
|
+
|
|
160
|
+
A product skin built on this one with `extendDesignSystem` (from
|
|
161
|
+
`@sigx/zero-kit/define`) may rely on the names each recipe declares as
|
|
162
|
+
`hooks` (#73) — `dist/manifest.json` lists them per scope under
|
|
163
|
+
`components[scope].hooks`. Today that is the component-level colour and
|
|
164
|
+
metric properties of button (`--btn-accent`, `--btn-on-accent`, `--btn-soft`,
|
|
165
|
+
`--btn-ink`), switch (`--switch-size`, `--switch-accent`, `--switch-ink`),
|
|
166
|
+
badge, table, card, timeline, toggle-group, skeleton and collapsible; the
|
|
167
|
+
dialog popup's `zero-daisy-pop` keyframe; and the collapsible trigger's
|
|
168
|
+
`::after` chevron. Anything else a patch reaches — `--switch-p`, the spinner
|
|
169
|
+
keyframes, the menu's checkmark `::after` — is private and may change in any
|
|
170
|
+
release; `validateDesignSystem` warns when a patch touches one.
|
|
171
|
+
|
|
172
|
+
## Avatar shape
|
|
173
|
+
|
|
174
|
+
`<Avatar.Root axes={{ shape: 'square' }}>` picks `circle`, `square` or
|
|
175
|
+
`rounded` (#129) — a custom axis this design system declares in
|
|
176
|
+
`tokens.axes` and wires on avatar alone, so the `/register` module types
|
|
177
|
+
`axes.shape` there and nowhere else. One declaration on the root, whose
|
|
178
|
+
`overflow: hidden` clips the image and the initials alike. `rounded` is daisy's selector radius; unset, the avatar is the circle it always was.
|
|
179
|
+
|
|
107
180
|
## Writing direction
|
|
108
181
|
|
|
109
182
|
Every direction-bearing rule is spelled logically, so the whole skin mirrors
|