bestax-mcp 1.18.76 → 1.18.77
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 +1 -1
- package/data/components/ContextMenu.json +1 -1
- package/data/components/DataTable.json +1 -1
- package/data/components/DateInput.json +12 -3
- package/data/components/DateTimeInput.json +10 -1
- package/data/components/Dropdown.json +1 -1
- package/data/components/Numberinput.json +2 -2
- package/data/components/Pagination.json +1 -1
- package/data/components/Panel.json +3 -3
- package/data/components/Select.json +1 -1
- package/data/components/Slider.json +2 -2
- package/data/components/TimeInput.json +10 -1
- package/data/components/Toast.json +2 -2
- package/data/skills/bestax-form/SKILL.md +2 -1
- package/data/skills/bestax-optimize/references/modular-build.md +11 -9
- package/package.json +2 -2
package/data/catalog.json
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"code": "<ContextMenu\n aria-label=\"Actions for notes.txt\"\n trigger={\n <Box tabIndex={0} p=\"6\" textAlign=\"centered\">\n notes.txt\n </Box>\n }\n>\n <ContextMenu.Item as=\"button\">Open</ContextMenu.Item>\n <ContextMenu.Item as=\"button\">Rename</ContextMenu.Item>\n <ContextMenu.Divider />\n <ContextMenu.Item as=\"button\">Delete</ContextMenu.Item>\n</ContextMenu>"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
|
-
"accessibility": "`ContextMenu` follows the [WAI-ARIA menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/),\nwithout a menubar or submenus:\n\n- **Opening:** APG names \"a command, such as Shift + F10 in Windows, that opens a context specific\n menu\". That's the browser's `contextmenu` event, which <kbd>Shift</kbd>+<kbd>F10</kbd> and the\n context menu key fire on Windows and Linux, and VoiceOver's <kbd>VO</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd>\n fires on macOS. `ContextMenu` adds no key handler of its own, so the menu never opens twice for\n one key.\n- **Focus on open** goes to the first enabled item, or to the menu itself when there's none.\n- <kbd>ArrowDown</kbd> and <kbd>ArrowUp</kbd> move to the next and previous item, wrapping, and\n <kbd>Home</kbd> and <kbd>End</kbd> go to the first and last.\n- **Typing** a letter moves to the next item whose text starts with what's been typed. Letters typed\n in quick succession add up to one search, and the same letter again cycles through the items that\n start with it. Each opening starts a new search.\n- <kbd>Enter</kbd> and <kbd>Space</kbd> activate the focused item the way a click does, so its\n `onClick` runs, and a key held down activates it once.\n- <kbd>Escape</kbd> closes the menu and returns focus to what had it before the menu opened. It\n stops there, so a `Popover` or a `Modal` around the menu stays open.\n- <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> close it and return focus too. The menu sits at\n the end of the page, so letting Tab go on from it would skip the rest of the page.\n- An item that runs closes the menu and returns focus, unless it moved focus somewhere else, such as\n into a `Modal` it opened or a rename field.\n\nRoles and names:\n\n- The menu is `role=\"menu\"`, named by the `aria-label` or `aria-labelledby` you pass. There's no\n button to borrow a name from, and a development build warns when a menu opens without one.\n- Items are `menuitem` by default, and `menuitemcheckbox` or `menuitemradio` with `aria-checked`\n through the item's `role`. A divider is an `<hr>`, which is a separator.\n- An `active` item has `aria-current=\"true\"`, as in `Dropdown`, and an `aria-current` you pass\n wins.\n- Disabled items, a `button` with `disabled` or an item with `aria-disabled=\"true\"`, are skipped by\n the arrow keys and by typing, as in `Dropdown`, and they go on from an item that turns disabled\n while it keeps focus.\n- The trigger gets no ARIA, no role and no tab stop. `aria-haspopup` describes a popup that opens\n when an element is activated, and a right-click on a row isn't that. So nothing tells a screen\n reader user the menu is there, and on macOS only VoiceOver opens it from the keyboard: every action\n in it has to be reachable from a visible control as well, which\n [WCAG 2.1.1](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) asks for.\n\nAnd around it:\n\n- The menu isn't modal. A press outside it closes it and does whatever it does, the rest of the page\n stays reachable, and nothing locks scrolling.\n- Nothing listens on the page while the menu is closed and no finger is held on its trigger, so a\n table with a menu on every row adds no listeners until one is used.\n- The menu doesn't animate.\n- In forced colors (Windows' contrast themes), a divider is drawn
|
|
41
|
+
"accessibility": "`ContextMenu` follows the [WAI-ARIA menu pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menubar/),\nwithout a menubar or submenus:\n\n- **Opening:** APG names \"a command, such as Shift + F10 in Windows, that opens a context specific\n menu\". That's the browser's `contextmenu` event, which <kbd>Shift</kbd>+<kbd>F10</kbd> and the\n context menu key fire on Windows and Linux, and VoiceOver's <kbd>VO</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd>\n fires on macOS. `ContextMenu` adds no key handler of its own, so the menu never opens twice for\n one key.\n- **Focus on open** goes to the first enabled item, or to the menu itself when there's none.\n- <kbd>ArrowDown</kbd> and <kbd>ArrowUp</kbd> move to the next and previous item, wrapping, and\n <kbd>Home</kbd> and <kbd>End</kbd> go to the first and last.\n- **Typing** a letter moves to the next item whose text starts with what's been typed. Letters typed\n in quick succession add up to one search, and the same letter again cycles through the items that\n start with it. Each opening starts a new search.\n- <kbd>Enter</kbd> and <kbd>Space</kbd> activate the focused item the way a click does, so its\n `onClick` runs, and a key held down activates it once.\n- <kbd>Escape</kbd> closes the menu and returns focus to what had it before the menu opened. It\n stops there, so a `Popover` or a `Modal` around the menu stays open.\n- <kbd>Tab</kbd> and <kbd>Shift</kbd>+<kbd>Tab</kbd> close it and return focus too. The menu sits at\n the end of the page, so letting Tab go on from it would skip the rest of the page.\n- An item that runs closes the menu and returns focus, unless it moved focus somewhere else, such as\n into a `Modal` it opened or a rename field.\n\nRoles and names:\n\n- The menu is `role=\"menu\"`, named by the `aria-label` or `aria-labelledby` you pass. There's no\n button to borrow a name from, and a development build warns when a menu opens without one.\n- Items are `menuitem` by default, and `menuitemcheckbox` or `menuitemradio` with `aria-checked`\n through the item's `role`. A divider is an `<hr>`, which is a separator.\n- An `active` item has `aria-current=\"true\"`, as in `Dropdown`, and an `aria-current` you pass\n wins.\n- Disabled items, a `button` with `disabled` or an item with `aria-disabled=\"true\"`, are skipped by\n the arrow keys and by typing, as in `Dropdown`, and they go on from an item that turns disabled\n while it keeps focus.\n- The trigger gets no ARIA, no role and no tab stop. `aria-haspopup` describes a popup that opens\n when an element is activated, and a right-click on a row isn't that. So nothing tells a screen\n reader user the menu is there, and on macOS only VoiceOver opens it from the keyboard: every action\n in it has to be reachable from a visible control as well, which\n [WCAG 2.1.1](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html) asks for.\n\nAnd around it:\n\n- The menu isn't modal. A press outside it closes it and does whatever it does, the rest of the page\n stays reachable, and nothing locks scrolling.\n- Nothing listens on the page while the menu is closed and no finger is held on its trigger, so a\n table with a menu on every row adds no listeners until one is used.\n- The menu doesn't animate.\n- In forced colors (Windows' contrast themes), the menu's box has an edge and a divider is drawn\n in the system's text color, and an `active` item is marked with a bar in the system's highlight\n color, as in `Dropdown`. Those rules ship in `bestax.css` and `extras.css`, from the dropdown\n partial, so a modular build adds `scss/components/dropdown` for them.",
|
|
42
42
|
"related": [
|
|
43
43
|
"ConfigProvider",
|
|
44
44
|
"Dropdown",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"code": "<DataTable\n caption=\"Mitglieder\"\n columns={[{ id: 'name', header: 'Name', sortable: true, isRowHeader: true }]}\n data={[\n { id: 'm1', name: 'Emmy Noether' },\n { id: 'm2', name: 'Lise Meitner' },\n { id: 'm3', name: 'Konrad Zuse' },\n ]}\n selectionMode=\"multiple\"\n hasSearch\n pageSize={2}\n isFullwidth\n labels={{\n selectAll: 'Alle Zeilen dieser Seite auswählen',\n selectRow: label => `${label} auswählen`,\n sortHint: 'Spaltenköpfe mit Schaltflächen sind sortierbar',\n search: 'Suchen',\n results: count => (count === 1 ? '1 Treffer' : `${count} Treffer`),\n pageRange: (first, last, total) => `${first} bis ${last} von ${total}`,\n loading: 'Wird geladen',\n pagination: 'Mitglieder, Seiten',\n empty: 'Noch keine Mitglieder.',\n noResults: 'Keine Treffer.',\n }}\n/>"
|
|
67
67
|
}
|
|
68
68
|
],
|
|
69
|
-
"accessibility": "- **A native table,** as in the ARIA Authoring Practices' Sortable Table example: `th scope=\"col\"`\n headers, `th scope=\"row\"` for the row header, and a `caption` or your `aria-label` or\n `aria-labelledby` as its name. A development build warns when it has none.\n- **Sorting:** a sortable header holds a `<button>` with the header's text, and only the sorted\n header has `aria-sort`, `ascending` or `descending`, which screen readers read out as they reach\n it. That headers with buttons sort is said once, hidden at the end of the caption, or as a hidden\n caption of its own when `aria-label` names the table. The indicator is drawn in CSS, so it's not\n read.\n- **Selection** rides on the checkboxes: each is named \"Select\" and the row's label, and the one in\n the header is mixed (`aria-checked=\"mixed\"`) when some of the page is selected. Rows get Bulma's\n selected look and no `aria-selected`, which ARIA gives the rows of a grid rather than a table.\n- **A status message** in a polite live region says how many rows match a short while after the\n search or a filter changes, the range shown after a page change, and \"Loading\" while `loading` is\n on after one of those. Nothing is said as the page loads, or for a sort, which `aria-sort` covers.\n- **The pager** is a `navigation` named after the table, so two tables on a page have two named\n pagers.\n- **Busy:** `aria-busy` is on the table while `loading`, and the skeleton rows are hidden from\n assistive tech.\n- **Wide tables:** with `isResponsive`, the `ScrollArea` around the table is a tab stop and a\n named region while it overflows, so it can be scrolled from the keyboard.\n- **Forced colors:** the sort indicator is painted in the system's button text color, and the sort\n button's focus ring is an outline. A selected row's fill is a color forced colors takes away, so\n there a double line in the system's highlight color marks the row, as it marks a selected `Table`\n row, and its checked checkbox carries the selection too. The pager's current page is drawn in the\n system's highlight colors, as [Pagination](https://bestax.io/docs/api/components/pagination)'s
|
|
69
|
+
"accessibility": "- **A native table,** as in the ARIA Authoring Practices' Sortable Table example: `th scope=\"col\"`\n headers, `th scope=\"row\"` for the row header, and a `caption` or your `aria-label` or\n `aria-labelledby` as its name. A development build warns when it has none.\n- **Sorting:** a sortable header holds a `<button>` with the header's text, and only the sorted\n header has `aria-sort`, `ascending` or `descending`, which screen readers read out as they reach\n it. That headers with buttons sort is said once, hidden at the end of the caption, or as a hidden\n caption of its own when `aria-label` names the table. The indicator is drawn in CSS, so it's not\n read.\n- **Selection** rides on the checkboxes: each is named \"Select\" and the row's label, and the one in\n the header is mixed (`aria-checked=\"mixed\"`) when some of the page is selected. Rows get Bulma's\n selected look and no `aria-selected`, which ARIA gives the rows of a grid rather than a table.\n- **A status message** in a polite live region says how many rows match a short while after the\n search or a filter changes, the range shown after a page change, and \"Loading\" while `loading` is\n on after one of those. Nothing is said as the page loads, or for a sort, which `aria-sort` covers.\n- **The pager** is a `navigation` named after the table, so two tables on a page have two named\n pagers.\n- **Busy:** `aria-busy` is on the table while `loading`, and the skeleton rows are hidden from\n assistive tech.\n- **Wide tables:** with `isResponsive`, the `ScrollArea` around the table is a tab stop and a\n named region while it overflows, so it can be scrolled from the keyboard.\n- **Forced colors:** the sort indicator is painted in the system's button text color, and the sort\n button's focus ring is an outline. A selected row's fill is a color forced colors takes away, so\n there a double line in the system's highlight color marks the row, as it marks a selected `Table`\n row, and its checked checkbox carries the selection too. The pager's current page is drawn in the\n system's highlight colors, and its Previous or Next at an end in the system's color for a\n disabled control, at full strength, as [Pagination](https://bestax.io/docs/api/components/pagination)'s are.\n- **No motion:** nothing animates but the skeleton, which stops under reduced motion.",
|
|
70
70
|
"related": [
|
|
71
71
|
"Checkbox",
|
|
72
72
|
"EmptyState",
|
|
@@ -159,11 +159,11 @@
|
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"title": "Horizontal Field",
|
|
162
|
-
"code": "<DateInput
|
|
162
|
+
"code": "<DateInput\n label=\"Date of birth\"\n autoComplete=\"bday\"\n horizontal\n placeholder=\"YYYY-MM-DD\"\n/>"
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
"title": "Horizontal Field",
|
|
166
|
-
"code": "<DateInput\n label=\"Date of birth\"\n horizontal\n placeholder=\"YYYY-MM-DD\"\n openOnFocus={false}\n/>"
|
|
166
|
+
"code": "<DateInput\n label=\"Date of birth\"\n autoComplete=\"bday\"\n horizontal\n placeholder=\"YYYY-MM-DD\"\n openOnFocus={false}\n/>"
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
169
|
"title": "Context-Aware Rendering › Default (with label)",
|
|
@@ -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.\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.",
|
|
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.\n- A date of birth takes `autoComplete=\"bday\"`, which goes on the field, so the browser and assistive technology know what it asks for (WCAG 1.3.5). Without a token the text field turns autocomplete off, since the browser's own suggestions would cover the calendar. A date that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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.",
|
|
@@ -688,6 +688,15 @@
|
|
|
688
688
|
"inherited": false,
|
|
689
689
|
"deprecated": false
|
|
690
690
|
},
|
|
691
|
+
{
|
|
692
|
+
"name": "autoComplete",
|
|
693
|
+
"type": "string",
|
|
694
|
+
"default": "off",
|
|
695
|
+
"description": "An autofill token for the field, such as `bday` for a date of birth, so the browser and assistive technology know what it asks for. On the text field it's `off` unless you give one, since the browser's own suggestions would cover the calendar. The native input on touch devices takes yours too, and the browser's default without one, and an `inline` calendar, with no field, takes none. A date that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
696
|
+
"required": false,
|
|
697
|
+
"inherited": false,
|
|
698
|
+
"deprecated": false
|
|
699
|
+
},
|
|
691
700
|
{
|
|
692
701
|
"name": "required",
|
|
693
702
|
"type": "boolean",
|
|
@@ -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- In forced colors (Windows' contrast themes), the time wheels' band is drawn in the system's highlight color, since its fill is replaced there, and the values keep the system's text color.\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.",
|
|
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- In forced colors (Windows' contrast themes), the time wheels' band is drawn in the system's highlight color, since its fill is replaced there, and the values keep the system's text color.\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.\n- An `autoComplete` you give goes on the field. Without one the text field turns autocomplete off, since the browser's own suggestions would cover the panel. A date and time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day or time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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.",
|
|
@@ -761,6 +761,15 @@
|
|
|
761
761
|
"inherited": false,
|
|
762
762
|
"deprecated": false
|
|
763
763
|
},
|
|
764
|
+
{
|
|
765
|
+
"name": "autoComplete",
|
|
766
|
+
"type": "string",
|
|
767
|
+
"default": "off",
|
|
768
|
+
"description": "An autofill token for the field. On the text field it's `off` unless you give one, since the browser's own suggestions would cover the calendar. The native input on touch devices takes yours too, and the browser's default without one, and an `inline` picker, with no field, takes none. A date and time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked day or time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
769
|
+
"required": false,
|
|
770
|
+
"inherited": false,
|
|
771
|
+
"deprecated": false
|
|
772
|
+
},
|
|
764
773
|
{
|
|
765
774
|
"name": "required",
|
|
766
775
|
"type": "boolean",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"code": "<Dropdown label=\"Dropdown Menu\" active>\n <Dropdown.Item>First Item</Dropdown.Item>\n <Dropdown.Item>Second Item</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item>Third Item</Dropdown.Item>\n</Dropdown>"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
|
-
"accessibility": "- The trigger is a `<button>` with `aria-haspopup=\"true\"` and `aria-expanded`, and its\n `aria-controls` points at the menu, with or without an `id` on the Dropdown.\n- The menu is `role=\"menu\"`, and `aria-labelledby` names it after the trigger, so a screen\n reader moving into it hears the trigger's label. That makes the `label` the menu's name too,\n so a trigger that shows only an icon needs text a screen reader can read, as in the\n [split button](https://bestax.io/docs/api/components/dropdown#split-button).\n- Each item is `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or\n `role=\"menuitemradio\"` stays in the arrow-key order.\n- `Dropdown.Item active` sets `aria-current=\"true\"`, so the current item isn't only a color. An\n `aria-current` you pass wins: a menu of pages can say `\"page\"`, and `aria-current={false}`\n turns it off, as on an item that says its state with `aria-checked`.\n- **Forced colors:** Bulma draws `Dropdown.Divider` as a background color, which forced colors\n (Windows' contrast themes) paints in the menu's own color, so bestax's styles draw it in the\n system's text color there. Forced colors also replaces the fill and text color Bulma marks an\n `active` item with, so bestax's styles mark it with a bar in the system's highlight color along\n its start edge, as `Menu` does, and every item keeps the bar's width so no label moves.
|
|
45
|
+
"accessibility": "- The trigger is a `<button>` with `aria-haspopup=\"true\"` and `aria-expanded`, and its\n `aria-controls` points at the menu, with or without an `id` on the Dropdown.\n- The menu is `role=\"menu\"`, and `aria-labelledby` names it after the trigger, so a screen\n reader moving into it hears the trigger's label. That makes the `label` the menu's name too,\n so a trigger that shows only an icon needs text a screen reader can read, as in the\n [split button](https://bestax.io/docs/api/components/dropdown#split-button).\n- Each item is `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or\n `role=\"menuitemradio\"` stays in the arrow-key order.\n- `Dropdown.Item active` sets `aria-current=\"true\"`, so the current item isn't only a color. An\n `aria-current` you pass wins: a menu of pages can say `\"page\"`, and `aria-current={false}`\n turns it off, as on an item that says its state with `aria-checked`.\n- **Forced colors:** Bulma draws `Dropdown.Divider` as a background color, which forced colors\n (Windows' contrast themes) paints in the menu's own color, so bestax's styles draw it in the\n system's text color there. Forced colors also replaces the fill and text color Bulma marks an\n `active` item with, so bestax's styles mark it with a bar in the system's highlight color along\n its start edge, as `Menu` does, and every item keeps the bar's width so no label moves. Forced\n colors also drops the shadow Bulma draws the open menu's box with, so bestax's styles give the\n box an edge in the system's text color. Those rules ship in `bestax.css` and `extras.css`, not\n in Bulma's own stylesheet.\n- A click between items, on a divider say, focuses the menu itself, so the arrow keys still\n reach the items from there.\n- `Dropdown.Item as=\"button\"` defaults to `type=\"button\"`, so a menu item inside a form doesn't\n submit it. Pass `type=\"submit\"` or `type=\"reset\"` and yours is used instead; any other value\n renders `type=\"button\"`.\n- Pressing outside an open menu closes it.\n- On a `hoverable` Dropdown, <kbd>Escape</kbd> puts away a menu the pointer is showing, so it can\n be dismissed without moving the pointer, as\n [WCAG 1.4.13](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html) asks.\n It stays away until the pointer leaves the Dropdown. With focus on the trigger, the key is used\n there (`preventDefault()`), so a `Modal` around the Dropdown waits for the next one. With focus\n elsewhere on the page, the key goes on to what has focus too, as a tooltip's does.\n- A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's\n browse mode can send when you activate the trigger, opens the menu and focuses its first enabled\n item, as <kbd>Enter</kbd> does. A pointer's click on the trigger, and a script's `click()`, open\n it and move no focus into it.\n\nThe keyboard follows the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).\nUnlike the pattern's menu items, each item is also a tab stop, so <kbd>Tab</kbd> from the\ntrigger of a `hoverable` menu the pointer holds open goes through its items.\n\n- On the trigger: <kbd>ArrowDown</kbd> or <kbd>Enter</kbd>/<kbd>Space</kbd> open the menu and\n focus the first item; <kbd>ArrowUp</kbd> opens the menu and focuses the last item;\n <kbd>Escape</kbd> closes an open menu. On the trigger of a menu that's already open,\n <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> focus the first/last item and\n <kbd>Enter</kbd>/<kbd>Space</kbd> close it.\n- Inside the menu: <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> move between items and wrap around;\n <kbd>Home</kbd>/<kbd>End</kbd> jump to the first/last item; <kbd>Escape</kbd> closes the menu\n and returns focus to the trigger.\n- <kbd>Tab</kbd> in an open menu closes it and moves focus to the next tab stop after the\n Dropdown, and <kbd>Shift</kbd>+<kbd>Tab</kbd> closes it and focuses the trigger. Inside a\n focus trap, such as a `Modal`'s, a Dropdown with nothing after it sends Tab to the trap's\n first stop, as Tab from the trap's last stop does.\n- Typing a letter moves to the next item whose text starts with it, and typing it again cycles\n through the items that do. Letters typed in quick succession add up to one search, so\n <kbd>d</kbd> then <kbd>u</kbd> lands on \"Duplicate\" past \"Download\". Text hidden with\n `aria-hidden`, such as an icon's ligature name, doesn't count, and a new search starts each\n time the menu opens. Typing searches once focus is in the menu, where the trigger's keys\n above put it. A letter typed on the trigger itself does nothing.\n- On an item: <kbd>Enter</kbd> or <kbd>Space</kbd> activates it the way a click does, so its\n `onClick` runs and the menu closes unless `closeOnClick` is `false`. That includes the\n default anchor without an `href` and `as=\"div\"`, which the browser would not activate on\n its own. Holding the key down runs it once.\n- When running an item closes the menu, by click or by key, focus goes back to the trigger,\n as it does for <kbd>Escape</kbd>. An item whose `onClick` moves focus somewhere else keeps\n it there.\n- Disabled items (a `Dropdown.Item` rendered with a native `disabled` attribute or\n `aria-disabled=\"true\"`) and dividers are skipped by the arrow keys and by typing. An item that\n turns disabled while it has focus, such as one whose action is loading, keeps its place: the\n arrows and typing go on from where it sits. An `as=\"button\"` item given `disabled` loses focus\n to the page instead, as any disabled button does.\n- For a panel built around fields, [`Popover`](https://bestax.io/docs/api/components/popover) fits better: `role=\"menu\"` owns\n menu items, and the default `closeOnClick` shuts the menu on a click anywhere in it, a field\n included. Anything focusable you put in the menu anyway that isn't an item (a field, a\n button, a checkbox, a link without a menu-item role) keeps its own keys, so its arrows,\n <kbd>Home</kbd>, <kbd>End</kbd> and letters don't move to the items. A field needs\n `closeOnClick={false}`, or a click into it closes the menu. <kbd>Escape</kbd> and\n <kbd>Tab</kbd> still close the menu from any of them, except an <kbd>Escape</kbd> the\n control used itself by calling `preventDefault()` in its `onKeyDown`, such as an Autocomplete\n closing its list or a date picker closing its calendar.\n The next <kbd>Escape</kbd> closes the menu.",
|
|
46
46
|
"related": ["Button", "ContextMenu", "Popover", "useBulmaClasses"],
|
|
47
47
|
"storybook": "https://bestax.io/storybook/?path=/story/components-dropdown--default",
|
|
48
48
|
"summary": "The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI. Down, Enter and Space on the trigger open the menu on its first enabled item, and Up opens it on its last. A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's browse mode can send, opens it on its first enabled item too. A pointer's click on the trigger, and a script's `click()`, move no focus into the menu. On the trigger of a menu that's already open, Down and Up move focus to its first and last item. In the menu, the arrow keys, Home and End move between the items, and Enter and Space run the focused one the way a click does. Typing a letter moves to the next item whose text starts with it, skipping disabled ones, and letters typed in quick succession add up to one search. Typing searches once focus is in the menu, so a letter typed on the trigger does nothing. Escape closes the menu and focuses the trigger. Tab closes it and moves focus to the next tab stop after the Dropdown, wrapping inside a focus trap such as Modal's, and Shift+Tab closes it and focuses the trigger. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab, though an Escape it calls `preventDefault()` on in its own `onKeyDown` stays its own and leaves the menu open. For a panel built around fields, use `Popover`.",
|
|
@@ -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- 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
|
|
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, or a number outside `min` and `max` that's still being typed\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, hold a lone `-` on the way to a negative number, or hold a number outside `min` and `max` on the way to one inside them, such as the `2` of `25` when `min` is 10. `onChange` waits for a number in range. Enter or leaving the field clamps a number outside them and reports it, or puts the last value back when the field holds no number. From a number outside them, a step toward them lands on the nearer one and a step away does nothing, and with no number a step starts from the last value\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, and while the field holds a number typed outside them, the one that would step further out is disabled\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.",
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
"name": "onChange",
|
|
256
256
|
"type": "(value: number) => void",
|
|
257
257
|
"default": null,
|
|
258
|
-
"description": "Called with the new value,
|
|
258
|
+
"description": "Called with the new value, within `min` and `max`. While the field is edited it isn't called for a number typed outside them, such as the `2` of `25` when `min` is 10: Enter or leaving the field clamps that number and calls it, and a step toward `min` and `max` calls it with the nearer one, while a step away from them does nothing. It isn't called either while the field is empty or holds text that isn't a number yet, such as a lone `-`: Enter or leaving the field puts the last value back, and a step starts from the last value.",
|
|
259
259
|
"required": false,
|
|
260
260
|
"inherited": false,
|
|
261
261
|
"deprecated": false
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"code": "<Pagination>\n <Pagination.Previous href=\"#previous\">Previous</Pagination.Previous>\n <Pagination.Next href=\"#next\">Next page</Pagination.Next>\n <Pagination.List>\n <Pagination.Link active href=\"#page-1\">\n 1\n </Pagination.Link>\n <Pagination.Link href=\"#page-2\">2</Pagination.Link>\n <Pagination.Ellipsis />\n <Pagination.Link href=\"#page-10\">10</Pagination.Link>\n </Pagination.List>\n</Pagination>"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
|
-
"accessibility": "- The root `Pagination` renders as a semantic `<nav role=\"navigation\" aria-label=\"pagination\">`.\n- Use `aria-label` on page links for better screen reader support.\n- Disabled and active states are handled with ARIA attributes and classes.\n- Rendered from `total`, each page's link is named for its page (\"Page 3\"; pass `getPageLabel` for your own words), and the current page's link carries `aria-current=\"page\"`. Without `getPageHref` the links have no `href`, so they carry `role=\"button\"` and choose a page with Enter or Space. With it, an end that goes nowhere has no `href` either, so it's a disabled button.\n- **Links and buttons:** `Pagination.Link`, `Pagination.Previous` and `Pagination.Next` render an `<a>`. Given an `href`, it's a link, and the browser follows it. Without one it's a button: it carries `role=\"button\"`, and Enter or Space clicks it, so an `onClick` works from the keyboard too, as in [Controlled Pagination](https://bestax.io/docs/api/components/pagination#controlled-pagination). A disabled one does nothing, a `role` you pass wins, and an `onKeyDown` you pass keeps the keys to itself.\n- **Focus ring:** the previous, next and page links show a focus ring for keyboard focus only, in Bulma's focus color, width, style and offset (`--bulma-focus-h`, `--bulma-focus-s`, `--bulma-focus-l`, `--bulma-focus-width`, `--bulma-focus-style`, `--bulma-focus-offset`). The current page is filled with the link color, which matches the focus color by default, so its ring takes the link's text color instead, inside the fill. It comes from the bestax extras (`extras.css`, or `bestax.css`, which includes them); with Bulma's CSS alone a focused link shows only its hover shade.\n- **Forced colors:** Bulma marks the current page with colors alone, which forced colors (Windows' contrast themes) replaces, so bestax's styles draw it in the system's highlight colors there instead. A link with Bulma's `is-current` or `is-selected` class gets them, so a [DataTable](https://bestax.io/docs/api/components/datatable)'s pager does too.\n\n:::note\nPagination's parts render `<a>` elements: links with an `href`, and buttons without one.\n:::",
|
|
45
|
+
"accessibility": "- The root `Pagination` renders as a semantic `<nav role=\"navigation\" aria-label=\"pagination\">`.\n- Use `aria-label` on page links for better screen reader support.\n- Disabled and active states are handled with ARIA attributes and classes.\n- Rendered from `total`, each page's link is named for its page (\"Page 3\"; pass `getPageLabel` for your own words), and the current page's link carries `aria-current=\"page\"`. Without `getPageHref` the links have no `href`, so they carry `role=\"button\"` and choose a page with Enter or Space. With it, an end that goes nowhere has no `href` either, so it's a disabled button.\n- **Links and buttons:** `Pagination.Link`, `Pagination.Previous` and `Pagination.Next` render an `<a>`. Given an `href`, it's a link, and the browser follows it. Without one it's a button: it carries `role=\"button\"`, and Enter or Space clicks it, so an `onClick` works from the keyboard too, as in [Controlled Pagination](https://bestax.io/docs/api/components/pagination#controlled-pagination). A disabled one does nothing, a `role` you pass wins, and an `onKeyDown` you pass keeps the keys to itself.\n- **Focus ring:** the previous, next and page links show a focus ring for keyboard focus only, in Bulma's focus color, width, style and offset (`--bulma-focus-h`, `--bulma-focus-s`, `--bulma-focus-l`, `--bulma-focus-width`, `--bulma-focus-style`, `--bulma-focus-offset`). The current page is filled with the link color, which matches the focus color by default, so its ring takes the link's text color instead, inside the fill. It comes from the bestax extras (`extras.css`, or `bestax.css`, which includes them); with Bulma's CSS alone a focused link shows only its hover shade.\n- **Forced colors:** Bulma marks the current page with colors alone, which forced colors (Windows' contrast themes) replaces, so bestax's styles draw it in the system's highlight colors there instead. A link with Bulma's `is-current` or `is-selected` class gets them, so a [DataTable](https://bestax.io/docs/api/components/datatable)'s pager does too. A disabled control, such as Previous at the first page or a `Pagination.Link` with `disabled`, is drawn there in the system's color for a disabled control at full strength, since Bulma's half opacity would only fade it, and a disabled current page is filled with that color.\n\n:::note\nPagination's parts render `<a>` elements: links with an `href`, and buttons without one.\n:::",
|
|
46
46
|
"related": ["Button", "useBulmaClasses"],
|
|
47
47
|
"storybook": "https://bestax.io/storybook/?path=/story/components-pagination--basic",
|
|
48
48
|
"summary": "The `Pagination` component provides a flexible, composable Bulma pagination navigation for your Bulma React UI.",
|
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
"name": "className",
|
|
368
368
|
"type": "string",
|
|
369
369
|
"default": null,
|
|
370
|
-
"description": "Additional CSS classes.",
|
|
370
|
+
"description": "Additional CSS classes, added to the block's own `panel-block` class.",
|
|
371
371
|
"required": false,
|
|
372
372
|
"inherited": false,
|
|
373
373
|
"deprecated": false
|
|
@@ -413,7 +413,7 @@
|
|
|
413
413
|
"name": "className",
|
|
414
414
|
"type": "string",
|
|
415
415
|
"default": null,
|
|
416
|
-
"description": "Additional CSS classes.",
|
|
416
|
+
"description": "Additional CSS classes, added to the block's own `panel-block` class.",
|
|
417
417
|
"required": false,
|
|
418
418
|
"inherited": false,
|
|
419
419
|
"deprecated": false
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
"name": "className",
|
|
442
442
|
"type": "string",
|
|
443
443
|
"default": null,
|
|
444
|
-
"description": "Additional CSS classes.",
|
|
444
|
+
"description": "Additional CSS classes, added to the button's own. Like the block's other props, it goes on the `<button>`, not on the `panel-block` around it.",
|
|
445
445
|
"required": false,
|
|
446
446
|
"inherited": false,
|
|
447
447
|
"deprecated": false
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Country\"\n labelProps={{ htmlFor: 'country-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"globe\">\n <Select autoComplete=\"country\" id=\"country-field-control\">\n <option value=\"\">Please select</option>\n <option value=\"us\">United States</option>\n <option value=\"gb\">United Kingdom</option>\n <option value=\"ca\">Canada</option>\n </Select>\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
71
71
|
}
|
|
72
72
|
],
|
|
73
|
-
"accessibility": "- Always provide a label. Select's `label` prop is automatically associated with the `<select>` (`htmlFor` plus a generated `id`, or your own `id` if you pass one).\n- When composing with `Field` instead, the `Field`'s own `label` associates with the select automatically when the select sits directly in that labeled `Field` and has no `id` of its own. A nested unlabeled `Field` (as in horizontal multi-field layouts) starts its own scope. With an `id` of your own, or across a nested `Field`, the label names the select only when you pass that `id` as `labelProps={{ htmlFor }}`.\n- Use the `multiple` and `multipleSize` props for multi-select dropdowns.\n- In forced colors (Windows contrast themes), which drop the shadow Bulma shows focus with, a focused select draws an outline in Bulma's focus style and width, painted in a system color, since a select has no text caret to show focus. `isFocused` draws it too.\n- **Help and errors:** the `message` describes the `<select>` through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the select takes focus. A red `color` says nothing to a screen reader, so on an error also set `aria-invalid`, and put the error in the `message`.",
|
|
73
|
+
"accessibility": "- Always provide a label. Select's `label` prop is automatically associated with the `<select>` (`htmlFor` plus a generated `id`, or your own `id` if you pass one).\n- When composing with `Field` instead, the `Field`'s own `label` associates with the select automatically when the select sits directly in that labeled `Field` and has no `id` of its own. A nested unlabeled `Field` (as in horizontal multi-field layouts) starts its own scope. With an `id` of your own, or across a nested `Field`, the label names the select only when you pass that `id` as `labelProps={{ htmlFor }}`.\n- Use the `multiple` and `multipleSize` props for multi-select dropdowns.\n- In forced colors (Windows contrast themes), which drop the shadow Bulma shows focus with, a focused select draws an outline in Bulma's focus style and width, painted in a system color, since a select has no text caret to show focus. `isFocused` draws it too. A disabled select's arrow is drawn there in the system's color for a disabled control at full strength, as the select beside it is.\n- **Help and errors:** the `message` describes the `<select>` through `aria-describedby`, after any ids you pass there, so a screen reader reads it when the select takes focus. A red `color` says nothing to a screen reader, so on an error also set `aria-invalid`, and put the error in the `message`.",
|
|
74
74
|
"related": ["Control", "Field"],
|
|
75
75
|
"storybook": "https://bestax.io/storybook/?path=/story/form-select--default",
|
|
76
76
|
"summary": "The `Select` component provides a Bulma-styled dropdown for selecting one or more options.",
|
|
@@ -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, 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`
|
|
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 on the nearest step at least `minDistance` from it, or at the slider's end where there isn't that much room.\n- A range Slider with no `defaultValue` starts its high thumb at that highest value too, so its `aria-valuenow`, its value bubble and its fill say where the thumb sits, which is also what a form submits.\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.",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"name": "minDistance",
|
|
121
121
|
"type": "number",
|
|
122
122
|
"default": "0",
|
|
123
|
-
"description": "Minimum distance between thumbs in range mode.",
|
|
123
|
+
"description": "Minimum distance between thumbs in range mode. A thumb moved toward the other stops on the nearest step at least this far from it, so when this isn't a whole number of steps, the thumbs end up a little further apart. Where there isn't that much room, a thumb stops at the slider's end.",
|
|
124
124
|
"required": false,
|
|
125
125
|
"inherited": true,
|
|
126
126
|
"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- In forced colors (Windows' contrast themes), the band behind the picked values is replaced, so bestax's styles draw it in the system's highlight color there, and the focus ring inside it in the color made to read on it. The values keep the system's text color, so each reads on the band and off it as the wheel turns. When the picker is disabled, the band and the values take the system's color for a disabled control, at full opacity, as a value the picker blocks does.\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.",
|
|
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- In forced colors (Windows' contrast themes), the band behind the picked values is replaced, so bestax's styles draw it in the system's highlight color there, and the focus ring inside it in the color made to read on it. The values keep the system's text color, so each reads on the band and off it as the wheel turns. When the picker is disabled, the band and the values take the system's color for a disabled control, at full opacity, as a value the picker blocks does.\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.\n- An `autoComplete` you give goes on the field. Without one the text field turns autocomplete off, since the browser's own suggestions would cover the panel. A time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
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.",
|
|
@@ -697,6 +697,15 @@
|
|
|
697
697
|
"inherited": false,
|
|
698
698
|
"deprecated": false
|
|
699
699
|
},
|
|
700
|
+
{
|
|
701
|
+
"name": "autoComplete",
|
|
702
|
+
"type": "string",
|
|
703
|
+
"default": "off",
|
|
704
|
+
"description": "An autofill token for the field. On the text field it's `off` unless you give one, since the browser's own suggestions would cover the wheels. The native input on touch devices takes yours too, and the browser's default without one, and an `inline` picker, with no field, takes none. A time that autofill writes commits when it reads in the token `format` (the default one when `format` is `Intl` options) or through your `parse`. One it can't read, or that `min`, `max` or a blocked time rules out, isn't committed, as with typing: the field shows it as written, and submits it under a `name`, until focus next leaves the field.",
|
|
705
|
+
"required": false,
|
|
706
|
+
"inherited": false,
|
|
707
|
+
"deprecated": false
|
|
708
|
+
},
|
|
700
709
|
{
|
|
701
710
|
"name": "required",
|
|
702
711
|
"type": "boolean",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"code": "function example() {\n const [showToast, setShowToast] = useState(false);\n return (\n <Block>\n <Button onClick={() => setShowToast(true)}>Show Indefinite Toast</Button>\n {showToast && (\n <Toast\n inline\n message=\"This won't auto-dismiss\"\n indefinite\n onClose={() => setShowToast(false)}\n />\n )}\n </Block>\n );\n}"
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
|
-
"accessibility": "- Uses `role=\"alert\"` for screen reader announcement.\n- Has `aria-live=\"polite\"` for non-intrusive notifications.\n- The closable button is named \"Close\". Pass `ariaCloseLabel` to name it in your app's language.\n- `pauseOnHover` lets users keep the toast visible while reading.\n- A toast doesn't close on its timer while focus is inside it, on its action, cancel or close button, whatever `pauseOnHover` says, so a keyboard user who reaches it can use it. Once focus leaves, it gets its whole `duration` again.\n- `ToastContainer`'s `hotkey`, F8 by default, moves focus to the newest toast's first button, or to the toast itself when it has none, so a keyboard or screen reader user reaches it before it closes. Each stack is a region named \"Notifications\" with the hotkey after it, such as \"Notifications (F8)\".\n- `cancelable` (default `true`) supports Escape-key dismiss. An Escape that closed a popup on the page, such as a Dropdown menu or a date picker's calendar, leaves the toast up.\n- A toast is a notification rather than a layer, so while a [Modal](https://bestax.io/docs/api/components/modal), [Dialog](https://bestax.io/docs/api/components/dialog), [Sidebar](https://bestax.io/docs/api/components/sidebar) or full-page [Loading](https://bestax.io/docs/api/components/loading) is open, Escape goes to that and the toast stays up. Once none is open, Escape dismisses the toast.\n- In forced colors (Windows' contrast themes), which drop the toast's shadow and paint its fill in the page's own color, the toast gets a one pixel edge in the system's text color, and the cancel button's text shows at full strength. A toast given a `tabIndex` shows the browser's focus ring in place of that edge while it has keyboard focus.",
|
|
37
|
+
"accessibility": "- Uses `role=\"alert\"` for screen reader announcement.\n- Has `aria-live=\"polite\"` for non-intrusive notifications.\n- The closable button is named \"Close\". Pass `ariaCloseLabel` to name it in your app's language.\n- `pauseOnHover` lets users keep the toast visible while reading.\n- A toast doesn't close on its timer while focus is inside it, on its action, cancel or close button, whatever `pauseOnHover` says, so a keyboard user who reaches it can use it. Once focus leaves, it gets its whole `duration` again.\n- When a toast shown through `toast` closes with focus inside it, as one does from its own buttons, focus moves to the first button of the next toast in its stack that stays and has one, or else of the one before it, or, with neither, back to where it was before it went into a toast, while that's still on the page, rather than dropping to the page. Focus anywhere else stays where it is. A `Toast` you render yourself leaves that to your `onClose`.\n- `ToastContainer`'s `hotkey`, F8 by default, moves focus to the newest toast's first button, or to the toast itself when it has none, so a keyboard or screen reader user reaches it before it closes. Each stack is a region named \"Notifications\" with the hotkey after it, such as \"Notifications (F8)\".\n- `cancelable` (default `true`) supports Escape-key dismiss. An Escape that closed a popup on the page, such as a Dropdown menu or a date picker's calendar, leaves the toast up.\n- A toast is a notification rather than a layer, so while a [Modal](https://bestax.io/docs/api/components/modal), [Dialog](https://bestax.io/docs/api/components/dialog), [Sidebar](https://bestax.io/docs/api/components/sidebar) or full-page [Loading](https://bestax.io/docs/api/components/loading) is open, Escape goes to that and the toast stays up. Once none is open, Escape dismisses the toast.\n- In forced colors (Windows' contrast themes), which drop the toast's shadow and paint its fill in the page's own color, the toast gets a one pixel edge in the system's text color, and the cancel button's text shows at full strength. A toast given a `tabIndex` shows the browser's focus ring in place of that edge while it has keyboard focus.",
|
|
38
38
|
"related": ["Dialog"],
|
|
39
39
|
"storybook": "https://bestax.io/storybook/?path=/story/components-toast",
|
|
40
40
|
"summary": "The `Toast` component provides brief notification messages with optional action and cancel buttons.",
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
},
|
|
245
245
|
{
|
|
246
246
|
"path": "ToastContainer",
|
|
247
|
-
"summary": "Container component for rendering programmatic toasts. Place once at your app root to enable the toast API. A toast shown with a `position` appears there, and one shown without goes to the container's `position`. The toasts at one position stack in one `.toast-container`, with a gap between them, in the order they were shown, growing away from the edge of the screen. A toast shown with a `container` of its own, and not `inline`, portals there instead, in a box of its own. Each stack is a region named \"Notifications\", with its hotkey after it, \"Notifications (F8)\" by default. The hotkey moves keyboard focus to the newest toast's first button, or to the toast itself when it has none, so someone who can't reach a toast with a pointer gets there before it closes, and the toast stays open while focus is inside it.",
|
|
247
|
+
"summary": "Container component for rendering programmatic toasts. Place once at your app root to enable the toast API. A toast shown with a `position` appears there, and one shown without goes to the container's `position`. The toasts at one position stack in one `.toast-container`, with a gap between them, in the order they were shown, growing away from the edge of the screen. A toast shown with a `container` of its own, and not `inline`, portals there instead, in a box of its own. Each stack is a region named \"Notifications\", with its hotkey after it, \"Notifications (F8)\" by default. The hotkey moves keyboard focus to the newest toast's first button, or to the toast itself when it has none, so someone who can't reach a toast with a pointer gets there before it closes, and the toast stays open while focus is inside it. When a toast closes with focus inside it, focus moves to the first button of the next toast in its stack that stays and has one, or else of the one before it, or, with neither, back to where it was before it went into a toast, while that's still on the page. Focus anywhere else stays where it is.",
|
|
248
248
|
"component": null,
|
|
249
249
|
"props": [
|
|
250
250
|
{
|
|
@@ -333,7 +333,8 @@ Rules of thumb:
|
|
|
333
333
|
`address-line1`, since `street-address` is for a whole address in a `TextArea`. On a sign-in
|
|
334
334
|
form the identifier is `username`, even when it's an email, beside a `PasswordInput`, which
|
|
335
335
|
sets `current-password` itself. A form with two addresses puts `shipping` or `billing` in front
|
|
336
|
-
of each token, as the Fieldset above does.
|
|
336
|
+
of each token, as the Fieldset above does. A date of birth in a `DateInput` takes `bday`, which
|
|
337
|
+
goes on its field.
|
|
337
338
|
- A loading spinner (`isLoading`) is only drawn, so a screen reader hears nothing of it. While a
|
|
338
339
|
field loads, say so in its `message` too (`message="Loading countries…"`), or, on a field with
|
|
339
340
|
no `message` of its own, in text tied to it with `aria-describedby`: either is read when the
|
|
@@ -152,9 +152,10 @@ Notes:
|
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
- The `pagination` partial **extends** stock Bulma pagination (the links' keyboard focus ring,
|
|
155
|
-
which Bulma's own styles turn off,
|
|
156
|
-
colors for it are replaced
|
|
157
|
-
|
|
155
|
+
which Bulma's own styles turn off, the current page marked in forced colors, where Bulma's
|
|
156
|
+
colors for it are replaced, and a disabled control drawn there at full strength in the system's
|
|
157
|
+
disabled color, where Bulma's half opacity would fade it), so an app using `Pagination`, or a
|
|
158
|
+
`DataTable` with pages, whose pager is one, needs both, in either order:
|
|
158
159
|
|
|
159
160
|
```scss
|
|
160
161
|
@use 'bulma/sass/components/pagination';
|
|
@@ -162,10 +163,10 @@ Notes:
|
|
|
162
163
|
```
|
|
163
164
|
|
|
164
165
|
- The `dropdown` partial **extends** stock Bulma dropdown (it draws a divider in CanvasText in
|
|
165
|
-
forced colors, where Bulma's fill takes the menu's own Canvas color,
|
|
166
|
-
|
|
167
|
-
`Dropdown`, or a `ContextMenu`, whose menu is Bulma's dropdown
|
|
168
|
-
order:
|
|
166
|
+
forced colors, where Bulma's fill takes the menu's own Canvas color, marks an active item there
|
|
167
|
+
with a bar in Highlight, as Menu's partial does, and outlines the open menu there in place of
|
|
168
|
+
Bulma's shadow), so an app using `Dropdown`, or a `ContextMenu`, whose menu is Bulma's dropdown
|
|
169
|
+
markup, needs both, in either order:
|
|
169
170
|
|
|
170
171
|
```scss
|
|
171
172
|
@use 'bulma/sass/components/dropdown';
|
|
@@ -213,8 +214,9 @@ Notes:
|
|
|
213
214
|
```
|
|
214
215
|
|
|
215
216
|
- The `select` partial **extends** stock Bulma select (an outline on a focused `Select` in forced
|
|
216
|
-
colors, where Bulma's focus ring is a shadow those themes drop
|
|
217
|
-
`Select` needs both, in either
|
|
217
|
+
colors, where Bulma's focus ring is a shadow those themes drop, and a disabled one's arrow in the
|
|
218
|
+
system's disabled color there, at full strength), so an app using `Select` needs both, in either
|
|
219
|
+
order:
|
|
218
220
|
|
|
219
221
|
```scss
|
|
220
222
|
@use 'bulma/sass/form/select';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.77",
|
|
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.78.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.78.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^26.6.6",
|