bestax-mcp 0.0.0
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/README.md +90 -0
- package/data/catalog.json +1869 -0
- package/data/components/Autocomplete.json +604 -0
- package/data/components/Avatar.json +220 -0
- package/data/components/Avatars.json +294 -0
- package/data/components/Badge.json +261 -0
- package/data/components/Block.json +105 -0
- package/data/components/Box.json +157 -0
- package/data/components/Breadcrumb.json +155 -0
- package/data/components/Button.json +599 -0
- package/data/components/Buttons.json +533 -0
- package/data/components/Card.json +506 -0
- package/data/components/Carousel.json +512 -0
- package/data/components/Cell.json +154 -0
- package/data/components/Checkbox.json +176 -0
- package/data/components/Checkboxes.json +240 -0
- package/data/components/Code.json +128 -0
- package/data/components/Collapse.json +218 -0
- package/data/components/Column.json +284 -0
- package/data/components/Columns.json +542 -0
- package/data/components/ConfigProvider.json +16 -0
- package/data/components/Container.json +149 -0
- package/data/components/Content.json +228 -0
- package/data/components/Control.json +484 -0
- package/data/components/DateInput.json +872 -0
- package/data/components/DateTimeInput.json +952 -0
- package/data/components/Delete.json +153 -0
- package/data/components/Dialog.json +285 -0
- package/data/components/Divider.json +68 -0
- package/data/components/Dropdown.json +353 -0
- package/data/components/Emphasis.json +99 -0
- package/data/components/Field.json +539 -0
- package/data/components/Figure.json +143 -0
- package/data/components/File.json +403 -0
- package/data/components/Footer.json +109 -0
- package/data/components/Grid.json +357 -0
- package/data/components/Hero.json +340 -0
- package/data/components/Icon.json +232 -0
- package/data/components/IconText.json +307 -0
- package/data/components/Image.json +166 -0
- package/data/components/Input.json +583 -0
- package/data/components/Level.json +332 -0
- package/data/components/Link.json +154 -0
- package/data/components/LinkButton.json +247 -0
- package/data/components/ListItem.json +101 -0
- package/data/components/Loading.json +323 -0
- package/data/components/Media.json +345 -0
- package/data/components/Menu.json +317 -0
- package/data/components/Message.json +303 -0
- package/data/components/Modal.json +444 -0
- package/data/components/Navbar.json +996 -0
- package/data/components/Notification.json +165 -0
- package/data/components/Numberinput.json +364 -0
- package/data/components/OrderedList.json +189 -0
- package/data/components/Pagination.json +619 -0
- package/data/components/Panel.json +582 -0
- package/data/components/Paragraph.json +107 -0
- package/data/components/Pre.json +114 -0
- package/data/components/Progress.json +137 -0
- package/data/components/Radio.json +164 -0
- package/data/components/Radios.json +240 -0
- package/data/components/Rate.json +466 -0
- package/data/components/Reveal.json +177 -0
- package/data/components/Section.json +123 -0
- package/data/components/Select.json +526 -0
- package/data/components/Sidebar.json +488 -0
- package/data/components/Skeleton.json +162 -0
- package/data/components/Slider.json +534 -0
- package/data/components/Span.json +100 -0
- package/data/components/Steps.json +452 -0
- package/data/components/Strong.json +105 -0
- package/data/components/SubTitle.json +233 -0
- package/data/components/Switch.json +291 -0
- package/data/components/Table.json +490 -0
- package/data/components/Tabs.json +592 -0
- package/data/components/Tag.json +197 -0
- package/data/components/Taginput.json +587 -0
- package/data/components/Tags.json +181 -0
- package/data/components/TextArea.json +483 -0
- package/data/components/Theme.json +65 -0
- package/data/components/TimeInput.json +906 -0
- package/data/components/Title.json +240 -0
- package/data/components/Toast.json +308 -0
- package/data/components/Tooltip.json +212 -0
- package/data/components/UnorderedList.json +149 -0
- package/data/components/Valid value constants.json +16 -0
- package/data/components/classNames.json +65 -0
- package/data/components/useBulmaClasses.json +169 -0
- package/data/components/usePrefixedClassNames.json +25 -0
- package/data/skills/bestax-custom-component/SKILL.md +196 -0
- package/data/skills/bestax-custom-component/examples/stat-card.tsx +105 -0
- package/data/skills/bestax-custom-component/references/api.md +90 -0
- package/data/skills/bestax-custom-component/references/component-catalog.md +149 -0
- package/data/skills/bestax-custom-component/references/library-contributor.md +395 -0
- package/data/skills/bestax-custom-component/references/patterns.md +136 -0
- package/data/skills/bestax-form/SKILL.md +254 -0
- package/data/skills/bestax-form/references/api.md +103 -0
- package/data/skills/bestax-form/references/patterns.md +210 -0
- package/data/skills/bestax-icons/SKILL.md +80 -0
- package/data/skills/bestax-icons/examples/icon-usage.tsx +80 -0
- package/data/skills/bestax-icons/references/icon-libraries.md +131 -0
- package/data/skills/bestax-layout-scaffold/SKILL.md +196 -0
- package/data/skills/bestax-layout-scaffold/examples/app-shell.tsx +86 -0
- package/data/skills/bestax-layout-scaffold/examples/card-grid.tsx +106 -0
- package/data/skills/bestax-layout-scaffold/examples/centered.tsx +56 -0
- package/data/skills/bestax-layout-scaffold/examples/content-page.tsx +90 -0
- package/data/skills/bestax-layout-scaffold/examples/landing.tsx +122 -0
- package/data/skills/bestax-layout-scaffold/references/archetypes.md +246 -0
- package/data/skills/bestax-layout-scaffold/references/layout-components.md +269 -0
- package/data/skills/bestax-migrate/SKILL.md +78 -0
- package/data/skills/bestax-migrate/references/component-map.md +91 -0
- package/data/skills/bestax-migrate/references/css-migration.md +100 -0
- package/data/skills/bestax-migrate/references/prop-map.md +48 -0
- package/data/skills/bestax-migrate/references/unmappables.md +124 -0
- package/data/skills/bestax-optimize/SKILL.md +131 -0
- package/data/skills/bestax-optimize/references/modular-build.md +173 -0
- package/data/skills/bestax-theming/SKILL.md +117 -0
- package/data/skills/bestax-theming/examples/dark-mode.tsx +38 -0
- package/data/skills/bestax-theming/examples/theme-config.tsx +60 -0
- package/data/skills/bestax-theming/references/css-variables.md +466 -0
- package/data/skills/bestax-theming/references/themeable-components.md +119 -0
- package/data/skills.json +148 -0
- package/dist/data.d.ts +131 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/data.js +111 -0
- package/dist/format.d.ts +37 -0
- package/dist/format.d.ts.map +1 -0
- package/dist/format.js +178 -0
- package/dist/helper-props.d.ts +57 -0
- package/dist/helper-props.d.ts.map +1 -0
- package/dist/helper-props.js +249 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/search.d.ts +32 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +194 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +616 -0
- package/dist/version.d.ts +29 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +147 -0
- package/package.json +70 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Badge",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "components",
|
|
5
|
+
"slug": "components/badge",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/components/badge",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Status Dot on an Avatar",
|
|
10
|
+
"code": "<Badge dot color=\"success\" overlap=\"circle\">\n <Avatar name=\"Ada Lovelace\" />\n</Badge>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Unread Count",
|
|
14
|
+
"code": "<Badge content={128} max={99} color=\"danger\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" />\n</Badge>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Unread Mail",
|
|
18
|
+
"code": "<Badge content={4} color=\"danger\">\n <Icon name=\"envelope\" ariaLabel=\"Inbox, 4 unread messages\" size=\"large\" />\n</Badge>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Badge on a Button",
|
|
22
|
+
"code": "<Badge content={3} color=\"danger\" overlap=\"square\">\n <Button color=\"primary\">\n <Icon name=\"shopping-cart\" ariaLabel=\"Cart\" />\n <span>Cart</span>\n </Button>\n</Badge>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Positions",
|
|
26
|
+
"code": "<Block display=\"flex\">\n <Badge content={1} position=\"top-right\" mr=\"5\">\n <Avatar name=\"A\" shape=\"square\" />\n </Badge>\n <Badge content={2} position=\"top-left\" mr=\"5\">\n <Avatar name=\"B\" shape=\"square\" />\n </Badge>\n <Badge content={3} position=\"bottom-right\" mr=\"5\">\n <Avatar name=\"C\" shape=\"square\" />\n </Badge>\n <Badge content={4} position=\"bottom-left\">\n <Avatar name=\"D\" shape=\"square\" />\n </Badge>\n</Block>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Overlap: Circle vs Square",
|
|
30
|
+
"code": "<Block display=\"flex\">\n <Badge content={5} overlap=\"square\" mr=\"5\">\n <Avatar name=\"Square\" shape=\"square\" />\n </Badge>\n <Badge content={5} overlap=\"circle\">\n <Avatar name=\"Circle\" shape=\"circle\" />\n </Badge>\n</Block>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Colors",
|
|
34
|
+
"code": "<Block display=\"flex\">\n <Badge content={1} color=\"primary\" mr=\"5\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n <Badge content={2} color=\"info\" mr=\"5\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n <Badge content={3} color=\"success\" mr=\"5\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n <Badge content={4} color=\"warning\" mr=\"5\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n <Badge content={5} color=\"danger\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n</Block>"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Pulse",
|
|
38
|
+
"code": "<Badge dot color=\"success\" pulse overlap=\"circle\">\n <Avatar name=\"Ada Lovelace\" />\n</Badge>"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Toggling Visibility",
|
|
42
|
+
"code": "function example() {\n const [muted, setMuted] = useState(false);\n\n return (\n <Block display=\"flex\" alignItems=\"center\">\n <Badge content={4} color=\"danger\" invisible={muted} mr=\"5\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n <Button onClick={() => setMuted(m => !m)}>\n {muted ? 'Show badge' : 'Hide badge'}\n </Button>\n </Block>\n );\n}"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Hidden at Zero (unless `showZero`)",
|
|
46
|
+
"code": "<Block display=\"flex\">\n <Badge content={0} mr=\"5\">\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n <Badge content={0} showZero>\n <Icon name=\"bell\" ariaLabel=\"Notifications\" size=\"large\" />\n </Badge>\n</Block>"
|
|
47
|
+
},
|
|
48
|
+
{ "title": "Standalone", "code": "<Badge content={5} color=\"info\" />" },
|
|
49
|
+
{
|
|
50
|
+
"title": "Standalone, Interactive",
|
|
51
|
+
"code": "function example() {\n const [clicks, setClicks] = useState(0);\n\n return (\n <Badge content={clicks} showZero onClick={() => setClicks(c => c + 1)} />\n );\n}"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"title": "Standalone, Pulse",
|
|
55
|
+
"code": "<Badge content={5} color=\"danger\" pulse />"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"title": "Text Child",
|
|
59
|
+
"code": "<Badge content={3} color=\"primary\">\n Inbox\n</Badge>"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"title": "Custom Node Content",
|
|
63
|
+
"code": "<Badge content={<Icon name=\"check\" />} color=\"success\">\n <Avatar name=\"Ada Lovelace\" />\n</Badge>"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"accessibility": "- A count/text badge exposes `role=\"status\"` and an `aria-label` announcing its content.\n- At `content={0}` without `showZero`, the pill is visually hidden but stays mounted as an\n empty `role=\"status\"` node, so a later `0 -> 1` change mutates an existing live region and\n is reliably announced (a live region inserted already populated often isn't).\n- A bare number in a `role=\"status\"` span is not enough context on its own — put the full\n meaning on the anchor itself, e.g. `<Icon ariaLabel=\"Inbox, 4 unread messages\" />` rather than\n relying on the badge to read out just \"4\".\n- A decorative `dot` badge is `aria-hidden`.\n- `pulse` respects `prefers-reduced-motion: reduce` and renders without animation.\n- Note the two hide mechanisms differ: the Bulma `visibility=\"invisible\"` helper hides the whole\n wrapper (anchor included), while the `invisible` **prop** hides only the badge pill.",
|
|
67
|
+
"related": ["Avatar", "Icon", "Tag", "useBulmaClasses"],
|
|
68
|
+
"storybook": "https://bestax.io/storybook/?path=/story/components-badge--unread-count",
|
|
69
|
+
"summary": "The `Badge` component is a small status/count indicator overlaid on the corner of another element, or rendered standalone.",
|
|
70
|
+
"import": "import { Badge } from '@allxsmith/bestax-bulma';",
|
|
71
|
+
"sourceFile": "bulma-ui/src/components/Badge.tsx",
|
|
72
|
+
"rootClass": "badge",
|
|
73
|
+
"parts": [
|
|
74
|
+
{
|
|
75
|
+
"path": "Badge",
|
|
76
|
+
"summary": "The `Badge` component is a small status/count indicator overlaid on the corner of another element, or rendered standalone.",
|
|
77
|
+
"component": null,
|
|
78
|
+
"props": [
|
|
79
|
+
{
|
|
80
|
+
"name": "className",
|
|
81
|
+
"type": "string",
|
|
82
|
+
"default": null,
|
|
83
|
+
"description": "Additional CSS classes for the root — the wrapper when `children` are present, else the badge pill.",
|
|
84
|
+
"required": false,
|
|
85
|
+
"inherited": false,
|
|
86
|
+
"deprecated": false
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "badgeClassName",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"default": null,
|
|
92
|
+
"description": "Additional CSS classes applied to the badge pill itself (unprefixed, like `Tooltip`'s `tooltipClassName`).",
|
|
93
|
+
"required": false,
|
|
94
|
+
"inherited": false,
|
|
95
|
+
"deprecated": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "content",
|
|
99
|
+
"type": "React.ReactNode",
|
|
100
|
+
"default": null,
|
|
101
|
+
"description": "Count, short text, or a custom node to display; omit with `dot` for a plain dot. `max`/`showZero` apply only to numeric content.",
|
|
102
|
+
"required": false,
|
|
103
|
+
"inherited": false,
|
|
104
|
+
"deprecated": false
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "max",
|
|
108
|
+
"type": "number",
|
|
109
|
+
"default": "99",
|
|
110
|
+
"description": "Numeric `content` above this renders as `\"{max}+\"`. A negative or non-integer value falls back to the default.",
|
|
111
|
+
"required": false,
|
|
112
|
+
"inherited": false,
|
|
113
|
+
"deprecated": false
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"name": "dot",
|
|
117
|
+
"type": "boolean",
|
|
118
|
+
"default": "false",
|
|
119
|
+
"description": "Render a small dot with no content.",
|
|
120
|
+
"required": false,
|
|
121
|
+
"inherited": false,
|
|
122
|
+
"deprecated": false
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "showZero",
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"default": "false",
|
|
128
|
+
"description": "Show the badge when `content` is `0`. Default `false`.",
|
|
129
|
+
"required": false,
|
|
130
|
+
"inherited": false,
|
|
131
|
+
"deprecated": false
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"name": "color",
|
|
135
|
+
"type": "BadgeColor",
|
|
136
|
+
"default": "'danger'",
|
|
137
|
+
"description": "Status color. Default `'danger'`.",
|
|
138
|
+
"required": false,
|
|
139
|
+
"inherited": false,
|
|
140
|
+
"deprecated": false
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"name": "position",
|
|
144
|
+
"type": "'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'",
|
|
145
|
+
"default": "'top-right'",
|
|
146
|
+
"description": "Corner to overlay the badge on, relative to `children`. Ignored for standalone badges (no `children`).",
|
|
147
|
+
"required": false,
|
|
148
|
+
"inherited": false,
|
|
149
|
+
"deprecated": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "overlap",
|
|
153
|
+
"type": "'circle' | 'square'",
|
|
154
|
+
"default": "'square'",
|
|
155
|
+
"description": "Nudges the offset for a round (`'circle'`) vs rectangular (`'square'`) child. Ignored for standalone badges (no `children`).",
|
|
156
|
+
"required": false,
|
|
157
|
+
"inherited": false,
|
|
158
|
+
"deprecated": false
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "pulse",
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"default": "false",
|
|
164
|
+
"description": "Processing/pulse animation; no-ops under `prefers-reduced-motion: reduce`.",
|
|
165
|
+
"required": false,
|
|
166
|
+
"inherited": false,
|
|
167
|
+
"deprecated": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "invisible",
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"default": "false",
|
|
173
|
+
"description": "Hide the badge pill without unmounting it (the wrapper and `children` stay visible).",
|
|
174
|
+
"required": false,
|
|
175
|
+
"inherited": false,
|
|
176
|
+
"deprecated": false
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "children",
|
|
180
|
+
"type": "React.ReactNode",
|
|
181
|
+
"default": null,
|
|
182
|
+
"description": "The element the badge overlays. Omit to render a standalone badge.",
|
|
183
|
+
"required": false,
|
|
184
|
+
"inherited": false,
|
|
185
|
+
"deprecated": false
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
"extraProps": [],
|
|
189
|
+
"catchAll": "All standard <span> attributes and Bulma helper props",
|
|
190
|
+
"types": [
|
|
191
|
+
{
|
|
192
|
+
"name": "BadgeColor",
|
|
193
|
+
"expansion": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'black' | 'dark' | 'light' | 'white'",
|
|
194
|
+
"summary": "Valid color values for the Badge component."
|
|
195
|
+
}
|
|
196
|
+
]
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"cssVars": [
|
|
200
|
+
{
|
|
201
|
+
"css": "--bulma-badge-height",
|
|
202
|
+
"sass": "$badge-height",
|
|
203
|
+
"default": "1.25em",
|
|
204
|
+
"scope": "component"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"css": "--bulma-badge-min-width",
|
|
208
|
+
"sass": "$badge-min-width",
|
|
209
|
+
"default": "1.25em",
|
|
210
|
+
"scope": "component"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"css": "--bulma-badge-padding",
|
|
214
|
+
"sass": "$badge-padding",
|
|
215
|
+
"default": "0 0.4em",
|
|
216
|
+
"scope": "component"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"css": "--bulma-badge-font-size",
|
|
220
|
+
"sass": "$badge-font-size",
|
|
221
|
+
"default": "0.7rem",
|
|
222
|
+
"scope": "component"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"css": "--bulma-badge-radius",
|
|
226
|
+
"sass": "$badge-radius",
|
|
227
|
+
"default": "var(--bulma-radius-rounded)",
|
|
228
|
+
"scope": "component"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"css": "--bulma-badge-ring-color",
|
|
232
|
+
"sass": "$badge-ring-color",
|
|
233
|
+
"default": "var(--bulma-scheme-main)",
|
|
234
|
+
"scope": "component"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"css": "--bulma-badge-ring-width",
|
|
238
|
+
"sass": "$badge-ring-width",
|
|
239
|
+
"default": "2px",
|
|
240
|
+
"scope": "component"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"css": "--bulma-badge-dot-size",
|
|
244
|
+
"sass": "$badge-dot-size",
|
|
245
|
+
"default": "0.65em",
|
|
246
|
+
"scope": "component"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"css": "--bulma-badge-inset-circle",
|
|
250
|
+
"sass": "$badge-inset-circle",
|
|
251
|
+
"default": "12%",
|
|
252
|
+
"scope": "component"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"css": "--bulma-badge-animation-duration",
|
|
256
|
+
"sass": "$badge-animation-duration",
|
|
257
|
+
"default": "1.4s",
|
|
258
|
+
"scope": "component"
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Block",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "elements",
|
|
5
|
+
"slug": "elements/block",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/elements/block",
|
|
7
|
+
"examples": [
|
|
8
|
+
{ "title": "Default Block", "code": "<Block>Default Block</Block>" },
|
|
9
|
+
{
|
|
10
|
+
"title": "Primary Text Color",
|
|
11
|
+
"code": "<Block textColor=\"primary\">Block with Primary Text</Block>"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"title": "Light Background",
|
|
15
|
+
"code": "<Block bgColor=\"light\">Block with Light Background</Block>"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "Spacing and Alignment",
|
|
19
|
+
"code": "<Block m=\"4\" p=\"4\" textAlign=\"centered\">\n Block with Margin, Padding, and Centered Text\n</Block>"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"title": "Custom Class",
|
|
23
|
+
"code": "<Block className=\"custom-block-class\">Block with Custom Class</Block>"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "Viewport-Specific Text Color",
|
|
27
|
+
"code": "<Block textColor=\"primary\" viewport=\"tablet\">\n Block with Tablet-specific Primary Text\n</Block>"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Interactive Block with Multiple Props",
|
|
31
|
+
"code": "<Block textColor=\"success\" bgColor=\"dark\" m=\"3\" p=\"3\" textAlign=\"right\">\n Interactive Block\n</Block>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "Stacked Blocks (Demonstrating Vertical Spacing)",
|
|
35
|
+
"code": "<Block display=\"flex\" flexDirection=\"column\" gap=\"0\">\n <Block>\n <Notification color=\"primary\" mb={0}>\n First Block\n </Notification>\n </Block>\n <Block>\n <Notification color=\"info\" mb={0}>\n Second Block\n </Notification>\n </Block>\n <Block>\n <Notification color=\"success\" mb={0}>\n Third Block\n </Notification>\n </Block>\n <Block>\n <Notification color=\"warning\" mb={0}>\n Fourth Block\n </Notification>\n </Block>\n</Block>"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"accessibility": "- **Content:** Use semantic HTML inside `Block` for best accessibility.\n- **Spacing:** The `.block` class is for layout only and does not affect accessibility.\n- **Contrast:** Choose text and background colors for good readability.\n\n:::info\nUse `Block` for logical, visually separated sections of content.\n:::",
|
|
39
|
+
"related": ["Box", "Content", "useBulmaClasses"],
|
|
40
|
+
"storybook": "https://bestax.io/storybook/?path=/story/elements-block--default",
|
|
41
|
+
"summary": "The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.",
|
|
42
|
+
"import": "import { Block } from '@allxsmith/bestax-bulma';",
|
|
43
|
+
"sourceFile": "bulma-ui/src/elements/Block.tsx",
|
|
44
|
+
"rootClass": "block",
|
|
45
|
+
"parts": [
|
|
46
|
+
{
|
|
47
|
+
"path": "Block",
|
|
48
|
+
"summary": "The `Block` component renders a simple container with Bulma's `.block` class, adding vertical margin between sections of content.",
|
|
49
|
+
"component": null,
|
|
50
|
+
"props": [
|
|
51
|
+
{
|
|
52
|
+
"name": "className",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"default": null,
|
|
55
|
+
"description": "Additional CSS classes to apply.",
|
|
56
|
+
"required": false,
|
|
57
|
+
"inherited": false,
|
|
58
|
+
"deprecated": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "textColor",
|
|
62
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
63
|
+
"default": null,
|
|
64
|
+
"description": "Text color helper.",
|
|
65
|
+
"required": false,
|
|
66
|
+
"inherited": false,
|
|
67
|
+
"deprecated": false,
|
|
68
|
+
"valuesRef": "helpers/valid-values"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "color",
|
|
72
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "Text color alias: renders `has-text-<color>`, exactly like `textColor`. Not a filled variant (no `.block.is-<color>` CSS exists). Prefer `textColor`, which takes precedence when both are set; use `bgColor` for a colored surface.",
|
|
75
|
+
"required": false,
|
|
76
|
+
"inherited": false,
|
|
77
|
+
"deprecated": false
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "bgColor",
|
|
81
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
82
|
+
"default": null,
|
|
83
|
+
"description": "Background color helper.",
|
|
84
|
+
"required": false,
|
|
85
|
+
"inherited": false,
|
|
86
|
+
"deprecated": false,
|
|
87
|
+
"valuesRef": "helpers/valid-values"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "children",
|
|
91
|
+
"type": "React.ReactNode",
|
|
92
|
+
"default": null,
|
|
93
|
+
"description": "Content to render inside the block.",
|
|
94
|
+
"required": false,
|
|
95
|
+
"inherited": false,
|
|
96
|
+
"deprecated": false
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"extraProps": [],
|
|
100
|
+
"catchAll": "All standard <div> attributes and Bulma helper props",
|
|
101
|
+
"types": []
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"cssVars": []
|
|
105
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Box",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "elements",
|
|
5
|
+
"slug": "elements/box",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/elements/box",
|
|
7
|
+
"examples": [
|
|
8
|
+
{ "title": "Default Box", "code": "<Box>Default Box</Box>" },
|
|
9
|
+
{
|
|
10
|
+
"title": "Primary Text Color",
|
|
11
|
+
"code": "<Box textColor=\"primary\">Box with Primary Text</Box>"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"title": "Light Background",
|
|
15
|
+
"code": "<Box bgColor=\"grey-light\">Box with Light Background</Box>"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"title": "No Shadow",
|
|
19
|
+
"code": "<Box hasShadow={false}>Box without Shadow</Box>"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"title": "Spacing and Alignment",
|
|
23
|
+
"code": "<Box m=\"4\" p=\"4\" textAlign=\"centered\">\n Box with Margin, Padding, and Centered Text\n</Box>"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"title": "Custom Class",
|
|
27
|
+
"code": "<Box className=\"custom-box-class\">Box with Custom Class</Box>"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"title": "Viewport-Specific Text Color",
|
|
31
|
+
"code": "<Box textColor=\"primary\" viewport=\"tablet\">\n Box with Tablet-specific Primary Text\n</Box>"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"title": "Interactive Box",
|
|
35
|
+
"code": "<Box textColor=\"success\" bgColor=\"black\" m=\"3\" p=\"3\" textAlign=\"right\">\n Interactive Box\n</Box>"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"accessibility": "- **Content:** Use semantic HTML inside `Box` for best accessibility.\n- **Shadow:** The shadow is purely visual and does not affect accessibility.\n- **Contrast:** Ensure color combinations provide sufficient contrast.\n\n:::tip\n`Box` is perfect for card-like containers, callouts, or visually separating content.\n:::",
|
|
39
|
+
"related": ["Block", "Content", "useBulmaClasses"],
|
|
40
|
+
"storybook": "https://bestax.io/storybook/?path=/story/elements-box--default",
|
|
41
|
+
"summary": "The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.",
|
|
42
|
+
"import": "import { Box } from '@allxsmith/bestax-bulma';",
|
|
43
|
+
"sourceFile": "bulma-ui/src/elements/Box.tsx",
|
|
44
|
+
"rootClass": "box",
|
|
45
|
+
"parts": [
|
|
46
|
+
{
|
|
47
|
+
"path": "Box",
|
|
48
|
+
"summary": "The `Box` component renders a bordered, padded container with an optional shadow using Bulma's `.box` class.",
|
|
49
|
+
"component": null,
|
|
50
|
+
"props": [
|
|
51
|
+
{
|
|
52
|
+
"name": "className",
|
|
53
|
+
"type": "string",
|
|
54
|
+
"default": null,
|
|
55
|
+
"description": "Additional CSS classes to apply.",
|
|
56
|
+
"required": false,
|
|
57
|
+
"inherited": false,
|
|
58
|
+
"deprecated": false
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "textColor",
|
|
62
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
63
|
+
"default": null,
|
|
64
|
+
"description": "Text color helper.",
|
|
65
|
+
"required": false,
|
|
66
|
+
"inherited": false,
|
|
67
|
+
"deprecated": false,
|
|
68
|
+
"valuesRef": "helpers/valid-values"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "color",
|
|
72
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "Text color alias: renders `has-text-<color>`, exactly like `textColor`. Not a filled box variant (no `.box.is-<color>` CSS exists). Prefer `textColor`, which takes precedence when both are set; use `bgColor` for a colored surface.",
|
|
75
|
+
"required": false,
|
|
76
|
+
"inherited": false,
|
|
77
|
+
"deprecated": false
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "bgColor",
|
|
81
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
82
|
+
"default": null,
|
|
83
|
+
"description": "Background color helper.",
|
|
84
|
+
"required": false,
|
|
85
|
+
"inherited": false,
|
|
86
|
+
"deprecated": false,
|
|
87
|
+
"valuesRef": "helpers/valid-values"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "hasShadow",
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": "true",
|
|
93
|
+
"description": "Whether the box has a shadow (default: true).",
|
|
94
|
+
"required": false,
|
|
95
|
+
"inherited": false,
|
|
96
|
+
"deprecated": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "children",
|
|
100
|
+
"type": "React.ReactNode",
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "Content to render inside the box.",
|
|
103
|
+
"required": false,
|
|
104
|
+
"inherited": false,
|
|
105
|
+
"deprecated": false
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"extraProps": [],
|
|
109
|
+
"catchAll": "All standard <div> attributes and Bulma helper props",
|
|
110
|
+
"types": []
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"cssVars": [
|
|
114
|
+
{
|
|
115
|
+
"css": "--bulma-box-background-color",
|
|
116
|
+
"sass": "$box-background-color",
|
|
117
|
+
"default": "var(--bulma-scheme-main)",
|
|
118
|
+
"scope": "component"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"css": "--bulma-box-color",
|
|
122
|
+
"sass": "$box-color",
|
|
123
|
+
"default": "var(--bulma-text)",
|
|
124
|
+
"scope": "component"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"css": "--bulma-box-radius",
|
|
128
|
+
"sass": "$box-radius",
|
|
129
|
+
"default": "var(--bulma-radius-large)",
|
|
130
|
+
"scope": "component"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"css": "--bulma-box-shadow",
|
|
134
|
+
"sass": "$box-shadow",
|
|
135
|
+
"default": "var(--bulma-shadow)",
|
|
136
|
+
"scope": "component"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"css": "--bulma-box-padding",
|
|
140
|
+
"sass": "$box-padding",
|
|
141
|
+
"default": "1.25rem",
|
|
142
|
+
"scope": "component"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"css": "--bulma-box-link-hover-shadow",
|
|
146
|
+
"sass": "$box-link-hover-shadow",
|
|
147
|
+
"default": "0 0.5em 1em -0.125em hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.1), 0 0 0 1px var(--bulma-link)",
|
|
148
|
+
"scope": "component"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"css": "--bulma-box-link-active-shadow",
|
|
152
|
+
"sass": "$box-link-active-shadow",
|
|
153
|
+
"default": "inset 0 1px 2px hsla(var(--bulma-scheme-h), var(--bulma-scheme-s), var(--bulma-scheme-invert-l), 0.2), 0 0 0 1px var(--bulma-link)",
|
|
154
|
+
"scope": "component"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|