bestax-mcp 1.18.32 → 1.18.34
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 +1 -0
- package/data/catalog.json +43 -2
- package/data/components/Button.json +1 -1
- package/data/components/Lightbox.json +430 -0
- package/data/components/Navbar.json +10 -1
- package/data/skills/bestax-custom-component/references/component-catalog.md +2 -1
- package/data/skills/bestax-migrate/references/bloomer/prop-map.md +1 -1
- package/data/skills/bestax-migrate/references/rbx/prop-map.md +1 -1
- package/data/skills/bestax-migrate/references/react-bulma-components/unmappables.md +1 -1
- package/data/skills/bestax-optimize/references/modular-build.md +21 -9
- package/data/skills/bestax-theming/references/css-variables.md +24 -0
- package/data/skills/bestax-theming/references/themeable-components.md +1 -0
- package/data/skills.json +7 -7
- package/package.json +2 -2
package/data/bulma-classes.json
CHANGED
|
@@ -13122,6 +13122,7 @@
|
|
|
13122
13122
|
"hover-card": "HoverCard",
|
|
13123
13123
|
"icon-button": "IconButton",
|
|
13124
13124
|
"kbd": "Kbd",
|
|
13125
|
+
"lightbox": "Lightbox",
|
|
13125
13126
|
"link-button": "LinkButton",
|
|
13126
13127
|
"loading": "Loading",
|
|
13127
13128
|
"numberinput": "Numberinput",
|
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.65.1"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"Dropdown",
|
|
74
74
|
"EmptyState",
|
|
75
75
|
"HoverCard",
|
|
76
|
+
"Lightbox",
|
|
76
77
|
"Loading",
|
|
77
78
|
"Menu",
|
|
78
79
|
"Message",
|
|
@@ -877,6 +878,17 @@
|
|
|
877
878
|
"propCount": 23,
|
|
878
879
|
"exampleCount": 5
|
|
879
880
|
},
|
|
881
|
+
{
|
|
882
|
+
"name": "Lightbox",
|
|
883
|
+
"kind": "component",
|
|
884
|
+
"category": "components",
|
|
885
|
+
"purpose": "The `Lightbox` component shows a set of images one at a time in a modal viewer, with previous and next, a counter, captions and zoom, opened from the…",
|
|
886
|
+
"slug": "components/lightbox",
|
|
887
|
+
"import": "import { Lightbox } from '@allxsmith/bestax-bulma';",
|
|
888
|
+
"compound": true,
|
|
889
|
+
"propCount": 21,
|
|
890
|
+
"exampleCount": 9
|
|
891
|
+
},
|
|
880
892
|
{
|
|
881
893
|
"name": "Link",
|
|
882
894
|
"kind": "component",
|
|
@@ -995,7 +1007,7 @@
|
|
|
995
1007
|
"slug": "components/navbar",
|
|
996
1008
|
"import": "import { Navbar } from '@allxsmith/bestax-bulma';",
|
|
997
1009
|
"compound": true,
|
|
998
|
-
"propCount":
|
|
1010
|
+
"propCount": 58,
|
|
999
1011
|
"exampleCount": 19
|
|
1000
1012
|
},
|
|
1001
1013
|
{
|
|
@@ -2562,6 +2574,30 @@
|
|
|
2562
2574
|
"--bulma-kbd-size": ["Kbd"],
|
|
2563
2575
|
"--bulma-kbd-weight": ["Kbd"],
|
|
2564
2576
|
"--bulma-level-item-spacing": ["Level"],
|
|
2577
|
+
"--bulma-lightbox-animation-duration": ["Lightbox"],
|
|
2578
|
+
"--bulma-lightbox-arrow-background": ["Lightbox"],
|
|
2579
|
+
"--bulma-lightbox-arrow-background-hover": ["Lightbox"],
|
|
2580
|
+
"--bulma-lightbox-arrow-color": ["Lightbox"],
|
|
2581
|
+
"--bulma-lightbox-arrow-icon-size": ["Lightbox"],
|
|
2582
|
+
"--bulma-lightbox-arrow-offset": ["Lightbox"],
|
|
2583
|
+
"--bulma-lightbox-arrow-size": ["Lightbox"],
|
|
2584
|
+
"--bulma-lightbox-button-border-width": ["Lightbox"],
|
|
2585
|
+
"--bulma-lightbox-caption-color": ["Lightbox"],
|
|
2586
|
+
"--bulma-lightbox-caption-max-width": ["Lightbox"],
|
|
2587
|
+
"--bulma-lightbox-caption-padding": ["Lightbox"],
|
|
2588
|
+
"--bulma-lightbox-controls-z-index": ["Lightbox"],
|
|
2589
|
+
"--bulma-lightbox-disabled-opacity": ["Lightbox"],
|
|
2590
|
+
"--bulma-lightbox-error-color": ["Lightbox"],
|
|
2591
|
+
"--bulma-lightbox-error-gap": ["Lightbox"],
|
|
2592
|
+
"--bulma-lightbox-error-padding": ["Lightbox"],
|
|
2593
|
+
"--bulma-lightbox-image-max-height": ["Lightbox"],
|
|
2594
|
+
"--bulma-lightbox-loader-size": ["Lightbox"],
|
|
2595
|
+
"--bulma-lightbox-spacing": ["Lightbox"],
|
|
2596
|
+
"--bulma-lightbox-toolbar-button-background": ["Lightbox"],
|
|
2597
|
+
"--bulma-lightbox-toolbar-button-background-hover": ["Lightbox"],
|
|
2598
|
+
"--bulma-lightbox-toolbar-color": ["Lightbox"],
|
|
2599
|
+
"--bulma-lightbox-toolbar-gap": ["Lightbox"],
|
|
2600
|
+
"--bulma-lightbox-toolbar-icon-size": ["Lightbox"],
|
|
2565
2601
|
"--bulma-link-button-ghost-color": ["LinkButton"],
|
|
2566
2602
|
"--bulma-link-button-ghost-hover-color": ["LinkButton"],
|
|
2567
2603
|
"--bulma-link-button-transition-duration": ["LinkButton"],
|
|
@@ -3517,6 +3553,11 @@
|
|
|
3517
3553
|
"path": "Level.Right",
|
|
3518
3554
|
"purpose": "Right-aligned content."
|
|
3519
3555
|
},
|
|
3556
|
+
"LightboxTrigger": {
|
|
3557
|
+
"component": "Lightbox",
|
|
3558
|
+
"path": "Lightbox.Trigger",
|
|
3559
|
+
"purpose": "A button around a thumbnail, or a line of text, that opens the viewer at its `index`."
|
|
3560
|
+
},
|
|
3520
3561
|
"MediaContent": {
|
|
3521
3562
|
"component": "Media",
|
|
3522
3563
|
"path": "Media.Content",
|
|
@@ -101,7 +101,7 @@
|
|
|
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\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:::",
|
|
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- **Focus ring:** Bulma shows a focused button with its border and a shadow. A ghost button has neither, and forced colors (Windows' contrast themes) drops the shadow and sets the border's color, so bestax's styles give a focused ghost button, and every focused button in forced colors, an outline. `isFocused` draws it too.\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
105
|
"related": [
|
|
106
106
|
"Buttons",
|
|
107
107
|
"CopyButton",
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Lightbox",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "components",
|
|
5
|
+
"slug": "components/lightbox",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/components/lightbox",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic Usage",
|
|
10
|
+
"code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n caption: 'A galaxy in purple and gold',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Columns isMobile>\n {photos.map((photo, i) => (\n <Column key={photo.src} size=\"one-third\">\n <Lightbox.Trigger index={i}>\n <Image as=\"div\" src={photo.src} alt={photo.alt} size=\"4by3\" />\n </Lightbox.Trigger>\n </Column>\n ))}\n </Columns>\n </Lightbox>\n );\n}"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "A Button That Opens the Album",
|
|
14
|
+
"code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Lightbox.Trigger index={0}>\n <Image as=\"div\" src={photos[0].src} alt=\"\" size=\"16by9\" />\n <Span display=\"block\" mt=\"2\" textWeight=\"semibold\">\n View all {photos.length} photos\n </Span>\n </Lightbox.Trigger>\n </Lightbox>\n );\n}"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "A Button That Opens the Album",
|
|
18
|
+
"code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n ]}\n>\n <Lightbox.Trigger as={Button} color=\"link\" index={0}>\n Open the photo\n </Lightbox.Trigger>\n</Lightbox>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Captions and Sizes",
|
|
22
|
+
"code": "function example() {\n const photos = [\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n caption: (\n <>\n <strong>The Milky Way</strong>, over a line of peaks\n </>\n ),\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n caption: 'Stars over the mountains',\n },\n ];\n\n return (\n <Lightbox items={photos}>\n <Buttons>\n {photos.map((photo, i) => (\n <Lightbox.Trigger key={photo.src} as={Button} index={i}>\n Photo {i + 1}\n </Lightbox.Trigger>\n ))}\n </Buttons>\n </Lightbox>\n );\n}"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Captions and Sizes",
|
|
26
|
+
"code": "const photos = [\n {\n src: '/photos/harbour-1600.jpg',\n srcSet: '/photos/harbour-800.jpg 800w, /photos/harbour-1600.jpg 1600w',\n sizes: '100vw',\n alt: 'Harbour at dusk',\n },\n];"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Keeping the Image in the URL",
|
|
30
|
+
"code": "function example() {\n const [photo, setPhoto] = useState<number>();\n const photos = [\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ];\n\n return (\n <>\n <Paragraph mb=\"3\">\n {photo === undefined ? 'No photo open.' : `?photo=${photo + 1}`}\n </Paragraph>\n <Button onClick={() => setPhoto(2)}>Open the third photo</Button>\n <Lightbox\n items={photos}\n open={photo !== undefined}\n onOpenChange={open => !open && setPhoto(undefined)}\n value={photo ?? 0}\n onChange={setPhoto}\n />\n </>\n );\n}"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Zoom",
|
|
34
|
+
"code": "<Lightbox\n maxZoom={6}\n items={[\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'Milky Way over silhouetted mountains',\n caption: 'Zoom in on the stars',\n },\n ]}\n>\n <Lightbox.Trigger as={Button} index={0}>\n Open the tall photo\n </Lightbox.Trigger>\n</Lightbox>"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Other Languages and Right to Left",
|
|
38
|
+
"code": "function example() {\n const arabic = new Intl.NumberFormat('ar-EG');\n const photos = [\n {\n src: '/img/carousel/carousel-banner-2.jpg',\n alt: 'درب التبانة فوق ظلال الجبال',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'سماء ليلية مرصعة بالنجوم فوق قمم الجبال',\n },\n ];\n\n return (\n <LocaleProvider dir=\"rtl\" locale=\"ar-EG\">\n <Lightbox\n items={photos}\n ariaLabel=\"عارض الصور\"\n labels={{\n close: 'إغلاق',\n previous: 'الصورة السابقة',\n next: 'الصورة التالية',\n zoomIn: 'تكبير',\n zoomOut: 'تصغير',\n resetZoom: 'إعادة الحجم',\n loading: 'جارٍ تحميل الصورة',\n loadError: 'تعذّر تحميل هذه الصورة.',\n retry: 'إعادة المحاولة',\n progress: (current, total) =>\n `الصورة ${arabic.format(current)} من ${arabic.format(total)}`,\n }}\n >\n <Lightbox.Trigger as={Button} index={0}>\n عرض الصور\n </Lightbox.Trigger>\n </Lightbox>\n </LocaleProvider>\n );\n}"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Compound (dot-notation) usage",
|
|
42
|
+
"code": "<Lightbox\n items={[\n {\n src: '/img/carousel/carousel-banner-1.jpg',\n alt: 'Vibrant galaxy with purple and gold tones',\n },\n {\n src: '/img/carousel/carousel-banner-3.jpg',\n alt: 'Starry night sky over mountain silhouettes',\n },\n ]}\n>\n <Buttons>\n <LightboxTrigger as={Button} index={0}>\n LightboxTrigger\n </LightboxTrigger>\n <Lightbox.Trigger as={Button} index={1}>\n Lightbox.Trigger\n </Lightbox.Trigger>\n </Buttons>\n</Lightbox>"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"accessibility": "- **A modal dialog:** the viewer is a `Modal` with `role=\"dialog\"` and `aria-modal`, named by\n `ariaLabel` (\"Image viewer\" by default) rather than by the image's alt, which changes with every\n image. Focus moves to the close button when it opens, Tab stays inside, Escape closes it when\n it's the topmost overlay, and focus goes back to the trigger, or to whatever had it when `open`\n was set.\n- **Real triggers:** each `Lightbox.Trigger` is a `<button type=\"button\" aria-haspopup=\"dialog\">`,\n or the button `Button` renders with `as={Button}`, named by its content. So the thumbnail's `alt`\n is the button's name, as long as it isn't inside a `<figure>` (give a ratio `Image` `as=\"div\"`).\n- **Every image has an alt:** `alt` is required in the type, a development build warns once for an\n item without one, and the caption is the `<figure>`'s `<figcaption>`, which names it.\n- **Moves are announced:** after the viewer opens and after each move, a polite status line says\n \"Image 3 of 10: Harbour at dusk\", from `labels.progress` and the image's alt. The visible counter\n is hidden from screen readers, so it isn't read twice. For an image that fails to load, the line\n starts with `labels.loadError`: \"This image didn't load. Image 3 of 10: Harbour at dusk\", and a\n Retry that fails again is announced again.\n- **At the ends:** with `repeat={false}`, the previous or next button is `aria-disabled` but stays in\n the tab order, so focus isn't dropped when it stops working. The zoom buttons do the same at their\n limits.\n- **Single-pointer alternatives:** pinch has the zoom buttons and a double click or tap. Panning a\n zoomed image is a drag, so zoom-out and reset are always one press away, and the arrow keys pan.\n- **Right to left:** the arrows, the keys and swipes follow the reading direction, so the next\n image is always the way the next arrow points.\n- **Contrast:** the counter, the caption and the buttons' icons are white on Bulma's near-black\n modal background in both schemes, well over the 4.5:1 WCAG asks of text.\n- **Forced colors:** the buttons draw their borders in the system's colors and the focus ring\n shows.\n- **Motion:** the open fade, the crossfade between images and the zoom transition stop under\n `prefers-reduced-motion: reduce`.",
|
|
46
|
+
"related": ["Carousel", "Figure", "Image", "Modal", "useBulmaClasses"],
|
|
47
|
+
"storybook": "https://bestax.io/storybook/?path=/story/components-lightbox--default",
|
|
48
|
+
"summary": "The `Lightbox` component shows a set of images one at a time in a modal viewer, with previous and next, a counter, captions and zoom, opened from the `Lightbox.Trigger` buttons you place. It renders its children where it stands, with no wrapper, and the viewer only while it's open, into a portal by default. The viewer is a `Modal`: focus moves to its close button, Tab stays inside, Escape and a click on the background close it, and focus goes back to the trigger.",
|
|
49
|
+
"import": "import { Lightbox } from '@allxsmith/bestax-bulma';",
|
|
50
|
+
"sourceFile": "bulma-ui/src/components/Lightbox.tsx",
|
|
51
|
+
"rootClass": "lightbox",
|
|
52
|
+
"parts": [
|
|
53
|
+
{
|
|
54
|
+
"path": "Lightbox",
|
|
55
|
+
"summary": "The `Lightbox` component shows a set of images one at a time in a modal viewer, with previous and next, a counter, captions and zoom, opened from the `Lightbox.Trigger` buttons you place. It renders its children where it stands, with no wrapper, and the viewer only while it's open, into a portal by default. The viewer is a `Modal`: focus moves to its close button, Tab stays inside, Escape and a click on the background close it, and focus goes back to the trigger.",
|
|
56
|
+
"component": null,
|
|
57
|
+
"props": [
|
|
58
|
+
{
|
|
59
|
+
"name": "items",
|
|
60
|
+
"type": "LightboxItem[]",
|
|
61
|
+
"default": null,
|
|
62
|
+
"description": "**Required.** The images, in order.",
|
|
63
|
+
"required": false,
|
|
64
|
+
"inherited": false,
|
|
65
|
+
"deprecated": false
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "children",
|
|
69
|
+
"type": "React.ReactNode",
|
|
70
|
+
"default": null,
|
|
71
|
+
"description": "Rendered in place: usually `Lightbox.Trigger`s, in whatever layout you like.",
|
|
72
|
+
"required": false,
|
|
73
|
+
"inherited": false,
|
|
74
|
+
"deprecated": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "open",
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": null,
|
|
80
|
+
"description": "Whether the viewer is open (controlled). With no `items` it shows nothing.",
|
|
81
|
+
"required": false,
|
|
82
|
+
"inherited": false,
|
|
83
|
+
"deprecated": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "defaultOpen",
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"default": "false",
|
|
89
|
+
"description": "Whether the viewer starts open (uncontrolled).",
|
|
90
|
+
"required": false,
|
|
91
|
+
"inherited": false,
|
|
92
|
+
"deprecated": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "onOpenChange",
|
|
96
|
+
"type": "(open: boolean) => void",
|
|
97
|
+
"default": null,
|
|
98
|
+
"description": "Called when a trigger, the close button, Escape, a click on the background or a swipe down opens or closes the viewer, and with `false` when `items` goes from some to none while it's open.",
|
|
99
|
+
"required": false,
|
|
100
|
+
"inherited": false,
|
|
101
|
+
"deprecated": false
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "value",
|
|
105
|
+
"type": "number",
|
|
106
|
+
"default": null,
|
|
107
|
+
"description": "The index of the image shown (controlled). A value past either end is shown as the last or the first image, or wrapped round with `repeat`, without calling `onChange`.",
|
|
108
|
+
"required": false,
|
|
109
|
+
"inherited": false,
|
|
110
|
+
"deprecated": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "defaultValue",
|
|
114
|
+
"type": "number",
|
|
115
|
+
"default": "0",
|
|
116
|
+
"description": "The image an uncontrolled viewer shows when something other than a trigger opens it. A trigger opens at its own `index`.",
|
|
117
|
+
"required": false,
|
|
118
|
+
"inherited": false,
|
|
119
|
+
"deprecated": false
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "onChange",
|
|
123
|
+
"type": "(value: number) => void",
|
|
124
|
+
"default": null,
|
|
125
|
+
"description": "Called with the new index when an arrow, a key or a swipe changes the image, and when a trigger opens the viewer, with the trigger's `index` even when that's the image already shown, before `onOpenChange(true)`. A parent that opens the viewer from `value` hears the trigger that way.",
|
|
126
|
+
"required": false,
|
|
127
|
+
"inherited": false,
|
|
128
|
+
"deprecated": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "repeat",
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"default": "true",
|
|
134
|
+
"description": "Go from the last image to the first and back, as Carousel does. Off, the previous and next buttons are `aria-disabled` at the ends.",
|
|
135
|
+
"required": false,
|
|
136
|
+
"inherited": false,
|
|
137
|
+
"deprecated": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "zoomable",
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"default": "true",
|
|
143
|
+
"description": "Zoom with the buttons, the wheel, a double click or tap, pinch and the `+`, `-` and `0` keys, and pan a zoomed image by dragging or with the arrow keys. Zoom waits for the image to load. `false` drops the zoom buttons and all of it.",
|
|
144
|
+
"required": false,
|
|
145
|
+
"inherited": false,
|
|
146
|
+
"deprecated": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "maxZoom",
|
|
150
|
+
"type": "number",
|
|
151
|
+
"default": "3",
|
|
152
|
+
"description": "How far an image zooms, as a multiple of its fitted size. The smallest zoom is always the fitted size.",
|
|
153
|
+
"required": false,
|
|
154
|
+
"inherited": false,
|
|
155
|
+
"deprecated": false
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "closeOnEscape",
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"default": "true",
|
|
161
|
+
"description": "Close on Escape. Only the topmost open overlay answers, as with Modal.",
|
|
162
|
+
"required": false,
|
|
163
|
+
"inherited": false,
|
|
164
|
+
"deprecated": false
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "closeOnClickOutside",
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"default": "true",
|
|
170
|
+
"description": "Close on a click on the dark background around the image. The space around the image, beside the toolbar's buttons and under the caption is all background.",
|
|
171
|
+
"required": false,
|
|
172
|
+
"inherited": false,
|
|
173
|
+
"deprecated": false
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "portal",
|
|
177
|
+
"type": "boolean | string | HTMLElement",
|
|
178
|
+
"default": "true",
|
|
179
|
+
"description": "Renders the viewer into a portal: `true` for the `ConfigProvider`'s `portalContainer` (`document.body` by default), a selector string, or an element. `false` renders it in place. It's on by default, unlike Modal's, Dialog's and Command.Dialog's, because its triggers sit in gallery cells, and a cell with a transform or a filter would trap a viewer rendered in place.",
|
|
180
|
+
"required": false,
|
|
181
|
+
"inherited": false,
|
|
182
|
+
"deprecated": false
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "ariaLabel",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"default": "'Image viewer'",
|
|
188
|
+
"description": "The dialog's accessible name. It stays the same from image to image; the status line says which image is shown.",
|
|
189
|
+
"required": false,
|
|
190
|
+
"inherited": false,
|
|
191
|
+
"deprecated": false
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "labels",
|
|
195
|
+
"type": "LightboxLabels",
|
|
196
|
+
"default": null,
|
|
197
|
+
"description": "The words it writes, for another language.",
|
|
198
|
+
"required": false,
|
|
199
|
+
"inherited": false,
|
|
200
|
+
"deprecated": false
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "className",
|
|
204
|
+
"type": "string",
|
|
205
|
+
"default": null,
|
|
206
|
+
"description": "Additional CSS classes.",
|
|
207
|
+
"required": false,
|
|
208
|
+
"inherited": false,
|
|
209
|
+
"deprecated": false
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"extraProps": [
|
|
213
|
+
{
|
|
214
|
+
"name": "ref",
|
|
215
|
+
"type": "React.Ref<HTMLDivElement>",
|
|
216
|
+
"default": null,
|
|
217
|
+
"description": "Ref forwarded to the viewer's `.modal` element, `null` while it's closed.",
|
|
218
|
+
"required": false,
|
|
219
|
+
"inherited": false,
|
|
220
|
+
"deprecated": false
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"catchAll": "All standard <div> attributes and Bulma helper props",
|
|
224
|
+
"types": []
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"path": "Lightbox.Trigger",
|
|
228
|
+
"summary": "A button around a thumbnail, or a line of text, that opens the viewer at its `index`.",
|
|
229
|
+
"component": null,
|
|
230
|
+
"props": [
|
|
231
|
+
{
|
|
232
|
+
"name": "as",
|
|
233
|
+
"type": "React.ElementType",
|
|
234
|
+
"default": "'button'",
|
|
235
|
+
"description": "Renders the trigger through another component, which gets its class, `aria-haspopup`, `type=\"button\"`, click handler and ref along with its own props. `as={Button} color=\"link\"` draws it as Bulma's link button. `color` is taken only with a component: on an element it would be HTML's old presentational attribute.",
|
|
236
|
+
"required": false,
|
|
237
|
+
"inherited": false,
|
|
238
|
+
"deprecated": false
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"name": "index",
|
|
242
|
+
"type": "number",
|
|
243
|
+
"default": null,
|
|
244
|
+
"description": "**Required.** The index in `items` the viewer opens at.",
|
|
245
|
+
"required": false,
|
|
246
|
+
"inherited": false,
|
|
247
|
+
"deprecated": false
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "children",
|
|
251
|
+
"type": "React.ReactNode",
|
|
252
|
+
"default": null,
|
|
253
|
+
"description": "What the button shows: a thumbnail, or text such as \"View all photos\". A ratio `Image` here takes `as=\"div\"`, since its `<figure>` would keep the image's alt from naming the button.",
|
|
254
|
+
"required": false,
|
|
255
|
+
"inherited": false,
|
|
256
|
+
"deprecated": false
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "className",
|
|
260
|
+
"type": "string",
|
|
261
|
+
"default": null,
|
|
262
|
+
"description": "Additional CSS classes.",
|
|
263
|
+
"required": false,
|
|
264
|
+
"inherited": false,
|
|
265
|
+
"deprecated": false
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"extraProps": [
|
|
269
|
+
{
|
|
270
|
+
"name": "ref",
|
|
271
|
+
"type": "PolymorphicRef<React.ElementType>",
|
|
272
|
+
"default": null,
|
|
273
|
+
"description": "Ref forwarded to the element `as` renders: the `<button>`, or what `Button` renders.",
|
|
274
|
+
"required": false,
|
|
275
|
+
"inherited": false,
|
|
276
|
+
"deprecated": false
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"catchAll": "Remaining props of the element or component selected by as (default <button>) and Bulma helper props",
|
|
280
|
+
"types": []
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"cssVars": [
|
|
284
|
+
{
|
|
285
|
+
"css": "--bulma-lightbox-arrow-background",
|
|
286
|
+
"sass": "$lightbox-arrow-background",
|
|
287
|
+
"default": "hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.3)",
|
|
288
|
+
"scope": "compound"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"css": "--bulma-lightbox-arrow-background-hover",
|
|
292
|
+
"sass": "$lightbox-arrow-background-hover",
|
|
293
|
+
"default": "hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.5)",
|
|
294
|
+
"scope": "compound"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"css": "--bulma-lightbox-arrow-color",
|
|
298
|
+
"sass": "$lightbox-arrow-color",
|
|
299
|
+
"default": "var(--bulma-white)",
|
|
300
|
+
"scope": "compound"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"css": "--bulma-lightbox-arrow-size",
|
|
304
|
+
"sass": "$lightbox-arrow-size",
|
|
305
|
+
"default": "3rem",
|
|
306
|
+
"scope": "compound"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"css": "--bulma-lightbox-arrow-offset",
|
|
310
|
+
"sass": "$lightbox-arrow-offset",
|
|
311
|
+
"default": "1rem",
|
|
312
|
+
"scope": "compound"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"css": "--bulma-lightbox-arrow-icon-size",
|
|
316
|
+
"sass": "$lightbox-arrow-icon-size",
|
|
317
|
+
"default": "1.5rem",
|
|
318
|
+
"scope": "compound"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"css": "--bulma-lightbox-toolbar-button-background",
|
|
322
|
+
"sass": "$lightbox-toolbar-button-background",
|
|
323
|
+
"default": "var(--bulma-lightbox-arrow-background)",
|
|
324
|
+
"scope": "compound"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"css": "--bulma-lightbox-toolbar-button-background-hover",
|
|
328
|
+
"sass": "$lightbox-toolbar-button-background-hover",
|
|
329
|
+
"default": "var(--bulma-lightbox-arrow-background-hover)",
|
|
330
|
+
"scope": "compound"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"css": "--bulma-lightbox-toolbar-icon-size",
|
|
334
|
+
"sass": "$lightbox-toolbar-icon-size",
|
|
335
|
+
"default": "1.25rem",
|
|
336
|
+
"scope": "compound"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"css": "--bulma-lightbox-button-border-width",
|
|
340
|
+
"sass": "$lightbox-button-border-width",
|
|
341
|
+
"default": "1px",
|
|
342
|
+
"scope": "compound"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"css": "--bulma-lightbox-disabled-opacity",
|
|
346
|
+
"sass": "$lightbox-disabled-opacity",
|
|
347
|
+
"default": "0.4",
|
|
348
|
+
"scope": "compound"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"css": "--bulma-lightbox-controls-z-index",
|
|
352
|
+
"sass": "$lightbox-controls-z-index",
|
|
353
|
+
"default": "$extras-z-index-base",
|
|
354
|
+
"scope": "compound"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"css": "--bulma-lightbox-toolbar-color",
|
|
358
|
+
"sass": "$lightbox-toolbar-color",
|
|
359
|
+
"default": "var(--bulma-white)",
|
|
360
|
+
"scope": "compound"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"css": "--bulma-lightbox-toolbar-gap",
|
|
364
|
+
"sass": "$lightbox-toolbar-gap",
|
|
365
|
+
"default": "0.75rem",
|
|
366
|
+
"scope": "compound"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"css": "--bulma-lightbox-caption-color",
|
|
370
|
+
"sass": "$lightbox-caption-color",
|
|
371
|
+
"default": "var(--bulma-white)",
|
|
372
|
+
"scope": "compound"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"css": "--bulma-lightbox-caption-max-width",
|
|
376
|
+
"sass": "$lightbox-caption-max-width",
|
|
377
|
+
"default": "40em",
|
|
378
|
+
"scope": "compound"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"css": "--bulma-lightbox-caption-padding",
|
|
382
|
+
"sass": "$lightbox-caption-padding",
|
|
383
|
+
"default": "0.75rem 1rem 0",
|
|
384
|
+
"scope": "compound"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"css": "--bulma-lightbox-error-color",
|
|
388
|
+
"sass": "$lightbox-error-color",
|
|
389
|
+
"default": "var(--bulma-lightbox-caption-color)",
|
|
390
|
+
"scope": "compound"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"css": "--bulma-lightbox-error-gap",
|
|
394
|
+
"sass": "$lightbox-error-gap",
|
|
395
|
+
"default": "0.75rem",
|
|
396
|
+
"scope": "compound"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"css": "--bulma-lightbox-error-padding",
|
|
400
|
+
"sass": "$lightbox-error-padding",
|
|
401
|
+
"default": "1rem",
|
|
402
|
+
"scope": "compound"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"css": "--bulma-lightbox-loader-size",
|
|
406
|
+
"sass": "$lightbox-loader-size",
|
|
407
|
+
"default": "2.5rem",
|
|
408
|
+
"scope": "compound"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"css": "--bulma-lightbox-spacing",
|
|
412
|
+
"sass": "$lightbox-spacing",
|
|
413
|
+
"default": "4.5rem",
|
|
414
|
+
"scope": "compound"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"css": "--bulma-lightbox-image-max-height",
|
|
418
|
+
"sass": "$lightbox-image-max-height",
|
|
419
|
+
"default": "calc(100% - 2 * var(--bulma-lightbox-spacing))",
|
|
420
|
+
"scope": "compound"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"css": "--bulma-lightbox-animation-duration",
|
|
424
|
+
"sass": "$lightbox-animation-duration",
|
|
425
|
+
"default": "var(--bulma-duration)",
|
|
426
|
+
"scope": "compound"
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"cssVarsFrom": "Modal"
|
|
430
|
+
}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"code": "<Navbar>\n <Navbar.Brand>\n <Navbar.Item href=\"#\">\n <img src=\"/img/logo.svg\" alt=\"Logo\" width=\"28\" height=\"28\" />\n </Navbar.Item>\n <Navbar.Burger aria-label=\"menu\" />\n </Navbar.Brand>\n <Navbar.Menu active>\n <Navbar.Start>\n <Navbar.Item href=\"#\">Home</Navbar.Item>\n <Navbar.Item href=\"#\">Docs</Navbar.Item>\n </Navbar.Start>\n <Navbar.End>\n <Navbar.Item href=\"#\">Log in</Navbar.Item>\n </Navbar.End>\n </Navbar.Menu>\n</Navbar>"
|
|
83
83
|
}
|
|
84
84
|
],
|
|
85
|
-
"accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover.\n\n:::note\nThere's no arrow-key roving between navbar items and no outside-click handling for\n`Navbar.Dropdown` — Bulma navbar dropdowns are hover/click surfaces, so this is intentionally\nkept simple.\n:::",
|
|
85
|
+
"accessibility": "- The root `Navbar` renders as `<nav role=\"navigation\" aria-label=\"main navigation\">`.\n The default accessible name is `main navigation`. A screen reader announces it with\n the role, and since the name holds the role word, \"navigation\" is heard twice.\n Pass a name without the role word (`aria-label=\"Site\"`), and a different name\n on each Navbar when a page has more than one. A passed `aria-label` replaces\n the default.\n- Use semantic links (`<a>`) and buttons, and provide clear `aria-label` and `aria-expanded` for the burger toggle.\n- `Navbar.Link` inside a `Navbar.Dropdown` automatically gets `aria-haspopup=\"true\"` and\n `aria-expanded` synced to the dropdown's open state — no manual wiring required.\n <kbd>Enter</kbd>/<kbd>Space</kbd> toggle the dropdown open/closed, and <kbd>Escape</kbd>\n closes it and keeps focus on the link. When the trigger isn't interactive on its own — no\n `href`, not `as=\"button\"`, and not a custom component — it also gets `role=\"button\"` and\n `tabIndex={0}` so it's reachable and operable by keyboard, and a mouse/touch click on it\n toggles the dropdown too (a caller-supplied `onClick` still runs, and can\n `preventDefault()` to opt out).\n- A custom component passed to `as` keeps its own semantics, because a router link takes `to`\n rather than `href` and so can't be recognised from the props it's given. If yours renders\n something non-interactive instead, pass `role=\"button\"` and it takes the fallback above —\n `tabIndex` and click included. The keyboard path is wired either way.\n- `hoverable` dropdowns keep working with a mouse (hover-to-open); the keyboard path above\n opens and closes them independently of hover.\n\n:::note\nThere's no arrow-key roving between navbar items and no outside-click handling for\n`Navbar.Dropdown` — Bulma navbar dropdowns are hover/click surfaces, so this is intentionally\nkept simple.\n:::",
|
|
86
86
|
"related": ["Button", "Icon", "useBulmaClasses"],
|
|
87
87
|
"storybook": "https://bestax.io/storybook/?path=/story/components-navbar--default",
|
|
88
88
|
"summary": "The `Navbar` component implements Bulma's powerful, responsive navigation bar for your Bulma React UI.",
|
|
@@ -177,6 +177,15 @@
|
|
|
177
177
|
"required": false,
|
|
178
178
|
"inherited": false,
|
|
179
179
|
"deprecated": false
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "aria-label",
|
|
183
|
+
"type": "React.AriaAttributes['aria-label']",
|
|
184
|
+
"default": "'main navigation'",
|
|
185
|
+
"description": "Accessible name. Defaults to `main navigation`. A screen reader announces it with the landmark's role, and since the name holds the role word, \"navigation\" is heard twice. Pass a name without it (`aria-label=\"Site\"`), and a different name on each Navbar when a page has more than one. A passed `aria-label` replaces the default, and `aria-label={undefined}` removes it, leaving the landmark unnamed.",
|
|
186
|
+
"required": false,
|
|
187
|
+
"inherited": false,
|
|
188
|
+
"deprecated": false
|
|
180
189
|
}
|
|
181
190
|
],
|
|
182
191
|
"extraProps": [
|
|
@@ -37,7 +37,7 @@ instead of hand-writing markup.
|
|
|
37
37
|
- Raw `*Base` form exports (`InputBase`, `SelectBase`, `TextAreaBase`, …) are
|
|
38
38
|
escape-hatch variants of the convenience wrappers above them; see the Form docs.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
134 documented components. Generated from the API docs — every exported
|
|
41
41
|
component is guaranteed to appear (the generator fails if one lacks an API page).
|
|
42
42
|
|
|
43
43
|
## Elements
|
|
@@ -102,6 +102,7 @@ component is guaranteed to appear (the generator fails if one lacks an API page)
|
|
|
102
102
|
- [Dropdown](https://bestax.io/docs/api/components/dropdown) — The `Dropdown` component provides Bulma's versatile dropdown menu for your Bulma React UI.
|
|
103
103
|
- [EmptyState](https://bestax.io/docs/api/components/emptystate) — The `EmptyState` component renders the block an app shows where content would be: an empty list, a search with no results, or a first-run screen.
|
|
104
104
|
- [HoverCard](https://bestax.io/docs/api/components/hovercard) — The `HoverCard` component shows a card previewing what's behind a link or a button while the pointer rests on it or keyboard focus is on it.
|
|
105
|
+
- [Lightbox](https://bestax.io/docs/api/components/lightbox) — The `Lightbox` component shows a set of images one at a time in a modal viewer, with previous and next, a counter, captions and zoom, opened from the…
|
|
105
106
|
- [Loading](https://bestax.io/docs/api/components/loading) — The `Loading` component provides a loading overlay with a spinner animation.
|
|
106
107
|
- [Menu](https://bestax.io/docs/api/components/menu) — The `Menu` component provides Bulma's vertical navigation menu: a simple, accessible sidebar or section menu for your Bulma React UI.
|
|
107
108
|
- [Message](https://bestax.io/docs/api/components/message) — The `Message` component provides Bulma's flexible notice/message box for your Bulma React UI.
|
|
@@ -190,7 +190,7 @@ value is flagged. The same conversion covers the modifiers bestax has no prop fo
|
|
|
190
190
|
## Refs
|
|
191
191
|
|
|
192
192
|
bloomer forwarded no refs. bestax forwards a ref from the form controls, plus `Affix`, `AppFrame`, `AppFrame.Aside`, `AppFrame.Burger`, `AppFrame.Footer`, `AppFrame.Header`, `AppFrame.Main`, `AppFrame.Nav`, `Avatar`, `Button`,
|
|
193
|
-
`Carousel`, `CarouselItem`, `Center`, `ColorSwatch`, `Command`, `Command.Dialog`, `Command.Input`, `CopyButton`, `DataTable`, `DescriptionList`, `DescriptionList.Item`, `DescriptionList.Label`, `DescriptionList.Value`, `Dialog`, `Dropdown`, `EmptyState`, `Flex`, `Group`, `IconButton`, `Kbd`, `Kbd.Group`, `Link`,
|
|
193
|
+
`Carousel`, `CarouselItem`, `Center`, `ColorSwatch`, `Command`, `Command.Dialog`, `Command.Input`, `CopyButton`, `DataTable`, `DescriptionList`, `DescriptionList.Item`, `DescriptionList.Label`, `DescriptionList.Value`, `Dialog`, `Dropdown`, `EmptyState`, `Flex`, `Group`, `IconButton`, `Kbd`, `Kbd.Group`, `Lightbox`, `Lightbox.Trigger`, `Link`,
|
|
194
194
|
`LinkButton`, `Loader`, `LocaleProvider`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`, `Navbar.Dropdown`,
|
|
195
195
|
`Navbar.Item`, `Navbar.Link`, `NumberFormatter`, `RingProgress`, `ScrollArea`, `SegmentedControl`, `SegmentedControl.Segment`, `Sidebar`, `Splitter`, `Splitter.Pane`, `Stack`, `Stat`, `Stat.Change`, `Stat.Description`, `Stat.Label`, `Stat.Value`, `Stats`, `TableOfContents`, `Timeline`,
|
|
196
196
|
`Timeline.Item`, `Toast`, `ToggleButton`, `TreeView` and `TreeView.Item` — pass `ref` directly on
|
|
@@ -187,7 +187,7 @@ TODO rather than write a second `ref`; keep whichever one you meant.
|
|
|
187
187
|
|
|
188
188
|
An existing `ref` is passed through untouched — which is safe only where the bestax target forwards
|
|
189
189
|
one. rbx forwards a ref on every component; bestax does so on the form controls, plus `Affix`, `AppFrame`, `AppFrame.Aside`, `AppFrame.Burger`, `AppFrame.Footer`, `AppFrame.Header`, `AppFrame.Main`, `AppFrame.Nav`, `Avatar`,
|
|
190
|
-
`Button`, `Carousel`, `CarouselItem`, `Center`, `ColorSwatch`, `Command`, `Command.Dialog`, `Command.Input`, `CopyButton`, `DataTable`, `DescriptionList`, `DescriptionList.Item`, `DescriptionList.Label`, `DescriptionList.Value`, `Dialog`, `Dropdown`, `EmptyState`, `Flex`, `Group`, `IconButton`, `Kbd`, `Kbd.Group`,
|
|
190
|
+
`Button`, `Carousel`, `CarouselItem`, `Center`, `ColorSwatch`, `Command`, `Command.Dialog`, `Command.Input`, `CopyButton`, `DataTable`, `DescriptionList`, `DescriptionList.Item`, `DescriptionList.Label`, `DescriptionList.Value`, `Dialog`, `Dropdown`, `EmptyState`, `Flex`, `Group`, `IconButton`, `Kbd`, `Kbd.Group`, `Lightbox`, `Lightbox.Trigger`,
|
|
191
191
|
`Link`, `LinkButton`, `Loader`, `LocaleProvider`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`, `Navbar.Dropdown`,
|
|
192
192
|
`Navbar.Item`, `Navbar.Link`, `NumberFormatter`, `RingProgress`, `ScrollArea`, `SegmentedControl`, `SegmentedControl.Segment`, `Sidebar`, `Splitter`, `Splitter.Pane`, `Stack`, `Stat`, `Stat.Change`, `Stat.Description`, `Stat.Label`, `Stat.Value`, `Stats`, `TableOfContents`, `Timeline`,
|
|
193
193
|
`Timeline.Item`, `Toast`, `ToggleButton`, `TreeView` and `TreeView.Item`. "The form controls" there
|
|
@@ -190,7 +190,7 @@ The same TODO marks a `Heading` that sets `size` and `textSize` both: drop `size
|
|
|
190
190
|
|
|
191
191
|
bestax components don't take `domRef`, but many forward a plain `ref` — the form controls, plus
|
|
192
192
|
`Affix`, `AppFrame`, `AppFrame.Aside`, `AppFrame.Burger`, `AppFrame.Footer`, `AppFrame.Header`, `AppFrame.Main`, `AppFrame.Nav`, `Avatar`, `Button`, `Carousel`, `CarouselItem`, `Center`, `ColorSwatch`, `Command`, `Command.Dialog`, `Command.Input`, `CopyButton`, `DataTable`, `DescriptionList`, `DescriptionList.Item`, `DescriptionList.Label`, `DescriptionList.Value`, `Dialog`, `Dropdown`, `EmptyState`, `Flex`, `Group`, `IconButton`, `Kbd`,
|
|
193
|
-
`Kbd.Group`, `Link`, `LinkButton`, `Loader`, `LocaleProvider`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`,
|
|
193
|
+
`Kbd.Group`, `Lightbox`, `Lightbox.Trigger`, `Link`, `LinkButton`, `Loader`, `LocaleProvider`, `Menu.Item`, `Modal`, `Navbar`, `Navbar.Burger`,
|
|
194
194
|
`Navbar.Dropdown`, `Navbar.Item`, `Navbar.Link`, `NumberFormatter`, `RingProgress`, `ScrollArea`, `SegmentedControl`, `SegmentedControl.Segment`,
|
|
195
195
|
`Sidebar`, `Splitter`, `Splitter.Pane`, `Stack`, `Stat`, `Stat.Change`, `Stat.Description`, `Stat.Label`, `Stat.Value`, `Stats`, `TableOfContents`, `Timeline`, `Timeline.Item`, `Toast`, `ToggleButton`, `TreeView` and `TreeView.Item`. On
|
|
196
196
|
those, rename `domRef` to `ref` and it works; do not restructure the markup. "The form controls"
|
|
@@ -46,7 +46,7 @@ publishes its SCSS sources (`src/scss` ships in the npm package, exposed via the
|
|
|
46
46
|
|
|
47
47
|
**Rule:** stock Bulma components map to `bulma/sass/<category>/<lowercased-name>`; bestax
|
|
48
48
|
extras map to `@allxsmith/bestax-bulma/scss/<category>/<lowercased-name>`. Components that
|
|
49
|
-
are pure stock Bulma (
|
|
49
|
+
are pure stock Bulma (Box, Card, Navbar, Modal, Hero, …) have **no** extras partial —
|
|
50
50
|
Bulma's own module is all they need.
|
|
51
51
|
|
|
52
52
|
Bulma groups its form controls, so their modules don't follow the name: `Input` and `TextArea`
|
|
@@ -80,9 +80,9 @@ is **more complete** than the docs page's Option C example, which omits several)
|
|
|
80
80
|
|
|
81
81
|
**Components** (`@allxsmith/bestax-bulma/scss/components/<name>`):
|
|
82
82
|
`loading`, `collapse`, `tooltip`, `popover`, `hovercard`, `contextmenu`, `steps`, `sidebar`,
|
|
83
|
-
`toast`, `dialog`, `carousel`, `tabs`, `menu`, `tableofcontents`, `reveal`, `avatar`, `avatars`,
|
|
84
|
-
`badge`, `emptystate`, `timeline`, `treeview`, `scrollarea`, `command`, `datatable`,
|
|
85
|
-
`affix`
|
|
83
|
+
`toast`, `dialog`, `carousel`, `lightbox`, `tabs`, `menu`, `tableofcontents`, `reveal`, `avatar`, `avatars`,
|
|
84
|
+
`badge`, `emptystate`, `timeline`, `treeview`, `scrollarea`, `command`, `datatable`,
|
|
85
|
+
`pagination`, `affix`
|
|
86
86
|
|
|
87
87
|
**Layout** (`@allxsmith/bestax-bulma/scss/layout/<name>`): `appframe`, `splitter`, `stack`
|
|
88
88
|
|
|
@@ -92,9 +92,9 @@ is **more complete** than the docs page's Option C example, which omits several)
|
|
|
92
92
|
`datetimeinput`, `daterangeinput`, `file`, `fieldset`, `field`, `dropzone`, `colorpicker`,
|
|
93
93
|
`colorinput`, `passwordinput`, `treeselect`
|
|
94
94
|
|
|
95
|
-
**Elements** (`@allxsmith/bestax-bulma/scss/elements/<name>`): `
|
|
96
|
-
`descriptionlist`, `iconbutton`, `kbd`, `linkbutton`, `loader`, `notification`,
|
|
97
|
-
`ringprogress`, `skeleton`, `stat`
|
|
95
|
+
**Elements** (`@allxsmith/bestax-bulma/scss/elements/<name>`): `button`, `colorswatch`,
|
|
96
|
+
`delete`, `descriptionlist`, `iconbutton`, `kbd`, `linkbutton`, `loader`, `notification`,
|
|
97
|
+
`progress`, `ringprogress`, `skeleton`, `stat`
|
|
98
98
|
|
|
99
99
|
**Helpers** (`@allxsmith/bestax-bulma/scss/helpers/<name>`): `cursor`, `sizing`
|
|
100
100
|
|
|
@@ -190,6 +190,11 @@ Notes:
|
|
|
190
190
|
`showLabel={false}` it's an `IconButton`, so add `iconbutton` for a rounded one to be a circle.
|
|
191
191
|
- `ContextMenu`'s menu is Bulma's dropdown markup, so an app using it needs
|
|
192
192
|
`bulma/sass/components/dropdown` next to `scss/components/contextmenu`.
|
|
193
|
+
- `Lightbox`'s viewer is Bulma's modal, with Bulma buttons for its controls and a `Loader` for a
|
|
194
|
+
slow image, so an app using it needs `bulma/sass/components/modal`,
|
|
195
|
+
`bulma/sass/elements/button` and `bulma/sass/elements/loader` next to
|
|
196
|
+
`scss/components/lightbox`, and the `delete` partial below for its close button in forced
|
|
197
|
+
colors.
|
|
193
198
|
- `Loader` is stock Bulma styled by `bulma/sass/elements/loader`, and the `isLoading`
|
|
194
199
|
spinners on `Button`, `Control` and `Select` are Bulma's too. The `loader` extras partial
|
|
195
200
|
stops all of them under `prefers-reduced-motion: reduce`, hides everything inside a loading
|
|
@@ -215,6 +220,12 @@ Notes:
|
|
|
215
220
|
(`bulma/sass/components/modal`) and `Tag isDelete` (`bulma/sass/elements/tag`) with them, so
|
|
216
221
|
include it (`as bestax-delete`) in any build that shows a close button. Its rules win over
|
|
217
222
|
Bulma's either way, so the order of the `@use` lines does not matter.
|
|
223
|
+
- `Button` is stock Bulma too (`bulma/sass/elements/button`). Bulma shows a focused button with
|
|
224
|
+
its border and a shadow, which a ghost button doesn't have, and forced colors (Windows'
|
|
225
|
+
contrast themes) drops the shadow and sets the border's color, so a focused button can look
|
|
226
|
+
like an unfocused one there. The `button` extras partial gives those a focus outline, so
|
|
227
|
+
include it (`as bestax-button`) in any build that loads Bulma's button module. Its rules win
|
|
228
|
+
over Bulma's either way, so the order of the `@use` lines does not matter.
|
|
218
229
|
- `Stats` lays its row out on Bulma's smart grid (`.grid` and `is-col-min-*`), so a build with a
|
|
219
230
|
`Stats` row wants `bulma/sass/grid/grid` beside the `stat` partial, which only resets the row's
|
|
220
231
|
margins.
|
|
@@ -279,8 +290,8 @@ not `flexbox` — `flexbox` holds only the alignment props. Verified failure mod
|
|
|
279
290
|
The `npm create bestax` starter renders `Container`, `Section`, `Columns`/`Column`, `Image`,
|
|
280
291
|
`Title`/`SubTitle`, `Box`, `Card`, `Buttons`/`Button`, and `Notification` with its close
|
|
281
292
|
button: all stock Bulma, plus the `notification` and `delete` extras partials for that close
|
|
282
|
-
button. Its
|
|
283
|
-
|
|
293
|
+
button and the `button` partial for the buttons' focus outline in forced colors. Its helper
|
|
294
|
+
props are `display` (visibility), `flexGrow` (flexbox), and `textAlign` (typography);
|
|
284
295
|
it uses no spacing or color props. That inventory compiles to the following, verified
|
|
285
296
|
pixel-equivalent to the prebuilt `complete` flavor in headless Chromium (light and dark, phone
|
|
286
297
|
and desktop width, notification open), at 274 KB raw / 30 KB gzip vs 819 KB / 84 KB.
|
|
@@ -311,6 +322,7 @@ Scaffolded with an icon library, the starter also needs `bulma/sass/elements/ico
|
|
|
311
322
|
@use 'bulma/sass/helpers/flexbox'; // flexGrow
|
|
312
323
|
@use 'bulma/sass/helpers/typography'; // textAlign
|
|
313
324
|
|
|
325
|
+
@use '@allxsmith/bestax-bulma/scss/elements/button' as bestax-button; // focus outline in forced colors
|
|
314
326
|
@use '@allxsmith/bestax-bulma/scss/elements/delete' as bestax-delete; // the close button in forced colors
|
|
315
327
|
@use '@allxsmith/bestax-bulma/scss/elements/notification' as bestax-notification; // text clears the close button
|
|
316
328
|
```
|
|
@@ -687,6 +687,30 @@ in a tooltip without an override of its own. The sizes are in `em`, so `textSize
|
|
|
687
687
|
`--bulma-kbd-border-width`, `--bulma-kbd-color`, `--bulma-kbd-family`, `--bulma-kbd-padding`,
|
|
688
688
|
`--bulma-kbd-radius`, `--bulma-kbd-size`, `--bulma-kbd-weight`
|
|
689
689
|
|
|
690
|
+
### Lightbox
|
|
691
|
+
|
|
692
|
+
Declared on the viewer's root, `.modal.lightbox`, which also sets Bulma's own
|
|
693
|
+
`--bulma-modal-content-width`, so the image is as wide as the viewer less the room for the arrows.
|
|
694
|
+
That's two classes, so a lone class through `className` loses to it: set them inline through
|
|
695
|
+
`style`, which lands on the root, or with a rule at least as specific that loads after the
|
|
696
|
+
library's. Its background is Bulma's modal background, `--bulma-modal-background-background-color`,
|
|
697
|
+
near-black in both schemes, which is why the text and the icons default to white; keep them light
|
|
698
|
+
if you change it. In forced colors the buttons' borders take the system's colors whatever these say.
|
|
699
|
+
The zoom buttons start from the arrows' backgrounds and the error's text from the caption's color,
|
|
700
|
+
so each follows the other until you set it apart. The fades and the zoom take Bulma's
|
|
701
|
+
`--bulma-duration` and `--bulma-easing`.
|
|
702
|
+
|
|
703
|
+
`--bulma-lightbox-animation-duration`, `--bulma-lightbox-arrow-background`,
|
|
704
|
+
`--bulma-lightbox-arrow-background-hover`, `--bulma-lightbox-arrow-color`,
|
|
705
|
+
`--bulma-lightbox-arrow-icon-size`, `--bulma-lightbox-arrow-offset`, `--bulma-lightbox-arrow-size`,
|
|
706
|
+
`--bulma-lightbox-button-border-width`, `--bulma-lightbox-caption-color`,
|
|
707
|
+
`--bulma-lightbox-caption-max-width`, `--bulma-lightbox-caption-padding`,
|
|
708
|
+
`--bulma-lightbox-controls-z-index`, `--bulma-lightbox-disabled-opacity`,
|
|
709
|
+
`--bulma-lightbox-error-color`, `--bulma-lightbox-error-gap`, `--bulma-lightbox-error-padding`,
|
|
710
|
+
`--bulma-lightbox-image-max-height`, `--bulma-lightbox-loader-size`, `--bulma-lightbox-spacing`,
|
|
711
|
+
`--bulma-lightbox-toolbar-button-background`, `--bulma-lightbox-toolbar-button-background-hover`,
|
|
712
|
+
`--bulma-lightbox-toolbar-color`, `--bulma-lightbox-toolbar-gap`, `--bulma-lightbox-toolbar-icon-size`
|
|
713
|
+
|
|
690
714
|
### LinkButton
|
|
691
715
|
|
|
692
716
|
Declared on the compound `.button.link-button` — see the compound-selector exception above.
|
|
@@ -82,6 +82,7 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
|
|
|
82
82
|
| `Hero` | every `validColors` member + `inherit`/`current` (the `-bis`/`-ter` shades, the greys, `inherit` and `current` deprecated: no CSS, dev-warn, removed next major — see ⚠️) | `small \| medium \| large \| fullheight \| fullheight-with-navbar` | section background |
|
|
83
83
|
| `IconButton` | `primary \| link \| info \| success \| warning \| danger \| white \| light \| dark \| black \| text \| ghost` | `small \| normal \| medium \| large` | renders `Button`, so also `isLight`, `isOutlined`, `isInverted`; `isRounded` is a circle; retheme through `--bulma-button-*` |
|
|
84
84
|
| `Kbd` | — (no `color`: the edge and fill are mixed from the text color, so `textColor` tints them; `bgColor` replaces the fill, so pair it with a `textColor`) | — (sized in `em` from the text around it; size it with `textSize`) | one keycap look, no `variant`; `Kbd.Group` takes `textColor` too; retheme through `--bulma-kbd-*` |
|
|
85
|
+
| `Lightbox` | — (no `color`: the viewer is white on Bulma's near-black modal background) | — | retheme through `--bulma-lightbox-*` and Bulma's `--bulma-modal-*`; the triggers draw nothing of their own, or render through `Button` with `as` |
|
|
85
86
|
| `LinkButton` | `primary \| link \| info \| success \| warning \| danger \| white \| light \| dark \| black` | — | button-styled link; emits `link-button-<color>` — **no `isLight`/`isOutlined`/`isInverted`** |
|
|
86
87
|
| `Loader` | — (no color props: the ring is drawn in `--bulma-border`) | — (the ring is `1em`; size it with `textSize`) | for a colored spinner over a region, use `Loading` |
|
|
87
88
|
| `Loading` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | spinner color; default light grey |
|
package/data/skills.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{
|
|
11
11
|
"id": "component-catalog",
|
|
12
12
|
"file": "references/component-catalog.md",
|
|
13
|
-
"bytes":
|
|
13
|
+
"bytes": 26656
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"id": "library-contributor",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
{
|
|
94
94
|
"id": "bloomer-prop-map",
|
|
95
95
|
"file": "references/bloomer/prop-map.md",
|
|
96
|
-
"bytes":
|
|
96
|
+
"bytes": 27249
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"id": "bloomer-unmappables",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
{
|
|
129
129
|
"id": "rbx-prop-map",
|
|
130
130
|
"file": "references/rbx/prop-map.md",
|
|
131
|
-
"bytes":
|
|
131
|
+
"bytes": 16090
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"id": "rbx-unmappables",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
{
|
|
149
149
|
"id": "react-bulma-components-unmappables",
|
|
150
150
|
"file": "references/react-bulma-components/unmappables.md",
|
|
151
|
-
"bytes":
|
|
151
|
+
"bytes": 14441
|
|
152
152
|
}
|
|
153
153
|
],
|
|
154
154
|
"examples": []
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
{
|
|
163
163
|
"id": "modular-build",
|
|
164
164
|
"file": "references/modular-build.md",
|
|
165
|
-
"bytes":
|
|
165
|
+
"bytes": 18670
|
|
166
166
|
}
|
|
167
167
|
],
|
|
168
168
|
"examples": []
|
|
@@ -176,12 +176,12 @@
|
|
|
176
176
|
{
|
|
177
177
|
"id": "css-variables",
|
|
178
178
|
"file": "references/css-variables.md",
|
|
179
|
-
"bytes":
|
|
179
|
+
"bytes": 71535
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
"id": "themeable-components",
|
|
183
183
|
"file": "references/themeable-components.md",
|
|
184
|
-
"bytes":
|
|
184
|
+
"bytes": 39801
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
187
|
"examples": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.34",
|
|
4
4
|
"mcpName": "io.github.allxsmith/bestax-mcp",
|
|
5
5
|
"description": "MCP server for @allxsmith/bestax-bulma — component props, examples, CSS variables and agent skills, served offline from a version-pinned index",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
44
44
|
"zod": "^4.6.7",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.65.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^26.6.6",
|