create-bestax 4.2.15 → 4.2.17
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/dist/constants.js +2 -2
- package/package.json +6 -6
- package/templates/skills/bestax-custom-component/SKILL.md +36 -1
- package/templates/skills/bestax-custom-component/references/api.md +36 -14
- package/templates/skills/bestax-custom-component/references/component-catalog.md +8 -2
- package/templates/skills/bestax-custom-component/references/library-contributor.md +4 -1
- package/templates/skills/bestax-form/SKILL.md +42 -29
- package/templates/skills/bestax-form/references/api.md +12 -10
- package/templates/skills/bestax-form/references/patterns.md +17 -5
- package/templates/skills/bestax-icons/SKILL.md +8 -1
- package/templates/skills/bestax-icons/references/icon-libraries.md +35 -2
- package/templates/skills/bestax-layout-scaffold/SKILL.md +34 -1
- package/templates/skills/bestax-layout-scaffold/references/archetypes.md +57 -0
- package/templates/skills/bestax-migrate/references/bloomer/prop-map.md +34 -8
- package/templates/skills/bestax-migrate/references/bloomer/unmappables.md +18 -0
- package/templates/skills/bestax-migrate/references/rbx/prop-map.md +31 -7
- package/templates/skills/bestax-migrate/references/rbx/unmappables.md +41 -14
- package/templates/skills/bestax-migrate/references/react-bulma-components/component-map.md +3 -3
- package/templates/skills/bestax-migrate/references/react-bulma-components/prop-map.md +22 -0
- package/templates/skills/bestax-migrate/references/react-bulma-components/unmappables.md +33 -8
- package/templates/skills/bestax-optimize/SKILL.md +2 -0
- package/templates/skills/bestax-optimize/references/modular-build.md +19 -10
- package/templates/skills/bestax-theming/SKILL.md +4 -1
- package/templates/skills/bestax-theming/references/css-variables.md +87 -2
- package/templates/skills/bestax-theming/references/themeable-components.md +6 -2
- package/templates/vite-ts/package.json +1 -0
- package/templates/vite-ts/tsconfig.app.json +10 -9
- package/templates/vite-ts/tsconfig.node.json +15 -5
- package/templates/vite-ts/src/vite-env.d.ts +0 -1
|
@@ -13,7 +13,9 @@ theming means overriding the right `--bulma-*` values.
|
|
|
13
13
|
- `isRoot` → injects the variables globally at `:root` (use once, at the app root).
|
|
14
14
|
- without `isRoot` → wraps children in a `<div>` and scopes the variables to that subtree.
|
|
15
15
|
- Named props set the color/scheme HSL channels and common values (see "Theme props" below).
|
|
16
|
-
- `bulmaVars` sets any other variable, keyed by its real `--bulma-*` name
|
|
16
|
+
- `bulmaVars` sets any other variable, keyed by its real `--bulma-*` name. It only changes
|
|
17
|
+
variables the component inherits, though: see "Component variables" below for the ones Bulma
|
|
18
|
+
declares on the component itself.
|
|
17
19
|
|
|
18
20
|
```tsx
|
|
19
21
|
<Theme
|
|
@@ -101,6 +103,29 @@ and numeric shades `--bulma-<c>-00` … `--bulma-<c>-95`.
|
|
|
101
103
|
| `--bulma-size-small` / `-normal` / `-medium` / `-large` | 0.75 / 1 / 1.25 / 1.5rem | via `bulmaVars` |
|
|
102
104
|
| `--bulma-weight-light/normal/medium/semibold/bold/extrabold` | 300 / 400 / 500 / 600 / 700 / 800 | via `bulmaVars` |
|
|
103
105
|
|
|
106
|
+
## Component variables: set them on the component, not on `Theme`
|
|
107
|
+
|
|
108
|
+
A custom property set on an ancestor only reaches an element that declares no value of its own.
|
|
109
|
+
Bulma declares the scheme, color, typography, radius and spacing tokens on `:root`, so `Theme`
|
|
110
|
+
(scoped or `isRoot`) and plain `:root` CSS both work for them. Some of those Bulma also declares
|
|
111
|
+
again on one component, which keeps its own value while everything else takes yours; that
|
|
112
|
+
component's API page lists the variable as declared on it, and `Theme` doesn't warn about these.
|
|
113
|
+
To change that one component too, set the variable on it as described below.
|
|
114
|
+
|
|
115
|
+
Bulma's per-component variables (`--bulma-card-radius`, `--bulma-tag-h`,
|
|
116
|
+
`--bulma-delete-dimensions`, …) are declared on the component's own element instead (`.card`,
|
|
117
|
+
`.tag`, `.delete`), so a value set on any ancestor, including `Theme`'s `bulmaVars`, always loses
|
|
118
|
+
and nothing changes. `bulmaVars` still accepts those keys, and `Theme` logs a development warning
|
|
119
|
+
naming them.
|
|
120
|
+
|
|
121
|
+
Set a component variable on the component itself: in your CSS on its own class, loaded after
|
|
122
|
+
the library styles (mind the class prefix), e.g. `.card { --bulma-card-radius: 1.5rem; }`, on a
|
|
123
|
+
class you pass through `className`, or with the component's `style` prop. A size or color
|
|
124
|
+
modifier can declare the variable again on a more specific selector (`.delete.is-small`), which a
|
|
125
|
+
lone class loses to and `style` does not. Each component's API page lists its variables under
|
|
126
|
+
**CSS & Sass Variables** and says where Bulma declares them; the extras below follow the same
|
|
127
|
+
rule.
|
|
128
|
+
|
|
104
129
|
## Shadow — override the upstream token, not the derived one
|
|
105
130
|
|
|
106
131
|
`--bulma-shadow` (plus its `--bulma-shadow-h`/`-s`/`-l` channels) is a real Bulma variable that
|
|
@@ -145,7 +170,9 @@ lone class or the `style` prop cannot outrank:
|
|
|
145
170
|
styles with a selector that matches or exceeds the compound:
|
|
146
171
|
`.button.link-button { --bulma-link-button-ghost-color: … }`.
|
|
147
172
|
- **Constituent elements** — Tooltip's variables (all but `--bulma-tooltip-dashed-color`)
|
|
148
|
-
are declared on `.tooltip-content`, Popover's on its panel, `.popover-content`,
|
|
173
|
+
are declared on `.tooltip-content`, Popover's on its panel, `.popover-content`, HoverCard's
|
|
174
|
+
on its card, `.hover-card-content`, ContextMenu's on the box its menu hangs from,
|
|
175
|
+
`.context-menu-content`, and Sidebar's
|
|
149
176
|
`--bulma-sidebar-overlay-background` on `.sidebar-background`. Values set via `className` or
|
|
150
177
|
`style` land on the component root and are only inherited by the constituent, so they lose to
|
|
151
178
|
its own declaration — target the declaring element in your CSS:
|
|
@@ -231,6 +258,18 @@ items of a `Collapses` group, which reads it with a 0.5rem fallback and declares
|
|
|
231
258
|
so set it on the group or on any ancestor, `:root` included. (`Theme`'s `bulmaVars` does not
|
|
232
259
|
list it, so set it in your CSS or through a `style` prop.)
|
|
233
260
|
|
|
261
|
+
### ContextMenu
|
|
262
|
+
|
|
263
|
+
Both are declared on the box the menu hangs from, `.context-menu-content`, which is portaled away
|
|
264
|
+
from the trigger. See the constituent-element exception above.
|
|
265
|
+
|
|
266
|
+
`--bulma-context-menu-max-height`, `--bulma-context-menu-z-index`
|
|
267
|
+
|
|
268
|
+
The menu inside that box is Bulma's dropdown markup, and the box is a `.dropdown` too, so the
|
|
269
|
+
`--bulma-dropdown-*` variables theme it. Bulma declares them on `.dropdown`, so a context menu
|
|
270
|
+
takes a value set on the box: `.dropdown.context-menu-content { --bulma-dropdown-content-radius: … }`
|
|
271
|
+
changes context menus and leaves `Dropdown` alone.
|
|
272
|
+
|
|
234
273
|
### DateInput
|
|
235
274
|
|
|
236
275
|
`--bulma-dateinput-cell-color`, `--bulma-dateinput-cell-disabled-color`,
|
|
@@ -272,6 +311,40 @@ The field around the two inputs. Its calendar is the `DateInput` one, with the v
|
|
|
272
311
|
`--bulma-dialog-radius`, `--bulma-dialog-shadow`, `--bulma-dialog-title-color`,
|
|
273
312
|
`--bulma-dialog-title-size`, `--bulma-dialog-title-weight`, `--bulma-dialog-width`
|
|
274
313
|
|
|
314
|
+
### EmptyState
|
|
315
|
+
|
|
316
|
+
Declared on the root, `.empty-state`. Each size class (`.is-small`, `.is-medium`, `.is-large`)
|
|
317
|
+
sets its own gap, padding, indicator and icon sizes, and title and description sizes, so retune a
|
|
318
|
+
size on that class. The color classes and `.is-filled` set the indicator's background and color
|
|
319
|
+
from Bulma's scheme tokens, so the circle follows dark mode with no override. The description is
|
|
320
|
+
`currentColor`, so it reads on whatever surface holds it.
|
|
321
|
+
|
|
322
|
+
`--bulma-empty-state-description-color`, `--bulma-empty-state-description-max-width`,
|
|
323
|
+
`--bulma-empty-state-description-size`, `--bulma-empty-state-gap`, `--bulma-empty-state-icon-size`,
|
|
324
|
+
`--bulma-empty-state-indicator-background`, `--bulma-empty-state-indicator-color`,
|
|
325
|
+
`--bulma-empty-state-indicator-radius`, `--bulma-empty-state-indicator-size`,
|
|
326
|
+
`--bulma-empty-state-padding`, `--bulma-empty-state-title-size`
|
|
327
|
+
|
|
328
|
+
### HoverCard
|
|
329
|
+
|
|
330
|
+
All are declared on the card, `.hover-card-content`, so a card rendered with `appendToBody` keeps
|
|
331
|
+
them. See the constituent-element exception above.
|
|
332
|
+
|
|
333
|
+
`--bulma-hover-card-animation-duration`, `--bulma-hover-card-background`,
|
|
334
|
+
`--bulma-hover-card-border-color`, `--bulma-hover-card-color`, `--bulma-hover-card-max-width`,
|
|
335
|
+
`--bulma-hover-card-min-width`, `--bulma-hover-card-offset`, `--bulma-hover-card-padding`,
|
|
336
|
+
`--bulma-hover-card-radius`, `--bulma-hover-card-shadow`, `--bulma-hover-card-z-index`
|
|
337
|
+
|
|
338
|
+
### Kbd
|
|
339
|
+
|
|
340
|
+
Declared on each key, `.kbd`. The border color and the fill default to `color-mix()` of
|
|
341
|
+
`currentColor` with `transparent`, so a key follows its text in dark mode, in a filled button and
|
|
342
|
+
in a tooltip without an override of its own. The sizes are in `em`, so `textSize` scales them.
|
|
343
|
+
|
|
344
|
+
`--bulma-kbd-background`, `--bulma-kbd-border-bottom-width`, `--bulma-kbd-border-color`,
|
|
345
|
+
`--bulma-kbd-border-width`, `--bulma-kbd-color`, `--bulma-kbd-family`, `--bulma-kbd-padding`,
|
|
346
|
+
`--bulma-kbd-radius`, `--bulma-kbd-size`, `--bulma-kbd-weight`
|
|
347
|
+
|
|
275
348
|
### LinkButton
|
|
276
349
|
|
|
277
350
|
Declared on the compound `.button.link-button` — see the compound-selector exception above.
|
|
@@ -295,6 +368,14 @@ Declared on the compound `.button.link-button` — see the compound-selector exc
|
|
|
295
368
|
`--bulma-loading-overlay-opacity-opaque`, `--bulma-loading-text-color`,
|
|
296
369
|
`--bulma-loading-text-size`
|
|
297
370
|
|
|
371
|
+
### Notification
|
|
372
|
+
|
|
373
|
+
`--bulma-notification-delete-padding-inline-end` is the end padding of a notification with a close
|
|
374
|
+
button, which keeps the text clear of the button. It applies with `hasDelete`, and to a `Delete`
|
|
375
|
+
passed as a direct child in browsers that support `:has()`. It is the padding for a default-size
|
|
376
|
+
button: a `Delete` passed in with a `size` gets it plus or minus the difference between the two
|
|
377
|
+
sizes. Bulma's own `--bulma-notification-*` variables set the rest.
|
|
378
|
+
|
|
298
379
|
### Numberinput
|
|
299
380
|
|
|
300
381
|
`--bulma-numberinput-disabled-opacity`, `--bulma-numberinput-rounded-button-size`,
|
|
@@ -434,6 +515,10 @@ wheel item's height inline.
|
|
|
434
515
|
All but `--bulma-tooltip-dashed-color` are declared on `.tooltip-content` — see the
|
|
435
516
|
constituent-element exception above.
|
|
436
517
|
|
|
518
|
+
Raising `--bulma-tooltip-arrow-size` or `--bulma-tooltip-arrow-margin` widens the gap between the
|
|
519
|
+
trigger and the tooltip past what the pointer can cross on its own, so give the tooltip a
|
|
520
|
+
`closeDelay` long enough to cross it.
|
|
521
|
+
|
|
437
522
|
`--bulma-tooltip-arrow-margin`, `--bulma-tooltip-arrow-size`, `--bulma-tooltip-background`,
|
|
438
523
|
`--bulma-tooltip-color`, `--bulma-tooltip-dashed-color`, `--bulma-tooltip-font-size`,
|
|
439
524
|
`--bulma-tooltip-font-weight`, `--bulma-tooltip-line-height`, `--bulma-tooltip-max-width`,
|
|
@@ -56,15 +56,17 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
|
|
|
56
56
|
| `Input` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | also `isRounded`, `isStatic` |
|
|
57
57
|
| `Avatar` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `16x16 \| 24x24 \| 32x32 \| 48x48 \| 64x64 \| 96x96 \| 128x128 \| number` | initials/icon background (auto-derived from `name` when unset); also `shape` |
|
|
58
58
|
| `Badge` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | — | pill background; default `danger` |
|
|
59
|
-
| `Title` | — (no `color`; use `textColor`) | `1`–`6` (string or number) | also `isSpaced`
|
|
60
|
-
| `SubTitle` | — (no `color`; use `textColor`) | `1`–`6` (string or number) |
|
|
59
|
+
| `Title` | — (no `color`; use `textColor`) | `1`–`6` (string or number) | also `isSpaced`; `size` also sets the heading level unless `as="p"`: pair `as` with `textSize` instead |
|
|
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
63
|
| `DateInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded` |
|
|
64
64
|
| `DateRangeInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded`; `color` also fills the calendar range |
|
|
65
65
|
| `DateTimeInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded` |
|
|
66
|
+
| `EmptyState` | `primary \| link \| info \| success \| warning \| danger` (the indicator circle and its icon only, never the text) | `small \| normal \| medium \| large` | also `variant`: `light` (default) \| `filled`; neutral with no `color`; tint text with `textColor`; `--bulma-empty-state-*` |
|
|
66
67
|
| `File` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | also `isBoxed`, `isFullwidth` |
|
|
67
68
|
| `Hero` | every `validColors` member + `inherit`/`current` (the `-bis`/`-ter` shades, the greys, `inherit` and `current` deprecated: no CSS, dev-warn, removed next major — see ⚠️) | `small \| medium \| large \| fullheight \| fullheight-with-navbar` | section background |
|
|
69
|
+
| `Kbd` | — (no `color`: the edge and fill are mixed from the text color, so `textColor` tints them; `bgColor` replaces the fill, so pair it with a `textColor`) | — (sized in `em` from the text around it; size it with `textSize`) | one keycap look, no `variant`; `Kbd.Group` takes `textColor` too; retheme through `--bulma-kbd-*` |
|
|
68
70
|
| `LinkButton` | `primary \| link \| info \| success \| warning \| danger \| white \| light \| dark \| black` | — | button-styled link; emits `link-button-<color>` — **no `isLight`/`isOutlined`/`isInverted`** |
|
|
69
71
|
| `Loader` | — (no color props: the ring is drawn in `--bulma-border`) | — (the ring is `1em`; size it with `textSize`) | for a colored spinner over a region, use `Loading` |
|
|
70
72
|
| `Loading` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | spinner color; default light grey |
|
|
@@ -75,6 +77,7 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
|
|
|
75
77
|
| `Progress` | every `validColors` member (the `-bis`/`-ter` shades and the greys deprecated: no CSS, dev-warn, removed next major — see ⚠️) | `small \| medium \| large` | — |
|
|
76
78
|
| `Radio` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | the 6 only |
|
|
77
79
|
| `Rate` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | the 6 only |
|
|
80
|
+
| `SegmentedControl` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | fills only the checked segment (default `link`); `size` is the row's `are-<size>`; segments take no `color` or `size` |
|
|
78
81
|
| `Select` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | also `isRounded` |
|
|
79
82
|
| `Slider` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `isRounded`, `isCircle` |
|
|
80
83
|
| `Steps` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | the 6 only |
|
|
@@ -83,6 +86,7 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
|
|
|
83
86
|
| `Taginput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | also `tagColor` (the 6 + `dark \| light`) for the tags |
|
|
84
87
|
| `TextArea` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | `small \| medium \| large` | — |
|
|
85
88
|
| `TimeInput` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | — |
|
|
89
|
+
| `ToggleButton` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | fills only while pressed (default `link`); **no `isLight`/`isOutlined`/`isInverted`/`textColor`/`bgColor`** |
|
|
86
90
|
| `Tooltip` | `primary \| link \| info \| success \| warning \| danger \| dark \| light` | `small \| medium \| large` | — |
|
|
87
91
|
| `Tr` / `Td` / `Th` | `primary \| link \| info \| success \| warning \| danger \| black \| dark \| light \| white` | — | cell background; cells take `textAlign`/`textWeight`/`textSize` directly |
|
|
88
92
|
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"useDefineForClassFields": true,
|
|
5
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
-
"module": "ESNext",
|
|
7
|
-
"skipLibCheck": true,
|
|
8
3
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "es2023",
|
|
5
|
+
"lib": ["ES2023", "DOM"],
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"types": ["vite/client"],
|
|
8
|
+
"allowArbitraryExtensions": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
9
10
|
|
|
10
11
|
/* Bundler mode */
|
|
11
12
|
"moduleResolution": "bundler",
|
|
12
13
|
"allowImportingTsExtensions": true,
|
|
13
|
-
"
|
|
14
|
-
"
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
15
16
|
"noEmit": true,
|
|
16
17
|
"jsx": "react-jsx",
|
|
17
18
|
|
|
18
19
|
/* Linting */
|
|
19
|
-
"strict": true,
|
|
20
20
|
"noUnusedLocals": true,
|
|
21
21
|
"noUnusedParameters": true,
|
|
22
|
+
"erasableSyntaxOnly": true,
|
|
22
23
|
"noFallthroughCasesInSwitch": true
|
|
23
24
|
},
|
|
24
25
|
"include": ["src"]
|
|
25
|
-
}
|
|
26
|
+
}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "es2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"types": ["node"],
|
|
4
7
|
"skipLibCheck": true,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"module": "nodenext",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
13
|
+
"moduleDetection": "force",
|
|
8
14
|
"noEmit": true,
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
|
|
16
|
+
/* Linting */
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"erasableSyntaxOnly": true,
|
|
20
|
+
"noFallthroughCasesInSwitch": true
|
|
11
21
|
},
|
|
12
22
|
"include": ["vite.config.ts"]
|
|
13
23
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|