create-bestax 4.2.17 → 4.2.19

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 (52) hide show
  1. package/README.md +13 -5
  2. package/dist/cli.d.ts.map +1 -1
  3. package/dist/cli.js +1 -1
  4. package/dist/constants.d.ts +2 -0
  5. package/dist/constants.d.ts.map +1 -1
  6. package/dist/constants.js +10 -2
  7. package/dist/display.d.ts +9 -0
  8. package/dist/display.d.ts.map +1 -1
  9. package/dist/display.js +19 -1
  10. package/dist/file-system.d.ts +21 -4
  11. package/dist/file-system.d.ts.map +1 -1
  12. package/dist/file-system.js +52 -6
  13. package/dist/library-range.d.ts +16 -0
  14. package/dist/library-range.d.ts.map +1 -0
  15. package/dist/library-range.js +40 -0
  16. package/dist/project-creator.d.ts +16 -1
  17. package/dist/project-creator.d.ts.map +1 -1
  18. package/dist/project-creator.js +39 -7
  19. package/dist/prompts.d.ts +1 -0
  20. package/dist/prompts.d.ts.map +1 -1
  21. package/dist/prompts.js +3 -2
  22. package/dist/validators.d.ts +8 -0
  23. package/dist/validators.d.ts.map +1 -1
  24. package/dist/validators.js +18 -1
  25. package/package.json +8 -8
  26. package/templates/skills/bestax-custom-component/references/component-catalog.md +5 -1
  27. package/templates/skills/bestax-form/SKILL.md +45 -16
  28. package/templates/skills/bestax-form/references/api.md +13 -8
  29. package/templates/skills/bestax-form/references/patterns.md +75 -3
  30. package/templates/skills/bestax-layout-scaffold/SKILL.md +34 -6
  31. package/templates/skills/bestax-layout-scaffold/references/archetypes.md +2 -2
  32. package/templates/skills/bestax-layout-scaffold/references/layout-components.md +52 -5
  33. package/templates/skills/bestax-migrate/SKILL.md +34 -5
  34. package/templates/skills/bestax-migrate/references/bloomer/component-map.md +1 -1
  35. package/templates/skills/bestax-migrate/references/bloomer/prop-map.md +12 -9
  36. package/templates/skills/bestax-migrate/references/bulma-classes/component-map.md +153 -105
  37. package/templates/skills/bestax-migrate/references/bulma-classes/prop-map.md +48 -17
  38. package/templates/skills/bestax-migrate/references/bulma-classes/unmappables.md +501 -16
  39. package/templates/skills/bestax-migrate/references/css-migration.md +12 -1
  40. package/templates/skills/bestax-migrate/references/rbx/prop-map.md +23 -17
  41. package/templates/skills/bestax-migrate/references/react-bulma-components/prop-map.md +27 -22
  42. package/templates/skills/bestax-migrate/references/react-bulma-components/unmappables.md +5 -5
  43. package/templates/skills/bestax-optimize/references/modular-build.md +57 -15
  44. package/templates/skills/bestax-theming/SKILL.md +19 -8
  45. package/templates/skills/bestax-theming/examples/dark-mode.tsx +99 -17
  46. package/templates/skills/bestax-theming/examples/theme-config.tsx +13 -8
  47. package/templates/skills/bestax-theming/references/css-variables.md +231 -18
  48. package/templates/skills/bestax-theming/references/themeable-components.md +4 -0
  49. package/templates/vite/package.json +1 -1
  50. package/templates/vite/src/main.jsx +1 -1
  51. package/templates/vite-ts/package.json +1 -1
  52. package/templates/vite-ts/src/main.tsx +1 -1
@@ -67,9 +67,8 @@ If compiling Bulma's Sass yourself, set the SCSS variables before the CSS variab
67
67
 
68
68
  ## Colors — override the H/S/L trio to recolor
69
69
 
70
- Bulma derives a color's entire palette (shades, light/dark/invert variants) from three channels.
71
- Override the trio; the rest follows automatically. For each color `<c>` ∈ `primary`, `link`,
72
- `info`, `success`, `warning`, `danger`:
70
+ Each color is three channels. For each color `<c>` ∈ `primary`, `link`, `info`, `success`,
71
+ `warning`, `danger`:
73
72
 
74
73
  | Variable | Meaning | `Theme` prop |
75
74
  | --------------- | -------------------------- | ------------------------ |
@@ -77,9 +76,80 @@ Override the trio; the rest follows automatically. For each color `<c>` ∈ `pri
77
76
  | `--bulma-<c>-s` | saturation (`%`) | `<c>S` |
78
77
  | `--bulma-<c>-l` | lightness (`%`) | `<c>L` |
79
78
 
80
- Read-only derived values (set automatically; reference if you need them): `--bulma-<c>` (the
81
- resolved color), `--bulma-<c>-invert`, `--bulma-<c>-light`, `--bulma-<c>-dark`, `--bulma-<c>-rgb`,
82
- and numeric shades `--bulma-<c>-00` … `--bulma-<c>-95`.
79
+ What a runtime trio moves: `--bulma-<c>`, the color itself, follows all three channels. Its
80
+ shades, its light and dark variants, and its invert and on-scheme colors follow the hue and
81
+ saturation, each at a lightness Bulma's Sass build wrote into the stylesheet for the color it was
82
+ given:
83
+
84
+ - the numeric shades `--bulma-<c>-00` … `--bulma-<c>-100` sit on a ramp of lightnesses
85
+ (`--bulma-<c>-<n>-l`) laid out from the built color's own, and `--bulma-<c>-light` and
86
+ `--bulma-<c>-dark` point into it. A new `-l` moves none of them, so a shade is as light as it
87
+ was before; only a Sass build lays the ramp out from a new color.
88
+ - `--bulma-<c>-invert` and `--bulma-<c>-on-scheme` take the lightnesses below, which the build
89
+ picked for contrast.
90
+
91
+ `--bulma-<c>-rgb` is the built color written out as a value, so it follows none of the trio.
92
+
93
+ ### The lightnesses Bulma's build picks for contrast
94
+
95
+ The build picks the label and text lightnesses for each color by their contrast with the color it
96
+ was given. A trio set at runtime leaves them as they were, so when a new color reads lighter or
97
+ darker than the built one, which a change of hue or saturation can do as well as a change of
98
+ lightness, set them too:
99
+
100
+ | Variable | What reads it |
101
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
102
+ | `--bulma-<c>-invert-l` | the label on a solid `<c>` surface: `Button`, `Tag` and `Notification` with `color="<c>"`, a colored `Hero` or `Navbar`, … |
103
+ | `--bulma-<c>-on-scheme-l` | `<c>` text on the page: `textColor="<c>" colorShade="on-scheme"`, a colored `Message`'s body, a field's colored help text, … |
104
+
105
+ For `link`, the on-scheme lightness is also every link on the page (`--bulma-link-text`), so a new
106
+ link color that reads lighter than Bulma's own leaves the page's links pale.
107
+
108
+ bestax's stylesheet builds its primary from a dark blue, so the primary's invert is white
109
+ (`var(--bulma-primary-100-l)`). A light primary set through the trio alone keeps those white
110
+ labels: on stock Bulma's turquoise they read at under 2:1. Its on-scheme lightness was picked for
111
+ the blue too, and is too light for turquoise text on a white page. The other colors are built
112
+ from Bulma's own defaults. For a page made for stock Bulma, the bestax-migrate skill's
113
+ `references/css-migration.md` covers getting its turquoise back.
114
+
115
+ `Theme` doesn't set either one, so set them in your CSS, loaded after the library's styles:
116
+
117
+ - **The invert** is one value for both schemes. Point it at a shade that reads on the new color: a
118
+ near-black `var(--bulma-<c>-05-l)` on a light color, a near-white `var(--bulma-<c>-100-l)` on a
119
+ dark one.
120
+ - **The on-scheme lightness** has to read on the page's background, so Bulma gives each scheme
121
+ its own. A value on `:root` in your stylesheet wins in both, so give dark mode its own value on
122
+ both of its paths, as below.
123
+
124
+ ```css
125
+ /* Stock Bulma's turquoise, with the values from bulma/css/bulma.css. */
126
+ :root {
127
+ --bulma-primary-h: 171deg;
128
+ --bulma-primary-s: 100%;
129
+ --bulma-primary-l: 41%;
130
+ --bulma-primary-invert-l: var(--bulma-primary-05-l);
131
+ --bulma-primary-on-scheme-l: 21%;
132
+ }
133
+ [data-theme='dark'] {
134
+ --bulma-primary-on-scheme-l: 41%;
135
+ }
136
+ @media (prefers-color-scheme: dark) {
137
+ :root:not([data-theme]) {
138
+ --bulma-primary-on-scheme-l: 41%;
139
+ }
140
+ }
141
+ ```
142
+
143
+ For a color of your own, pick each value by its contrast (4.5:1 or more for text), or build
144
+ Bulma's Sass with the color (`@use 'bulma/sass' with ($primary: …)`), which computes both.
145
+
146
+ `textColor="<c>"` alone renders `has-text-<c>`, which reads the trio's own lightness, so text in a
147
+ light color on a light page takes `colorShade="on-scheme"` as well.
148
+
149
+ The build pairs each numbered shade, and the light and dark variants, with a label shade the same
150
+ way (`--bulma-<c>-<n>-invert-l`, `--bulma-<c>-light-invert-l`, `--bulma-<c>-dark-invert-l`),
151
+ picked for the hue and saturation it was given. After a change of hue, check the contrast of text
152
+ you put on a numbered shade.
83
153
 
84
154
  ## Scheme, text, background, border (light/dark surfaces)
85
155
 
@@ -178,6 +248,9 @@ lone class or the `style` prop cannot outrank:
178
248
  its own declaration — target the declaring element in your CSS:
179
249
  `.tooltip-content { --bulma-tooltip-background: … }`.
180
250
 
251
+ The `style` prop also misses on Checkbox and Radio, which put it on their hidden `<input>`; set
252
+ their variables through `className` (see their entries below).
253
+
181
254
  ### Avatar / Avatars / Badge
182
255
 
183
256
  | Variable | Default |
@@ -233,12 +306,22 @@ own-selector override rule applies.
233
306
  `--bulma-carousel-indicator-line-height`, `--bulma-carousel-indicator-line-height-mobile`,
234
307
  `--bulma-carousel-indicator-line-radius`, `--bulma-carousel-indicator-line-width`,
235
308
  `--bulma-carousel-indicator-line-width-mobile`, `--bulma-carousel-indicator-size`,
236
- `--bulma-carousel-indicator-size-mobile`, `--bulma-carousel-overlay-arrow-background`,
309
+ `--bulma-carousel-indicator-size-mobile`, `--bulma-carousel-item-gap`,
310
+ `--bulma-carousel-items-in-view`, `--bulma-carousel-items-to-show`,
311
+ `--bulma-carousel-items-to-show-desktop`, `--bulma-carousel-items-to-show-fullhd`,
312
+ `--bulma-carousel-items-to-show-mobile`, `--bulma-carousel-items-to-show-tablet`,
313
+ `--bulma-carousel-items-to-show-widescreen`, `--bulma-carousel-overlay-arrow-background`,
237
314
  `--bulma-carousel-overlay-arrow-background-hover`, `--bulma-carousel-overlay-arrow-color`,
238
315
  `--bulma-carousel-overlay-indicator-background`,
239
316
  `--bulma-carousel-overlay-indicator-background-active`,
240
317
  `--bulma-carousel-overlay-indicator-background-hover`, `--bulma-carousel-transition-duration`
241
318
 
319
+ `--bulma-carousel-item-gap` (a length, default `0px`) is the space between items in view; set it
320
+ on the carousel's own element through a class. The `--bulma-carousel-items-to-show*` variables
321
+ come from the `itemsToShow*` props, and `--bulma-carousel-items-in-view` is the one of them the
322
+ viewport picks. The props also decide how far a step moves, so set the count with the props
323
+ rather than with these variables.
324
+
242
325
  ### Checkbox
243
326
 
244
327
  `--bulma-checkbox-active-color`, `--bulma-checkbox-background`, `--bulma-checkbox-border-color`,
@@ -247,6 +330,17 @@ own-selector override rule applies.
247
330
  `--bulma-checkbox-label-gap`, `--bulma-checkbox-radius`, `--bulma-checkbox-size`,
248
331
  `--bulma-checkbox-transition-duration`
249
332
 
333
+ The check mark and the mixed dash are both `--bulma-checkbox-check-color`, on the
334
+ `--bulma-checkbox-active-color` (checked) or `--bulma-checkbox-indeterminate-color` (mixed) fill,
335
+ so a dark fill needs a light check color. Set these on a class you pass through `className`, not
336
+ with `style`: Checkbox puts `style` and its other attributes on the hidden `<input>`, not on the
337
+ `.styled-checkbox` label that declares them. Name both classes in the selector
338
+ (`.styled-checkbox.my-box`, mind the class prefix) so it wins whatever order the stylesheets load
339
+ in. A `color` prop declares both fills again on `.styled-checkbox.is-<color>`, which ties with
340
+ that selector, so leave `color` unset when a class sets the fill. The unchecked border, `--bulma-checkbox-border-color`, defaults to `text-weak` so
341
+ the box holds the 3:1 WCAG asks of a control's boundary; keep a replacement at 3:1 against what
342
+ the form sits on.
343
+
250
344
  ### Collapse
251
345
 
252
346
  `--bulma-collapse-border-color`, `--bulma-collapse-group-gap`, `--bulma-collapse-header-weight`,
@@ -258,6 +352,30 @@ items of a `Collapses` group, which reads it with a 0.5rem fallback and declares
258
352
  so set it on the group or on any ancestor, `:root` included. (`Theme`'s `bulmaVars` does not
259
353
  list it, so set it in your CSS or through a `style` prop.)
260
354
 
355
+ ### Combobox
356
+
357
+ Declared on the root, `.combobox`, and again on a menu rendered with `appendToBody`,
358
+ `.combobox-menu.is-portal`, outside the root. A menu in place inherits the root's, so a value set on
359
+ `.combobox` reaches it; for a portaled one, set it on `.combobox-menu.is-portal` as well, where
360
+ they're declared. A lone `.combobox-menu` loses to that on specificity, and
361
+ `.combobox-menu.is-portal` ties, so your rule wins only when it loads after the library styles. Each
362
+ size class (`.is-small`, `.is-medium`, `.is-large`, on the root and on the menu) sets the item size
363
+ and padding, so retune a size on that class. The highlight is the link color and its invert, the
364
+ pair Bulma gives an active dropdown item, and the colors come from Bulma's tokens, so the list
365
+ follows dark mode with no override. The menu reads these rather than Bulma's `--bulma-dropdown-*`,
366
+ which Bulma declares on `.dropdown` alone.
367
+
368
+ `--bulma-combobox-check-color`, `--bulma-combobox-check-gap`, `--bulma-combobox-check-size`,
369
+ `--bulma-combobox-disabled-color`, `--bulma-combobox-divider-color`, `--bulma-combobox-empty-color`,
370
+ `--bulma-combobox-group-label-color`, `--bulma-combobox-group-label-size`,
371
+ `--bulma-combobox-group-label-weight`, `--bulma-combobox-highlight-background`,
372
+ `--bulma-combobox-highlight-color`, `--bulma-combobox-item-color`,
373
+ `--bulma-combobox-item-hover-background`, `--bulma-combobox-item-padding-x`,
374
+ `--bulma-combobox-item-padding-y`, `--bulma-combobox-item-size`, `--bulma-combobox-list-max-height`,
375
+ `--bulma-combobox-menu-background`, `--bulma-combobox-menu-border-color`,
376
+ `--bulma-combobox-menu-offset`, `--bulma-combobox-menu-padding-y`, `--bulma-combobox-menu-radius`,
377
+ `--bulma-combobox-menu-shadow`, `--bulma-combobox-menu-z-index`, `--bulma-combobox-portal-z-index`
378
+
261
379
  ### ContextMenu
262
380
 
263
381
  Both are declared on the box the menu hangs from, `.context-menu-content`, which is portaled away
@@ -368,6 +486,17 @@ Declared on the compound `.button.link-button` — see the compound-selector exc
368
486
  `--bulma-loading-overlay-opacity-opaque`, `--bulma-loading-text-color`,
369
487
  `--bulma-loading-text-size`
370
488
 
489
+ ### Menu
490
+
491
+ `Menu.Section`'s, declared on the root, `.menu`, where Bulma declares its own `--bulma-menu-*`:
492
+ the room between a section heading's words and its chevron, and the chevron's box, color and
493
+ turn. The heading itself reads Bulma's label variables (`--bulma-menu-label-color`,
494
+ `--bulma-menu-label-font-size`, `--bulma-menu-label-letter-spacing`,
495
+ `--bulma-menu-label-spacing`), so retheming the menu's labels restyles section headings too.
496
+
497
+ `--bulma-menu-section-chevron-color`, `--bulma-menu-section-chevron-duration`,
498
+ `--bulma-menu-section-chevron-size`, `--bulma-menu-section-gap`
499
+
371
500
  ### Notification
372
501
 
373
502
  `--bulma-notification-delete-padding-inline-end` is the end padding of a notification with a close
@@ -383,6 +512,16 @@ sizes. Bulma's own `--bulma-notification-*` variables set the rest.
383
512
  `--bulma-numberinput-stepper-button-hover-bg`, `--bulma-numberinput-stepper-button-hover-color`,
384
513
  `--bulma-numberinput-stepper-width`
385
514
 
515
+ ### PinInput
516
+
517
+ Declared on the row, `.pin-input`. Each box is a Bulma `.input`, so Bulma's `--bulma-input-*`
518
+ variables color it, and a box's size comes from its size class. The gap and the caret's size are
519
+ in `em`, so they follow the size of the boxes, and the caret is `currentColor`, the box's text.
520
+
521
+ `--bulma-pin-input-box-width`, `--bulma-pin-input-caret-blink-duration`,
522
+ `--bulma-pin-input-caret-color`, `--bulma-pin-input-caret-height`, `--bulma-pin-input-caret-width`,
523
+ `--bulma-pin-input-gap`
524
+
386
525
  ### Picker popover (DateInput / TimeInput / DateTimeInput / DateRangeInput)
387
526
 
388
527
  `--bulma-picker-popover-animation-duration`, `--bulma-picker-popover-background`,
@@ -410,6 +549,12 @@ them. See the constituent-element exception above.
410
549
  `--bulma-radio-border-width`, `--bulma-radio-dot-color`, `--bulma-radio-focus-shadow-size`,
411
550
  `--bulma-radio-label-gap`, `--bulma-radio-size`, `--bulma-radio-transition-duration`
412
551
 
552
+ As with Checkbox, set these on a class you pass through `className`, with both classes in the
553
+ selector (`.styled-radio.my-radio`): `style` goes to the hidden `<input>`. A `color` prop
554
+ declares `--bulma-radio-active-color` again on `.styled-radio.is-<color>`, which ties that
555
+ selector, so leave `color` unset when a class sets it. The unchecked ring, `--bulma-radio-border-color`, defaults to `text-weak` for the same 3:1 boundary
556
+ contrast.
557
+
413
558
  ### Rate
414
559
 
415
560
  `--bulma-rate-color-active`, `--bulma-rate-color-hover`, `--bulma-rate-color-inactive`,
@@ -502,6 +647,28 @@ them. See the constituent-element exception above.
502
647
  `--bulma-timeinput-wheel-item-height` is registered but has no effect: the component sets each
503
648
  wheel item's height inline.
504
649
 
650
+ ### Timeline
651
+
652
+ Declared on the root, `.timeline`. The states and the color classes set
653
+ `--bulma-timeline-marker-color` for each marker, and the layouts set
654
+ `--bulma-timeline-rail-center`, so retheme the markers through `--bulma-timeline-neutral-color`
655
+ and `--bulma-timeline-active-color` rather than those two. `--bulma-timeline-marker-background`
656
+ fills the upcoming rings and the pending loader, and a reached icon marker's tint is mixed into
657
+ it. It's the page's color by default, so it hides the line behind them. A record's icon circles
658
+ take `--bulma-timeline-marker-icon-background`, which the color classes set. Every size is in
659
+ `em`, so `textSize` scales them all.
660
+
661
+ `--bulma-timeline-active-color`, `--bulma-timeline-content-gap`, `--bulma-timeline-dot-size`,
662
+ `--bulma-timeline-gap`, `--bulma-timeline-halo-offset`, `--bulma-timeline-line-color`,
663
+ `--bulma-timeline-line-width`, `--bulma-timeline-marker-background`,
664
+ `--bulma-timeline-marker-color`, `--bulma-timeline-marker-icon-background`,
665
+ `--bulma-timeline-marker-icon-color`, `--bulma-timeline-marker-size`,
666
+ `--bulma-timeline-neutral-color`, `--bulma-timeline-pending-duration`,
667
+ `--bulma-timeline-pending-size`,
668
+ `--bulma-timeline-rail-center`, `--bulma-timeline-rail-size`, `--bulma-timeline-rail-size-icon`,
669
+ `--bulma-timeline-time-color`, `--bulma-timeline-time-size`, `--bulma-timeline-title-color`,
670
+ `--bulma-timeline-title-weight`
671
+
505
672
  ### Toast
506
673
 
507
674
  `--bulma-toast-action-hover-opacity`, `--bulma-toast-action-radius`,
@@ -525,6 +692,27 @@ trigger and the tooltip past what the pointer can cross on its own, so give the
525
692
  `--bulma-tooltip-multiline-width`, `--bulma-tooltip-padding`, `--bulma-tooltip-radius`,
526
693
  `--bulma-tooltip-z-index`
527
694
 
695
+ ### TreeView
696
+
697
+ Declared on the root, `.tree-view`. A tree looks like Bulma's menu, but the menu's variables
698
+ don't reach it: `--bulma-menu-*` is registered on `.menu` alone, so retheme a tree through these.
699
+ Each default is the base token the matching menu variable defaults to (`scheme-h`, `text-l`,
700
+ `link-l`, `radius-small`, `border` and so on), so a theme's base tokens move the tree and the menu
701
+ together. A selected row swaps in the `item-selected-*` values on its own row, and a row's hover
702
+ and press tints change `--bulma-tree-view-item-background-l-delta` there. A checkbox tree's boxes
703
+ are `Checkbox`'s, themed through `--bulma-checkbox-*`.
704
+
705
+ `--bulma-tree-view-gap`, `--bulma-tree-view-group-border`, `--bulma-tree-view-group-margin`,
706
+ `--bulma-tree-view-group-padding`, `--bulma-tree-view-item-active-background-l-delta`,
707
+ `--bulma-tree-view-item-background-l`, `--bulma-tree-view-item-background-l-delta`,
708
+ `--bulma-tree-view-item-color-l`, `--bulma-tree-view-item-disabled-color`,
709
+ `--bulma-tree-view-item-h`, `--bulma-tree-view-item-hover-background-l-delta`,
710
+ `--bulma-tree-view-item-padding`, `--bulma-tree-view-item-radius`, `--bulma-tree-view-item-s`,
711
+ `--bulma-tree-view-item-selected-background-l`, `--bulma-tree-view-item-selected-color-l`,
712
+ `--bulma-tree-view-item-selected-h`, `--bulma-tree-view-item-selected-s`,
713
+ `--bulma-tree-view-line-height`, `--bulma-tree-view-toggle-color`,
714
+ `--bulma-tree-view-toggle-duration`, `--bulma-tree-view-toggle-size`
715
+
528
716
  ## Dark mode (`Theme colorMode`)
529
717
 
530
718
  Drive the light/dark scheme with the `Theme` component's **`colorMode`** prop —
@@ -554,22 +742,47 @@ custom dark-mode CSS keyed off `[data-theme='dark']` still matches, because `col
554
742
  Under dark mode Bulma flips the scheme/text/border/background lightness variables (e.g.
555
743
  `--bulma-scheme-main-l` 100% → 9%, `--bulma-text-l` 29% → 71%). Your brand color overrides from
556
744
  `Theme isRoot` or `:root` still apply on top, because they set the hue/saturation/lightness
557
- channels directly.
745
+ channels directly. Each color's on-scheme lightness is the exception: Bulma gives dark mode its
746
+ own, so a new color sets one per scheme (see "The lightnesses Bulma's build picks for contrast").
747
+
748
+ ### The scheme of the first paint
749
+
750
+ `Theme` writes the attribute from an effect, and a client-rendered app (the create-bestax
751
+ scaffold, for one) paints before its effects run. That first frame takes whatever `<html>`
752
+ already carries: with nothing there, the visitor's OS scheme, which then flips. So the scheme
753
+ for that frame comes from `index.html`:
754
+
755
+ - **A scheme that never changes** goes on the `<html>` itself,
756
+ `<html lang="en" data-theme="light">`, and needs no `colorMode`.
757
+ - **A scheme the visitor picks** is written by an inline script in `<head>`, from the saved
758
+ choice or else the OS preference, before anything renders. `examples/dark-mode.tsx` has the
759
+ script and the app's side: the app starts from the attribute the script wrote, passes its
760
+ state to `Theme colorMode` for the toggle, and saves each choice in `localStorage` under the
761
+ key the script reads. Keep it a plain inline script: one with `type="module"`, like the app's
762
+ own, waits until the whole page is parsed, which can be after the first paint.
763
+
764
+ A prefixed flavor reads `data-bestax-theme`, so with one, `index.html` and the script write that
765
+ attribute as well.
766
+
767
+ Because the script always writes an attribute, custom dark-mode CSS keyed on `[data-theme='dark']`
768
+ reaches every visitor. To offer the OS preference as a third choice, both sides change. The script
769
+ writes no attribute for a saved `'system'`. The app adds `'system'` to its `ColorMode` and to what
770
+ it reads back from storage, so it passes `colorMode="system"`, which keeps the attribute off, and
771
+ its toggle becomes a choice of three, such as a `SegmentedControl`. With no attribute, Bulma's
772
+ `prefers-color-scheme` rules apply from the first frame and follow the OS when it changes, and
773
+ custom tokens then need both dark-mode paths (below).
558
774
 
559
775
  ### The single-mode contrast trap
560
776
 
561
- Because the OS preference applies whenever no `data-theme` attribute is set — the default state
562
- of every app that never configured `colorMode` — a light-only design silently breaks for any
563
- dark-mode visitor: Bulma's text goes near-white while author-defined fixed tokens stay light —
777
+ Because the OS preference applies whenever no `data-theme` attribute is set, which is the
778
+ default state of every app that never sets one, a light-only design silently breaks for any
779
+ dark-mode visitor: Bulma's text goes near-white while author-defined fixed tokens stay light,
564
780
  white text on cream. The failure is invisible unless the author's own OS is in dark mode.
565
781
 
566
- **If the design is single-mode, pin the scheme** so text can't flip out from under the palette:
567
-
568
- ```tsx
569
- <Theme isRoot colorMode="light">
570
- <App />
571
- </Theme>
572
- ```
782
+ **If the design is single-mode, pin the scheme** on the `<html>` in `index.html`
783
+ (`<html lang="en" data-theme="light">`, as above), so text can't flip out from under the palette.
784
+ `<Theme isRoot colorMode="light">` pins it too, but only from its effect on, after the first
785
+ paint.
573
786
 
574
787
  **If both modes are supported, never expose a fixed custom token to the flip** — derive it from
575
788
  scheme variables, or flip it yourself:
@@ -60,6 +60,7 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
60
60
  | `SubTitle` | — (no `color`; use `textColor`) | `1`–`6` (string or number) | `size` also sets the heading level unless `as="p"` (an `<h1>` with neither): pair `as` with `textSize` instead |
61
61
  | `Autocomplete` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | the 6 only |
62
62
  | `Checkbox` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | the 6 only |
63
+ | `Combobox` | none on the root (`Combobox.Input` takes `Input`'s `color`) | `small \| medium \| large` | sizes the field and the items together; the highlight is `--bulma-combobox-highlight-*`; `--bulma-combobox-*` |
63
64
  | `DateInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded` |
64
65
  | `DateRangeInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded`; `color` also fills the calendar range |
65
66
  | `DateTimeInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded` |
@@ -72,6 +73,7 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
72
73
  | `Loading` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | spinner color; default light grey |
73
74
  | `Navbar` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | — | — |
74
75
  | `Numberinput` | `primary \| link \| info \| success \| warning \| danger \| light \| dark` | `small \| medium \| large` | also `inputColor` (the 6) for the inner input |
76
+ | `PinInput` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | each box is a Bulma `.input`, so `--bulma-input-*` theme it; also `isRounded`; `--bulma-pin-input-*` |
75
77
  | `Pagination` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | **entire `color` prop deprecated** (no CSS ships; dev-warn; removal next major) |
76
78
  | `Panel` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | — | — |
77
79
  | `Progress` | every `validColors` member (the `-bis`/`-ter` shades and the greys deprecated: no CSS, dev-warn, removed next major — see ⚠️) | `small \| medium \| large` | — |
@@ -86,8 +88,10 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
86
88
  | `Taginput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `tagColor` (the 6 + `dark \| light`) for the tags |
87
89
  | `TextArea` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | — |
88
90
  | `TimeInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | — |
91
+ | `Timeline` | `primary \| link \| info \| success \| warning \| danger` (the markers and the progress, never the text) | no `size` (sized in `em`; size it with `textSize`) | `Timeline.Item` takes `color` too, over the root's; neutral with no `color`, and progress in `link`; retheme through `--bulma-timeline-*` |
89
92
  | `ToggleButton` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | fills only while pressed (default `link`); **no `isLight`/`isOutlined`/`isInverted`/`textColor`/`bgColor`** |
90
93
  | `Tooltip` | `primary \| link \| info \| success \| warning \| danger \| dark \| light` | `small \| medium \| large` | — |
94
+ | `TreeView` | only the text helper, which doesn't reach the rows: each row sets its own text color, so retheme them through `--bulma-tree-view-*` | `small \| medium \| large` | the menu's sizes; its variables copy the menu's defaults, and `--bulma-menu-*` doesn't reach it; the boxes are `Checkbox`'s |
91
95
  | `Tr` / `Td` / `Th` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | — | cell background; cells take `textAlign`/`textWeight`/`textSize` directly |
92
96
 
93
97
  The 6 brand colors (`primary, link, info, success, warning, danger`) are the ones a custom theme
@@ -10,7 +10,7 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@allxsmith/bestax-bulma": "^5.0.0",
13
+ "@allxsmith/bestax-bulma": "workspace:^",
14
14
  "react": "^19.2.3",
15
15
  "react-dom": "^19.2.3"
16
16
  },
@@ -2,7 +2,7 @@ import { StrictMode } from 'react';
2
2
  import { createRoot } from 'react-dom/client';
3
3
 
4
4
  // Bestax's stylesheet loads before the app's own CSS, so a named class in
5
- // src/App.css wins over a Bulma rule of the same weight.
5
+ // src/index.css wins over a Bulma rule of the same weight.
6
6
  import '@allxsmith/bestax-bulma/bestax.css';
7
7
  import './index.css';
8
8
  import App from './App.jsx';
@@ -10,7 +10,7 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
- "@allxsmith/bestax-bulma": "^5.0.0",
13
+ "@allxsmith/bestax-bulma": "workspace:^",
14
14
  "react": "^19.2.3",
15
15
  "react-dom": "^19.2.3"
16
16
  },
@@ -2,7 +2,7 @@ import { StrictMode } from 'react';
2
2
  import { createRoot } from 'react-dom/client';
3
3
 
4
4
  // Bestax's stylesheet loads before the app's own CSS, so a named class in
5
- // src/App.css wins over a Bulma rule of the same weight.
5
+ // src/index.css wins over a Bulma rule of the same weight.
6
6
  import '@allxsmith/bestax-bulma/bestax.css';
7
7
  import './index.css';
8
8
  import App from './App.tsx';