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,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "SubTitle",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "elements",
|
|
5
|
+
"slug": "elements/subtitle",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/elements/subtitle",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Default SubTitle",
|
|
10
|
+
"code": "<SubTitle>Default SubTitle</SubTitle>"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Has Skeleton",
|
|
14
|
+
"code": "<SubTitle hasSkeleton>SubTitle with Skeleton Effect</SubTitle>"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Is Skeleton",
|
|
18
|
+
"code": "<SubTitle skeleton>SubTitle Skeleton Effect</SubTitle>"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Different Sizes",
|
|
22
|
+
"code": "<>\n <SubTitle size=\"2\">SubTitle Size 2</SubTitle>\n <SubTitle size=\"4\">SubTitle Size 4</SubTitle>\n</>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "With Margin",
|
|
26
|
+
"code": "<SubTitle m=\"4\">SubTitle with Margin</SubTitle>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "As Paragraph",
|
|
30
|
+
"code": "<SubTitle as=\"p\" size=\"3\">\n SubTitle as Paragraph\n</SubTitle>"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "All Sizes",
|
|
34
|
+
"code": "<>\n {['1', '2', '3', '4', '5', '6'].map(size => (\n <SubTitle key={size} size={size}>\n SubTitle Size {size}\n </SubTitle>\n ))}\n</>"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Title and Subtitle Pairings",
|
|
38
|
+
"code": "<Block>\n <Title as=\"p\" size=\"1\">\n Title 1\n </Title>\n <SubTitle as=\"p\" size=\"3\">\n Subtitle 3\n </SubTitle>\n</Block>"
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"accessibility": "- **Semantic HTML:** Use appropriate heading levels for document structure.\n- **Screen readers:** Subtitles should be used in conjunction with titles for clarity.\n\n:::tip\n`SubTitle` is visually styled as a heading, but its semantic level depends on the `as` prop.\n:::",
|
|
42
|
+
"related": ["Block", "Title", "useBulmaClasses"],
|
|
43
|
+
"storybook": "https://bestax.io/storybook/?path=/story/elements-subtitle--default",
|
|
44
|
+
"summary": "The `SubTitle` component renders a Bulma-styled subtitle (secondary heading), supporting sizes `1-6` and rendering as any heading or paragraph element (`h1-h6`, `p`).",
|
|
45
|
+
"import": "import { SubTitle } from '@allxsmith/bestax-bulma';",
|
|
46
|
+
"sourceFile": "bulma-ui/src/elements/SubTitle.tsx",
|
|
47
|
+
"rootClass": "subtitle",
|
|
48
|
+
"parts": [
|
|
49
|
+
{
|
|
50
|
+
"path": "SubTitle",
|
|
51
|
+
"summary": "The `SubTitle` component renders a Bulma-styled subtitle (secondary heading), supporting sizes `1-6` and rendering as any heading or paragraph element (`h1-h6`, `p`).",
|
|
52
|
+
"component": null,
|
|
53
|
+
"props": [
|
|
54
|
+
{
|
|
55
|
+
"name": "className",
|
|
56
|
+
"type": "string",
|
|
57
|
+
"default": null,
|
|
58
|
+
"description": "Additional CSS classes to apply.",
|
|
59
|
+
"required": false,
|
|
60
|
+
"inherited": false,
|
|
61
|
+
"deprecated": false
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "size",
|
|
65
|
+
"type": "'1' | '2' | '3' | '4' | '5' | '6'",
|
|
66
|
+
"default": null,
|
|
67
|
+
"description": "Size of the subtitle (Bulma sizes).",
|
|
68
|
+
"required": false,
|
|
69
|
+
"inherited": false,
|
|
70
|
+
"deprecated": false
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "as",
|
|
74
|
+
"type": "'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p'",
|
|
75
|
+
"default": "'h1'",
|
|
76
|
+
"description": "HTML element to render as (h1-h6 or p).",
|
|
77
|
+
"required": false,
|
|
78
|
+
"inherited": false,
|
|
79
|
+
"deprecated": false
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "hasSkeleton",
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"default": "false",
|
|
85
|
+
"description": "Applies the `has-skeleton` class to part of the content.",
|
|
86
|
+
"required": false,
|
|
87
|
+
"inherited": false,
|
|
88
|
+
"deprecated": false
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "children",
|
|
92
|
+
"type": "React.ReactNode",
|
|
93
|
+
"default": null,
|
|
94
|
+
"description": "Subtitle content.",
|
|
95
|
+
"required": false,
|
|
96
|
+
"inherited": false,
|
|
97
|
+
"deprecated": false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "textColor",
|
|
101
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
102
|
+
"default": null,
|
|
103
|
+
"description": "Text color helper.",
|
|
104
|
+
"required": false,
|
|
105
|
+
"inherited": false,
|
|
106
|
+
"deprecated": false,
|
|
107
|
+
"valuesRef": "helpers/valid-values"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "bgColor",
|
|
111
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
112
|
+
"default": null,
|
|
113
|
+
"description": "Background color helper.",
|
|
114
|
+
"required": false,
|
|
115
|
+
"inherited": false,
|
|
116
|
+
"deprecated": false,
|
|
117
|
+
"valuesRef": "helpers/valid-values"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"extraProps": [
|
|
121
|
+
{
|
|
122
|
+
"name": "skeleton",
|
|
123
|
+
"type": "boolean",
|
|
124
|
+
"default": null,
|
|
125
|
+
"description": "Applies the `is-skeleton` class to the entire component.",
|
|
126
|
+
"required": false,
|
|
127
|
+
"inherited": false,
|
|
128
|
+
"deprecated": false
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"catchAll": "All standard <h1>–<h6> attributes and Bulma helper props",
|
|
132
|
+
"types": []
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"cssVars": [
|
|
136
|
+
{
|
|
137
|
+
"css": "--bulma-title-color",
|
|
138
|
+
"sass": "$title-color",
|
|
139
|
+
"default": "var(--bulma-text-strong)",
|
|
140
|
+
"scope": "component"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"css": "--bulma-title-family",
|
|
144
|
+
"sass": "$title-family",
|
|
145
|
+
"default": "false",
|
|
146
|
+
"scope": "component"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"css": "--bulma-title-size",
|
|
150
|
+
"sass": "$title-size",
|
|
151
|
+
"default": "var(--bulma-size-3)",
|
|
152
|
+
"scope": "component"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"css": "--bulma-title-weight",
|
|
156
|
+
"sass": "$title-weight",
|
|
157
|
+
"default": "var(--bulma-weight-extrabold)",
|
|
158
|
+
"scope": "component"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"css": "--bulma-title-line-height",
|
|
162
|
+
"sass": "$title-line-height",
|
|
163
|
+
"default": "1.125",
|
|
164
|
+
"scope": "component"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"css": "--bulma-title-strong-color",
|
|
168
|
+
"sass": "$title-strong-color",
|
|
169
|
+
"default": "inherit",
|
|
170
|
+
"scope": "component"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"css": "--bulma-title-strong-weight",
|
|
174
|
+
"sass": "$title-strong-weight",
|
|
175
|
+
"default": "inherit",
|
|
176
|
+
"scope": "component"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"css": "--bulma-title-sub-size",
|
|
180
|
+
"sass": "$title-sub-size",
|
|
181
|
+
"default": "0.75em",
|
|
182
|
+
"scope": "component"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"css": "--bulma-title-sup-size",
|
|
186
|
+
"sass": "$title-sup-size",
|
|
187
|
+
"default": "0.75em",
|
|
188
|
+
"scope": "component"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"css": "--bulma-subtitle-color",
|
|
192
|
+
"sass": "$subtitle-color",
|
|
193
|
+
"default": "var(--bulma-text)",
|
|
194
|
+
"scope": "component"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"css": "--bulma-subtitle-family",
|
|
198
|
+
"sass": "$subtitle-family",
|
|
199
|
+
"default": "false",
|
|
200
|
+
"scope": "component"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"css": "--bulma-subtitle-size",
|
|
204
|
+
"sass": "$subtitle-size",
|
|
205
|
+
"default": "var(--bulma-size-5)",
|
|
206
|
+
"scope": "component"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"css": "--bulma-subtitle-weight",
|
|
210
|
+
"sass": "$subtitle-weight",
|
|
211
|
+
"default": "var(--bulma-weight-normal)",
|
|
212
|
+
"scope": "component"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"css": "--bulma-subtitle-line-height",
|
|
216
|
+
"sass": "$subtitle-line-height",
|
|
217
|
+
"default": "1.25",
|
|
218
|
+
"scope": "component"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"css": "--bulma-subtitle-strong-color",
|
|
222
|
+
"sass": "$subtitle-strong-color",
|
|
223
|
+
"default": "var(--bulma-text-strong)",
|
|
224
|
+
"scope": "component"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"css": "--bulma-subtitle-strong-weight",
|
|
228
|
+
"sass": "$subtitle-strong-weight",
|
|
229
|
+
"default": "var(--bulma-weight-semibold)",
|
|
230
|
+
"scope": "component"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Switch",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "form",
|
|
5
|
+
"slug": "form/switch",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/form/switch",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic Switch",
|
|
10
|
+
"code": "function example() {\n return <Switch>Enable notifications</Switch>;\n}"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Colors",
|
|
14
|
+
"code": "function example() {\n return (\n <Block display=\"flex\" flexDirection=\"column\" gap=\"4\">\n <Switch color=\"primary\" defaultChecked>\n Primary\n </Switch>\n <Switch color=\"link\" defaultChecked>\n Link\n </Switch>\n <Switch color=\"info\" defaultChecked>\n Info\n </Switch>\n <Switch color=\"success\" defaultChecked>\n Success\n </Switch>\n <Switch color=\"warning\" defaultChecked>\n Warning\n </Switch>\n <Switch color=\"danger\" defaultChecked>\n Danger\n </Switch>\n </Block>\n );\n}"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Sizes",
|
|
18
|
+
"code": "function example() {\n return (\n <Block display=\"flex\" flexDirection=\"column\" gap=\"4\">\n <Switch size=\"small\" defaultChecked>\n Small\n </Switch>\n <Switch size=\"normal\" defaultChecked>\n Normal\n </Switch>\n <Switch size=\"medium\" defaultChecked>\n Medium\n </Switch>\n <Switch size=\"large\" defaultChecked>\n Large\n </Switch>\n </Block>\n );\n}"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Rounded Style",
|
|
22
|
+
"code": "function example() {\n return (\n <Switch isRounded color=\"success\" defaultChecked>\n Rounded switch\n </Switch>\n );\n}"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Thin Style",
|
|
26
|
+
"code": "function example() {\n return (\n <Switch isThin color=\"info\" defaultChecked>\n Thin switch\n </Switch>\n );\n}"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Outlined Style",
|
|
30
|
+
"code": "function example() {\n return (\n <Block display=\"flex\" flexDirection=\"column\" gap=\"4\">\n <Switch isOutlined color=\"primary\" defaultChecked>\n Primary outlined\n </Switch>\n <Switch isOutlined color=\"success\" defaultChecked>\n Success outlined\n </Switch>\n </Block>\n );\n}"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "RTL Layout",
|
|
34
|
+
"code": "function example() {\n return (\n <Switch isRtl color=\"primary\" defaultChecked>\n Label on left\n </Switch>\n );\n}"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "Disabled State",
|
|
38
|
+
"code": "function example() {\n return (\n <Block display=\"flex\" flexDirection=\"column\" gap=\"4\">\n <Switch disabled>Disabled unchecked</Switch>\n <Switch disabled defaultChecked color=\"success\">\n Disabled checked\n </Switch>\n </Block>\n );\n}"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Controlled Usage",
|
|
42
|
+
"code": "function example() {\n const [isEnabled, setIsEnabled] = useState(false);\n\n return (\n <Block>\n <Switch\n color=\"primary\"\n checked={isEnabled}\n onChange={e => setIsEnabled(e.target.checked)}\n >\n Feature is {isEnabled ? 'enabled' : 'disabled'}\n </Switch>\n <Paragraph mt=\"2\">\n State: <Strong>{isEnabled ? 'ON' : 'OFF'}</Strong>\n </Paragraph>\n </Block>\n );\n}"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Settings Panel Example",
|
|
46
|
+
"code": "function example() {\n const [settings, setSettings] = useState({\n notifications: true,\n darkMode: false,\n autoSave: true,\n });\n\n const updateSetting = key => e => {\n setSettings(prev => ({ ...prev, [key]: e.target.checked }));\n };\n\n return (\n <Block style={{ maxWidth: '300px' }}>\n <Title size=\"5\">Settings</Title>\n <Block display=\"flex\" flexDirection=\"column\" gap=\"4\">\n <Switch\n color=\"primary\"\n checked={settings.notifications}\n onChange={updateSetting('notifications')}\n >\n Push notifications\n </Switch>\n <Switch\n color=\"info\"\n checked={settings.darkMode}\n onChange={updateSetting('darkMode')}\n >\n Dark mode\n </Switch>\n <Switch\n color=\"success\"\n checked={settings.autoSave}\n onChange={updateSetting('autoSave')}\n >\n Auto-save\n </Switch>\n </Block>\n </Block>\n );\n}"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"accessibility": "- The Switch is built on a native checkbox input for proper keyboard navigation\n- Use the `children` prop to provide a visible label\n- For icon-only switches, provide an `aria-label` prop\n- The switch can be focused and toggled with keyboard (Space/Enter)",
|
|
50
|
+
"related": [],
|
|
51
|
+
"storybook": null,
|
|
52
|
+
"summary": "The `Switch` component provides a toggle switch for boolean on/off states.",
|
|
53
|
+
"import": "import { Switch } from '@allxsmith/bestax-bulma';",
|
|
54
|
+
"sourceFile": "bulma-ui/src/form/Switch.tsx",
|
|
55
|
+
"rootClass": "switch",
|
|
56
|
+
"parts": [
|
|
57
|
+
{
|
|
58
|
+
"path": "Switch",
|
|
59
|
+
"summary": "The `Switch` component provides a toggle switch for boolean on/off states.",
|
|
60
|
+
"component": null,
|
|
61
|
+
"props": [
|
|
62
|
+
{
|
|
63
|
+
"name": "color",
|
|
64
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
65
|
+
"default": null,
|
|
66
|
+
"description": "Color variant for the switch.",
|
|
67
|
+
"required": false,
|
|
68
|
+
"inherited": false,
|
|
69
|
+
"deprecated": false
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "size",
|
|
73
|
+
"type": "'small' | 'normal' | 'medium' | 'large'",
|
|
74
|
+
"default": null,
|
|
75
|
+
"description": "Size of the switch.",
|
|
76
|
+
"required": false,
|
|
77
|
+
"inherited": false,
|
|
78
|
+
"deprecated": false
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "isRounded",
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"default": "false",
|
|
84
|
+
"description": "Use rounded switch style.",
|
|
85
|
+
"required": false,
|
|
86
|
+
"inherited": false,
|
|
87
|
+
"deprecated": false
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "isThin",
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"default": "false",
|
|
93
|
+
"description": "Use thin switch style.",
|
|
94
|
+
"required": false,
|
|
95
|
+
"inherited": false,
|
|
96
|
+
"deprecated": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "isOutlined",
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"default": "false",
|
|
102
|
+
"description": "Use outlined switch style.",
|
|
103
|
+
"required": false,
|
|
104
|
+
"inherited": false,
|
|
105
|
+
"deprecated": false
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "isRtl",
|
|
109
|
+
"type": "boolean",
|
|
110
|
+
"default": "false",
|
|
111
|
+
"description": "Right-to-left layout (label on left).",
|
|
112
|
+
"required": false,
|
|
113
|
+
"inherited": false,
|
|
114
|
+
"deprecated": false
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "passiveType",
|
|
118
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
119
|
+
"default": null,
|
|
120
|
+
"description": "Color when the switch is in the off/passive state.",
|
|
121
|
+
"required": false,
|
|
122
|
+
"inherited": false,
|
|
123
|
+
"deprecated": false
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "textColor",
|
|
127
|
+
"type": "Bulma color | 'inherit' | 'current'",
|
|
128
|
+
"default": null,
|
|
129
|
+
"description": "Text color helper.",
|
|
130
|
+
"required": false,
|
|
131
|
+
"inherited": false,
|
|
132
|
+
"deprecated": false,
|
|
133
|
+
"valuesRef": "helpers/valid-values"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "children",
|
|
137
|
+
"type": "React.ReactNode",
|
|
138
|
+
"default": null,
|
|
139
|
+
"description": "Label content for the switch.",
|
|
140
|
+
"required": false,
|
|
141
|
+
"inherited": false,
|
|
142
|
+
"deprecated": false
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"extraProps": [
|
|
146
|
+
{
|
|
147
|
+
"name": "checked",
|
|
148
|
+
"type": "boolean",
|
|
149
|
+
"default": null,
|
|
150
|
+
"description": "Controlled checked state.",
|
|
151
|
+
"required": false,
|
|
152
|
+
"inherited": false,
|
|
153
|
+
"deprecated": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"name": "defaultChecked",
|
|
157
|
+
"type": "boolean",
|
|
158
|
+
"default": "false",
|
|
159
|
+
"description": "Default checked state for uncontrolled usage.",
|
|
160
|
+
"required": false,
|
|
161
|
+
"inherited": false,
|
|
162
|
+
"deprecated": false
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "disabled",
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"default": "false",
|
|
168
|
+
"description": "Whether the switch is disabled.",
|
|
169
|
+
"required": false,
|
|
170
|
+
"inherited": false,
|
|
171
|
+
"deprecated": false
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "className",
|
|
175
|
+
"type": "string",
|
|
176
|
+
"default": null,
|
|
177
|
+
"description": "Additional CSS classes.",
|
|
178
|
+
"required": false,
|
|
179
|
+
"inherited": false,
|
|
180
|
+
"deprecated": false
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "onChange",
|
|
184
|
+
"type": "(event: React.ChangeEvent<HTMLInputElement>) => void",
|
|
185
|
+
"default": null,
|
|
186
|
+
"description": "Callback when switch state changes.",
|
|
187
|
+
"required": false,
|
|
188
|
+
"inherited": false,
|
|
189
|
+
"deprecated": false
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "ref",
|
|
193
|
+
"type": "React.Ref<HTMLInputElement>",
|
|
194
|
+
"default": null,
|
|
195
|
+
"description": "Ref forwarded to the input element.",
|
|
196
|
+
"required": false,
|
|
197
|
+
"inherited": false,
|
|
198
|
+
"deprecated": false
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
202
|
+
"types": []
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"cssVars": [
|
|
206
|
+
{
|
|
207
|
+
"css": "--bulma-switch-width",
|
|
208
|
+
"sass": "$switch-width",
|
|
209
|
+
"default": "2.75em",
|
|
210
|
+
"scope": "component"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"css": "--bulma-switch-height",
|
|
214
|
+
"sass": "$switch-height",
|
|
215
|
+
"default": "1.5em",
|
|
216
|
+
"scope": "component"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"css": "--bulma-switch-padding",
|
|
220
|
+
"sass": "$switch-padding",
|
|
221
|
+
"default": "0.1875em",
|
|
222
|
+
"scope": "component"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"css": "--bulma-switch-border-width",
|
|
226
|
+
"sass": "$switch-border-width",
|
|
227
|
+
"default": "1px",
|
|
228
|
+
"scope": "component"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"css": "--bulma-switch-background",
|
|
232
|
+
"sass": "$switch-background",
|
|
233
|
+
"default": "var(--bulma-grey-light)",
|
|
234
|
+
"scope": "component"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"css": "--bulma-switch-circle-color",
|
|
238
|
+
"sass": "$switch-circle-color",
|
|
239
|
+
"default": "var(--bulma-scheme-main)",
|
|
240
|
+
"scope": "component"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"css": "--bulma-switch-active-color",
|
|
244
|
+
"sass": "$switch-active-color",
|
|
245
|
+
"default": "var(--bulma-primary)",
|
|
246
|
+
"scope": "component"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"css": "--bulma-switch-radius",
|
|
250
|
+
"sass": "$switch-radius",
|
|
251
|
+
"default": "var(--bulma-radius-rounded)",
|
|
252
|
+
"scope": "component"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"css": "--bulma-switch-label-gap",
|
|
256
|
+
"sass": "$switch-label-gap",
|
|
257
|
+
"default": "0.5em",
|
|
258
|
+
"scope": "component"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"css": "--bulma-switch-transition-duration",
|
|
262
|
+
"sass": "$switch-transition-duration",
|
|
263
|
+
"default": "var(--bulma-duration)",
|
|
264
|
+
"scope": "component"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"css": "--bulma-switch-circle-shadow",
|
|
268
|
+
"sass": "$switch-circle-shadow",
|
|
269
|
+
"default": "0 2px 3px rgba(10, 10, 10, 0.1)",
|
|
270
|
+
"scope": "component"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"css": "--bulma-switch-focus-shadow",
|
|
274
|
+
"sass": "$switch-focus-shadow",
|
|
275
|
+
"default": "0 0 0 0.125em rgba(0, 0, 0, 0.1)",
|
|
276
|
+
"scope": "component"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"css": "--bulma-switch-thin-height",
|
|
280
|
+
"sass": "$switch-thin-height",
|
|
281
|
+
"default": "0.75em",
|
|
282
|
+
"scope": "component"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"css": "--bulma-switch-thin-circle-size",
|
|
286
|
+
"sass": "$switch-thin-circle-size",
|
|
287
|
+
"default": "1.25em",
|
|
288
|
+
"scope": "component"
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
}
|