bestax-mcp 1.15.13 → 1.16.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/data/bulma-classes.json +3 -1
- package/data/catalog.json +3 -3
- package/data/components/Button.json +1 -1
- package/data/components/Buttons.json +3 -3
- package/data/components/Dialog.json +1 -1
- package/data/components/LinkButton.json +1 -1
- package/data/components/Loader.json +1 -1
- package/data/components/Modal.json +1 -1
- package/data/components/Navbar.json +26 -0
- package/data/components/Popover.json +1 -1
- package/data/components/Sidebar.json +3 -3
- package/data/components/ToggleButton.json +1 -1
- package/data/skills/bestax-layout-scaffold/references/layout-components.md +8 -1
- package/data/skills/bestax-migrate/references/bulma-classes/prop-map.md +4 -4
- package/data/skills/bestax-optimize/references/modular-build.md +4 -4
- package/data/skills.json +3 -3
- package/dist/bulma-classes.d.ts +8 -0
- package/dist/bulma-classes.d.ts.map +1 -1
- package/dist/bulma-classes.js +16 -5
- package/package.json +2 -2
package/data/bulma-classes.json
CHANGED
|
@@ -2441,7 +2441,9 @@
|
|
|
2441
2441
|
"is-fixed-bottom": {
|
|
2442
2442
|
"writes": [{ "prop": "fixed", "value": "bottom" }]
|
|
2443
2443
|
},
|
|
2444
|
-
"is-transparent": { "writes": [{ "prop": "transparent" }] }
|
|
2444
|
+
"is-transparent": { "writes": [{ "prop": "transparent" }] },
|
|
2445
|
+
"is-spaced": { "writes": [{ "prop": "isSpaced" }] },
|
|
2446
|
+
"has-shadow": { "writes": [{ "prop": "hasShadow" }] }
|
|
2445
2447
|
},
|
|
2446
2448
|
"omits": {},
|
|
2447
2449
|
"wrapsChildren": null,
|
package/data/catalog.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"generatedFrom": {
|
|
4
4
|
"package": "@allxsmith/bestax-bulma",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.39.0"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -771,8 +771,8 @@
|
|
|
771
771
|
"slug": "components/navbar",
|
|
772
772
|
"import": "import { Navbar } from '@allxsmith/bestax-bulma';",
|
|
773
773
|
"compound": true,
|
|
774
|
-
"propCount":
|
|
775
|
-
"exampleCount":
|
|
774
|
+
"propCount": 57,
|
|
775
|
+
"exampleCount": 19
|
|
776
776
|
},
|
|
777
777
|
{
|
|
778
778
|
"name": "Notification",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"name": "isLoading",
|
|
164
164
|
"type": "boolean",
|
|
165
165
|
"default": "false",
|
|
166
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
166
|
+
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
167
167
|
"required": false,
|
|
168
168
|
"inherited": false,
|
|
169
169
|
"deprecated": false
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"name": "isLoading",
|
|
194
194
|
"type": "boolean",
|
|
195
195
|
"default": "false",
|
|
196
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
196
|
+
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
197
197
|
"required": false,
|
|
198
198
|
"inherited": false,
|
|
199
199
|
"deprecated": false
|
|
@@ -387,7 +387,7 @@
|
|
|
387
387
|
"name": "isLoading",
|
|
388
388
|
"type": "boolean",
|
|
389
389
|
"default": "false",
|
|
390
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
390
|
+
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
391
391
|
"required": false,
|
|
392
392
|
"inherited": true,
|
|
393
393
|
"deprecated": false
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
"name": "isLoading",
|
|
564
564
|
"type": "boolean",
|
|
565
565
|
"default": "false",
|
|
566
|
-
"description": "Shows Bulma's spinner in place of the label and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
566
|
+
"description": "Shows Bulma's spinner in place of the label and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
567
567
|
"required": false,
|
|
568
568
|
"inherited": false,
|
|
569
569
|
"deprecated": false
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"code": "function example() {\n const [showDialog, setShowDialog] = useState(false);\n return (\n <Block>\n <Button onClick={() => setShowDialog(true)}>Show Portaled Dialog</Button>\n <Dialog\n isOpen={showDialog}\n title=\"Portaled Dialog\"\n message=\"This dialog is portaled, so it escapes any ancestor with overflow: hidden.\"\n onConfirm={() => setShowDialog(false)}\n showCancel={false}\n portal\n />\n </Block>\n );\n}"
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
|
-
"accessibility": "- Uses `role=\"alertdialog\"` for proper screen reader announcement\n- Has `aria-modal=\"true\"` to indicate modal behavior — note this does not make background content inert; no `inert` attribute is applied, so background content stays reachable by pointer\n- `title` is wired up as `aria-labelledby` and `message` as `aria-describedby`\n- Focus moves to the confirm (or cancel, with `focusCancel`) button when opened\n- Escape key closes the dialog (when `canCancel` is true). The underlying [`Modal`](https://bestax.io/docs/api/components/modal#accessibility) handles it, so one Escape closes the topmost overlay only: a dialog opened over a Modal or a [Sidebar](https://bestax.io/docs/api/components/sidebar) closes first, and the one under it on the next Escape\n- Tab and Shift+Tab cycle within the dialog while it is the topmost overlay, also from the underlying [`Modal`](https://bestax.io/docs/api/components/modal)\n- Body scroll is prevented when dialog is open, through the ref-counted lock shared with `Modal`, `Sidebar` and `Loading`\n- Confirm/cancel buttons are keyboard accessible",
|
|
33
|
+
"accessibility": "- Uses `role=\"alertdialog\"` for proper screen reader announcement\n- Has `aria-modal=\"true\"` to indicate modal behavior — note this does not make background content inert; no `inert` attribute is applied, so background content stays reachable by pointer\n- `title` is wired up as `aria-labelledby` and `message` as `aria-describedby`\n- Focus moves to the confirm (or cancel, with `focusCancel`) button when opened\n- Escape key closes the dialog (when `canCancel` is true). The underlying [`Modal`](https://bestax.io/docs/api/components/modal#accessibility) handles it, so one Escape closes the topmost overlay only: a dialog opened over a Modal or a [Sidebar](https://bestax.io/docs/api/components/sidebar) closes first, and the one under it on the next Escape\n- Tab and Shift+Tab cycle within the dialog while it is the topmost modal overlay, also from the underlying [`Modal`](https://bestax.io/docs/api/components/modal)\n- Body scroll is prevented when dialog is open, through the ref-counted lock shared with `Modal`, `Sidebar` and `Loading`\n- Confirm/cancel buttons are keyboard accessible",
|
|
34
34
|
"related": ["Modal", "Toast"],
|
|
35
35
|
"storybook": "https://bestax.io/storybook/?path=/story/components-dialog",
|
|
36
36
|
"summary": "The `Dialog` component provides ready-made confirm and alert dialogs, so a destructive action stays one `await dialog.confirm()` call away.",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"name": "isLoading",
|
|
109
109
|
"type": "boolean",
|
|
110
110
|
"default": "false",
|
|
111
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
111
|
+
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
112
112
|
"required": false,
|
|
113
113
|
"inherited": true,
|
|
114
114
|
"deprecated": false
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"code": "<Box aria-busy=\"true\">\n <Loader textSize=\"3\" mx=\"auto\" ariaLabel=\"Loading account details\" />\n</Box>"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
|
-
"accessibility": "- **Role:** `Loader` renders `role=\"progressbar\"` with no `aria-valuenow`, which is how ARIA marks\n progress of unknown length.\n- **Name:** the accessible name comes from `ariaLabel` (default `'Loading'`). Name what is loading\n when it helps (`\"Saving Ada Lovelace\"`), or point `aria-labelledby` at visible text beside it.\n- **Announcements:** a progressbar is not a live region, so a loader appearing is not announced\n on its own. Screen reader users find it by reading the page. To announce that loading started or\n finished, change the text of a live region that is already on the page.\n- **Busy regions:** set `aria-busy=\"true\"` on the region the loader stands in for, and remove it\n when the content arrives.\n- **Reduced motion:** under `prefers-reduced-motion: reduce` the ring stops spinning and stays\n drawn, so the loading state is still visible. That rule ships in bestax's stylesheets:\n `bestax.css` and its variants, or `extras.css` next to your own Bulma, in either order.\n- **Forced colors:** Bulma leaves two sides of the ring transparent, and a contrast theme paints\n those in the text color like any other border, which would close the ring. In forced colors,\n bestax paints those two sides in `Canvas`, the page's own color, so the ring stays open. That\n goes for the `isLoading` rings on
|
|
26
|
+
"accessibility": "- **Role:** `Loader` renders `role=\"progressbar\"` with no `aria-valuenow`, which is how ARIA marks\n progress of unknown length.\n- **Name:** the accessible name comes from `ariaLabel` (default `'Loading'`). Name what is loading\n when it helps (`\"Saving Ada Lovelace\"`), or point `aria-labelledby` at visible text beside it.\n- **Announcements:** a progressbar is not a live region, so a loader appearing is not announced\n on its own. Screen reader users find it by reading the page. To announce that loading started or\n finished, change the text of a live region that is already on the page.\n- **Busy regions:** set `aria-busy=\"true\"` on the region the loader stands in for, and remove it\n when the content arrives.\n- **Reduced motion:** under `prefers-reduced-motion: reduce` the ring stops spinning and stays\n drawn, so the loading state is still visible. That rule ships in bestax's stylesheets:\n `bestax.css` and its variants, or `extras.css` next to your own Bulma, in either order.\n- **Forced colors:** Bulma leaves two sides of the ring transparent, and a contrast theme paints\n those in the text color like any other border, which would close the ring. In forced colors,\n bestax paints those two sides in `Canvas`, the page's own color, so the ring stays open. That\n goes for the `isLoading` rings on controls and selects too. A loading button names its own\n colors there, so its ring is drawn in the button's border color and open onto the button. It\n ships in the same stylesheets as the reduced-motion rule.",
|
|
27
27
|
"related": ["Button", "Loading", "Progress", "Skeleton", "useBulmaClasses"],
|
|
28
28
|
"storybook": "https://bestax.io/storybook/?path=/story/elements-loader--default",
|
|
29
29
|
"summary": "The `Loader` component renders Bulma's `.loader`, a small spinning ring for inline loading states. The ring is `1em` square, so `textSize` scales it. It is exposed as an indeterminate `progressbar` named by `ariaLabel`, and it stops spinning under `prefers-reduced-motion: reduce` while staying drawn. In forced colors its two open sides take the page's color, so it stays open.",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"code": "function example() {\n const [open, setOpen] = useState(false);\n const closeModal = () => setOpen(false);\n\n return (\n <>\n <Button color=\"success\" onClick={() => setOpen(true)}>\n Show Modal\n </Button>\n <Modal isActive={open}>\n <Modal.Background onClick={closeModal} />\n <Modal.Content>\n <Box>\n <Title size=\"4\">Custom Content</Title>\n <Paragraph>Using compound components for full control!</Paragraph>\n </Box>\n </Modal.Content>\n <Modal.Close variant=\"floating\" onClick={closeModal} />\n </Modal>\n </>\n );\n}"
|
|
47
47
|
}
|
|
48
48
|
],
|
|
49
|
-
"accessibility": "- The modal root gets `role=\"dialog\"` and `aria-modal=\"true\"` while active — pass an explicit `role` to override (e.g. `Dialog` passes `role=\"presentation\"` on the `Modal` it wraps so its own `role=\"alertdialog\"` is the only one announced).\n- **Give the dialog an accessible name.** With the legacy API, `modalCardTitle` is wired up as `aria-labelledby` for you. With the compound API, pass your own `aria-label` or `aria-labelledby` on `<Modal>` — a `role=\"dialog\"` with no name is announced as just \"dialog\". An explicit `aria-labelledby` always wins over the generated one.\n- Escape closes the modal (calls `onClose`) by default; opt out with `closeOnEscape={false}`. One Escape closes the topmost overlay only, whichever open Modal, [Dialog](https://bestax.io/docs/api/components/dialog), [Sidebar](https://bestax.io/docs/api/components/sidebar) or full-page [Loading](https://bestax.io/docs/api/components/loading) opened last, and the next Escape closes the one under it. A modal on top with `closeOnEscape={false}` still keeps Escape from the layers under it. A [Toast](https://bestax.io/docs/api/components/toast) waits until no overlay is open.\n- The modal calls `preventDefault()` on the Escape it closes on, so a listener of your own that runs after it can tell the key was used.\n- A popup inside the modal takes its own Escape first. With an Autocomplete list, a Dropdown menu, a Popover or a date picker's calendar open, the first Escape closes that and the next one closes the modal.\n- A popup of your own inside a modal should call `preventDefault()` on the Escape it closes on. The modal leaves an Escape that was prevented alone, whether your popup hears it in a React `onKeyDown` or in a listener on `document`. Call it only when the popup is open and the key was pressed in it, so an Escape with nothing to close still closes the modal, and so does one pressed in a modal opened over your popup.\n- Body scroll is locked while the modal is active; opt out with `lockScroll={false}`. The lock is ref-counted and shared with `Dialog`, `Sidebar` and `Loading`, so whichever overlay closes first doesn't unlock the page underneath one that is still open.\n- Focus moves to the first enabled focusable element (or the modal itself) on open, and is restored to the previously focused element on close — unless another modal is still open on top, in which case that one keeps focus.\n- Tab and Shift+Tab cycle within the modal while it is the topmost overlay, so the keyboard order agrees with what `aria-modal=\"true\"` tells assistive technology. With a Sidebar or a full-page Loading opened over it, the modal leaves Tab alone until that one closes. A focus trap of your own inside it, such as a portaled panel's, keeps a Tab it calls `preventDefault()` on, and the modal leaves focus where your trap put it. Note that `aria-modal` does not by itself make background content inert, and no `inert` attribute is applied, so background content remains reachable by pointer and by browser UI such as find-in-page.\n- The modal background closes the modal on click (`onClose` required).\n- Close buttons are provided for both modal-card and modal-content variants.\n\n:::note\nAlways provide an `onClose` handler for accessibility and to allow users to dismiss the modal.\n:::",
|
|
49
|
+
"accessibility": "- The modal root gets `role=\"dialog\"` and `aria-modal=\"true\"` while active — pass an explicit `role` to override (e.g. `Dialog` passes `role=\"presentation\"` on the `Modal` it wraps so its own `role=\"alertdialog\"` is the only one announced).\n- **Give the dialog an accessible name.** With the legacy API, `modalCardTitle` is wired up as `aria-labelledby` for you. With the compound API, pass your own `aria-label` or `aria-labelledby` on `<Modal>` — a `role=\"dialog\"` with no name is announced as just \"dialog\". An explicit `aria-labelledby` always wins over the generated one.\n- Escape closes the modal (calls `onClose`) by default; opt out with `closeOnEscape={false}`. One Escape closes the topmost overlay only, whichever open Modal, [Dialog](https://bestax.io/docs/api/components/dialog), [Sidebar](https://bestax.io/docs/api/components/sidebar) or full-page [Loading](https://bestax.io/docs/api/components/loading) opened last, and the next Escape closes the one under it. A modal on top with `closeOnEscape={false}` still keeps Escape from the layers under it. A [Toast](https://bestax.io/docs/api/components/toast) waits until no overlay is open.\n- The modal calls `preventDefault()` on the Escape it closes on, so a listener of your own that runs after it can tell the key was used.\n- A popup inside the modal takes its own Escape first. With an Autocomplete list, a Dropdown menu, a Popover or a date picker's calendar open, the first Escape closes that and the next one closes the modal.\n- A popup of your own inside a modal should call `preventDefault()` on the Escape it closes on. The modal leaves an Escape that was prevented alone, whether your popup hears it in a React `onKeyDown` or in a listener on `document`. Call it only when the popup is open and the key was pressed in it, so an Escape with nothing to close still closes the modal, and so does one pressed in a modal opened over your popup.\n- Body scroll is locked while the modal is active; opt out with `lockScroll={false}`. The lock is ref-counted and shared with `Dialog`, `Sidebar` and `Loading`, so whichever overlay closes first doesn't unlock the page underneath one that is still open.\n- Focus moves to the first enabled focusable element (or the modal itself) on open, and is restored to the previously focused element on close — unless another modal is still open on top, in which case that one keeps focus.\n- Tab and Shift+Tab cycle within the modal while it is the topmost modal overlay, so the keyboard order agrees with what `aria-modal=\"true\"` tells assistive technology. With another Modal or Dialog, a [Sidebar](https://bestax.io/docs/api/components/sidebar) with an overlay or a full-page Loading opened over it, the modal leaves Tab alone until that one closes. A Sidebar without an overlay isn't modal: opened over the modal, it takes Escape first, but the modal keeps holding Tab and keeps focus, so the sidebar doesn't take focus when it opens, and a Tab from its controls comes back into the modal. A focus trap of your own inside it, such as a portaled panel's, keeps a Tab it calls `preventDefault()` on, and the modal leaves focus where your trap put it. Note that `aria-modal` does not by itself make background content inert, and no `inert` attribute is applied, so background content remains reachable by pointer and by browser UI such as find-in-page.\n- The modal background closes the modal on click (`onClose` required).\n- Close buttons are provided for both modal-card and modal-content variants.\n\n:::note\nAlways provide an `onClose` handler for accessibility and to allow users to dismiss the modal.\n:::",
|
|
50
50
|
"related": [
|
|
51
51
|
"Button",
|
|
52
52
|
"Dialog",
|
|
@@ -37,6 +37,14 @@
|
|
|
37
37
|
"title": "Transparent Navbar",
|
|
38
38
|
"code": "<Navbar transparent>{/* ...brand and menu... */}</Navbar>"
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Spaced Navbar",
|
|
42
|
+
"code": "<Navbar isSpaced>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n <Navbar.Dropdown hoverable>\n <Navbar.Link>More</Navbar.Link>\n <Navbar.DropdownMenu>\n <Navbar.Item href=\"#\">About</Navbar.Item>\n <Navbar.Item href=\"#\">Contact</Navbar.Item>\n </Navbar.DropdownMenu>\n </Navbar.Dropdown>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Navbar with a Shadow",
|
|
46
|
+
"code": "<Navbar hasShadow>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n </Navbar.Start>\n </Navbar.Menu>\n</Navbar>"
|
|
47
|
+
},
|
|
40
48
|
{
|
|
41
49
|
"title": "Fixed Navbar",
|
|
42
50
|
"code": "<Navbar fixed=\"top\">{/* ...brand and menu... */}</Navbar>"
|
|
@@ -134,6 +142,24 @@
|
|
|
134
142
|
"inherited": false,
|
|
135
143
|
"deprecated": false
|
|
136
144
|
},
|
|
145
|
+
{
|
|
146
|
+
"name": "isSpaced",
|
|
147
|
+
"type": "boolean",
|
|
148
|
+
"default": "false",
|
|
149
|
+
"description": "Renders Bulma's `is-spaced`: padding around the navbar, rounded items and boxed dropdowns. Bulma applies it from the desktop breakpoint up, so below that the navbar looks the same either way. With `fixed=\"top\"`, put `has-spaced-navbar-fixed-top` on `<html>` beside `has-navbar-fixed-top` (the `-bottom` pair for `fixed=\"bottom\"`). From desktop up the spaced navbar is taller than `has-navbar-fixed-top` pads the page for, and there the spaced class pads it for the taller navbar.",
|
|
150
|
+
"required": false,
|
|
151
|
+
"inherited": false,
|
|
152
|
+
"deprecated": false
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "hasShadow",
|
|
156
|
+
"type": "boolean",
|
|
157
|
+
"default": "false",
|
|
158
|
+
"description": "Renders Bulma's `has-shadow`: a shadow below the navbar, or above it with `fixed=\"bottom\"`. Off unless set, since Bulma's navbar has no shadow of its own. `Box` and `Card` take a `hasShadow` that defaults to `true` instead, because Bulma gives those a shadow already.",
|
|
159
|
+
"required": false,
|
|
160
|
+
"inherited": false,
|
|
161
|
+
"deprecated": false
|
|
162
|
+
},
|
|
137
163
|
{
|
|
138
164
|
"name": "fixed",
|
|
139
165
|
"type": "'top' | 'bottom'",
|
|
@@ -285,7 +285,7 @@
|
|
|
285
285
|
"name": "isLoading",
|
|
286
286
|
"type": "boolean",
|
|
287
287
|
"default": "false",
|
|
288
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
288
|
+
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
289
289
|
"required": false,
|
|
290
290
|
"inherited": true,
|
|
291
291
|
"deprecated": false
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"code": "function example() {\n const [isOpen, setIsOpen] = useState(false);\n return (\n <>\n <Button color=\"primary\" onClick={() => setIsOpen(true)}>\n Open Sidebar\n </Button>\n <Sidebar inline isOpen={isOpen} onClose={() => setIsOpen(false)}>\n <Sidebar.Header>\n <Sidebar.Title>Dot Notation</Sidebar.Title>\n <Sidebar.Close onClick={() => setIsOpen(false)} />\n </Sidebar.Header>\n <Sidebar.Body>\n <Paragraph>\n Header, Title, Close, Body, and Footer are all available from the\n single Sidebar import.\n </Paragraph>\n </Sidebar.Body>\n <Sidebar.Footer>\n <Button color=\"primary\" onClick={() => setIsOpen(false)}>\n Done\n </Button>\n </Sidebar.Footer>\n </Sidebar>\n </>\n );\n}"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
|
-
"accessibility": "- Uses `role=\"dialog\"` for proper screen reader announcement\n- Has `aria-modal=\"true\"` when overlay is shown\n- Focus moves into the sidebar when it opens, to its first tab stop or the sidebar itself. When it closes, focus goes back to whatever had it when the sidebar opened, unless focus has already left the sidebar, say for an overlay that's still open on top\n- With an overlay, Tab and Shift+Tab stay inside the sidebar while it's the topmost overlay, so the keyboard order agrees with what `aria-modal=\"true\"` tells assistive technology. They wrap at the same tab stops [`useFocusTrap`](https://bestax.io/docs/api/helpers/usefocustrap) does, so hidden, disabled and `tabIndex={-1}` elements are skipped and a radio group counts once. A Tab from outside the sidebar brings focus back in, and so does a Tab the browser takes out anyway, as Safari does past links when its settings say to\n- A [Modal](https://bestax.io/docs/api/components/modal) or [Dialog](https://bestax.io/docs/api/components/dialog) opened over the sidebar, including one rendered inside it, holds Tab until it closes, and then the sidebar holds it again. A sidebar opened over a Modal holds Tab until it closes, and then the Modal does\n- A focus trap of your own inside the sidebar, such as a portaled panel's, keeps a Tab it calls `preventDefault()` on, and the sidebar leaves focus where your trap put it\n- Without an overlay the sidebar isn't modal
|
|
41
|
+
"accessibility": "- Uses `role=\"dialog\"` for proper screen reader announcement\n- Has `aria-modal=\"true\"` when overlay is shown\n- Focus moves into the sidebar when it opens, to its first tab stop or the sidebar itself, unless it has no overlay and a modal overlay is open under it (see below). That's decided as it opens, so changing `overlay` while it's open leaves focus where it is. When it closes, focus goes back to whatever had it when the sidebar opened, unless focus has already left the sidebar, say for an overlay that's still open on top\n- With an overlay, Tab and Shift+Tab stay inside the sidebar while it's the topmost modal overlay, so the keyboard order agrees with what `aria-modal=\"true\"` tells assistive technology. They wrap at the same tab stops [`useFocusTrap`](https://bestax.io/docs/api/helpers/usefocustrap) does, so hidden, disabled and `tabIndex={-1}` elements are skipped and a radio group counts once. A Tab from outside the sidebar brings focus back in, and so does a Tab the browser takes out anyway, as Safari does past links when its settings say to\n- A [Modal](https://bestax.io/docs/api/components/modal) or [Dialog](https://bestax.io/docs/api/components/dialog) opened over the sidebar, including one rendered inside it, holds Tab until it closes, and then the sidebar holds it again. A sidebar with an overlay opened over a Modal holds Tab until it closes, and then the Modal does\n- A focus trap of your own inside the sidebar, such as a portaled panel's, keeps a Tab it calls `preventDefault()` on, and the sidebar leaves focus where your trap put it\n- Without an overlay the sidebar isn't modal and holds no Tab. On the page, Tab moves in and out of it freely. Opened over a Modal, or over a sidebar with an overlay, it takes Escape first, but the one under it keeps holding Tab and keeps focus: the sidebar doesn't take focus when it opens, and a Tab from its controls, once a click puts focus there, goes back into that one\n- A closed sidebar stays in the page so it can slide out, and it's `inert` and `aria-hidden` while closed: Tab passes over its content and assistive technology doesn't read it\n- Escape key closes the sidebar by default. One Escape closes the topmost overlay only: a [Modal](https://bestax.io/docs/api/components/modal) or [Dialog](https://bestax.io/docs/api/components/dialog) opened over the sidebar closes first, and the sidebar on the next Escape. A sidebar opened over a Modal closes before it\n- A sidebar on top that can't close on Escape, with `escapeClose` or `canCancel` off, still keeps the key from the overlays under it. A [Toast](https://bestax.io/docs/api/components/toast) waits until no overlay is open\n- A popup open inside it, such as a Dropdown menu or a date picker's calendar, takes the first Escape, and the next one closes the sidebar. A popup of your own does the same by calling `preventDefault()` on the Escape it closes on, as the [Modal](https://bestax.io/docs/api/components/modal#accessibility) page explains.\n- Body scroll is prevented when the sidebar is open with an overlay, through the ref-counted lock shared with `Modal`, `Dialog` and `Loading` — so closing one overlay never unlocks the page underneath another that is still open",
|
|
42
42
|
"related": ["Menu", "Modal"],
|
|
43
43
|
"storybook": "https://bestax.io/storybook/?path=/story/components-sidebar",
|
|
44
44
|
"summary": "The `Sidebar` component provides a slide-out navigation panel that appears from the left or right side of the screen.",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"name": "isOpen",
|
|
56
56
|
"type": "boolean",
|
|
57
57
|
"default": null,
|
|
58
|
-
"description": "Whether the sidebar is open (required). Opening moves focus into the sidebar, to its first tab stop or the sidebar itself. Closing hands focus back to whatever had it when the sidebar opened, unless focus has already left the sidebar, as it does for an overlay opened over it. A closed sidebar stays in the page, so it can slide out, and is `inert` and `aria-hidden` there: Tab passes over its content and assistive technology doesn't read it.",
|
|
58
|
+
"description": "Whether the sidebar is open (required). Opening moves focus into the sidebar, to its first tab stop or the sidebar itself, except for a sidebar without an overlay opened while a modal overlay, such as a Modal, is open: that one leaves focus where it is. That's decided as it opens, and changing `overlay` while it's open doesn't move focus. Closing hands focus back to whatever had it when the sidebar opened, unless focus has already left the sidebar, as it does for an overlay opened over it. A closed sidebar stays in the page, so it can slide out, and is `inert` and `aria-hidden` there: Tab passes over its content and assistive technology doesn't read it.",
|
|
59
59
|
"required": false,
|
|
60
60
|
"inherited": false,
|
|
61
61
|
"deprecated": false
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"name": "overlay",
|
|
111
111
|
"type": "boolean",
|
|
112
112
|
"default": "true",
|
|
113
|
-
"description": "Show an overlay behind the sidebar, which makes it modal: it gets `aria-modal=\"true\"`, locks body scroll, and keeps Tab and Shift+Tab inside it while it is the topmost overlay. A Modal or Dialog opened over it, even one rendered inside it, holds Tab until it closes. Without an overlay the sidebar isn't modal
|
|
113
|
+
"description": "Show an overlay behind the sidebar, which makes it modal: it gets `aria-modal=\"true\"`, locks body scroll, and keeps Tab and Shift+Tab inside it while it is the topmost modal overlay. A Modal or Dialog opened over it, even one rendered inside it, holds Tab until it closes. Without an overlay the sidebar isn't modal and holds no Tab: on the page, Tab moves in and out of it freely, and opened over a Modal, it leaves the Modal holding Tab, and focus, while still taking Escape first. Whether the sidebar takes focus is decided as it opens: changing this while it's open moves the Tab trap, not focus. Default: true.",
|
|
114
114
|
"required": false,
|
|
115
115
|
"inherited": false,
|
|
116
116
|
"deprecated": false
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"name": "isLoading",
|
|
126
126
|
"type": "boolean",
|
|
127
127
|
"default": "false",
|
|
128
|
-
"description": "Shows Bulma's spinner in place of the label and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
128
|
+
"description": "Shows Bulma's spinner in place of the label and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn, and in forced colors (Windows' contrast themes) the label stays hidden behind it (with bestax's CSS loaded).",
|
|
129
129
|
"required": false,
|
|
130
130
|
"inherited": false,
|
|
131
131
|
"deprecated": false
|
|
@@ -240,6 +240,8 @@ flexDirection="column"` + `flexGrow="1"` pattern applies to `Cell` + `Card`.
|
|
|
240
240
|
| --------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
241
241
|
| `fixed` | `'top' \| 'bottom'` |
|
|
242
242
|
| `transparent` | `boolean` |
|
|
243
|
+
| `isSpaced` | `boolean` (Bulma's `is-spaced`, from desktop up) |
|
|
244
|
+
| `hasShadow` | `boolean` (default `false`, unlike `Card`'s; Bulma's `has-shadow`) |
|
|
243
245
|
| `color` | `'primary' \| 'link' \| 'info' \| 'success' \| 'warning' \| 'danger' \| 'black' \| 'dark' \| 'light' \| 'white'` |
|
|
244
246
|
| `Navbar.Item` | `as?`, `active?`, `href` |
|
|
245
247
|
| `Navbar.Burger` | `active?`, `onClick` |
|
|
@@ -249,7 +251,12 @@ The burger/menu is controlled state — toggle `Navbar.Burger active`/`onClick`
|
|
|
249
251
|
flag to `Navbar.Menu active`. **A `fixed="top"` navbar requires `has-navbar-fixed-top` on `<html>`**
|
|
250
252
|
(Bulma offsets the page from it); the library adds no helper. Set it statically —
|
|
251
253
|
`<html class="has-navbar-fixed-top">` in `index.html` — reserving a `classList.add` effect for
|
|
252
|
-
a navbar that mounts conditionally.
|
|
254
|
+
a navbar that mounts conditionally. **With `isSpaced`, add `has-spaced-navbar-fixed-top` too**
|
|
255
|
+
(`<html class="has-navbar-fixed-top has-spaced-navbar-fixed-top">`): from desktop up the spaced
|
|
256
|
+
navbar is taller than the plain class pads the page for, and there the spaced class pads it for
|
|
257
|
+
the taller navbar, so with the plain class alone the top of the page sits under the navbar. A
|
|
258
|
+
`fixed="bottom"` navbar takes `has-navbar-fixed-bottom`, and `has-spaced-navbar-fixed-bottom`
|
|
259
|
+
beside it with `isSpaced`.
|
|
253
260
|
|
|
254
261
|
**Routing:** in a routed app, don't use `href="#"` — render items as the router's link
|
|
255
262
|
component. `Menu.Item as={Link} to="/x"` and `Navbar.Item as={Link} to="/x"` both compile
|
|
@@ -116,7 +116,7 @@ renders the same `<h2>`.
|
|
|
116
116
|
| `.level` → `Level` | `is-mobile` | `isMobile` |
|
|
117
117
|
| `.navbar` → `Navbar` | the ten `.hero` colors | `color` |
|
|
118
118
|
| `.navbar` → `Navbar` | `is-fixed-top`, `is-fixed-bottom` | `fixed` (`top`, `bottom`) |
|
|
119
|
-
| `.navbar` → `Navbar` | `is-transparent`
|
|
119
|
+
| `.navbar` → `Navbar` | `is-transparent`, `is-spaced`, `has-shadow` | `transparent`, `isSpaced`, `hasShadow` |
|
|
120
120
|
| `.navbar-menu` → `Navbar.Menu`, `.navbar-item` → `Navbar.Item` | `is-active` | `active` |
|
|
121
121
|
| `.navbar-dropdown` → `Navbar.DropdownMenu` | `is-right`, `is-up` | `right`, `up` |
|
|
122
122
|
| `.notification` → `Notification` | `is-primary`, `is-link`, `is-info`, `is-success`, `is-warning`, `is-danger`, `is-black`, `is-white`, `is-dark` | `color` |
|
|
@@ -137,9 +137,9 @@ converts only with `type` and `aria-label` set (see `defaults:<Target>` in the u
|
|
|
137
137
|
and a `type="button"` is dropped, since bestax renders it by itself. `Card.Header.Icon` likewise
|
|
138
138
|
converts only with an `aria-label` and a `type` of `button`, `submit` or `reset`, since it renders
|
|
139
139
|
`aria-label="more options"` and `type="button"` otherwise.
|
|
140
|
-
`.tag`'s `is-delete` stays a class: `isDelete` turns the tag into a `<button>`.
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
`.tag`'s `is-delete` stays a class: `isDelete` turns the tag into a `<button>`. A
|
|
141
|
+
`.navbar-item`'s `has-dropdown` and `is-hoverable` stay classes too, since bestax has no prop for
|
|
142
|
+
them on that component. So do a `.field`'s
|
|
143
143
|
`has-addons-centered`, `has-addons-right` and `is-grouped-*`, because the `hasAddons` and
|
|
144
144
|
`grouped` values that render them render `has-addons` and `is-grouped` as well, and an input's,
|
|
145
145
|
textarea's or select's color, because `color` renders `has-text-<color>` on it too. On a
|
|
@@ -133,10 +133,10 @@ Notes:
|
|
|
133
133
|
`bulma/sass/components/dropdown` next to `scss/components/contextmenu`.
|
|
134
134
|
- `Loader` is stock Bulma styled by `bulma/sass/elements/loader`, and the `isLoading`
|
|
135
135
|
spinners on `Button`, `Control` and `Select` are Bulma's too. The `loader` extras partial
|
|
136
|
-
stops all of them under `prefers-reduced-motion: reduce
|
|
137
|
-
colors (Windows' contrast themes),
|
|
138
|
-
modules in any build that shows one. Its
|
|
139
|
-
`@use` lines does not matter.
|
|
136
|
+
stops all of them under `prefers-reduced-motion: reduce`, keeps each ring open in forced
|
|
137
|
+
colors (Windows' contrast themes), and keeps a loading button's label hidden there, so
|
|
138
|
+
include it (`as bestax-loader`) next to the Bulma modules in any build that shows one. Its
|
|
139
|
+
rules win over Bulma's either way, so the order of the two `@use` lines does not matter.
|
|
140
140
|
- `Progress` and the skeletons are stock Bulma too (`bulma/sass/elements/progress`,
|
|
141
141
|
`bulma/sass/base/skeleton`). The `progress` and `skeleton` extras partials
|
|
142
142
|
(`as bestax-progress`, `as bestax-skeleton`) stop the indeterminate bar's sweep and the
|
package/data/skills.json
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
{
|
|
65
65
|
"id": "layout-components",
|
|
66
66
|
"file": "references/layout-components.md",
|
|
67
|
-
"bytes":
|
|
67
|
+
"bytes": 17448
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"examples": [
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
{
|
|
109
109
|
"id": "bulma-classes-prop-map",
|
|
110
110
|
"file": "references/bulma-classes/prop-map.md",
|
|
111
|
-
"bytes":
|
|
111
|
+
"bytes": 35269
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"id": "bulma-classes-unmappables",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
{
|
|
163
163
|
"id": "modular-build",
|
|
164
164
|
"file": "references/modular-build.md",
|
|
165
|
-
"bytes":
|
|
165
|
+
"bytes": 11993
|
|
166
166
|
}
|
|
167
167
|
],
|
|
168
168
|
"examples": []
|
package/dist/bulma-classes.d.ts
CHANGED
|
@@ -271,5 +271,13 @@ export interface Lookup {
|
|
|
271
271
|
/** The classes in what a caller passed: a class string, or a selector. */
|
|
272
272
|
export declare function classTokens(input: string): string[];
|
|
273
273
|
export declare function lookupClasses(table: BulmaClassTable, input: string, tag?: string): Lookup;
|
|
274
|
+
/**
|
|
275
|
+
* A tag with the article it takes, read aloud: "an <a>", "an <h2>", "a
|
|
276
|
+
* <button>", "a <ul>". A copy of the codemod's (its `_shared/articles.ts`),
|
|
277
|
+
* which this server can't import at runtime, so its TODOs and these answers
|
|
278
|
+
* say a tag the same way: `bulma-classes-agree.test.ts` holds the two to the
|
|
279
|
+
* same output over every element name.
|
|
280
|
+
*/
|
|
281
|
+
export declare function aTag(tag: string): string;
|
|
274
282
|
export declare function renderLookup(lookup: Lookup, documented?: Readonly<Record<string, DocumentedWith>>): string;
|
|
275
283
|
//# sourceMappingURL=bulma-classes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bulma-classes.d.ts","sourceRoot":"","sources":["../src/bulma-classes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAA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CAAA;CAAE,CAAC;AAEpB,MAAM,WAAW,MAAM;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAC7C;AAuGD,0EAA0E;AAC1E,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAYnD;AAkDD,wBAAgB,aAAa,CAC3B,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,MAAM,EACb,GAAG,CAAC,EAAE,MAAM,GACX,MAAM,CA2XR;AA0BD;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAsID,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAM,GACxD,MAAM,CA2IR"}
|
package/dist/bulma-classes.js
CHANGED
|
@@ -209,7 +209,7 @@ export function lookupClasses(table, input, tag) {
|
|
|
209
209
|
if (tag && tag !== entry.tag) {
|
|
210
210
|
return result({
|
|
211
211
|
kind: 'markup',
|
|
212
|
-
why: `bestax renders \`.${wrapper}\` on
|
|
212
|
+
why: `bestax renders \`.${wrapper}\` on ${aTag(entry.tag)}, not ${aTag(tag)}`,
|
|
213
213
|
});
|
|
214
214
|
}
|
|
215
215
|
if (!bare) {
|
|
@@ -494,7 +494,7 @@ function itemsText(items) {
|
|
|
494
494
|
? `, at most one bare <${items.after.tag}> after it, which becomes a ` +
|
|
495
495
|
`\`${items.after.target}\` after the ${child}'s children,`
|
|
496
496
|
: '';
|
|
497
|
-
return (` Each ${item} in it holding ${
|
|
497
|
+
return (` Each ${item} in it holding ${aTag(items.child)}` +
|
|
498
498
|
`${after} and nothing else becomes a \`${items.target}\`, written in the ` +
|
|
499
499
|
`${item}'s place around the ${child}'s children.` +
|
|
500
500
|
(modifiers.length > 0 ? ` ${capitalised(modifiers.join(', '))}.` : '') +
|
|
@@ -502,13 +502,23 @@ function itemsText(items) {
|
|
|
502
502
|
`on the ${item} and everything else on the ${child}, so an item converts ` +
|
|
503
503
|
`only when its attributes already sit that way.`);
|
|
504
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* A tag with the article it takes, read aloud: "an <a>", "an <h2>", "a
|
|
507
|
+
* <button>", "a <ul>". A copy of the codemod's (its `_shared/articles.ts`),
|
|
508
|
+
* which this server can't import at runtime, so its TODOs and these answers
|
|
509
|
+
* say a tag the same way: `bulma-classes-agree.test.ts` holds the two to the
|
|
510
|
+
* same output over every element name.
|
|
511
|
+
*/
|
|
512
|
+
export function aTag(tag) {
|
|
513
|
+
return `${/^(?:[aeio]|h\d$)/.test(tag) ? 'an' : 'a'} <${tag}>`;
|
|
514
|
+
}
|
|
505
515
|
function capitalised(text) {
|
|
506
516
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
507
517
|
}
|
|
508
518
|
/** What converting a component that renders the element inside it means. */
|
|
509
519
|
function absorbsText(target, absorbs) {
|
|
510
520
|
const child = `<${absorbs.tag}>`;
|
|
511
|
-
const aChild =
|
|
521
|
+
const aChild = aTag(absorbs.tag);
|
|
512
522
|
const changes = [
|
|
513
523
|
...Object.entries(absorbs.modifiers ?? {}).map(([token, modifier]) => `\`${token}\` becomes ${modifier.writes.map(writeText).join(' ')}`),
|
|
514
524
|
...Object.entries(absorbs.renames ?? {}).map(([name, { to, beside }]) => `\`${name}\` becomes \`${to}\` (beside \`${beside}\`)`),
|
|
@@ -681,8 +691,9 @@ export function renderLookup(lookup, documented = {}) {
|
|
|
681
691
|
}
|
|
682
692
|
case 'wrong-tag':
|
|
683
693
|
out.push(`**Component:** \`${element.target}\` renders ${element.reaches}, not ` +
|
|
684
|
-
|
|
685
|
-
`what it takes then; the codemod leaves
|
|
694
|
+
`${aTag(element.tag)}. Change the tag to use it, and the rows below ` +
|
|
695
|
+
`are what it takes then; the codemod leaves ${aTag(element.tag)} as ` +
|
|
696
|
+
`markup.`);
|
|
686
697
|
break;
|
|
687
698
|
case 'markup':
|
|
688
699
|
out.push(`**Stays markup:** ${element.why}.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"mcpName": "io.github.allxsmith/bestax-mcp",
|
|
5
5
|
"description": "MCP server for @allxsmith/bestax-bulma — component props, examples, CSS variables and agent skills, served offline from a version-pinned index",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
44
44
|
"zod": "^4.4.3",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.39.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jest/globals": "^30.0.0",
|