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,307 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "IconText",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "elements",
|
|
5
|
+
"slug": "elements/icontext",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/elements/icontext",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Single Icon + Text",
|
|
10
|
+
"code": "<IconText iconProps={{ library: 'fa', name: 'star', ariaLabel: 'Star icon' }}>\n Star\n</IconText>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "With Text Color",
|
|
14
|
+
"code": "<IconText\n iconProps={{ library: 'fa', name: 'star', ariaLabel: 'Star icon' }}\n textColor=\"primary\"\n>\n Star\n</IconText>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "With Margin",
|
|
18
|
+
"code": "<IconText\n iconProps={{ library: 'fa', name: 'star', ariaLabel: 'Star icon' }}\n m=\"2\"\n>\n Star\n</IconText>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "In a Button",
|
|
22
|
+
"code": "<Button color=\"primary\">\n <IconText\n iconProps={{\n library: 'fa',\n name: 'check',\n ariaLabel: 'Check icon',\n }}\n >\n Click Me\n </IconText>\n</Button>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "In a Notification",
|
|
26
|
+
"code": "<Notification color=\"info\">\n <IconText\n iconProps={{\n library: 'fa',\n name: 'info-circle',\n ariaLabel: 'Info icon',\n textColor: 'dark',\n }}\n m=\"1\"\n >\n Info Notification\n </IconText>\n</Notification>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "In a Tag",
|
|
30
|
+
"code": "<Tag color=\"success\" size=\"medium\">\n <IconText\n iconProps={{\n library: 'fa',\n name: 'check',\n ariaLabel: 'Check icon',\n }}\n >\n Success\n </IconText>\n</Tag>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Multiple Icons and Text",
|
|
34
|
+
"code": "<IconText\n items={[\n {\n iconProps: { library: 'fa', name: 'train', ariaLabel: 'Train icon' },\n text: 'Paris',\n },\n {\n iconProps: {\n library: 'fa',\n name: 'arrow-right',\n ariaLabel: 'Arrow right icon',\n },\n text: 'Budapest',\n },\n {\n iconProps: {\n library: 'fa',\n name: 'arrow-right',\n ariaLabel: 'Arrow right icon',\n },\n text: 'Bucharest',\n },\n {\n iconProps: {\n library: 'fa',\n name: 'arrow-right',\n ariaLabel: 'Arrow right icon',\n },\n text: 'Istanbul',\n },\n {\n iconProps: {\n library: 'fa',\n name: 'flag-checkered',\n ariaLabel: 'Finish icon',\n },\n },\n ]}\n mx=\"1\"\n/>"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Star Rating Example",
|
|
38
|
+
"code": "<Rate defaultValue={3.5} color=\"warning\" precision={0.5} showScore />"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Star Rating Example",
|
|
42
|
+
"code": "<IconText\n items={[\n {\n iconProps: {\n library: 'fa',\n name: 'star',\n ariaLabel: 'Star icon',\n },\n },\n {\n iconProps: {\n library: 'fa',\n name: 'star',\n ariaLabel: 'Star icon',\n },\n },\n {\n iconProps: {\n library: 'fa',\n name: 'star',\n ariaLabel: 'Star icon',\n },\n },\n {\n iconProps: {\n library: 'fa',\n name: 'star-half-alt',\n ariaLabel: 'Half star icon',\n },\n },\n {\n iconProps: {\n library: 'fa',\n name: 'star',\n variant: 'regular',\n ariaLabel: 'Empty star icon',\n },\n text: '3.5/5',\n },\n ]}\n textColor=\"warning\"\n mx=\"1\"\n/>"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "With Flex",
|
|
46
|
+
"code": "<IconText\n iconProps={{\n library: 'fa',\n name: 'info-circle',\n ariaLabel: 'Info icon',\n textColor: 'info',\n }}\n display=\"flex\"\n>\n Information\n</IconText>"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"title": "Compound (dot-notation) usage",
|
|
50
|
+
"code": "<IconText>\n <IconText.Icon name=\"star\" ariaLabel=\"star icon\" />\n <span>Starred</span>\n</IconText>"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"accessibility": "- **ARIA labels:** Always set an `ariaLabel` for icons for screen readers.\n- **Order:** The icon is visually before the text by default.\n- **Keyboard:** If used in a button or link, keyboard accessibility is handled by the parent.\n\n:::info\nFor star ratings or icon lists, use `items` with `iconProps` and optional `text`.\n:::",
|
|
54
|
+
"related": ["Button", "Icon", "useBulmaClasses"],
|
|
55
|
+
"storybook": "https://bestax.io/storybook/?path=/story/elements-icontext--default",
|
|
56
|
+
"summary": "The `IconText` component provides a Bulma-styled horizontal arrangement of one or more `Icon` components and optional text.",
|
|
57
|
+
"import": "import { IconText } from '@allxsmith/bestax-bulma';",
|
|
58
|
+
"sourceFile": "bulma-ui/src/elements/IconText.tsx",
|
|
59
|
+
"rootClass": "icon-text",
|
|
60
|
+
"parts": [
|
|
61
|
+
{
|
|
62
|
+
"path": "IconText",
|
|
63
|
+
"summary": "The `IconText` component provides a Bulma-styled horizontal arrangement of one or more `Icon` components and optional text.",
|
|
64
|
+
"component": null,
|
|
65
|
+
"props": [
|
|
66
|
+
{
|
|
67
|
+
"name": "className",
|
|
68
|
+
"type": "string",
|
|
69
|
+
"default": null,
|
|
70
|
+
"description": "Additional CSS classes to apply.",
|
|
71
|
+
"required": false,
|
|
72
|
+
"inherited": false,
|
|
73
|
+
"deprecated": false
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "textColor",
|
|
77
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
78
|
+
"default": null,
|
|
79
|
+
"description": "Text color helper.",
|
|
80
|
+
"required": false,
|
|
81
|
+
"inherited": false,
|
|
82
|
+
"deprecated": false,
|
|
83
|
+
"valuesRef": "helpers/valid-values"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "color",
|
|
87
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
88
|
+
"default": null,
|
|
89
|
+
"description": "Text color alias: renders `has-text-<color>`, exactly like `textColor`. Not a filled variant (no `.icon-text.is-<color>` CSS exists). Prefer `textColor`, which takes precedence when both are set; use `bgColor` for a colored surface.",
|
|
90
|
+
"required": false,
|
|
91
|
+
"inherited": false,
|
|
92
|
+
"deprecated": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "bgColor",
|
|
96
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
97
|
+
"default": null,
|
|
98
|
+
"description": "Background color helper.",
|
|
99
|
+
"required": false,
|
|
100
|
+
"inherited": false,
|
|
101
|
+
"deprecated": false,
|
|
102
|
+
"valuesRef": "helpers/valid-values"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "iconProps",
|
|
106
|
+
"type": "IconProps",
|
|
107
|
+
"default": null,
|
|
108
|
+
"description": "Props for a single Icon component (for single icon mode).",
|
|
109
|
+
"required": false,
|
|
110
|
+
"inherited": false,
|
|
111
|
+
"deprecated": false
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "children",
|
|
115
|
+
"type": "React.ReactNode",
|
|
116
|
+
"default": null,
|
|
117
|
+
"description": "Text for a single icon (for single icon mode).",
|
|
118
|
+
"required": false,
|
|
119
|
+
"inherited": false,
|
|
120
|
+
"deprecated": false
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "items",
|
|
124
|
+
"type": "{ iconProps: IconProps; text?: string }[]",
|
|
125
|
+
"default": null,
|
|
126
|
+
"description": "Array of icon/text pairs (for multiple icons mode).",
|
|
127
|
+
"required": false,
|
|
128
|
+
"inherited": false,
|
|
129
|
+
"deprecated": false
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"extraProps": [],
|
|
133
|
+
"catchAll": "All standard <span> attributes and Bulma helper props",
|
|
134
|
+
"types": []
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"path": "IconText.Icon",
|
|
138
|
+
"summary": "The `Icon` component is a Bulma-styled wrapper for displaying icons from various libraries (Font Awesome, Material Design Icons, Ionicons, Google Material Icons, Material Symbols, etc.).",
|
|
139
|
+
"component": "Icon",
|
|
140
|
+
"props": [
|
|
141
|
+
{
|
|
142
|
+
"name": "className",
|
|
143
|
+
"type": "string",
|
|
144
|
+
"default": null,
|
|
145
|
+
"description": "Additional CSS classes to apply.",
|
|
146
|
+
"required": false,
|
|
147
|
+
"inherited": false,
|
|
148
|
+
"deprecated": false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "textColor",
|
|
152
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
153
|
+
"default": null,
|
|
154
|
+
"description": "Text color helper.",
|
|
155
|
+
"required": false,
|
|
156
|
+
"inherited": false,
|
|
157
|
+
"deprecated": false,
|
|
158
|
+
"valuesRef": "helpers/valid-values"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"name": "color",
|
|
162
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
163
|
+
"default": null,
|
|
164
|
+
"description": "Bulma color modifier for the icon.",
|
|
165
|
+
"required": false,
|
|
166
|
+
"inherited": false,
|
|
167
|
+
"deprecated": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "bgColor",
|
|
171
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
172
|
+
"default": null,
|
|
173
|
+
"description": "Background color helper.",
|
|
174
|
+
"required": false,
|
|
175
|
+
"inherited": false,
|
|
176
|
+
"deprecated": false,
|
|
177
|
+
"valuesRef": "helpers/valid-values"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "name",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"default": null,
|
|
183
|
+
"description": "The icon name, with or without its library prefix (e.g. `'star'` or `'fa-star'`).",
|
|
184
|
+
"required": false,
|
|
185
|
+
"inherited": false,
|
|
186
|
+
"deprecated": false
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "icon",
|
|
190
|
+
"type": "string",
|
|
191
|
+
"default": null,
|
|
192
|
+
"description": "DEPRECATED: Legacy prop, use `name` instead.",
|
|
193
|
+
"required": false,
|
|
194
|
+
"inherited": false,
|
|
195
|
+
"deprecated": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "library",
|
|
199
|
+
"type": "'fa' | 'mdi' | 'ion' | 'material-icons' | 'material-symbols'",
|
|
200
|
+
"default": "'fa'",
|
|
201
|
+
"description": "The icon library to use ('fa' = Font Awesome, 'mdi' = Material Design Icons, 'ion' = Ionicons Web Components, 'material-icons' = Google Material Icons, 'material-symbols' = Google Material Symbols). Defaults to the value set in ConfigProvider or 'fa' if not configured.",
|
|
202
|
+
"required": false,
|
|
203
|
+
"inherited": false,
|
|
204
|
+
"deprecated": false
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "variant",
|
|
208
|
+
"type": "string",
|
|
209
|
+
"default": null,
|
|
210
|
+
"description": "Icon style variant (e.g. `'solid'`, `'outlined'`, `'rounded'`).",
|
|
211
|
+
"required": false,
|
|
212
|
+
"inherited": false,
|
|
213
|
+
"deprecated": false
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"name": "features",
|
|
217
|
+
"type": "string | string[]",
|
|
218
|
+
"default": null,
|
|
219
|
+
"description": "Additional modifiers (e.g. `'fa-lg'`, `'fa-spin'`, `'is-size-1'`).",
|
|
220
|
+
"required": false,
|
|
221
|
+
"inherited": false,
|
|
222
|
+
"deprecated": false
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "libraryFeatures",
|
|
226
|
+
"type": "string | string[]",
|
|
227
|
+
"default": null,
|
|
228
|
+
"description": "**DEPRECATED:** Use `variant` and `features` instead.",
|
|
229
|
+
"required": false,
|
|
230
|
+
"inherited": false,
|
|
231
|
+
"deprecated": false
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"name": "size",
|
|
235
|
+
"type": "'small' | 'medium' | 'large'",
|
|
236
|
+
"default": null,
|
|
237
|
+
"description": "Size modifier for the icon container.",
|
|
238
|
+
"required": false,
|
|
239
|
+
"inherited": false,
|
|
240
|
+
"deprecated": false
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"name": "ariaLabel",
|
|
244
|
+
"type": "string",
|
|
245
|
+
"default": "'icon'",
|
|
246
|
+
"description": "ARIA label for accessibility (default: 'icon').",
|
|
247
|
+
"required": false,
|
|
248
|
+
"inherited": false,
|
|
249
|
+
"deprecated": false
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"name": "style",
|
|
253
|
+
"type": "React.CSSProperties",
|
|
254
|
+
"default": null,
|
|
255
|
+
"description": "Inline style object.",
|
|
256
|
+
"required": false,
|
|
257
|
+
"inherited": false,
|
|
258
|
+
"deprecated": false
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "containerClassName",
|
|
262
|
+
"type": "string",
|
|
263
|
+
"default": null,
|
|
264
|
+
"description": "Override the default `'icon'` container class (e.g., `'panel-icon'`).",
|
|
265
|
+
"required": false,
|
|
266
|
+
"inherited": false,
|
|
267
|
+
"deprecated": false
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"extraProps": [],
|
|
271
|
+
"catchAll": "All standard <span> attributes and Bulma helper props",
|
|
272
|
+
"types": []
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"cssVars": [
|
|
276
|
+
{
|
|
277
|
+
"css": "--bulma-icon-dimensions",
|
|
278
|
+
"sass": "$icon-dimensions",
|
|
279
|
+
"default": "1.5rem",
|
|
280
|
+
"scope": "component"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"css": "--bulma-icon-dimensions-small",
|
|
284
|
+
"sass": "$icon-dimensions-small",
|
|
285
|
+
"default": "1rem",
|
|
286
|
+
"scope": "component"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"css": "--bulma-icon-dimensions-medium",
|
|
290
|
+
"sass": "$icon-dimensions-medium",
|
|
291
|
+
"default": "2rem",
|
|
292
|
+
"scope": "component"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"css": "--bulma-icon-dimensions-large",
|
|
296
|
+
"sass": "$icon-dimensions-large",
|
|
297
|
+
"default": "3rem",
|
|
298
|
+
"scope": "component"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"css": "--bulma-icon-text-spacing",
|
|
302
|
+
"sass": "$icon-text-spacing",
|
|
303
|
+
"default": "0.25em",
|
|
304
|
+
"scope": "component"
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Image",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "elements",
|
|
5
|
+
"slug": "elements/image",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/elements/image",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Default Image",
|
|
10
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Sample image\"\n size=\"128x128\"\n/>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Rounded Image",
|
|
14
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Rounded image\"\n size=\"128x128\"\n isRounded\n/>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Retina Image",
|
|
18
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Retina image\"\n size=\"128x128\"\n isRetina\n/>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Aspect Ratio 16:9",
|
|
22
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"16:9 aspect ratio image\"\n size=\"16by9\"\n/>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Aspect Ratio 4:3",
|
|
26
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"4:3 aspect ratio image\"\n size=\"4by3\"\n/>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "With Margin",
|
|
30
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Image with margin\"\n size=\"128x128\"\n m=\"4\"\n/>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "With Iframe",
|
|
34
|
+
"code": "<Image size=\"16by9\">\n <iframe\n className=\"has-ratio\"\n width=\"640\"\n height=\"360\"\n src=\"https://www.youtube.com/embed/YE7VzlLtp-4\"\n frameBorder=\"0\"\n allowFullScreen\n title=\"Sample YouTube Video\"\n />\n</Image>"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "With Custom Child",
|
|
38
|
+
"code": "<Image size=\"4by3\">\n <Block\n display=\"flex\"\n alignItems=\"center\"\n justifyContent=\"center\"\n bgColor=\"grey-light\"\n textColor=\"dark\"\n textAlign=\"centered\"\n className=\"has-ratio\"\n style={{ height: '100%' }}\n >\n <Paragraph>Custom Content</Paragraph>\n </Block>\n</Image>"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "With Text Color and Background",
|
|
42
|
+
"code": "<Image\n src=\"/img/bestax-solar-system-3d.png\"\n alt=\"Image with text and background color\"\n size=\"128x128\"\n textColor=\"primary\"\n bgColor=\"light\"\n/>"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"accessibility": "- **Alt Text:** Always provide a descriptive `alt` attribute for images.\n- **Aspect Ratios:** Maintains the correct aspect ratio for images, iframes, or any child.\n- **Custom Content:** When embedding iframes or custom children, ensure accessibility via proper ARIA labeling or content.\n\n:::warning\nDo not use `Image` for decorative images without `alt=\"\"`, unless purely presentational.\n:::",
|
|
46
|
+
"related": ["Box", "Card", "Content", "useBulmaClasses"],
|
|
47
|
+
"storybook": "https://bestax.io/storybook/?path=/story/elements-image--default",
|
|
48
|
+
"summary": "The `Image` component wraps images, iframes, or custom content in a Bulma-styled container, supporting fixed sizes, aspect ratios, rounded corners, retina images, and all Bulma helper props for color and spacing.",
|
|
49
|
+
"import": "import { Image } from '@allxsmith/bestax-bulma';",
|
|
50
|
+
"sourceFile": "bulma-ui/src/elements/Image.tsx",
|
|
51
|
+
"rootClass": "image",
|
|
52
|
+
"parts": [
|
|
53
|
+
{
|
|
54
|
+
"path": "Image",
|
|
55
|
+
"summary": "The `Image` component wraps images, iframes, or custom content in a Bulma-styled container, supporting fixed sizes, aspect ratios, rounded corners, retina images, and all Bulma helper props for color and spacing.",
|
|
56
|
+
"component": null,
|
|
57
|
+
"props": [
|
|
58
|
+
{
|
|
59
|
+
"name": "className",
|
|
60
|
+
"type": "string",
|
|
61
|
+
"default": null,
|
|
62
|
+
"description": "Additional CSS classes to apply.",
|
|
63
|
+
"required": false,
|
|
64
|
+
"inherited": false,
|
|
65
|
+
"deprecated": false
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "textColor",
|
|
69
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
70
|
+
"default": null,
|
|
71
|
+
"description": "Text color helper for the container.",
|
|
72
|
+
"required": false,
|
|
73
|
+
"inherited": false,
|
|
74
|
+
"deprecated": false,
|
|
75
|
+
"valuesRef": "helpers/valid-values"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "color",
|
|
79
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
80
|
+
"default": null,
|
|
81
|
+
"description": "Text color alias: renders `has-text-<color>`, exactly like `textColor`. Not a filled variant (no `.image.is-<color>` CSS exists). Prefer `textColor`, which takes precedence when both are set; use `bgColor` for a colored surface.",
|
|
82
|
+
"required": false,
|
|
83
|
+
"inherited": false,
|
|
84
|
+
"deprecated": false
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "bgColor",
|
|
88
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
89
|
+
"default": null,
|
|
90
|
+
"description": "Background color helper for the container.",
|
|
91
|
+
"required": false,
|
|
92
|
+
"inherited": false,
|
|
93
|
+
"deprecated": false,
|
|
94
|
+
"valuesRef": "helpers/valid-values"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "size",
|
|
98
|
+
"type": "'16x16' | '24x24' | '32x32' | '48x48' | '64x64' | '96x96' | '128x128' | 'square' | '1by1' | '5by4' | '4by3' | '3by2' | '5by3' | '16by9' | '2by1' | '3by1' | '4by5' | '3by4' | '2by3' | '3by5' | '9by16' | '1by2' | '1by3'",
|
|
99
|
+
"default": null,
|
|
100
|
+
"description": "Fixed size or aspect ratio modifier for the image container.",
|
|
101
|
+
"required": false,
|
|
102
|
+
"inherited": false,
|
|
103
|
+
"deprecated": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "isRounded",
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": "false",
|
|
109
|
+
"description": "Renders the image with rounded corners.",
|
|
110
|
+
"required": false,
|
|
111
|
+
"inherited": false,
|
|
112
|
+
"deprecated": false
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "isRetina",
|
|
116
|
+
"type": "boolean",
|
|
117
|
+
"default": "false",
|
|
118
|
+
"description": "Uses retina (2x) image source.",
|
|
119
|
+
"required": false,
|
|
120
|
+
"inherited": false,
|
|
121
|
+
"deprecated": false
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "src",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"default": null,
|
|
127
|
+
"description": "Image source URL.",
|
|
128
|
+
"required": false,
|
|
129
|
+
"inherited": false,
|
|
130
|
+
"deprecated": false
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "alt",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"default": null,
|
|
136
|
+
"description": "Alternate text for the image.",
|
|
137
|
+
"required": false,
|
|
138
|
+
"inherited": false,
|
|
139
|
+
"deprecated": false
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "children",
|
|
143
|
+
"type": "React.ReactNode",
|
|
144
|
+
"default": null,
|
|
145
|
+
"description": "Arbitrary content (e.g., iframe, custom HTML) inside the image container.",
|
|
146
|
+
"required": false,
|
|
147
|
+
"inherited": false,
|
|
148
|
+
"deprecated": false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "as",
|
|
152
|
+
"type": "'figure' | 'div' | 'p'",
|
|
153
|
+
"default": null,
|
|
154
|
+
"description": "Container element tag. Defaults to `'figure'` when using aspect-ratio sizes, `'div'` otherwise.",
|
|
155
|
+
"required": false,
|
|
156
|
+
"inherited": false,
|
|
157
|
+
"deprecated": false
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
"extraProps": [],
|
|
161
|
+
"catchAll": "All standard HTML attributes and Bulma helper props",
|
|
162
|
+
"types": []
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"cssVars": []
|
|
166
|
+
}
|