bestax-mcp 1.18.88 → 1.18.90
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/Calendar.json +7 -7
- package/data/components/Combobox.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/Pagination.json +8 -6
- package/data/components/Popover.json +2 -2
- package/data/components/Select.json +2 -2
- package/data/components/Taginput.json +10 -10
- package/data/skills/bestax-form/references/api.md +14 -8
- 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.
|
|
5
|
+
"version": "5.79.1"
|
|
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)",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "Content in a Day",
|
|
22
|
-
"code": "function Fares() {\n const fare = (date: Date) => 60 + ((date.getDate() * 7) % 50);\n return (\n <Calendar\n aria-label=\"Pick a departure day\"\n dayTemplate={date => `$${fare(date)}`}\n getDayLabel={(date, label)
|
|
22
|
+
"code": "function Fares() {\n const fare = (date: Date) => 60 + ((date.getDate() * 7) % 50);\n return (\n <Calendar\n aria-label=\"Pick a departure day\"\n dayTemplate={date => `$${fare(date)}`}\n getDayLabel={(date, label, shownNumber) =>\n `${shownNumber}, $${fare(date)}, ${label}`\n }\n />\n );\n}"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"title": "Loading Each Month",
|
|
26
|
-
"code": "function Slots() {\n const [month, setMonth] = React.useState(() => new Date());\n const [day, setDay] = React.useState<Date | null>(null);\n const [loading, setLoading] = React.useState(false);\n // Stands in for a fetch of the month's free slots.\n React.useEffect(() => {\n setLoading(true);\n const timer = setTimeout(() => setLoading(false), 600);\n return () => clearTimeout(timer);\n }, [month]);\n const slotsLeft = (date: Date) =>\n date.getDay() % 6 === 0 ? 0 : (date.getDate() % 5) + 1;\n return (\n <Calendar\n aria-label=\"Book a slot\"\n month={month}\n onMonthChange={setMonth}\n loading={loading}\n value={day}\n onChange={setDay}\n shouldDisableDate={date => slotsLeft(date) === 0}\n dayTemplate={date => slotsLeft(date) > 0 && `${slotsLeft(date)} left`}\n getDayLabel={(date, label)
|
|
26
|
+
"code": "function Slots() {\n const [month, setMonth] = React.useState(() => new Date());\n const [day, setDay] = React.useState<Date | null>(null);\n const [loading, setLoading] = React.useState(false);\n // Stands in for a fetch of the month's free slots.\n React.useEffect(() => {\n setLoading(true);\n const timer = setTimeout(() => setLoading(false), 600);\n return () => clearTimeout(timer);\n }, [month]);\n const slotsLeft = (date: Date) =>\n date.getDay() % 6 === 0 ? 0 : (date.getDate() % 5) + 1;\n return (\n <Calendar\n aria-label=\"Book a slot\"\n month={month}\n onMonthChange={setMonth}\n loading={loading}\n value={day}\n onChange={setDay}\n shouldDisableDate={date => slotsLeft(date) === 0}\n dayTemplate={date => slotsLeft(date) > 0 && `${slotsLeft(date)} left`}\n getDayLabel={(date, label, shownNumber) =>\n slotsLeft(date) > 0\n ? `${shownNumber}, ${slotsLeft(date)} left, ${label}`\n : label\n }\n />\n );\n}"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "A Calendar You Only Read",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Full Width",
|
|
46
|
-
"code": "function WideFares() {\n const fare = (date: Date) => 60 + ((date.getDate() * 7) % 50);\n return (\n <Calendar\n aria-label=\"Pick a departure day\"\n isFullwidth\n monthsToShow={2}\n dayTemplate={date => `from $${fare(date)}`}\n getDayLabel={(date, label)
|
|
46
|
+
"code": "function WideFares() {\n const fare = (date: Date) => 60 + ((date.getDate() * 7) % 50);\n return (\n <Calendar\n aria-label=\"Pick a departure day\"\n isFullwidth\n monthsToShow={2}\n dayTemplate={date => `from $${fare(date)}`}\n getDayLabel={(date, label, shownNumber) =>\n `${shownNumber}, from $${fare(date)}, ${label}`\n }\n />\n );\n}"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Sizes and Colors",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"code": "<Calendar\n aria-label=\"Choisir un jour\"\n locale=\"fr-FR\"\n firstDayOfWeek={1}\n labels={{ prevMonth: 'Mois précédent', nextMonth: 'Mois suivant' }}\n/>"
|
|
55
55
|
}
|
|
56
56
|
],
|
|
57
|
-
"accessibility": "- The root is a `<div>`. An `aria-label` or `aria-labelledby` on it names the Calendar and makes it a `role=\"group\"`, and so does a labeled `Field` around it, whose label names it when you give it no name of your own.\n- Each month is a `role=\"grid\"` named by its month and year, its weeks `role=\"row\"`s and its days `button`s with `role=\"gridcell\"`. Picked days are `aria-selected`, and today has `aria-current=\"date\"`.\n- A day the grid leaves blank, a nearby month's day with `nearbyMonthDays` off or one whose month is on show beside it, draws nothing. A week left with no day on show keeps its place, so the grid keeps its height and months side by side line up, and is hidden from assistive technology rather than read as an empty row.\n- In forced colors (Windows' contrast themes), the fill that marks a picked day, month or year, a range's band, and the year the header's year list is on, is replaced, so bestax's styles draw each of those cells, and every day of a picked range, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. What `dayTemplate` draws in them takes the same colors, unless it sets its own. While a range's end is still being picked, only its start is filled, and the day it would end on keeps its dashed edge.\n- In forced colors, a disabled day, month or year, and a disabled month or arrow button in the header, draws in the system's color for a disabled control, at full strength rather than faded.\n- Each day is named by its full date in the Calendar's locale, such as \"Friday, November 20, 2026\", which `getDayLabel`
|
|
57
|
+
"accessibility": "- The root is a `<div>`. An `aria-label` or `aria-labelledby` on it names the Calendar and makes it a `role=\"group\"`, and so does a labeled `Field` around it, whose label names it when you give it no name of your own.\n- Each month is a `role=\"grid\"` named by its month and year, its weeks `role=\"row\"`s and its days `button`s with `role=\"gridcell\"`. Picked days are `aria-selected`, and today has `aria-current=\"date\"`.\n- A day the grid leaves blank, a nearby month's day with `nearbyMonthDays` off or one whose month is on show beside it, draws nothing. A week left with no day on show keeps its place, so the grid keeps its height and months side by side line up, and is hidden from assistive technology rather than read as an empty row.\n- In forced colors (Windows' contrast themes), the fill that marks a picked day, month or year, a range's band, and the year the header's year list is on, is replaced, so bestax's styles draw each of those cells, and every day of a picked range, in the system's highlight colors there, or in the system's color for a disabled control when it's disabled. What `dayTemplate` draws in them takes the same colors, unless it sets its own. While a range's end is still being picked, only its start is filled, and the day it would end on keeps its dashed edge.\n- In forced colors, a disabled day, month or year, and a disabled month or arrow button in the header, draws in the system's color for a disabled control, at full strength rather than faded.\n- Each day is named by its full date in the Calendar's locale, such as \"Friday, November 20, 2026\", which `getDayLabel` gets as its `label`. The weekday row is hidden from assistive technology, since every day's name carries its weekday, so moving down a week reads the whole date rather than \"27\". On a server-rendered page the full names arrive once the page hydrates, and until then a day is named by its number and what `dayTemplate` draws.\n- What `dayTemplate` draws isn't read, since a day's name is its date: pair it with `getDayLabel`. On a day it draws text for, start the name with the day's number and that text, in the words the day shows.\n- A range's ends are described as \"Start date\" and \"End date\", the day a pending range would end on as \"Choose as end date\", and a polite live region states the range in words as it's picked, as on `DateRangeInput`.\n- `readOnly` puts `aria-readonly=\"true\"` on the grids and keeps the tab stop and the keys. `disabled` puts `aria-disabled=\"true\"` on them and disables every button.\n- `loading` puts `aria-busy=\"true\"` on the grids and keeps the grid and its focus where they were.\n- A roving `tabindex` keeps one day focusable in the whole Calendar, whatever `monthsToShow` is. When the focused day is disabled, the tab stop moves to the nearest enabled day of the months on show.\n- Closing the year list, with a pick or `Escape`, puts focus back on the grid's tab stop.\n- On a right-to-left page the previous-month chevron points right.",
|
|
58
58
|
"related": ["DateInput", "DateRangeInput", "Fieldset"],
|
|
59
59
|
"storybook": "https://bestax.io/storybook/?path=/story/form-calendar",
|
|
60
60
|
"summary": "The `Calendar` component shows months on the page, not behind an input, where a click picks a day or a range and each day can show what's on it. It's the grid the date pickers draw, with no `Field`, label or hidden input: a form that posts a date uses `DateInput inline` instead.",
|
|
@@ -152,16 +152,16 @@
|
|
|
152
152
|
"name": "dayTemplate",
|
|
153
153
|
"type": "(date: Date, state: CalendarDayState) => React.ReactNode",
|
|
154
154
|
"default": null,
|
|
155
|
-
"description": "Draws content inside a day's button, under its number: a dot, a count, a price. Phrasing content only, with nothing in it to click or focus. Say the same thing in `getDayLabel
|
|
155
|
+
"description": "Draws content inside a day's button, under its number: a dot, a count, a price. Phrasing content only, with nothing in it to click or focus. Say the same thing in `getDayLabel`, in the same words where this draws text: a day's name is its date, so a screen reader doesn't read what this draws.",
|
|
156
156
|
"required": false,
|
|
157
157
|
"inherited": true,
|
|
158
158
|
"deprecated": false
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"name": "getDayLabel",
|
|
162
|
-
"type": "(date: Date, label: string) => string",
|
|
162
|
+
"type": "(date: Date, label: string, shownNumber: string) => string",
|
|
163
163
|
"default": null,
|
|
164
|
-
"description": "Returns a day's accessible name. `label` is the default, the full date in the Calendar's locale (\"Tuesday, October 20, 2026\"),
|
|
164
|
+
"description": "Returns a day's accessible name. `label` is the default, the full date in the Calendar's locale (\"Tuesday, October 20, 2026\"), and `shownNumber` is the day's number as its cell shows it, in the grid's digits (\"20\", or \"٢٠\" in Egyptian Arabic). On a day `dayTemplate` draws text for, start the name with what the day shows, its number and then that text, and end it with `label`: `` (date, label, shownNumber) => `${shownNumber}, 3 left, ${label}` ``. Someone using speech input says what they see, and a name with the day's words in another order, or in other words, may not match. On a server-rendered page the full-date names arrive once the page hydrates, as the pickers' full weekday names do, and until then a day is named by its number and the text `dayTemplate` draws.",
|
|
165
165
|
"required": false,
|
|
166
166
|
"inherited": true,
|
|
167
167
|
"deprecated": false
|
|
@@ -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",
|
|
@@ -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
|
{
|
|
@@ -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",
|
|
@@ -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",
|
|
@@ -293,13 +293,15 @@ pickers' grid with no `Field`, label or hidden input, so a form that posts a dat
|
|
|
293
293
|
`DateRangeInput`, reported once both ends are picked). `readOnly` reads days without picking
|
|
294
294
|
them and `disabled` stops both. `dayTemplate(date, state)` draws short content under a day's
|
|
295
295
|
number, and because a day's name is its full date, which a screen reader reads instead, pair it
|
|
296
|
-
with `getDayLabel(date, label)` to say the same thing
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
`
|
|
301
|
-
|
|
302
|
-
|
|
296
|
+
with `getDayLabel(date, label, shownNumber)` to say the same thing: `shownNumber` (the day's
|
|
297
|
+
number as it shows) and the words it draws first, then `label`, so speech input matches what
|
|
298
|
+
shows.
|
|
299
|
+
`month`/`defaultMonth`/`onMonthChange` hold the month on show, so load each month's data in
|
|
300
|
+
`onMonthChange` and set `loading` while it arrives. `monthsToShow` sets months side by side, and
|
|
301
|
+
`isFullwidth` stretches the days to the container. Name it with `aria-label` or `aria-labelledby`.
|
|
302
|
+
On a server-rendered page give it a `month`, a `defaultMonth` or a picked `value`, since without one
|
|
303
|
+
the first month comes from the clock, and a `locale` (or a `LocaleProvider` around it), since
|
|
304
|
+
without one the month and weekday names come in the server's language on the server.
|
|
303
305
|
|
|
304
306
|
```tsx
|
|
305
307
|
const [month, setMonth] = useState(new Date(2026, 10, 1));
|
|
@@ -314,7 +316,11 @@ const [day, setDay] = useState<Date | null>(null);
|
|
|
314
316
|
onChange={setDay}
|
|
315
317
|
shouldDisableDate={date => slotsLeft(date) === 0}
|
|
316
318
|
dayTemplate={date => slotsLeft(date) > 0 && `${slotsLeft(date)} left`}
|
|
317
|
-
getDayLabel={(date, label
|
|
319
|
+
getDayLabel={(date, label, shownNumber) =>
|
|
320
|
+
slotsLeft(date) > 0
|
|
321
|
+
? `${shownNumber}, ${slotsLeft(date)} left, ${label}`
|
|
322
|
+
: label
|
|
323
|
+
}
|
|
318
324
|
/>;
|
|
319
325
|
```
|
|
320
326
|
|
|
@@ -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.90",
|
|
4
4
|
"mcpName": "io.github.allxsmith/bestax-mcp",
|
|
5
5
|
"description": "MCP server for @allxsmith/bestax-bulma — component props, examples, CSS variables and agent skills, served offline from a version-pinned index",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
44
44
|
"zod": "^4.6.7",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.79.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^26.6.6",
|