bestax-mcp 1.18.26 → 1.18.28
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/bulma-classes.json +2 -0
- package/data/catalog.json +78 -4
- package/data/components/Button.json +8 -2
- package/data/components/Buttons.json +231 -1
- package/data/components/Center.json +131 -0
- package/data/components/Flex.json +185 -0
- package/data/components/Group.json +188 -0
- package/data/components/IconButton.json +306 -0
- package/data/components/LocaleProvider.json +8 -2
- package/data/components/NumberFormatter.json +140 -0
- package/data/components/Stack.json +169 -0
- package/data/components/Tooltip.json +3 -3
- package/data/components/TreeView.json +13 -9
- package/data/components/useBulmaClasses.json +2 -2
- package/data/skills/bestax-custom-component/SKILL.md +14 -3
- package/data/skills/bestax-custom-component/references/api.md +16 -5
- package/data/skills/bestax-custom-component/references/component-catalog.md +7 -1
- package/data/skills/bestax-custom-component/references/library-contributor.md +18 -2
- package/data/skills/bestax-icons/SKILL.md +4 -1
- package/data/skills/bestax-layout-scaffold/SKILL.md +12 -1
- package/data/skills/bestax-layout-scaffold/references/layout-components.md +34 -0
- package/data/skills/bestax-migrate/references/bloomer/prop-map.md +2 -2
- package/data/skills/bestax-migrate/references/rbx/prop-map.md +2 -2
- package/data/skills/bestax-migrate/references/react-bulma-components/unmappables.md +3 -3
- package/data/skills/bestax-optimize/references/modular-build.md +8 -3
- package/data/skills/bestax-theming/references/css-variables.md +9 -0
- package/data/skills/bestax-theming/references/themeable-components.md +63 -60
- package/data/skills.json +10 -10
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +3 -0
- package/package.json +2 -2
package/data/bulma-classes.json
CHANGED
|
@@ -13116,7 +13116,9 @@
|
|
|
13116
13116
|
"dropzone": "Dropzone",
|
|
13117
13117
|
"empty-state": "EmptyState",
|
|
13118
13118
|
"fieldset": "Fieldset",
|
|
13119
|
+
"stack": "Stack",
|
|
13119
13120
|
"hover-card": "HoverCard",
|
|
13121
|
+
"icon-button": "IconButton",
|
|
13120
13122
|
"kbd": "Kbd",
|
|
13121
13123
|
"link-button": "LinkButton",
|
|
13122
13124
|
"loading": "Loading",
|
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.59.0"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"Emphasis",
|
|
24
24
|
"Figure",
|
|
25
25
|
"Icon",
|
|
26
|
+
"IconButton",
|
|
26
27
|
"IconText",
|
|
27
28
|
"Image",
|
|
28
29
|
"Kbd",
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
"ListItem",
|
|
32
33
|
"Loader",
|
|
33
34
|
"Notification",
|
|
35
|
+
"NumberFormatter",
|
|
34
36
|
"OrderedList",
|
|
35
37
|
"Paragraph",
|
|
36
38
|
"Pre",
|
|
@@ -131,13 +133,17 @@
|
|
|
131
133
|
"id": "layout",
|
|
132
134
|
"label": "Layout",
|
|
133
135
|
"components": [
|
|
136
|
+
"Center",
|
|
134
137
|
"Container",
|
|
138
|
+
"Flex",
|
|
135
139
|
"Footer",
|
|
140
|
+
"Group",
|
|
136
141
|
"Hero",
|
|
137
142
|
"Level",
|
|
138
143
|
"Media",
|
|
139
144
|
"Section",
|
|
140
|
-
"Splitter"
|
|
145
|
+
"Splitter",
|
|
146
|
+
"Stack"
|
|
141
147
|
]
|
|
142
148
|
},
|
|
143
149
|
{
|
|
@@ -254,7 +260,7 @@
|
|
|
254
260
|
"slug": "elements/buttons",
|
|
255
261
|
"import": "import { Buttons } from '@allxsmith/bestax-bulma';",
|
|
256
262
|
"compound": true,
|
|
257
|
-
"propCount":
|
|
263
|
+
"propCount": 81,
|
|
258
264
|
"exampleCount": 8
|
|
259
265
|
},
|
|
260
266
|
{
|
|
@@ -290,6 +296,17 @@
|
|
|
290
296
|
"propCount": 11,
|
|
291
297
|
"exampleCount": 6
|
|
292
298
|
},
|
|
299
|
+
{
|
|
300
|
+
"name": "Center",
|
|
301
|
+
"kind": "component",
|
|
302
|
+
"category": "layout",
|
|
303
|
+
"purpose": "The `Center` component centers its content on both axes.",
|
|
304
|
+
"slug": "layout/center",
|
|
305
|
+
"import": "import { Center } from '@allxsmith/bestax-bulma';",
|
|
306
|
+
"compound": false,
|
|
307
|
+
"propCount": 7,
|
|
308
|
+
"exampleCount": 4
|
|
309
|
+
},
|
|
293
310
|
{
|
|
294
311
|
"name": "Checkbox",
|
|
295
312
|
"kind": "component",
|
|
@@ -675,6 +692,17 @@
|
|
|
675
692
|
"propCount": 23,
|
|
676
693
|
"exampleCount": 18
|
|
677
694
|
},
|
|
695
|
+
{
|
|
696
|
+
"name": "Flex",
|
|
697
|
+
"kind": "component",
|
|
698
|
+
"category": "layout",
|
|
699
|
+
"purpose": "The `Flex` component is a flex container with CSS's own defaults, taking the flex container's properties as props.",
|
|
700
|
+
"slug": "layout/flex",
|
|
701
|
+
"import": "import { Flex } from '@allxsmith/bestax-bulma';",
|
|
702
|
+
"compound": false,
|
|
703
|
+
"propCount": 13,
|
|
704
|
+
"exampleCount": 4
|
|
705
|
+
},
|
|
678
706
|
{
|
|
679
707
|
"name": "Footer",
|
|
680
708
|
"kind": "component",
|
|
@@ -697,6 +725,17 @@
|
|
|
697
725
|
"propCount": 27,
|
|
698
726
|
"exampleCount": 10
|
|
699
727
|
},
|
|
728
|
+
{
|
|
729
|
+
"name": "Group",
|
|
730
|
+
"kind": "component",
|
|
731
|
+
"category": "layout",
|
|
732
|
+
"purpose": "The `Group` component lays its children out in a row that wraps, centered on each other, with half of Bulma's block spacing between them.",
|
|
733
|
+
"slug": "layout/group",
|
|
734
|
+
"import": "import { Group } from '@allxsmith/bestax-bulma';",
|
|
735
|
+
"compound": false,
|
|
736
|
+
"propCount": 11,
|
|
737
|
+
"exampleCount": 6
|
|
738
|
+
},
|
|
700
739
|
{
|
|
701
740
|
"name": "Hero",
|
|
702
741
|
"kind": "component",
|
|
@@ -730,6 +769,17 @@
|
|
|
730
769
|
"propCount": 15,
|
|
731
770
|
"exampleCount": 14
|
|
732
771
|
},
|
|
772
|
+
{
|
|
773
|
+
"name": "IconButton",
|
|
774
|
+
"kind": "component",
|
|
775
|
+
"category": "elements",
|
|
776
|
+
"purpose": "The `IconButton` component renders a button that shows only an icon, and requires a name for it.",
|
|
777
|
+
"slug": "elements/iconbutton",
|
|
778
|
+
"import": "import { IconButton } from '@allxsmith/bestax-bulma';",
|
|
779
|
+
"compound": false,
|
|
780
|
+
"propCount": 22,
|
|
781
|
+
"exampleCount": 12
|
|
782
|
+
},
|
|
733
783
|
{
|
|
734
784
|
"name": "IconText",
|
|
735
785
|
"kind": "component",
|
|
@@ -917,6 +967,17 @@
|
|
|
917
967
|
"propCount": 7,
|
|
918
968
|
"exampleCount": 7
|
|
919
969
|
},
|
|
970
|
+
{
|
|
971
|
+
"name": "NumberFormatter",
|
|
972
|
+
"kind": "component",
|
|
973
|
+
"category": "elements",
|
|
974
|
+
"purpose": "The `NumberFormatter` component writes a number the way a locale writes it, such as a price, a percentage or a count, in a `<data>` element that keeps the…",
|
|
975
|
+
"slug": "elements/numberformatter",
|
|
976
|
+
"import": "import { NumberFormatter, useNumberFormat } from '@allxsmith/bestax-bulma';",
|
|
977
|
+
"compound": false,
|
|
978
|
+
"propCount": 6,
|
|
979
|
+
"exampleCount": 10
|
|
980
|
+
},
|
|
920
981
|
{
|
|
921
982
|
"name": "Numberinput",
|
|
922
983
|
"kind": "component",
|
|
@@ -1192,6 +1253,17 @@
|
|
|
1192
1253
|
"propCount": 21,
|
|
1193
1254
|
"exampleCount": 9
|
|
1194
1255
|
},
|
|
1256
|
+
{
|
|
1257
|
+
"name": "Stack",
|
|
1258
|
+
"kind": "component",
|
|
1259
|
+
"category": "layout",
|
|
1260
|
+
"purpose": "The `Stack` component lays its children out in a column, with Bulma's block spacing between them and the margins Bulma gives them zeroed.",
|
|
1261
|
+
"slug": "layout/stack",
|
|
1262
|
+
"import": "import { Stack } from '@allxsmith/bestax-bulma';",
|
|
1263
|
+
"compound": false,
|
|
1264
|
+
"propCount": 8,
|
|
1265
|
+
"exampleCount": 8
|
|
1266
|
+
},
|
|
1195
1267
|
{
|
|
1196
1268
|
"name": "Steps",
|
|
1197
1269
|
"kind": "component",
|
|
@@ -1388,7 +1460,7 @@
|
|
|
1388
1460
|
"import": "import { TreeView } from '@allxsmith/bestax-bulma';",
|
|
1389
1461
|
"compound": true,
|
|
1390
1462
|
"propCount": 27,
|
|
1391
|
-
"exampleCount":
|
|
1463
|
+
"exampleCount": 10
|
|
1392
1464
|
},
|
|
1393
1465
|
{
|
|
1394
1466
|
"name": "UnorderedList",
|
|
@@ -2800,6 +2872,8 @@
|
|
|
2800
2872
|
"--bulma-splitter-line-active-size": ["Splitter"],
|
|
2801
2873
|
"--bulma-splitter-line-color": ["Splitter"],
|
|
2802
2874
|
"--bulma-splitter-line-size": ["Splitter"],
|
|
2875
|
+
"--bulma-stack-gap": ["Stack", "Group"],
|
|
2876
|
+
"--bulma-stack-horizontal-gap": ["Stack", "Group"],
|
|
2803
2877
|
"--bulma-steps-animation-duration": ["Steps"],
|
|
2804
2878
|
"--bulma-steps-content-margin-top": ["Steps"],
|
|
2805
2879
|
"--bulma-steps-default-color": ["Steps"],
|
|
@@ -101,8 +101,14 @@
|
|
|
101
101
|
"code": "function example() {\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const [tag, setTag] = React.useState<string>();\n\n return (\n <>\n <Button color=\"primary\" ref={buttonRef}>\n Target\n </Button>\n <Button ml=\"2\" onClick={() => setTag(buttonRef.current?.tagName)}>\n Read the tag from its ref\n </Button>\n <p>Rendered element: {tag ?? '—'}</p>\n </>\n );\n}"
|
|
102
102
|
}
|
|
103
103
|
],
|
|
104
|
-
"accessibility": "- **Labeling:** Always provide descriptive content for buttons for screen readers.\n- **Icons beside text:** Leave the `Icon` unnamed, so the text alone names the button. The icons in [With an Icon](https://bestax.io/docs/api/elements/button#with-an-icon) write out `aria-hidden=\"true\"`, and `Icon` would render it for them anyway, since they have no `ariaLabel`, `aria-label` or `aria-labelledby` to name them and no `role` or `tabIndex` of their own. A named icon joins the button's name instead, so `ariaLabel=\"Download\"` on the icon of a Download button makes a screen reader announce \"Download Download\".\n- **States:** The `isDisabled` and `disabled` props ensure correct `aria-disabled` and `disabled` attributes.\n- **Keyboard:** When rendered as `<a>`, disabled buttons are not focusable.\n- **Focus:** Use `isFocused` and `isActive` for visual feedback, but rely on browser focus for actual accessibility.\n- **Toggles:** `isActive` tells a screen reader nothing. A button that turns something on or off is a [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton), which sets `aria-pressed`.\n\n:::note\
|
|
105
|
-
"related": [
|
|
104
|
+
"accessibility": "- **Labeling:** Always provide descriptive content for buttons for screen readers.\n- **Icons beside text:** Leave the `Icon` unnamed, so the text alone names the button. The icons in [With an Icon](https://bestax.io/docs/api/elements/button#with-an-icon) write out `aria-hidden=\"true\"`, and `Icon` would render it for them anyway, since they have no `ariaLabel`, `aria-label` or `aria-labelledby` to name them and no `role` or `tabIndex` of their own. A named icon joins the button's name instead, so `ariaLabel=\"Download\"` on the icon of a Download button makes a screen reader announce \"Download Download\".\n- **States:** The `isDisabled` and `disabled` props ensure correct `aria-disabled` and `disabled` attributes.\n- **Keyboard:** When rendered as `<a>`, disabled buttons are not focusable.\n- **Focus:** Use `isFocused` and `isActive` for visual feedback, but rely on browser focus for actual accessibility.\n- **Toggles:** `isActive` tells a screen reader nothing. A button that turns something on or off is a [`ToggleButton`](https://bestax.io/docs/api/elements/togglebutton), which sets `aria-pressed`.\n\n:::note\nA button that shows only an icon is an [`IconButton`](https://bestax.io/docs/api/elements/iconbutton), whose types require an\n`aria-label` or an `aria-labelledby`, and whose `isRounded` makes a circle. On a plain `Button` holding only\nan icon, name it with `aria-label` yourself.\n:::",
|
|
105
|
+
"related": [
|
|
106
|
+
"Buttons",
|
|
107
|
+
"Icon",
|
|
108
|
+
"IconButton",
|
|
109
|
+
"ToggleButton",
|
|
110
|
+
"useBulmaClasses"
|
|
111
|
+
],
|
|
106
112
|
"storybook": "https://bestax.io/storybook/?path=/story/elements-button--default",
|
|
107
113
|
"summary": "The `Button` component provides a flexible and highly customizable button for your Bulma React UI.",
|
|
108
114
|
"import": "import { Button } from '@allxsmith/bestax-bulma';",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"title": "Compound (dot-notation) usage",
|
|
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</>"
|
|
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.IconButton icon=\"ellipsis\" aria-label=\"More actions\" />\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 [`SegmentedControl`](https://bestax.io/docs/api/components/segmentedcontrol) for it, which draws the same `has-addons` row, or [`Radios`](https://bestax.io/docs/api/form/radios) when the choice is sent with a form.\n\n:::tip\nYou can use all Bulma helper props (spacing, color, alignment) with `Buttons` for even more control.\n:::",
|
|
@@ -655,6 +655,236 @@
|
|
|
655
655
|
],
|
|
656
656
|
"catchAll": "All standard <button> attributes and Bulma helper props",
|
|
657
657
|
"types": []
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
"path": "Buttons.IconButton",
|
|
661
|
+
"summary": "The `IconButton` component renders a button that shows only an icon, and requires a name for it. It renders through `Button`, so it takes everything `Button` takes, and adds the icon and a name the types require: `aria-label`, or `aria-labelledby` in its place. Bulma keeps a button whose only child is an `.icon` square at every size, and `isRounded` makes it a circle. It has no tooltip of its own: wrap it in `Tooltip` for a description.",
|
|
662
|
+
"component": "IconButton",
|
|
663
|
+
"props": [
|
|
664
|
+
{
|
|
665
|
+
"name": "as",
|
|
666
|
+
"type": "React.ElementType",
|
|
667
|
+
"default": "'button'",
|
|
668
|
+
"description": "Render as a `<button>`, an `<a>`, or a custom component such as a router `Link`, as on `Button`.",
|
|
669
|
+
"required": false,
|
|
670
|
+
"inherited": false,
|
|
671
|
+
"deprecated": false
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "icon",
|
|
675
|
+
"type": "React.ReactNode",
|
|
676
|
+
"default": null,
|
|
677
|
+
"description": "The glyph. A string is an `Icon` name, drawn from the icon library `ConfigProvider` sets. An `<Icon>` renders as given, so it can carry its own `variant` or `library`. Any other node, such as an SVG or a component from an icon package, goes inside an `Icon`, which gives it the `.icon` wrapper Bulma keeps square. It's decorative: the button's name says what it does. Give the glyph here or as `children`, not both: with both, it draws `icon` and warns in development. With neither, such as an empty string from `cond ? 'trash' : ''`, the button is an empty square, and that warns in development too.",
|
|
678
|
+
"required": false,
|
|
679
|
+
"inherited": false,
|
|
680
|
+
"deprecated": false
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"name": "children",
|
|
684
|
+
"type": "React.ReactNode",
|
|
685
|
+
"default": null,
|
|
686
|
+
"description": "The glyph as children, the way Mantine, MUI and Chakra take it: an `<Icon>` renders as given, and any other node, such as an SVG, goes inside an `Icon`, as with `icon`. Left out when `icon` is given, which warns in development. Text warns too, since `aria-label` replaces it as the name: a button with text is a `Button`.",
|
|
687
|
+
"required": false,
|
|
688
|
+
"inherited": false,
|
|
689
|
+
"deprecated": false
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"name": "isRounded",
|
|
693
|
+
"type": "boolean",
|
|
694
|
+
"default": "false",
|
|
695
|
+
"description": "Makes the button a circle the size of its square. The circle comes from bestax's CSS, in `bestax.css` and its variants, or in `extras.css` next to your own Bulma. Without it, Bulma's `is-rounded` draws a pill a little wider than it is tall.",
|
|
696
|
+
"required": false,
|
|
697
|
+
"inherited": false,
|
|
698
|
+
"deprecated": false
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"name": "aria-labelledby",
|
|
702
|
+
"type": "string",
|
|
703
|
+
"default": null,
|
|
704
|
+
"description": "The id of the element whose text names the button, in place of `aria-label`.",
|
|
705
|
+
"required": false,
|
|
706
|
+
"inherited": true,
|
|
707
|
+
"deprecated": false
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"name": "aria-label",
|
|
711
|
+
"type": "string",
|
|
712
|
+
"default": null,
|
|
713
|
+
"description": "The button's name: what a screen reader announces and what a voice control user says to press it. Required, or `aria-labelledby` in its place, since an icon has no text to name it by. Name the action (\"Delete\"), not the picture (\"Trash\"). An empty or blank one warns in development.",
|
|
714
|
+
"required": false,
|
|
715
|
+
"inherited": true,
|
|
716
|
+
"deprecated": false
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"name": "color",
|
|
720
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'white' | 'light' | 'dark' | 'black' | 'text' | 'ghost'",
|
|
721
|
+
"default": null,
|
|
722
|
+
"description": "Bulma color variant for the button. `ghost` renders a link-like button; `text` renders a minimal text-only button.",
|
|
723
|
+
"required": false,
|
|
724
|
+
"inherited": true,
|
|
725
|
+
"deprecated": false
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"name": "size",
|
|
729
|
+
"type": "'small' | 'normal' | 'medium' | 'large'",
|
|
730
|
+
"default": null,
|
|
731
|
+
"description": "Size of the button.",
|
|
732
|
+
"required": false,
|
|
733
|
+
"inherited": true,
|
|
734
|
+
"deprecated": false
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"name": "isLight",
|
|
738
|
+
"type": "boolean",
|
|
739
|
+
"default": "false",
|
|
740
|
+
"description": "Applies a lighter color variant.",
|
|
741
|
+
"required": false,
|
|
742
|
+
"inherited": true,
|
|
743
|
+
"deprecated": false
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"name": "isLoading",
|
|
747
|
+
"type": "boolean",
|
|
748
|
+
"default": "false",
|
|
749
|
+
"description": "Displays a loading spinner, with everything inside the button hidden behind it, in forced colors (Windows' contrast themes) too. Under `prefers-reduced-motion: reduce` the spinner stops and stays drawn. Bulma alone hides only the label, so the rest needs bestax's CSS loaded.",
|
|
750
|
+
"required": false,
|
|
751
|
+
"inherited": true,
|
|
752
|
+
"deprecated": false
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"name": "isStatic",
|
|
756
|
+
"type": "boolean",
|
|
757
|
+
"default": "false",
|
|
758
|
+
"description": "Makes the button non-interactive.",
|
|
759
|
+
"required": false,
|
|
760
|
+
"inherited": true,
|
|
761
|
+
"deprecated": false
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"name": "isFullwidth",
|
|
765
|
+
"type": "boolean",
|
|
766
|
+
"default": "false",
|
|
767
|
+
"description": "Makes the button full-width.",
|
|
768
|
+
"required": false,
|
|
769
|
+
"inherited": true,
|
|
770
|
+
"deprecated": false
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"name": "isFullWidth",
|
|
774
|
+
"type": "boolean",
|
|
775
|
+
"default": "false",
|
|
776
|
+
"description": "Makes the button full-width.",
|
|
777
|
+
"required": false,
|
|
778
|
+
"inherited": true,
|
|
779
|
+
"deprecated": true,
|
|
780
|
+
"deprecationNote": "Use `isFullwidth` instead — `isFullwidth` wins if both are set."
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"name": "isOutlined",
|
|
784
|
+
"type": "boolean",
|
|
785
|
+
"default": "false",
|
|
786
|
+
"description": "Applies outlined styling (requires color).",
|
|
787
|
+
"required": false,
|
|
788
|
+
"inherited": true,
|
|
789
|
+
"deprecated": false
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"name": "isInverted",
|
|
793
|
+
"type": "boolean",
|
|
794
|
+
"default": "false",
|
|
795
|
+
"description": "Applies inverted styling (requires color).",
|
|
796
|
+
"required": false,
|
|
797
|
+
"inherited": true,
|
|
798
|
+
"deprecated": false
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"name": "isFocused",
|
|
802
|
+
"type": "boolean",
|
|
803
|
+
"default": "false",
|
|
804
|
+
"description": "Applies focused styling (visual only).",
|
|
805
|
+
"required": false,
|
|
806
|
+
"inherited": true,
|
|
807
|
+
"deprecated": false
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "isActive",
|
|
811
|
+
"type": "boolean",
|
|
812
|
+
"default": "false",
|
|
813
|
+
"description": "Applies active styling (visual only), with no `aria-pressed`. For a button that stays pressed, use `ToggleButton`.",
|
|
814
|
+
"required": false,
|
|
815
|
+
"inherited": true,
|
|
816
|
+
"deprecated": false
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"name": "isHovered",
|
|
820
|
+
"type": "boolean",
|
|
821
|
+
"default": "false",
|
|
822
|
+
"description": "Applies hovered styling (visual only).",
|
|
823
|
+
"required": false,
|
|
824
|
+
"inherited": true,
|
|
825
|
+
"deprecated": false
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"name": "isDisabled",
|
|
829
|
+
"type": "boolean",
|
|
830
|
+
"default": "false",
|
|
831
|
+
"description": "Applies disabled styling.",
|
|
832
|
+
"required": false,
|
|
833
|
+
"inherited": true,
|
|
834
|
+
"deprecated": false
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"name": "className",
|
|
838
|
+
"type": "string",
|
|
839
|
+
"default": null,
|
|
840
|
+
"description": "Custom class name.",
|
|
841
|
+
"required": false,
|
|
842
|
+
"inherited": true,
|
|
843
|
+
"deprecated": false
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"name": "textColor",
|
|
847
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
848
|
+
"default": null,
|
|
849
|
+
"description": "Text color helper.",
|
|
850
|
+
"required": false,
|
|
851
|
+
"inherited": true,
|
|
852
|
+
"deprecated": false,
|
|
853
|
+
"valuesRef": "helpers/valid-values"
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
"name": "bgColor",
|
|
857
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
858
|
+
"default": null,
|
|
859
|
+
"description": "Background color helper.",
|
|
860
|
+
"required": false,
|
|
861
|
+
"inherited": true,
|
|
862
|
+
"deprecated": false,
|
|
863
|
+
"valuesRef": "helpers/valid-values"
|
|
864
|
+
}
|
|
865
|
+
],
|
|
866
|
+
"extraProps": [
|
|
867
|
+
{
|
|
868
|
+
"name": "type",
|
|
869
|
+
"type": "string",
|
|
870
|
+
"default": "'button'",
|
|
871
|
+
"description": "On a `<button>`, `'button'`, `'submit'` or `'reset'`, and `'button'` unless you pass one of the other two, so it never submits a form by accident. With another `as`, whatever that element or component takes, passed through as given, such as an `<a>`'s MIME type.",
|
|
872
|
+
"required": false,
|
|
873
|
+
"inherited": false,
|
|
874
|
+
"deprecated": false
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"name": "ref",
|
|
878
|
+
"type": "PolymorphicRef<React.ElementType>",
|
|
879
|
+
"default": null,
|
|
880
|
+
"description": "Ref forwarded to the element `as` renders, typed from `as`.",
|
|
881
|
+
"required": false,
|
|
882
|
+
"inherited": false,
|
|
883
|
+
"deprecated": false
|
|
884
|
+
}
|
|
885
|
+
],
|
|
886
|
+
"catchAll": "Remaining props of the element or component selected by as (default <button>) and Bulma helper props",
|
|
887
|
+
"types": []
|
|
658
888
|
}
|
|
659
889
|
],
|
|
660
890
|
"cssVars": []
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Center",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "layout",
|
|
5
|
+
"slug": "layout/center",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/layout/center",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic Usage",
|
|
10
|
+
"code": "<Center aspectRatio=\"16by9\" bgColor=\"light\">\n <Loader textSize=\"3\" ariaLabel=\"Loading the report\" />\n</Center>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "In a Card",
|
|
14
|
+
"code": "<Card>\n <Card.Content>\n <Center p=\"6\">\n <Loader textSize=\"3\" ariaLabel=\"Loading invoices\" />\n </Center>\n </Card.Content>\n</Card>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Several Children",
|
|
18
|
+
"code": "<Center gap=\"2\" p=\"5\" bgColor=\"light\">\n <Span>Nothing here yet.</Span>\n <Button color=\"primary\">Add one</Button>\n</Center>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Inline",
|
|
22
|
+
"code": "<Block>\n Sync is{' '}\n <Center\n display=\"inline-flex\"\n bgColor=\"success\"\n textColor=\"white\"\n radius=\"rounded\"\n p=\"1\"\n >\n <Icon name=\"check\" ariaLabel=\"on\" />\n </Center>{' '}\n for every device.\n</Block>"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"accessibility": "- **No role of its own:** a Center adds nothing to the accessibility tree, apart from `role=\"list\"`\n on a `ul` or `ol`, which Safari otherwise drops once Bulma's reset hides the markers.\n- **Order:** several children stay in their own order, so what's seen, the reading order and the\n Tab order agree.\n- **What it centers names itself:** a loader or an icon in a Center needs its own accessible name,\n as `Loader`'s `ariaLabel` and `Icon`'s `ariaLabel` give it.",
|
|
26
|
+
"related": ["EmptyState", "Flex", "Loader", "Stack", "useBulmaClasses"],
|
|
27
|
+
"storybook": "https://bestax.io/storybook/?path=/story/layout-center--default",
|
|
28
|
+
"summary": "The `Center` component centers its content on both axes. Use it for a loader, an icon or an empty state in the middle of a box, a card or a section. Give it a height, or put it in something that has one, to center down the middle as well as across. Several children sit side by side in the middle, with no gap unless you set one.",
|
|
29
|
+
"import": "import { Center } from '@allxsmith/bestax-bulma';",
|
|
30
|
+
"sourceFile": "bulma-ui/src/layout/Center.tsx",
|
|
31
|
+
"rootClass": null,
|
|
32
|
+
"parts": [
|
|
33
|
+
{
|
|
34
|
+
"path": "Center",
|
|
35
|
+
"summary": "The `Center` component centers its content on both axes. Use it for a loader, an icon or an empty state in the middle of a box, a card or a section. Give it a height, or put it in something that has one, to center down the middle as well as across. Several children sit side by side in the middle, with no gap unless you set one.",
|
|
36
|
+
"component": null,
|
|
37
|
+
"props": [
|
|
38
|
+
{
|
|
39
|
+
"name": "as",
|
|
40
|
+
"type": "LayoutElement",
|
|
41
|
+
"default": "'div'",
|
|
42
|
+
"description": "The element to render. With `ul` or `ol`, give it `li` children: it restates `role=\"list\"`, which Bulma's list reset takes away in Safari.",
|
|
43
|
+
"required": false,
|
|
44
|
+
"inherited": false,
|
|
45
|
+
"deprecated": false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "gap",
|
|
49
|
+
"type": "BulmaGapStep",
|
|
50
|
+
"default": null,
|
|
51
|
+
"description": "Space between children, when there are several. None by default. Needs Bulma's helper classes: under `bestax-no-helpers.css` the default stays.",
|
|
52
|
+
"required": false,
|
|
53
|
+
"inherited": false,
|
|
54
|
+
"deprecated": false
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "display",
|
|
58
|
+
"type": "(typeof validDisplays)[number] | 'none'",
|
|
59
|
+
"default": null,
|
|
60
|
+
"description": "`'inline-flex'` sizes it to its content, to center something inside a line of text. Needs Bulma's helper classes: under `bestax-no-helpers.css` the default stays.",
|
|
61
|
+
"required": false,
|
|
62
|
+
"inherited": false,
|
|
63
|
+
"deprecated": false
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "className",
|
|
67
|
+
"type": "string",
|
|
68
|
+
"default": null,
|
|
69
|
+
"description": "Additional CSS classes.",
|
|
70
|
+
"required": false,
|
|
71
|
+
"inherited": true,
|
|
72
|
+
"deprecated": false
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "children",
|
|
76
|
+
"type": "React.ReactNode",
|
|
77
|
+
"default": null,
|
|
78
|
+
"description": "What it lays out. The top and bottom margins Bulma gives them are zeroed, so `gap` is the only space between them, and a spacing helper such as `mt=\"2\"` still adds to it. A `Columns` child keeps its own top and side margins, and takes at the bottom the one Bulma gives the last Columns in a container, the column gap pulled back in (none when gapless), so its columns line up. A `Pagination` child keeps its negative margins too, so its links line up.",
|
|
79
|
+
"required": false,
|
|
80
|
+
"inherited": true,
|
|
81
|
+
"deprecated": false
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "textColor",
|
|
85
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
86
|
+
"default": null,
|
|
87
|
+
"description": "Text color helper.",
|
|
88
|
+
"required": false,
|
|
89
|
+
"inherited": true,
|
|
90
|
+
"deprecated": false,
|
|
91
|
+
"valuesRef": "helpers/valid-values"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "bgColor",
|
|
95
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
96
|
+
"default": null,
|
|
97
|
+
"description": "Background color helper.",
|
|
98
|
+
"required": false,
|
|
99
|
+
"inherited": true,
|
|
100
|
+
"deprecated": false,
|
|
101
|
+
"valuesRef": "helpers/valid-values"
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"extraProps": [
|
|
105
|
+
{
|
|
106
|
+
"name": "ref",
|
|
107
|
+
"type": "PolymorphicRef<LayoutElement>",
|
|
108
|
+
"default": null,
|
|
109
|
+
"description": "Ref forwarded to the element `as` renders.",
|
|
110
|
+
"required": false,
|
|
111
|
+
"inherited": false,
|
|
112
|
+
"deprecated": false
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"catchAll": "Remaining props of the element selected by as and Bulma helper props",
|
|
116
|
+
"types": [
|
|
117
|
+
{
|
|
118
|
+
"name": "BulmaGapStep",
|
|
119
|
+
"expansion": "'0' | '0.5' | '1' | '1.5' | '2' | '2.5' | '3' | '3.5' | '4' | '4.5' | '5' | '5.5' | '6' | '6.5' | '7' | '7.5' | '8' | 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 4.5 | 5 | 5.5 | 6 | 6.5 | 7 | 7.5 | 8",
|
|
120
|
+
"summary": "A gap step as `gap`, `columnGap` and `rowGap` take it: a value from `validGaps`, or the same step written as a number (`gap={2}`, `gap={1.5}`). `Grid` took its gaps as numbers before the gap helpers were shared, so every gap prop still does."
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "LayoutElement",
|
|
124
|
+
"expansion": "'div' | 'main' | 'section' | 'article' | 'aside' | 'header' | 'footer' | 'nav' | 'ul' | 'ol' | 'form' | 'fieldset'",
|
|
125
|
+
"summary": "The elements Stack, Group, Center and Flex can render as: Container's landmarks and sections, a list, a form or a fieldset."
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"cssVars": []
|
|
131
|
+
}
|