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,212 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Tooltip",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "components",
|
|
5
|
+
"slug": "components/tooltip",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/components/tooltip",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic Tooltip",
|
|
10
|
+
"code": "function example() {\n return (\n <Tooltip label=\"This is helpful information\">\n <Button>Hover me</Button>\n </Tooltip>\n );\n}"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Positions",
|
|
14
|
+
"code": "function example() {\n return (\n <Buttons>\n <Tooltip label=\"Top tooltip\" position=\"top\">\n <Button>Top</Button>\n </Tooltip>\n <Tooltip label=\"Bottom tooltip\" position=\"bottom\">\n <Button>Bottom</Button>\n </Tooltip>\n <Tooltip label=\"Left tooltip\" position=\"left\">\n <Button>Left</Button>\n </Tooltip>\n <Tooltip label=\"Right tooltip\" position=\"right\">\n <Button>Right</Button>\n </Tooltip>\n </Buttons>\n );\n}"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Colors",
|
|
18
|
+
"code": "function example() {\n return (\n <Buttons>\n <Tooltip label=\"Primary\" color=\"primary\">\n <Button color=\"primary\">Primary</Button>\n </Tooltip>\n <Tooltip label=\"Link\" color=\"link\">\n <Button color=\"link\">Link</Button>\n </Tooltip>\n <Tooltip label=\"Info\" color=\"info\">\n <Button color=\"info\">Info</Button>\n </Tooltip>\n <Tooltip label=\"Success\" color=\"success\">\n <Button color=\"success\">Success</Button>\n </Tooltip>\n <Tooltip label=\"Warning\" color=\"warning\">\n <Button color=\"warning\">Warning</Button>\n </Tooltip>\n <Tooltip label=\"Danger\" color=\"danger\">\n <Button color=\"danger\">Danger</Button>\n </Tooltip>\n </Buttons>\n );\n}"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Multiline",
|
|
22
|
+
"code": "function example() {\n return (\n <Block p=\"5\">\n <Tooltip\n label=\"This is a longer tooltip that wraps to multiple lines. It's useful for displaying more detailed information.\"\n multiline\n >\n <Button>Hover for more info</Button>\n </Tooltip>\n </Block>\n );\n}"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Always Visible",
|
|
26
|
+
"code": "function example() {\n return (\n <Block p=\"5\">\n <Tooltip label=\"I'm always visible!\" active color=\"info\">\n <Button>Always visible tooltip</Button>\n </Tooltip>\n </Block>\n );\n}"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Dashed Underline",
|
|
30
|
+
"code": "function example() {\n return (\n <Paragraph>\n The term{' '}\n <Tooltip label=\"Application Programming Interface\" dashed>\n <Span>API</Span>\n </Tooltip>{' '}\n is commonly used in software development.\n </Paragraph>\n );\n}"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "With Delay",
|
|
34
|
+
"code": "function example() {\n return (\n <Buttons>\n <Tooltip label=\"No delay\" delay={0}>\n <Button>No delay</Button>\n </Tooltip>\n <Tooltip label=\"500ms delay\" delay={500}>\n <Button>500ms delay</Button>\n </Tooltip>\n <Tooltip label=\"1 second delay\" delay={1000}>\n <Button>1s delay</Button>\n </Tooltip>\n </Buttons>\n );\n}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "On Icons",
|
|
38
|
+
"code": "function example() {\n return (\n <Block display=\"flex\" gap=\"5\" p=\"6\">\n <Tooltip label=\"Delete item\" color=\"danger\" position=\"bottom\">\n <Span cursor=\"pointer\">\n <Icon name=\"fas fa-trash\" />\n </Span>\n </Tooltip>\n <Tooltip label=\"Edit item\" color=\"info\" position=\"bottom\">\n <Span cursor=\"pointer\">\n <Icon name=\"fas fa-edit\" />\n </Span>\n </Tooltip>\n <Tooltip label=\"Download\" color=\"success\" position=\"bottom\">\n <Span cursor=\"pointer\">\n <Icon name=\"fas fa-download\" />\n </Span>\n </Tooltip>\n </Block>\n );\n}"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Form Field Help",
|
|
42
|
+
"code": "function example() {\n return (\n <Field>\n <label className=\"label\">\n Password{' '}\n <Tooltip\n label=\"Must be at least 8 characters with one number and one special character\"\n multiline\n color=\"info\"\n >\n <Span cursor=\"help\">\n <Icon name=\"fas fa-question-circle\" size=\"small\" />\n </Span>\n </Tooltip>\n </label>\n <Control>\n <Input type=\"password\" placeholder=\"Enter password\" />\n </Control>\n </Field>\n );\n}"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Abbreviations",
|
|
46
|
+
"code": "function example() {\n return (\n <Paragraph style={{ lineHeight: 1.8 }}>\n Hover over{' '}\n <Tooltip label=\"Cascading Style Sheets\" color=\"info\" dashed>\n <Span>CSS</Span>\n </Tooltip>{' '}\n or{' '}\n <Tooltip label=\"HyperText Markup Language\" color=\"info\" dashed>\n <Span>HTML</Span>\n </Tooltip>{' '}\n to see their full names.\n </Paragraph>\n );\n}"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"accessibility": "- Tooltip content has `role=\"tooltip\"` for screen reader announcement\n- Has `aria-hidden` that toggles based on visibility\n- Tooltip shows on both hover and focus for keyboard users\n- The `dashed` style provides a visual cue that more information is available",
|
|
50
|
+
"related": [],
|
|
51
|
+
"storybook": null,
|
|
52
|
+
"summary": "The `Tooltip` component displays helpful information when users hover over or focus on an element.",
|
|
53
|
+
"import": "import { Tooltip } from '@allxsmith/bestax-bulma';",
|
|
54
|
+
"sourceFile": "bulma-ui/src/components/Tooltip.tsx",
|
|
55
|
+
"rootClass": "tooltip",
|
|
56
|
+
"parts": [
|
|
57
|
+
{
|
|
58
|
+
"path": "Tooltip",
|
|
59
|
+
"summary": "The `Tooltip` component displays helpful information when users hover over or focus on an element.",
|
|
60
|
+
"component": null,
|
|
61
|
+
"props": [
|
|
62
|
+
{
|
|
63
|
+
"name": "label",
|
|
64
|
+
"type": "string",
|
|
65
|
+
"default": null,
|
|
66
|
+
"description": "The tooltip text content.",
|
|
67
|
+
"required": false,
|
|
68
|
+
"inherited": false,
|
|
69
|
+
"deprecated": false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "content",
|
|
73
|
+
"type": "React.ReactNode",
|
|
74
|
+
"default": null,
|
|
75
|
+
"description": "Rich tooltip content (alternative to `label`).",
|
|
76
|
+
"required": false,
|
|
77
|
+
"inherited": false,
|
|
78
|
+
"deprecated": false
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "position",
|
|
82
|
+
"type": "'top' | 'bottom' | 'left' | 'right' | 'auto'",
|
|
83
|
+
"default": "'top'",
|
|
84
|
+
"description": "Position of the tooltip. Default: 'top'.",
|
|
85
|
+
"required": false,
|
|
86
|
+
"inherited": false,
|
|
87
|
+
"deprecated": false
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "color",
|
|
91
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' | 'dark' | 'light'",
|
|
92
|
+
"default": null,
|
|
93
|
+
"description": "Color variant for the tooltip.",
|
|
94
|
+
"required": false,
|
|
95
|
+
"inherited": false,
|
|
96
|
+
"deprecated": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "size",
|
|
100
|
+
"type": "'small' | 'medium' | 'large'",
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "Size of the tooltip.",
|
|
103
|
+
"required": false,
|
|
104
|
+
"inherited": false,
|
|
105
|
+
"deprecated": false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "active",
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"default": "false",
|
|
111
|
+
"description": "Force tooltip to be always visible.",
|
|
112
|
+
"required": false,
|
|
113
|
+
"inherited": false,
|
|
114
|
+
"deprecated": false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "multiline",
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"default": "false",
|
|
120
|
+
"description": "Allow tooltip to wrap to multiple lines.",
|
|
121
|
+
"required": false,
|
|
122
|
+
"inherited": false,
|
|
123
|
+
"deprecated": false
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "animated",
|
|
127
|
+
"type": "boolean",
|
|
128
|
+
"default": "true",
|
|
129
|
+
"description": "Enable fade animation. Default: true.",
|
|
130
|
+
"required": false,
|
|
131
|
+
"inherited": false,
|
|
132
|
+
"deprecated": false
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "square",
|
|
136
|
+
"type": "boolean",
|
|
137
|
+
"default": "false",
|
|
138
|
+
"description": "Use square corners instead of rounded.",
|
|
139
|
+
"required": false,
|
|
140
|
+
"inherited": false,
|
|
141
|
+
"deprecated": false
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "dashed",
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"default": "false",
|
|
147
|
+
"description": "Show dashed underline on trigger.",
|
|
148
|
+
"required": false,
|
|
149
|
+
"inherited": false,
|
|
150
|
+
"deprecated": false
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "delay",
|
|
154
|
+
"type": "number",
|
|
155
|
+
"default": "0",
|
|
156
|
+
"description": "Delay before showing tooltip (ms).",
|
|
157
|
+
"required": false,
|
|
158
|
+
"inherited": false,
|
|
159
|
+
"deprecated": false
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "closeDelay",
|
|
163
|
+
"type": "number",
|
|
164
|
+
"default": "0",
|
|
165
|
+
"description": "Delay in ms before hiding the tooltip.",
|
|
166
|
+
"required": false,
|
|
167
|
+
"inherited": false,
|
|
168
|
+
"deprecated": false
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "tooltipClassName",
|
|
172
|
+
"type": "string",
|
|
173
|
+
"default": null,
|
|
174
|
+
"description": "Additional classes for the tooltip element.",
|
|
175
|
+
"required": false,
|
|
176
|
+
"inherited": false,
|
|
177
|
+
"deprecated": false
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"extraProps": [
|
|
181
|
+
{
|
|
182
|
+
"name": "children",
|
|
183
|
+
"type": "React.ReactNode",
|
|
184
|
+
"default": null,
|
|
185
|
+
"description": "The element that triggers the tooltip.",
|
|
186
|
+
"required": false,
|
|
187
|
+
"inherited": false,
|
|
188
|
+
"deprecated": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "className",
|
|
192
|
+
"type": "string",
|
|
193
|
+
"default": null,
|
|
194
|
+
"description": "Additional CSS classes.",
|
|
195
|
+
"required": false,
|
|
196
|
+
"inherited": false,
|
|
197
|
+
"deprecated": false
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"catchAll": "All standard <span> attributes and Bulma helper props",
|
|
201
|
+
"types": []
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"cssVars": [
|
|
205
|
+
{
|
|
206
|
+
"css": "--bulma-tooltip-dashed-color",
|
|
207
|
+
"sass": "$tooltip-dashed-color",
|
|
208
|
+
"default": "hsl(0, 0%, 60%)",
|
|
209
|
+
"scope": "component"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "UnorderedList",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "elements",
|
|
5
|
+
"slug": "elements/unorderedlist",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/elements/unorderedlist",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Default List",
|
|
10
|
+
"code": "<Content>\n <UnorderedList>\n <ListItem>First item</ListItem>\n <ListItem>Second item</ListItem>\n <ListItem>Third item</ListItem>\n </UnorderedList>\n</Content>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Colored List",
|
|
14
|
+
"code": "<Content>\n <UnorderedList textColor=\"primary\">\n <ListItem>First item</ListItem>\n <ListItem>Second item</ListItem>\n <ListItem>Third item</ListItem>\n </UnorderedList>\n</Content>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "List with Background",
|
|
18
|
+
"code": "<Content>\n <UnorderedList bgColor=\"dark\" textColor=\"white\" p=\"6\">\n <ListItem>First item</ListItem>\n <ListItem>Second item</ListItem>\n <ListItem>Third item</ListItem>\n </UnorderedList>\n</Content>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Nested Lists",
|
|
22
|
+
"code": "<Content>\n <UnorderedList>\n <ListItem>First item</ListItem>\n <ListItem>\n Second item with nested list\n <UnorderedList>\n <ListItem>Nested item 1</ListItem>\n <ListItem>Nested item 2</ListItem>\n </UnorderedList>\n </ListItem>\n <ListItem>Third item</ListItem>\n </UnorderedList>\n</Content>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Individually Colored Items",
|
|
26
|
+
"code": "<Content>\n <UnorderedList>\n <ListItem textColor=\"primary\">Primary item</ListItem>\n <ListItem textColor=\"success\">Success item</ListItem>\n <ListItem textColor=\"warning\">Warning item</ListItem>\n <ListItem textColor=\"danger\">Danger item</ListItem>\n </UnorderedList>\n</Content>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Compound (dot-notation) usage",
|
|
30
|
+
"code": "<Content>\n <UnorderedList>\n <UnorderedList.Item>First item</UnorderedList.Item>\n <UnorderedList.Item>Second item</UnorderedList.Item>\n </UnorderedList>\n</Content>"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"accessibility": "- **List Structure:** Screen readers announce the list and the number of items, helping users understand the content structure.\n- **Semantic Markup:** Using proper `<ul>` and `<li>` elements ensures accessibility for all users.\n- **Nesting:** Properly nested lists maintain correct semantics for assistive technologies.\n\n:::info\nUse `UnorderedList` when the order of items is not significant. For ordered content, use `OrderedList`.\n:::",
|
|
34
|
+
"related": ["Content", "ListItem", "OrderedList", "useBulmaClasses"],
|
|
35
|
+
"storybook": "https://bestax.io/storybook/?path=/story/elements-unorderedlist--default",
|
|
36
|
+
"summary": "The `UnorderedList` component renders a styled unordered list (`<ul>`) element with Bulma helper class integration.",
|
|
37
|
+
"import": "import { UnorderedList, ListItem } from '@allxsmith/bestax-bulma';",
|
|
38
|
+
"sourceFile": "bulma-ui/src/elements/UnorderedList.tsx",
|
|
39
|
+
"rootClass": null,
|
|
40
|
+
"parts": [
|
|
41
|
+
{
|
|
42
|
+
"path": "UnorderedList",
|
|
43
|
+
"summary": "The `UnorderedList` component renders a styled unordered list (`<ul>`) element with Bulma helper class integration.",
|
|
44
|
+
"component": null,
|
|
45
|
+
"props": [
|
|
46
|
+
{
|
|
47
|
+
"name": "className",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"default": null,
|
|
50
|
+
"description": "Additional CSS classes to apply.",
|
|
51
|
+
"required": false,
|
|
52
|
+
"inherited": false,
|
|
53
|
+
"deprecated": false
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "textColor",
|
|
57
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
58
|
+
"default": null,
|
|
59
|
+
"description": "Text color helper.",
|
|
60
|
+
"required": false,
|
|
61
|
+
"inherited": false,
|
|
62
|
+
"deprecated": false,
|
|
63
|
+
"valuesRef": "helpers/valid-values"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "bgColor",
|
|
67
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
68
|
+
"default": null,
|
|
69
|
+
"description": "Background color helper.",
|
|
70
|
+
"required": false,
|
|
71
|
+
"inherited": false,
|
|
72
|
+
"deprecated": false,
|
|
73
|
+
"valuesRef": "helpers/valid-values"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "children",
|
|
77
|
+
"type": "React.ReactNode",
|
|
78
|
+
"default": null,
|
|
79
|
+
"description": "List items to render inside the list.",
|
|
80
|
+
"required": false,
|
|
81
|
+
"inherited": false,
|
|
82
|
+
"deprecated": false
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"extraProps": [],
|
|
86
|
+
"catchAll": "All standard <ul> attributes and Bulma helper props",
|
|
87
|
+
"types": []
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "UnorderedList.Item",
|
|
91
|
+
"summary": "The `ListItem` component renders a styled list item (`<li>`) element with Bulma helper class integration.",
|
|
92
|
+
"component": "ListItem",
|
|
93
|
+
"props": [
|
|
94
|
+
{
|
|
95
|
+
"name": "className",
|
|
96
|
+
"type": "string",
|
|
97
|
+
"default": null,
|
|
98
|
+
"description": "Additional CSS classes to apply.",
|
|
99
|
+
"required": false,
|
|
100
|
+
"inherited": false,
|
|
101
|
+
"deprecated": false
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "textColor",
|
|
105
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
106
|
+
"default": null,
|
|
107
|
+
"description": "Text color helper.",
|
|
108
|
+
"required": false,
|
|
109
|
+
"inherited": false,
|
|
110
|
+
"deprecated": false,
|
|
111
|
+
"valuesRef": "helpers/valid-values"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "bgColor",
|
|
115
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
116
|
+
"default": null,
|
|
117
|
+
"description": "Background color helper.",
|
|
118
|
+
"required": false,
|
|
119
|
+
"inherited": false,
|
|
120
|
+
"deprecated": false,
|
|
121
|
+
"valuesRef": "helpers/valid-values"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "children",
|
|
125
|
+
"type": "React.ReactNode",
|
|
126
|
+
"default": null,
|
|
127
|
+
"description": "Content to render inside the list item.",
|
|
128
|
+
"required": false,
|
|
129
|
+
"inherited": false,
|
|
130
|
+
"deprecated": false
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"extraProps": [
|
|
134
|
+
{
|
|
135
|
+
"name": "value",
|
|
136
|
+
"type": "number",
|
|
137
|
+
"default": null,
|
|
138
|
+
"description": "Custom value for ordered list items.",
|
|
139
|
+
"required": false,
|
|
140
|
+
"inherited": false,
|
|
141
|
+
"deprecated": false
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"catchAll": "All standard <li> attributes and Bulma helper props",
|
|
145
|
+
"types": []
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"cssVars": []
|
|
149
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Valid value constants",
|
|
3
|
+
"kind": "helper",
|
|
4
|
+
"category": "helpers",
|
|
5
|
+
"slug": "helpers/valid-values",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/helpers/valid-values",
|
|
7
|
+
"examples": [],
|
|
8
|
+
"accessibility": null,
|
|
9
|
+
"related": [],
|
|
10
|
+
"storybook": null,
|
|
11
|
+
"summary": "The `valid*` constant arrays enumerate every accepted value for the shared Bulma helper props — public API you can import to build prop types and validation.",
|
|
12
|
+
"import": "import { Valid value constants } from '@allxsmith/bestax-bulma';",
|
|
13
|
+
"doc": "# Valid value constants\n\n## Overview\n\nThe `valid*` constant arrays enumerate every accepted value for the shared Bulma helper props — public API you can import to build prop types and validation. Each is a readonly `as const` tuple, so `(typeof validColors)[number]` gives you the exact string-literal union. `useBulmaClasses` (and the per-concern hooks) silently ignore values outside these lists, so validating against them tells you exactly what will produce a class.\n\n---\n\n## Import\n\n```tsx\nimport {\n validColors,\n validSizes,\n validViewports,\n} from '@allxsmith/bestax-bulma';\n```\n\nAll 18 constants are importable the same way.\n\n---\n\n## Constants\n\n| Constant | Values | Used by prop family |\n| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `validColors` | `'primary'`, `'link'`, `'info'`, `'success'`, `'warning'`, `'danger'`, `'black'` … `'white'`, `'light'`, `'dark'` (17 values) | `color`, `backgroundColor` helper props. Component `color` modifier unions are narrower and component-specific; some `validColors` members ship no `is-<color>` CSS (deprecated, warned in dev). See each component's Props table. |\n| `validColorShades` | `'00'`, `'05'` … `'95'`, `'invert'`, `'light'`, `'dark'`, `'soft'`, `'bold'`, `'on-scheme'` | `colorShade`, `backgroundColorShade` |\n| `validSizes` | `'0'`–`'6'`, `'auto'` | Spacing: `m`, `mt`, `mr`, `mb`, `ml`, `mx`, `my`, `p`, `pt`, … `px`, `py` |\n| `validTextSizes` | `'1'`–`'7'` | `textSize` (+ `textSizeMobile` … `textSizeFullhd`) |\n| `validAlignments` | `'centered'`, `'justified'`, `'left'`, `'right'` | `textAlign` (+ viewport variants) |\n| `validTextTransforms` | `'capitalized'`, `'lowercase'`, `'uppercase'`, `'italic'` | `textTransform` |\n| `validTextWeights` | `'light'`, `'normal'`, `'medium'`, `'semibold'`, `'bold'` | `textWeight` |\n| `validFontFamilies` | `'sans-serif'`, `'monospace'`, `'primary'`, `'secondary'`, `'code'` | `fontFamily` |\n| `validDisplays` | `'block'`, `'flex'`, `'inline'`, `'inline-block'`, `'inline-flex'` | `display` (+ `displayMobile` … `displayFullhd`) |\n| `validVisibilities` | `'hidden'`, `'sr-only'`, `'invisible'` | `visibility` (+ viewport variants) |\n| `validFlexDirections` | `'row'`, `'row-reverse'`, `'column'`, `'column-reverse'` | `flexDirection` |\n| `validFlexWraps` | `'nowrap'`, `'wrap'`, `'wrap-reverse'` | `flexWrap` |\n| `validJustifyContents` | `'flex-start'`, `'flex-end'`, `'center'`, `'space-between'`, `'space-around'`, `'space-evenly'`, `'start'`, `'end'`, `'left'`, `'right'` | `justifyContent` |\n| `validAlignContents` | `'flex-start'`, `'flex-end'`, `'center'`, `'space-between'`, `'space-around'`, `'space-evenly'`, `'stretch'` | `alignContent` |\n| `validAlignItems` | `'stretch'`, `'flex-start'`, `'flex-end'`, `'center'`, `'baseline'`, `'start'`, `'end'` | `alignItems` |\n| `validAlignSelfs` | `'auto'`, `'flex-start'`, `'flex-end'`, `'center'`, `'baseline'`, `'stretch'` | `alignSelf` |\n| `validFlexGrowShrink` | `'0'`–`'5'` | `flexGrow`, `flexShrink` |\n| `validViewports` | `'mobile'`, `'tablet'`, `'desktop'`, `'widescreen'`, `'fullhd'` | `viewport` (responsive modifier) |\n\n---\n\n## Typing with `(typeof …)[number]`\n\nBecause the arrays are `as const`, indexing them with `number` yields the union of their literal values — the same idiom the library uses internally for its prop types:\n\n```ts\nimport { validColors, validSizes } from '@allxsmith/bestax-bulma';\n\ntype Color = (typeof validColors)[number]; // 'primary' | 'link' | … | 'dark'\ntype Spacing = (typeof validSizes)[number]; // '0' | '1' | … | '6' | 'auto'\n\ninterface MyComponentProps {\n color?: Color;\n m?: Spacing;\n}\n```\n\nThey also work as runtime validators:\n\n```ts\nfunction isColor(value: string): value is (typeof validColors)[number] {\n return (validColors as readonly string[]).includes(value);\n}\n```\n\n:::warning `validSizes` is for spacing, not element sizes\n\n`validSizes` (`'0'`–`'6'` | `'auto'`) enumerates the **spacing helper** scale — the values for `m`/`p` props like `m=\"4\"` (→ `m-4`). Element `size` props are a different axis: `Button`, `Icon`, and friends declare an inline union such as `'small' | 'medium' | 'large'` (Button adds `'normal'`), **not** `validSizes`. Don't use `validSizes` to type a component's `size` prop.\n\n:::\n\n---\n\n## See Also\n\n- [`useBulmaClasses`](./usebulmaclasses.md): The hook that consumes these values and generates the helper classes.\n- [Helper guides](../../guides/helpers/color.md): Task-oriented walkthroughs of the helper-prop system (color, spacing, typography, flex, visibility).",
|
|
14
|
+
"parts": [],
|
|
15
|
+
"cssVars": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "classNames",
|
|
3
|
+
"kind": "helper",
|
|
4
|
+
"category": "helpers",
|
|
5
|
+
"slug": "helpers/classnames",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/helpers/classnames",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic Usage with Strings",
|
|
10
|
+
"code": "function example() {\n return classNames('column', 'is-half', 'has-text-primary');\n // => 'column is-half has-text-primary'\n}"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Combining Strings, Numbers, Falsy Values",
|
|
14
|
+
"code": "function example() {\n return classNames('notification', 0, null, undefined, '', 'is-primary');\n // => 'notification 0 is-primary'\n}"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Using Arrays",
|
|
18
|
+
"code": "function example() {\n return classNames('button', ['is-primary', 'is-large']);\n // => 'button is-primary is-large'\n}"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Using Objects",
|
|
22
|
+
"code": "function example() {\n const hasError = true;\n return classNames('input', { 'is-danger': hasError, 'is-rounded': true });\n // If hasError = false: 'input is-rounded'\n // If hasError = true: 'input is-danger is-rounded'\n}"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Nested Arrays and Objects",
|
|
26
|
+
"code": "function example() {\n return classNames(\n 'column',\n ['is-narrow', ['has-background-primary', { 'is-hidden': false }]],\n { 'is-size-4': true }\n );\n // => 'column is-narrow has-background-primary is-size-4'\n}"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Removing Duplicate Class Names",
|
|
30
|
+
"code": "function example() {\n return classNames('button', 'is-primary', 'button', [\n 'is-primary',\n 'is-large',\n ]);\n // => 'button is-primary is-large'\n}"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Real Examples from Components",
|
|
34
|
+
"code": "function example() {\n const isGapless = true;\n const isMultiline = true;\n\n return classNames(\n 'columns',\n { 'is-gapless': isGapless, 'is-multiline': isMultiline },\n ['has-background-light', 'is-vcentered']\n );\n // Example output: 'columns is-gapless is-multiline has-background-light is-vcentered'\n}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Real Examples from Components",
|
|
38
|
+
"code": "function example() {\n const span = 2;\n\n return classNames('cell', { 'is-col-span-2': span === 2 }, [\n 'has-text-primary',\n 'is-row-span-3',\n ]);\n // Example output: 'cell is-col-span-2 has-text-primary is-row-span-3'\n}"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Real Examples from Components",
|
|
42
|
+
"code": "function example() {\n const active = true;\n const up = false;\n const right = true;\n const hoverable = false;\n const disabled = false;\n const className = 'my-custom-dropdown';\n\n return classNames(\n 'dropdown',\n {\n 'is-active': active,\n 'is-up': up,\n 'is-right': right,\n 'is-hoverable': hoverable,\n 'is-disabled': disabled,\n },\n className\n );\n // Possible output: 'dropdown is-active is-right my-custom-dropdown'\n}"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Real Examples from Components",
|
|
46
|
+
"code": "function example() {\n const className = 'custom-class';\n const hasShadow = false;\n const bulmaHelperClasses = 'has-text-success';\n\n return classNames('card', className, bulmaHelperClasses, {\n 'is-shadowless': !hasShadow,\n });\n // Example output: 'card custom-class has-text-success is-shadowless'\n}"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"title": "Real Examples from Components",
|
|
50
|
+
"code": "function example() {\n const className = 'sidebar-menu';\n const bulmaHelperClasses = 'has-background-light';\n\n return classNames('menu', className, bulmaHelperClasses);\n // Example output: 'menu sidebar-menu has-background-light'\n}"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"title": "Real Examples from Components",
|
|
54
|
+
"code": "function example() {\n const className = 'custom-breadcrumb';\n const bulmaHelperClasses = undefined;\n const alignment = 'centered';\n const separator = 'dot';\n const size = 'large';\n\n return classNames('breadcrumb', className, bulmaHelperClasses, {\n 'is-centered': alignment === 'centered',\n 'has-dot-separator': separator === 'dot',\n 'is-large': size === 'large',\n });\n // Example output: 'breadcrumb custom-breadcrumb is-centered has-dot-separator is-large'\n}"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"accessibility": null,
|
|
58
|
+
"related": [],
|
|
59
|
+
"storybook": null,
|
|
60
|
+
"summary": "`classNames` is a utility function for conditionally joining class names together.",
|
|
61
|
+
"import": "import { classNames } from '@allxsmith/bestax-bulma';",
|
|
62
|
+
"doc": "# classNames\n\n## Overview\n\n`classNames` is a utility function for conditionally joining class names together. It takes any number of arguments, which can be strings, numbers, arrays, or objects, and returns a space-separated string of unique class names. This is useful for dynamically constructing className values in React and other frameworks.\n\n---\n\n## Import\n\n```tsx\nimport { classNames } from '@allxsmith/bestax-bulma';\n```\n\n---\n\n## Usage\n\n### Basic Usage with Strings\n\n```tsx live\nfunction example() {\n return classNames('column', 'is-half', 'has-text-primary');\n // => 'column is-half has-text-primary'\n}\n```\n\n---\n\n### Combining Strings, Numbers, Falsy Values\n\n```tsx live\nfunction example() {\n return classNames('notification', 0, null, undefined, '', 'is-primary');\n // => 'notification 0 is-primary'\n}\n```\n\n---\n\n### Using Arrays\n\n```tsx live\nfunction example() {\n return classNames('button', ['is-primary', 'is-large']);\n // => 'button is-primary is-large'\n}\n```\n\n---\n\n### Using Objects\n\n```tsx live\nfunction example() {\n const hasError = true;\n return classNames('input', { 'is-danger': hasError, 'is-rounded': true });\n // If hasError = false: 'input is-rounded'\n // If hasError = true: 'input is-danger is-rounded'\n}\n```\n\n---\n\n### Nested Arrays and Objects\n\n```tsx live\nfunction example() {\n return classNames(\n 'column',\n ['is-narrow', ['has-background-primary', { 'is-hidden': false }]],\n { 'is-size-4': true }\n );\n // => 'column is-narrow has-background-primary is-size-4'\n}\n```\n\n---\n\n### Removing Duplicate Class Names\n\n```tsx live\nfunction example() {\n return classNames('button', 'is-primary', 'button', [\n 'is-primary',\n 'is-large',\n ]);\n // => 'button is-primary is-large'\n}\n```\n\n---\n\n### Real Examples from Components\n\n#### Columns and Column\n\n```tsx live\nfunction example() {\n const isGapless = true;\n const isMultiline = true;\n\n return classNames(\n 'columns',\n { 'is-gapless': isGapless, 'is-multiline': isMultiline },\n ['has-background-light', 'is-vcentered']\n );\n // Example output: 'columns is-gapless is-multiline has-background-light is-vcentered'\n}\n```\n\n#### Grid and Cell\n\n```tsx live\nfunction example() {\n const span = 2;\n\n return classNames('cell', { 'is-col-span-2': span === 2 }, [\n 'has-text-primary',\n 'is-row-span-3',\n ]);\n // Example output: 'cell is-col-span-2 has-text-primary is-row-span-3'\n}\n```\n\n#### Dropdown\n\n```tsx live\nfunction example() {\n const active = true;\n const up = false;\n const right = true;\n const hoverable = false;\n const disabled = false;\n const className = 'my-custom-dropdown';\n\n return classNames(\n 'dropdown',\n {\n 'is-active': active,\n 'is-up': up,\n 'is-right': right,\n 'is-hoverable': hoverable,\n 'is-disabled': disabled,\n },\n className\n );\n // Possible output: 'dropdown is-active is-right my-custom-dropdown'\n}\n```\n\n#### Card\n\n```tsx live\nfunction example() {\n const className = 'custom-class';\n const hasShadow = false;\n const bulmaHelperClasses = 'has-text-success';\n\n return classNames('card', className, bulmaHelperClasses, {\n 'is-shadowless': !hasShadow,\n });\n // Example output: 'card custom-class has-text-success is-shadowless'\n}\n```\n\n#### Menu\n\n```tsx live\nfunction example() {\n const className = 'sidebar-menu';\n const bulmaHelperClasses = 'has-background-light';\n\n return classNames('menu', className, bulmaHelperClasses);\n // Example output: 'menu sidebar-menu has-background-light'\n}\n```\n\n#### Breadcrumb\n\n```tsx live\nfunction example() {\n const className = 'custom-breadcrumb';\n const bulmaHelperClasses = undefined;\n const alignment = 'centered';\n const separator = 'dot';\n const size = 'large';\n\n return classNames('breadcrumb', className, bulmaHelperClasses, {\n 'is-centered': alignment === 'centered',\n 'has-dot-separator': separator === 'dot',\n 'is-large': size === 'large',\n });\n // Example output: 'breadcrumb custom-breadcrumb is-centered has-dot-separator is-large'\n}\n```\n\n---\n\n## API\n\n```ts\nfunction classNames(\n ...args: (\n | string\n | number\n | undefined\n | null\n | false\n | Record<string, unknown>\n | unknown[]\n )[]\n): string;\n```\n\n- Accepts any mix of:\n - `string` or `number`\n - Array of valid values (including nested arrays)\n - Object (`{ className: boolean }`), where keys are included if their value is truthy\n - Falsy values (`null`, `undefined`, `false`, `''`) are ignored\n\n---\n\n## Tips\n\n- All falsy values are ignored.\n- Array and object arguments can be nested arbitrarily deep.\n- Duplicate class names are automatically removed.\n- Useful for React's `className` prop, but can be used anywhere strings are needed.\n\n---\n\n## See Also\n\n- [`useBulmaClasses`](./usebulmaclasses.md): Advanced Bulma helper class generator.\n- [Bulma Documentation](https://bulma.io/documentation/)",
|
|
63
|
+
"parts": [],
|
|
64
|
+
"cssVars": []
|
|
65
|
+
}
|