bestax-mcp 1.14.7 → 1.14.8
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 +50 -50
- package/data/components/Buttons.json +148 -1
- package/data/components/Dropdown.json +3 -3
- package/data/components/ToggleButton.json +17 -296
- package/data/components/Tooltip.json +9 -9
- package/data/skills/bestax-custom-component/SKILL.md +3 -3
- package/data/skills/bestax-layout-scaffold/SKILL.md +2 -2
- 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.31.0"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -226,7 +226,7 @@
|
|
|
226
226
|
"slug": "elements/buttons",
|
|
227
227
|
"import": "import { Buttons } from '@allxsmith/bestax-bulma';",
|
|
228
228
|
"compound": true,
|
|
229
|
-
"propCount":
|
|
229
|
+
"propCount": 59,
|
|
230
230
|
"exampleCount": 8
|
|
231
231
|
},
|
|
232
232
|
{
|
|
@@ -1118,7 +1118,7 @@
|
|
|
1118
1118
|
"import": "import { ToggleButton } from '@allxsmith/bestax-bulma';",
|
|
1119
1119
|
"compound": false,
|
|
1120
1120
|
"propCount": 14,
|
|
1121
|
-
"exampleCount":
|
|
1121
|
+
"exampleCount": 12
|
|
1122
1122
|
},
|
|
1123
1123
|
{
|
|
1124
1124
|
"name": "Tooltip",
|
|
@@ -1260,52 +1260,52 @@
|
|
|
1260
1260
|
"--bulma-breadcrumb-item-padding-horizontal": ["Breadcrumb"],
|
|
1261
1261
|
"--bulma-breadcrumb-item-padding-vertical": ["Breadcrumb"],
|
|
1262
1262
|
"--bulma-breadcrumb-item-separator-color": ["Breadcrumb"],
|
|
1263
|
-
"--bulma-button-active-background-l-delta": ["Button"
|
|
1264
|
-
"--bulma-button-active-border-color": ["Button"
|
|
1265
|
-
"--bulma-button-active-border-l-delta": ["Button"
|
|
1266
|
-
"--bulma-button-active-color": ["Button"
|
|
1267
|
-
"--bulma-button-background-l": ["Button"
|
|
1268
|
-
"--bulma-button-background-l-delta": ["Button"
|
|
1269
|
-
"--bulma-button-border-color": ["Button"
|
|
1270
|
-
"--bulma-button-border-l": ["Button"
|
|
1271
|
-
"--bulma-button-border-l-delta": ["Button"
|
|
1272
|
-
"--bulma-button-border-style": ["Button"
|
|
1273
|
-
"--bulma-button-border-width": ["Button"
|
|
1274
|
-
"--bulma-button-color-l": ["Button"
|
|
1275
|
-
"--bulma-button-disabled-background-color": ["Button"
|
|
1276
|
-
"--bulma-button-disabled-border-color": ["Button"
|
|
1277
|
-
"--bulma-button-disabled-opacity": ["Button"
|
|
1278
|
-
"--bulma-button-disabled-shadow": ["Button"
|
|
1279
|
-
"--bulma-button-family": ["Button"
|
|
1280
|
-
"--bulma-button-focus-border-color": ["Button"
|
|
1281
|
-
"--bulma-button-focus-border-l-delta": ["Button"
|
|
1282
|
-
"--bulma-button-focus-box-shadow-color": ["Button"
|
|
1283
|
-
"--bulma-button-focus-box-shadow-size": ["Button"
|
|
1284
|
-
"--bulma-button-ghost-background": ["Button"
|
|
1285
|
-
"--bulma-button-ghost-border-color": ["Button"
|
|
1286
|
-
"--bulma-button-ghost-color": ["Button"
|
|
1287
|
-
"--bulma-button-ghost-decoration": ["Button"
|
|
1288
|
-
"--bulma-button-ghost-hover-color": ["Button"
|
|
1289
|
-
"--bulma-button-ghost-hover-decoration": ["Button"
|
|
1290
|
-
"--bulma-button-h": ["Button"
|
|
1291
|
-
"--bulma-button-hover-background-l-delta": ["Button"
|
|
1292
|
-
"--bulma-button-hover-border-l-delta": ["Button"
|
|
1293
|
-
"--bulma-button-l": ["Button"
|
|
1294
|
-
"--bulma-button-outer-shadow-a": ["Button"
|
|
1295
|
-
"--bulma-button-outer-shadow-h": ["Button"
|
|
1296
|
-
"--bulma-button-outer-shadow-l": ["Button"
|
|
1297
|
-
"--bulma-button-outer-shadow-s": ["Button"
|
|
1298
|
-
"--bulma-button-padding-horizontal": ["Button"
|
|
1299
|
-
"--bulma-button-padding-vertical": ["Button"
|
|
1300
|
-
"--bulma-button-s": ["Button"
|
|
1301
|
-
"--bulma-button-static-background-color": ["Button"
|
|
1302
|
-
"--bulma-button-static-border-color": ["Button"
|
|
1303
|
-
"--bulma-button-static-color": ["Button"
|
|
1304
|
-
"--bulma-button-text-color": ["Button"
|
|
1305
|
-
"--bulma-button-text-decoration": ["Button"
|
|
1306
|
-
"--bulma-button-text-hover-background-color": ["Button"
|
|
1307
|
-
"--bulma-button-text-hover-color": ["Button"
|
|
1308
|
-
"--bulma-button-weight": ["Button"
|
|
1263
|
+
"--bulma-button-active-background-l-delta": ["Button"],
|
|
1264
|
+
"--bulma-button-active-border-color": ["Button"],
|
|
1265
|
+
"--bulma-button-active-border-l-delta": ["Button"],
|
|
1266
|
+
"--bulma-button-active-color": ["Button"],
|
|
1267
|
+
"--bulma-button-background-l": ["Button"],
|
|
1268
|
+
"--bulma-button-background-l-delta": ["Button"],
|
|
1269
|
+
"--bulma-button-border-color": ["Button"],
|
|
1270
|
+
"--bulma-button-border-l": ["Button"],
|
|
1271
|
+
"--bulma-button-border-l-delta": ["Button"],
|
|
1272
|
+
"--bulma-button-border-style": ["Button"],
|
|
1273
|
+
"--bulma-button-border-width": ["Button"],
|
|
1274
|
+
"--bulma-button-color-l": ["Button"],
|
|
1275
|
+
"--bulma-button-disabled-background-color": ["Button"],
|
|
1276
|
+
"--bulma-button-disabled-border-color": ["Button"],
|
|
1277
|
+
"--bulma-button-disabled-opacity": ["Button"],
|
|
1278
|
+
"--bulma-button-disabled-shadow": ["Button"],
|
|
1279
|
+
"--bulma-button-family": ["Button"],
|
|
1280
|
+
"--bulma-button-focus-border-color": ["Button"],
|
|
1281
|
+
"--bulma-button-focus-border-l-delta": ["Button"],
|
|
1282
|
+
"--bulma-button-focus-box-shadow-color": ["Button"],
|
|
1283
|
+
"--bulma-button-focus-box-shadow-size": ["Button"],
|
|
1284
|
+
"--bulma-button-ghost-background": ["Button"],
|
|
1285
|
+
"--bulma-button-ghost-border-color": ["Button"],
|
|
1286
|
+
"--bulma-button-ghost-color": ["Button"],
|
|
1287
|
+
"--bulma-button-ghost-decoration": ["Button"],
|
|
1288
|
+
"--bulma-button-ghost-hover-color": ["Button"],
|
|
1289
|
+
"--bulma-button-ghost-hover-decoration": ["Button"],
|
|
1290
|
+
"--bulma-button-h": ["Button"],
|
|
1291
|
+
"--bulma-button-hover-background-l-delta": ["Button"],
|
|
1292
|
+
"--bulma-button-hover-border-l-delta": ["Button"],
|
|
1293
|
+
"--bulma-button-l": ["Button"],
|
|
1294
|
+
"--bulma-button-outer-shadow-a": ["Button"],
|
|
1295
|
+
"--bulma-button-outer-shadow-h": ["Button"],
|
|
1296
|
+
"--bulma-button-outer-shadow-l": ["Button"],
|
|
1297
|
+
"--bulma-button-outer-shadow-s": ["Button"],
|
|
1298
|
+
"--bulma-button-padding-horizontal": ["Button"],
|
|
1299
|
+
"--bulma-button-padding-vertical": ["Button"],
|
|
1300
|
+
"--bulma-button-s": ["Button"],
|
|
1301
|
+
"--bulma-button-static-background-color": ["Button"],
|
|
1302
|
+
"--bulma-button-static-border-color": ["Button"],
|
|
1303
|
+
"--bulma-button-static-color": ["Button"],
|
|
1304
|
+
"--bulma-button-text-color": ["Button"],
|
|
1305
|
+
"--bulma-button-text-decoration": ["Button"],
|
|
1306
|
+
"--bulma-button-text-hover-background-color": ["Button"],
|
|
1307
|
+
"--bulma-button-text-hover-color": ["Button"],
|
|
1308
|
+
"--bulma-button-weight": ["Button"],
|
|
1309
1309
|
"--bulma-card-background-color": ["Card"],
|
|
1310
1310
|
"--bulma-card-color": ["Card"],
|
|
1311
1311
|
"--bulma-card-content-background-color": ["Card"],
|
|
@@ -1912,7 +1912,7 @@
|
|
|
1912
1912
|
"--bulma-loading-cancel-hover-color": ["Loading"],
|
|
1913
1913
|
"--bulma-loading-cancel-radius": ["Loading"],
|
|
1914
1914
|
"--bulma-loading-cancel-size": ["Loading"],
|
|
1915
|
-
"--bulma-loading-color": ["Button"
|
|
1915
|
+
"--bulma-loading-color": ["Button"],
|
|
1916
1916
|
"--bulma-loading-content-gap": ["Loading"],
|
|
1917
1917
|
"--bulma-loading-icon-border-width": ["Loading"],
|
|
1918
1918
|
"--bulma-loading-icon-border-width-large": ["Loading"],
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Compound (dot-notation) usage",
|
|
38
|
-
"code": "<Buttons>\n
|
|
38
|
+
"code": "<>\n <Buttons>\n <Buttons.Button color=\"primary\">Save</Buttons.Button>\n <Buttons.Button>Cancel</Buttons.Button>\n <Buttons.LinkButton>Learn more</Buttons.LinkButton>\n </Buttons>\n <Buttons hasAddons role=\"group\" aria-label=\"Text style\">\n <Buttons.ToggleButton defaultPressed>Bold</Buttons.ToggleButton>\n <Buttons.ToggleButton>Italic</Buttons.ToggleButton>\n <Buttons.ToggleButton>Underline</Buttons.ToggleButton>\n </Buttons>\n</>"
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
"accessibility": "- Grouping buttons in a `<div class=\"buttons\">` has no negative impact on accessibility.\n- Ensure each `Button` has a clear label (text or `aria-label`).\n- For a set of toggles that each turn on and off on their own, use [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton) in `Buttons hasAddons`, and give the `Buttons` `role=\"group\"` and an `aria-label`. A set where only one can be on is a radio group, so use [`Radios`](https://bestax.io/docs/api/form/radios) for it.\n\n:::tip\nYou can use all Bulma helper props (spacing, color, alignment) with `Buttons` for even more control.\n:::",
|
|
@@ -508,6 +508,153 @@
|
|
|
508
508
|
],
|
|
509
509
|
"catchAll": "Remaining props of the element or component selected by as (default <button>) and Bulma helper props",
|
|
510
510
|
"types": []
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"path": "Buttons.ToggleButton",
|
|
514
|
+
"summary": "The `ToggleButton` component renders a button that stays pressed until it's pressed again, and says whether it's on through `aria-pressed`. It's always a `<button type=\"button\">`, so it never submits a form and carries no form value: a setting saved with a form is a `Checkbox` or a `Switch`. A set of toggles that each turn on and off on their own goes in `Buttons hasAddons` with `role=\"group\"` and an `aria-label`. A set where only one can be on is a radio group rather than a row of these: use `Radios`.",
|
|
515
|
+
"component": "ToggleButton",
|
|
516
|
+
"props": [
|
|
517
|
+
{
|
|
518
|
+
"name": "pressed",
|
|
519
|
+
"type": "boolean",
|
|
520
|
+
"default": null,
|
|
521
|
+
"description": "Whether it's pressed, when you hold the state. Setting it makes the toggle controlled: a click only calls `onPressedChange`, and nothing changes until you pass the new value. Pick this or `defaultPressed` for the button's lifetime.",
|
|
522
|
+
"required": false,
|
|
523
|
+
"inherited": false,
|
|
524
|
+
"deprecated": false
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"name": "defaultPressed",
|
|
528
|
+
"type": "boolean",
|
|
529
|
+
"default": "false",
|
|
530
|
+
"description": "Whether it starts pressed, when it holds its own state.",
|
|
531
|
+
"required": false,
|
|
532
|
+
"inherited": false,
|
|
533
|
+
"deprecated": false
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "onPressedChange",
|
|
537
|
+
"type": "(pressed: boolean) => void",
|
|
538
|
+
"default": null,
|
|
539
|
+
"description": "Called with the new state each time it's toggled, whether or not `pressed` is set. An `onClick` that calls `preventDefault()` stops the toggle, and this doesn't fire.",
|
|
540
|
+
"required": false,
|
|
541
|
+
"inherited": false,
|
|
542
|
+
"deprecated": false
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"name": "color",
|
|
546
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
547
|
+
"default": "'link'",
|
|
548
|
+
"description": "The fill while it's pressed. Not pressed, it's a plain button, so the fill is the difference people see. `white`, `light`, `dark` and `black` aren't offered, since in one theme or the other each fills about as light or dark as a plain button already is. Of the rest, a pale one such as `warning` changes less than the default `link`.",
|
|
549
|
+
"required": false,
|
|
550
|
+
"inherited": false,
|
|
551
|
+
"deprecated": false
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"name": "children",
|
|
555
|
+
"type": "React.ReactNode",
|
|
556
|
+
"default": null,
|
|
557
|
+
"description": "The label, which stays the same in both states: a screen reader announces whether it's pressed, so \"Mute\" stays \"Mute\". An icon can swap, but an icon-only toggle needs an `aria-label` that doesn't. A label that changes (\"Play\", then \"Pause\") belongs on a plain `Button`.",
|
|
558
|
+
"required": false,
|
|
559
|
+
"inherited": false,
|
|
560
|
+
"deprecated": false
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"name": "isLoading",
|
|
564
|
+
"type": "boolean",
|
|
565
|
+
"default": "false",
|
|
566
|
+
"description": "Shows Bulma's spinner in place of the label and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
567
|
+
"required": false,
|
|
568
|
+
"inherited": false,
|
|
569
|
+
"deprecated": false
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"name": "size",
|
|
573
|
+
"type": "'small' | 'normal' | 'medium' | 'large'",
|
|
574
|
+
"default": null,
|
|
575
|
+
"description": "Size of the button.",
|
|
576
|
+
"required": false,
|
|
577
|
+
"inherited": true,
|
|
578
|
+
"deprecated": false
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"name": "isRounded",
|
|
582
|
+
"type": "boolean",
|
|
583
|
+
"default": "false",
|
|
584
|
+
"description": "Makes the button rounded.",
|
|
585
|
+
"required": false,
|
|
586
|
+
"inherited": true,
|
|
587
|
+
"deprecated": false
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"name": "isFullwidth",
|
|
591
|
+
"type": "boolean",
|
|
592
|
+
"default": "false",
|
|
593
|
+
"description": "Makes the button full-width.",
|
|
594
|
+
"required": false,
|
|
595
|
+
"inherited": true,
|
|
596
|
+
"deprecated": false
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
"name": "isFullWidth",
|
|
600
|
+
"type": "boolean",
|
|
601
|
+
"default": "false",
|
|
602
|
+
"description": "Makes the button full-width.",
|
|
603
|
+
"required": false,
|
|
604
|
+
"inherited": true,
|
|
605
|
+
"deprecated": true,
|
|
606
|
+
"deprecationNote": "Use `isFullwidth` instead — `isFullwidth` wins if both are set."
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"name": "isFocused",
|
|
610
|
+
"type": "boolean",
|
|
611
|
+
"default": "false",
|
|
612
|
+
"description": "Applies focused styling (visual only).",
|
|
613
|
+
"required": false,
|
|
614
|
+
"inherited": true,
|
|
615
|
+
"deprecated": false
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"name": "isHovered",
|
|
619
|
+
"type": "boolean",
|
|
620
|
+
"default": "false",
|
|
621
|
+
"description": "Applies hovered styling (visual only).",
|
|
622
|
+
"required": false,
|
|
623
|
+
"inherited": true,
|
|
624
|
+
"deprecated": false
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"name": "isDisabled",
|
|
628
|
+
"type": "boolean",
|
|
629
|
+
"default": "false",
|
|
630
|
+
"description": "Applies disabled styling.",
|
|
631
|
+
"required": false,
|
|
632
|
+
"inherited": true,
|
|
633
|
+
"deprecated": false
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
"name": "className",
|
|
637
|
+
"type": "string",
|
|
638
|
+
"default": null,
|
|
639
|
+
"description": "Custom class name.",
|
|
640
|
+
"required": false,
|
|
641
|
+
"inherited": true,
|
|
642
|
+
"deprecated": false
|
|
643
|
+
}
|
|
644
|
+
],
|
|
645
|
+
"extraProps": [
|
|
646
|
+
{
|
|
647
|
+
"name": "ref",
|
|
648
|
+
"type": "React.Ref<HTMLButtonElement>",
|
|
649
|
+
"default": null,
|
|
650
|
+
"description": "Ref forwarded to the `<button>`.",
|
|
651
|
+
"required": false,
|
|
652
|
+
"inherited": false,
|
|
653
|
+
"deprecated": false
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"catchAll": "All standard <button> attributes and Bulma helper props",
|
|
657
|
+
"types": []
|
|
511
658
|
}
|
|
512
659
|
],
|
|
513
660
|
"cssVars": []
|
|
@@ -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 dropdown root is a `<div class=\"dropdown\">` with ARIA roles/attributes for menu and trigger.\n- The trigger button uses `aria-haspopup`, `aria-controls`, and `aria-expanded`.\n- Menu items are focusable and use `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or `role=\"menuitemradio\"` stays in the arrow-key order.\n- The items are the only focusable things inside `role=\"menu\"`. A click between them, on a divider say, focuses the menu itself, so the arrow keys still 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- Clicking outside closes the dropdown in most cases.\n\n`Dropdown` implements the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/)\nout of the box:\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.\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; <kbd>Tab</kbd> closes the menu and lets focus continue\n naturally.\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.\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
|
|
45
|
+
"accessibility": "- The dropdown root is a `<div class=\"dropdown\">` with ARIA roles/attributes for menu and trigger.\n- The trigger button uses `aria-haspopup`, `aria-controls`, and `aria-expanded`.\n- Menu items are focusable and use `role=\"menuitem\"`. An item given `role=\"menuitemcheckbox\"` or `role=\"menuitemradio\"` stays in the arrow-key order.\n- The items are the only focusable things inside `role=\"menu\"`. A click between them, on a divider say, focuses the menu itself, so the arrow keys still 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- Clicking outside closes the dropdown in most cases.\n\n`Dropdown` implements the [WAI-ARIA Menu Button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/)\nout of the box:\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; <kbd>Tab</kbd> closes the menu and lets focus continue\n naturally.\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.",
|
|
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.",
|
|
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, and Tab closes it and lets focus move on. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab. 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.",
|
|
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, and Tab closes it and lets focus move on. Anything focusable in the menu that isn't an item, such as a field, keeps its own keys apart from Escape and Tab. For a panel built around fields, use `Popover`.",
|
|
56
56
|
"component": null,
|
|
57
57
|
"props": [
|
|
58
58
|
{
|
|
@@ -45,12 +45,16 @@
|
|
|
45
45
|
"title": "Stopping a Toggle",
|
|
46
46
|
"code": "<ToggleButton\n onClick={event => {\n const turningOn =\n event.currentTarget.getAttribute('aria-pressed') === 'false';\n if (turningOn && !window.confirm('Anyone with the link will see it.')) {\n event.preventDefault();\n }\n }}\n>\n Public\n</ToggleButton>"
|
|
47
47
|
},
|
|
48
|
+
{
|
|
49
|
+
"title": "Loading",
|
|
50
|
+
"code": "function example() {\n const [pinned, setPinned] = useState(false);\n const [saving, setSaving] = useState(false);\n\n // Stands in for the request that saves the change.\n useEffect(() => {\n if (!saving) return undefined;\n const timer = setTimeout(() => setSaving(false), 1500);\n return () => clearTimeout(timer);\n }, [saving]);\n\n return (\n <ToggleButton\n pressed={pinned}\n isLoading={saving}\n onPressedChange={next => {\n setPinned(next);\n setSaving(true);\n }}\n >\n Pin\n </ToggleButton>\n );\n}"
|
|
51
|
+
},
|
|
48
52
|
{
|
|
49
53
|
"title": "Disabled",
|
|
50
54
|
"code": "<Buttons>\n <ToggleButton isDisabled>Show archived</ToggleButton>\n <ToggleButton isDisabled defaultPressed>\n Show archived\n </ToggleButton>\n</Buttons>"
|
|
51
55
|
}
|
|
52
56
|
],
|
|
53
|
-
"accessibility": "`ToggleButton` follows the toggle button in the\n[APG button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/):\n\n- **Role and state:** it's a native `<button>` with `aria-pressed` set to `\"true\"` or `\"false\"`\n from the first render, server markup included, so it's announced as a toggle button, pressed or\n not pressed. It's never `\"mixed\"`.\n- **Keyboard:** <kbd>Enter</kbd> and <kbd>Space</kbd> toggle it, as on any button, and focus stays\n on it.\n- **The label stays put:** APG says \"it is critical the label on a toggle does not change when its\n state changes.\" Mute stays \"Mute\". An icon can change, but the `aria-label` doesn't. A label that\n changes, \"Play\" and then \"Pause\", belongs on a plain `Button` with no `aria-pressed`. Nothing can\n check this at runtime, so it's yours to keep.\n- **Icon-only toggles** need an `aria-label`, as on `Button`.\n- **On is easy to see:** the default `link` fill turns a light button solid blue, and a dark one\n bright in dark mode, so it's a change in lightness and not only in hue. `color` leaves out the\n fills that wouldn't be: `white`, `light`, `dark` and `black` each match a plain button's\n lightness in one theme or the other. That's also why the pressed look isn't\n `Button`'s `isActive` shade:\n [WCAG's own example](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html) of a\n button marked only by a darker shade of its color \"would not pass Use of color\".\n- **A set has a name:** give the `Buttons` around a set of toggles `role=\"group\"` and an\n `aria-label`.\n- **One choice from several** is a radio group, not a set of toggles, so it's `Radios`.",
|
|
57
|
+
"accessibility": "`ToggleButton` follows the toggle button in the\n[APG button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/):\n\n- **Role and state:** it's a native `<button>` with `aria-pressed` set to `\"true\"` or `\"false\"`\n from the first render, server markup included, so it's announced as a toggle button, pressed or\n not pressed. It's never `\"mixed\"`.\n- **Keyboard:** <kbd>Enter</kbd> and <kbd>Space</kbd> toggle it, as on any button, and focus stays\n on it.\n- **Loading:** while `isLoading` is set, it carries `aria-busy=\"true\"` and `aria-disabled=\"true\"`,\n so a screen reader can tell it won't respond, and keys hold it still the same as the pointer\n does. It keeps focus, since `aria-disabled` doesn't take it away the way `disabled` would.\n- **The label stays put:** APG says \"it is critical the label on a toggle does not change when its\n state changes.\" Mute stays \"Mute\". An icon can change, but the `aria-label` doesn't. A label that\n changes, \"Play\" and then \"Pause\", belongs on a plain `Button` with no `aria-pressed`. Nothing can\n check this at runtime, so it's yours to keep.\n- **Icon-only toggles** need an `aria-label`, as on `Button`.\n- **On is easy to see:** the default `link` fill turns a light button solid blue, and a dark one\n bright in dark mode, so it's a change in lightness and not only in hue. `color` leaves out the\n fills that wouldn't be: `white`, `light`, `dark` and `black` each match a plain button's\n lightness in one theme or the other. That's also why the pressed look isn't\n `Button`'s `isActive` shade:\n [WCAG's own example](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html) of a\n button marked only by a darker shade of its color \"would not pass Use of color\".\n- **A set has a name:** give the `Buttons` around a set of toggles `role=\"group\"` and an\n `aria-label`.\n- **One choice from several** is a radio group, not a set of toggles, so it's `Radios`.",
|
|
54
58
|
"related": [
|
|
55
59
|
"Button",
|
|
56
60
|
"Buttons",
|
|
@@ -64,7 +68,7 @@
|
|
|
64
68
|
"summary": "The `ToggleButton` component renders a button that stays pressed until it's pressed again, and says whether it's on through `aria-pressed`. It's always a `<button type=\"button\">`, so it never submits a form and carries no form value: a setting saved with a form is a `Checkbox` or a `Switch`. A set of toggles that each turn on and off on their own goes in `Buttons hasAddons` with `role=\"group\"` and an `aria-label`. A set where only one can be on is a radio group rather than a row of these: use `Radios`.",
|
|
65
69
|
"import": "import { ToggleButton } from '@allxsmith/bestax-bulma';",
|
|
66
70
|
"sourceFile": "bulma-ui/src/elements/ToggleButton.tsx",
|
|
67
|
-
"rootClass":
|
|
71
|
+
"rootClass": null,
|
|
68
72
|
"parts": [
|
|
69
73
|
{
|
|
70
74
|
"path": "ToggleButton",
|
|
@@ -93,7 +97,7 @@
|
|
|
93
97
|
"name": "onPressedChange",
|
|
94
98
|
"type": "(pressed: boolean) => void",
|
|
95
99
|
"default": null,
|
|
96
|
-
"description": "Called with the new state each time it's toggled,
|
|
100
|
+
"description": "Called with the new state each time it's toggled, whether or not `pressed` is set. An `onClick` that calls `preventDefault()` stops the toggle, and this doesn't fire.",
|
|
97
101
|
"required": false,
|
|
98
102
|
"inherited": false,
|
|
99
103
|
"deprecated": false
|
|
@@ -116,6 +120,15 @@
|
|
|
116
120
|
"inherited": false,
|
|
117
121
|
"deprecated": false
|
|
118
122
|
},
|
|
123
|
+
{
|
|
124
|
+
"name": "isLoading",
|
|
125
|
+
"type": "boolean",
|
|
126
|
+
"default": "false",
|
|
127
|
+
"description": "Shows Bulma's spinner in place of the label and holds the toggle where it is: a click, Enter or Space does nothing, so neither `onClick` nor `onPressedChange` fires, until it's cleared. Set it while a change is saving. The button carries `aria-busy` and `aria-disabled` meanwhile, and stays focusable, so focus isn't lost mid-save. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
128
|
+
"required": false,
|
|
129
|
+
"inherited": false,
|
|
130
|
+
"deprecated": false
|
|
131
|
+
},
|
|
119
132
|
{
|
|
120
133
|
"name": "size",
|
|
121
134
|
"type": "'small' | 'normal' | 'medium' | 'large'",
|
|
@@ -134,15 +147,6 @@
|
|
|
134
147
|
"inherited": true,
|
|
135
148
|
"deprecated": false
|
|
136
149
|
},
|
|
137
|
-
{
|
|
138
|
-
"name": "isLoading",
|
|
139
|
-
"type": "boolean",
|
|
140
|
-
"default": "false",
|
|
141
|
-
"description": "Displays a loading spinner. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn (with bestax's CSS loaded).",
|
|
142
|
-
"required": false,
|
|
143
|
-
"inherited": true,
|
|
144
|
-
"deprecated": false
|
|
145
|
-
},
|
|
146
150
|
{
|
|
147
151
|
"name": "isFullwidth",
|
|
148
152
|
"type": "boolean",
|
|
@@ -214,288 +218,5 @@
|
|
|
214
218
|
"types": []
|
|
215
219
|
}
|
|
216
220
|
],
|
|
217
|
-
"cssVars": [
|
|
218
|
-
{
|
|
219
|
-
"css": "--bulma-button-family",
|
|
220
|
-
"sass": "$button-family",
|
|
221
|
-
"default": "false",
|
|
222
|
-
"scope": "root"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"css": "--bulma-button-weight",
|
|
226
|
-
"sass": "$button-weight",
|
|
227
|
-
"default": "var(--bulma-weight-medium)",
|
|
228
|
-
"scope": "root"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"css": "--bulma-button-border-color",
|
|
232
|
-
"sass": "$button-border-color",
|
|
233
|
-
"default": "var(--bulma-border)",
|
|
234
|
-
"scope": "root"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"css": "--bulma-button-border-style",
|
|
238
|
-
"sass": "$button-border-style",
|
|
239
|
-
"default": "solid",
|
|
240
|
-
"scope": "root"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"css": "--bulma-button-border-width",
|
|
244
|
-
"sass": "$button-border-width",
|
|
245
|
-
"default": "var(--bulma-control-border-width)",
|
|
246
|
-
"scope": "root"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
"css": "--bulma-button-padding-vertical",
|
|
250
|
-
"sass": "$button-padding-vertical",
|
|
251
|
-
"default": "0.5em",
|
|
252
|
-
"scope": "root"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"css": "--bulma-button-padding-horizontal",
|
|
256
|
-
"sass": "$button-padding-horizontal",
|
|
257
|
-
"default": "1em",
|
|
258
|
-
"scope": "root"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"css": "--bulma-button-focus-border-color",
|
|
262
|
-
"sass": "$button-focus-border-color",
|
|
263
|
-
"default": "var(--bulma-link-focus-border)",
|
|
264
|
-
"scope": "root"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
"css": "--bulma-button-focus-box-shadow-size",
|
|
268
|
-
"sass": "$button-focus-box-shadow-size",
|
|
269
|
-
"default": "0 0 0 0.125em",
|
|
270
|
-
"scope": "root"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"css": "--bulma-button-focus-box-shadow-color",
|
|
274
|
-
"sass": "$button-focus-box-shadow-color",
|
|
275
|
-
"default": "hsla(var(--bulma-link-h), var(--bulma-link-s), var(--bulma-link-on-scheme-l), 0.25)",
|
|
276
|
-
"scope": "root"
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
"css": "--bulma-button-active-color",
|
|
280
|
-
"sass": "$button-active-color",
|
|
281
|
-
"default": "var(--bulma-link-active)",
|
|
282
|
-
"scope": "root"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"css": "--bulma-button-active-border-color",
|
|
286
|
-
"sass": "$button-active-border-color",
|
|
287
|
-
"default": "var(--bulma-link-active-border)",
|
|
288
|
-
"scope": "root"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
"css": "--bulma-button-text-color",
|
|
292
|
-
"sass": "$button-text-color",
|
|
293
|
-
"default": "var(--bulma-text)",
|
|
294
|
-
"scope": "root"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"css": "--bulma-button-text-decoration",
|
|
298
|
-
"sass": "$button-text-decoration",
|
|
299
|
-
"default": "underline",
|
|
300
|
-
"scope": "root"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"css": "--bulma-button-text-hover-background-color",
|
|
304
|
-
"sass": "$button-text-hover-background-color",
|
|
305
|
-
"default": "var(--bulma-background)",
|
|
306
|
-
"scope": "root"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"css": "--bulma-button-text-hover-color",
|
|
310
|
-
"sass": "$button-text-hover-color",
|
|
311
|
-
"default": "var(--bulma-text-strong)",
|
|
312
|
-
"scope": "root"
|
|
313
|
-
},
|
|
314
|
-
{
|
|
315
|
-
"css": "--bulma-button-ghost-background",
|
|
316
|
-
"sass": "$button-ghost-background",
|
|
317
|
-
"default": "none",
|
|
318
|
-
"scope": "root"
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
"css": "--bulma-button-ghost-border-color",
|
|
322
|
-
"sass": "$button-ghost-border-color",
|
|
323
|
-
"default": "transparent",
|
|
324
|
-
"scope": "root"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"css": "--bulma-button-ghost-color",
|
|
328
|
-
"sass": "$button-ghost-color",
|
|
329
|
-
"default": "var(--bulma-link-text)",
|
|
330
|
-
"scope": "root"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"css": "--bulma-button-ghost-decoration",
|
|
334
|
-
"sass": "$button-ghost-decoration",
|
|
335
|
-
"default": "none",
|
|
336
|
-
"scope": "root"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"css": "--bulma-button-ghost-hover-color",
|
|
340
|
-
"sass": "$button-ghost-hover-color",
|
|
341
|
-
"default": "var(--bulma-link)",
|
|
342
|
-
"scope": "root"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
"css": "--bulma-button-ghost-hover-decoration",
|
|
346
|
-
"sass": "$button-ghost-hover-decoration",
|
|
347
|
-
"default": "underline",
|
|
348
|
-
"scope": "root"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
"css": "--bulma-button-disabled-background-color",
|
|
352
|
-
"sass": "$button-disabled-background-color",
|
|
353
|
-
"default": "var(--bulma-scheme-main)",
|
|
354
|
-
"scope": "root"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"css": "--bulma-button-disabled-border-color",
|
|
358
|
-
"sass": "$button-disabled-border-color",
|
|
359
|
-
"default": "var(--bulma-border)",
|
|
360
|
-
"scope": "root"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"css": "--bulma-button-disabled-shadow",
|
|
364
|
-
"sass": "$button-disabled-shadow",
|
|
365
|
-
"default": "none",
|
|
366
|
-
"scope": "root"
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
"css": "--bulma-button-disabled-opacity",
|
|
370
|
-
"sass": "$button-disabled-opacity",
|
|
371
|
-
"default": "0.5",
|
|
372
|
-
"scope": "root"
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
"css": "--bulma-button-static-color",
|
|
376
|
-
"sass": "$button-static-color",
|
|
377
|
-
"default": "var(--bulma-text-weak)",
|
|
378
|
-
"scope": "root"
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
"css": "--bulma-button-static-background-color",
|
|
382
|
-
"sass": "$button-static-background-color",
|
|
383
|
-
"default": "var(--bulma-scheme-main-ter)",
|
|
384
|
-
"scope": "root"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"css": "--bulma-button-static-border-color",
|
|
388
|
-
"sass": "$button-static-border-color",
|
|
389
|
-
"default": "var(--bulma-border)",
|
|
390
|
-
"scope": "root"
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
"css": "--bulma-button-h",
|
|
394
|
-
"sass": "$button-h",
|
|
395
|
-
"default": "var(--bulma-scheme-h)",
|
|
396
|
-
"scope": "root"
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"css": "--bulma-button-s",
|
|
400
|
-
"sass": "$button-s",
|
|
401
|
-
"default": "var(--bulma-scheme-s)",
|
|
402
|
-
"scope": "root"
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
"css": "--bulma-button-l",
|
|
406
|
-
"sass": "$button-l",
|
|
407
|
-
"default": "var(--bulma-scheme-main-l)",
|
|
408
|
-
"scope": "root"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
"css": "--bulma-button-background-l",
|
|
412
|
-
"sass": "$button-background-l",
|
|
413
|
-
"default": "var(--bulma-scheme-main-l)",
|
|
414
|
-
"scope": "root"
|
|
415
|
-
},
|
|
416
|
-
{
|
|
417
|
-
"css": "--bulma-button-background-l-delta",
|
|
418
|
-
"sass": "$button-background-l-delta",
|
|
419
|
-
"default": "0%",
|
|
420
|
-
"scope": "root"
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
"css": "--bulma-button-hover-background-l-delta",
|
|
424
|
-
"sass": "$button-hover-background-l-delta",
|
|
425
|
-
"default": "var(--bulma-hover-background-l-delta)",
|
|
426
|
-
"scope": "root"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"css": "--bulma-button-active-background-l-delta",
|
|
430
|
-
"sass": "$button-active-background-l-delta",
|
|
431
|
-
"default": "var(--bulma-active-background-l-delta)",
|
|
432
|
-
"scope": "root"
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
"css": "--bulma-button-color-l",
|
|
436
|
-
"sass": "$button-color-l",
|
|
437
|
-
"default": "var(--bulma-text-strong-l)",
|
|
438
|
-
"scope": "root"
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
"css": "--bulma-button-border-l",
|
|
442
|
-
"sass": "$button-border-l",
|
|
443
|
-
"default": "var(--bulma-border-l)",
|
|
444
|
-
"scope": "root"
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
"css": "--bulma-button-border-l-delta",
|
|
448
|
-
"sass": "$button-border-l-delta",
|
|
449
|
-
"default": "0%",
|
|
450
|
-
"scope": "root"
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
"css": "--bulma-button-hover-border-l-delta",
|
|
454
|
-
"sass": "$button-hover-border-l-delta",
|
|
455
|
-
"default": "var(--bulma-hover-border-l-delta)",
|
|
456
|
-
"scope": "root"
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
"css": "--bulma-button-active-border-l-delta",
|
|
460
|
-
"sass": "$button-active-border-l-delta",
|
|
461
|
-
"default": "var(--bulma-active-border-l-delta)",
|
|
462
|
-
"scope": "root"
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
"css": "--bulma-button-focus-border-l-delta",
|
|
466
|
-
"sass": "$button-focus-border-l-delta",
|
|
467
|
-
"default": "var(--bulma-focus-border-l-delta)",
|
|
468
|
-
"scope": "root"
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
"css": "--bulma-button-outer-shadow-h",
|
|
472
|
-
"sass": "$button-outer-shadow-h",
|
|
473
|
-
"default": "0",
|
|
474
|
-
"scope": "root"
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
"css": "--bulma-button-outer-shadow-s",
|
|
478
|
-
"sass": "$button-outer-shadow-s",
|
|
479
|
-
"default": "0%",
|
|
480
|
-
"scope": "root"
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
"css": "--bulma-button-outer-shadow-l",
|
|
484
|
-
"sass": "$button-outer-shadow-l",
|
|
485
|
-
"default": "20%",
|
|
486
|
-
"scope": "root"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"css": "--bulma-button-outer-shadow-a",
|
|
490
|
-
"sass": "$button-outer-shadow-a",
|
|
491
|
-
"default": "0.05",
|
|
492
|
-
"scope": "root"
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
"css": "--bulma-loading-color",
|
|
496
|
-
"sass": null,
|
|
497
|
-
"default": "hsl(var(--bulma-button-h), var(--bulma-button-s), var(--bulma-button-color-l))",
|
|
498
|
-
"scope": "root"
|
|
499
|
-
}
|
|
500
|
-
]
|
|
221
|
+
"cssVars": []
|
|
501
222
|
}
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"title": "Dashed Underline",
|
|
30
|
-
"code": "function example() {\n return (\n <Paragraph>\n The term{' '}\n <Tooltip label=\"Application Programming Interface\" dashed>\n <
|
|
30
|
+
"code": "function example() {\n return (\n <Paragraph>\n The term{' '}\n <Tooltip label=\"Application Programming Interface\" dashed>\n <abbr tabIndex={0}>API</abbr>\n </Tooltip>{' '}\n is commonly used in software development.\n </Paragraph>\n );\n}"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"title": "With Delay",
|
|
@@ -39,28 +39,28 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "On Icons",
|
|
42
|
-
"code": "function example() {\n return (\n <
|
|
42
|
+
"code": "function example() {\n return (\n <Buttons p=\"6\">\n <Tooltip label=\"Moves it to the trash\" color=\"danger\" position=\"bottom\">\n <Button aria-label=\"Delete\">\n <Icon name=\"fas fa-trash\" />\n </Button>\n </Tooltip>\n <Tooltip label=\"Opens it for editing\" color=\"info\" position=\"bottom\">\n <Button aria-label=\"Edit\">\n <Icon name=\"fas fa-edit\" />\n </Button>\n </Tooltip>\n <Tooltip label=\"Saves a copy as a PDF\" color=\"success\" position=\"bottom\">\n <Button aria-label=\"Download\">\n <Icon name=\"fas fa-download\" />\n </Button>\n </Tooltip>\n </Buttons>\n );\n}"
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"title": "Form Field Help",
|
|
46
|
-
"code": "function example() {\n return (\n <Field>\n <label className=\"label\">\n
|
|
46
|
+
"code": "function example() {\n const id = React.useId();\n return (\n <Field>\n <Block display=\"flex\" alignItems=\"center\" mb=\"2\">\n <label className=\"label mb-0\" htmlFor={id}>\n Password\n </label>\n <Tooltip\n label=\"Must be at least 8 characters with one number and one special character\"\n multiline\n color=\"info\"\n >\n <Button size=\"small\" color=\"ghost\" aria-label=\"Password rules\">\n <Icon name=\"fas fa-question-circle\" />\n </Button>\n </Tooltip>\n </Block>\n <Control>\n <Input id={id} type=\"password\" placeholder=\"Enter password\" />\n </Control>\n </Field>\n );\n}"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"title": "Abbreviations",
|
|
50
|
-
"code": "function example() {\n return (\n <Paragraph style={{ lineHeight: 1.8 }}>\n Hover over{' '}\n <Tooltip label=\"Cascading Style Sheets\" color=\"info\" dashed>\n <
|
|
50
|
+
"code": "function example() {\n return (\n <Paragraph style={{ lineHeight: 1.8 }}>\n Hover over{' '}\n <Tooltip label=\"Cascading Style Sheets\" color=\"info\" dashed>\n <abbr tabIndex={0}>CSS</abbr>\n </Tooltip>{' '}\n or{' '}\n <Tooltip label=\"HyperText Markup Language\" color=\"info\" dashed>\n <abbr tabIndex={0}>HTML</abbr>\n </Tooltip>{' '}\n to see their full names.\n </Paragraph>\n );\n}"
|
|
51
51
|
}
|
|
52
52
|
],
|
|
53
|
-
"accessibility": "`Tooltip` is built to\n[WCAG's Content on Hover or Focus](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html)\ncriterion:\n\n- **Dismissible:** <kbd>Escape</kbd> hides a shown tooltip wherever focus is, without you moving the\n pointer or focus, and it stays hidden until the pointer or focus leaves the trigger and comes\n back, or, with `openOnTap`, until the next tap on the trigger. The key goes on as well, to\n whatever has focus, so a control in the trigger, such as a `Dropdown`, still gets its own Escape.\n Inside a `Popover` or `Modal`, one Escape hides the tooltip and closes that too, since a tooltip\n only adds to what's there.\n- **Hoverable:** the pointer can move from the trigger onto a shown tooltip, straight across the gap\n between them, and it stays. A hidden tooltip, or one only `active` shows, lets the pointer through\n to whatever is under it.\n- **Persistent:** no timer hides a tooltip that's hovered or focused.\n\nAnd around it:\n\n- Keyboard focus on the trigger shows the tooltip, as hover does. Focus that a click or a tap brings\n doesn't, and neither does a touch pointer, so tapping the trigger just does what the trigger does.\n `openOnTap` shows it with a tap, for a trigger with no tap action of its own.\n- An `active` tooltip is always shown, whatever the pointer, focus and Escape do.\n- Tooltip content has `role=\"tooltip\"
|
|
53
|
+
"accessibility": "`Tooltip` is built to\n[WCAG's Content on Hover or Focus](https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus.html)\ncriterion:\n\n- **Dismissible:** <kbd>Escape</kbd> hides a shown tooltip wherever focus is, without you moving the\n pointer or focus, and it stays hidden until the pointer or focus leaves the trigger and comes\n back, or, with `openOnTap`, until the next tap on the trigger. The key goes on as well, to\n whatever has focus, so a control in the trigger, such as a `Dropdown`, still gets its own Escape.\n Inside a `Popover` or `Modal`, one Escape hides the tooltip and closes that too, since a tooltip\n only adds to what's there.\n- **Hoverable:** the pointer can move from the trigger onto a shown tooltip, straight across the gap\n between them, and it stays. A hidden tooltip, or one only `active` shows, lets the pointer through\n to whatever is under it.\n- **Persistent:** no timer hides a tooltip that's hovered or focused.\n\nAnd around it:\n\n- Keyboard focus on the trigger shows the tooltip, as hover does. Focus that a click or a tap brings\n doesn't, and neither does a touch pointer, so tapping the trigger just does what the trigger does.\n `openOnTap` shows it with a tap, for a trigger with no tap action of its own.\n- An `active` tooltip is always shown, whatever the pointer, focus and Escape do.\n- Tooltip content has `role=\"tooltip\"`. While it's hidden, the stylesheet gives it\n `visibility: hidden`, which keeps it out of the accessibility tree.\n- The tooltip describes its trigger. The trigger's `aria-describedby` points at it, after any ids it\n already had, so a screen reader reads the tooltip when the trigger takes focus. A hidden tooltip\n still counts as a description, so that's before any `delay` runs out. `content` is read as plain\n text.\n- That takes a single element as `children`, which passes `aria-describedby` on to its DOM node, as\n native elements and bestax components do, and takes focus itself: a button, a link, or a `Span`\n with `tabIndex={0}`. Something focusable inside it doesn't get the link, and text, a fragment or\n several elements get none. A development build warns when the first element Tab reaches in the\n trigger doesn't carry the link, or there isn't one.\n- A tooltip describes and doesn't name, so give an icon-only trigger a name of its own, such as an\n `aria-label`, as [On Icons](https://bestax.io/docs/api/components/tooltip#on-icons) does.\n- The `dashed` style provides a visual cue that more information is available.",
|
|
54
54
|
"related": ["Button", "HoverCard", "Icon", "Popover"],
|
|
55
55
|
"storybook": null,
|
|
56
|
-
"summary": "The `Tooltip` component displays helpful information when users hover over or focus on an element. Hovering the trigger or giving it keyboard focus shows it. Touch doesn't, unless `openOnTap` is on, and neither does focus a click or a tap brings, so tapping the trigger just does what the trigger does. The pointer can move onto a shown tooltip. Escape hides it wherever focus is, without moving the pointer or focus, and it stays hidden until one of them leaves the trigger and comes back, or, with `openOnTap`, until the next tap on the trigger. The key always goes on too, to whatever has focus or a `Modal` or `Popover` around it, since a tooltip only adds to what's there.",
|
|
56
|
+
"summary": "The `Tooltip` component displays helpful information when users hover over or focus on an element. Hovering the trigger or giving it keyboard focus shows it. Touch doesn't, unless `openOnTap` is on, and neither does focus a click or a tap brings, so tapping the trigger just does what the trigger does. The pointer can move onto a shown tooltip. Escape hides it wherever focus is, without moving the pointer or focus, and it stays hidden until one of them leaves the trigger and comes back, or, with `openOnTap`, until the next tap on the trigger. The key always goes on too, to whatever has focus or a `Modal` or `Popover` around it, since a tooltip only adds to what's there. The tooltip is its trigger's description, so a screen reader reads it as the trigger takes focus, whether it's showing yet or not.",
|
|
57
57
|
"import": "import { Tooltip } from '@allxsmith/bestax-bulma';",
|
|
58
58
|
"sourceFile": "bulma-ui/src/components/Tooltip.tsx",
|
|
59
59
|
"rootClass": "tooltip",
|
|
60
60
|
"parts": [
|
|
61
61
|
{
|
|
62
62
|
"path": "Tooltip",
|
|
63
|
-
"summary": "The `Tooltip` component displays helpful information when users hover over or focus on an element. Hovering the trigger or giving it keyboard focus shows it. Touch doesn't, unless `openOnTap` is on, and neither does focus a click or a tap brings, so tapping the trigger just does what the trigger does. The pointer can move onto a shown tooltip. Escape hides it wherever focus is, without moving the pointer or focus, and it stays hidden until one of them leaves the trigger and comes back, or, with `openOnTap`, until the next tap on the trigger. The key always goes on too, to whatever has focus or a `Modal` or `Popover` around it, since a tooltip only adds to what's there.",
|
|
63
|
+
"summary": "The `Tooltip` component displays helpful information when users hover over or focus on an element. Hovering the trigger or giving it keyboard focus shows it. Touch doesn't, unless `openOnTap` is on, and neither does focus a click or a tap brings, so tapping the trigger just does what the trigger does. The pointer can move onto a shown tooltip. Escape hides it wherever focus is, without moving the pointer or focus, and it stays hidden until one of them leaves the trigger and comes back, or, with `openOnTap`, until the next tap on the trigger. The key always goes on too, to whatever has focus or a `Modal` or `Popover` around it, since a tooltip only adds to what's there. The tooltip is its trigger's description, so a screen reader reads it as the trigger takes focus, whether it's showing yet or not.",
|
|
64
64
|
"component": null,
|
|
65
65
|
"props": [
|
|
66
66
|
{
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"name": "content",
|
|
77
77
|
"type": "React.ReactNode",
|
|
78
78
|
"default": null,
|
|
79
|
-
"description": "Rich tooltip content (alternative to `label`), to read rather than use. Nothing in it should take focus or a click: it isn't in the Tab order while hidden, focus there isn't counted as being in the tooltip, and Escape hiding it would drop that focus. For links or buttons, use `HoverCard` or `Popover`.",
|
|
79
|
+
"description": "Rich tooltip content (alternative to `label`), to read rather than use. Nothing in it should take focus or a click: it isn't in the Tab order while hidden, focus there isn't counted as being in the tooltip, and Escape hiding it would drop that focus. For links or buttons, use `HoverCard` or `Popover`. A screen reader reads it as plain text, since it's the trigger's description.",
|
|
80
80
|
"required": false,
|
|
81
81
|
"inherited": false,
|
|
82
82
|
"deprecated": false
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"name": "children",
|
|
196
196
|
"type": "React.ReactNode",
|
|
197
197
|
"default": null,
|
|
198
|
-
"description": "The element that triggers the tooltip.",
|
|
198
|
+
"description": "The element that triggers the tooltip. Its `aria-describedby` points at the tooltip, after any ids it already had, so a screen reader reads the tooltip as its description when it takes focus, even while the tooltip is hidden. That takes a single element which passes `aria-describedby` on to its DOM node, as native elements and bestax components do, and takes focus itself, such as a button, a link or a `Span` with `tabIndex={0}`: something focusable inside it doesn't get the link, and text, a fragment or several elements get none. A development build warns when the first element Tab reaches in the trigger doesn't carry the link, or there isn't one.",
|
|
199
199
|
"required": false,
|
|
200
200
|
"inherited": false,
|
|
201
201
|
"deprecated": false
|
|
@@ -68,9 +68,9 @@ A button that turns something on or off and stays that way (Bold, Mute, Show arc
|
|
|
68
68
|
`aria-pressed`. It's always `type="button"`, holds its own state (`defaultPressed`) or takes
|
|
69
69
|
`pressed` with `onPressedChange`, and fills with `color` (default `link`) only while pressed.
|
|
70
70
|
Its label stays the same in both states, and an icon-only one needs an `aria-label`. A set goes
|
|
71
|
-
in `Buttons hasAddons role="group" aria-label="…"
|
|
72
|
-
group, so it's `Radios`, never toggles that switch each other
|
|
73
|
-
a `Switch` or a `Checkbox`.
|
|
71
|
+
in `Buttons hasAddons role="group" aria-label="…"`, where it's also `Buttons.ToggleButton`. A row
|
|
72
|
+
where only one can be on is a radio group, so it's `Radios`, never toggles that switch each other
|
|
73
|
+
off. A setting saved with a form is a `Switch` or a `Checkbox`.
|
|
74
74
|
|
|
75
75
|
A panel opened from a button (a filter form, share options, an inline edit) is `Popover`: use
|
|
76
76
|
it rather than building one. It anchors the panel, moves focus in and back, and closes on
|
|
@@ -61,8 +61,8 @@ Centered; a collection of items → Card grid. For mixed requests, pick the domi
|
|
|
61
61
|
arrow-key focus), `Dropdown active/onActiveChange`,
|
|
62
62
|
`ToggleButton pressed/defaultPressed onPressedChange` for a button that stays on or off (not
|
|
63
63
|
`Button isActive`, which sets no `aria-pressed`; the label stays the same in both states; a
|
|
64
|
-
set goes in `Buttons hasAddons role="group"` with an `aria-label`,
|
|
65
|
-
can be on is `Radios`),
|
|
64
|
+
set goes in `Buttons hasAddons role="group"` with an `aria-label`, where it's also
|
|
65
|
+
`Buttons.ToggleButton`, and a row where only one can be on is `Radios`),
|
|
66
66
|
`Popover trigger={<Button>…</Button>} open/defaultOpen onOpenChange` (`trigger` is one
|
|
67
67
|
element, not a node: Popover clones it to add the click and ARIA, so never wrap it in a
|
|
68
68
|
clickable of your own; build the panel from `Popover.Header`/`Body`/`Footer`/`Close`, and a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.8",
|
|
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.31.0",
|
|
44
44
|
"zod": "^4.4.3",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.31.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jest/globals": "^30.0.0",
|