bestax-mcp 1.18.74 → 1.18.75
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/catalog.json +5 -5
- package/data/components/Badge.json +3 -3
- package/data/components/Card.json +1 -1
- package/data/components/Carousel.json +14 -1
- package/data/components/ColorPicker.json +1 -1
- package/data/components/DateInput.json +3 -3
- package/data/components/DateTimeInput.json +3 -3
- package/data/components/Navbar.json +1 -1
- package/data/components/Numberinput.json +3 -3
- package/data/components/Panel.json +6 -6
- package/data/components/Slider.json +1 -1
- package/data/components/Taginput.json +2 -2
- package/data/components/TimeInput.json +3 -3
- package/data/components/Toast.json +1 -1
- package/data/skills/bestax-form/SKILL.md +7 -2
- package/data/skills/bestax-optimize/SKILL.md +2 -1
- package/data/skills/bestax-optimize/references/modular-build.md +14 -3
- package/data/skills/bestax-theming/references/css-variables.md +2 -1
- package/package.json +2 -2
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.77.0"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -330,8 +330,8 @@
|
|
|
330
330
|
"slug": "components/carousel",
|
|
331
331
|
"import": "import { Carousel, CarouselItem } from '@allxsmith/bestax-bulma';",
|
|
332
332
|
"compound": false,
|
|
333
|
-
"propCount":
|
|
334
|
-
"exampleCount":
|
|
333
|
+
"propCount": 32,
|
|
334
|
+
"exampleCount": 17
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
337
|
"name": "Cascader",
|
|
@@ -3940,7 +3940,7 @@
|
|
|
3940
3940
|
"PanelBlock": {
|
|
3941
3941
|
"component": "Panel",
|
|
3942
3942
|
"path": "Panel.Block",
|
|
3943
|
-
"purpose": "Individual panel block (renders as `<a class=\"panel-block\">` unless `as` says otherwise)"
|
|
3943
|
+
"purpose": "Individual panel block (renders as `<a class=\"panel-block\">` unless `as` says otherwise)."
|
|
3944
3944
|
},
|
|
3945
3945
|
"PanelButtonBlock": {
|
|
3946
3946
|
"component": "Panel",
|
|
@@ -3970,7 +3970,7 @@
|
|
|
3970
3970
|
"PanelTabs": {
|
|
3971
3971
|
"component": "Panel",
|
|
3972
3972
|
"path": "Panel.Tabs",
|
|
3973
|
-
"purpose": "Panel tabs (renders as `<p class=\"panel-tabs\">`)"
|
|
3973
|
+
"purpose": "Panel tabs (renders as `<p class=\"panel-tabs\">`)."
|
|
3974
3974
|
},
|
|
3975
3975
|
"PasswordInputBase": {
|
|
3976
3976
|
"component": "PasswordInput",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"code": "<Block display=\"flex\" alignItems=\"center\">\n <Badge content={5} color=\"info\" mr=\"2\" />\n <span>new messages</span>\n</Block>"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
"title": "Standalone,
|
|
54
|
-
"code": "function example() {\n const [
|
|
53
|
+
"title": "Standalone, Beside a Control",
|
|
54
|
+
"code": "function example() {\n const [likes, setLikes] = useState(0);\n\n return (\n <Block display=\"flex\" alignItems=\"center\">\n <Button onClick={() => setLikes(n => n + 1)} mr=\"3\">\n Like\n </Button>\n <Badge content={likes} showZero color=\"info\" mr=\"2\" />\n <span>likes</span>\n </Block>\n );\n}"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"title": "Standalone, Pulse",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"code": "<Badge content={<Icon name=\"check\" />} color=\"success\">\n <Avatar name=\"Ada Lovelace\" alt=\"Ada Lovelace, verified\" />\n</Badge>"
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
|
-
"accessibility": "- A count/text badge exposes `role=\"status\"` and an `aria-label` announcing its content.\n- At `content={0}` without `showZero`, the pill is visually hidden but stays mounted as an\n empty `role=\"status\"` node, so a later `0 -> 1` change mutates an existing live region and\n is reliably announced (a live region inserted already populated often isn't).\n- A bare number in a `role=\"status\"` span is not enough context on its own — put the full\n meaning on the anchor itself, e.g. `<Icon ariaLabel=\"Inbox, 4 unread messages\" />` rather than\n relying on the badge to read out just \"4\".\n- A `dot` badge is `aria-hidden`, and only its look tells what it means, so say what a dot means\n in words in the anchor's name: an `Avatar`'s `alt`, an `Icon`'s `ariaLabel`, or the\n `aria-label` of a button it sits on. A standalone dot has no anchor, so say it in text beside\n the dot, as for any standalone badge. An `Icon` passed as `content` with no `ariaLabel` is\n hidden too, so the badge reads\n nothing; name what it means on the anchor as well.\n- `pulse` respects `prefers-reduced-motion: reduce` and renders without animation.\n- **Forced colors:** a badge is drawn as a fill with a ring, and forced colors (Windows' contrast\n themes) paints the fill in the page's own color and drops the ring, so bestax's styles draw a\n count or text badge's edge in the system's text color there, and fill a dot in it, with its ring\n in the page's color. A pulsing badge pulses in the same color. A badge's text stays in the\n contrast theme's colors.\n- Note the two hide mechanisms differ: the Bulma `visibility=\"invisible\"` helper hides the whole\n wrapper (anchor included), while the `invisible` **prop** hides only the badge pill.",
|
|
69
|
+
"accessibility": "- A count/text badge exposes `role=\"status\"` and an `aria-label` announcing its content.\n- At `content={0}` without `showZero`, the pill is visually hidden but stays mounted as an\n empty `role=\"status\"` node, so a later `0 -> 1` change mutates an existing live region and\n is reliably announced (a live region inserted already populated often isn't).\n- A bare number in a `role=\"status\"` span is not enough context on its own — put the full\n meaning on the anchor itself, e.g. `<Icon ariaLabel=\"Inbox, 4 unread messages\" />` rather than\n relying on the badge to read out just \"4\".\n- A `dot` badge is `aria-hidden`, and only its look tells what it means, so say what a dot means\n in words in the anchor's name: an `Avatar`'s `alt`, an `Icon`'s `ariaLabel`, or the\n `aria-label` of a button it sits on. A standalone dot has no anchor, so say it in text beside\n the dot, as for any standalone badge. An `Icon` passed as `content` with no `ariaLabel` is\n hidden too, so the badge reads\n nothing; name what it means on the anchor as well.\n- A badge is a status, not a control: it isn't in the tab order and takes no keys, so a click\n handler on a standalone badge reaches only a pointer. Put the click on a control beside it, as\n [Standalone, Beside a Control](https://bestax.io/docs/api/components/badge#standalone-beside-a-control) does.\n- `pulse` respects `prefers-reduced-motion: reduce` and renders without animation.\n- **Forced colors:** a badge is drawn as a fill with a ring, and forced colors (Windows' contrast\n themes) paints the fill in the page's own color and drops the ring, so bestax's styles draw a\n count or text badge's edge in the system's text color there, and fill a dot in it, with its ring\n in the page's color. A pulsing badge pulses in the same color. A badge's text stays in the\n contrast theme's colors.\n- Note the two hide mechanisms differ: the Bulma `visibility=\"invisible\"` helper hides the whole\n wrapper (anchor included), while the `invisible` **prop** hides only the badge pill.",
|
|
70
70
|
"related": ["Avatar", "Icon", "Tag", "useBulmaClasses"],
|
|
71
71
|
"storybook": "https://bestax.io/storybook/?path=/story/components-badge--unread-count",
|
|
72
72
|
"summary": "The `Badge` component is a small status/count indicator overlaid on the corner of another element, or rendered standalone.",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"code": "<Card>\n <Card.Header>\n <Card.Header.Title as=\"p\">Component</Card.Header.Title>\n </Card.Header>\n <Card.Content>Card content goes here.</Card.Content>\n <Card.Footer>\n <Card.FooterItem as=\"a\" href=\"#save\">\n Save\n </Card.FooterItem>\n <Card.FooterItem as=\"a\" href=\"#edit\">\n Edit\n </Card.FooterItem>\n </Card.Footer>\n</Card>"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
"accessibility": "- **Image alternate text:** An image URL passed as `image` renders an `<img>` whose `alt` is `imageAlt`. Describe what the picture shows, or pass `imageAlt=\"\"` for a decorative image so screen readers skip it. Without `imageAlt`, the `alt` is \"Card image\", which tells a screen reader nothing about the picture. An image you render yourself, as a node in `image` or inside `Card.Image`, takes its own `alt`, and `imageAlt` doesn't reach it.\n- **Header and footer landmarks:** a card's header and footer are Bulma's `<header class=\"card-header\">` and `<footer class=\"card-footer\">`, which `header` or `headerIcon`, `footer`, `Card.Header` and `Card.Footer` render. Outside `<main>`, `<article>`, `<aside>`, `<nav>`, `<section>` and elements with one of their roles, a `<header>` is a banner landmark and a `<footer>` a content info landmark, so a screen reader that lists landmarks lists a banner for each card with a header and a content info for each card with a footer, beside the page's own. Inside one of them they aren't landmarks. Put cards in the page's `<main>`. For a card that can't be there, such as one portaled outside it, give the card `role=\"article\"`, or wrap it in an `<article>`, which scopes them the same way, or, built from the parts, pass `role=\"none\"` to its `Card.Header` and `Card.Footer`, which ARIA in HTML allows on both.\n- Use semantic content for the header, body, and footer as needed.",
|
|
65
|
+
"accessibility": "- **Image alternate text:** An image URL passed as `image` renders an `<img>` whose `alt` is `imageAlt`. Describe what the picture shows, or pass `imageAlt=\"\"` for a decorative image so screen readers skip it. Without `imageAlt`, the `alt` is \"Card image\", which tells a screen reader nothing about the picture. An image you render yourself, as a node in `image` or inside `Card.Image`, takes its own `alt`, and `imageAlt` doesn't reach it.\n- **Header and footer landmarks:** a card's header and footer are Bulma's `<header class=\"card-header\">` and `<footer class=\"card-footer\">`, which `header` or `headerIcon`, `footer`, `Card.Header` and `Card.Footer` render. Outside `<main>`, `<article>`, `<aside>`, `<nav>`, `<section>` and elements with one of their roles, a `<header>` is a banner landmark and a `<footer>` a content info landmark, so a screen reader that lists landmarks lists a banner for each card with a header and a content info for each card with a footer, beside the page's own. Inside one of them they aren't landmarks. Put cards in the page's `<main>`. For a card that can't be there, such as one portaled outside it, give the card `role=\"article\"`, or wrap it in an `<article>`, which scopes them the same way, or, built from the parts, pass `role=\"none\"` to its `Card.Header` and `Card.Footer`, which ARIA in HTML allows on both.\n- Use semantic content for the header, body, and footer as needed.\n- **Forced colors:** in Windows' contrast themes, which drop shadows and paint the card in the\n page's own color, the card's edge is drawn as an outline in the system's text color, so a row of\n cards still shows which image, text and actions belong together. While the card has keyboard\n focus, the browser's focus ring shows in its place. CheckboxCard and RadioCard keep the edge they\n draw themselves.",
|
|
66
66
|
"related": ["Icon", "Image", "useBulmaClasses"],
|
|
67
67
|
"storybook": "https://bestax.io/storybook/?path=/story/components-card--default",
|
|
68
68
|
"summary": "The `Card` component renders a Bulma-styled card with optional header, image, content, and footer.",
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
"title": "With Material Design Icons",
|
|
62
62
|
"code": "<Carousel\n ariaLabel=\"Material Design arrows\"\n iconPrev=\"arrow-left\"\n iconNext=\"arrow-right\"\n iconLibrary=\"mdi\"\n>\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Slide 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"title": "In Another Language",
|
|
66
|
+
"code": "<Carousel\n lang=\"fr\"\n aria-roledescription=\"carrousel\"\n ariaLabel=\"Couleurs\"\n labels={{\n previous: 'Diapositive précédente',\n next: 'Diapositive suivante',\n indicator: slide => `Aller à la diapositive ${slide}`,\n item: (current, total) => `${current} sur ${total}`,\n }}\n>\n <CarouselItem aria-roledescription=\"diapositive\">\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Diapositive 1</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem aria-roledescription=\"diapositive\">\n <Hero color=\"info\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Diapositive 2</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem aria-roledescription=\"diapositive\">\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Title as=\"p\">Diapositive 3</Title>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
67
|
+
},
|
|
64
68
|
{
|
|
65
69
|
"title": "Controlled Carousel",
|
|
66
70
|
"code": "function ControlledExample() {\n const [currentSlide, setCurrentSlide] = useState(0);\n return (\n <Block>\n <Buttons mb=\"4\">\n <Button\n onClick={() => setCurrentSlide(0)}\n color={currentSlide === 0 ? 'primary' : undefined}\n >\n 1\n </Button>\n <Button\n onClick={() => setCurrentSlide(1)}\n color={currentSlide === 1 ? 'primary' : undefined}\n >\n 2\n </Button>\n <Button\n onClick={() => setCurrentSlide(2)}\n color={currentSlide === 2 ? 'primary' : undefined}\n >\n 3\n </Button>\n </Buttons>\n <Carousel\n ariaLabel=\"Controlled slides\"\n value={currentSlide}\n onChange={setCurrentSlide}\n indicator={false}\n >\n <CarouselItem>\n <Hero color=\"primary\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 1</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 2</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Slide 3</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n </Carousel>\n <Paragraph mt=\"2\">Current slide: {currentSlide + 1}</Paragraph>\n </Block>\n );\n}"
|
|
@@ -70,7 +74,7 @@
|
|
|
70
74
|
"code": "<Carousel ariaLabel=\"Slides without repeat\" repeat={false}>\n <CarouselItem>\n <Hero color=\"danger\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">First (no previous)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"warning\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph>Middle slide</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n <CarouselItem>\n <Hero color=\"success\" size=\"medium\">\n <Hero.Body textAlign=\"centered\">\n <Paragraph textColor=\"white\">Last (no next)</Paragraph>\n </Hero.Body>\n </Hero>\n </CarouselItem>\n</Carousel>"
|
|
71
75
|
}
|
|
72
76
|
],
|
|
73
|
-
"accessibility": "- Uses `role=\"region\"` with `aria-roledescription=\"carousel\"`\n- Name each carousel for what it shows with `ariaLabel`, such as \"Featured products\", and leave the word \"carousel\" out of it, since the role description already says it. Under a visible heading, pass `aria-labelledby` with the heading's id instead, which names it ahead of the `aria-label` the default still sets. The default, \"Image carousel\", is a placeholder: with the role description it says \"carousel\" twice, and every carousel left with it has the same name\n- Each item is a `group` with `aria-roledescription=\"slide\"`, named for its place, such as \"2 of 6\". An item's own `aria-label` or `aria-labelledby` takes the place of that name\n- Items out of view are `aria-hidden` and `inert`, so screen readers skip them and nothing in them takes focus. With several in view, every item in view is exposed. The copies a loop adds at each end of the track follow the same rule, so where the view runs past the last item, the copies on screen are the ones exposed\n- The track is a polite live region, so what comes into view is announced, except while autoplay is moving it (`aria-live=\"off\"`)\n- Autoplay waits while the pointer is over the carousel (with `pauseOnHover`) and while focus is anywhere inside it, on an item, an arrow or an indicator, so nothing moves while someone reads or works it. A browser that leaves focus on an arrow or an indicator a click pressed keeps it waiting until focus moves on. It's a pause, not a stop: once the pointer and focus leave, autoplay goes on\n- When the system asks for reduced motion, each step changes the view at once, with no slide, and a step past either end with `repeat` goes straight to the other end. The arrows and indicators change without a transition too. A drag still follows the pointer, since that's the user's own movement\n- When something else takes the item holding focus out of view (a swipe, a change of width that changes the count, a new controlled `value`, or the item's removal), focus moves to the first item in view rather than dropping to the page\n- Navigation arrows have `aria-label` for screen readers\n- With `arrowBackground={false}`, an arrow with keyboard focus shows Bulma's focus outline, as a ghost `Button` does, in the overlay look too. With `arrowHover`, an arrow shows while keyboard focus is on it\n- Indicators use `role=\"tablist\"` and `role=\"tab\"` semantics, one for each position a step can land on\n- The indicators take Bulma's look: a resting dot, line or bar is filled in the border color and the current one in the primary color, and a circle is a ring in the border color, filled when current. A resting one falls short of the 3:1 against the page that WCAG asks of a graphic. For that, set `--bulma-carousel-indicator-border-color` to a color such as `var(--bulma-text-weak)` on a class you pass through `className`, with the carousel's class in the selector (`.carousel.my-carousel`, `.bestax-carousel.my-carousel` under the prefixed flavor) so it wins whatever order the stylesheets load in. It draws a ring at each resting indicator's edge, circles included, and leaves the current one, and the dots, lines and bars in the overlay look, as they are. Forced colors (Windows' contrast themes) replaces the fills, so there each indicator shows its ring in the buttons' text color and the current one is filled in it.\n- The Left and Right arrow keys move the carousel while focus is on its arrows or indicators, unless Alt, Ctrl or Meta is held, which leaves them to the browser. Inside an item they're left to the item's content, such as a field or a slider. On an indicator they move focus to the indicator beside it and bring its slide into view, as a click on it does\n- Previous/Next buttons are disabled at the ends when not repeating. When the one holding focus is disabled, focus moves to the current indicator, or to the other arrow when there are no indicators. When a focused arrow or indicator goes away, as an indicator does when a change of width leaves fewer positions, focus moves to the current indicator, an arrow that works, or the first item in view, rather than dropping to the page\n- On a right-to-left page the slides run from right to left. The previous arrow sits on the right, at the start of the line, and the next arrow on the left, and the built-in chevrons flip to match. An `iconPrev` or `iconNext` is drawn as you give it. <kbd>ArrowLeft</kbd> and a swipe to the right go to the next slide, the way the track moves.",
|
|
77
|
+
"accessibility": "- Uses `role=\"region\"` with `aria-roledescription=\"carousel\"`\n- Name each carousel for what it shows with `ariaLabel`, such as \"Featured products\", and leave the word \"carousel\" out of it, since the role description already says it. Under a visible heading, pass `aria-labelledby` with the heading's id instead, which names it ahead of the `aria-label` the default still sets. The default, \"Image carousel\", is a placeholder: with the role description it says \"carousel\" twice, and every carousel left with it has the same name\n- Each item is a `group` with `aria-roledescription=\"slide\"`, named for its place, such as \"2 of 6\". An item's own `aria-label` or `aria-labelledby` takes the place of that name\n- Items out of view are `aria-hidden` and `inert`, so screen readers skip them and nothing in them takes focus. With several in view, every item in view is exposed. The copies a loop adds at each end of the track follow the same rule, so where the view runs past the last item, the copies on screen are the ones exposed\n- The track is a polite live region, so what comes into view is announced, except while autoplay is moving it (`aria-live=\"off\"`)\n- Autoplay waits while the pointer is over the carousel (with `pauseOnHover`) and while focus is anywhere inside it, on an item, an arrow or an indicator, so nothing moves while someone reads or works it. A browser that leaves focus on an arrow or an indicator a click pressed keeps it waiting until focus moves on. It's a pause, not a stop: once the pointer and focus leave, autoplay goes on\n- When the system asks for reduced motion, each step changes the view at once, with no slide, and a step past either end with `repeat` goes straight to the other end. The arrows and indicators change without a transition too. A drag still follows the pointer, since that's the user's own movement\n- When something else takes the item holding focus out of view (a swipe, a change of width that changes the count, a new controlled `value`, or the item's removal), focus moves to the first item in view rather than dropping to the page\n- Navigation arrows have `aria-label` for screen readers\n- The arrows', the indicators' and the items' names are English unless `labels` gives the words in the page's language, and the role descriptions take `aria-roledescription` on the `Carousel` and on each `CarouselItem`\n- With `arrowBackground={false}`, an arrow with keyboard focus shows Bulma's focus outline, as a ghost `Button` does, in the overlay look too. With `arrowHover`, an arrow shows while keyboard focus is on it\n- Indicators use `role=\"tablist\"` and `role=\"tab\"` semantics, one for each position a step can land on\n- The indicators take Bulma's look: a resting dot, line or bar is filled in the border color and the current one in the primary color, and a circle is a ring in the border color, filled when current. A resting one falls short of the 3:1 against the page that WCAG asks of a graphic. For that, set `--bulma-carousel-indicator-border-color` to a color such as `var(--bulma-text-weak)` on a class you pass through `className`, with the carousel's class in the selector (`.carousel.my-carousel`, `.bestax-carousel.my-carousel` under the prefixed flavor) so it wins whatever order the stylesheets load in. It draws a ring at each resting indicator's edge, circles included, and leaves the current one, and the dots, lines and bars in the overlay look, as they are. Forced colors (Windows' contrast themes) replaces the fills, so there each indicator shows its ring in the buttons' text color and the current one is filled in it.\n- The Left and Right arrow keys move the carousel while focus is on its arrows or indicators, unless Alt, Ctrl or Meta is held, which leaves them to the browser. Inside an item they're left to the item's content, such as a field or a slider. On an indicator they move focus to the indicator beside it and bring its slide into view, as a click on it does\n- Previous/Next buttons are disabled at the ends when not repeating. When the one holding focus is disabled, focus moves to the current indicator, or to the other arrow when there are no indicators. When a focused arrow or indicator goes away, as an indicator does when a change of width leaves fewer positions, focus moves to the current indicator, an arrow that works, or the first item in view, rather than dropping to the page\n- On a right-to-left page the slides run from right to left. The previous arrow sits on the right, at the start of the line, and the next arrow on the left, and the built-in chevrons flip to match. An `iconPrev` or `iconNext` is drawn as you give it. <kbd>ArrowLeft</kbd> and a swipe to the right go to the next slide, the way the track moves.",
|
|
74
78
|
"related": ["Modal", "Tabs"],
|
|
75
79
|
"storybook": "https://bestax.io/storybook/?path=/story/components-carousel",
|
|
76
80
|
"summary": "The `Carousel` component provides an image/content slider with navigation arrows and indicators.",
|
|
@@ -344,6 +348,15 @@
|
|
|
344
348
|
"inherited": false,
|
|
345
349
|
"deprecated": false
|
|
346
350
|
},
|
|
351
|
+
{
|
|
352
|
+
"name": "labels",
|
|
353
|
+
"type": "CarouselLabels",
|
|
354
|
+
"default": null,
|
|
355
|
+
"description": "The words it writes for its arrows, indicators and items, for another language.",
|
|
356
|
+
"required": false,
|
|
357
|
+
"inherited": false,
|
|
358
|
+
"deprecated": false
|
|
359
|
+
},
|
|
347
360
|
{
|
|
348
361
|
"name": "onChange",
|
|
349
362
|
"type": "(value: number) => void",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"code": "<ColorPicker\n aria-label=\"Accent\"\n format=\"hex\"\n defaultValue=\"#00d1b2\"\n swatches={['#1e6b99', '#00d1b2', '#ff6685', '#ffdd57']}\n>\n <ColorPicker.Swatches />\n <ColorPickerArea />\n <ColorPicker.HueSlider />\n <ColorPicker.Input />\n</ColorPicker>"
|
|
51
51
|
}
|
|
52
52
|
],
|
|
53
|
-
"accessibility": "- **The square is one 2D slider made of two native range inputs**, saturation and brightness,\n the way React Aria builds it. Only the input for the axis moved last is a tab stop, and the\n other is hidden until a key moves it, so a screen reader lists one control, \"Saturation and\n brightness, 2D slider\", with value text such as \"Saturation 50%, Brightness 80%\", the moved\n channel first. On a touch device both inputs stay exposed, so a touch screen reader can adjust\n each with its own gestures.\n- **Keys in the square:** the arrows move by 1, with Shift by 10; Page Up and Page Down move\n brightness by 10, and Home and End move saturation by 10. Focus follows the axis a key moved.\n- **The sliders** are native range inputs named \"Hue\" and \"Alpha\", read as \"171 degrees\" and\n \"50%\". The arrows step by 1, with Shift or Page Up and Page Down by 10, and Home and End go to\n the ends.\n- **Right to left,** the horizontal arrows follow the screen.\n- **Pointer:** a press anywhere on the square or a track sets the value there, so nothing needs a\n drag (WCAG 2.5.7), and the sliders, the square and the swatch buttons are at least 24 by 24 CSS\n pixels (WCAG 2.5.8).\n- **Swatches** are a radio group named \"Swatches\": each swatch is a radio named by its label or\n its color, the chosen one checked and marked by a check and a ring as well as its color.\n- **The value is always in words:** the field shows it and takes a typed color, and a value it\n can't read is marked invalid and put back when you leave the field. An `aria-invalid` or\n `aria-errormessage` you give `ColorPicker.Input` goes on that field rather than the row around\n it, so a screen reader hears it with the field.\n- **The group** is named by its `label`, or by `aria-label`.\n- **Strings** come from `labels`, with English defaults.\n- **Forced colors:** the square, the tracks and the swatches keep their colors with an edge in the\n system's text color, and the chosen swatch's ring is drawn in the system's highlight color.\n- **The eye dropper** button is named \"Pick a color from the screen\" and only appears where the\n browser can do it.\n- The `message` describes the group through `aria-describedby`, after any ids you pass there, as the label names it.",
|
|
53
|
+
"accessibility": "- **The square is one 2D slider made of two native range inputs**, saturation and brightness,\n the way React Aria builds it. Only the input for the axis moved last is a tab stop, and the\n other is hidden until a key moves it, so a screen reader lists one control, \"Saturation and\n brightness, 2D slider\", with value text such as \"Saturation 50%, Brightness 80%\", the moved\n channel first. On a touch device both inputs stay exposed, so a touch screen reader can adjust\n each with its own gestures.\n- **Keys in the square:** the arrows move by 1, with Shift by 10; Page Up and Page Down move\n brightness by 10, and Home and End move saturation by 10. Focus follows the axis a key moved.\n- **The sliders** are native range inputs named \"Hue\" and \"Alpha\", read as \"171 degrees\" and\n \"50%\". The arrows step by 1, with Shift or Page Up and Page Down by 10, and Home and End go to\n the ends.\n- **Right to left,** the horizontal arrows follow the screen.\n- **Pointer:** a press anywhere on the square or a track sets the value there, so nothing needs a\n drag (WCAG 2.5.7), and the sliders, the square and the swatch buttons are at least 24 by 24 CSS\n pixels (WCAG 2.5.8).\n- **Swatches** are a radio group named \"Swatches\": each swatch is a radio named by its label or\n its color, the chosen one checked and marked by a check and a ring as well as its color.\n- **The value is always in words:** the field shows it and takes a typed color, and a value it\n can't read is marked invalid and put back when you leave the field. An `aria-invalid` or\n `aria-errormessage` you give `ColorPicker.Input` goes on that field rather than the row around\n it, so a screen reader hears it with the field. Ones you give the `ColorPicker` reach that field\n as well, unless `ColorPicker.Input` has either of its own.\n- **The group** is named by its `label`, or by `aria-label`.\n- **Strings** come from `labels`, with English defaults.\n- **Forced colors:** the square, the tracks and the swatches keep their colors with an edge in the\n system's text color, and the chosen swatch's ring is drawn in the system's highlight color.\n- **The eye dropper** button is named \"Pick a color from the screen\" and only appears where the\n browser can do it.\n- The `message` describes the group through `aria-describedby`, after any ids you pass there, as the label names it.",
|
|
54
54
|
"related": ["ColorSwatch", "Slider", "Theme", "useBulmaClasses"],
|
|
55
55
|
"storybook": "https://bestax.io/storybook/?path=/story/form-colorpicker--default",
|
|
56
56
|
"summary": "The `ColorPicker` component is a panel for choosing a color: a saturation and brightness square, a hue slider, and the value as text, with alpha and swatches when asked for. Every part is operable by keyboard, and the square is two native range inputs, one per axis, with one tab stop. The value is a CSS color string in `format`, HSL by default.",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Date\"\n labelProps={{ htmlFor: 'date-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"calendar-alt\">\n <DateInput id=\"date-field-control\" placeholder=\"YYYY-MM-DD\" />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
|
-
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date, month or year.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid or year list inside keep their own names.\n- Closing the popover with `Escape` or a pick returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Dismissing without a pick commits nothing: an empty field stays empty, and leaving afterwards commits only what you typed.\n- Calendar uses `role=\"grid\"` with cells as `role=\"gridcell\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today's day, month and year get it once the page hydrates, so the reader's clock decides which.\n- In forced colors (Windows' contrast themes), the fill that marks the selected day, month or year, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid or year list and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` on the grid or year list it picks from, and keeps its tab stop and keys.\n- Roving `tabindex` keeps a single grid cell focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- The month grid is a `role=\"grid\"` of `role=\"row\"`s, labelled by the year in its header. Each month cell carries the full month name as its accessible name, `aria-current=\"date\"` for this month and `aria-disabled` for a month with no selectable day.\n- The year list is a `role=\"listbox\"`, named by the `chooseYear` label where it is the selection surface and by the heading that opens it otherwise. As the selection surface its options take `aria-selected` from the value's year rather than from focus, which roves through the list. When the focused year is disabled, the nearest enabled year takes the tab stop, so `Tab` still reaches the list.\n- The launcher and popover are named \"Choose month\" or \"Choose year\" to match the granularity; override them, and the month grid's \"Previous year\" / \"Next year\" buttons, through `labels` (`chooseMonth`, `chooseYear`, `prevYear`, `nextYear`).\n- Honors `prefers-reduced-motion` (skip popover fade-in).\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right. The month names follow the page.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.",
|
|
181
|
+
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date, month or year.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid or year list inside keep their own names.\n- Closing the popover with `Escape` or a pick returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Dismissing without a pick commits nothing: an empty field stays empty, and leaving afterwards commits only what you typed.\n- Calendar uses `role=\"grid\"` with cells as `role=\"gridcell\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today's day, month and year get it once the page hydrates, so the reader's clock decides which.\n- In forced colors (Windows' contrast themes), the fill that marks the selected day, month or year, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid or year list and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` on the grid or year list it picks from, and keeps its tab stop and keys.\n- Roving `tabindex` keeps a single grid cell focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- The month grid is a `role=\"grid\"` of `role=\"row\"`s, labelled by the year in its header. Each month cell carries the full month name as its accessible name, `aria-current=\"date\"` for this month and `aria-disabled` for a month with no selectable day.\n- The year list is a `role=\"listbox\"`, named by the `chooseYear` label where it is the selection surface and by the heading that opens it otherwise. As the selection surface its options take `aria-selected` from the value's year rather than from focus, which roves through the list. When the focused year is disabled, the nearest enabled year takes the tab stop, so `Tab` still reaches the list.\n- The launcher and popover are named \"Choose month\" or \"Choose year\" to match the granularity; override them, and the month grid's \"Previous year\" / \"Next year\" buttons, through `labels` (`chooseMonth`, `chooseYear`, `prevYear`, `nextYear`).\n- Honors `prefers-reduced-motion` (skip popover fade-in).\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right. The month names follow the page.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `DateInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.",
|
|
182
182
|
"related": ["DateTimeInput", "Input", "TimeInput"],
|
|
183
183
|
"storybook": "https://bestax.io/storybook/?path=/story/form-dateinput",
|
|
184
184
|
"summary": "The `DateInput` component is a form input that opens a popover calendar for date selection.",
|
|
@@ -717,7 +717,7 @@
|
|
|
717
717
|
}
|
|
718
718
|
],
|
|
719
719
|
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
720
|
-
"helperPropsNote": "Helper props go on the `.dateinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`.",
|
|
720
|
+
"helperPropsNote": "Helper props go on the `.dateinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`. Among the other attributes, `aria-label`, `aria-labelledby` and `aria-describedby` go on the `<div>` too, so they don't name or describe the `<input>`, except the native one `mobileNative` renders. Name it with `DateInput`'s `label`; with a labeled `Field` that isn't `grouped` or `hasAddons`, if you give it no `id`; or with an `id` and a `<label htmlFor>` of your own. Describe it with `DateInput`'s `message`: `DateInputBase` on its own has no way to describe it. Inline there is no `<input>` to name.",
|
|
721
721
|
"types": []
|
|
722
722
|
},
|
|
723
723
|
{
|
|
@@ -1061,7 +1061,7 @@
|
|
|
1061
1061
|
],
|
|
1062
1062
|
"extraProps": [],
|
|
1063
1063
|
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
1064
|
-
"helperPropsNote": "Helper props go on the `.dateinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`.",
|
|
1064
|
+
"helperPropsNote": "Helper props go on the `.dateinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`. Among the other attributes, `aria-label`, `aria-labelledby` and `aria-describedby` go on the `<div>` too, so they don't name or describe the `<input>`, except the native one `mobileNative` renders. Name it with `DateInput`'s `label`; with a labeled `Field` that isn't `grouped` or `hasAddons`, if you give it no `id`; or with an `id` and a `<label htmlFor>` of your own. Describe it with `DateInput`'s `message`: `DateInputBase` on its own has no way to describe it. Inline there is no `<input>` to name.",
|
|
1065
1065
|
"types": [],
|
|
1066
1066
|
"standalone": "base"
|
|
1067
1067
|
}
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"code": "<DateTimeInput label=\"Input only\" popover={false} defaultValue={new Date()} />"
|
|
171
171
|
}
|
|
172
172
|
],
|
|
173
|
-
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid and its wheels inside keep their own names.\n- Closing the popover with `Escape`, the ✓ button or `Enter` on a time wheel returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Closing it commits nothing by itself: an empty field stays empty, and leaving afterwards commits only what you typed, so seconds the display leaves out are kept.\n- Calendar uses `role=\"grid\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today gets it once the page hydrates, so the reader's clock decides which day.\n- In forced colors (Windows' contrast themes), the fill that marks the selected day, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\n- Roving `tabindex` keeps a single day focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- A `disabled` inline panel puts `aria-disabled=\"true\"` on its grid and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` there instead, and keeps its tab stop and keys.\n- Each time wheel uses `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the wheel shows it, in the picker's locale's digits when it has a locale. The values drawn above and below are click targets hidden from assistive technology, which reads the value from the spinbutton.\n- In a 12-hour picker, AM/PM is one of those wheels, reading `AM` or `PM`, or the picker's locale's words for them when it has a locale, and it widens to fit a longer word. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- The footer's confirm button exposes an accessible label (`Done`); the Reset button reverts your edits to the value the popover opened with, or on an `inline` picker, to the one described under [Inline](https://bestax.io/docs/api/form/datetime/datetimeinput#inline).\n- Tab order walks from the calendar to the footer (Reset / ✓), and from the time wheels to the footer while they are open.\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start. The time wheels keep `dir=\"ltr\"`.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.",
|
|
173
|
+
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its grid and its wheels inside keep their own names.\n- Closing the popover with `Escape`, the ✓ button or `Enter` on a time wheel returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Closing it commits nothing by itself: an empty field stays empty, and leaving afterwards commits only what you typed, so seconds the display leaves out are kept.\n- Calendar uses `role=\"grid\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today gets it once the page hydrates, so the reader's clock decides which day.\n- In forced colors (Windows' contrast themes), the fill that marks the selected day, and the year the header's year list is on, is replaced, so bestax's styles draw it in the system's highlight colors there, or in the system's color for a disabled control when it's disabled.\n- Roving `tabindex` keeps a single day focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- Closing the year list opened from the header, with a pick or `Escape`, puts focus back on the grid's tab stop, inline as in the popover.\n- A `disabled` inline panel puts `aria-disabled=\"true\"` on its grid and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` there instead, and keeps its tab stop and keys.\n- Each time wheel uses `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the wheel shows it, in the picker's locale's digits when it has a locale. The values drawn above and below are click targets hidden from assistive technology, which reads the value from the spinbutton.\n- In a 12-hour picker, AM/PM is one of those wheels, reading `AM` or `PM`, or the picker's locale's words for them when it has a locale, and it widens to fit a longer word. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- The footer's confirm button exposes an accessible label (`Done`); the Reset button reverts your edits to the value the popover opened with, or on an `inline` picker, to the one described under [Inline](https://bestax.io/docs/api/form/datetime/datetimeinput#inline).\n- Tab order walks from the calendar to the footer (Reset / ✓), and from the time wheels to the footer while they are open.\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start. The time wheels keep `dir=\"ltr\"`.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n field mid-row, keeps its corner and moves sideways just far enough to fit, or, wider than\n the screen, to the edge its text starts from.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `DateTimeInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.",
|
|
174
174
|
"related": ["DateInput", "Input", "TimeInput"],
|
|
175
175
|
"storybook": "https://bestax.io/storybook/?path=/story/form-datetimeinput",
|
|
176
176
|
"summary": "The `DateTimeInput` combines a calendar and a time **wheel spinner** in a single popover — an iOS-style layout.",
|
|
@@ -772,7 +772,7 @@
|
|
|
772
772
|
}
|
|
773
773
|
],
|
|
774
774
|
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
775
|
-
"helperPropsNote": "Helper props go on the `.datetimeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`.",
|
|
775
|
+
"helperPropsNote": "Helper props go on the `.datetimeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`. Among the other attributes, `aria-label`, `aria-labelledby` and `aria-describedby` go on the `<div>` too, so they don't name or describe the `<input>`, except the native one `mobileNative` renders. Name it with `DateTimeInput`'s `label`; with a labeled `Field` that isn't `grouped` or `hasAddons`, if you give it no `id`; or with an `id` and a `<label htmlFor>` of your own. Describe it with `DateTimeInput`'s `message`: `DateTimeInputBase` on its own has no way to describe it. Inline there is no `<input>` to name.",
|
|
776
776
|
"types": []
|
|
777
777
|
},
|
|
778
778
|
{
|
|
@@ -1179,7 +1179,7 @@
|
|
|
1179
1179
|
],
|
|
1180
1180
|
"extraProps": [],
|
|
1181
1181
|
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
1182
|
-
"helperPropsNote": "Helper props go on the `.datetimeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`.",
|
|
1182
|
+
"helperPropsNote": "Helper props go on the `.datetimeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`. Among the other attributes, `aria-label`, `aria-labelledby` and `aria-describedby` go on the `<div>` too, so they don't name or describe the `<input>`, except the native one `mobileNative` renders. Name it with `DateTimeInput`'s `label`; with a labeled `Field` that isn't `grouped` or `hasAddons`, if you give it no `id`; or with an `id` and a `<label htmlFor>` of your own. Describe it with `DateTimeInput`'s `message`: `DateTimeInputBase` on its own has no way to describe it. Inline there is no `<input>` to name.",
|
|
1183
1183
|
"types": [],
|
|
1184
1184
|
"standalone": "base"
|
|
1185
1185
|
}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n <Navbar.Burger aria-label=\"menu\" />\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.End>\n <Navbar.Item href=\"#\">Log in</Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n</Navbar>"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
|
-
"accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n The default accessible name is `main navigation`. A screen reader announces it with\n the role, and since the name holds the role word, \"navigation\" is heard twice.\n Pass a name without the role word (`aria-label=\"Site\"`), and a different name\n on each Navbar when a page has more than one. A passed `aria-label` replaces\n the default.\n- `Navbar.Item active` sets `aria-current=\"page\"` on the element `as` renders, the link by\n default, so the current item isn't only a color. An `aria-current` you pass wins: a navbar of\n sections on one page can say `\"location\"`, and `aria-current={false}` turns it off.\n- Bulma fills an active link item with its selected color, the link color in a navbar with no\n `color`, and bestax's styles give its text the color Bulma picks to read on that fill,\n `--bulma-navbar-item-selected-color-l`. Bulma's own stylesheet leaves the text in the navbar's\n normal text color, dark gray on blue on the light scheme, so the rule ships in `bestax.css` and\n `extras.css`. A `--bulma-navbar-item-color` you set on the item itself still wins, and an item\n with a `bgColor` keeps the navbar's text color. A rule of your own that takes the fill off\n restates `color` too.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. <kbd>Escape</kbd> anywhere else in the open dropdown, its\n menu included, puts focus back on the link and closes it too, unless a control there marks the\n key used, the key comes from a dialog or from content opened from the menu into a portal, or\n focus can't go back to the link. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover. Bulma shows a `hoverable` dropdown's menu while\n the pointer is on it and while focus is in it, the link included, on a desktop-wide window.\n <kbd>Escape</kbd> puts a menu shown that way away, and it stays away until the pointer has left\n the dropdown and focus has too, or until the pointer comes back or focus moves onto something in\n it. From the page, the key goes on to what has focus; from inside\n the dropdown, focus moves to the link, with the same exceptions as for an open one, such as focus\n that can't go back to the link, where the menu stays. Below the desktop breakpoint, where the menu always\n shows under the burger, Escape doesn't put it away, though it still closes an open one.\n- **Forced colors:** Bulma draws the burger's bars as a background color, which forced colors\n (Windows' contrast themes) replaces, so the burger would vanish there while it still works and\n takes focus. bestax's styles keep its bars visible in the system's button text color. That rule\n ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet, and an\n [`AppFrame`](https://bestax.io/docs/api/layout/appframe)'s burger gets it too. Bulma marks an active or selected\n link item, `Navbar.Link` and dropdown row with a fill and a text color alone, which forced\n colors replaces, so bestax's styles draw a bar in the system's highlight color inside it there:\n along its bottom in a row, and down its start edge where the items stack, in a dropdown and in\n the menu the burger opens. The item and everything in it stay in the contrast theme's colors,\n and an active tab gets the bar above Bulma's thicker underline. This ships in the same\n stylesheets.\n- **`Navbar.Divider` in forced colors:** Bulma draws it as a background color too, which forced\n colors paints in the dropdown's own color, so the line would vanish. bestax's styles draw it in\n the system's text color there, from the same stylesheets.\n- **In a colored [`Hero`](https://bestax.io/docs/api/layout/hero):** Bulma's hero sets the colors its navbar's items\n take on hover and when active, but Bulma's navbar doesn't read them, so a focused or hovered\n item took the scheme's fill under the hero's text, and the active item and the burger took the\n link color. For a `Navbar` with no `color` of its own, bestax's styles draw a focused, hovered or\n active item in the hero's text color with the hero's background color as its text, the burger\n and a tab in the hero's text color, and the dropdown arrow in its link's text color. The menu the\n burger opens, and the dropdown's rows in it, take the hero's background and text, except an\n active row, which keeps Bulma's selected fill and the text that reads on it, and on a phone a bold hero's menu takes the hero's\n own gradient. Where `Navbar.DropdownMenu` is a box of its own, on a desktop, its links keep\n Bulma's colors. That rule ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet.\n\n:::note\nThere's no arrow-key roving between navbar items and no outside-click handling for\n`Navbar.Dropdown` — Bulma navbar dropdowns are hover/click surfaces, so this is intentionally\nkept simple.\n:::",
|
|
85
|
+
"accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n The default accessible name is `main navigation`. A screen reader announces it with\n the role, and since the name holds the role word, \"navigation\" is heard twice.\n Pass a name without the role word (`aria-label=\"Site\"`), and a different name\n on each Navbar when a page has more than one. A passed `aria-label` replaces\n the default.\n- `Navbar.Item active` sets `aria-current=\"page\"` on the element `as` renders, the link by\n default, so the current item isn't only a color. An `aria-current` you pass wins: a navbar of\n sections on one page can say `\"location\"`, and `aria-current={false}` turns it off.\n- Bulma fills an active link item with its selected color, the link color in a navbar with no\n `color`, and bestax's styles give its text the color Bulma picks to read on that fill,\n `--bulma-navbar-item-selected-color-l`. Bulma's own stylesheet leaves the text in the navbar's\n normal text color, dark gray on blue on the light scheme, so the rule ships in `bestax.css` and\n `extras.css`. A `--bulma-navbar-item-color` you set on the item itself still wins, and an item\n with a `bgColor` keeps the navbar's text color. A rule of your own that takes the fill off\n restates `color` too.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. <kbd>Escape</kbd> anywhere else in the open dropdown, its\n menu included, puts focus back on the link and closes it too, unless a control there marks the\n key used, the key comes from a dialog or from content opened from the menu into a portal, or\n focus can't go back to the link. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover. Bulma shows a `hoverable` dropdown's menu while\n the pointer is on it and while focus is in it, the link included, on a desktop-wide window.\n <kbd>Escape</kbd> puts a menu shown that way away, and it stays away until the pointer has left\n the dropdown and focus has too, or until the pointer comes back or focus moves onto something in\n it. From the page, the key goes on to what has focus; from inside\n the dropdown, focus moves to the link, with the same exceptions as for an open one, such as focus\n that can't go back to the link, where the menu stays. Below the desktop breakpoint, where the menu always\n shows under the burger, Escape doesn't put it away, though it still closes an open one.\n- **Forced colors:** Bulma draws the burger's bars as a background color, which forced colors\n (Windows' contrast themes) replaces, so the burger would vanish there while it still works and\n takes focus. bestax's styles keep its bars visible in the system's button text color. That rule\n ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet, and an\n [`AppFrame`](https://bestax.io/docs/api/layout/appframe)'s burger gets it too. Bulma marks an active or selected\n link item, `Navbar.Link` and dropdown row with a fill and a text color alone, which forced\n colors replaces, so bestax's styles draw a bar in the system's highlight color inside it there:\n along its bottom in a row, and down its start edge where the items stack, in a dropdown and in\n the menu the burger opens. The item and everything in it stay in the contrast theme's colors,\n and an active tab gets the bar above Bulma's thicker underline. This ships in the same\n stylesheets.\n- **`Navbar.Divider` in forced colors:** Bulma draws it as a background color too, which forced\n colors paints in the dropdown's own color, so the line would vanish. bestax's styles draw it in\n the system's text color there, from the same stylesheets.\n- **An open dropdown's edge in forced colors:** from the desktop breakpoint up, Bulma draws\n `Navbar.DropdownMenu` as a box over the page, edged with a shadow and, for some, a line on the\n side it opens from. Forced colors drops the shadow and paints the box in the page's own color, so\n bestax's styles draw a one pixel line in the system's text color around it there, outside the\n box, so nothing moves. Under the burger its rows sit in the menu, with no box to edge. This\n ships in the same stylesheets.\n- **In a colored [`Hero`](https://bestax.io/docs/api/layout/hero):** Bulma's hero sets the colors its navbar's items\n take on hover and when active, but Bulma's navbar doesn't read them, so a focused or hovered\n item took the scheme's fill under the hero's text, and the active item and the burger took the\n link color. For a `Navbar` with no `color` of its own, bestax's styles draw a focused, hovered or\n active item in the hero's text color with the hero's background color as its text, the burger\n and a tab in the hero's text color, and the dropdown arrow in its link's text color. The menu the\n burger opens, and the dropdown's rows in it, take the hero's background and text, except an\n active row, which keeps Bulma's selected fill and the text that reads on it, and on a phone a bold hero's menu takes the hero's\n own gradient. Where `Navbar.DropdownMenu` is a box of its own, on a desktop, its links keep\n Bulma's colors. That rule ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet.\n\n:::note\nThere's no arrow-key roving between navbar items and no outside-click handling for\n`Navbar.Dropdown` — Bulma navbar dropdowns are hover/click surfaces, so this is intentionally\nkept simple.\n:::",
|
|
86
86
|
"related": ["Button", "Icon", "useBulmaClasses"],
|
|
87
87
|
"storybook": "https://bestax.io/storybook/?path=/story/components-navbar--default",
|
|
88
88
|
"summary": "The `Navbar` component implements Bulma's powerful, responsive navigation bar for your Bulma React UI.",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Read-only Input",
|
|
38
|
-
"code": "<Numberinput defaultValue={5}
|
|
38
|
+
"code": "<Numberinput\n label=\"Seats\"\n message=\"Set it with the buttons.\"\n defaultValue={5}\n editable={false}\n color=\"primary\"\n/>"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Buttons in Another Language",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Quantity\"\n labelProps={{ htmlFor: 'quantity-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control>\n <Numberinput\n id=\"quantity-field-control\"\n defaultValue={1}\n min={1}\n max={10}\n color=\"primary\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"accessibility": "- Uses native number input element\n- The `label` prop, or the label of a `Field` the Numberinput sits in, names its input. A `Field` with `hasAddons` or `grouped` holds several controls and names none, so wire that one with `labelProps={{ htmlFor }}` and a matching `id`.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes, with `aria-valuenow` left off while the field holds no number\n- The increase and decrease buttons are named \"Increase value\" and \"Decrease value\", in both variants, and `labels` names them in the page's language\n- Arrow keys increment/decrement the value\n- While you edit, the field can be empty or hold a lone `-` on the way to a negative number. `onChange` waits for a number, and Enter or leaving the field while it holds none puts the last value back\n- The +/- buttons stay out of the Tab order, and a press on one leaves focus where it was, in the input when it had it, so the arrow keys keep working after a click and a button that disables at `min` or `max` doesn't take focus with it. A press on a button that's already disabled reaches nothing, as a press on any text does, so focus leaves the input then\n- Buttons are disabled at min/max boundaries\n- The `message` describes the number input through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the input takes focus.",
|
|
61
|
+
"accessibility": "- Uses native number input element\n- The `label` prop, or the label of a `Field` the Numberinput sits in, names its input. A `Field` with `hasAddons` or `grouped` holds several controls and names none, so wire that one with `labelProps={{ htmlFor }}` and a matching `id`.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes, with `aria-valuenow` left off while the field holds no number\n- The increase and decrease buttons are named \"Increase value\" and \"Decrease value\", in both variants, and `labels` names them in the page's language\n- Arrow keys increment/decrement the value\n- With `editable={false}` the input is read-only, so nothing can be typed in, but the arrow keys and the buttons still change the value. A screen reader announces the field as read-only all the same, so say that the buttons set it in its label, or in its `message` where it renders one\n- While you edit, the field can be empty or hold a lone `-` on the way to a negative number. `onChange` waits for a number, and Enter or leaving the field while it holds none puts the last value back\n- The +/- buttons stay out of the Tab order, and a press on one leaves focus where it was, in the input when it had it, so the arrow keys keep working after a click and a button that disables at `min` or `max` doesn't take focus with it. A press on a button that's already disabled reaches nothing, as a press on any text does, so focus leaves the input then\n- Buttons are disabled at min/max boundaries\n- The `message` describes the number input through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the input takes focus.",
|
|
62
62
|
"related": ["Input", "Slider"],
|
|
63
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-numberinput",
|
|
64
64
|
"summary": "The `Numberinput` component provides a number input with increment/decrement buttons.",
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
"name": "editable",
|
|
229
229
|
"type": "boolean",
|
|
230
230
|
"default": "true",
|
|
231
|
-
"description": "Whether the input can be typed in.",
|
|
231
|
+
"description": "Whether the input can be typed in. With `false` the input is `readOnly`, so nothing can be typed or pasted, but the arrow keys and the buttons still change the value, and a screen reader announces the field as read-only all the same. Say that the buttons set it in its label, or in its `message` where it renders one.",
|
|
232
232
|
"required": false,
|
|
233
233
|
"inherited": false,
|
|
234
234
|
"deprecated": false
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Complete Panel (Revolutionary Figures)",
|
|
10
|
-
"code": "<Panel aria-labelledby=\"panel-figures\">\n {/* The level that fits the headings around the panel: 4 here, under an h3. */}\n <Panel.Heading id=\"panel-figures\" role=\"heading\" aria-level={4}>\n Revolutionary Figures\n </Panel.Heading>\n <Panel.InputBlock placeholder=\"Search\" />\n <Panel.Tabs>\n <a className=\"is-active\"
|
|
10
|
+
"code": "<Panel aria-labelledby=\"panel-figures\">\n {/* The level that fits the headings around the panel: 4 here, under an h3. */}\n <Panel.Heading id=\"panel-figures\" role=\"heading\" aria-level={4}>\n Revolutionary Figures\n </Panel.Heading>\n <Panel.InputBlock placeholder=\"Search\" />\n <Panel.Tabs>\n <a href=\"#all\" className=\"is-active\" aria-current=\"true\">\n All\n </a>\n <a href=\"#patriots\">Patriots</a>\n <a href=\"#loyalists\">Loyalists</a>\n <a href=\"#battles\">Battles</a>\n <a href=\"#documents\">Documents</a>\n </Panel.Tabs>\n <Panel.Block href=\"#george-washington\" active>\n <Panel.Icon name=\"user\" variant=\"solid\" />\n George Washington\n </Panel.Block>\n <Panel.Block href=\"#alexander-hamilton\">\n <Panel.Icon name=\"user\" variant=\"solid\" />\n Alexander Hamilton\n </Panel.Block>\n <Panel.Block href=\"#benedict-arnold\">\n <Panel.Icon name=\"user\" variant=\"solid\" />\n Benedict Arnold\n </Panel.Block>\n <Panel.Block href=\"#john-adams\">\n <Panel.Icon name=\"user\" variant=\"solid\" />\n John Adams\n </Panel.Block>\n <Panel.Block href=\"#battle-of-saratoga\">\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Battle of Saratoga\n </Panel.Block>\n <Panel.Block href=\"#treaty-of-paris\">\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Treaty of Paris\n </Panel.Block>\n <Panel.Block href=\"#bunker-hill\">\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Bunker Hill\n </Panel.Block>\n <Panel.CheckboxBlock>remember me</Panel.CheckboxBlock>\n <Panel.ButtonBlock>Reset all filters</Panel.ButtonBlock>\n</Panel>"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "Color Variants",
|
|
14
|
-
"code": "<>\n {(\n [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n ] as const\n ).map(color => (\n <Panel key={color} color={color} aria-labelledby={`panel-${color}`}>\n <Panel.Heading id={`panel-${color}`}>\n {color.charAt(0).toUpperCase() + color.slice(1)} Panel\n </Panel.Heading>\n <Panel.InputBlock placeholder=\"Search\" />\n <Panel.Block active>\n <Panel.Icon name=\"user\" variant=\"solid\" />\n George Washington\n </Panel.Block>\n <Panel.Block>\n <Panel.Icon name=\"user\" variant=\"solid\" />\n Marquis de Lafayette\n </Panel.Block>\n <Panel.Block>\n <Panel.Icon name=\"user\" variant=\"solid\" />\n Nathanael Greene\n </Panel.Block>\n <Panel.Block>\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Battle of Trenton\n </Panel.Block>\n <Panel.Block>\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Yorktown\n </Panel.Block>\n <Panel.ButtonBlock>Reset all filters</Panel.ButtonBlock>\n </Panel>\n ))}\n</>"
|
|
14
|
+
"code": "<>\n {(\n [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'black',\n 'dark',\n 'light',\n 'white',\n ] as const\n ).map(color => (\n <Panel key={color} color={color} aria-labelledby={`panel-${color}`}>\n <Panel.Heading id={`panel-${color}`}>\n {color.charAt(0).toUpperCase() + color.slice(1)} Panel\n </Panel.Heading>\n <Panel.InputBlock placeholder=\"Search\" />\n <Panel.Block href=\"#george-washington\" active>\n <Panel.Icon name=\"user\" variant=\"solid\" />\n George Washington\n </Panel.Block>\n <Panel.Block href=\"#marquis-de-lafayette\">\n <Panel.Icon name=\"user\" variant=\"solid\" />\n Marquis de Lafayette\n </Panel.Block>\n <Panel.Block href=\"#nathanael-greene\">\n <Panel.Icon name=\"user\" variant=\"solid\" />\n Nathanael Greene\n </Panel.Block>\n <Panel.Block href=\"#battle-of-trenton\">\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Battle of Trenton\n </Panel.Block>\n <Panel.Block href=\"#yorktown\">\n <Panel.Icon name=\"flag\" variant=\"solid\" />\n Yorktown\n </Panel.Block>\n <Panel.ButtonBlock>Reset all filters</Panel.ButtonBlock>\n </Panel>\n ))}\n</>"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"title": "A Panel That Is Not Navigation",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "Compound (dot-notation) usage",
|
|
22
|
-
"code": "<Panel aria-labelledby=\"panel-documents\">\n <Panel.Heading id=\"panel-documents\">Founding Documents</Panel.Heading>\n <Panel.Block active>\n <Panel.Icon name=\"file\" variant=\"solid\" />\n Declaration of Independence\n </Panel.Block>\n <Panel.Block>\n <Panel.Icon name=\"file\" variant=\"solid\" />\n Articles of Confederation\n </Panel.Block>\n <Panel.ButtonBlock>Reset all filters</Panel.ButtonBlock>\n</Panel>"
|
|
22
|
+
"code": "<Panel aria-labelledby=\"panel-documents\">\n <Panel.Heading id=\"panel-documents\">Founding Documents</Panel.Heading>\n <Panel.Block href=\"#declaration-of-independence\" active>\n <Panel.Icon name=\"file\" variant=\"solid\" />\n Declaration of Independence\n </Panel.Block>\n <Panel.Block href=\"#articles-of-confederation\">\n <Panel.Icon name=\"file\" variant=\"solid\" />\n Articles of Confederation\n </Panel.Block>\n <Panel.ButtonBlock>Reset all filters</Panel.ButtonBlock>\n</Panel>"
|
|
23
23
|
}
|
|
24
24
|
],
|
|
25
|
-
"accessibility": "- The root panel renders as a semantic `<nav>`, a navigation landmark, by default. For a panel that is not navigation, set `as` to `article`, `section`, `aside` or `div`, and give a `section` an accessible name (for example `aria-labelledby` pointing at the `Panel.Heading`'s `id`) if it should be a region.\n- `Panel.Heading` renders Bulma's `<p class=\"panel-heading\">`, which assistive tech reads as a plain paragraph: it isn't a heading, and it doesn't name the panel. A screen reader user who moves by heading skips it, and one who moves by landmark hears \"navigation\" for each panel with nothing to tell them apart. Give the heading `role=\"heading\"` and the `aria-level` that fits the headings already on the page. To name a `nav` panel, the default, after its heading, give the heading an `id` that's unique on the page and write `aria-labelledby` with that id on the `Panel`, the way the bullet above names a `section`. The examples above name each panel this way, and the first also makes its heading one.\n- The `Panel.Block` by default renders as an anchor `<a>`. Its props follow `as`: only an `a` takes the anchor attributes (`href`, `target`, `download` and the rest), and only a `label` takes `htmlFor` and `form`. A block on another tag drops them, and `rel`, at runtime too.\n- `Panel.Block active` sets `aria-current=\"page\"` on the element `as` renders, the `<a>` by default, so the current block isn't only a color. An `aria-current` you pass wins: a panel of sections on one page can say `\"location\"`, and `aria-current={false}` turns it off, as on an active `label` block with a checkbox.\n- A panel with no `color` keeps its heading readable on the dark scheme through bestax's `components/panel` partial, which `extras.css` and `bestax.css` include. Bulma's CSS alone writes that heading white on light gray.\n- A panel with a `color` draws the text of its active block and active tab, the active block's icon and the active tab's underline in that color at the lightness Bulma picks for the color's text on the page, through the same partial, so they read on both schemes. Black takes the title text's lightness, which is white on the dark scheme. Without the partial the text inherits the color's text helper Panel puts on the panel, and the icon and underline take the color's own lightness, which for a light or white panel is near white on white.\n- **Forced colors:** Bulma marks the active tab and the active block with colors alone, which forced colors (Windows' contrast themes) replaces, so bestax's styles draw a bar in the system's highlight color there: along the bottom of the active tab, and down the start edge of the active block. The tab, the block and everything in them stay in the contrast theme's colors. It reads the `is-active` class, on a `Panel.Block` and on the tab links you write in `Panel.Tabs`. The panel's own edge is a shadow, which forced colors drops, so the same styles draw it as a one pixel line in the system's text color around the panel, with a line under the heading in place of its fill. This comes from the same partial
|
|
25
|
+
"accessibility": "- The root panel renders as a semantic `<nav>`, a navigation landmark, by default. For a panel that is not navigation, set `as` to `article`, `section`, `aside` or `div`, and give a `section` an accessible name (for example `aria-labelledby` pointing at the `Panel.Heading`'s `id`) if it should be a region.\n- `Panel.Heading` renders Bulma's `<p class=\"panel-heading\">`, which assistive tech reads as a plain paragraph: it isn't a heading, and it doesn't name the panel. A screen reader user who moves by heading skips it, and one who moves by landmark hears \"navigation\" for each panel with nothing to tell them apart. Give the heading `role=\"heading\"` and the `aria-level` that fits the headings already on the page. To name a `nav` panel, the default, after its heading, give the heading an `id` that's unique on the page and write `aria-labelledby` with that id on the `Panel`, the way the bullet above names a `section`. The examples above name each panel this way, and the first also makes its heading one.\n- The `Panel.Block` by default renders as an anchor `<a>`. Its props follow `as`: only an `a` takes the anchor attributes (`href`, `target`, `download` and the rest), and only a `label` takes `htmlFor` and `form`. A block on another tag drops them, and `rel`, at runtime too.\n- Give each `Panel.Block` that opens something an `href`, as the examples do: an `<a>` with no `href` isn't a link, so Tab skips it, Enter does nothing on it, and assistive tech reads it as text. A block that isn't a link takes `as=\"div\"`, or `as=\"label\"` around a control. The links you write in `Panel.Tabs` take an `href` too, and the active one `aria-current=\"true\"` beside its `is-active` class, which is only seen.\n- `Panel.Block active` sets `aria-current=\"page\"` on the element `as` renders, the `<a>` by default, so the current block isn't only a color. An `aria-current` you pass wins: a panel of sections on one page can say `\"location\"`, and `aria-current={false}` turns it off, as on an active `label` block with a checkbox.\n- A panel with no `color` keeps its heading readable on the dark scheme through bestax's `components/panel` partial, which `extras.css` and `bestax.css` include. Bulma's CSS alone writes that heading white on light gray.\n- A panel with a `color` draws the text of its active block and active tab, the active block's icon and the active tab's underline in that color at the lightness Bulma picks for the color's text on the page, through the same partial, so they read on both schemes. Black takes the title text's lightness, which is white on the dark scheme. Without the partial the text inherits the color's text helper Panel puts on the panel, and the icon and underline take the color's own lightness, which for a light or white panel is near white on white.\n- **Forced colors:** Bulma marks the active tab and the active block with colors alone, which forced colors (Windows' contrast themes) replaces, so bestax's styles draw a bar in the system's highlight color there: along the bottom of the active tab, and down the start edge of the active block. The tab, the block and everything in them stay in the contrast theme's colors. It reads the `is-active` class, on a `Panel.Block` and on the tab links you write in `Panel.Tabs`. The panel's own edge is a shadow, which forced colors drops, so the same styles draw it as a one pixel line in the system's text color around the panel, with a line under the heading in place of its fill. This comes from the same partial.",
|
|
26
26
|
"related": ["Icon", "useBulmaClasses"],
|
|
27
27
|
"storybook": "https://bestax.io/storybook/?path=/story/components-panel--revolutionary-war",
|
|
28
28
|
"summary": "The `Panel` component implements Bulma's versatile panel block for React.",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"path": "Panel.Tabs",
|
|
109
|
-
"summary": "Panel tabs (renders as `<p class=\"panel-tabs\">`)",
|
|
109
|
+
"summary": "Panel tabs (renders as `<p class=\"panel-tabs\">`). Its links are yours to write. Give each an `href`, so the keyboard can reach it, and the active one `aria-current=\"true\"` beside its `is-active` class, which is only seen.",
|
|
110
110
|
"component": null,
|
|
111
111
|
"props": [
|
|
112
112
|
{
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
136
|
"path": "Panel.Block",
|
|
137
|
-
"summary": "Individual panel block (renders as `<a class=\"panel-block\">` unless `as` says otherwise)",
|
|
137
|
+
"summary": "Individual panel block (renders as `<a class=\"panel-block\">` unless `as` says otherwise). Give a block that opens something an `href`: an `<a>` with no `href` isn't a link, so Tab skips it. A block that isn't a link takes `as=\"div\"`, or `as=\"label\"` around a control.",
|
|
138
138
|
"component": null,
|
|
139
139
|
"props": [
|
|
140
140
|
{
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Volume\"\n labelProps={{ htmlFor: 'volume-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"volume-up\">\n <Slider\n id=\"volume-field-control\"\n defaultValue={50}\n color=\"primary\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"accessibility": "- Uses native `<input type=\"range\">` element\n- The `label` prop, or the label of a `Field` the slider sits in, names its input.\n- In range mode the label starts each thumb's name, so `<Slider range label=\"Price range\" />` announces \"Price range Minimum value\" and \"Price range Maximum value\". Each thumb points `aria-labelledby` at the label and at a hidden span holding its own text, because an `aria-label` would outrank the label. The label's `for` still lands on the low thumb, so clicking the label focuses it.\n- `ariaLabel` wins over the label. In range mode each entry is that thumb's whole name, with no label in front, and an empty entry counts as unset.\n- An `aria-label` or `aria-labelledby` you pass straight to a range Slider names the whole Slider, so it takes the label's place at the start of both thumbs' names: `<Slider range aria-label=\"Budget\" />` announces \"Budget Minimum value\" and \"Budget Maximum value\". An `ariaLabel` entry still wins for its own thumb. To keep a label out of the thumbs' names altogether, pass `aria-labelledby={undefined}`, and they stay \"Minimum value\" and \"Maximum value\".\n- A `Field` label you wire by hand with `labelProps={{ htmlFor }}`, as in a horizontal form, gets no generated id, so give it one of your own there as well, as in `labelProps={{ htmlFor: 'price', id: 'price-label' }}`, and it starts both thumbs' names the same way. Without that `id` it reaches a range Slider only through its `for`, which the thumbs' default `aria-label` outranks, so they stay \"Minimum value\" and \"Maximum value\".\n- In forced colors (Windows' contrast themes) the track and its fill would disappear, since they're painted as a gradient. bestax's styles paint the fill in the system's highlight color and the rest of the track in its text color there, so the track shows how far it's filled. The mark labels draw in its text color too, and the tick lines in its button text color. A disabled slider draws its track, thumbs, ticks and labels in its color for disabled text instead. All of them draw at full strength there.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes\n- The thumb's `aria-valuetext` is what `getAriaValueText` returns, or else the value bubble's text when `formatOutput` or `scale` is set, whether or not the bubble shows, so ``formatOutput={v => `$${v}`}`` announces \"$41\" rather than \"41\".\n- The value bubble is an `<output>`, which a browser treats as a live region. It's set not to announce: a thumb announces its value as it's moved.\n- Fully keyboard accessible with arrow keys\n- Home and End move a thumb to the slider's ends. When `max` falls between two steps, End stops at the last step below it, the highest value the slider holds, and that's the value it reports. On a range Slider a thumb stops at the other thumb, or `minDistance` short of it.\n- Focus states clearly visible\n- On a right-to-left page the native range mirrors, and the fill, the tick marks and the value bubble follow it, so a value of 25 fills from the right. A vertical slider still fills from the bottom.\n- In forced colors (Windows' contrast themes) the value bubble takes the page's own background, and every side of its arrow would be painted, drawing it as a square. bestax's styles outline the bubble in the system's text color there, and keep the arrow a triangle in that color, pointing at the thumb whichever side the bubble sits on.\n- The `message` describes the slider through `aria-describedby`, both thumbs in range mode. Ids you pass in `aria-describedby` go first, on the only thumb or the low one, where the other attributes go.",
|
|
61
|
+
"accessibility": "- Uses native `<input type=\"range\">` element\n- The `label` prop, or the label of a `Field` the slider sits in, names its input.\n- In range mode the label starts each thumb's name, so `<Slider range label=\"Price range\" />` announces \"Price range Minimum value\" and \"Price range Maximum value\". Each thumb points `aria-labelledby` at the label and at a hidden span holding its own text, because an `aria-label` would outrank the label. The label's `for` still lands on the low thumb, so clicking the label focuses it.\n- `ariaLabel` wins over the label. In range mode each entry is that thumb's whole name, with no label in front, and an empty entry counts as unset.\n- An `aria-label` or `aria-labelledby` you pass straight to a range Slider names the whole Slider, so it takes the label's place at the start of both thumbs' names: `<Slider range aria-label=\"Budget\" />` announces \"Budget Minimum value\" and \"Budget Maximum value\". An `ariaLabel` entry still wins for its own thumb. To keep a label out of the thumbs' names altogether, pass `aria-labelledby={undefined}`, and they stay \"Minimum value\" and \"Maximum value\".\n- A `Field` label you wire by hand with `labelProps={{ htmlFor }}`, as in a horizontal form, gets no generated id, so give it one of your own there as well, as in `labelProps={{ htmlFor: 'price', id: 'price-label' }}`, and it starts both thumbs' names the same way. Without that `id` it reaches a range Slider only through its `for`, which the thumbs' default `aria-label` outranks, so they stay \"Minimum value\" and \"Maximum value\".\n- In forced colors (Windows' contrast themes) the track and its fill would disappear, since they're painted as a gradient. bestax's styles paint the fill in the system's highlight color and the rest of the track in its text color there, so the track shows how far it's filled. The mark labels draw in its text color too, and the tick lines in its button text color, with a hairline in the page's color down the middle where a line crosses the track, so it shows on the track and on the fill. A disabled slider draws its track, thumbs, ticks and labels in its color for disabled text instead. All of them draw at full strength there.\n- Has `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes\n- The thumb's `aria-valuetext` is what `getAriaValueText` returns, or else the value bubble's text when `formatOutput` or `scale` is set, whether or not the bubble shows, so ``formatOutput={v => `$${v}`}`` announces \"$41\" rather than \"41\".\n- The value bubble is an `<output>`, which a browser treats as a live region. It's set not to announce: a thumb announces its value as it's moved.\n- Fully keyboard accessible with arrow keys\n- Home and End move a thumb to the slider's ends. When `max` falls between two steps, End stops at the last step below it, the highest value the slider holds, and that's the value it reports. On a range Slider a thumb stops at the other thumb, or `minDistance` short of it.\n- Focus states clearly visible\n- On a right-to-left page the native range mirrors, and the fill, the tick marks and the value bubble follow it, so a value of 25 fills from the right. A vertical slider still fills from the bottom.\n- In forced colors (Windows' contrast themes) the value bubble takes the page's own background, and every side of its arrow would be painted, drawing it as a square. bestax's styles outline the bubble in the system's text color there, and keep the arrow a triangle in that color, pointing at the thumb whichever side the bubble sits on.\n- The `message` describes the slider through `aria-describedby`, both thumbs in range mode. Ids you pass in `aria-describedby` go first, on the only thumb or the low one, where the other attributes go.",
|
|
62
62
|
"related": ["Numberinput", "Progress"],
|
|
63
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-slider",
|
|
64
64
|
"summary": "The `Slider` component provides a range slider input for selecting values within a range.",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Tags\"\n labelProps={{ htmlFor: 'tags-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control>\n <Taginput\n id=\"tags-field-control\"\n icon=\"tags\"\n defaultValue={['React', 'TypeScript']}\n placeholder=\"Add a tag...\"\n tagColor=\"primary\"\n />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"accessibility": "- The `label` prop is automatically associated with the inner text input (`htmlFor` plus a generated `id`, or your own `id` if you pass one). While the label is wired it also names the input; without one, the input falls back to `aria-label=\"Add tag\"`. Inside a labeled `Field`, that `Field`'s label names the input the same way and replaces the fallback.\n- A user-supplied `id` is applied to the inner input (the labellable control), not the wrapper div.\n- When `maxTags` is reached the text input turns read-only rather than going away, so keyboard focus stays where it was and the label keeps naming the input. The suggestion list stays closed.\n- While the counter shows, it describes the input through `aria-describedby`, so a screen reader hears the count, like \"3 / 3\" at the limit.\n- Tags are keyboard navigable\n- Each tag's remove button is named \"Remove\" and the tag's text, the `field` of an object tag. With `ariaCloseLabel`, every button takes that one name, as for a translation, and is described by its tag's text, so it still says which tag it removes. With a `tagTemplate` it has the one name and no description\n- With `data`, the input is a `role=\"combobox\"` with `aria-autocomplete=\"list\"` and `aria-haspopup=\"listbox\"`. Its `aria-expanded` is true only while the suggestion list is on screen, and while it is, `aria-controls` points at the list. While no suggestion matches there's no list, so it stays false. Without `data` there's never a list, so the input stays a plain text field\n- Focus stays in the input, which points `aria-activedescendant` at the highlighted suggestion as the arrow keys or the mouse move it\n- Focus moving from the input to another element closes the suggestion list, as `Tab` to the next field or to a tag's remove button does, so the list doesn't stay open over what has focus. A press on a suggestion keeps focus in the input, so the list stays open for the click, and the list takes no `Tab` stop of its own\n- The list is a `role=\"listbox\"` named through `aria-labelledby` by the label that names the input, when that label has an id: the `label` prop's label always has one, and so does a `Field`'s label that the `Field` wires itself. A `Field` label you wire by hand with `labelProps.htmlFor`, which is how the horizontal examples above name the Taginput, needs an `id` in its `labelProps` as well. Otherwise the list falls back to `aria-label=\"Suggestions\"`\n- The list holds only the suggestions, each a `role=\"option\"` with an id of its own, and the highlighted one has `aria-selected=\"true\"`\n- In forced colors (Windows' contrast themes), which take away the list's shadow and the highlighted suggestion's fill, the open list is drawn with an edge and the highlighted suggestion with an outline in the system's highlight color\n- The `message` describes the input through `aria-describedby`, after the counter while it shows, so a screen reader reads both when the input takes focus.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the wrapper, so a screen reader hears the input is invalid when it takes focus.",
|
|
61
|
+
"accessibility": "- The `label` prop is automatically associated with the inner text input (`htmlFor` plus a generated `id`, or your own `id` if you pass one). While the label is wired it also names the input; without one, the input falls back to `aria-label=\"Add tag\"`. Inside a labeled `Field`, that `Field`'s label names the input the same way and replaces the fallback.\n- A user-supplied `id` is applied to the inner input (the labellable control), not the wrapper div.\n- When `maxTags` is reached the text input turns read-only rather than going away, so keyboard focus stays where it was and the label keeps naming the input. The suggestion list stays closed.\n- While the counter shows, it describes the input through `aria-describedby`, so a screen reader hears the count, like \"3 / 3\" at the limit.\n- Tags are keyboard navigable\n- Each tag's remove button is named \"Remove\" and the tag's text, the `field` of an object tag. With `ariaCloseLabel`, every button takes that one name, as for a translation, and is described by its tag's text, so it still says which tag it removes. With a `tagTemplate` it has the one name and no description\n- When the last tag's remove button has focus and takes its tag off, as from the keyboard, focus first moves to the remove button before it, or to the input when no tag is left, so it doesn't drop to the page. Any other tag's remove button keeps focus\n- With `data`, the input is a `role=\"combobox\"` with `aria-autocomplete=\"list\"` and `aria-haspopup=\"listbox\"`. Its `aria-expanded` is true only while the suggestion list is on screen, and while it is, `aria-controls` points at the list. While no suggestion matches there's no list, so it stays false. Without `data` there's never a list, so the input stays a plain text field\n- Focus stays in the input, which points `aria-activedescendant` at the highlighted suggestion as the arrow keys or the mouse move it\n- Focus moving from the input to another element closes the suggestion list, as `Tab` to the next field or to a tag's remove button does, so the list doesn't stay open over what has focus. A press on a suggestion keeps focus in the input, so the list stays open for the click, and the list takes no `Tab` stop of its own\n- The list is a `role=\"listbox\"` named through `aria-labelledby` by the label that names the input, when that label has an id: the `label` prop's label always has one, and so does a `Field`'s label that the `Field` wires itself. A `Field` label you wire by hand with `labelProps.htmlFor`, which is how the horizontal examples above name the Taginput, needs an `id` in its `labelProps` as well. Otherwise the list falls back to `aria-label=\"Suggestions\"`\n- The list holds only the suggestions, each a `role=\"option\"` with an id of its own, and the highlighted one has `aria-selected=\"true\"`\n- In forced colors (Windows' contrast themes), which take away the list's shadow and the highlighted suggestion's fill, the open list is drawn with an edge and the highlighted suggestion with an outline in the system's highlight color\n- The `message` describes the input through `aria-describedby`, after the counter while it shows, so a screen reader reads both when the input takes focus.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the wrapper, so a screen reader hears the input is invalid when it takes focus.",
|
|
62
62
|
"related": ["Autocomplete", "Input", "Tag"],
|
|
63
63
|
"storybook": "https://bestax.io/storybook/?path=/story/form-taginput",
|
|
64
64
|
"summary": "The `Taginput` component provides a tag/chip input field for managing multiple tags.",
|
|
@@ -435,7 +435,7 @@
|
|
|
435
435
|
"name": "onRemove",
|
|
436
436
|
"type": "(tag: TaginputTag, index: number) => void",
|
|
437
437
|
"default": null,
|
|
438
|
-
"description": "Callback when tag is removed.",
|
|
438
|
+
"description": "Callback when tag is removed. When it's the last tag and its remove button had focus, focus has already moved to the remove button before it, or to the input, as it fires.",
|
|
439
439
|
"required": false,
|
|
440
440
|
"inherited": false,
|
|
441
441
|
"deprecated": false
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Time\"\n labelProps={{ htmlFor: 'time-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"clock\">\n <TimeInput id=\"time-field-control\" placeholder=\"HH:MM\" />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
|
-
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its wheels inside keep their own names.\n- Each spinner column has `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the column shows it, in the picker's locale's digits when it has a locale. The values drawn above and below are click targets hidden from assistive technology, which reads the value from the spinbutton.\n- In a 12-hour picker, AM/PM is one of those spinbutton columns rather than a toggle button. Its `aria-valuetext` is `AM` or `PM`, or the picker's locale's words for them when it has a locale, and it widens to fit a longer word; `↑`, `PageUp` and `End` move it to PM, and `↓`, `PageDown` and `Home` move it to AM. It stops at either end instead of wrapping around. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- A `readOnly` inline picker puts `aria-readonly=\"true\"` on each spinbutton and keeps them in the tab order.\n- A `disabled` inline picker puts `aria-disabled=\"true\"` on each spinbutton and takes them out of the tab order.\n- Honors `prefers-reduced-motion`.\n- On a right-to-left page the launcher sits at the end of the line and the clock icon at the start. The wheels keep `dir=\"ltr\"`, so hours stay to the left of minutes.\n- A panel at a corner that would run past the left or right edge of the screen keeps its\n corner and moves sideways just far enough to fit, or, wider than the screen, to the edge its\n text starts from. On a narrow screen the panel in place is a sheet across the screen\n instead, which fits as it is.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.",
|
|
181
|
+
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name.\n- An `inline` picker has no input for its `label` to name, so its root is a `role=\"group\"` the `label` names through `aria-labelledby` and its `message` describes. A labeled `Field` around it names it the same way, unless the `Field` is `grouped` or `hasAddons`, or a label is wired by hand with `labelProps.htmlFor`. An `aria-label` or `aria-labelledby` you give it names it instead. With no name it stays a plain `div`, and its wheels inside keep their own names.\n- Each spinner column has `role=\"spinbutton\"` with `aria-valuemin`, `aria-valuemax`, `aria-valuenow`, and `aria-valuetext`, whose text is the number as the column shows it, in the picker's locale's digits when it has a locale. The values drawn above and below are click targets hidden from assistive technology, which reads the value from the spinbutton.\n- In a 12-hour picker, AM/PM is one of those spinbutton columns rather than a toggle button. Its `aria-valuetext` is `AM` or `PM`, or the picker's locale's words for them when it has a locale, and it widens to fit a longer word; `↑`, `PageUp` and `End` move it to PM, and `↓`, `PageDown` and `Home` move it to AM. It stops at either end instead of wrapping around. Its accessible name is `AM/PM` unless `labels.ampm` sets another.\n- A `readOnly` inline picker puts `aria-readonly=\"true\"` on each spinbutton and keeps them in the tab order.\n- A `disabled` inline picker puts `aria-disabled=\"true\"` on each spinbutton and takes them out of the tab order.\n- Honors `prefers-reduced-motion`.\n- On a right-to-left page the launcher sits at the end of the line and the clock icon at the start. The wheels keep `dir=\"ltr\"`, so hours stay to the left of minutes.\n- A panel at a corner that would run past the left or right edge of the screen keeps its\n corner and moves sideways just far enough to fit, or, wider than the screen, to the edge its\n text starts from. On a narrow screen the panel in place is a sheet across the screen\n instead, which fits as it is.\n- The `message` describes the input through `aria-describedby`, so a screen reader reads it when the input takes focus. Ids you pass in `aria-describedby` go on the container with the other attributes, except on a phone's native input, which lists them first. An `inline` picker has no input, so there the message describes the picker's group, when something names it.\n- `aria-invalid` and `aria-errormessage` go on the input, while the other attributes you pass go on the container, so a screen reader hears the input is invalid when it takes focus. An `inline` picker has no input, and they stay on its container.\n- The input takes its name from `label`, from a labeled `Field` that isn't `grouped` or `hasAddons` around a `TimeInputBase` with no `id` of its own, or from a `<label htmlFor>` of your own pointing at the `id` you give it. `aria-label` and `aria-labelledby` go on the container with the other attributes you pass, so they don't name the input, except on the native input `mobileNative` renders, which takes them itself. An `inline` picker has no input to name.",
|
|
182
182
|
"related": ["DateInput", "DateTimeInput", "Input"],
|
|
183
183
|
"storybook": "https://bestax.io/storybook/?path=/story/form-timeinput",
|
|
184
184
|
"summary": "The `TimeInput` component is a form input that opens a popover spinner for time-of-day selection.",
|
|
@@ -726,7 +726,7 @@
|
|
|
726
726
|
}
|
|
727
727
|
],
|
|
728
728
|
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
729
|
-
"helperPropsNote": "Helper props go on the `.timeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`.",
|
|
729
|
+
"helperPropsNote": "Helper props go on the `.timeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`. Among the other attributes, `aria-label`, `aria-labelledby` and `aria-describedby` go on the `<div>` too, so they don't name or describe the `<input>`, except the native one `mobileNative` renders. Name it with `TimeInput`'s `label`; with a labeled `Field` that isn't `grouped` or `hasAddons`, if you give it no `id`; or with an `id` and a `<label htmlFor>` of your own. Describe it with `TimeInput`'s `message`: `TimeInputBase` on its own has no way to describe it. Inline there is no `<input>` to name.",
|
|
730
730
|
"types": []
|
|
731
731
|
},
|
|
732
732
|
{
|
|
@@ -1079,7 +1079,7 @@
|
|
|
1079
1079
|
],
|
|
1080
1080
|
"extraProps": [],
|
|
1081
1081
|
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
1082
|
-
"helperPropsNote": "Helper props go on the `.timeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`.",
|
|
1082
|
+
"helperPropsNote": "Helper props go on the `.timeinput-container` `<div>`, with `className` and the other attributes, except that the background helpers go on the `<input>`, and the text helpers on both, since Bulma's `.input` sets its own background and font, and the popover inside the `<div>` takes the text ones. Inline they all go on the `<div>`, and on the native mobile input, on the `<input>`. Among the other attributes, `aria-label`, `aria-labelledby` and `aria-describedby` go on the `<div>` too, so they don't name or describe the `<input>`, except the native one `mobileNative` renders. Name it with `TimeInput`'s `label`; with a labeled `Field` that isn't `grouped` or `hasAddons`, if you give it no `id`; or with an `id` and a `<label htmlFor>` of your own. Describe it with `TimeInput`'s `message`: `TimeInputBase` on its own has no way to describe it. Inline there is no `<input>` to name.",
|
|
1083
1083
|
"types": [],
|
|
1084
1084
|
"standalone": "base"
|
|
1085
1085
|
}
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
"name": "onClose",
|
|
187
187
|
"type": "() => void",
|
|
188
188
|
"default": null,
|
|
189
|
-
"description": "Callback when toast closes.",
|
|
189
|
+
"description": "Callback when the toast closes itself: on its timer, from its buttons, on Escape when it's cancelable, or, when it's dismissible, on a click on it or outside it. Through `toast.show()`, it runs before the toast leaves the store, and not when the app closes the toast with `toast.close()` or `toast.closeAll()`, so cleanup that has to run however the toast goes, such as committing a delete, goes beside those calls too.",
|
|
190
190
|
"required": false,
|
|
191
191
|
"inherited": false,
|
|
192
192
|
"deprecated": false
|
|
@@ -205,7 +205,12 @@ and wire `htmlFor`/`id`, to your `id` when you pass one
|
|
|
205
205
|
(`<Input label="Email" id="email" horizontal />`); an explicit `labelProps={{ htmlFor }}` wins. `Combobox` renders its `Field` and label too, and wires
|
|
206
206
|
them to its field. Given `data`, its `id`, `aria-label` and `aria-labelledby` go to the field;
|
|
207
207
|
built from parts, put them on `Combobox.Input`, since on the `Combobox` they land on its wrapper
|
|
208
|
-
`div`.
|
|
208
|
+
`div`. `DateInput`, `TimeInput` and `DateTimeInput` (and each `*Base`) put `aria-label`,
|
|
209
|
+
`aria-labelledby` and `aria-describedby` on their wrapper `div`, not the field, except on the native
|
|
210
|
+
input `mobileNative` renders: name the field with `label` (or a labeled `Field` around a `*Base`, or
|
|
211
|
+
an `id` and your own `<label htmlFor>`) and describe it with the wrapper's `message`, since a
|
|
212
|
+
`*Base` on its own can't describe its field. The group inputs (`Checkboxes`,
|
|
213
|
+
`Radios`, `Rate`, `DateRangeInput`) name their
|
|
209
214
|
`role="group"`/`"radiogroup"` wrapper through `aria-labelledby` instead. `Checkboxes` and `Radios`
|
|
210
215
|
also take `as="fieldset"`, which renders their own `Field` as a native `<fieldset>` with the `label`
|
|
211
216
|
as its `<legend>` (the label column when `horizontal`), named by the legend with no ids. Inside a
|
|
@@ -319,7 +324,7 @@ Rules of thumb:
|
|
|
319
324
|
`TimeInput`, `DateTimeInput`, `Autocomplete`, `Taginput`, `TreeSelect`, `Cascader` and a
|
|
320
325
|
`Combobox` with `data` put their other attributes on a wrapper, and `aria-invalid` and
|
|
321
326
|
`aria-errormessage` on the input, as `DateRangeInput` does on both its inputs and
|
|
322
|
-
`ColorPicker.Input` on its field
|
|
327
|
+
`ColorPicker.Input` on its field, which also takes the ones given to its `ColorPicker`.
|
|
323
328
|
- A field that asks for the user's own details takes its `autoComplete` token (`name`,
|
|
324
329
|
`given-name`, `family-name`, `email`, `tel`, `address-line1`, `address-level2`, `postal-code`,
|
|
325
330
|
`country`, `new-password`, …; the full list is HTML's autofill field names), so the browser can
|
|
@@ -109,8 +109,9 @@ Create `src/styles.scss` — base + themes always come first:
|
|
|
109
109
|
@use 'bulma/sass/components/modal'; // Dialog is drawn inside a Modal
|
|
110
110
|
// …and per bestax extras component:
|
|
111
111
|
@use '@allxsmith/bestax-bulma/scss/components/dialog';
|
|
112
|
-
// …and bestax's partial for
|
|
112
|
+
// …and bestax's partial for each stock component that has one:
|
|
113
113
|
@use '@allxsmith/bestax-bulma/scss/elements/button' as bestax-button;
|
|
114
|
+
@use '@allxsmith/bestax-bulma/scss/components/card' as bestax-card;
|
|
114
115
|
// Helper categories only if the app uses those helper props:
|
|
115
116
|
@use 'bulma/sass/helpers/spacing';
|
|
116
117
|
```
|
|
@@ -73,6 +73,9 @@ Stock Bulma examples:
|
|
|
73
73
|
@use 'bulma/sass/layout/section'; // Section
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
+
A stock component that bestax adjusts, such as `Box`, `Button` or `Card`, also wants its bestax
|
|
77
|
+
partial beside Bulma's module; see the notes below.
|
|
78
|
+
|
|
76
79
|
## Authoritative bestax extras inventory
|
|
77
80
|
|
|
78
81
|
Every extras partial that exists, from the library's `src/scss/**/_index.scss`. The Modular
|
|
@@ -82,7 +85,7 @@ guide's Option C shows a short example and links here for the full list:
|
|
|
82
85
|
`loading`, `collapse`, `tooltip`, `popover`, `hovercard`, `contextmenu`, `dropdown`, `steps`, `sidebar`,
|
|
83
86
|
`toast`, `dialog`, `modal`, `carousel`, `lightbox`, `tabs`, `menu`, `tableofcontents`, `reveal`, `avatar`, `avatars`,
|
|
84
87
|
`badge`, `emptystate`, `timeline`, `treeview`, `scrollarea`, `command`, `datatable`,
|
|
85
|
-
`pagination`, `affix`, `floatbutton`, `navbar`, `panel`, `tour`
|
|
88
|
+
`pagination`, `affix`, `floatbutton`, `navbar`, `panel`, `card`, `tour`
|
|
86
89
|
|
|
87
90
|
**Layout** (`@allxsmith/bestax-bulma/scss/layout/<name>`): `appframe`, `splitter`, `stack`
|
|
88
91
|
|
|
@@ -171,7 +174,9 @@ Notes:
|
|
|
171
174
|
|
|
172
175
|
- The `navbar` partial **extends** stock Bulma navbar (it keeps the burger's bars in
|
|
173
176
|
ButtonText and `Navbar.Divider` in CanvasText in forced colors, where Chromium paints the
|
|
174
|
-
bars in the page's Canvas color and Bulma's fill takes the menu's,
|
|
177
|
+
bars in the page's Canvas color and Bulma's fill takes the menu's, draws an open dropdown's
|
|
178
|
+
edge there from the desktop breakpoint up as a CanvasText outline, where Bulma's shadow is
|
|
179
|
+
dropped, marks the active item there
|
|
175
180
|
with a bar in the system's highlight color, where Bulma's colors for it are replaced, keeps a
|
|
176
181
|
`fixed` navbar in place while an overlay locks the page's scrolling, gives an active item's
|
|
177
182
|
text the invert of the link color it sits on, where Bulma's leaves it in the navbar's text
|
|
@@ -352,6 +357,11 @@ Notes:
|
|
|
352
357
|
outline in the system's text color, so include it (`as bestax-box`) next to Bulma's module in
|
|
353
358
|
any build that shows a `Box`. Its rule wins over Bulma's either way, so the order of the `@use`
|
|
354
359
|
lines does not matter.
|
|
360
|
+
- `Card` is stock Bulma (`bulma/sass/components/card`), which draws a card's edge as a shadow
|
|
361
|
+
the same way, so it vanishes in forced colors too. The `card` extras partial draws it back as
|
|
362
|
+
an outline in the system's text color, so include it (`as bestax-card`) next to Bulma's module
|
|
363
|
+
in any build that shows a `Card`. Its rule wins over Bulma's either way, so the order of the
|
|
364
|
+
`@use` lines does not matter.
|
|
355
365
|
- `Divider` renders an `<hr>`, which Bulma draws in its base (`bulma/sass/base`) as a background
|
|
356
366
|
color with no border. Forced colors (Windows' contrast themes) replaces that color with the
|
|
357
367
|
page's own, so the line vanishes there. The `divider` extras partial draws it as a border in the
|
|
@@ -453,7 +463,7 @@ The `npm create bestax` starter renders `Container`, `Section`, `Columns`/`Colum
|
|
|
453
463
|
`Title`/`SubTitle`, `Box`, `Card`, `Buttons`/`Button`, and `Notification` with its close
|
|
454
464
|
button: all stock Bulma, plus the `notification` and `delete` extras partials for that close
|
|
455
465
|
button, the `button` partial for the buttons' focus outline and edge in forced colors, and the
|
|
456
|
-
`box`
|
|
466
|
+
`box` and `card` partials for the boxes' and cards' edges in forced colors. Its helper
|
|
457
467
|
props are `display` (visibility), `flexGrow` (flexbox), and `textAlign` (typography);
|
|
458
468
|
it uses no spacing or color props. That inventory compiles to the following, verified
|
|
459
469
|
pixel-equivalent to the prebuilt `complete` flavor in headless Chromium (light and dark, phone
|
|
@@ -485,6 +495,7 @@ Scaffolded with an icon library, the starter also needs `bulma/sass/elements/ico
|
|
|
485
495
|
@use 'bulma/sass/helpers/flexbox'; // flexGrow
|
|
486
496
|
@use 'bulma/sass/helpers/typography'; // textAlign
|
|
487
497
|
|
|
498
|
+
@use '@allxsmith/bestax-bulma/scss/components/card' as bestax-card; // the edge in forced colors
|
|
488
499
|
@use '@allxsmith/bestax-bulma/scss/elements/box' as bestax-box; // the edge in forced colors
|
|
489
500
|
@use '@allxsmith/bestax-bulma/scss/elements/button' as bestax-button; // focus outline and edge in forced colors
|
|
490
501
|
@use '@allxsmith/bestax-bulma/scss/elements/delete' as bestax-delete; // the close button in forced colors
|
|
@@ -1102,7 +1102,8 @@ button is `disabled` or `aria-disabled`, whatever `--bulma-sidebar-close-color`
|
|
|
1102
1102
|
A mark's label sits inside its tick, so outside forced colors `--bulma-slider-tick-opacity` dims
|
|
1103
1103
|
the label along with the tick's line, whatever `--bulma-slider-tick-label-color` you set. In forced
|
|
1104
1104
|
colors neither `--bulma-slider-tick-opacity` nor `--bulma-slider-disabled-opacity` applies, and the
|
|
1105
|
-
system's colors replace the tick and label colors.
|
|
1105
|
+
system's colors replace the tick and label colors. Where a tick's line crosses the track there, it
|
|
1106
|
+
has a hairline in the page's color as long as `--bulma-slider-track-height`.
|
|
1106
1107
|
|
|
1107
1108
|
`--bulma-slider-disabled-opacity`, `--bulma-slider-fill-color`,
|
|
1108
1109
|
`--bulma-slider-output-background`, `--bulma-slider-output-color`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.75",
|
|
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.32.2",
|
|
44
44
|
"zod": "^4.6.7",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.77.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^26.6.6",
|