@sigx/zero-daisyui 0.5.0 → 0.7.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.
Files changed (111) hide show
  1. package/README.md +62 -3
  2. package/dist/audit.json +8018 -2748
  3. package/dist/components.d.ts +23 -2
  4. package/dist/components.js +2 -0
  5. package/dist/css/components/accordion.css +26 -2
  6. package/dist/css/components/alert.css +2 -0
  7. package/dist/css/components/avatar.css +2 -0
  8. package/dist/css/components/badge.css +2 -0
  9. package/dist/css/components/box.css +2 -0
  10. package/dist/css/components/breadcrumbs.css +2 -0
  11. package/dist/css/components/button.css +2 -0
  12. package/dist/css/components/card.css +2 -0
  13. package/dist/css/components/carousel.css +2 -0
  14. package/dist/css/components/center.css +2 -0
  15. package/dist/css/components/chat.css +2 -0
  16. package/dist/css/components/checkbox-group.css +98 -0
  17. package/dist/css/components/checkbox.css +10 -0
  18. package/dist/css/components/collapsible.css +16 -2
  19. package/dist/css/components/combobox.css +36 -1
  20. package/dist/css/components/container.css +2 -0
  21. package/dist/css/components/countdown.css +2 -0
  22. package/dist/css/components/dialog.css +2 -0
  23. package/dist/css/components/diff.css +7 -0
  24. package/dist/css/components/divider.css +2 -0
  25. package/dist/css/components/drawer.css +2 -0
  26. package/dist/css/components/empty-state.css +2 -0
  27. package/dist/css/components/field.css +2 -0
  28. package/dist/css/components/fieldset.css +91 -0
  29. package/dist/css/components/file-upload.css +34 -0
  30. package/dist/css/components/grid.css +2 -0
  31. package/dist/css/components/indicator.css +2 -0
  32. package/dist/css/components/input.css +137 -0
  33. package/dist/css/components/join.css +2 -0
  34. package/dist/css/components/kbd.css +2 -0
  35. package/dist/css/components/menu.css +68 -0
  36. package/dist/css/components/nav-list.css +2 -0
  37. package/dist/css/components/navbar.css +2 -0
  38. package/dist/css/components/number-input.css +2 -0
  39. package/dist/css/components/pagination.css +6 -0
  40. package/dist/css/components/popover.css +74 -0
  41. package/dist/css/components/progress.css +2 -4
  42. package/dist/css/components/radial-progress.css +2 -0
  43. package/dist/css/components/radio-group.css +10 -4
  44. package/dist/css/components/rating-group.css +2 -0
  45. package/dist/css/components/select.css +54 -1
  46. package/dist/css/components/skeleton.css +2 -0
  47. package/dist/css/components/slider.css +154 -25
  48. package/dist/css/components/spacer.css +2 -0
  49. package/dist/css/components/spinner.css +2 -0
  50. package/dist/css/components/stack.css +2 -0
  51. package/dist/css/components/stats.css +68 -16
  52. package/dist/css/components/status.css +2 -0
  53. package/dist/css/components/steps.css +2 -0
  54. package/dist/css/components/swap.css +2 -0
  55. package/dist/css/components/switch.css +23 -0
  56. package/dist/css/components/table.css +77 -0
  57. package/dist/css/components/tabs.css +15 -0
  58. package/dist/css/components/textarea.css +2 -0
  59. package/dist/css/components/timeline.css +3 -0
  60. package/dist/css/components/toast.css +2 -0
  61. package/dist/css/components/toggle-group.css +2 -0
  62. package/dist/css/components/toggle.css +2 -0
  63. package/dist/css/components/tooltip.css +67 -0
  64. package/dist/css/components/tree-view.css +6 -0
  65. package/dist/css/index.css +1053 -70
  66. package/dist/css/tokens.css +13 -13
  67. package/dist/lynx/components/accordion.css +9 -0
  68. package/dist/lynx/components/alert.css +20 -0
  69. package/dist/lynx/components/button.css +58 -1
  70. package/dist/lynx/components/checkbox-group.css +209 -0
  71. package/dist/lynx/components/checkbox.css +8 -0
  72. package/dist/lynx/components/combobox.css +46 -0
  73. package/dist/lynx/components/dialog.css +19 -0
  74. package/dist/lynx/components/diff.css +5 -0
  75. package/dist/lynx/components/drawer.css +4 -0
  76. package/dist/lynx/components/fieldset.css +219 -0
  77. package/dist/lynx/components/file-upload.css +47 -0
  78. package/dist/lynx/components/input.css +178 -0
  79. package/dist/lynx/components/number-input.css +8 -0
  80. package/dist/lynx/components/pagination.css +16 -0
  81. package/dist/lynx/components/popover.css +37 -0
  82. package/dist/lynx/components/progress.css +4 -24
  83. package/dist/lynx/components/radio-group.css +8 -0
  84. package/dist/lynx/components/rating-group.css +3 -3
  85. package/dist/lynx/components/select.css +70 -1
  86. package/dist/lynx/components/slider.css +391 -28
  87. package/dist/lynx/components/stats.css +146 -16
  88. package/dist/lynx/components/steps.css +4 -0
  89. package/dist/lynx/components/switch.css +6 -0
  90. package/dist/lynx/components/table.css +57 -0
  91. package/dist/lynx/components/tabs.css +115 -93
  92. package/dist/lynx/components/timeline.css +84 -1
  93. package/dist/lynx/components/toast.css +41 -6
  94. package/dist/lynx/components/toggle.css +5 -0
  95. package/dist/lynx/components/tree-view.css +4 -0
  96. package/dist/lynx/index.css +1912 -262
  97. package/dist/lynx/manifest.json +67 -5
  98. package/dist/lynx/tokens.css +4 -4
  99. package/dist/manifest.json +65 -3
  100. package/dist/recipes.d.ts +17 -0
  101. package/dist/recipes.d.ts.map +1 -1
  102. package/dist/recipes.js +1141 -110
  103. package/dist/recipes.js.map +1 -1
  104. package/dist/register.d.ts +18 -0
  105. package/dist/report.json +902 -270
  106. package/dist/tokens.d.ts.map +1 -1
  107. package/dist/tokens.js +18 -4
  108. package/dist/tokens.js.map +1 -1
  109. package/package.json +5 -5
  110. package/src/recipes.ts +1156 -111
  111. 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
@@ -43,8 +73,7 @@ fidelity; the same trade as the ratios below.
43
73
  Five of daisy's own ratios are deliberately moved, and only these five: the
44
74
  unchecked toggle knob and the unfilled rating symbol are base-content at **60%**
45
75
  rather than daisy's 50% and 20%, the rating's default `warning` fill is deepened
46
- **60/40** toward its content pair, the progress bar's fill **90/10** (its
47
- `complete` green **55/45**), and the role **ink** — the colour a transparent or
76
+ **60/40** toward its content pair, the progress bar's fill **90/10**, and the role **ink** — the colour a transparent or
48
77
  tinted surface draws a label, a border, a focus ring or an error message with —
49
78
  is the role mixed toward `--color-base-content`, per role, rather than the raw
50
79
  role token daisy draws with. Each was measured under 3:1 against the surface it
@@ -53,7 +82,8 @@ daisy's 20% reads 1.44:1 on `nord`, a raw-role `neutral` ghost button 1.22:1 in
53
82
  every dark theme, and 5.7.8's own lighter `error` 2.87:1 as message text on
54
83
  white — and 3:1 is the floor a mark owes the reader. The ratios and their
55
84
  per-theme measurements are recorded at each declaration in `src/recipes.ts`;
56
- every other value in this package is daisy's.
85
+ every other value in this package is daisy's, bar the three content-role values
86
+ above.
57
87
 
58
88
  `select`, `combobox` and `number-input` share one field metric — the same
59
89
  `--size-field` height ramp, inset and `--shadow-xs` lift — so two controls in a
@@ -83,6 +113,12 @@ orthogonal: it inks the active tab — `border`'s underline follows via
83
113
  `currentColor` — while `box` fills the active pill with the role and flips
84
114
  its label to the `-content` pair, as daisy's own box examples do.
85
115
 
116
+ The tabs list scrolls inside its own box when it is wider than its column
117
+ (#45), as Pagination and Stats do. It is padded by `--tabs-ring-room` (4px,
118
+ the focus ring's 2px plus its 2px offset), with matching scroll padding, so
119
+ the ring is never clipped. The `box` flavor's own `space-xs` padding is the
120
+ same 4px.
121
+
86
122
  The package declares an **api** (the `defineApi` layer, see
87
123
  `docs/architecture.md` §3.6), so beside `/register` it ships a generated
88
124
  `./components` module — the daisy-native, single-import, fully-typed surface:
@@ -93,6 +129,11 @@ import { Button } from '@sigx/zero-daisyui/components';
93
129
  <Button wide loading variant="dash" color="primary">Save</Button>
94
130
  ```
95
131
 
132
+ It is the one published `./components` module, so `pnpm verify:pack` proves
133
+ it from the packed tarball: a scratch app typechecks daisy-native props
134
+ against the emitted d.ts (with a `@ts-expect-error` probe on a colour daisy
135
+ does not have), and Node loads the module through its `import` export.
136
+
96
137
  Migrating from the old `@sigx/daisyui` package, prop by prop:
97
138
 
98
139
  | old `@sigx/daisyui` Button | `@sigx/zero-daisyui/components` Button |
@@ -155,6 +196,24 @@ every tint in the light theme leaned red — warning's came out pink.
155
196
 
156
197
  On `./components`, `Steps.Item` takes the same `color` union as the Root.
157
198
 
199
+ ## Per-stat colour
200
+
201
+ `<Stats.Item color="warning">` colours one figure's value while the Root's
202
+ `color` paints the rest of the row (#161). The item re-carries the colour
203
+ axis, so the recipe keys `--stats-accent` on `item`; a root colour reaches
204
+ every item exactly as before.
205
+
206
+ Measuring every role on a stat's value for the first time found the raw
207
+ role unreadable as ink in 13 cells: the light theme's `accent`, `info`,
208
+ `success`, `warning` and `error` (1.8–2.9:1), nord's muted roles
209
+ (1.4–2.5:1) and the dark themes' `neutral`, which is darker than the page
210
+ (1.1–1.3:1). The value now takes `roleInk`, the per-role share of the role
211
+ over `base-content` that field and button text already use. Every cell
212
+ clears 3:1 (worst 3.32:1, dim `neutral`); the value is large text, and 12
213
+ cells sit in the 3–4.5:1 band the audit reports as an AA warning.
214
+
215
+ On `./components`, `Stats.Item` takes the same `color` union as the Root.
216
+
158
217
  ## Deriving from this skin: the public hooks
159
218
 
160
219
  A product skin built on this one with `extendDesignSystem` (from