bestax-mcp 1.18.89 → 1.18.91
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 +2 -2
- package/data/components/Autocomplete.json +9 -9
- package/data/components/Combobox.json +2 -2
- package/data/components/Command.json +1 -1
- package/data/components/Control.json +4 -4
- package/data/components/DataTable.json +1 -1
- package/data/components/Field.json +13 -15
- package/data/components/IconButton.json +1 -1
- package/data/components/Input.json +6 -6
- package/data/components/Level.json +1 -1
- package/data/components/Media.json +2 -2
- package/data/components/Navbar.json +1 -1
- package/data/components/Pagination.json +8 -6
- package/data/components/Popover.json +2 -2
- package/data/components/Select.json +2 -2
- package/data/components/Switch.json +4 -4
- package/data/components/Taginput.json +10 -10
- package/data/skills/bestax-form/references/api.md +3 -1
- package/data/skills/bestax-optimize/references/modular-build.md +3 -2
- package/data/skills/bestax-theming/references/css-variables.md +3 -2
- package/data/skills/bestax-theming/references/themeable-components.md +3 -1
- package/package.json +2 -2
package/data/catalog.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"generatedFrom": {
|
|
4
4
|
"package": "@allxsmith/bestax-bulma",
|
|
5
|
-
"version": "5.79.
|
|
5
|
+
"version": "5.79.2"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -727,7 +727,7 @@
|
|
|
727
727
|
"import": "import { Field } from '@allxsmith/bestax-bulma';",
|
|
728
728
|
"compound": true,
|
|
729
729
|
"propCount": 41,
|
|
730
|
-
"exampleCount":
|
|
730
|
+
"exampleCount": 22
|
|
731
731
|
},
|
|
732
732
|
{
|
|
733
733
|
"name": "Fieldset",
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Basic Autocomplete",
|
|
10
|
-
"code": "function example() {\n const [selected, setSelected] = useState<string | null>(null);\n const fruits = [\n 'Apple',\n 'Banana',\n 'Cherry',\n 'Date',\n 'Elderberry',\n 'Fig',\n 'Grape',\n ];\n\n return (\n <Block>\n <Autocomplete\n data={fruits}\n placeholder=\"Search fruit...\"\n onSelect={item => setSelected(typeof item === 'string' ? item : null)}\n />\n {selected && <Paragraph mt=\"2\">Selected: {selected}</Paragraph>}\n </Block>\n );\n}"
|
|
10
|
+
"code": "function example() {\n const [selected, setSelected] = useState<string | null>(null);\n const fruits = [\n 'Apple',\n 'Banana',\n 'Cherry',\n 'Date',\n 'Elderberry',\n 'Fig',\n 'Grape',\n ];\n\n return (\n <Block>\n <Autocomplete\n label=\"Fruit\"\n data={fruits}\n placeholder=\"Search fruit...\"\n onSelect={item => setSelected(typeof item === 'string' ? item : null)}\n />\n {selected && <Paragraph mt=\"2\">Selected: {selected}</Paragraph>}\n </Block>\n );\n}"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "Open on Focus",
|
|
14
|
-
"code": "function example() {\n const countries = [\n 'United States',\n 'United Kingdom',\n 'Canada',\n 'Australia',\n 'Germany',\n 'France',\n ];\n\n return (\n <Autocomplete\n data={countries}\n placeholder=\"Select a country...\"\n openOnFocus\n />\n );\n}"
|
|
14
|
+
"code": "function example() {\n const countries = [\n 'United States',\n 'United Kingdom',\n 'Canada',\n 'Australia',\n 'Germany',\n 'France',\n ];\n\n return (\n <Autocomplete\n label=\"Country\"\n data={countries}\n placeholder=\"Select a country...\"\n openOnFocus\n />\n );\n}"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"title": "With Clear Button",
|
|
18
|
-
"code": "function example() {\n const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4'];\n\n return (\n <Autocomplete
|
|
18
|
+
"code": "function example() {\n const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4'];\n\n return (\n <Autocomplete\n data={options}\n label=\"Option\"\n placeholder=\"Search options...\"\n clearable\n />\n );\n}"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "Clear Button in Another Language",
|
|
@@ -23,27 +23,27 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"title": "Color and Size Variants",
|
|
26
|
-
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Primary small\"\n color=\"primary\"\n size=\"small\"\n />\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Info normal\"\n color=\"info\"\n />\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Success medium\"\n color=\"success\"\n size=\"medium\"\n />\n <Autocomplete\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Danger large\"\n color=\"danger\"\n size=\"large\"\n />\n</Block>"
|
|
26
|
+
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Autocomplete\n label=\"Primary Small\"\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Primary small\"\n color=\"primary\"\n size=\"small\"\n />\n <Autocomplete\n label=\"Info Normal\"\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Info normal\"\n color=\"info\"\n />\n <Autocomplete\n label=\"Success Medium\"\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Success medium\"\n color=\"success\"\n size=\"medium\"\n />\n <Autocomplete\n label=\"Danger Large\"\n data={['Apple', 'Banana', 'Cherry']}\n placeholder=\"Danger large\"\n color=\"danger\"\n size=\"large\"\n />\n</Block>"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "With Object Data",
|
|
30
|
-
"code": "function example() {\n const users = [\n { value: '1', label: 'John Doe', email: 'john@example.com' },\n { value: '2', label: 'Jane Smith', email: 'jane@example.com' },\n { value: '3', label: 'Bob Johnson', email: 'bob@example.com' },\n ];\n const [selected, setSelected] = useState<(typeof users)[number] | null>(null);\n\n return (\n <Block>\n <Autocomplete\n data={users}\n field=\"label\"\n placeholder=\"Search users...\"\n openOnFocus\n onSelect={item =>\n setSelected(\n users.find(\n u => u.value === (typeof item === 'string' ? item : item?.value)\n ) ?? null\n )\n }\n />\n {selected && (\n <Paragraph mt=\"2\">\n Selected: {selected.label} ({selected.email})\n </Paragraph>\n )}\n </Block>\n );\n}"
|
|
30
|
+
"code": "function example() {\n const users = [\n { value: '1', label: 'John Doe', email: 'john@example.com' },\n { value: '2', label: 'Jane Smith', email: 'jane@example.com' },\n { value: '3', label: 'Bob Johnson', email: 'bob@example.com' },\n ];\n const [selected, setSelected] = useState<(typeof users)[number] | null>(null);\n\n return (\n <Block>\n <Autocomplete\n label=\"User\"\n data={users}\n field=\"label\"\n placeholder=\"Search users...\"\n openOnFocus\n onSelect={item =>\n setSelected(\n users.find(\n u => u.value === (typeof item === 'string' ? item : item?.value)\n ) ?? null\n )\n }\n />\n {selected && (\n <Paragraph mt=\"2\">\n Selected: {selected.label} ({selected.email})\n </Paragraph>\n )}\n </Block>\n );\n}"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "Custom Item Template",
|
|
34
|
-
"code": "function example() {\n const users = [\n { value: '1', label: 'John Doe', role: 'Admin' },\n { value: '2', label: 'Jane Smith', role: 'Editor' },\n { value: '3', label: 'Bob Johnson', role: 'Viewer' },\n ];\n\n return (\n <Autocomplete\n data={users}\n field=\"label\"\n placeholder=\"Search users...\"\n openOnFocus\n itemTemplate={item => {\n const user = users.find(\n u => u.value === (typeof item === 'string' ? item : item.value)\n );\n return (\n <Block display=\"flex\" justifyContent=\"space-between\">\n <Span>{user?.label}</Span>\n <Tag color=\"info\" isLight>\n {user?.role}\n </Tag>\n </Block>\n );\n }}\n />\n );\n}"
|
|
34
|
+
"code": "function example() {\n const users = [\n { value: '1', label: 'John Doe', role: 'Admin' },\n { value: '2', label: 'Jane Smith', role: 'Editor' },\n { value: '3', label: 'Bob Johnson', role: 'Viewer' },\n ];\n\n return (\n <Autocomplete\n label=\"User\"\n data={users}\n field=\"label\"\n placeholder=\"Search users...\"\n openOnFocus\n itemTemplate={item => {\n const user = users.find(\n u => u.value === (typeof item === 'string' ? item : item.value)\n );\n return (\n <Block display=\"flex\" justifyContent=\"space-between\">\n <Span>{user?.label}</Span>\n <Tag color=\"info\" isLight>\n {user?.role}\n </Tag>\n </Block>\n );\n }}\n />\n );\n}"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "With Empty State",
|
|
38
|
-
"code": "function example() {\n const options = ['Apple', 'Banana', 'Cherry'];\n\n return (\n <Autocomplete\n data={options}\n placeholder=\"Try searching 'xyz'...\"\n empty={\n <Paragraph textColor=\"grey\">\n <Icon name=\"search\" variant=\"solid\" mr=\"2\" aria-hidden=\"true\" />\n No results found\n </Paragraph>\n }\n />\n );\n}"
|
|
38
|
+
"code": "function example() {\n const options = ['Apple', 'Banana', 'Cherry'];\n\n return (\n <Autocomplete\n label=\"Fruit\"\n data={options}\n placeholder=\"Try searching 'xyz'...\"\n empty={\n <Paragraph textColor=\"grey\">\n <Icon name=\"search\" variant=\"solid\" mr=\"2\" aria-hidden=\"true\" />\n No results found\n </Paragraph>\n }\n />\n );\n}"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Loading State",
|
|
42
|
-
"code": "<Autocomplete data={[]} placeholder=\"Loading...\" loading />"
|
|
42
|
+
"code": "<Autocomplete data={[]} label=\"Fruit\" placeholder=\"Loading...\" loading />"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Keep First Highlighted",
|
|
46
|
-
"code": "function example() {\n const fruits = [\n 'Apple',\n 'Apricot',\n 'Avocado',\n 'Banana',\n 'Blackberry',\n 'Blueberry',\n ];\n\n return (\n <Autocomplete
|
|
46
|
+
"code": "function example() {\n const fruits = [\n 'Apple',\n 'Apricot',\n 'Avocado',\n 'Banana',\n 'Blackberry',\n 'Blueberry',\n ];\n\n return (\n <Autocomplete\n data={fruits}\n label=\"Fruit\"\n placeholder=\"Type to filter...\"\n keepFirst\n />\n );\n}"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Context-Aware Rendering › Default (with label)",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"title": "In a Popover",
|
|
54
|
-
"code": "function example() {\n const people = [\n 'Ada Lovelace',\n 'Grace Hopper',\n 'Katherine Johnson',\n 'Margaret Hamilton',\n ];\n const [open, setOpen] = useState(false);\n const [assignee, setAssignee] = useState<string | null>(null);\n const [query, setQuery] = useState('');\n const matches = people.filter(p =>\n p.toLowerCase().includes(query.trim().toLowerCase())\n );\n\n return (\n <Box>\n <Title as=\"h3\" textSize=\"5\">\n Fix the login redirect\n </Title>\n <Popover\n open={open}\n onOpenChange={next => {\n setOpen(next);\n if (!next) setQuery('');\n }}\n ariaLabel=\"Assign to\"\n trigger={\n <Button>{assignee ? `Assignee: ${assignee}` : 'Assign to…'}</Button>\n }\n >\n <Popover.Body>\n <Combobox\n inline\n size=\"small\"\n onSelect={name => {\n setAssignee(name);\n setQuery('');\n setOpen(false);\n }}\n >\n <Combobox.Input\n
|
|
54
|
+
"code": "function example() {\n const people = [\n 'Ada Lovelace',\n 'Grace Hopper',\n 'Katherine Johnson',\n 'Margaret Hamilton',\n ];\n const [open, setOpen] = useState(false);\n const [assignee, setAssignee] = useState<string | null>(null);\n const [query, setQuery] = useState('');\n const matches = people.filter(p =>\n p.toLowerCase().includes(query.trim().toLowerCase())\n );\n\n return (\n <Box>\n <Title as=\"h3\" textSize=\"5\">\n Fix the login redirect\n </Title>\n <Popover\n open={open}\n onOpenChange={next => {\n setOpen(next);\n if (!next) setQuery('');\n }}\n ariaLabel=\"Assign to\"\n trigger={\n <Button>{assignee ? `Assignee: ${assignee}` : 'Assign to…'}</Button>\n }\n >\n <Popover.Body>\n <Combobox\n inline\n size=\"small\"\n label=\"Assignee\"\n onSelect={name => {\n setAssignee(name);\n setQuery('');\n setOpen(false);\n }}\n >\n <Combobox.Input\n placeholder=\"Search people\"\n iconLeftName=\"search\"\n value={query}\n onChange={e => setQuery(e.target.value)}\n />\n {matches.length > 0 ? (\n <Combobox.List>\n {matches.map(p => (\n <Combobox.Item key={p} value={p} checked={p === assignee}>\n {p}\n </Combobox.Item>\n ))}\n </Combobox.List>\n ) : (\n <Combobox.Empty>Nobody matches</Combobox.Empty>\n )}\n </Combobox>\n </Popover.Body>\n </Popover>\n <Paragraph mt=\"4\">\n People land on the home page after they sign in, instead of the page\n they started from. Send them back to where they were, query string and\n all.\n </Paragraph>\n <Tags mt=\"4\">\n <Tag>bug</Tag>\n <Tag>login</Tag>\n </Tags>\n <Buttons>\n <Button size=\"small\">Comment</Button>\n <Button size=\"small\">Close issue</Button>\n </Buttons>\n </Box>\n );\n}"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"title": "A Result Count",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"code": "function example() {\n const drinks: Record<\n string,\n { value: string; label: string; disabled?: boolean }[]\n > = {\n Hot: [\n { value: 'coffee', label: 'Coffee' },\n { value: 'tea', label: 'Tea' },\n ],\n Cold: [\n { value: 'lemonade', label: 'Lemonade' },\n { value: 'iced-tea', label: 'Iced tea' },\n { value: 'smoothie', label: 'Smoothie (sold out)', disabled: true },\n ],\n };\n const [query, setQuery] = useState('');\n const [value, setValue] = useState('tea');\n const picked = Object.values(drinks)\n .flat()\n .find(i => i.value === value);\n const term = query.trim().toLowerCase();\n const groups = Object.entries(drinks)\n .map(([label, items]) => ({\n label,\n items: items.filter(i => i.label.toLowerCase().includes(term)),\n }))\n .filter(g => g.items.length > 0);\n\n return (\n <form onSubmit={e => e.preventDefault()}>\n <Combobox\n label=\"Drink\"\n message={`Your drink: ${picked?.label}`}\n onSelect={next => {\n setValue(next);\n setQuery('');\n }}\n >\n <Combobox.Input\n iconLeftName=\"mug-hot\"\n placeholder=\"Type to filter\"\n value={query}\n onChange={e => setQuery(e.target.value)}\n />\n <Combobox.Menu>\n {groups.length > 0 ? (\n <Combobox.List>\n {groups.map(g => (\n <Combobox.Group key={g.label} label={g.label}>\n {g.items.map(i => (\n <Combobox.Item\n key={i.value}\n value={i.value}\n checked={i.value === value}\n disabled={i.disabled}\n >\n {i.label}\n </Combobox.Item>\n ))}\n </Combobox.Group>\n ))}\n </Combobox.List>\n ) : (\n <Combobox.Empty>No drinks match</Combobox.Empty>\n )}\n </Combobox.Menu>\n </Combobox>\n <Select label=\"Size\">\n <option>Small</option>\n <option>Medium</option>\n <option>Large</option>\n </Select>\n <Input label=\"Name for the cup\" />\n <Button type=\"submit\" color=\"primary\">\n Order\n </Button>\n </form>\n );\n}"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
"accessibility": "- **The roles:** the field is `role=\"combobox\"` with `aria-autocomplete=\"list\"` and\n `aria-haspopup=\"listbox\"`. The list is a `listbox` of `option`s, and a group is a `group` named by\n its heading. This is the ARIA 1.2 combobox the ARIA Authoring Practices describe.\n- **Focus stays in the field:** the highlighted item is the field's `aria-activedescendant`.\n When a key or the list
|
|
65
|
+
"accessibility": "- **The roles:** the field is `role=\"combobox\"` with `aria-autocomplete=\"list\"` and\n `aria-haspopup=\"listbox\"`. The list is a `listbox` of `option`s, and a group is a `group` named by\n its heading. This is the ARIA 1.2 combobox the ARIA Authoring Practices describe.\n- **Focus stays in the field:** the highlighted item is the field's `aria-activedescendant`.\n When a key, the list opening or, with `keepFirst`, a change to the list moves the highlight, the item is\n scrolled into view, since a browser only scrolls to what has focus, and so is its group's\n heading when it's the group's first item. The pointer moves it without scrolling, since the\n pointer is already on that item. A click on an item keeps focus in the field too.\n- **`aria-expanded`** is `true` while a list with an item in it is on screen, and\n `aria-controls` points at the list then. While the menu shows just the empty message, the\n field says it's collapsed, and so does the server markup for a list rendered with\n `appendToBody`, which shows only once the page has hydrated.\n- **The list's name** comes from the label that names the field: the Combobox's `label`, or an\n outer `Field`'s. An `aria-label` or `aria-labelledby` you put on `Combobox.List` wins, and\n with none of these the list is named \"Suggestions\". Given `data`, an `aria-label` or\n `aria-labelledby` on the Combobox names the field and the list, so it needs no `label`.\n- **`aria-selected`, with one value,** is on the highlighted item and nothing else, the way the\n Authoring Practices' combobox examples do it. The value shows as a check mark, which doesn't rely\n on color, and the list opens with the highlight on it. Several libraries put `aria-selected` on\n the chosen item instead.\n- **With `multiple`,** the list is `aria-multiselectable`, and each item's `aria-selected` is its\n `checked`.\n- **Disabled items** are `aria-disabled` and stay reachable with the arrows, the Authoring\n Practices' advice for listbox options, so a screen reader user finds them. They're never picked\n or `aria-selected`, and the opening highlight and `keepFirst` pass over them.\n- **The empty message** sits beside the list, not in it, so it isn't counted as an item. When\n your typing brings it on screen, its text is announced through a polite status region that's in\n the page from the start, once each time the matches run out. Opening the list with it already\n there, or emptying the field, announces nothing. While `isLoading` is on, or a loading `Control`\n is around the Combobox, the announcement waits and is made once loading ends. In a menu,\n keep it to text: Tab closes the list before a keyboard user can reach a link or a button in it.\n An `inline` list stays on screen, so a link or a button beside it is in the Tab order.\n- **Tags,** with `multiple` and `data`: the field's `aria-describedby` points at the tags' labels,\n since its own text is the search, so focusing it reads the picks. Each tag's button is named\n \"Remove\" and the item's label, or `ariaCloseLabel` with the label as its description, and\n taking a tag off puts focus back in the field, which then reads the picks that are left. The\n button is a small [`Delete`](https://bestax.io/docs/api/elements/delete#accessibility), with a target at least 24px square around its circle.\n- **No counts are announced,** for the reasons in [A Result Count](https://bestax.io/docs/api/form/combobox#a-result-count).\n- **Enter and Escape:** Enter submits the form when nothing is highlighted, and Escape only stops\n at the Combobox when it closed a panel that was on screen.\n- **Forced colors:** in Windows high contrast mode the highlight is drawn as an outline in the\n system's highlight color, a disabled item takes the system's color for disabled text, and the\n check mark and the panel's edge stay visible.\n- A menu 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 field through `aria-describedby`, after any ids you pass to `Combobox.Input` and, with `data` and `multiple`, after the picked tags.\n- With `data`, `aria-invalid` and `aria-errormessage` go on the field, while the Combobox's other attributes go on the wrapper, so a screen reader hears the field is invalid when it takes focus. Built from parts, pass them to `Combobox.Input`.",
|
|
66
66
|
"related": [
|
|
67
67
|
"Autocomplete",
|
|
68
68
|
"Cascader",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"code": "function example() {\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState('');\n const [ran, setRan] = useState<string | null>(null);\n const colors = [\n 'primary',\n 'link',\n 'info',\n 'success',\n 'warning',\n 'danger',\n ] as const;\n const matches = colors.filter(c => c.includes(query.trim().toLowerCase()));\n\n return (\n <>\n <Button onClick={() => setOpen(true)}>Pick a color</Button>\n <Paragraph mt=\"3\">{ran ? `Picked ${ran}` : 'No color yet'}</Paragraph>\n <Command.Dialog\n open={open}\n onOpenChange={setOpen}\n label=\"Colors\"\n query={query}\n onQueryChange={setQuery}\n onSelect={setRan}\n >\n <Command.Input placeholder=\"Search colors\" />\n {matches.length > 0 ? (\n <Command.List>\n <Command.Group label=\"Bulma colors\">\n {matches.map(color => (\n <Command.Item\n key={color}\n value={color}\n hint={<Tag color={color}>is-{color}</Tag>}\n >\n {color}\n </Command.Item>\n ))}\n </Command.Group>\n </Command.List>\n ) : (\n <Command.Empty>No colors match</Command.Empty>\n )}\n </Command.Dialog>\n </>\n );\n}"
|
|
51
51
|
}
|
|
52
52
|
],
|
|
53
|
-
"accessibility": "- **The roles:** the field is `role=\"combobox\"` with `aria-autocomplete=\"list\"` and\n `aria-haspopup=\"listbox\"`, and the list is a `listbox` of `option`s, the ARIA 1.2 combobox the\n ARIA Authoring Practices describe. A group is a `group` named by its heading.\n- **Focus stays in the field:** the highlighted item is the field's `aria-activedescendant`, and\n the only item that's `aria-selected`. When a key moves it, it's scrolled into view
|
|
53
|
+
"accessibility": "- **The roles:** the field is `role=\"combobox\"` with `aria-autocomplete=\"list\"` and\n `aria-haspopup=\"listbox\"`, and the list is a `listbox` of `option`s, the ARIA 1.2 combobox the\n ARIA Authoring Practices describe. A group is a `group` named by its heading.\n- **Focus stays in the field:** the highlighted item is the field's `aria-activedescendant`, and\n the only item that's `aria-selected`. When a key moves it, or it moves as the list opens or\n changes, it's scrolled into view, with its group's heading when it's the group's first item.\n A click on an item keeps focus in the field too.\n- **`aria-expanded`** is `true` while the list has an item in it, with `aria-controls` pointing\n at it, and `false` while only the empty message shows.\n- **Names:** `label` names the field and the list, and in `Command.Dialog` the dialog as well.\n It's \"Commands\" unless you give one. An `aria-label` or `aria-labelledby` on `Command.Input`,\n `Command.List` or `Command.Dialog` names that one instead.\n- **An item is named by its label alone,** and described by its description and hint, so a\n screen reader says what it does first and the rest after. Its icon is hidden.\n- **Disabled items** are `aria-disabled`, reachable with the arrows, never run, and never\n highlighted when the list changes.\n- **The empty message** is announced through a polite status region when your typing brings it on\n screen, once each time the matches run out, and after `isLoading` ends. An empty search\n announces nothing.\n- **No count is announced,** as with [`Combobox`](https://bestax.io/docs/api/form/combobox#a-result-count): a screen\n reader reads how many items there are from the list itself, and a count read out on each\n keystroke talks over the typing.\n- **The dialog** is a modal `dialog` with `aria-modal`, around the Command's box, inside a\n `Modal` that's `role=\"presentation\"`. Focus moves to the search field when it opens, stays\n inside while it's open, and goes back to where it was when it closes. The page behind it\n doesn't scroll. A popup opened inside it, such as a `Popover` with `appendToBody`, is portaled\n into the Command's box, the element with `aria-modal`, unless a\n [`ConfigProvider`](https://bestax.io/docs/api/helpers/config#where-portaled-content-goes) sets a `portalContainer`.\n- **The shortcut** never fires while someone is typing, so it can't swallow a letter, and it\n leaves a key the page has already used alone. Nothing announces it, so put it on a button with\n `aria-keyshortcuts`, and show it with `Kbd`.\n- **Forced colors:** in Windows high contrast mode the highlight is drawn as an outline in the\n system's highlight color, and a disabled item takes the system's color for disabled text.\n- **No motion:** nothing animates.",
|
|
54
54
|
"related": [
|
|
55
55
|
"Combobox",
|
|
56
56
|
"Dropdown",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "With Icons (Left and Right)",
|
|
22
|
-
"code": "<Field>\n <Control\n hasIconsLeft\n hasIconsRight\n iconLeft={{ name: 'user' }}\n iconRight={{ name: 'check' }}\n >\n <Input placeholder=\"With icons\" />\n </Control>\n</Field>"
|
|
22
|
+
"code": "<Field label=\"With Icons\">\n <Control\n hasIconsLeft\n hasIconsRight\n iconLeft={{ name: 'user' }}\n iconRight={{ name: 'check' }}\n >\n <Input placeholder=\"With icons\" />\n </Control>\n</Field>"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"title": "With Only Left Icon (Shortcut Props)",
|
|
26
|
-
"code": "<Field>\n <Control hasIconsLeft iconLeftName=\"user\" iconLeftSize=\"small\">\n <Input size=\"small\" placeholder=\"With left icon shortcut\" />\n </Control>\n</Field>"
|
|
26
|
+
"code": "<Field label=\"Left Icon\">\n <Control hasIconsLeft iconLeftName=\"user\" iconLeftSize=\"small\">\n <Input size=\"small\" placeholder=\"With left icon shortcut\" />\n </Control>\n</Field>"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "With Only Right Icon (Shortcut Props)",
|
|
30
|
-
"code": "<Field>\n <Control hasIconsRight iconRightName=\"check\" iconRightSize=\"small\">\n <Input size=\"small\" placeholder=\"With right icon shortcut\" />\n </Control>\n</Field>"
|
|
30
|
+
"code": "<Field label=\"Right Icon\">\n <Control hasIconsRight iconRightName=\"check\" iconRightSize=\"small\">\n <Input size=\"small\" placeholder=\"With right icon shortcut\" />\n </Control>\n</Field>"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "With Icons and Size Variations",
|
|
34
|
-
"code": "<Field>\n <Control\n hasIconsLeft\n hasIconsRight\n size=\"medium\"\n iconLeft={{ name: 'user', size: 'medium' }}\n iconRight={{ name: 'check', size: 'medium' }}\n >\n <Input size=\"medium\" placeholder=\"Icons left/right medium\" />\n </Control>\n</Field>"
|
|
34
|
+
"code": "<Field label=\"Icons Medium\">\n <Control\n hasIconsLeft\n hasIconsRight\n size=\"medium\"\n iconLeft={{ name: 'user', size: 'medium' }}\n iconRight={{ name: 'check', size: 'medium' }}\n >\n <Input size=\"medium\" placeholder=\"Icons left/right medium\" />\n </Control>\n</Field>"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Loading State",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "Searching and Filtering",
|
|
30
|
-
"code": "function example() {\n const books = [\n { id: 'b1', title: 'Le Petit Prince', author: 'Saint-Exupéry', year: 1943 },\n { id: 'b2', title: 'Les Misérables', author: 'Hugo', year: 1862 },\n { id: 'b3', title: 'L’Étranger', author: 'Camus', year: 1942 },\n { id: 'b4', title: 'Madame Bovary', author: 'Flaubert', year: 1857 },\n { id: 'b5', title: 'La Peste', author: 'Camus', year: 1947 },\n ];\n\n return (\n <LocaleProvider locale=\"fr\">\n <DataTable\n caption=\"Livres\"\n columns={[\n { id: 'title', header: 'Titre', sortable: true, isRowHeader: true },\n { id: 'author', header: 'Auteur', sortable: true },\n {\n id: 'year',\n header: 'Année',\n align: 'right',\n filterFn: (row, value) => row.year < Number(value),\n },\n ]}\n data={books}\n hasSearch\n isFullwidth\n labels={{ search: 'Rechercher' }}\n toolbar={table => (\n <Select\n
|
|
30
|
+
"code": "function example() {\n const books = [\n { id: 'b1', title: 'Le Petit Prince', author: 'Saint-Exupéry', year: 1943 },\n { id: 'b2', title: 'Les Misérables', author: 'Hugo', year: 1862 },\n { id: 'b3', title: 'L’Étranger', author: 'Camus', year: 1942 },\n { id: 'b4', title: 'Madame Bovary', author: 'Flaubert', year: 1857 },\n { id: 'b5', title: 'La Peste', author: 'Camus', year: 1947 },\n ];\n\n return (\n <LocaleProvider locale=\"fr\">\n <DataTable\n caption=\"Livres\"\n columns={[\n { id: 'title', header: 'Titre', sortable: true, isRowHeader: true },\n { id: 'author', header: 'Auteur', sortable: true },\n {\n id: 'year',\n header: 'Année',\n align: 'right',\n filterFn: (row, value) => row.year < Number(value),\n },\n ]}\n data={books}\n hasSearch\n isFullwidth\n labels={{ search: 'Rechercher' }}\n toolbar={table => (\n <Select\n label=\"Parution\"\n value={String(table.state.filters.year ?? '')}\n onChange={event => table.setFilter('year', event.target.value)}\n >\n <option value=\"\">Toutes les années</option>\n <option value=\"1900\">Avant 1900</option>\n </Select>\n )}\n />\n </LocaleProvider>\n );\n}"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "Filtering by Several Values",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "With Input (Icons)",
|
|
50
|
-
"code": "<Field>\n <Control\n hasIconsLeft\n hasIconsRight\n iconLeft={{ name: 'user' }}\n iconRight={{ name: 'check' }}\n >\n <Input placeholder=\"With icons\" />\n </Control>\n</Field>"
|
|
50
|
+
"code": "<Field label=\"With Icons\">\n <Control\n hasIconsLeft\n hasIconsRight\n iconLeft={{ name: 'user' }}\n iconRight={{ name: 'check' }}\n >\n <Input placeholder=\"With icons\" />\n </Control>\n</Field>"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"title": "With Radio",
|
|
@@ -79,26 +79,22 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"title": "Grouped Controls",
|
|
82
|
-
"code": "<Field grouped>\n <Control>\n <Input placeholder=\"First\" />\n </Control>\n <Control>\n <Input placeholder=\"Second\" />\n </Control>\n</Field>"
|
|
82
|
+
"code": "<Field grouped>\n <Control>\n <label className=\"label\" htmlFor=\"grouped-first\">\n First\n </label>\n <Input id=\"grouped-first\" placeholder=\"First input\" />\n </Control>\n <Control>\n <label className=\"label\" htmlFor=\"grouped-second\">\n Second\n </label>\n <Input id=\"grouped-second\" placeholder=\"Second input\" />\n </Control>\n</Field>"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"title": "Addons (Input and Button)",
|
|
86
|
-
"code": "<Field
|
|
86
|
+
"code": "<Field label=\"Email\" labelProps={{ htmlFor: 'addons-email' }}>\n <Field hasAddons>\n <Control isExpanded>\n <Input\n autoComplete=\"email\"\n id=\"addons-email\"\n type=\"email\"\n placeholder=\"you@example.com\"\n />\n </Control>\n <Control>\n <Button color=\"primary\">Notify me</Button>\n </Control>\n </Field>\n</Field>"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"title": "Addons (Centered and Right)",
|
|
90
|
-
"code": "<>\n <Field
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"title": "Addons (With a Label)",
|
|
94
|
-
"code": "<Field label=\"Email\" labelProps={{ htmlFor: 'addons-email' }}>\n <Field hasAddons>\n <Control isExpanded>\n <Input\n autoComplete=\"email\"\n id=\"addons-email\"\n type=\"email\"\n placeholder=\"you@example.com\"\n />\n </Control>\n <Control>\n <Button color=\"primary\">Notify me</Button>\n </Control>\n </Field>\n</Field>"
|
|
90
|
+
"code": "<>\n <Field\n label=\"Search the docs\"\n labelProps={{ htmlFor: 'addons-search' }}\n textAlign=\"centered\"\n >\n <Field hasAddons=\"centered\">\n <Control>\n <Input id=\"addons-search\" placeholder=\"Search the docs\" />\n </Control>\n <Control>\n <Button color=\"info\">Search</Button>\n </Control>\n </Field>\n </Field>\n\n <Field\n label=\"Coupon code\"\n labelProps={{ htmlFor: 'addons-coupon' }}\n textAlign=\"right\"\n >\n <Field hasAddons=\"right\">\n <Control>\n <Input id=\"addons-coupon\" placeholder=\"Coupon code\" />\n </Control>\n <Control>\n <Button>Apply</Button>\n </Control>\n </Field>\n </Field>\n</>"
|
|
95
91
|
},
|
|
96
92
|
{
|
|
97
93
|
"title": "Compound (dot-notation) usage",
|
|
98
94
|
"code": "<Field horizontal>\n <Field.Label size=\"normal\">\n <label className=\"label\" htmlFor=\"compound-name\">\n Name\n </label>\n </Field.Label>\n <Field.Body>\n <Field.Control>\n <Input autoComplete=\"name\" id=\"compound-name\" placeholder=\"Jane Doe\" />\n </Field.Control>\n </Field.Body>\n</Field>"
|
|
99
95
|
}
|
|
100
96
|
],
|
|
101
|
-
"accessibility": "- For a single control, prefer the control's own `label` prop, with `horizontal` for a side-by-side row. It renders this `Field` and its label and wires the `for` itself, to your `id` when you pass one: `<Input label=\"Email\" id=\"email\" horizontal />`.\n- The `label` prop names the one control the Field holds. A composed `InputBase`, `SelectBase`, `TextAreaBase`, `DateInputBase`, `TimeInputBase`, or `DateTimeInputBase`, or a bestax input that renders a single input of its own (`Input`, `Select`, `TextArea`, `Numberinput`, `PinInput`, `Slider`, `DateInput`, `TimeInput`, `DateTimeInput`, `Autocomplete`, `Combobox`, `Taginput`, `File`), adopts a generated id the label's `for` points at, so clicking the label focuses the control and assistive technology announces it. An `inline` picker renders no input, so it takes nothing.\n- A control with an `id` of its own keeps it and never takes the generated one, so `<Field label=\"Email\"><Input id=\"email\" /></Field>` renders a label that names nothing. Leave the `id` off, or pass the same value as `labelProps={{ htmlFor: 'email' }}`. Pass `labelProps={{ htmlFor: undefined }}` to opt out of the association entirely.\n- A range `Slider` takes that id on its low thumb, and its thumbs also point `aria-labelledby` at the label (at `labelProps.id` when you set one), so under a label of \"Price range\" they announce as \"Price range Minimum value\" and \"Price range Maximum value\". An `ariaLabel` entry names its thumb instead, and an `aria-label` or `aria-labelledby` on the Slider takes the label's place in both names. A label you wire by hand with `labelProps={{ htmlFor }}` gets no generated id, so it reaches the thumbs' names only when you give it an `id` there too, as in `labelProps={{ htmlFor: 'price', id: 'price-label' }}`.\n- An `Autocomplete`, a `Combobox` or a `Taginput` points its open list's `aria-labelledby` at the label the same way, so under a label of \"Country\" the list announces as \"Country\" rather than its fallback name, \"Suggestions\". A label you wire by hand needs an `id` in `labelProps` for this too, as in `labelProps={{ htmlFor: 'country', id: 'country-label' }}`.\n- A group (`Radios`, `Checkboxes`, `Rate`, `DateRangeInput`, or a composed `DateRangeInputBase`, `inline` or not) can't take a `for`, so the label gets an id (yours from `labelProps.id`, otherwise a generated one) and the group points `aria-labelledby` at it. An `aria-label` or `aria-labelledby` you set on the group wins over the Field's label, as it does over a group's own `label`.\n- Association is skipped for `grouped`/`hasAddons` fields (they hold several controls), and a `Field` nested inside a labeled one starts its own scope. A horizontal Field wraps its children in a `Field.Body` of its own and keeps the association, but the pattern with an inner `Field` in that body needs it wired by hand. A label you wire by hand names the control its `for` points at in a `grouped` or `hasAddons` field too, and with an `id` in `labelProps` it names a range `Slider`'s thumbs and an `Autocomplete`'s, a `Combobox`'s or a `Taginput`'s list there as well. No group points at it on its own.\n- An input in a `hasAddons` row still needs a name of its own
|
|
97
|
+
"accessibility": "- For a single control, prefer the control's own `label` prop, with `horizontal` for a side-by-side row. It renders this `Field` and its label and wires the `for` itself, to your `id` when you pass one: `<Input label=\"Email\" id=\"email\" horizontal />`.\n- The `label` prop names the one control the Field holds. A composed `InputBase`, `SelectBase`, `TextAreaBase`, `DateInputBase`, `TimeInputBase`, or `DateTimeInputBase`, or a bestax input that renders a single input of its own (`Input`, `Select`, `TextArea`, `Numberinput`, `PinInput`, `Slider`, `DateInput`, `TimeInput`, `DateTimeInput`, `Autocomplete`, `Combobox`, `Taginput`, `File`), adopts a generated id the label's `for` points at, so clicking the label focuses the control and assistive technology announces it. An `inline` picker renders no input, so it takes nothing.\n- A control with an `id` of its own keeps it and never takes the generated one, so `<Field label=\"Email\"><Input id=\"email\" /></Field>` renders a label that names nothing. Leave the `id` off, or pass the same value as `labelProps={{ htmlFor: 'email' }}`. Pass `labelProps={{ htmlFor: undefined }}` to opt out of the association entirely.\n- A range `Slider` takes that id on its low thumb, and its thumbs also point `aria-labelledby` at the label (at `labelProps.id` when you set one), so under a label of \"Price range\" they announce as \"Price range Minimum value\" and \"Price range Maximum value\". An `ariaLabel` entry names its thumb instead, and an `aria-label` or `aria-labelledby` on the Slider takes the label's place in both names. A label you wire by hand with `labelProps={{ htmlFor }}` gets no generated id, so it reaches the thumbs' names only when you give it an `id` there too, as in `labelProps={{ htmlFor: 'price', id: 'price-label' }}`.\n- An `Autocomplete`, a `Combobox` or a `Taginput` points its open list's `aria-labelledby` at the label the same way, so under a label of \"Country\" the list announces as \"Country\" rather than its fallback name, \"Suggestions\". A label you wire by hand needs an `id` in `labelProps` for this too, as in `labelProps={{ htmlFor: 'country', id: 'country-label' }}`.\n- A group (`Radios`, `Checkboxes`, `Rate`, `DateRangeInput`, or a composed `DateRangeInputBase`, `inline` or not) can't take a `for`, so the label gets an id (yours from `labelProps.id`, otherwise a generated one) and the group points `aria-labelledby` at it. An `aria-label` or `aria-labelledby` you set on the group wins over the Field's label, as it does over a group's own `label`.\n- Association is skipped for `grouped`/`hasAddons` fields (they hold several controls), and a `Field` nested inside a labeled one starts its own scope. A horizontal Field wraps its children in a `Field.Body` of its own and keeps the association, but the pattern with an inner `Field` in that body needs it wired by hand. A label you wire by hand names the control its `for` points at in a `grouped` or `hasAddons` field too, and with an `id` in `labelProps` it names a range `Slider`'s thumbs and an `Autocomplete`'s, a `Combobox`'s or a `Taginput`'s list there as well. No group points at it on its own.\n- An input in a `hasAddons` row still needs a name of its own, and a placeholder disappears once the reader starts typing, so it doesn't stand in for one. Put a visible label on an outer `Field` and wire it by hand, as in [Addons (Input and Button)](https://bestax.io/docs/api/form/field#addons-input-and-button). An `aria-label` names the input for assistive technology only, with nothing on screen.\n- Two controls in one plain labeled Field would both adopt its id. Give each an `id` of its own and label it individually.\n- Once a labeled Field's content has mounted, its label keeps the generated `for` only while one of the inputs above holds the id, and drops it over anything else: a group, a `Checkbox`, `Radio` or `Switch`, an `inline` picker, an inner `Field`, an input with an `id` of its own, markup of your own, or nothing at all. A server render, and the first render while hydrating, still write the `for`, so hydration matches, and an input that mounts later puts it back. A `for` you set with `labelProps={{ htmlFor }}` always stays. `Checkbox`, `Radio` and `Switch` take nothing from the label on their own: each is named by its own children, so put the text there, and the label names one only when you wire it as you would any control with an `id` of its own, `labelProps={{ htmlFor }}` plus that control's `id`. Where you point content at the label by hand, as with a group in an inner `Field`, `labelProps={{ id }}` is enough in the browser, and `labelProps={{ id, htmlFor: undefined }}` keeps the `for` out of server-rendered HTML too.\n- Grouped/horizontal layouts use Bulma’s grid for layout.\n- On a right-to-left page a horizontal label sits to the right of its control, and its text sits against the control, at the label's left edge. Bulma's own stylesheet aligns it right, so this needs `bestax.css` or `extras.css` too.",
|
|
102
98
|
"related": [
|
|
103
99
|
"Checkbox",
|
|
104
100
|
"Checkboxes",
|
|
@@ -255,7 +251,7 @@
|
|
|
255
251
|
"name": "textColor",
|
|
256
252
|
"type": "Bulma color | 'inherit' | 'current'",
|
|
257
253
|
"default": null,
|
|
258
|
-
"description": "Text color for the label.",
|
|
254
|
+
"description": "Text color for the label. It renders nothing while a `color` prop is present, even an undefined one.",
|
|
259
255
|
"required": false,
|
|
260
256
|
"inherited": false,
|
|
261
257
|
"deprecated": false,
|
|
@@ -265,10 +261,11 @@
|
|
|
265
261
|
"name": "color",
|
|
266
262
|
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
267
263
|
"default": null,
|
|
268
|
-
"description": "Bulma color
|
|
264
|
+
"description": "Renders the text color helper (`has-text-<color>`), not a modifier: Bulma ships no field label color CSS. It takes the place of `textColor`, which renders nothing while this prop is present, even as `undefined`. Passing it logs a console warning in development.",
|
|
269
265
|
"required": false,
|
|
270
266
|
"inherited": false,
|
|
271
|
-
"deprecated":
|
|
267
|
+
"deprecated": true,
|
|
268
|
+
"deprecationNote": "Use `textColor` instead. This prop will be removed in the next major version."
|
|
272
269
|
},
|
|
273
270
|
{
|
|
274
271
|
"name": "bgColor",
|
|
@@ -312,7 +309,7 @@
|
|
|
312
309
|
"name": "textColor",
|
|
313
310
|
"type": "Bulma color | 'inherit' | 'current'",
|
|
314
311
|
"default": null,
|
|
315
|
-
"description": "Text color for the field body.",
|
|
312
|
+
"description": "Text color for the field body. It renders nothing while a `color` prop is present, even an undefined one.",
|
|
316
313
|
"required": false,
|
|
317
314
|
"inherited": false,
|
|
318
315
|
"deprecated": false,
|
|
@@ -322,10 +319,11 @@
|
|
|
322
319
|
"name": "color",
|
|
323
320
|
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
324
321
|
"default": null,
|
|
325
|
-
"description": "
|
|
322
|
+
"description": "Renders the text color helper (`has-text-<color>`), not a modifier: Bulma ships no field body color CSS. It takes the place of `textColor`, which renders nothing while this prop is present, even as `undefined`. Passing it logs a console warning in development.",
|
|
326
323
|
"required": false,
|
|
327
324
|
"inherited": false,
|
|
328
|
-
"deprecated":
|
|
325
|
+
"deprecated": true,
|
|
326
|
+
"deprecationNote": "Use `textColor` instead. This prop will be removed in the next major version."
|
|
329
327
|
},
|
|
330
328
|
{
|
|
331
329
|
"name": "bgColor",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Beside an Input",
|
|
42
|
-
"code": "function example() {\n const [query, setQuery] = useState('');\n const [searched, setSearched] = useState('');\n\n return (\n <form\n onSubmit={event => {\n event.preventDefault();\n setSearched(query);\n }}\n >\n <Field
|
|
42
|
+
"code": "function example() {\n const [query, setQuery] = useState('');\n const [searched, setSearched] = useState('');\n\n return (\n <form\n onSubmit={event => {\n event.preventDefault();\n setSearched(query);\n }}\n >\n <Field label=\"Search the docs\" labelProps={{ htmlFor: 'docs-search' }}>\n <Field hasAddons>\n <Control isExpanded>\n <Input\n id=\"docs-search\"\n type=\"search\"\n value={query}\n onChange={event => setQuery(event.target.value)}\n />\n </Control>\n <Control>\n <IconButton\n icon=\"xmark\"\n aria-label=\"Clear\"\n onClick={() => setQuery('')}\n />\n </Control>\n <Control>\n <IconButton\n type=\"submit\"\n color=\"primary\"\n icon=\"magnifying-glass\"\n aria-label=\"Search\"\n />\n </Control>\n </Field>\n </Field>\n <Paragraph>\n {searched ? `Searched for ${searched}.` : 'No search yet.'}\n </Paragraph>\n </form>\n );\n}"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Loading",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "With Icons (Left and Right)",
|
|
42
|
-
"code": "<>\n <Input
|
|
42
|
+
"code": "<>\n <Input\n label=\"Username\"\n iconLeftName=\"user\"\n iconRightName=\"check\"\n placeholder=\"With icons\"\n />\n <Input\n label=\"Email\"\n iconLeftName=\"envelope\"\n iconRightName=\"exclamation-triangle\"\n placeholder=\"Another input\"\n />\n</>"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "With Icons and Size Variations",
|
|
46
|
-
"code": "<>\n <Input\n size=\"small\"\n iconLeftName=\"user\"\n iconLeftSize=\"small\"\n iconRightName=\"check\"\n iconRightSize=\"small\"\n placeholder=\"Icons left/right small\"\n />\n <Input\n iconLeftName=\"user\"\n iconRightName=\"check\"\n placeholder=\"Icons left/right normal\"\n />\n <Input\n size=\"medium\"\n iconLeftName=\"user\"\n iconLeftSize=\"medium\"\n iconRightName=\"check\"\n iconRightSize=\"medium\"\n placeholder=\"Icons left/right medium\"\n />\n <Input\n size=\"large\"\n iconLeftName=\"user\"\n iconLeftSize=\"large\"\n iconRightName=\"check\"\n iconRightSize=\"large\"\n placeholder=\"Icons left/right large\"\n />\n</>"
|
|
46
|
+
"code": "<>\n <Input\n label=\"Small\"\n size=\"small\"\n iconLeftName=\"user\"\n iconLeftSize=\"small\"\n iconRightName=\"check\"\n iconRightSize=\"small\"\n placeholder=\"Icons left/right small\"\n />\n <Input\n label=\"Normal\"\n iconLeftName=\"user\"\n iconRightName=\"check\"\n placeholder=\"Icons left/right normal\"\n />\n <Input\n label=\"Medium\"\n size=\"medium\"\n iconLeftName=\"user\"\n iconLeftSize=\"medium\"\n iconRightName=\"check\"\n iconRightSize=\"medium\"\n placeholder=\"Icons left/right medium\"\n />\n <Input\n label=\"Large\"\n size=\"large\"\n iconLeftName=\"user\"\n iconLeftSize=\"large\"\n iconRightName=\"check\"\n iconRightSize=\"large\"\n placeholder=\"Icons left/right large\"\n />\n</>"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Help Text Colors",
|
|
@@ -55,15 +55,15 @@
|
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"title": "Form Addons › Input + Button",
|
|
58
|
-
"code": "<Field
|
|
58
|
+
"code": "<Field label=\"Repository\" labelProps={{ htmlFor: 'addons-repository' }}>\n <Field hasAddons>\n <Control isExpanded>\n <Input id=\"addons-repository\" placeholder=\"Find a repository\" />\n </Control>\n <Control>\n <Button color=\"info\">Search</Button>\n </Control>\n </Field>\n</Field>"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"title": "Form Addons › Input + Static Suffix",
|
|
62
|
-
"code": "<Field
|
|
62
|
+
"code": "<Field label=\"Email\" labelProps={{ htmlFor: 'addons-email-username' }}>\n <Field hasAddons>\n <Control isExpanded>\n <Input id=\"addons-email-username\" placeholder=\"Your email\" />\n </Control>\n <Control>\n <Button as=\"span\" isStatic>\n @gmail.com\n </Button>\n </Control>\n </Field>\n</Field>"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"title": "Form Addons › Select + Input + Button",
|
|
66
|
-
"code": "<Field
|
|
66
|
+
"code": "<Field label=\"Phone number\" labelProps={{ htmlFor: 'addons-phone' }}>\n <Field hasAddons>\n <Control>\n <Select autoComplete=\"tel-country-code\" aria-label=\"Country code\">\n <option>+1</option>\n <option>+44</option>\n <option>+33</option>\n </Select>\n </Control>\n <Control isExpanded>\n <Input\n autoComplete=\"tel-national\"\n id=\"addons-phone\"\n type=\"tel\"\n placeholder=\"Your phone number\"\n />\n </Control>\n <Control>\n <Button color=\"primary\">Call</Button>\n </Control>\n </Field>\n</Field>"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"title": "Form Addons › Centered Addons",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"title": "Form Group › Expanded Input + Button",
|
|
102
|
-
"code": "<Field grouped>\n <Control isExpanded>\n
|
|
102
|
+
"code": "<Field label=\"Repository\" labelProps={{ htmlFor: 'grouped-repository' }}>\n <Field grouped>\n <Control isExpanded>\n <Input id=\"grouped-repository\" placeholder=\"Find a repository\" />\n </Control>\n <Control>\n <Button color=\"info\">Search</Button>\n </Control>\n </Field>\n</Field>"
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"title": "Form Group › Multiline Group",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Default Level",
|
|
10
|
-
"code": "<Level>\n <Level.Left>\n <Level.Item>\n <SubTitle as=\"p\" size=\"5\">\n <Strong>Favorite Posts</Strong>\n </SubTitle>\n </Level.Item>\n <Level.Item>\n <Field
|
|
10
|
+
"code": "<Level>\n <Level.Left>\n <Level.Item>\n <SubTitle as=\"p\" size=\"5\">\n <Strong>Favorite Posts</Strong>\n </SubTitle>\n </Level.Item>\n <Level.Item>\n <Field label=\"Search posts\" labelProps={{ htmlFor: 'level-find-post' }}>\n <Field hasAddons>\n <Control>\n <Input id=\"level-find-post\" type=\"text\" placeholder=\"Find a post\" />\n </Control>\n <Control>\n <Button>Search</Button>\n </Control>\n </Field>\n </Field>\n </Level.Item>\n </Level.Left>\n <Level.Right>\n <Level.Item as=\"p\">\n <Strong>All</Strong>\n </Level.Item>\n <Level.Item as=\"p\">\n <Link href=\"#published\">Published</Link>\n </Level.Item>\n <Level.Item as=\"p\">\n <Link href=\"#drafts\">Drafts</Link>\n </Level.Item>\n <Level.Item as=\"p\">\n <Link href=\"#deleted\">Deleted</Link>\n </Level.Item>\n <Level.Item as=\"p\">\n <Button color=\"success\" as=\"a\" href=\"#new-post\">\n New\n </Button>\n </Level.Item>\n </Level.Right>\n</Level>"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "Centered Level (Statistics)",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"title": "Media With Inputs",
|
|
15
|
-
"code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field>\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Level as=\"div\">\n <Level.Left>\n <Level.Item>\n <Button color=\"info\">Submit</Button>\n </Level.Item>\n </Level.Left>\n <Level.Right>\n <Level.Item>\n <Checkbox>Press enter to submit</Checkbox>\n </Level.Item>\n </Level.Right>\n </Level>\n </Media.Content>\n</Media>",
|
|
15
|
+
"code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field label=\"Comment\">\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Level as=\"div\">\n <Level.Left>\n <Level.Item>\n <Button color=\"info\">Submit</Button>\n </Level.Item>\n </Level.Left>\n <Level.Right>\n <Level.Item>\n <Checkbox>Press enter to submit</Checkbox>\n </Level.Item>\n </Level.Right>\n </Level>\n </Media.Content>\n</Media>",
|
|
16
16
|
"note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
|
|
17
17
|
},
|
|
18
18
|
{
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"title": "Media With Button Below",
|
|
25
|
-
"code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field>\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Field>\n <Control as=\"p\">\n <Button>Post comment</Button>\n </Control>\n </Field>\n </Media.Content>\n</Media>",
|
|
25
|
+
"code": "<Media>\n <Media.Left>\n <Image\n as=\"p\"\n size=\"64x64\"\n src=\"/img/carousel/carousel-banner-1-1by1.jpg\"\n alt=\"\"\n />\n </Media.Left>\n <Media.Content>\n <Field label=\"Comment\">\n <Control as=\"p\">\n <TextArea placeholder=\"Add a comment...\" />\n </Control>\n </Field>\n <Field>\n <Control as=\"p\">\n <Button>Post comment</Button>\n </Control>\n </Field>\n </Media.Content>\n</Media>",
|
|
26
26
|
"note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
|
|
27
27
|
},
|
|
28
28
|
{
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"note": "A path under /img/ here stands for a picture your own app serves, such as a file in its public/img/ folder."
|
|
90
90
|
}
|
|
91
91
|
],
|
|
92
|
-
"accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n The default accessible name is `main navigation`. A screen reader announces it with\n the role, and since the name holds the role word, \"navigation\" is heard twice.\n Pass a name without the role word (`aria-label=\"Site\"`), and a different name\n on each Navbar when a page has more than one. A passed `aria-label` replaces\n the default.\n- `Navbar.Item active` sets `aria-current=\"page\"` on the element `as` renders, the link by\n default, so the current item isn't only a color. An `aria-current` you pass wins: a navbar of\n sections on one page can say `\"location\"`, and `aria-current={false}` turns it off.\n- Bulma fills an active link item with its selected color, the link color in a navbar with no\n `color`, and bestax's styles give its text the color Bulma picks to read on that fill,\n `--bulma-navbar-item-selected-color-l`. Bulma's own stylesheet leaves the text in the navbar's\n normal text color, dark gray on blue on the light scheme, so the rule ships in `bestax.css` and\n `extras.css`. A `--bulma-navbar-item-color` you set on the item itself still wins, and an item\n with a `bgColor` keeps the navbar's text color. A rule of your own that takes the fill off\n restates `color` too.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. <kbd>Escape</kbd> anywhere else in the open dropdown, its\n menu included, puts focus back on the link and closes it too, unless a control there marks the\n key used, the key comes from a dialog or from content opened from the menu into a portal, or\n focus can't go back to the link. Focus landing outside an open dropdown, as <kbd>Tab</kbd> past\n its last item or <kbd>Shift</kbd>+<kbd>Tab</kbd> back past its link does, closes it too, so its\n menu isn't left over the page. A controlled one is told through `onActiveChange` and keeps its\n `active`. Focus moving into content opened from the menu into a portal or into a dialog marked\n `aria-modal`, such as a `Modal` an item opens, which gives focus back to the item when it closes, focus going\n nowhere, as the window losing focus does, and a press outside that doesn't move focus leave it\n open. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover. Bulma shows a `hoverable` dropdown's menu while\n the pointer is on it and while focus is in it, the link included, on a desktop-wide window.\n <kbd>Escape</kbd> puts a menu shown that way away, and it stays away until the pointer has left\n the dropdown and focus has too, or until the pointer comes back or focus moves onto something in\n it. From the page, the key goes on to what has focus; from inside\n the dropdown, focus moves to the link, with the same exceptions as for an open one, such as focus\n that can't go back to the link, where the menu stays. Below the desktop breakpoint, where the menu always\n shows under the burger, Escape doesn't put it away, though it still closes an open one.\n- **A fixed navbar:** with `fixed=\"top\"`, bestax's styles pad the page's scroll by\n `--bulma-navbar-height`, so the browser scrolls a control that takes focus, or an in-page link's\n target, to below the navbar rather than under it. `fixed=\"bottom\"` pads the bottom of the page\n the same way. The page's own padding, so its top
|
|
92
|
+
"accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n The default accessible name is `main navigation`. A screen reader announces it with\n the role, and since the name holds the role word, \"navigation\" is heard twice.\n Pass a name without the role word (`aria-label=\"Site\"`), and a different name\n on each Navbar when a page has more than one. A passed `aria-label` replaces\n the default.\n- `Navbar.Item active` sets `aria-current=\"page\"` on the element `as` renders, the link by\n default, so the current item isn't only a color. An `aria-current` you pass wins: a navbar of\n sections on one page can say `\"location\"`, and `aria-current={false}` turns it off.\n- Bulma fills an active link item with its selected color, the link color in a navbar with no\n `color`, and bestax's styles give its text the color Bulma picks to read on that fill,\n `--bulma-navbar-item-selected-color-l`. Bulma's own stylesheet leaves the text in the navbar's\n normal text color, dark gray on blue on the light scheme, so the rule ships in `bestax.css` and\n `extras.css`. A `--bulma-navbar-item-color` you set on the item itself still wins, and an item\n with a `bgColor` keeps the navbar's text color. A rule of your own that takes the fill off\n restates `color` too.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. <kbd>Escape</kbd> anywhere else in the open dropdown, its\n menu included, puts focus back on the link and closes it too, unless a control there marks the\n key used, the key comes from a dialog or from content opened from the menu into a portal, or\n focus can't go back to the link. Focus landing outside an open dropdown, as <kbd>Tab</kbd> past\n its last item or <kbd>Shift</kbd>+<kbd>Tab</kbd> back past its link does, closes it too, so its\n menu isn't left over the page. A controlled one is told through `onActiveChange` and keeps its\n `active`. Focus moving into content opened from the menu into a portal or into a dialog marked\n `aria-modal`, such as a `Modal` an item opens, which gives focus back to the item when it closes, focus going\n nowhere, as the window losing focus does, and a press outside that doesn't move focus leave it\n open. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover. Bulma shows a `hoverable` dropdown's menu while\n the pointer is on it and while focus is in it, the link included, on a desktop-wide window.\n <kbd>Escape</kbd> puts a menu shown that way away, and it stays away until the pointer has left\n the dropdown and focus has too, or until the pointer comes back or focus moves onto something in\n it. From the page, the key goes on to what has focus; from inside\n the dropdown, focus moves to the link, with the same exceptions as for an open one, such as focus\n that can't go back to the link, where the menu stays. Below the desktop breakpoint, where the menu always\n shows under the burger, Escape doesn't put it away, though it still closes an open one.\n- **A fixed navbar:** with `fixed=\"top\"`, bestax's styles pad the page's scroll by\n `--bulma-navbar-height`, so the browser scrolls a control that takes focus, or an in-page link's\n target, to below the navbar rather than under it. `fixed=\"bottom\"` pads the bottom of the page\n the same way, and a navbar fixed by Bulma's `is-fixed-top-touch` or `-desktop` classes (or the\n bottom pair) in its `className` gets the same at that breakpoint, as it gets the margins that\n keep it over the page while an overlay locks its scrolling. The page's own padding, so its top\n doesn't start under the navbar, is still Bulma's `has-navbar-fixed-top` on `<html>`, or\n `has-navbar-fixed-top-touch` or `-desktop` for a navbar fixed at one breakpoint. A\n `scroll-padding-top` of your own on `<html>`, or an [`AppFrame`](https://bestax.io/docs/api/layout/appframe)'s, wins\n over it: set yours for a navbar taller than `--bulma-navbar-height`, as a spaced one is from the\n desktop breakpoint up, or to `0` where your anchor targets already carry a `scroll-margin-top`,\n which adds to it. This ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet.\n- **Forced colors:** Bulma draws the burger's bars as a background color, which forced colors\n (Windows' contrast themes) replaces, so the burger would vanish there while it still works and\n takes focus. bestax's styles keep its bars visible in the system's button text color. That rule\n ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet, and an\n [`AppFrame`](https://bestax.io/docs/api/layout/appframe)'s burger gets it too. Bulma marks an active or selected\n link item, `Navbar.Link` and dropdown row with a fill and a text color alone, which forced\n colors replaces, so bestax's styles draw a bar in the system's highlight color inside it there:\n along its bottom in a row, and down its start edge where the items stack, in a dropdown and in\n the menu the burger opens. The item and everything in it stay in the contrast theme's colors,\n and an active tab gets the bar above Bulma's thicker underline. This ships in the same\n stylesheets.\n- **`Navbar.Divider` in forced colors:** Bulma draws it as a background color too, which forced\n colors paints in the dropdown's own color, so the line would vanish. bestax's styles draw it in\n the system's text color there, from the same stylesheets.\n- **An open dropdown's edge in forced colors:** from the desktop breakpoint up, Bulma draws\n `Navbar.DropdownMenu` as a box over the page, edged with a shadow and, for some, a line on the\n side it opens from. Forced colors drops the shadow and paints the box in the page's own color, so\n bestax's styles draw a one pixel line in the system's text color around it there, outside the\n box, so nothing moves. Under the burger its rows sit in the menu, with no box to edge. This\n ships in the same stylesheets.\n- **In a colored [`Hero`](https://bestax.io/docs/api/layout/hero):** Bulma's hero sets the colors its navbar's items\n take on hover and when active, but Bulma's navbar doesn't read them, so a focused or hovered\n item took the scheme's fill under the hero's text, and the active item and the burger took the\n link color. For a `Navbar` with no `color` of its own, bestax's styles draw a focused, hovered or\n active item in the hero's text color with the hero's background color as its text, the burger\n and a tab in the hero's text color, and the dropdown arrow in its link's text color. The menu the\n burger opens, and the dropdown's rows in it, take the hero's background and text, except an\n active row, which keeps Bulma's selected fill and the text that reads on it, and on a phone a bold hero's menu takes the hero's\n own gradient. Where `Navbar.DropdownMenu` is a box of its own, on a desktop, its links keep\n Bulma's colors. That rule ships in `bestax.css` and `extras.css`, not in Bulma's own stylesheet.\n\n:::note\nThere's no arrow-key roving between navbar items, and a press outside an open `Navbar.Dropdown`\ncloses it only when it moves focus there. A press on a field moves focus in every browser, and\none on a button or a link does in some, such as Chrome, and not in others, such as Safari. Bulma navbar dropdowns are hover/click surfaces, so this is\nintentionally kept simple.\n:::",
|
|
93
93
|
"related": ["Button", "Icon", "useBulmaClasses"],
|
|
94
94
|
"storybook": "https://bestax.io/storybook/?path=/story/components-navbar--default",
|
|
95
95
|
"summary": "The `Navbar` component implements Bulma's powerful, responsive navigation bar for your Bulma React UI.",
|
|
@@ -243,16 +243,17 @@
|
|
|
243
243
|
"name": "color",
|
|
244
244
|
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
245
245
|
"default": null,
|
|
246
|
-
"description": "Bulma color
|
|
246
|
+
"description": "Renders the text color helper (`has-text-<color>`), not a modifier: Bulma ships no pagination link color CSS. It takes the place of `textColor`, which renders nothing while this prop is present, even as `undefined`. Passing it logs a console warning in development.",
|
|
247
247
|
"required": false,
|
|
248
248
|
"inherited": false,
|
|
249
|
-
"deprecated":
|
|
249
|
+
"deprecated": true,
|
|
250
|
+
"deprecationNote": "Use `textColor` instead. This prop will be removed in the next major version."
|
|
250
251
|
},
|
|
251
252
|
{
|
|
252
253
|
"name": "textColor",
|
|
253
254
|
"type": "Bulma color | 'inherit' | 'current'",
|
|
254
255
|
"default": null,
|
|
255
|
-
"description": "Text color.",
|
|
256
|
+
"description": "Text color. It renders nothing while a `color` prop is present, even an undefined one.",
|
|
256
257
|
"required": false,
|
|
257
258
|
"inherited": false,
|
|
258
259
|
"deprecated": false,
|
|
@@ -328,7 +329,7 @@
|
|
|
328
329
|
"name": "textColor",
|
|
329
330
|
"type": "Bulma color | 'inherit' | 'current'",
|
|
330
331
|
"default": null,
|
|
331
|
-
"description": "Text color for the list.",
|
|
332
|
+
"description": "Text color for the list. It renders nothing while a `color` prop is present, even an undefined one.",
|
|
332
333
|
"required": false,
|
|
333
334
|
"inherited": false,
|
|
334
335
|
"deprecated": false,
|
|
@@ -338,10 +339,11 @@
|
|
|
338
339
|
"name": "color",
|
|
339
340
|
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
340
341
|
"default": null,
|
|
341
|
-
"description": "
|
|
342
|
+
"description": "Renders the text color helper (`has-text-<color>`), not a modifier: Bulma ships no pagination list color CSS. It takes the place of `textColor`, which renders nothing while this prop is present, even as `undefined`. Passing it logs a console warning in development.",
|
|
342
343
|
"required": false,
|
|
343
344
|
"inherited": false,
|
|
344
|
-
"deprecated":
|
|
345
|
+
"deprecated": true,
|
|
346
|
+
"deprecationNote": "Use `textColor` instead. This prop will be removed in the next major version."
|
|
345
347
|
},
|
|
346
348
|
{
|
|
347
349
|
"name": "bgColor",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "Letting Tab Leave",
|
|
30
|
-
"code": "<Popover\n trapFocus={false}\n ariaLabel=\"Quick note\"\n trigger={<Button>Add note</Button>}\n>\n <Popover.Body>\n <Input
|
|
30
|
+
"code": "<Popover\n trapFocus={false}\n ariaLabel=\"Quick note\"\n trigger={<Button>Add note</Button>}\n>\n <Popover.Body>\n <Input label=\"Note\" placeholder=\"Type, then Tab onward\" />\n </Popover.Body>\n</Popover>"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "Triggers That Aren't Buttons",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Compound (dot-notation) usage",
|
|
38
|
-
"code": "<Popover trigger={<Button>Rename</Button>}>\n <Popover.Header>Rename file</Popover.Header>\n <Popover.Body>\n <Input
|
|
38
|
+
"code": "<Popover trigger={<Button>Rename</Button>}>\n <Popover.Header>Rename file</Popover.Header>\n <Popover.Body>\n <Input label=\"File name\" defaultValue=\"report.pdf\" />\n </Popover.Body>\n <Popover.Footer>\n <Popover.Close>Cancel</Popover.Close>\n <Popover.Close color=\"primary\">Save</Popover.Close>\n </Popover.Footer>\n</Popover>"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
"accessibility": "`Popover` follows the [WAI-ARIA dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/)\nfor a non-modal dialog:\n\n- The panel is a `role=\"dialog\"` without `aria-modal`. It is named by its `Popover.Header` through\n `aria-labelledby`, or by `ariaLabel`, which takes precedence. A development build warns when an\n open panel has neither.\n- The trigger gets `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls` pointing at the\n panel while it is open.\n- Opening moves focus to the first control in the panel, or to the panel itself when it has none.\n Closing hands focus back to the trigger, as long as focus is still in the panel then, so a click\n that put it somewhere else keeps it there.\n- Tab and Shift+Tab wrap inside the open panel, which the pattern asks of non-modal dialogs too.\n Pointer focus, the screen reader's reading cursor and the rest of the page stay free: nothing\n outside is hidden or made inert, and the page still scrolls. `trapFocus={false}` lets Tab leave.\n- <kbd>Escape</kbd> closes the popover while focus is in the panel or on the trigger. A dialog\n nested inside the panel, such as a date picker's calendar or another popover, takes its own\n Escape first.\n- <kbd>Enter</kbd> and <kbd>Space</kbd> toggle a trigger the browser doesn't click on its own.\n- The open animation is turned off under `prefers-reduced-motion: reduce`.\n- On a right-to-left page a popover with no `position` lines its right edge up with the trigger's, so a trigger at the start of the line doesn't push the panel off the screen. A `position` you pass stays physical: `bottom-left` lines up the left edges on either page.\n- A panel that would run past the left or right edge of the screen, as on a phone with the\n trigger 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.",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Form Addons › Currency Select + Input + Button",
|
|
50
|
-
"code": "<Field
|
|
50
|
+
"code": "<Field label=\"Amount\" labelProps={{ htmlFor: 'transfer-amount' }}>\n <Field hasAddons>\n <Control>\n <Select aria-label=\"Currency\">\n <option>$</option>\n <option>£</option>\n <option>€</option>\n </Select>\n </Control>\n <Control isExpanded>\n <Input id=\"transfer-amount\" type=\"text\" placeholder=\"Amount of money\" />\n </Control>\n <Control>\n <Button>Transfer</Button>\n </Control>\n </Field>\n</Field>"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"title": "Form Addons › Fullwidth Select + Button",
|
|
54
|
-
"code": "<Field
|
|
54
|
+
"code": "<Field label=\"Country\" labelProps={{ htmlFor: 'fullwidth-country' }}>\n <Field hasAddons>\n <Control isExpanded>\n <Select autoComplete=\"country\" id=\"fullwidth-country\" isFullwidth>\n <option>United States</option>\n <option>United Kingdom</option>\n <option>Canada</option>\n <option>France</option>\n <option>Germany</option>\n </Select>\n </Control>\n <Control>\n <Button color=\"primary\">Choose</Button>\n </Control>\n </Field>\n</Field>"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"title": "Horizontal — Select in Narrow Field",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"title": "Sizes",
|
|
18
|
-
"code": "function example() {\n return (\n <Block display=\"flex\" flexDirection=\"column\">\n <Switch size=\"small\" defaultChecked>\n Small\n </Switch>\n <Switch size=\"normal\" defaultChecked>\n Normal\n </Switch>\n <Switch size=\"medium\" defaultChecked>\n Medium\n </Switch>\n <Switch size=\"large\" defaultChecked>\n Large\n </Switch>\n </Block>\n );\n}"
|
|
18
|
+
"code": "function example() {\n return (\n <Block display=\"flex\" flexDirection=\"column\" gap=\"1\">\n <Switch size=\"small\" defaultChecked>\n Small\n </Switch>\n <Switch size=\"normal\" defaultChecked>\n Normal\n </Switch>\n <Switch size=\"medium\" defaultChecked>\n Medium\n </Switch>\n <Switch size=\"large\" defaultChecked>\n Large\n </Switch>\n </Block>\n );\n}"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "Valid Colors and Sizes",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"code": "function example() {\n const [settings, setSettings] = useState({\n notifications: true,\n darkMode: false,\n autoSave: true,\n });\n\n const updateSetting =\n (key: keyof typeof settings) =>\n (e: React.ChangeEvent<HTMLInputElement>) => {\n setSettings(prev => ({ ...prev, [key]: e.target.checked }));\n };\n\n return (\n <Block style={{ maxWidth: '300px' }}>\n <Title size=\"5\">Settings</Title>\n <Block display=\"flex\" flexDirection=\"column\">\n <Switch\n color=\"primary\"\n checked={settings.notifications}\n onChange={updateSetting('notifications')}\n >\n Push notifications\n </Switch>\n <Switch\n color=\"info\"\n checked={settings.darkMode}\n onChange={updateSetting('darkMode')}\n >\n Dark mode\n </Switch>\n <Switch\n color=\"success\"\n checked={settings.autoSave}\n onChange={updateSetting('autoSave')}\n >\n Auto-save\n </Switch>\n </Block>\n </Block>\n );\n}"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"accessibility": "- The Switch is built on a native checkbox input for proper keyboard navigation\n- Use the `children` prop to provide a visible label\n- For icon-only switches, provide an `aria-label` prop\n- Space toggles a focused switch, as it does a checkbox.\n- A screen reader announces a Switch as a checkbox, since that's the input it's built on. Pass `role=\"switch\"` to have it announced as a switch, as in [Announced as a Switch](https://bestax.io/docs/api/form/switch#announced-as-a-switch). The input keeps its checked state, so `checked`, `onChange` and the form value work the same either way.\n- In forced colors (Windows contrast themes), the track and the knob take system colors, so the knob shows which side it's on in every style. Off, the knob and the edge are in the system's button text color. On, the default style's track fills with the highlight color and the knob takes the color made to read on it, while a thin or outlined switch, whose track doesn't fill, draws its knob and edge in the highlight color. Disabled, it draws in gray at full strength rather than dimmed: the edge, the knob, the label, and the default style's track when on, with the knob in the page's color on it.",
|
|
57
|
+
"accessibility": "- The Switch is built on a native checkbox input for proper keyboard navigation\n- Use the `children` prop to provide a visible label\n- For icon-only switches, provide an `aria-label` prop\n- Space toggles a focused switch, as it does a checkbox.\n- A screen reader announces a Switch as a checkbox, since that's the input it's built on. Pass `role=\"switch\"` to have it announced as a switch, as in [Announced as a Switch](https://bestax.io/docs/api/form/switch#announced-as-a-switch). The input keeps its checked state, so `checked`, `onChange` and the form value work the same either way.\n- In forced colors (Windows contrast themes), the track and the knob take system colors, so the knob shows which side it's on in every style. Off, the knob and the edge are in the system's button text color. On, the default style's track fills with the highlight color and the knob takes the color made to read on it, while a thin or outlined switch, whose track doesn't fill, draws its knob and edge in the highlight color. Disabled, it draws in gray at full strength rather than dimmed: the edge, the knob, the label, and the default style's track when on, with the knob in the page's color on it.\n- A small switch draws its track 18px tall, and a thin one with no text is only as tall as its track, under the 24px minimum target size of WCAG 2.5.8. bestax's styles put a transparent band right below the switch, as wide as it, which takes its presses too, so the switch and the band make a target 24px tall. The track, the text and the layout around them stay as they are. Another switch, or a Bulma form control or button, that comes after it in the page paints over the band and keeps its own presses, so a switch stacked on one of those with no gap keeps the target it draws: 18px tall for a small one, and only its track for a thin one with no text. Give it room below, as the sizes example above does. Anything else that close, such as text or a plain link, sits under the band, and a press on it toggles the switch.",
|
|
58
58
|
"related": [],
|
|
59
59
|
"storybook": null,
|
|
60
60
|
"summary": "The `Switch` component provides a toggle switch for boolean on/off states.",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"name": "size",
|
|
81
81
|
"type": "'small' | 'normal' | 'medium' | 'large'",
|
|
82
82
|
"default": null,
|
|
83
|
-
"description": "Size of the switch.",
|
|
83
|
+
"description": "Size of the switch. A small one draws 18px tall and takes the rest of its 24px target from a transparent band right below it, so leave it room below: stacked flush on another switch or a control, it keeps the 18px.",
|
|
84
84
|
"required": false,
|
|
85
85
|
"inherited": false,
|
|
86
86
|
"deprecated": false
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"name": "isThin",
|
|
99
99
|
"type": "boolean",
|
|
100
100
|
"default": "false",
|
|
101
|
-
"description": "Use thin switch style.",
|
|
101
|
+
"description": "Use thin switch style. With no text, a thin switch is only as tall as its track and takes the rest of its 24px target from a transparent band right below it, so leave it room below: stacked flush on another switch or a control, it keeps the height it draws.",
|
|
102
102
|
"required": false,
|
|
103
103
|
"inherited": false,
|
|
104
104
|
"deprecated": false
|
|
@@ -7,43 +7,43 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Basic Taginput",
|
|
10
|
-
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['React', 'TypeScript']);\n\n return (\n <Block>\n <Taginput
|
|
10
|
+
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['React', 'TypeScript']);\n\n return (\n <Block>\n <Taginput\n value={tags}\n onChange={setTags}\n label=\"Tags\"\n placeholder=\"Add a tag...\"\n />\n <Paragraph mt=\"2\" textColor=\"grey\">\n Tags: {tags.join(', ')}\n </Paragraph>\n </Block>\n );\n}"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "With Autocomplete",
|
|
14
|
-
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['React']);\n const suggestions = [\n 'React',\n 'Vue',\n 'Angular',\n 'Svelte',\n 'TypeScript',\n 'JavaScript',\n 'Python',\n 'Go',\n ];\n\n return (\n <Taginput\n value={tags}\n onChange={setTags}\n data={suggestions}\n placeholder=\"Add frameworks...\"\n openOnFocus\n />\n );\n}"
|
|
14
|
+
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['React']);\n const suggestions = [\n 'React',\n 'Vue',\n 'Angular',\n 'Svelte',\n 'TypeScript',\n 'JavaScript',\n 'Python',\n 'Go',\n ];\n\n return (\n <Taginput\n label=\"Frameworks\"\n value={tags}\n onChange={setTags}\n data={suggestions}\n placeholder=\"Add frameworks...\"\n openOnFocus\n />\n );\n}"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
"title": "Restrict to Suggestions",
|
|
18
|
-
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>([]);\n const categories = [\n 'Bug',\n 'Feature',\n 'Documentation',\n 'Enhancement',\n 'Question',\n ];\n\n return (\n <Block>\n <Taginput\n value={tags}\n onChange={setTags}\n data={categories}\n allowNew={false}\n placeholder=\"Select categories...\"\n openOnFocus\n />\n <Paragraph mt=\"2\" textColor=\"grey\" textSize=\"7\">\n Only predefined categories can be selected\n </Paragraph>\n </Block>\n );\n}"
|
|
18
|
+
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>([]);\n const categories = [\n 'Bug',\n 'Feature',\n 'Documentation',\n 'Enhancement',\n 'Question',\n ];\n\n return (\n <Block>\n <Taginput\n label=\"Categories\"\n value={tags}\n onChange={setTags}\n data={categories}\n allowNew={false}\n placeholder=\"Select categories...\"\n openOnFocus\n />\n <Paragraph mt=\"2\" textColor=\"grey\" textSize=\"7\">\n Only predefined categories can be selected\n </Paragraph>\n </Block>\n );\n}"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "Tag Colors",
|
|
22
|
-
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Taginput\n defaultValue={['Primary']}\n tagColor=\"primary\"\n placeholder=\"Primary tags...\"\n />\n <Taginput\n defaultValue={['Success']}\n tagColor=\"success\"\n placeholder=\"Success tags...\"\n />\n <Taginput\n defaultValue={['Info']}\n tagColor=\"info\"\n placeholder=\"Info tags...\"\n />\n <Taginput\n defaultValue={['Warning']}\n tagColor=\"warning\"\n placeholder=\"Warning tags...\"\n />\n <Taginput\n defaultValue={['Danger']}\n tagColor=\"danger\"\n placeholder=\"Danger tags...\"\n />\n <Taginput\n defaultValue={['Dark']}\n tagColor=\"dark\"\n placeholder=\"Dark tags...\"\n />\n</Block>"
|
|
22
|
+
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Taginput\n label=\"Primary\"\n defaultValue={['Primary']}\n tagColor=\"primary\"\n placeholder=\"Primary tags...\"\n />\n <Taginput\n label=\"Success\"\n defaultValue={['Success']}\n tagColor=\"success\"\n placeholder=\"Success tags...\"\n />\n <Taginput\n label=\"Info\"\n defaultValue={['Info']}\n tagColor=\"info\"\n placeholder=\"Info tags...\"\n />\n <Taginput\n label=\"Warning\"\n defaultValue={['Warning']}\n tagColor=\"warning\"\n placeholder=\"Warning tags...\"\n />\n <Taginput\n label=\"Danger\"\n defaultValue={['Danger']}\n tagColor=\"danger\"\n placeholder=\"Danger tags...\"\n />\n <Taginput\n label=\"Dark\"\n defaultValue={['Dark']}\n tagColor=\"dark\"\n placeholder=\"Dark tags...\"\n />\n</Block>"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"title": "Size Variants",
|
|
26
|
-
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Taginput\n defaultValue={['Small']}\n size=\"small\"\n tagColor=\"primary\"\n placeholder=\"Small...\"\n />\n <Taginput\n defaultValue={['Normal']}\n tagColor=\"primary\"\n placeholder=\"Normal...\"\n />\n <Taginput\n defaultValue={['Medium']}\n size=\"medium\"\n tagColor=\"primary\"\n placeholder=\"Medium...\"\n />\n <Taginput\n defaultValue={['Large']}\n size=\"large\"\n tagColor=\"primary\"\n placeholder=\"Large...\"\n />\n</Block>"
|
|
26
|
+
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Taginput\n label=\"Small\"\n defaultValue={['Small']}\n size=\"small\"\n tagColor=\"primary\"\n placeholder=\"Small...\"\n />\n <Taginput\n label=\"Normal\"\n defaultValue={['Normal']}\n tagColor=\"primary\"\n placeholder=\"Normal...\"\n />\n <Taginput\n label=\"Medium\"\n defaultValue={['Medium']}\n size=\"medium\"\n tagColor=\"primary\"\n placeholder=\"Medium...\"\n />\n <Taginput\n label=\"Large\"\n defaultValue={['Large']}\n size=\"large\"\n tagColor=\"primary\"\n placeholder=\"Large...\"\n />\n</Block>"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "Maximum Tags",
|
|
30
|
-
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['One', 'Two']);\n\n return (\n <Block>\n <Taginput\n value={tags}\n onChange={setTags}\n maxTags={3}\n tagColor=\"info\"\n placeholder=\"Max 3 tags...\"\n />\n <Paragraph mt=\"2\" textColor=\"grey\" textSize=\"7\">\n {3 - tags.length} tags remaining\n </Paragraph>\n </Block>\n );\n}"
|
|
30
|
+
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['One', 'Two']);\n\n return (\n <Block>\n <Taginput\n label=\"Tags\"\n value={tags}\n onChange={setTags}\n maxTags={3}\n tagColor=\"info\"\n placeholder=\"Max 3 tags...\"\n />\n <Paragraph mt=\"2\" textColor=\"grey\" textSize=\"7\">\n {3 - tags.length} tags remaining\n </Paragraph>\n </Block>\n );\n}"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "Allow Duplicates",
|
|
34
|
-
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['Tag']);\n\n return (\n <Taginput\n value={tags}\n onChange={setTags}\n allowDuplicates\n tagColor=\"warning\"\n placeholder=\"Duplicates allowed...\"\n />\n );\n}"
|
|
34
|
+
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>(['Tag']);\n\n return (\n <Taginput\n label=\"Tags\"\n value={tags}\n onChange={setTags}\n allowDuplicates\n tagColor=\"warning\"\n placeholder=\"Duplicates allowed...\"\n />\n );\n}"
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Custom Confirm Keys",
|
|
38
|
-
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>([]);\n\n return (\n <Block>\n <Taginput\n value={tags}\n onChange={setTags}\n confirmKeys={['Enter', 'Tab', ' ']}\n tagColor=\"success\"\n placeholder=\"Press Enter, Tab, or Space...\"\n />\n <Paragraph mt=\"2\" textColor=\"grey\" textSize=\"7\">\n Space also creates a new tag\n </Paragraph>\n </Block>\n );\n}"
|
|
38
|
+
"code": "import type { TaginputTag } from '@allxsmith/bestax-bulma';\n\nfunction example() {\n const [tags, setTags] = useState<TaginputTag[]>([]);\n\n return (\n <Block>\n <Taginput\n label=\"Tags\"\n value={tags}\n onChange={setTags}\n confirmKeys={['Enter', 'Tab', ' ']}\n tagColor=\"success\"\n placeholder=\"Press Enter, Tab, or Space...\"\n />\n <Paragraph mt=\"2\" textColor=\"grey\" textSize=\"7\">\n Space also creates a new tag\n </Paragraph>\n </Block>\n );\n}"
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Read-only and Disabled",
|
|
42
|
-
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <
|
|
42
|
+
"code": "<Block display=\"flex\" flexDirection=\"column\">\n <Taginput\n label=\"Read-only\"\n defaultValue={['React', 'TypeScript']}\n readonly\n tagColor=\"info\"\n />\n <Taginput\n label=\"Disabled\"\n defaultValue={['React', 'TypeScript']}\n disabled\n tagColor=\"info\"\n />\n</Block>"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Non-closable Tags",
|
|
46
|
-
"code": "<Taginput\n defaultValue={['Fixed', 'Tags']}\n closable={false}\n tagColor=\"primary\"\n placeholder=\"Cannot remove tags...\"\n/>"
|
|
46
|
+
"code": "<Taginput\n label=\"Tags\"\n defaultValue={['Fixed', 'Tags']}\n closable={false}\n tagColor=\"primary\"\n placeholder=\"Cannot remove tags...\"\n/>"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Names in Another Language",
|
|
@@ -141,7 +141,9 @@ Field/Control/message props. `TextArea` adds `rows` and `hasFixedSize`.
|
|
|
141
141
|
|
|
142
142
|
`color`, `size`, `checked`/`defaultChecked`, `onChange`, `isRounded`, `isThin`, `isOutlined`,
|
|
143
143
|
`passiveType`, plus RTL support. It's a native checkbox, so a screen reader calls it one and Space
|
|
144
|
-
toggles it. Pass `role="switch"` to have it announced as a switch.
|
|
144
|
+
toggles it. Pass `role="switch"` to have it announced as a switch. A small switch, or a thin one
|
|
145
|
+
with no text, takes the rest of its 24px target from a transparent band right below it, so leave
|
|
146
|
+
room under it: stacked flush on another switch or a control, it keeps the smaller target it draws.
|
|
145
147
|
|
|
146
148
|
## File — `form/File.tsx`
|
|
147
149
|
|
|
@@ -179,8 +179,9 @@ Notes:
|
|
|
179
179
|
edge there from the desktop breakpoint up as a CanvasText outline, where Bulma's shadow is
|
|
180
180
|
dropped, marks the active item there
|
|
181
181
|
with a bar in the system's highlight color, where Bulma's colors for it are replaced, keeps a
|
|
182
|
-
`fixed` navbar
|
|
183
|
-
|
|
182
|
+
`fixed` navbar, or one Bulma's `-touch` or `-desktop` fixed classes fix, in place while an
|
|
183
|
+
overlay locks the page's scrolling, pads the page's scroll by such a navbar's height so a
|
|
184
|
+
control that takes focus doesn't scroll under it, gives an
|
|
184
185
|
active item's text the invert of the link color it sits on, where Bulma's leaves it in the navbar's text
|
|
185
186
|
color, draws a navbar in a colored `Hero` in the hero's colors, where Bulma's draws its active item and burger in the link
|
|
186
187
|
color, and, in a build with a class prefix, draws a dropdown's active link row, other than a tab, as it draws without one,
|
|
@@ -1389,8 +1389,9 @@ full-page Loading, takes the page's scrollbar away and pads `<html>` by the room
|
|
|
1389
1389
|
page doesn't shift. An element fixed to the window is placed against the window, which grows by
|
|
1390
1390
|
that room, so the padding doesn't reach it. While the lock is on, it sets the room it padded on
|
|
1391
1391
|
`<html>` as `--bulma-scroll-lock-offset-right`, or `--bulma-scroll-lock-offset-left` where the
|
|
1392
|
-
scrollbar was on the left. A `fixed` Navbar,
|
|
1393
|
-
|
|
1392
|
+
scrollbar was on the left. A `fixed` Navbar, or one Bulma's `-touch` or `-desktop` fixed classes
|
|
1393
|
+
fix at their breakpoint, the toast and notification stacks and an Affix add them to their offsets,
|
|
1394
|
+
so they stay put. A fixed element of the app's own does the same, with a
|
|
1394
1395
|
`0px` fallback for when no lock is on:
|
|
1395
1396
|
|
|
1396
1397
|
```css
|
|
@@ -28,7 +28,9 @@ This is the self-contained inventory of the color/size/variant props that matter
|
|
|
28
28
|
re-expose it as **`textColor`** / **`bgColor`**. `Box`/`Card`/`Section` ship no `is-<color>`
|
|
29
29
|
rule — their `color` _is_ the text helper (`has-text-<color>`; narrowed to the 6 on
|
|
30
30
|
`Box`/`Card`), so `color` and `textColor` are the same lever there (prefer `textColor`; it
|
|
31
|
-
takes precedence when both are set). `
|
|
31
|
+
takes precedence when both are set). `Pagination.List`, `Pagination.Link`, `Field.Label` and
|
|
32
|
+
`Field.Body` render their `color` as the text helper too, but there it wins over `textColor`,
|
|
33
|
+
even passed as `undefined`; it's deprecated on them, so use `textColor`. `Tag` and `Td`/`Th` have
|
|
32
34
|
**no text-color prop** — wrap content in `<Span textColor="…">`. `Input` has none either and
|
|
33
35
|
the wrapper trick can't work (it renders a native `<input>`; a child can't color its value):
|
|
34
36
|
recolor via the upstream `--bulma-text-strong-l`, since Bulma re-declares `--bulma-input-*` on
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.91",
|
|
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.79.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.79.2"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^26.6.6",
|