bestax-mcp 1.18.49 → 1.18.51
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 +10 -8
- package/data/components/AppFrame.json +24 -5
- package/data/components/Autocomplete.json +1 -1
- package/data/components/Button.json +1 -1
- package/data/components/Buttons.json +3 -3
- package/data/components/Card.json +9 -9
- package/data/components/Combobox.json +3 -3
- package/data/components/CopyButton.json +1 -1
- package/data/components/DataTable.json +1 -1
- package/data/components/DateInput.json +5 -5
- package/data/components/DateRangeInput.json +6 -6
- package/data/components/DateTimeInput.json +4 -4
- package/data/components/Dropdown.json +4 -4
- package/data/components/IconButton.json +1 -1
- package/data/components/Loading.json +6 -6
- package/data/components/LocaleProvider.json +2 -2
- package/data/components/Media.json +5 -5
- package/data/components/Menu.json +30 -2
- package/data/components/Modal.json +2 -2
- package/data/components/Navbar.json +2 -2
- package/data/components/PinInput.json +1 -1
- package/data/components/Popover.json +1 -1
- package/data/components/Skeleton.json +1 -1
- package/data/components/Slider.json +2 -2
- package/data/components/Steps.json +25 -7
- package/data/components/Taginput.json +1 -1
- package/data/components/Timeline.json +5 -5
- package/data/components/Tooltip.json +24 -2
- package/data/components/TreeSelect.json +7 -7
- package/data/components/useBulmaClasses.json +3 -3
- package/data/skills/bestax-form/references/api.md +10 -10
- package/data/skills/bestax-layout-scaffold/SKILL.md +7 -2
- package/data/skills/bestax-layout-scaffold/examples/card-grid.tsx +10 -6
- package/data/skills/bestax-layout-scaffold/references/archetypes.md +6 -0
- package/data/skills/bestax-layout-scaffold/references/layout-components.md +23 -21
- package/data/skills/bestax-migrate/references/rbx/prop-map.md +20 -20
- package/data/skills/bestax-migrate/references/rbx/unmappables.md +1 -0
- package/data/skills/bestax-migrate/references/react-bulma-components/prop-map.md +22 -22
- package/data/skills/bestax-migrate/references/react-bulma-components/unmappables.md +8 -1
- package/data/skills/bestax-optimize/SKILL.md +2 -1
- package/data/skills/bestax-optimize/references/modular-build.md +27 -10
- package/data/skills/bestax-theming/references/css-variables.md +20 -15
- package/data/skills/bestax-theming/references/themeable-components.md +1 -1
- package/data/skills.json +10 -10
- package/package.json +4 -4
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.68.1"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -193,8 +193,8 @@
|
|
|
193
193
|
"slug": "layout/appframe",
|
|
194
194
|
"import": "import { AppFrame, useAppFrame } from '@allxsmith/bestax-bulma';",
|
|
195
195
|
"compound": true,
|
|
196
|
-
"propCount":
|
|
197
|
-
"exampleCount":
|
|
196
|
+
"propCount": 36,
|
|
197
|
+
"exampleCount": 9
|
|
198
198
|
},
|
|
199
199
|
{
|
|
200
200
|
"name": "Autocomplete",
|
|
@@ -974,8 +974,8 @@
|
|
|
974
974
|
"slug": "components/menu",
|
|
975
975
|
"import": "import { Menu } from '@allxsmith/bestax-bulma';",
|
|
976
976
|
"compound": true,
|
|
977
|
-
"propCount":
|
|
978
|
-
"exampleCount":
|
|
977
|
+
"propCount": 24,
|
|
978
|
+
"exampleCount": 9
|
|
979
979
|
},
|
|
980
980
|
{
|
|
981
981
|
"name": "Message",
|
|
@@ -1359,7 +1359,7 @@
|
|
|
1359
1359
|
"slug": "components/steps",
|
|
1360
1360
|
"import": "import { Steps } from '@allxsmith/bestax-bulma';",
|
|
1361
1361
|
"compound": true,
|
|
1362
|
-
"propCount":
|
|
1362
|
+
"propCount": 29,
|
|
1363
1363
|
"exampleCount": 10
|
|
1364
1364
|
},
|
|
1365
1365
|
{
|
|
@@ -1546,8 +1546,8 @@
|
|
|
1546
1546
|
"slug": "components/tooltip",
|
|
1547
1547
|
"import": "import { Tooltip } from '@allxsmith/bestax-bulma';",
|
|
1548
1548
|
"compound": false,
|
|
1549
|
-
"propCount":
|
|
1550
|
-
"exampleCount":
|
|
1549
|
+
"propCount": 16,
|
|
1550
|
+
"exampleCount": 12
|
|
1551
1551
|
},
|
|
1552
1552
|
{
|
|
1553
1553
|
"name": "TreeSelect",
|
|
@@ -1662,6 +1662,7 @@
|
|
|
1662
1662
|
"--bulma-app-frame-header-height": ["AppFrame"],
|
|
1663
1663
|
"--bulma-app-frame-nav-background": ["AppFrame"],
|
|
1664
1664
|
"--bulma-app-frame-nav-padding": ["AppFrame"],
|
|
1665
|
+
"--bulma-app-frame-nav-rail-width": ["AppFrame"],
|
|
1665
1666
|
"--bulma-app-frame-nav-width": ["AppFrame"],
|
|
1666
1667
|
"--bulma-app-frame-skip-link-background": ["AppFrame"],
|
|
1667
1668
|
"--bulma-app-frame-skip-link-color": ["AppFrame"],
|
|
@@ -2637,6 +2638,7 @@
|
|
|
2637
2638
|
"--bulma-media-level-2-spacing": ["Media"],
|
|
2638
2639
|
"--bulma-media-spacing": ["Media"],
|
|
2639
2640
|
"--bulma-media-spacing-large": ["Media"],
|
|
2641
|
+
"--bulma-menu-icon-gap": ["Menu"],
|
|
2640
2642
|
"--bulma-menu-item-active-background-l-delta": ["Menu"],
|
|
2641
2643
|
"--bulma-menu-item-background-l": ["Menu"],
|
|
2642
2644
|
"--bulma-menu-item-background-l-delta": ["Menu"],
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
"title": "Collapsing the Column",
|
|
18
18
|
"code": "function example() {\n const [collapsed, setCollapsed] = useState(false);\n return (\n <AppFrame navCollapsed={collapsed} onNavCollapsedChange={setCollapsed}>\n <AppFrame.Header>\n <Navbar aria-label=\"Site\">\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <strong>Acme</strong>\n </Navbar.Item>\n <AppFrame.Burger />\n </Navbar.Brand>\n </Navbar>\n </AppFrame.Header>\n <AppFrame.Nav>\n <Menu>\n <Menu.List>\n <Menu.Item href=\"#\" active>\n Dashboard\n </Menu.Item>\n <Menu.Item href=\"#\">Orders</Menu.Item>\n </Menu.List>\n </Menu>\n </AppFrame.Nav>\n <AppFrame.Main>\n <Section>\n <Paragraph>\n The column is {collapsed ? 'collapsed' : 'expanded'}.\n </Paragraph>\n </Section>\n </AppFrame.Main>\n </AppFrame>\n );\n}"
|
|
19
19
|
},
|
|
20
|
+
{
|
|
21
|
+
"title": "The Icon Rail",
|
|
22
|
+
"code": "function example() {\n const [collapsed, setCollapsed] = useState(true);\n return (\n <AppFrame navCollapsed={collapsed} onNavCollapsedChange={setCollapsed}>\n <AppFrame.Header>\n <Navbar aria-label=\"Site\">\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <strong>Acme</strong>\n </Navbar.Item>\n <AppFrame.Burger />\n </Navbar.Brand>\n </Navbar>\n </AppFrame.Header>\n <AppFrame.Nav rail>\n <Menu>\n <Menu.List>\n <Menu.Item href=\"#\" icon={<Icon name=\"house\" />} active>\n Dashboard\n </Menu.Item>\n <Menu.Item href=\"#\" icon={<Icon name=\"box\" />}>\n Orders\n </Menu.Item>\n </Menu.List>\n <Menu.Section label=\"Reports\" icon={<Icon name=\"chart-line\" />}>\n <Menu.List>\n <Menu.Item href=\"#\">Sales</Menu.Item>\n <Menu.Item href=\"#\">Returns</Menu.Item>\n </Menu.List>\n </Menu.Section>\n </Menu>\n </AppFrame.Nav>\n <AppFrame.Main>\n <Section>\n <Paragraph>\n The column is {collapsed ? 'a rail of icons' : 'expanded'}.\n </Paragraph>\n </Section>\n </AppFrame.Main>\n </AppFrame>\n );\n}"
|
|
23
|
+
},
|
|
20
24
|
{
|
|
21
25
|
"title": "Keeping the State",
|
|
22
26
|
"code": "// On the server, read the cookie into `initialCollapsed`, then:\nconst [collapsed, setCollapsed] = useState(initialCollapsed);\n\n<AppFrame\n navCollapsed={collapsed}\n onNavCollapsedChange={next => {\n setCollapsed(next);\n document.cookie = `nav-collapsed=${next}; path=/; max-age=31536000`;\n }}\n>\n …\n</AppFrame>;"
|
|
@@ -38,7 +42,7 @@
|
|
|
38
42
|
"code": "<AppFrame>\n <AppFrameHeader>\n <Navbar aria-label=\"Site\">\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <strong>Acme</strong>\n </Navbar.Item>\n <AppFrameBurger />\n </Navbar.Brand>\n </Navbar>\n </AppFrameHeader>\n <AppFrameNav>\n <Menu>\n <Menu.List>\n <Menu.Item href=\"#\" active>\n Dashboard\n </Menu.Item>\n </Menu.List>\n </Menu>\n </AppFrameNav>\n <AppFrame.Main>\n <Section>\n <Paragraph>\n AppFrameNav and AppFrame.Nav are the same component.\n </Paragraph>\n </Section>\n </AppFrame.Main>\n</AppFrame>"
|
|
39
43
|
}
|
|
40
44
|
],
|
|
41
|
-
"accessibility": "- **Landmarks:** the header, the nav, the page and the footer are the page's banner, navigation,\n main and contentinfo landmarks, and the aside a complementary one, as long as the frame sits at\n the top of the page. A development build warns when it sits inside a `main` or a sectioning\n element, where the header and footer stop being landmarks.\n- **Names:** the nav is named \"Sections\" (`labels.nav`), since the `Navbar` in the header names\n its own navigation. The name leaves out the word \"navigation\", which the role says. A `Menu`\n in the nav keeps its `<aside>`, which inside a `<nav>` is a plain element unless it's named.\n- **Skip link:** the first thing on the page, hidden until it has focus, moves focus to the page's\n `<main>` (WCAG 2.4.1).\n- **Sticky header:** `scroll-padding-top` on the document keeps an in-page link's target and a\n focused element below the header (WCAG 2.4.11, technique C43).\n- **The burger** is a button named \"menu\" (`labels.burger`), with `aria-expanded` saying whether\n the drawer is open, or from the breakpoint up whether the column is shown, and `aria-controls`\n naming the nav. The server can't know the width, so until the page hydrates the burger has no\n `aria-expanded` and shows its bars, and the first paint after hydration has both right.\n- **The drawer** is modal by default: focus moves to its close button, Tab and Shift+Tab stay\n inside, the page doesn't scroll, the rest of the frame is inert, and Escape closes it while it's\n the topmost overlay, so a `Modal` opened from it closes first. Escape, the close button and a\n click on the backdrop hand focus back to the burger, and so does a press outside the drawer\n without `overlay`, before the press moves it to what was pressed. The close button is there for\n a touch screen reader user, who has no Escape key. It stays a navigation landmark rather than a\n dialog: the inert frame is what keeps assistive technology inside it, so keep the page's content\n inside the frame's parts.\n- **A closed drawer and a collapsed column** are `visibility: hidden`, so their links are out of\n the Tab order and the accessibility tree before any script runs.\n- **Reflow:** at 320 pixels wide the nav is a drawer, so nothing scrolls sideways (WCAG 1.4.10).\n- **Motion:** the drawer's slide, the backdrop's fade and the column's collapse don't play under\n `prefers-reduced-motion: reduce`.\n- **Forced colors:** the column keeps its divider, the drawer gets a border on its open edge in\n place of its shadow, and the burger keeps its bars, as a [`Navbar`](https://bestax.io/docs/api/components/navbar)'s\n does.\n- **Right to left:** the column sits on the right, and the drawer slides in from the right.",
|
|
45
|
+
"accessibility": "- **Landmarks:** the header, the nav, the page and the footer are the page's banner, navigation,\n main and contentinfo landmarks, and the aside a complementary one, as long as the frame sits at\n the top of the page. A development build warns when it sits inside a `main` or a sectioning\n element, where the header and footer stop being landmarks.\n- **Names:** the nav is named \"Sections\" (`labels.nav`), since the `Navbar` in the header names\n its own navigation. The name leaves out the word \"navigation\", which the role says. A `Menu`\n in the nav keeps its `<aside>`, which inside a `<nav>` is a plain element unless it's named.\n- **Skip link:** the first thing on the page, hidden until it has focus, moves focus to the page's\n `<main>` (WCAG 2.4.1).\n- **Sticky header:** `scroll-padding-top` on the document keeps an in-page link's target and a\n focused element below the header (WCAG 2.4.11, technique C43).\n- **The burger** is a button named \"menu\" (`labels.burger`), with `aria-expanded` saying whether\n the drawer is open, or from the breakpoint up whether the column is shown, and `aria-controls`\n naming the nav. The server can't know the width, so until the page hydrates the burger has no\n `aria-expanded` and shows its bars, and the first paint after hydration has both right.\n- **The drawer** is modal by default: focus moves to its close button, Tab and Shift+Tab stay\n inside, the page doesn't scroll, the rest of the frame is inert, and Escape closes it while it's\n the topmost overlay, so a `Modal` opened from it closes first. Escape, the close button and a\n click on the backdrop hand focus back to the burger, and so does a press outside the drawer\n without `overlay`, before the press moves it to what was pressed. The close button is there for\n a touch screen reader user, who has no Escape key. It stays a navigation landmark rather than a\n dialog: the inert frame is what keeps assistive technology inside it, so keep the page's content\n inside the frame's parts.\n- **A closed drawer and a collapsed column** are `visibility: hidden`, so their links are out of\n the Tab order and the accessibility tree before any script runs.\n- **The icon rail** keeps every name: labels are visually hidden, never removed, and icons are\n `aria-hidden`. Each tooltip adds no `aria-describedby` and is `aria-hidden` itself, so the name\n isn't read twice. It shows on keyboard focus as well as hover, stays while the pointer moves\n onto it, and Escape hides it (WCAG 1.4.13). A section's button in the rail reports\n `aria-expanded=\"false\"`, since the rail hides its list, and pressing it expands the column and\n opens the section.\n- **Reflow:** at 320 pixels wide the nav is a drawer, so nothing scrolls sideways (WCAG 1.4.10).\n- **Motion:** the drawer's slide, the backdrop's fade and the column's collapse don't play under\n `prefers-reduced-motion: reduce`.\n- **Forced colors:** the column keeps its divider, the drawer gets a border on its open edge in\n place of its shadow, and the burger keeps its bars, as a [`Navbar`](https://bestax.io/docs/api/components/navbar)'s\n does.\n- **Right to left:** the column sits on the right, and the drawer slides in from the right.",
|
|
42
46
|
"related": [
|
|
43
47
|
"Footer",
|
|
44
48
|
"Menu",
|
|
@@ -107,7 +111,7 @@
|
|
|
107
111
|
"name": "navCollapsed",
|
|
108
112
|
"type": "boolean",
|
|
109
113
|
"default": "false",
|
|
110
|
-
"description": "Whether the column is collapsed out of view,
|
|
114
|
+
"description": "Whether the column is collapsed, from the breakpoint up: out of view, or down to its icons with `AppFrame.Nav rail`. With it, the state is yours: update it from `onNavCollapsedChange`. It has no effect below the breakpoint, where the drawer always shows the whole nav.",
|
|
111
115
|
"required": false,
|
|
112
116
|
"inherited": false,
|
|
113
117
|
"deprecated": false
|
|
@@ -125,7 +129,7 @@
|
|
|
125
129
|
"name": "onNavCollapsedChange",
|
|
126
130
|
"type": "(collapsed: boolean) => void",
|
|
127
131
|
"default": null,
|
|
128
|
-
"description": "Called with the state asked for
|
|
132
|
+
"description": "Called with the state asked for: by the burger, `useAppFrame()`, or a `Menu.Section`'s button in the collapsed rail, which expands it.",
|
|
129
133
|
"required": false,
|
|
130
134
|
"inherited": false,
|
|
131
135
|
"deprecated": false
|
|
@@ -239,7 +243,7 @@
|
|
|
239
243
|
"name": "children",
|
|
240
244
|
"type": "React.ReactNode",
|
|
241
245
|
"default": null,
|
|
242
|
-
"description": "Usually a `Menu`. A nav taller than the window scrolls on its own. With `overlay`, the rest of the frame is inert while the drawer is open, so an overlay opened from the drawer, such as a `Modal`, goes inside the nav or renders outside the frame (Modal's `portal`). While the nav is a drawer, a popup opened in it, such as a Popover's `appendToBody` panel, portals into the nav, so it shows above the drawer, unless a `ConfigProvider` sets a `portalContainer`. In the column it portals to the end of the page, as it does anywhere else.",
|
|
246
|
+
"description": "Usually a `Menu`. A nav taller than the window scrolls on its own, except a column collapsed to a rail, which doesn't (see `rail`). With `overlay`, the rest of the frame is inert while the drawer is open, so an overlay opened from the drawer, such as a `Modal`, goes inside the nav or renders outside the frame (Modal's `portal`). While the nav is a drawer, a popup opened in it, such as a Popover's `appendToBody` panel, portals into the nav, so it shows above the drawer, unless a `ConfigProvider` sets a `portalContainer`. In the column it portals to the end of the page, as it does anywhere else.",
|
|
243
247
|
"required": false,
|
|
244
248
|
"inherited": false,
|
|
245
249
|
"deprecated": false
|
|
@@ -289,6 +293,15 @@
|
|
|
289
293
|
"inherited": false,
|
|
290
294
|
"deprecated": false
|
|
291
295
|
},
|
|
296
|
+
{
|
|
297
|
+
"name": "rail",
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"default": "false",
|
|
300
|
+
"description": "From the breakpoint up, a collapsed column shrinks to a rail of icons instead of leaving the page. The rail needs a `Menu` inside the nav: a Menu portaled out of it, such as one in a Popover or a Modal opened from it, isn't in the rail, nor is a `Menu.List` with no Menu around it, and a development build warns when a collapsed rail holds no Menu. Every top-level `Menu.Item` and `Menu.Section` needs an `icon`: in the rail, an item without one has nothing to show and its label spills over the page, and a section's button is blank, so a development build warns about one without. In the rail their labels are visually hidden, so each stays its link's or button's name, and shows in a `Tooltip` beside the rail on hover and keyboard focus. Nested lists and `Menu.Label` headings hide there, and a section's button expands the column and opens the section. Anything else in the nav keeps its own width, so hide it while the nav has the `is-rail` class. Collapsed to the rail, the column doesn't scroll on its own, so a tooltip isn't clipped. It sticks under the header while it fits there. A rail taller than the window under the header scrolls with the page instead, so its lower icons come into view as the page scrolls and as Tab reaches them. That takes a measurement in the browser, so before the page hydrates such a rail sticks.",
|
|
301
|
+
"required": false,
|
|
302
|
+
"inherited": false,
|
|
303
|
+
"deprecated": false
|
|
304
|
+
},
|
|
292
305
|
{
|
|
293
306
|
"name": "className",
|
|
294
307
|
"type": "string",
|
|
@@ -507,7 +520,7 @@
|
|
|
507
520
|
},
|
|
508
521
|
{
|
|
509
522
|
"name": "aria-label",
|
|
510
|
-
"type": "
|
|
523
|
+
"type": "React.AriaAttributes['aria-label']",
|
|
511
524
|
"default": "'menu'",
|
|
512
525
|
"description": "Accessible name. Pass your own to replace it. An empty one, or a spread carrying `'aria-label': undefined`, keeps the default rather than leaving the button unnamed.",
|
|
513
526
|
"required": false,
|
|
@@ -567,6 +580,12 @@
|
|
|
567
580
|
"default": "16rem",
|
|
568
581
|
"scope": "root"
|
|
569
582
|
},
|
|
583
|
+
{
|
|
584
|
+
"css": "--bulma-app-frame-nav-rail-width",
|
|
585
|
+
"sass": "$app-frame-nav-rail-width",
|
|
586
|
+
"default": "4rem",
|
|
587
|
+
"scope": "root"
|
|
588
|
+
},
|
|
570
589
|
{
|
|
571
590
|
"css": "--bulma-app-frame-nav-padding",
|
|
572
591
|
"sass": "$app-frame-nav-padding",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"name": "isLight",
|
|
153
153
|
"type": "boolean",
|
|
154
154
|
"default": "false",
|
|
155
|
-
"description": "Applies a
|
|
155
|
+
"description": "Applies the light variant of a colored button, such as `primary`'s. Bulma gives the grayscale colors none, so with no `color`, or with `white` or `black`, `isLight` gives the light button, as `color=\"light\"` does, and `light` or `dark` with `isLight` looks the same as without it.",
|
|
156
156
|
"required": false,
|
|
157
157
|
"inherited": false,
|
|
158
158
|
"deprecated": false
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"name": "isLight",
|
|
176
176
|
"type": "boolean",
|
|
177
177
|
"default": "false",
|
|
178
|
-
"description": "Applies a
|
|
178
|
+
"description": "Applies the light variant of a colored button, such as `primary`'s. Bulma gives the grayscale colors none, so with no `color`, or with `white` or `black`, `isLight` gives the light button, as `color=\"light\"` does, and `light` or `dark` with `isLight` looks the same as without it.",
|
|
179
179
|
"required": false,
|
|
180
180
|
"inherited": false,
|
|
181
181
|
"deprecated": false
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
"name": "isLight",
|
|
738
738
|
"type": "boolean",
|
|
739
739
|
"default": "false",
|
|
740
|
-
"description": "Applies a
|
|
740
|
+
"description": "Applies the light variant of a colored button, such as `primary`'s. Bulma gives the grayscale colors none, so with no `color`, or with `white` or `black`, `isLight` gives the light button, as `color=\"light\"` does, and `light` or `dark` with `isLight` looks the same as without it.",
|
|
741
741
|
"required": false,
|
|
742
742
|
"inherited": true,
|
|
743
743
|
"deprecated": false
|
|
@@ -967,7 +967,7 @@
|
|
|
967
967
|
"name": "isLight",
|
|
968
968
|
"type": "boolean",
|
|
969
969
|
"default": "false",
|
|
970
|
-
"description": "Applies a
|
|
970
|
+
"description": "Applies the light variant of a colored button, such as `primary`'s. Bulma gives the grayscale colors none, so with no `color`, or with `white` or `black`, `isLight` gives the light button, as `color=\"light\"` does, and `light` or `dark` with `isLight` looks the same as without it.",
|
|
971
971
|
"required": false,
|
|
972
972
|
"inherited": true,
|
|
973
973
|
"deprecated": false
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"examples": [
|
|
8
8
|
{
|
|
9
9
|
"title": "Default Card (Header, Image, Content, Footer)",
|
|
10
|
-
"code": "<Card\n header=\"Card Header\"\n image=\"
|
|
10
|
+
"code": "<Card\n header=\"Card Header\"\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n footer={[\n <Card.FooterItem key=\"save\">Save</Card.FooterItem>,\n <Card.FooterItem key=\"cancel\">Cancel</Card.FooterItem>,\n ]}\n>\n Card content goes here.\n</Card>"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"title": "With Header Only",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"title": "With Image Only",
|
|
22
|
-
"code": "<Card\n image=\"
|
|
22
|
+
"code": "<Card\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n/>"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"title": "With Image and Content",
|
|
26
|
-
"code": "<Card\n image=\"
|
|
26
|
+
"code": "<Card\n image=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n imageAlt=\"Vibrant galaxy with purple and gold tones\"\n>\n Quando in rerum natura cursu fit ut populus aliquis inter nationes terrae...\n</Card>"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "No Shadow",
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Interactive (Colors, Spacing, Alignment, Footer)",
|
|
42
|
-
"code": "<Card\n header=\"Upgrade to Pro\"\n headerIcon={\n <button className=\"card-header-icon\">\n <Icon library=\"fa\" name=\"bolt\" textColor=\"warning\" ariaLabel=\"Pro\" />\n </button>\n }\n image=\"
|
|
42
|
+
"code": "<Card\n header=\"Upgrade to Pro\"\n headerIcon={\n <button className=\"card-header-icon\">\n <Icon library=\"fa\" name=\"bolt\" textColor=\"warning\" ariaLabel=\"Pro\" />\n </button>\n }\n image=\"/img/carousel/carousel-banner-3-4by3.jpg\"\n imageAlt=\"Starry night sky over mountain silhouettes\"\n m=\"3\"\n textAlign=\"centered\"\n hasShadow\n footer={[\n <Button key=\"upgrade\" color=\"success\">\n Upgrade Now\n </Button>,\n <Button key=\"learn\" color=\"info\" isOutlined>\n Learn More\n </Button>,\n ]}\n>\n Unlock advanced analytics, priority support, and unlimited exports for your\n team.\n</Card>"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Compound (dot-notation) usage › Complete Card with Compound Components",
|
|
46
|
-
"code": "import { Icon, Image } from '@allxsmith/bestax-bulma';\n\n<Card>\n <Card.Header>\n <Card.Header.Title>Compound Component Card</Card.Header.Title>\n <Card.Header.Icon aria-label=\"more options\">\n <Icon name=\"angle-down\" variant=\"solid\" ariaLabel=\"expand\" />\n </Card.Header.Icon>\n </Card.Header>\n <Card.Image>\n <Image\n src=\"
|
|
46
|
+
"code": "import { Icon, Image } from '@allxsmith/bestax-bulma';\n\n<Card>\n <Card.Header>\n <Card.Header.Title>Compound Component Card</Card.Header.Title>\n <Card.Header.Icon aria-label=\"more options\">\n <Icon name=\"angle-down\" variant=\"solid\" ariaLabel=\"expand\" />\n </Card.Header.Icon>\n </Card.Header>\n <Card.Image>\n <Image\n src=\"/img/carousel/carousel-banner-1-4by3.jpg\"\n alt=\"Vibrant galaxy with purple and gold tones\"\n size=\"4by3\"\n />\n </Card.Image>\n <Card.Content>\n <Content>\n This card is built using compound components for maximum flexibility.\n </Content>\n </Card.Content>\n <Card.Footer>\n <Card.FooterItem>\n <Button color=\"primary\">Save</Button>\n </Card.FooterItem>\n <Card.FooterItem>\n <Button>Cancel</Button>\n </Card.FooterItem>\n </Card.Footer>\n</Card>;"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Compound (dot-notation) usage › Minimal Compound Card",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"code": "<Card>\n <Card.Header>\n <Card.Header.Title as=\"p\">Component</Card.Header.Title>\n </Card.Header>\n <Card.Content>Card content goes here.</Card.Content>\n <Card.Footer>\n <Card.FooterItem as=\"a\" href=\"#save\">\n Save\n </Card.FooterItem>\n <Card.FooterItem as=\"a\" href=\"#edit\">\n Edit\n </Card.FooterItem>\n </Card.Footer>\n</Card>"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
|
-
"accessibility": "-
|
|
65
|
+
"accessibility": "- **Image alternate text:** An image URL passed as `image` renders an `<img>` whose `alt` is `imageAlt`. Describe what the picture shows, or pass `imageAlt=\"\"` for a decorative image so screen readers skip it. Without `imageAlt`, the `alt` is \"Card image\", which tells a screen reader nothing about the picture. An image you render yourself, as a node in `image` or inside `Card.Image`, takes its own `alt`, and `imageAlt` doesn't reach it.\n- Use semantic content for the header, body, and footer as needed.",
|
|
66
66
|
"related": ["Icon", "Image", "useBulmaClasses"],
|
|
67
67
|
"storybook": "https://bestax.io/storybook/?path=/story/components-card--default",
|
|
68
68
|
"summary": "The `Card` component renders a Bulma-styled card with optional header, image, content, and footer.",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"name": "image",
|
|
163
163
|
"type": "React.ReactNode | string",
|
|
164
164
|
"default": null,
|
|
165
|
-
"description": "Card image node or image src string.",
|
|
165
|
+
"description": "Card image node or image src string. An image URL renders an `<img>` whose alternate text is `imageAlt`, or \"Card image\" without it.",
|
|
166
166
|
"required": false,
|
|
167
167
|
"inherited": false,
|
|
168
168
|
"deprecated": false
|
|
@@ -170,8 +170,8 @@
|
|
|
170
170
|
{
|
|
171
171
|
"name": "imageAlt",
|
|
172
172
|
"type": "string",
|
|
173
|
-
"default":
|
|
174
|
-
"description": "Alternate text for the
|
|
173
|
+
"default": "'Card image'",
|
|
174
|
+
"description": "Alternate text for the `<img>` an image URL renders. Describe what the picture shows, or pass `\"\"` for a decorative one so screen readers skip it. Without it, the image's alternate text is \"Card image\", which tells a screen reader nothing about the picture. A node passed as `image` takes its own `alt`, and `imageAlt` doesn't reach it.",
|
|
175
175
|
"required": false,
|
|
176
176
|
"inherited": false,
|
|
177
177
|
"deprecated": false
|
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
},
|
|
213
213
|
{
|
|
214
214
|
"name": "id",
|
|
215
|
-
"type": "
|
|
215
|
+
"type": "React.HTMLAttributes<HTMLElement>['id']",
|
|
216
216
|
"default": null,
|
|
217
217
|
"description": "The field's `id`, with `data`, which the label then points at, and so can a label of your own. Built from parts, it lands on `div.combobox`, so give `Combobox.Input` the `id` instead.",
|
|
218
218
|
"required": false,
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
"name": "aria-label",
|
|
224
|
-
"type": "
|
|
224
|
+
"type": "React.AriaAttributes['aria-label']",
|
|
225
225
|
"default": null,
|
|
226
226
|
"description": "Names the field and the list, with `data`, in place of a `label`. Built from parts, it lands on `div.combobox`, so put it on `Combobox.Input`.",
|
|
227
227
|
"required": false,
|
|
@@ -230,7 +230,7 @@
|
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"name": "aria-labelledby",
|
|
233
|
-
"type": "
|
|
233
|
+
"type": "React.AriaAttributes['aria-labelledby']",
|
|
234
234
|
"default": null,
|
|
235
235
|
"description": "The ids of what names the field and the list, with `data`, in place of a `label`. Built from parts, it lands on `div.combobox`, so put it on `Combobox.Input`.",
|
|
236
236
|
"required": false,
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"name": "isLight",
|
|
149
149
|
"type": "boolean",
|
|
150
150
|
"default": "false",
|
|
151
|
-
"description": "Applies a
|
|
151
|
+
"description": "Applies the light variant of a colored button, such as `primary`'s. Bulma gives the grayscale colors none, so with no `color`, or with `white` or `black`, `isLight` gives the light button, as `color=\"light\"` does, and `light` or `dark` with `isLight` looks the same as without it.",
|
|
152
152
|
"required": false,
|
|
153
153
|
"inherited": true,
|
|
154
154
|
"deprecated": false
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"name": "loading",
|
|
200
200
|
"type": "boolean",
|
|
201
201
|
"default": "false",
|
|
202
|
-
"description": "Shows a page of skeleton rows under the header in place of the rows, and marks the table busy. For data on its way, as from a server with `manual`. A skeleton row is as tall as a row of one line of text, so rows of text replace it without the table changing height.",
|
|
202
|
+
"description": "Shows a page of skeleton rows under the header in place of the rows, and marks the table busy. For data on its way, as from a server with `manual`. A skeleton row is as tall as a row of one line of text, so rows of text replace it without the table changing height, and each of its lines sits where its column's `align` puts the value.",
|
|
203
203
|
"required": false,
|
|
204
204
|
"inherited": false,
|
|
205
205
|
"deprecated": false
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
"code": "function example() {\n return (\n <Field\n horizontal\n label=\"Date\"\n labelProps={{ htmlFor: 'date-field-control' }}\n >\n <Field.Body>\n <Field>\n <Control iconLeftName=\"calendar-alt\">\n <DateInput id=\"date-field-control\" placeholder=\"YYYY-MM-DD\" />\n </Control>\n </Field>\n </Field.Body>\n </Field>\n );\n}"
|
|
179
179
|
}
|
|
180
180
|
],
|
|
181
|
-
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date, month or year.\n- Closing the popover with `Escape` or a pick returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Dismissing without a pick commits nothing: an empty field stays empty, and leaving afterwards commits only what you typed.\n- Calendar uses `role=\"grid\"` with cells as `role=\"gridcell\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today's day, month and year get it once the page hydrates, so the reader's clock decides which.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid or year list and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` on the grid or year list it picks from, and keeps its tab stop and keys.\n- Roving `tabindex` keeps a single grid cell focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- The month grid is a `role=\"grid\"` of `role=\"row\"`s, labelled by the year in its header. Each month cell carries the full month name as its accessible name, `aria-current=\"date\"` for this month and `aria-disabled` for a month with no selectable day.\n- The year list is a `role=\"listbox\"
|
|
181
|
+
"accessibility": "- Trigger uses `role=\"combobox\"` with `aria-haspopup=\"dialog\"`, `aria-expanded`, and `aria-controls`.\n- Popover panel has `role=\"dialog\"` with an accessible name. Opening it puts focus on the focused date, month or year.\n- Closing the popover with `Escape` or a pick returns focus to the input, whether the input or the launcher opened it. Under `openOnFocus` that returning focus leaves the popover closed; focusing or clicking the input again opens it. Dismissing without a pick commits nothing: an empty field stays empty, and leaving afterwards commits only what you typed.\n- Calendar uses `role=\"grid\"` with cells as `role=\"gridcell\"`. Its first row holds the weekday names as `role=\"columnheader\"`s, each named by the full weekday in the picker's locale, so a screen reader can name the weekday as focus moves to another column. A server-rendered calendar adds those full names once the page hydrates, and with `dayNames` the columns are named by the names you give instead. Each day keeps its number as its name.\n- Cells expose `aria-selected`, `aria-disabled`, and `aria-current=\"date\"` for today. On a server-rendered page, today's day, month and year get it once the page hydrates, so the reader's clock decides which.\n- A `disabled` inline calendar puts `aria-disabled=\"true\"` on its grid or year list and disables every button in it. A `readOnly` one puts `aria-readonly=\"true\"` on the grid or year list it picks from, and keeps its tab stop and keys.\n- Roving `tabindex` keeps a single grid cell focusable at a time, and focus moves with it, inline as in the popover. When the focused date is disabled, that cell is the nearest enabled day of the month.\n- The month grid is a `role=\"grid\"` of `role=\"row\"`s, labelled by the year in its header. Each month cell carries the full month name as its accessible name, `aria-current=\"date\"` for this month and `aria-disabled` for a month with no selectable day.\n- The year list is a `role=\"listbox\"`, named by the `chooseYear` label where it is the selection surface and by the heading that opens it otherwise. As the selection surface its options take `aria-selected` from the value's year rather than from focus, which roves through the list. When the focused year is disabled, the nearest enabled year takes the tab stop, so `Tab` still reaches the list.\n- The launcher and popover are named \"Choose month\" or \"Choose year\" to match the granularity; override them, and the month grid's \"Previous year\" / \"Next year\" buttons, through `labels` (`chooseMonth`, `chooseYear`, `prevYear`, `nextYear`).\n- Honors `prefers-reduced-motion` (skip popover fade-in).\n- On a right-to-left page the launcher sits at the end of the line and the calendar icon at the start, and the previous-month chevron points right. The month names follow the page.",
|
|
182
182
|
"related": ["DateTimeInput", "Input", "TimeInput"],
|
|
183
183
|
"storybook": "https://bestax.io/storybook/?path=/story/form-dateinput",
|
|
184
184
|
"summary": "The `DateInput` component is a form input that opens a popover calendar for date selection.",
|
|
@@ -483,7 +483,7 @@
|
|
|
483
483
|
"name": "locale",
|
|
484
484
|
"type": "string",
|
|
485
485
|
"default": null,
|
|
486
|
-
"description": "BCP-47 locale tag for day/month names and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale. On a server render that is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
486
|
+
"description": "BCP-47 locale tag for day/month names, the digits the calendar numbers its days and years in, and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale and the calendar numbers its days and years in plain digits. On a server render that locale is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
487
487
|
"required": false,
|
|
488
488
|
"inherited": true,
|
|
489
489
|
"deprecated": false
|
|
@@ -627,7 +627,7 @@
|
|
|
627
627
|
"name": "monthNames",
|
|
628
628
|
"type": "string[]",
|
|
629
629
|
"default": null,
|
|
630
|
-
"description": "Override the 12 month-name labels.",
|
|
630
|
+
"description": "Override the 12 month-name labels. With them the day grid's heading reads the name, a space and the year, whatever order the locale writes a month and its year in.",
|
|
631
631
|
"required": false,
|
|
632
632
|
"inherited": true,
|
|
633
633
|
"deprecated": false
|
|
@@ -846,7 +846,7 @@
|
|
|
846
846
|
"name": "locale",
|
|
847
847
|
"type": "string",
|
|
848
848
|
"default": null,
|
|
849
|
-
"description": "BCP-47 locale tag for day/month names and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale. On a server render that is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
849
|
+
"description": "BCP-47 locale tag for day/month names, the digits the calendar numbers its days and years in, and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale and the calendar numbers its days and years in plain digits. On a server render that locale is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
850
850
|
"required": false,
|
|
851
851
|
"inherited": false,
|
|
852
852
|
"deprecated": false
|
|
@@ -990,7 +990,7 @@
|
|
|
990
990
|
"name": "monthNames",
|
|
991
991
|
"type": "string[]",
|
|
992
992
|
"default": null,
|
|
993
|
-
"description": "Override the 12 month-name labels.",
|
|
993
|
+
"description": "Override the 12 month-name labels. With them the day grid's heading reads the name, a space and the year, whatever order the locale writes a month and its year in.",
|
|
994
994
|
"required": false,
|
|
995
995
|
"inherited": false,
|
|
996
996
|
"deprecated": false
|
|
@@ -342,7 +342,7 @@
|
|
|
342
342
|
"name": "locale",
|
|
343
343
|
"type": "string",
|
|
344
344
|
"default": null,
|
|
345
|
-
"description": "BCP-47 locale tag for day/month names and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale. On a server render that is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
345
|
+
"description": "BCP-47 locale tag for day/month names, the digits the calendar numbers its days and years in, and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale and the calendar numbers its days and years in plain digits. On a server render that locale is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
346
346
|
"required": false,
|
|
347
347
|
"inherited": true,
|
|
348
348
|
"deprecated": false
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
"name": "monthNames",
|
|
496
496
|
"type": "string[]",
|
|
497
497
|
"default": null,
|
|
498
|
-
"description": "Override the 12 month-name labels.",
|
|
498
|
+
"description": "Override the 12 month-name labels. With them the day grid's heading reads the name, a space and the year, whatever order the locale writes a month and its year in.",
|
|
499
499
|
"required": false,
|
|
500
500
|
"inherited": true,
|
|
501
501
|
"deprecated": false
|
|
@@ -583,7 +583,7 @@
|
|
|
583
583
|
},
|
|
584
584
|
{
|
|
585
585
|
"name": "id",
|
|
586
|
-
"type": "
|
|
586
|
+
"type": "React.HTMLAttributes<HTMLElement>['id']",
|
|
587
587
|
"default": null,
|
|
588
588
|
"description": "Id of the start input. The end input takes `${id}-end`.",
|
|
589
589
|
"required": false,
|
|
@@ -732,7 +732,7 @@
|
|
|
732
732
|
"name": "locale",
|
|
733
733
|
"type": "string",
|
|
734
734
|
"default": null,
|
|
735
|
-
"description": "BCP-47 locale tag for day/month names and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale. On a server render that is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
735
|
+
"description": "BCP-47 locale tag for day/month names, the digits the calendar numbers its days and years in, and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale and the calendar numbers its days and years in plain digits. On a server render that locale is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
736
736
|
"required": false,
|
|
737
737
|
"inherited": false,
|
|
738
738
|
"deprecated": false
|
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
"name": "monthNames",
|
|
886
886
|
"type": "string[]",
|
|
887
887
|
"default": null,
|
|
888
|
-
"description": "Override the 12 month-name labels.",
|
|
888
|
+
"description": "Override the 12 month-name labels. With them the day grid's heading reads the name, a space and the year, whatever order the locale writes a month and its year in.",
|
|
889
889
|
"required": false,
|
|
890
890
|
"inherited": false,
|
|
891
891
|
"deprecated": false
|
|
@@ -982,7 +982,7 @@
|
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
984
|
"name": "id",
|
|
985
|
-
"type": "
|
|
985
|
+
"type": "React.HTMLAttributes<HTMLElement>['id']",
|
|
986
986
|
"default": null,
|
|
987
987
|
"description": "Id of the start input. The end input takes `${id}-end`.",
|
|
988
988
|
"required": false,
|
|
@@ -466,7 +466,7 @@
|
|
|
466
466
|
"name": "locale",
|
|
467
467
|
"type": "string",
|
|
468
468
|
"default": null,
|
|
469
|
-
"description": "BCP-47 locale tag for day/month names and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale. On a server render that is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
469
|
+
"description": "BCP-47 locale tag for day/month names, the digits the calendar numbers its days and years in, and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale and the calendar numbers its days and years in plain digits. On a server render that locale is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
470
470
|
"required": false,
|
|
471
471
|
"inherited": true,
|
|
472
472
|
"deprecated": false
|
|
@@ -610,7 +610,7 @@
|
|
|
610
610
|
"name": "monthNames",
|
|
611
611
|
"type": "string[]",
|
|
612
612
|
"default": null,
|
|
613
|
-
"description": "Override the 12 month-name labels.",
|
|
613
|
+
"description": "Override the 12 month-name labels. With them the day grid's heading reads the name, a space and the year, whatever order the locale writes a month and its year in.",
|
|
614
614
|
"required": false,
|
|
615
615
|
"inherited": true,
|
|
616
616
|
"deprecated": false
|
|
@@ -892,7 +892,7 @@
|
|
|
892
892
|
"name": "locale",
|
|
893
893
|
"type": "string",
|
|
894
894
|
"default": null,
|
|
895
|
-
"description": "BCP-47 locale tag for day/month names and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale. On a server render that is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
895
|
+
"description": "BCP-47 locale tag for day/month names, the digits the calendar numbers its days and years in, and Intl formatting. Unset, it is the `locale` of a `LocaleProvider` around the picker, and with neither, `Intl` uses the runtime's own locale and the calendar numbers its days and years in plain digits. On a server render that locale is the server's, so an `inline` calendar rendered there names its days in the server's language and the browser's own render names them in the browser's: give it a locale, here or through a `LocaleProvider`, where the two can differ.",
|
|
896
896
|
"required": false,
|
|
897
897
|
"inherited": false,
|
|
898
898
|
"deprecated": false
|
|
@@ -1036,7 +1036,7 @@
|
|
|
1036
1036
|
"name": "monthNames",
|
|
1037
1037
|
"type": "string[]",
|
|
1038
1038
|
"default": null,
|
|
1039
|
-
"description": "Override the 12 month-name labels.",
|
|
1039
|
+
"description": "Override the 12 month-name labels. With them the day grid's heading reads the name, a space and the year, whatever order the locale writes a month and its year in.",
|
|
1040
1040
|
"required": false,
|
|
1041
1041
|
"inherited": false,
|
|
1042
1042
|
"deprecated": false
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"code": "<Dropdown label=\"Dropdown Menu\" active>\n <Dropdown.Item>First Item</Dropdown.Item>\n <Dropdown.Item>Second Item</Dropdown.Item>\n <Dropdown.Divider />\n <Dropdown.Item>Third Item</Dropdown.Item>\n</Dropdown>"
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
|
-
"accessibility": "- The trigger is a `<button>` with `aria-haspopup=\"true\"` and `aria-expanded`, and its\n `aria-controls` points at the menu, with or without an `id` on the Dropdown.\n- The menu is `role=\"menu\"`, and `aria-labelledby` names it after the trigger, so a screen\n reader moving into it hears the trigger's label. That makes the `label` the menu's name too,\n so a trigger that shows only an icon needs text a screen reader can read, as in the\n [split button](https://bestax.io/docs/api/components/dropdown#split-button).\n- Each item is `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or\n `role=\"menuitemradio\"` stays in the arrow-key order.\n- A click between items, on a divider say, focuses the menu itself, so the arrow keys still\n reach the items from there.\n- `Dropdown.Item as=\"button\"` defaults to `type=\"button\"`, so a menu item inside a form doesn't\n submit it. Pass `type=\"submit\"` or `type=\"reset\"` and yours is used instead; any other value\n renders `type=\"button\"`.\n- Pressing outside an open menu closes it.\n\nThe keyboard follows the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).\nUnlike the pattern's menu items, each item is also a tab stop, so <kbd>Tab</kbd> from the\ntrigger of a `hoverable` menu the pointer holds open goes through its items.\n\n- On the trigger: <kbd>ArrowDown</kbd> or <kbd>Enter</kbd>/<kbd>Space</kbd> open the menu and\n focus the first item; <kbd>ArrowUp</kbd> opens the menu and focuses the last item;\n <kbd>Escape</kbd> closes an open menu. On the trigger of a menu that's already open,\n <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> focus the first/last item and\n <kbd>Enter</kbd>/<kbd>Space</kbd> close it.\n- Inside the menu: <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> move between items and wrap around;\n <kbd>Home</kbd>/<kbd>End</kbd> jump to the first/last item; <kbd>Escape</kbd> closes the menu\n and returns focus to the trigger.\n- <kbd>Tab</kbd> in an open menu closes it and moves focus to the next tab stop after the\n Dropdown, and <kbd>Shift</kbd>+<kbd>Tab</kbd> closes it and focuses the trigger. Inside a\n focus trap, such as a `Modal`'s, a Dropdown with nothing after it sends Tab to the trap's\n first stop, as Tab from the trap's last stop does.\n- Typing a letter moves to the next item whose text starts with it, and typing it again cycles\n through the items that do. Letters typed in quick succession add up to one search, so\n <kbd>d</kbd> then <kbd>u</kbd> lands on \"Duplicate\" past \"Download\". Text hidden with\n `aria-hidden`, such as an icon's ligature name, doesn't count, and a new search starts each\n time the menu opens. Typing searches once focus is in the menu, where the trigger's keys\n above put it. A letter typed on the trigger itself does nothing.\n- On an item: <kbd>Enter</kbd> or <kbd>Space</kbd> activates it the way a click does, so its\n `onClick` runs and the menu closes unless `closeOnClick` is `false`. That includes the\n default anchor without an `href` and `as=\"div\"`, which the browser would not activate on\n its own. Holding the key down runs it once.\n- When running an item closes the menu, by click or by key, focus goes back to the trigger,\n as it does for <kbd>Escape</kbd>. An item whose `onClick` moves focus somewhere else keeps\n it there.\n- Disabled items (a `Dropdown.Item` rendered with a native `disabled` attribute or\n `aria-disabled=\"true\"`) and dividers are skipped by the arrow keys and by typing.\n- For a panel built around fields, [`Popover`](https://bestax.io/docs/api/components/popover) fits better: `role=\"menu\"` owns\n menu items, and the default `closeOnClick` shuts the menu on a click anywhere in it, a field\n included. Anything focusable you put in the menu anyway that isn't an item (a field, a\n button, a checkbox, a link without a menu-item role) keeps its own keys, so its arrows,\n <kbd>Home</kbd>, <kbd>End</kbd> and letters don't move to the items. A field needs\n `closeOnClick={false}`, or a click into it closes the menu. <kbd>Escape</kbd> and\n <kbd>Tab</kbd> still close the menu from any of them, except an <kbd>Escape</kbd> the\n control used itself by calling `preventDefault()` in its `onKeyDown`, such as an Autocomplete\n closing its list or a date picker closing its calendar.\n The next <kbd>Escape</kbd> closes the menu.",
|
|
45
|
+
"accessibility": "- The trigger is a `<button>` with `aria-haspopup=\"true\"` and `aria-expanded`, and its\n `aria-controls` points at the menu, with or without an `id` on the Dropdown.\n- The menu is `role=\"menu\"`, and `aria-labelledby` names it after the trigger, so a screen\n reader moving into it hears the trigger's label. That makes the `label` the menu's name too,\n so a trigger that shows only an icon needs text a screen reader can read, as in the\n [split button](https://bestax.io/docs/api/components/dropdown#split-button).\n- Each item is `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or\n `role=\"menuitemradio\"` stays in the arrow-key order.\n- A click between items, on a divider say, focuses the menu itself, so the arrow keys still\n reach the items from there.\n- `Dropdown.Item as=\"button\"` defaults to `type=\"button\"`, so a menu item inside a form doesn't\n submit it. Pass `type=\"submit\"` or `type=\"reset\"` and yours is used instead; any other value\n renders `type=\"button\"`.\n- Pressing outside an open menu closes it.\n- A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's\n browse mode can send when you activate the trigger, opens the menu and focuses its first enabled\n item, as <kbd>Enter</kbd> does. A pointer's click on the trigger, and a script's `click()`, open\n it and move no focus into it.\n\nThe keyboard follows the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).\nUnlike the pattern's menu items, each item is also a tab stop, so <kbd>Tab</kbd> from the\ntrigger of a `hoverable` menu the pointer holds open goes through its items.\n\n- On the trigger: <kbd>ArrowDown</kbd> or <kbd>Enter</kbd>/<kbd>Space</kbd> open the menu and\n focus the first item; <kbd>ArrowUp</kbd> opens the menu and focuses the last item;\n <kbd>Escape</kbd> closes an open menu. On the trigger of a menu that's already open,\n <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> focus the first/last item and\n <kbd>Enter</kbd>/<kbd>Space</kbd> close it.\n- Inside the menu: <kbd>ArrowDown</kbd>/<kbd>ArrowUp</kbd> move between items and wrap around;\n <kbd>Home</kbd>/<kbd>End</kbd> jump to the first/last item; <kbd>Escape</kbd> closes the menu\n and returns focus to the trigger.\n- <kbd>Tab</kbd> in an open menu closes it and moves focus to the next tab stop after the\n Dropdown, and <kbd>Shift</kbd>+<kbd>Tab</kbd> closes it and focuses the trigger. Inside a\n focus trap, such as a `Modal`'s, a Dropdown with nothing after it sends Tab to the trap's\n first stop, as Tab from the trap's last stop does.\n- Typing a letter moves to the next item whose text starts with it, and typing it again cycles\n through the items that do. Letters typed in quick succession add up to one search, so\n <kbd>d</kbd> then <kbd>u</kbd> lands on \"Duplicate\" past \"Download\". Text hidden with\n `aria-hidden`, such as an icon's ligature name, doesn't count, and a new search starts each\n time the menu opens. Typing searches once focus is in the menu, where the trigger's keys\n above put it. A letter typed on the trigger itself does nothing.\n- On an item: <kbd>Enter</kbd> or <kbd>Space</kbd> activates it the way a click does, so its\n `onClick` runs and the menu closes unless `closeOnClick` is `false`. That includes the\n default anchor without an `href` and `as=\"div\"`, which the browser would not activate on\n its own. Holding the key down runs it once.\n- When running an item closes the menu, by click or by key, focus goes back to the trigger,\n as it does for <kbd>Escape</kbd>. An item whose `onClick` moves focus somewhere else keeps\n it there.\n- Disabled items (a `Dropdown.Item` rendered with a native `disabled` attribute or\n `aria-disabled=\"true\"`) and dividers are skipped by the arrow keys and by typing.\n- For a panel built around fields, [`Popover`](https://bestax.io/docs/api/components/popover) fits better: `role=\"menu\"` owns\n menu items, and the default `closeOnClick` shuts the menu on a click anywhere in it, a field\n included. Anything focusable you put in the menu anyway that isn't an item (a field, a\n button, a checkbox, a link without a menu-item role) keeps its own keys, so its arrows,\n <kbd>Home</kbd>, <kbd>End</kbd> and letters don't move to the items. A field needs\n `closeOnClick={false}`, or a click into it closes the menu. <kbd>Escape</kbd> and\n <kbd>Tab</kbd> still close the menu from any of them, except an <kbd>Escape</kbd> the\n control used itself by calling `preventDefault()` in its `onKeyDown`, such as an Autocomplete\n closing its list or a date picker closing its calendar.\n The next <kbd>Escape</kbd> closes the menu.",
|
|
46
46
|
"related": ["Button", "ContextMenu", "Popover", "useBulmaClasses"],
|
|
47
47
|
"storybook": "https://bestax.io/storybook/?path=/story/components-dropdown--default",
|
|
48
|
-
"summary": "The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI. Down, Enter and Space on the trigger open the menu on its first enabled item, and Up opens it on its last. On the trigger of a menu that's already open, Down and Up move focus to its first and last item. In the menu, the arrow keys, Home and End move between the items, and Enter and Space run the focused one the way a click does. Typing a letter moves to the next item whose text starts with it, skipping disabled ones, and letters typed in quick succession add up to one search. Typing searches once focus is in the menu, so a letter typed on the trigger does nothing. Escape closes the menu and focuses the trigger. Tab closes it and moves focus to the next tab stop after the Dropdown, wrapping inside a focus trap such as Modal's, and Shift+Tab closes it and focuses the trigger. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab, though an Escape it calls `preventDefault()` on in its own `onKeyDown` stays its own and leaves the menu open. For a panel built around fields, use `Popover`.",
|
|
48
|
+
"summary": "The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI. Down, Enter and Space on the trigger open the menu on its first enabled item, and Up opens it on its last. A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's browse mode can send, opens it on its first enabled item too. A pointer's click on the trigger, and a script's `click()`, move no focus into the menu. On the trigger of a menu that's already open, Down and Up move focus to its first and last item. In the menu, the arrow keys, Home and End move between the items, and Enter and Space run the focused one the way a click does. Typing a letter moves to the next item whose text starts with it, skipping disabled ones, and letters typed in quick succession add up to one search. Typing searches once focus is in the menu, so a letter typed on the trigger does nothing. Escape closes the menu and focuses the trigger. Tab closes it and moves focus to the next tab stop after the Dropdown, wrapping inside a focus trap such as Modal's, and Shift+Tab closes it and focuses the trigger. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab, though an Escape it calls `preventDefault()` on in its own `onKeyDown` stays its own and leaves the menu open. For a panel built around fields, use `Popover`.",
|
|
49
49
|
"import": "import { Dropdown, Button, Field, Control, Span } from '@allxsmith/bestax-bulma';",
|
|
50
50
|
"sourceFile": "bulma-ui/src/components/Dropdown.tsx",
|
|
51
51
|
"rootClass": "dropdown",
|
|
52
52
|
"parts": [
|
|
53
53
|
{
|
|
54
54
|
"path": "Dropdown",
|
|
55
|
-
"summary": "The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI. Down, Enter and Space on the trigger open the menu on its first enabled item, and Up opens it on its last. On the trigger of a menu that's already open, Down and Up move focus to its first and last item. In the menu, the arrow keys, Home and End move between the items, and Enter and Space run the focused one the way a click does. Typing a letter moves to the next item whose text starts with it, skipping disabled ones, and letters typed in quick succession add up to one search. Typing searches once focus is in the menu, so a letter typed on the trigger does nothing. Escape closes the menu and focuses the trigger. Tab closes it and moves focus to the next tab stop after the Dropdown, wrapping inside a focus trap such as Modal's, and Shift+Tab closes it and focuses the trigger. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab, though an Escape it calls `preventDefault()` on in its own `onKeyDown` stays its own and leaves the menu open. For a panel built around fields, use `Popover`.",
|
|
55
|
+
"summary": "The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI. Down, Enter and Space on the trigger open the menu on its first enabled item, and Up opens it on its last. A click the browser dispatches with no pointer behind it (`detail` 0), as a screen reader's browse mode can send, opens it on its first enabled item too. A pointer's click on the trigger, and a script's `click()`, move no focus into the menu. On the trigger of a menu that's already open, Down and Up move focus to its first and last item. In the menu, the arrow keys, Home and End move between the items, and Enter and Space run the focused one the way a click does. Typing a letter moves to the next item whose text starts with it, skipping disabled ones, and letters typed in quick succession add up to one search. Typing searches once focus is in the menu, so a letter typed on the trigger does nothing. Escape closes the menu and focuses the trigger. Tab closes it and moves focus to the next tab stop after the Dropdown, wrapping inside a focus trap such as Modal's, and Shift+Tab closes it and focuses the trigger. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab, though an Escape it calls `preventDefault()` on in its own `onKeyDown` stays its own and leaves the menu open. For a panel built around fields, use `Popover`.",
|
|
56
56
|
"component": null,
|
|
57
57
|
"props": [
|
|
58
58
|
{
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "id",
|
|
159
|
-
"type": "
|
|
159
|
+
"type": "React.HTMLAttributes<HTMLElement>['id']",
|
|
160
160
|
"default": null,
|
|
161
161
|
"description": "Root element ID. The trigger gets `<id>-trigger` and the menu `<id>-menu`, which the trigger's `aria-controls` and the menu's `aria-labelledby` point at. Without one, both ids come from `useId`.",
|
|
162
162
|
"required": false,
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"name": "isLight",
|
|
153
153
|
"type": "boolean",
|
|
154
154
|
"default": "false",
|
|
155
|
-
"description": "Applies a
|
|
155
|
+
"description": "Applies the light variant of a colored button, such as `primary`'s. Bulma gives the grayscale colors none, so with no `color`, or with `white` or `black`, `isLight` gives the light button, as `color=\"light\"` does, and `light` or `dark` with `isLight` looks the same as without it.",
|
|
156
156
|
"required": false,
|
|
157
157
|
"inherited": true,
|
|
158
158
|
"deprecated": false
|