Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ede43ce
fix(bulma-ui): make props and refs follow the polymorphic `as`
allxsmith Sep 10, 2026
6c76910
docs: tell contributors that a polymorphic `as` takes the props with it
allxsmith Sep 10, 2026
fdaf123
fix(bulma-ui): stop Avatar widening to every element, and forward cus…
allxsmith Sep 10, 2026
e1660eb
fix(create-bestax): ship the polymorphic `as` guidance to scaffolded …
allxsmith Sep 10, 2026
85c44ba
test(bulma-ui): drop the custom-component stub the intrinsic strip te…
allxsmith Sep 10, 2026
612001f
docs(bulma-ui): name the HOC that erases the polymorphic checks
allxsmith Sep 10, 2026
73db3c1
fix(bulma-ui): stop stripping attributes the target element accepts
allxsmith Sep 10, 2026
9054710
fix(bulma-ui): restore union `as`, and stop the props type collapsing…
allxsmith Sep 10, 2026
8f55a6a
fix(bulma-ui): the eight smaller defects review found in #661
allxsmith Sep 10, 2026
2550c8b
fix(bulma-ui): keep the form attributes an `as="input"` owns
allxsmith Sep 10, 2026
75ba53e
fix(bulma-ui): stop guessing which attributes a target element owns
allxsmith Sep 10, 2026
c5c6c4d
docs(bulma-ui): describe the strip that exists, not the two before it
allxsmith Sep 10, 2026
95fae75
test(bulma-ui): pin the ref-less derivation overload
allxsmith Sep 10, 2026
5c4cdbc
test: assert the loud-failure guard fires, not just that it doesn't
allxsmith Sep 10, 2026
12c5098
docs: reattach extractComponent's JSDoc to extractComponent
allxsmith Sep 10, 2026
dcd0a01
test(bulma-ui): cover disabled and a second form-capable target
allxsmith Sep 10, 2026
116c482
fix(bulma-ui): keep stripping disabled where the element does not own it
allxsmith Sep 10, 2026
4bfbff2
fix(bulma-ui): scope the two attribute filters independently
allxsmith Sep 10, 2026
7316d6b
fix(bulma-ui): reject the LinkButton props Button eats, and split a c…
allxsmith Sep 10, 2026
5ffa3b2
test(bulma-ui): pin Avatar's conditional-root ref cases
allxsmith Sep 10, 2026
2249f96
build: close the loud-failure guard's remaining wrapper bypasses
allxsmith Sep 10, 2026
2f80da4
test(bulma-ui): one assertion per prop, and pin Avatar's rejections
allxsmith Sep 10, 2026
9548793
fix(bulma-ui): stop the color exclusion reaching custom targets, and …
allxsmith Sep 10, 2026
6784bf4
build: peel every transparent wrapper, not just the outermost
allxsmith Sep 10, 2026
55bd35e
fix(bulma-ui): treat optionality modifiers as unsupported, and correc…
allxsmith Sep 11, 2026
36e177c
build: refuse PropsWithChildren too, and pin Reveal's no-ref contract
allxsmith Sep 11, 2026
6d377bd
fix(bulma-ui): accept no children on Avatar, rather than deriving the…
allxsmith Sep 11, 2026
da96080
fix(bulma-ui): declare backgroundColor unavailable, and check the who…
allxsmith Sep 11, 2026
740c560
fix(bulma-ui): stop the ref cells naming a type parameter no page dec…
allxsmith Sep 11, 2026
b7422a3
docs: describe the wrapper guard that exists, not the two before it
allxsmith Sep 11, 2026
fc042a3
fix(bulma-ui): leave custom elements out of the built-in attribute ba…
allxsmith Sep 11, 2026
73e0c1e
docs: warn contributors off the alias shape that breaks the docs extr…
allxsmith Sep 11, 2026
4383f61
test(bulma-ui): pin the alias union limitation so #667 announces itself
allxsmith Sep 11, 2026
f6e969f
fix(bulma-ui): apply the custom-element and event guards consistently
allxsmith Sep 11, 2026
8f852f5
fix(bulma-ui): publish only the polymorphic types, and keep role="img…
allxsmith Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions bestax-mcp/data/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"slug": "components/avatar",
"import": "import { Avatar } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 14,
"exampleCount": 7
"propCount": 15,
"exampleCount": 8
},
{
"name": "Avatars",
Expand All @@ -150,7 +150,7 @@
"slug": "components/avatars",
"import": "import { Avatars, Avatar } from '@allxsmith/bestax-bulma';",
"compound": true,
"propCount": 22,
"propCount": 23,
"exampleCount": 8
},
{
Expand Down Expand Up @@ -205,7 +205,7 @@
"slug": "elements/button",
"import": "import { Button } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 23,
"propCount": 19,
"exampleCount": 25
},
{
Expand All @@ -216,7 +216,7 @@
"slug": "elements/buttons",
"import": "import { Buttons } from '@allxsmith/bestax-bulma';",
"compound": true,
"propCount": 53,
"propCount": 45,
"exampleCount": 8
},
{
Expand Down Expand Up @@ -569,7 +569,7 @@
"import": "import { Link } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 6,
"exampleCount": 11
"exampleCount": 12
},
{
"name": "LinkButton",
Expand All @@ -579,7 +579,7 @@
"slug": "elements/linkbutton",
"import": "import { LinkButton } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 21,
"propCount": 17,
"exampleCount": 10
},
{
Expand Down Expand Up @@ -623,8 +623,8 @@
"slug": "components/menu",
"import": "import { Menu } from '@allxsmith/bestax-bulma';",
"compound": true,
"propCount": 11,
"exampleCount": 5
"propCount": 16,
"exampleCount": 6
},
{
"name": "Message",
Expand Down Expand Up @@ -788,7 +788,7 @@
"slug": "components/reveal",
"import": "import { Reveal } from '@allxsmith/bestax-bulma';",
"compound": false,
"propCount": 9,
"propCount": 11,
"exampleCount": 5
},
{
Expand Down
45 changes: 34 additions & 11 deletions bestax-mcp/data/components/Avatar.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
{
"title": "Forwarding Props to the Image",
"code": "<Avatar\n src=\"https://github.com/allxsmith.png\"\n name=\"Al Smith\"\n size=\"64x64\"\n imageProps={{ loading: 'lazy' }}\n/>"
},
{
"title": "Forwarded ref",
"code": "function example() {\n const avatarRef = React.useRef(null);\n const [tag, setTag] = React.useState(null);\n\n return (\n <>\n <Avatar ref={avatarRef} name=\"Ada Lovelace\" size=\"64x64\" />\n <Button mt=\"3\" onClick={() => setTag(avatarRef.current?.tagName)}>\n Read the tag from its ref\n </Button>\n <p>Rendered element: {tag ?? '—'}</p>\n </>\n );\n}"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}
],
"accessibility": "- Image avatars use `alt` (falling back to `name`) for their accessible name.\n- Initials/icon avatars expose `role=\"img\"` and `aria-label` (from `alt`/`name`) — unless\n rendered as a link or button, where the native link/button role and `aria-label` are used\n instead.\n- **Decorative avatars:** pass an explicit `alt=\"\"` when the avatar repeats information\n already visible next to it (e.g. beside the author's name in a comment row). The image\n stays decorative and an initials/icon avatar is skipped entirely (`aria-hidden`), avoiding\n double-speak. The opt-out never applies to a link/button avatar — an interactive element\n always keeps an accessible name (from `name`, or a generic `\"Avatar\"` fallback).\n- A link/button avatar with no `alt`/`name` (e.g. an API that returns only a photo URL) still\n gets an `aria-label` fallback rather than rendering a nameless control.\n- `as=\"button\"` defaults to `type=\"button\"`, so a clickable avatar inside a form doesn't\n submit it.\n- The default fallback icon is `aria-hidden`.",
Expand All @@ -47,6 +51,15 @@
"summary": "The `Avatar` component represents a person or entity as a compact image.",
"component": null,
"props": [
{
"name": "as",
"type": "React.ElementType",
"default": null,
"description": "Element/component to render as. Defaults to `'a'` when `href` is set, else `'figure'`.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "className",
"type": "string",
Expand Down Expand Up @@ -128,15 +141,6 @@
"inherited": false,
"deprecated": false
},
{
"name": "as",
"type": "React.ElementType",
"default": null,
"description": "Element/component to render as. Defaults to `'a'` when `href` is set, else `'figure'`.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "href",
"type": "string",
Expand Down Expand Up @@ -172,10 +176,29 @@
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "style",
"type": "React.CSSProperties",
"default": null,
"description": "Inline styles, merged after the size style.",
"required": false,
"inherited": false,
"deprecated": false
}
],
"extraProps": [
{
"name": "ref",
"type": "React.Ref",
"default": null,
"description": "Ref forwarded to the element `as` renders.",
"required": false,
"inherited": false,
"deprecated": false
}
],
"extraProps": [],
"catchAll": "All standard HTML attributes and Bulma helper props",
"catchAll": "All props of the element or component as renders (default <figure>) and Bulma helper props",
"types": [
{
"name": "AvatarColor",
Expand Down
41 changes: 30 additions & 11 deletions bestax-mcp/data/components/Avatars.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@
"summary": "The `Avatar` component represents a person or entity as a compact image.",
"component": "Avatar",
"props": [
{
"name": "as",
"type": "React.ElementType",
"default": null,
"description": "Element/component to render as. Defaults to `'a'` when `href` is set, else `'figure'`.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "className",
"type": "string",
Expand Down Expand Up @@ -214,15 +223,6 @@
"inherited": false,
"deprecated": false
},
{
"name": "as",
"type": "React.ElementType",
"default": null,
"description": "Element/component to render as. Defaults to `'a'` when `href` is set, else `'figure'`.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "href",
"type": "string",
Expand Down Expand Up @@ -258,10 +258,29 @@
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "style",
"type": "React.CSSProperties",
"default": null,
"description": "Inline styles, merged after the size style.",
"required": false,
"inherited": false,
"deprecated": false
}
],
"extraProps": [],
"catchAll": "All standard HTML attributes and Bulma helper props",
"extraProps": [
{
"name": "ref",
"type": "React.Ref",
"default": null,
"description": "Ref forwarded to the element `as` renders.",
"required": false,
"inherited": false,
"deprecated": false
}
],
"catchAll": "All props of the element or component as renders (default <figure>) and Bulma helper props",
"types": [
{
"name": "AvatarColor",
Expand Down
60 changes: 12 additions & 48 deletions bestax-mcp/data/components/Button.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@
"summary": "The `Button` component provides a flexible and highly customizable button for your Bulma React UI.",
"component": null,
"props": [
{
"name": "as",
"type": "React.ElementType",
"default": "'button'",
"description": "Render as a `<button>`, `<a>`, or a custom component (e.g. a router `Link`). Defaults to `'button'`; anything else (including `'a'`) uses anchor-style prop handling.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "color",
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black' | 'text' | 'ghost'",
Expand Down Expand Up @@ -266,51 +275,6 @@
"deprecated": false,
"valuesRef": "helpers/valid-values"
},
{
"name": "as",
"type": "React.ElementType",
"default": "'button'",
"description": "Render as a `<button>`, `<a>`, or a custom component (e.g. a router `Link`). Defaults to `'button'`; anything else (including `'a'`) uses anchor-style prop handling.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "href",
"type": "string",
"default": null,
"description": "Href value (if rendering as `<a>`).",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "onClick",
"type": "React.MouseEventHandler<HTMLButtonElement> | React.MouseEventHandler<HTMLAnchorElement>",
"default": null,
"description": "Click event handler.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "target",
"type": "string",
"default": null,
"description": "Anchor tag target.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "rel",
"type": "string",
"default": null,
"description": "Anchor tag rel.",
"required": false,
"inherited": false,
"deprecated": false
},
{
"name": "children",
"type": "React.ReactNode",
Expand All @@ -324,15 +288,15 @@
"extraProps": [
{
"name": "ref",
"type": "React.Ref<HTMLButtonElement | HTMLAnchorElement>",
"type": "React.Ref",
"default": null,
"description": "Ref forwarded to the rendered button or anchor element.",
"description": "Ref forwarded to the element `as` renders.",
"required": false,
"inherited": false,
"deprecated": false
}
],
"catchAll": "All standard <button> attributes and Bulma helper props",
"catchAll": "All props of the element or component as renders (default <button>) and Bulma helper props",
"types": []
}
],
Expand Down
Loading
Loading