bestax-mcp 1.18.20 → 1.18.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/bulma-classes.json +1 -0
- package/data/catalog.json +34 -3
- package/data/components/ColorInput.json +752 -0
- package/data/components/DataTable.json +4 -0
- package/data/components/LocaleProvider.json +2 -6
- package/data/skills/bestax-custom-component/references/component-catalog.md +2 -1
- package/data/skills/bestax-form/SKILL.md +24 -24
- package/data/skills/bestax-form/references/api.md +8 -1
- package/data/skills/bestax-layout-scaffold/SKILL.md +2 -1
- package/data/skills/bestax-optimize/references/modular-build.md +3 -1
- package/data/skills/bestax-theming/references/css-variables.md +16 -1
- package/data/skills/bestax-theming/references/themeable-components.md +1 -0
- package/data/skills.json +5 -5
- package/package.json +2 -2
package/data/bulma-classes.json
CHANGED
|
@@ -13103,6 +13103,7 @@
|
|
|
13103
13103
|
"checkbox-card": "CheckboxCard",
|
|
13104
13104
|
"collapse": "Collapse",
|
|
13105
13105
|
"collapses": "Collapses",
|
|
13106
|
+
"colorinput": "ColorInput",
|
|
13106
13107
|
"color-picker": "ColorPicker",
|
|
13107
13108
|
"color-swatch": "ColorSwatch",
|
|
13108
13109
|
"combobox": "Combobox",
|
package/data/catalog.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"generatedFrom": {
|
|
4
4
|
"package": "@allxsmith/bestax-bulma",
|
|
5
|
-
"version": "5.
|
|
5
|
+
"version": "5.57.0"
|
|
6
6
|
},
|
|
7
7
|
"docsBase": "https://bestax.io/docs",
|
|
8
8
|
"categories": [
|
|
@@ -95,6 +95,7 @@
|
|
|
95
95
|
"Checkbox",
|
|
96
96
|
"CheckboxCard",
|
|
97
97
|
"Checkboxes",
|
|
98
|
+
"ColorInput",
|
|
98
99
|
"ColorPicker",
|
|
99
100
|
"Combobox",
|
|
100
101
|
"Control",
|
|
@@ -366,6 +367,17 @@
|
|
|
366
367
|
"propCount": 19,
|
|
367
368
|
"exampleCount": 8
|
|
368
369
|
},
|
|
370
|
+
{
|
|
371
|
+
"name": "ColorInput",
|
|
372
|
+
"kind": "component",
|
|
373
|
+
"category": "form",
|
|
374
|
+
"purpose": "The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch.",
|
|
375
|
+
"slug": "form/colorinput",
|
|
376
|
+
"import": "import { ColorInput } from '@allxsmith/bestax-bulma';",
|
|
377
|
+
"compound": false,
|
|
378
|
+
"propCount": 35,
|
|
379
|
+
"exampleCount": 11
|
|
380
|
+
},
|
|
369
381
|
{
|
|
370
382
|
"name": "ColorPicker",
|
|
371
383
|
"kind": "component",
|
|
@@ -496,7 +508,7 @@
|
|
|
496
508
|
"import": "import { DataTable, useDataTable } from '@allxsmith/bestax-bulma';",
|
|
497
509
|
"compound": false,
|
|
498
510
|
"propCount": 38,
|
|
499
|
-
"exampleCount":
|
|
511
|
+
"exampleCount": 15
|
|
500
512
|
},
|
|
501
513
|
{
|
|
502
514
|
"name": "DateInput",
|
|
@@ -837,7 +849,7 @@
|
|
|
837
849
|
"import": "import { LocaleProvider, useLocale } from '@allxsmith/bestax-bulma';",
|
|
838
850
|
"compound": false,
|
|
839
851
|
"propCount": 5,
|
|
840
|
-
"exampleCount":
|
|
852
|
+
"exampleCount": 9
|
|
841
853
|
},
|
|
842
854
|
{
|
|
843
855
|
"name": "Media",
|
|
@@ -1680,6 +1692,11 @@
|
|
|
1680
1692
|
"--bulma-color-swatch-edge-color": ["ColorSwatch"],
|
|
1681
1693
|
"--bulma-color-swatch-radius": ["ColorSwatch"],
|
|
1682
1694
|
"--bulma-color-swatch-size": ["ColorSwatch"],
|
|
1695
|
+
"--bulma-colorinput-disabled-opacity": ["ColorInput"],
|
|
1696
|
+
"--bulma-colorinput-side-width": ["ColorInput"],
|
|
1697
|
+
"--bulma-colorinput-swatch-size": ["ColorInput"],
|
|
1698
|
+
"--bulma-colorinput-trigger-color": ["ColorInput"],
|
|
1699
|
+
"--bulma-colorinput-trigger-hover-color": ["ColorInput"],
|
|
1683
1700
|
"--bulma-column-gap": ["Column"],
|
|
1684
1701
|
"--bulma-combobox-check-color": ["Combobox"],
|
|
1685
1702
|
"--bulma-combobox-check-gap": ["Combobox"],
|
|
@@ -2559,48 +2576,56 @@
|
|
|
2559
2576
|
"--bulma-panel-tab-border-bottom-width": ["Panel"],
|
|
2560
2577
|
"--bulma-panel-tabs-font-size": ["Panel"],
|
|
2561
2578
|
"--bulma-picker-popover-animation-duration": [
|
|
2579
|
+
"ColorInput",
|
|
2562
2580
|
"DateInput",
|
|
2563
2581
|
"DateRangeInput",
|
|
2564
2582
|
"DateTimeInput",
|
|
2565
2583
|
"TimeInput"
|
|
2566
2584
|
],
|
|
2567
2585
|
"--bulma-picker-popover-background": [
|
|
2586
|
+
"ColorInput",
|
|
2568
2587
|
"DateInput",
|
|
2569
2588
|
"DateRangeInput",
|
|
2570
2589
|
"DateTimeInput",
|
|
2571
2590
|
"TimeInput"
|
|
2572
2591
|
],
|
|
2573
2592
|
"--bulma-picker-popover-border-color": [
|
|
2593
|
+
"ColorInput",
|
|
2574
2594
|
"DateInput",
|
|
2575
2595
|
"DateRangeInput",
|
|
2576
2596
|
"DateTimeInput",
|
|
2577
2597
|
"TimeInput"
|
|
2578
2598
|
],
|
|
2579
2599
|
"--bulma-picker-popover-offset": [
|
|
2600
|
+
"ColorInput",
|
|
2580
2601
|
"DateInput",
|
|
2581
2602
|
"DateRangeInput",
|
|
2582
2603
|
"DateTimeInput",
|
|
2583
2604
|
"TimeInput"
|
|
2584
2605
|
],
|
|
2585
2606
|
"--bulma-picker-popover-padding": [
|
|
2607
|
+
"ColorInput",
|
|
2586
2608
|
"DateInput",
|
|
2587
2609
|
"DateRangeInput",
|
|
2588
2610
|
"DateTimeInput",
|
|
2589
2611
|
"TimeInput"
|
|
2590
2612
|
],
|
|
2591
2613
|
"--bulma-picker-popover-radius": [
|
|
2614
|
+
"ColorInput",
|
|
2592
2615
|
"DateInput",
|
|
2593
2616
|
"DateRangeInput",
|
|
2594
2617
|
"DateTimeInput",
|
|
2595
2618
|
"TimeInput"
|
|
2596
2619
|
],
|
|
2597
2620
|
"--bulma-picker-popover-shadow": [
|
|
2621
|
+
"ColorInput",
|
|
2598
2622
|
"DateInput",
|
|
2599
2623
|
"DateRangeInput",
|
|
2600
2624
|
"DateTimeInput",
|
|
2601
2625
|
"TimeInput"
|
|
2602
2626
|
],
|
|
2603
2627
|
"--bulma-picker-popover-z-index": [
|
|
2628
|
+
"ColorInput",
|
|
2604
2629
|
"DateInput",
|
|
2605
2630
|
"DateRangeInput",
|
|
2606
2631
|
"DateTimeInput",
|
|
@@ -2987,6 +3012,12 @@
|
|
|
2987
3012
|
"purpose": "Individual carousel item/slide.",
|
|
2988
3013
|
"standalone": "companion"
|
|
2989
3014
|
},
|
|
3015
|
+
"ColorInputBase": {
|
|
3016
|
+
"component": "ColorInput",
|
|
3017
|
+
"path": "ColorInputBase",
|
|
3018
|
+
"purpose": "The raw ColorInput: a text field with a swatch and a launcher that opens a color picker in a popover, without Field/Control wrapping.",
|
|
3019
|
+
"standalone": "base"
|
|
3020
|
+
},
|
|
2990
3021
|
"ColorPickerAlphaSlider": {
|
|
2991
3022
|
"component": "ColorPicker",
|
|
2992
3023
|
"path": "ColorPicker.AlphaSlider",
|
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ColorInput",
|
|
3
|
+
"kind": "component",
|
|
4
|
+
"category": "form",
|
|
5
|
+
"slug": "form/colorinput",
|
|
6
|
+
"docsUrl": "https://bestax.io/docs/api/form/colorinput",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"title": "Basic Usage",
|
|
10
|
+
"code": "<ColorInput label=\"Brand color\" defaultValue=\"hsl(202, 67%, 36%)\" />"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"title": "Empty",
|
|
14
|
+
"code": "<ColorInput label=\"Highlight\" placeholder=\"No color\" />"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"title": "Typing",
|
|
18
|
+
"code": "<ColorInput label=\"Type tomato, then Enter\" format=\"hex\" />"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"title": "Formats and Alpha",
|
|
22
|
+
"code": "<ColorInput\n label=\"Overlay\"\n alpha\n format=\"rgb\"\n defaultValue=\"rgba(10, 10, 10, 0.6)\"\n/>"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"title": "Swatches",
|
|
26
|
+
"code": "<ColorInput\n label=\"Label color\"\n format=\"hex\"\n closeOnSwatchClick\n swatches={[\n { color: '#1e6b99', label: 'Ocean' },\n { color: '#00d1b2', label: 'Turquoise' },\n { color: '#ff6685', label: 'Pink' },\n { color: '#ffdd57', label: 'Sunflower' },\n ]}\n/>"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"title": "Controlled, and Theming With It",
|
|
30
|
+
"code": "function example() {\n const [color, setColor] = useState('hsl(202, 67%, 36%)');\n const [h, s, l] = color.match(/[\\d.]+/g) ?? [];\n return (\n <>\n <ColorInput label=\"Primary\" value={color} onChange={setColor} />\n <Theme primaryH={h} primaryS={s && `${s}%`} primaryL={l && `${l}%`}>\n <Buttons>\n <Button color=\"primary\">Primary</Button>\n <Button color=\"primary\" isOutlined>\n Outlined\n </Button>\n </Buttons>\n </Theme>\n </>\n );\n}"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Opening on Focus",
|
|
34
|
+
"code": "<ColorInput label=\"Accent\" openOnFocus defaultValue=\"#ffdd57\" />"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"title": "In a Form",
|
|
38
|
+
"code": "<form onSubmit={event => event.preventDefault()}>\n <ColorInput label=\"Calendar color\" name=\"calendarColor\" required />\n <ColorInput label=\"Locked\" disabled defaultValue=\"#ff6685\" />\n</form>"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"title": "Sizes and Colors",
|
|
42
|
+
"code": "<>\n <ColorInput label=\"Small\" size=\"small\" isRounded defaultValue=\"#00d1b2\" />\n <ColorInput label=\"Large\" size=\"large\" color=\"info\" defaultValue=\"#1e6b99\" />\n</>"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"title": "Right to Left",
|
|
46
|
+
"code": "<LocaleProvider locale=\"ar\" dir=\"rtl\">\n <ColorInput\n label=\"اللون\"\n defaultValue=\"hsl(150, 60%, 40%)\"\n labels={{ chooseColor: 'اختر لونًا' }}\n />\n</LocaleProvider>"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"title": "Without the Field",
|
|
50
|
+
"code": "<Field label=\"Bare\">\n <Control>\n <ColorInputBase defaultValue=\"#ff6685\" />\n </Control>\n</Field>"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"accessibility": "- **The field is a combobox that opens a dialog**, as the date pickers' is: `role=\"combobox\"`,\n `aria-haspopup=\"dialog\"`, `aria-expanded` and `aria-controls`, named by its `label`. The\n launcher is a button named \"Choose color\" with the same attributes.\n- **Keys in the field:** Alt+ArrowDown opens the panel; Enter commits typed text; Escape puts\n typed text back without closing a `Modal` around the field.\n- **The panel** is a non-modal `dialog` named \"Choose color\" that holds focus while it's open.\n Focus starts on the saturation and brightness square, and Escape, Alt+ArrowUp or a press\n outside closes it and hands focus back to the field.\n- **The square and the sliders** are `ColorPicker`'s: native range inputs, the square one 2D\n slider with one tab stop. See [`ColorPicker`](https://bestax.io/docs/api/form/colorpicker#accessibility).\n- **The swatch in the field** is for the pointer only: it's hidden from assistive tech and takes\n no tab stop, since the launcher does the same from the keyboard.\n- **The value is always text** in the field, and text it can't read is marked `aria-invalid`.\n- **Forced colors:** the swatch keeps its color with an edge in the system's text color.\n- **Strings** come from `labels`, with English defaults.",
|
|
54
|
+
"related": ["ColorPicker", "ColorSwatch", "DateInput", "useBulmaClasses"],
|
|
55
|
+
"storybook": "https://bestax.io/storybook/?path=/story/form-colorinput--default",
|
|
56
|
+
"summary": "The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch. The value is a CSS color string, HSL by default, or empty. The panel is the `ColorPicker`'s square, hue slider and, when asked for, alpha slider, swatches and eye dropper, in the same popover the date pickers use.",
|
|
57
|
+
"import": "import { ColorInput } from '@allxsmith/bestax-bulma';",
|
|
58
|
+
"sourceFile": "bulma-ui/src/form/ColorInput.tsx",
|
|
59
|
+
"rootClass": "colorinput",
|
|
60
|
+
"parts": [
|
|
61
|
+
{
|
|
62
|
+
"path": "ColorInput",
|
|
63
|
+
"summary": "The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch. The value is a CSS color string, HSL by default, or empty. The panel is the `ColorPicker`'s square, hue slider and, when asked for, alpha slider, swatches and eye dropper, in the same popover the date pickers use.",
|
|
64
|
+
"component": null,
|
|
65
|
+
"props": [
|
|
66
|
+
{
|
|
67
|
+
"name": "label",
|
|
68
|
+
"type": "React.ReactNode",
|
|
69
|
+
"default": null,
|
|
70
|
+
"description": "Field label (component auto-wraps in a `Field` if not already inside). Automatically associated with the text field via `htmlFor`, using your `id` when provided, otherwise a generated one. Dropped inside an outer `Field`, whose own label associates instead when that `Field` generates a target id (not `grouped`/`hasAddons`, no explicit `labelProps.htmlFor`) and you set no `id` here.",
|
|
71
|
+
"required": false,
|
|
72
|
+
"inherited": false,
|
|
73
|
+
"deprecated": false
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "labelSize",
|
|
77
|
+
"type": "'small' | 'normal' | 'medium' | 'large'",
|
|
78
|
+
"default": null,
|
|
79
|
+
"description": "Size for the label.",
|
|
80
|
+
"required": false,
|
|
81
|
+
"inherited": false,
|
|
82
|
+
"deprecated": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "labelProps",
|
|
86
|
+
"type": "React.LabelHTMLAttributes<HTMLLabelElement> & { [key: string]: unknown; }",
|
|
87
|
+
"default": null,
|
|
88
|
+
"description": "Props for the label element. An explicit `htmlFor` here overrides the automatic association (no id is generated then).",
|
|
89
|
+
"required": false,
|
|
90
|
+
"inherited": false,
|
|
91
|
+
"deprecated": false
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "horizontal",
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"default": "false",
|
|
97
|
+
"description": "Render the field with horizontal layout.",
|
|
98
|
+
"required": false,
|
|
99
|
+
"inherited": false,
|
|
100
|
+
"deprecated": false
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"name": "isLoading",
|
|
104
|
+
"type": "boolean",
|
|
105
|
+
"default": "false",
|
|
106
|
+
"description": "Shows a loading spinner on the `Control` it renders, and hides the launcher (`triggerIcon`) while it does. Inside your own `Control` it renders none, so this draws nothing and warns in development; set `isLoading` on that `Control`.",
|
|
107
|
+
"required": false,
|
|
108
|
+
"inherited": false,
|
|
109
|
+
"deprecated": false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "triggerIcon",
|
|
113
|
+
"type": "boolean",
|
|
114
|
+
"default": "true",
|
|
115
|
+
"description": "Shows the launcher on the field's end that toggles the panel. Hidden by default while a spinner shows at the same edge: this component's `isLoading` when it renders its own `Control`, or the enclosing `Control`'s `isLoading` inside one.",
|
|
116
|
+
"required": false,
|
|
117
|
+
"inherited": false,
|
|
118
|
+
"deprecated": false
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "isExpanded",
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"default": "false",
|
|
124
|
+
"description": "Expand the control to fill its container.",
|
|
125
|
+
"required": false,
|
|
126
|
+
"inherited": false,
|
|
127
|
+
"deprecated": false
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "controlSize",
|
|
131
|
+
"type": "'small' | 'medium' | 'large'",
|
|
132
|
+
"default": null,
|
|
133
|
+
"description": "Size of the wrapping Control.",
|
|
134
|
+
"required": false,
|
|
135
|
+
"inherited": false,
|
|
136
|
+
"deprecated": false
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"name": "message",
|
|
140
|
+
"type": "React.ReactNode",
|
|
141
|
+
"default": null,
|
|
142
|
+
"description": "Help/validation text below the field.",
|
|
143
|
+
"required": false,
|
|
144
|
+
"inherited": false,
|
|
145
|
+
"deprecated": false
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "messageColor",
|
|
149
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
150
|
+
"default": null,
|
|
151
|
+
"description": "Color modifier for the help message.",
|
|
152
|
+
"required": false,
|
|
153
|
+
"inherited": false,
|
|
154
|
+
"deprecated": false
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "fieldClassName",
|
|
158
|
+
"type": "string",
|
|
159
|
+
"default": null,
|
|
160
|
+
"description": "Additional CSS classes for the Field wrapper.",
|
|
161
|
+
"required": false,
|
|
162
|
+
"inherited": false,
|
|
163
|
+
"deprecated": false
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"name": "controlClassName",
|
|
167
|
+
"type": "string",
|
|
168
|
+
"default": null,
|
|
169
|
+
"description": "Additional CSS classes for the Control wrapper.",
|
|
170
|
+
"required": false,
|
|
171
|
+
"inherited": false,
|
|
172
|
+
"deprecated": false
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "value",
|
|
176
|
+
"type": "string",
|
|
177
|
+
"default": null,
|
|
178
|
+
"description": "The color, controlled, as a CSS color the picker reads (hex, `rgb()`, `hsl()` or a color name), or `''` for none.",
|
|
179
|
+
"required": false,
|
|
180
|
+
"inherited": true,
|
|
181
|
+
"deprecated": false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "defaultValue",
|
|
185
|
+
"type": "string",
|
|
186
|
+
"default": null,
|
|
187
|
+
"description": "The color to start with, uncontrolled; empty without one.",
|
|
188
|
+
"required": false,
|
|
189
|
+
"inherited": true,
|
|
190
|
+
"deprecated": false
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "onChange",
|
|
194
|
+
"type": "(value: string) => void",
|
|
195
|
+
"default": null,
|
|
196
|
+
"description": "Called with the color, in `format`, as it changes: on every step of a drag in the panel, on a key or a swatch, and when typed text is committed. Clearing the field calls it with `''`.",
|
|
197
|
+
"required": false,
|
|
198
|
+
"inherited": true,
|
|
199
|
+
"deprecated": false
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "onChangeEnd",
|
|
203
|
+
"type": "(value: string) => void",
|
|
204
|
+
"default": null,
|
|
205
|
+
"description": "Called with the color, in `format`, once a change is done: when a drag ends, and with `onChange` for everything else. The place to save it.",
|
|
206
|
+
"required": false,
|
|
207
|
+
"inherited": true,
|
|
208
|
+
"deprecated": false
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "format",
|
|
212
|
+
"type": "'hsl' | 'hex' | 'rgb'",
|
|
213
|
+
"default": "'hsl'",
|
|
214
|
+
"description": "How the value is written: `'hsl'` (`hsl(171, 100%, 41%)`), `'hex'` or `'rgb'`, with alpha as `hsla()`, `#rrggbbaa` and `rgba()`. Typed text in any of them is written back in this one.",
|
|
215
|
+
"required": false,
|
|
216
|
+
"inherited": true,
|
|
217
|
+
"deprecated": false
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"name": "alpha",
|
|
221
|
+
"type": "boolean",
|
|
222
|
+
"default": "false",
|
|
223
|
+
"description": "Adds an alpha slider to the panel and writes the alpha into the value.",
|
|
224
|
+
"required": false,
|
|
225
|
+
"inherited": true,
|
|
226
|
+
"deprecated": false
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"name": "swatches",
|
|
230
|
+
"type": "ColorPickerSwatch[] | 'bulma'",
|
|
231
|
+
"default": null,
|
|
232
|
+
"description": "Preset colors in the panel: a list of CSS colors, each a string or `{ color, label }`, or `\"bulma\"` for the page's theme colors.",
|
|
233
|
+
"required": false,
|
|
234
|
+
"inherited": true,
|
|
235
|
+
"deprecated": false
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "eyeDropper",
|
|
239
|
+
"type": "boolean",
|
|
240
|
+
"default": "false",
|
|
241
|
+
"description": "Adds a button to the panel that picks a color from anywhere on the screen, where the browser has the EyeDropper API.",
|
|
242
|
+
"required": false,
|
|
243
|
+
"inherited": true,
|
|
244
|
+
"deprecated": false
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "onOpen",
|
|
248
|
+
"type": "() => void",
|
|
249
|
+
"default": null,
|
|
250
|
+
"description": "Fired when the panel opens.",
|
|
251
|
+
"required": false,
|
|
252
|
+
"inherited": true,
|
|
253
|
+
"deprecated": false
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"name": "onClose",
|
|
257
|
+
"type": "() => void",
|
|
258
|
+
"default": null,
|
|
259
|
+
"description": "Fired when the panel closes.",
|
|
260
|
+
"required": false,
|
|
261
|
+
"inherited": true,
|
|
262
|
+
"deprecated": false
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"name": "openOnFocus",
|
|
266
|
+
"type": "boolean",
|
|
267
|
+
"default": "false",
|
|
268
|
+
"description": "Opens the panel when the field takes focus, and moves focus into it. Off by default, since typing a value is the quick way in and the launcher, a click on the swatch or Alt+ArrowDown open it.",
|
|
269
|
+
"required": false,
|
|
270
|
+
"inherited": true,
|
|
271
|
+
"deprecated": false
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"name": "closeOnSwatchClick",
|
|
275
|
+
"type": "boolean",
|
|
276
|
+
"default": "false",
|
|
277
|
+
"description": "Closes the panel once a swatch is chosen.",
|
|
278
|
+
"required": false,
|
|
279
|
+
"inherited": true,
|
|
280
|
+
"deprecated": false
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "position",
|
|
284
|
+
"type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
|
|
285
|
+
"default": "'bottom-left'",
|
|
286
|
+
"description": "The panel's place relative to the field.",
|
|
287
|
+
"required": false,
|
|
288
|
+
"inherited": true,
|
|
289
|
+
"deprecated": false
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "appendToBody",
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"default": "false",
|
|
295
|
+
"description": "Renders the panel through a portal, into the `portalContainer` a `ConfigProvider` sets, `document.body` by default.",
|
|
296
|
+
"required": false,
|
|
297
|
+
"inherited": true,
|
|
298
|
+
"deprecated": false
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "color",
|
|
302
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
303
|
+
"default": null,
|
|
304
|
+
"description": "Bulma color modifier for the field.",
|
|
305
|
+
"required": false,
|
|
306
|
+
"inherited": true,
|
|
307
|
+
"deprecated": false
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"name": "size",
|
|
311
|
+
"type": "'small' | 'medium' | 'large'",
|
|
312
|
+
"default": null,
|
|
313
|
+
"description": "The field's size.",
|
|
314
|
+
"required": false,
|
|
315
|
+
"inherited": true,
|
|
316
|
+
"deprecated": false
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "isRounded",
|
|
320
|
+
"type": "boolean",
|
|
321
|
+
"default": "false",
|
|
322
|
+
"description": "Renders the field with rounded ends.",
|
|
323
|
+
"required": false,
|
|
324
|
+
"inherited": true,
|
|
325
|
+
"deprecated": false
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "disabled",
|
|
329
|
+
"type": "boolean",
|
|
330
|
+
"default": "false",
|
|
331
|
+
"description": "Disables the field and its panel. A disabled `Fieldset` does too.",
|
|
332
|
+
"required": false,
|
|
333
|
+
"inherited": true,
|
|
334
|
+
"deprecated": false
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"name": "readOnly",
|
|
338
|
+
"type": "boolean",
|
|
339
|
+
"default": "false",
|
|
340
|
+
"description": "Makes the field read-only, with no panel.",
|
|
341
|
+
"required": false,
|
|
342
|
+
"inherited": true,
|
|
343
|
+
"deprecated": false
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "placeholder",
|
|
347
|
+
"type": "string",
|
|
348
|
+
"default": null,
|
|
349
|
+
"description": "Text shown while the field is empty.",
|
|
350
|
+
"required": false,
|
|
351
|
+
"inherited": true,
|
|
352
|
+
"deprecated": false
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "triggerIconName",
|
|
356
|
+
"type": "string",
|
|
357
|
+
"default": "'chevron-down'",
|
|
358
|
+
"description": "The launcher's glyph.",
|
|
359
|
+
"required": false,
|
|
360
|
+
"inherited": true,
|
|
361
|
+
"deprecated": false
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"name": "labels",
|
|
365
|
+
"type": "ColorPickerLabels",
|
|
366
|
+
"default": null,
|
|
367
|
+
"description": "The strings it says, each with an English default.",
|
|
368
|
+
"required": false,
|
|
369
|
+
"inherited": true,
|
|
370
|
+
"deprecated": false
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"name": "className",
|
|
374
|
+
"type": "string",
|
|
375
|
+
"default": null,
|
|
376
|
+
"description": "Additional CSS classes.",
|
|
377
|
+
"required": false,
|
|
378
|
+
"inherited": false,
|
|
379
|
+
"deprecated": false
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"extraProps": [
|
|
383
|
+
{
|
|
384
|
+
"name": "name",
|
|
385
|
+
"type": "string",
|
|
386
|
+
"default": null,
|
|
387
|
+
"description": "Form field name. The field submits the text it shows, the value in `format`, or nothing when it's empty.",
|
|
388
|
+
"required": false,
|
|
389
|
+
"inherited": false,
|
|
390
|
+
"deprecated": false
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "required",
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"default": "false",
|
|
396
|
+
"description": "Marks the field required, so an empty one fails the form's constraint validation.",
|
|
397
|
+
"required": false,
|
|
398
|
+
"inherited": false,
|
|
399
|
+
"deprecated": false
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"name": "ref",
|
|
403
|
+
"type": "React.Ref<HTMLInputElement>",
|
|
404
|
+
"default": null,
|
|
405
|
+
"description": "Forwarded to the text `<input>`.",
|
|
406
|
+
"required": false,
|
|
407
|
+
"inherited": false,
|
|
408
|
+
"deprecated": false
|
|
409
|
+
}
|
|
410
|
+
],
|
|
411
|
+
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
412
|
+
"helperPropsNote": "Helper props go on the `.colorinput` `<div>`, with `className`. The other attributes go on the text `<input>`.",
|
|
413
|
+
"types": []
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"path": "ColorInputBase",
|
|
417
|
+
"summary": "The raw ColorInput: a text field with a swatch and a launcher that opens a color picker in a popover, without Field/Control wrapping. Use `ColorInput` for the convenience wrapper.",
|
|
418
|
+
"component": null,
|
|
419
|
+
"props": [
|
|
420
|
+
{
|
|
421
|
+
"name": "value",
|
|
422
|
+
"type": "string",
|
|
423
|
+
"default": null,
|
|
424
|
+
"description": "The color, controlled, as a CSS color the picker reads (hex, `rgb()`, `hsl()` or a color name), or `''` for none.",
|
|
425
|
+
"required": false,
|
|
426
|
+
"inherited": false,
|
|
427
|
+
"deprecated": false
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"name": "defaultValue",
|
|
431
|
+
"type": "string",
|
|
432
|
+
"default": null,
|
|
433
|
+
"description": "The color to start with, uncontrolled; empty without one.",
|
|
434
|
+
"required": false,
|
|
435
|
+
"inherited": false,
|
|
436
|
+
"deprecated": false
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "onChange",
|
|
440
|
+
"type": "(value: string) => void",
|
|
441
|
+
"default": null,
|
|
442
|
+
"description": "Called with the color, in `format`, as it changes: on every step of a drag in the panel, on a key or a swatch, and when typed text is committed. Clearing the field calls it with `''`.",
|
|
443
|
+
"required": false,
|
|
444
|
+
"inherited": false,
|
|
445
|
+
"deprecated": false
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"name": "onChangeEnd",
|
|
449
|
+
"type": "(value: string) => void",
|
|
450
|
+
"default": null,
|
|
451
|
+
"description": "Called with the color, in `format`, once a change is done: when a drag ends, and with `onChange` for everything else. The place to save it.",
|
|
452
|
+
"required": false,
|
|
453
|
+
"inherited": false,
|
|
454
|
+
"deprecated": false
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "format",
|
|
458
|
+
"type": "'hsl' | 'hex' | 'rgb'",
|
|
459
|
+
"default": "'hsl'",
|
|
460
|
+
"description": "How the value is written: `'hsl'` (`hsl(171, 100%, 41%)`), `'hex'` or `'rgb'`, with alpha as `hsla()`, `#rrggbbaa` and `rgba()`. Typed text in any of them is written back in this one.",
|
|
461
|
+
"required": false,
|
|
462
|
+
"inherited": false,
|
|
463
|
+
"deprecated": false
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "alpha",
|
|
467
|
+
"type": "boolean",
|
|
468
|
+
"default": "false",
|
|
469
|
+
"description": "Adds an alpha slider to the panel and writes the alpha into the value.",
|
|
470
|
+
"required": false,
|
|
471
|
+
"inherited": false,
|
|
472
|
+
"deprecated": false
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "swatches",
|
|
476
|
+
"type": "ColorPickerSwatch[] | 'bulma'",
|
|
477
|
+
"default": null,
|
|
478
|
+
"description": "Preset colors in the panel: a list of CSS colors, each a string or `{ color, label }`, or `\"bulma\"` for the page's theme colors.",
|
|
479
|
+
"required": false,
|
|
480
|
+
"inherited": false,
|
|
481
|
+
"deprecated": false
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"name": "eyeDropper",
|
|
485
|
+
"type": "boolean",
|
|
486
|
+
"default": "false",
|
|
487
|
+
"description": "Adds a button to the panel that picks a color from anywhere on the screen, where the browser has the EyeDropper API.",
|
|
488
|
+
"required": false,
|
|
489
|
+
"inherited": false,
|
|
490
|
+
"deprecated": false
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"name": "onOpen",
|
|
494
|
+
"type": "() => void",
|
|
495
|
+
"default": null,
|
|
496
|
+
"description": "Fired when the panel opens.",
|
|
497
|
+
"required": false,
|
|
498
|
+
"inherited": false,
|
|
499
|
+
"deprecated": false
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "onClose",
|
|
503
|
+
"type": "() => void",
|
|
504
|
+
"default": null,
|
|
505
|
+
"description": "Fired when the panel closes.",
|
|
506
|
+
"required": false,
|
|
507
|
+
"inherited": false,
|
|
508
|
+
"deprecated": false
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"name": "openOnFocus",
|
|
512
|
+
"type": "boolean",
|
|
513
|
+
"default": "false",
|
|
514
|
+
"description": "Opens the panel when the field takes focus, and moves focus into it. Off by default, since typing a value is the quick way in and the launcher, a click on the swatch or Alt+ArrowDown open it.",
|
|
515
|
+
"required": false,
|
|
516
|
+
"inherited": false,
|
|
517
|
+
"deprecated": false
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "closeOnSwatchClick",
|
|
521
|
+
"type": "boolean",
|
|
522
|
+
"default": "false",
|
|
523
|
+
"description": "Closes the panel once a swatch is chosen.",
|
|
524
|
+
"required": false,
|
|
525
|
+
"inherited": false,
|
|
526
|
+
"deprecated": false
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"name": "position",
|
|
530
|
+
"type": "'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | 'auto'",
|
|
531
|
+
"default": "'bottom-left'",
|
|
532
|
+
"description": "The panel's place relative to the field.",
|
|
533
|
+
"required": false,
|
|
534
|
+
"inherited": false,
|
|
535
|
+
"deprecated": false
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"name": "appendToBody",
|
|
539
|
+
"type": "boolean",
|
|
540
|
+
"default": "false",
|
|
541
|
+
"description": "Renders the panel through a portal, into the `portalContainer` a `ConfigProvider` sets, `document.body` by default.",
|
|
542
|
+
"required": false,
|
|
543
|
+
"inherited": false,
|
|
544
|
+
"deprecated": false
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"name": "color",
|
|
548
|
+
"type": "'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger'",
|
|
549
|
+
"default": null,
|
|
550
|
+
"description": "Bulma color modifier for the field.",
|
|
551
|
+
"required": false,
|
|
552
|
+
"inherited": false,
|
|
553
|
+
"deprecated": false
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
"name": "size",
|
|
557
|
+
"type": "'small' | 'medium' | 'large'",
|
|
558
|
+
"default": null,
|
|
559
|
+
"description": "The field's size.",
|
|
560
|
+
"required": false,
|
|
561
|
+
"inherited": false,
|
|
562
|
+
"deprecated": false
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"name": "isRounded",
|
|
566
|
+
"type": "boolean",
|
|
567
|
+
"default": "false",
|
|
568
|
+
"description": "Renders the field with rounded ends.",
|
|
569
|
+
"required": false,
|
|
570
|
+
"inherited": false,
|
|
571
|
+
"deprecated": false
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "disabled",
|
|
575
|
+
"type": "boolean",
|
|
576
|
+
"default": "false",
|
|
577
|
+
"description": "Disables the field and its panel. A disabled `Fieldset` does too.",
|
|
578
|
+
"required": false,
|
|
579
|
+
"inherited": false,
|
|
580
|
+
"deprecated": false
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "readOnly",
|
|
584
|
+
"type": "boolean",
|
|
585
|
+
"default": "false",
|
|
586
|
+
"description": "Makes the field read-only, with no panel.",
|
|
587
|
+
"required": false,
|
|
588
|
+
"inherited": false,
|
|
589
|
+
"deprecated": false
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"name": "placeholder",
|
|
593
|
+
"type": "string",
|
|
594
|
+
"default": null,
|
|
595
|
+
"description": "Text shown while the field is empty.",
|
|
596
|
+
"required": false,
|
|
597
|
+
"inherited": false,
|
|
598
|
+
"deprecated": false
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"name": "triggerIcon",
|
|
602
|
+
"type": "boolean",
|
|
603
|
+
"default": "true",
|
|
604
|
+
"description": "Shows the launcher on the field's end that toggles the panel. Hidden by default while a `Control` it sits in shows its `isLoading` spinner, which shares that edge.",
|
|
605
|
+
"required": false,
|
|
606
|
+
"inherited": false,
|
|
607
|
+
"deprecated": false
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"name": "triggerIconName",
|
|
611
|
+
"type": "string",
|
|
612
|
+
"default": "'chevron-down'",
|
|
613
|
+
"description": "The launcher's glyph.",
|
|
614
|
+
"required": false,
|
|
615
|
+
"inherited": false,
|
|
616
|
+
"deprecated": false
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "labels",
|
|
620
|
+
"type": "ColorPickerLabels",
|
|
621
|
+
"default": null,
|
|
622
|
+
"description": "The strings it says, each with an English default.",
|
|
623
|
+
"required": false,
|
|
624
|
+
"inherited": false,
|
|
625
|
+
"deprecated": false
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"name": "className",
|
|
629
|
+
"type": "string",
|
|
630
|
+
"default": null,
|
|
631
|
+
"description": "Additional CSS classes.",
|
|
632
|
+
"required": false,
|
|
633
|
+
"inherited": false,
|
|
634
|
+
"deprecated": false
|
|
635
|
+
}
|
|
636
|
+
],
|
|
637
|
+
"extraProps": [
|
|
638
|
+
{
|
|
639
|
+
"name": "name",
|
|
640
|
+
"type": "string",
|
|
641
|
+
"default": null,
|
|
642
|
+
"description": "Form field name. The field submits the text it shows, the value in `format`, or nothing when it's empty.",
|
|
643
|
+
"required": false,
|
|
644
|
+
"inherited": false,
|
|
645
|
+
"deprecated": false
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"name": "required",
|
|
649
|
+
"type": "boolean",
|
|
650
|
+
"default": "false",
|
|
651
|
+
"description": "Marks the field required, so an empty one fails the form's constraint validation.",
|
|
652
|
+
"required": false,
|
|
653
|
+
"inherited": false,
|
|
654
|
+
"deprecated": false
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
"name": "ref",
|
|
658
|
+
"type": "React.Ref<HTMLInputElement>",
|
|
659
|
+
"default": null,
|
|
660
|
+
"description": "Forwarded to the text `<input>`.",
|
|
661
|
+
"required": false,
|
|
662
|
+
"inherited": false,
|
|
663
|
+
"deprecated": false
|
|
664
|
+
}
|
|
665
|
+
],
|
|
666
|
+
"catchAll": "All standard <input> attributes and Bulma helper props",
|
|
667
|
+
"helperPropsNote": "Helper props go on the `.colorinput` `<div>`, with `className`. The other attributes go on the text `<input>`.",
|
|
668
|
+
"types": [],
|
|
669
|
+
"standalone": "base"
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"cssVars": [
|
|
673
|
+
{
|
|
674
|
+
"css": "--bulma-colorinput-side-width",
|
|
675
|
+
"sass": "$colorinput-side-width",
|
|
676
|
+
"default": "2.5em",
|
|
677
|
+
"scope": "root"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"css": "--bulma-colorinput-swatch-size",
|
|
681
|
+
"sass": "$colorinput-swatch-size",
|
|
682
|
+
"default": "1.25em",
|
|
683
|
+
"scope": "root"
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"css": "--bulma-colorinput-trigger-color",
|
|
687
|
+
"sass": "$colorinput-trigger-color",
|
|
688
|
+
"default": "var(--bulma-text)",
|
|
689
|
+
"scope": "root"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"css": "--bulma-colorinput-trigger-hover-color",
|
|
693
|
+
"sass": "$colorinput-trigger-hover-color",
|
|
694
|
+
"default": "var(--bulma-text-strong)",
|
|
695
|
+
"scope": "root"
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
"css": "--bulma-colorinput-disabled-opacity",
|
|
699
|
+
"sass": "$colorinput-disabled-opacity",
|
|
700
|
+
"default": "0.5",
|
|
701
|
+
"scope": "root"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
"css": "--bulma-picker-popover-z-index",
|
|
705
|
+
"sass": "$picker-popover-z-index",
|
|
706
|
+
"default": "30",
|
|
707
|
+
"scope": "element"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"css": "--bulma-picker-popover-background",
|
|
711
|
+
"sass": "$picker-popover-background",
|
|
712
|
+
"default": "var(--bulma-scheme-main)",
|
|
713
|
+
"scope": "element"
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"css": "--bulma-picker-popover-radius",
|
|
717
|
+
"sass": "$picker-popover-radius",
|
|
718
|
+
"default": "var(--bulma-radius-large)",
|
|
719
|
+
"scope": "element"
|
|
720
|
+
},
|
|
721
|
+
{
|
|
722
|
+
"css": "--bulma-picker-popover-shadow",
|
|
723
|
+
"sass": "$picker-popover-shadow",
|
|
724
|
+
"default": "0 8px 24px hsla(0, 0%, 0%, 0.18)",
|
|
725
|
+
"scope": "element"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"css": "--bulma-picker-popover-border-color",
|
|
729
|
+
"sass": "$picker-popover-border-color",
|
|
730
|
+
"default": "var(--bulma-border)",
|
|
731
|
+
"scope": "element"
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"css": "--bulma-picker-popover-padding",
|
|
735
|
+
"sass": "$picker-popover-padding",
|
|
736
|
+
"default": "0.75rem",
|
|
737
|
+
"scope": "element"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"css": "--bulma-picker-popover-offset",
|
|
741
|
+
"sass": "$picker-popover-offset",
|
|
742
|
+
"default": "4px",
|
|
743
|
+
"scope": "element"
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
"css": "--bulma-picker-popover-animation-duration",
|
|
747
|
+
"sass": "$picker-popover-animation-duration",
|
|
748
|
+
"default": "0.15s",
|
|
749
|
+
"scope": "element"
|
|
750
|
+
}
|
|
751
|
+
]
|
|
752
|
+
}
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"title": "The useDataTable Hook",
|
|
50
50
|
"code": "function example() {\n const table = useDataTable({\n columns: [\n { id: 'name', header: 'Name', sortable: true, isRowHeader: true },\n { id: 'team', header: 'Team', sortable: true },\n ],\n data: [\n { id: 'e1', name: 'Ada Lovelace', team: 'Engines' },\n { id: 'e2', name: 'Alan Turing', team: 'Codes' },\n { id: 'e3', name: 'Grace Hopper', team: 'Compilers' },\n { id: 'e4', name: 'Hedy Lamarr', team: 'Radio' },\n ],\n selectionMode: 'multiple',\n });\n\n return (\n <>\n <Title as=\"h3\" size=\"5\" id=\"people-heading\">\n People ({table.rowCount})\n </Title>\n <Paragraph>{table.state.selected.length} selected</Paragraph>\n <DataTable\n table={table}\n aria-labelledby=\"people-heading\"\n hasSearch\n isFullwidth\n />\n </>\n );\n}"
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"title": "Downloading CSV",
|
|
54
|
+
"code": "function example() {\n const orders = [\n {\n id: 'A-1041',\n customer: 'Zoë Ørsted',\n total: 1249.5,\n note: 'Gift, wrapped',\n },\n { id: 'A-1042', customer: 'Alan Turing', total: -89, note: 'Refund' },\n {\n id: 'A-1043',\n customer: 'Grace Hopper',\n total: 405.25,\n note: '=HYPERLINK(\"x\")',\n },\n ];\n const download = (csv: string, name: string) => {\n // The byte order mark tells Excel the file is UTF-8.\n const blob = new Blob(['\\uFEFF', csv], { type: 'text/csv;charset=utf-8' });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = name;\n document.body.append(link);\n link.click();\n link.remove();\n setTimeout(() => URL.revokeObjectURL(url));\n };\n\n return (\n <DataTable\n caption=\"Orders\"\n columns={[\n { id: 'id', header: 'Order', isRowHeader: true },\n { id: 'customer', header: 'Customer', sortable: true },\n {\n id: 'total',\n header: 'Total',\n sortable: true,\n align: 'right',\n format: value => (value as number).toFixed(2),\n },\n { id: 'note', header: 'Note' },\n ]}\n data={orders}\n selectionMode=\"multiple\"\n isFullwidth\n toolbar={table => (\n <Buttons>\n <Button\n size=\"small\"\n onClick={() => download(table.toCSV(), 'orders.csv')}\n >\n Download CSV\n </Button>\n <Button\n size=\"small\"\n disabled={table.state.selected.length === 0}\n onClick={() =>\n download(table.toCSV({ rows: 'selected' }), 'selected-orders.csv')\n }\n >\n Download selected\n </Button>\n </Buttons>\n )}\n />\n );\n}"
|
|
55
|
+
},
|
|
52
56
|
{
|
|
53
57
|
"title": "Custom Markup",
|
|
54
58
|
"code": "function example() {\n const table = useDataTable({\n columns: [\n { id: 'name', header: 'Plan', sortable: true },\n { id: 'price', header: 'Price', sortable: true, format: v => `$${v}/mo` },\n ],\n data: [\n { id: 'free', name: 'Free', price: 0 },\n { id: 'team', name: 'Team', price: 12 },\n { id: 'pro', name: 'Pro', price: 29 },\n ],\n selectionMode: 'multiple',\n });\n\n return (\n <>\n <Table isFullwidth aria-label=\"Plans\">\n <Table.Thead>\n <Table.Tr>\n <Table.Th scope=\"col\" isNarrow>\n <Checkbox {...table.getSelectAllProps()} />\n </Table.Th>\n {table.columns.map(column => (\n <Table.Th key={column.id} {...table.getHeaderCellProps(column)}>\n <button {...table.getSortButtonProps(column)}>\n {column.header}\n </button>\n </Table.Th>\n ))}\n </Table.Tr>\n </Table.Thead>\n <Table.Tbody>\n {table.getRows('page').map(row => (\n <Table.Tr key={row.id} {...table.getRowProps(row)}>\n <Table.Td isNarrow>\n <Checkbox {...table.getSelectRowProps(row)} />\n </Table.Td>\n {table.columns.map(column => (\n <Table.Td key={column.id} {...table.getCellProps(row, column)}>\n {table.getText(row, column.id)}\n </Table.Td>\n ))}\n </Table.Tr>\n ))}\n </Table.Tbody>\n </Table>\n <Paragraph>\n Picked:{' '}\n {table\n .getRows('selected')\n .map(row => row.name)\n .join(', ') || 'none'}\n </Paragraph>\n </>\n );\n}"
|
|
@@ -39,11 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"title": "Server Rendering",
|
|
42
|
-
"code": "
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"title": "Server Rendering",
|
|
46
|
-
"code": "import { Providers } from './providers';\n\nexport default function RootLayout({\n children,\n}: {\n children: React.ReactNode;\n}) {\n return (\n <html lang=\"ar-EG\" dir=\"rtl\">\n <body>\n <Providers>{children}</Providers>\n </body>\n </html>\n );\n}"
|
|
42
|
+
"code": "import type { ReactNode } from 'react';\nimport { LocaleProvider } from '@allxsmith/bestax-bulma';\n\nexport default function RootLayout({ children }: { children: ReactNode }) {\n return (\n <html lang=\"ar-EG\" dir=\"rtl\">\n <body>\n <LocaleProvider locale=\"ar-EG\">{children}</LocaleProvider>\n </body>\n </html>\n );\n}"
|
|
47
43
|
}
|
|
48
44
|
],
|
|
49
45
|
"accessibility": "- `lang` tells a screen reader which voice and pronunciation to use, and a translation tool what it's reading. The provider puts it on its wrapper and on portaled content, so a dialog or a notification announced from the end of the page comes in the same language.\n- `dir` decides the reading order of the content inside, and which side text starts on. Set the one the content is written in: a left-to-right quote in a right-to-left page needs its own provider or `dir`.\n- The provider changes no focus order and adds no role. The element it wraps portaled content in has `display: contents`, so it adds no box and no landmark.",
|
|
@@ -111,5 +107,5 @@
|
|
|
111
107
|
}
|
|
112
108
|
],
|
|
113
109
|
"cssVars": [],
|
|
114
|
-
"doc": "# LocaleProvider\n\n## Overview\n\n`LocaleProvider` sets the language and writing direction for the part of the app inside it, on a wrapper `<div>` and on what the library portals out of it.\n\nIt takes a `locale` and a `dir`, and each works alone. A `locale` such as `\"ar-EG\"` becomes the wrapper's `lang`, and its script decides the direction, so `dir=\"rtl\"` comes with it. A `dir` sets the direction whatever the locale, for a right-to-left layout with no particular language, or a locale whose script reads one way on a page laid out the other. A nested provider keeps whatever it leaves unset.\n\nThe direction lives on the wrapper as a `dir` attribute, so CSS follows it, and so do the components that read the direction they're laid out in, as they follow `<html dir>`. A page whose `<html>` already has `dir=\"rtl\"` needs no provider for that. What the provider adds is the rest:\n\n- a section of the page in another language or direction than the page around it;\n- the content the library portals to the end of `document.body`, such as a `Popover` panel, a `Modal` with `portal`, a `Toast` or a `Portal`'s children, which leaves the section it came from and gets the provider's `dir` and `lang` back;\n- the date and time pickers inside, which take its `locale` and start the week on that locale's first day;\n- the numbers the library writes, such as page numbers, badge counts and a slider's output, and the filtering in `Combobox`, `Autocomplete`, `Taginput` and `Command`, which follow the `locale` too.\n\nWithout a provider none of this changes: a picker uses the runtime's own locale and starts the week on Sunday, numbers are written as they always have been, and filtering ignores case only.\n\n---\n\n## Import\n\n```tsx\nimport { LocaleProvider, useLocale } from '@allxsmith/bestax-bulma';\n```\n\n---\n\n## Hooks\n\n### useLocale\n\nReturns the `locale` and `dir` the nearest provider sets, both `undefined` outside one. The locale is in its canonical form, so `\"en-us\"` comes back as `\"en-US\"`. Use it for your own `Intl` calls, so they match the components around them, or for `dir` and `lang` on content you portal yourself.\n\n```tsx\nfunction Price({ amount }: { amount: number }) {\n const { locale } = useLocale();\n return (\n <span>\n {new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: 'EUR',\n }).format(amount)}\n </span>\n );\n}\n```\n\nIt isn't the direction of the page: with no provider, or one that sets no direction, `<html dir>` still decides. To act on the direction an element is laid out in, read `getComputedStyle(element).direction`.\n\n---\n\n## Usage\n\n### A Right-to-Left Section\n\nA `locale` alone sets the direction of its script. Arabic reads right to left, so the wrapper gets `dir=\"rtl\"` and `lang=\"ar-EG\"`, and the steps lay out from the right.\n\n```tsx live\n<LocaleProvider locale=\"ar-EG\">\n <Steps\n value={1}\n items={[{ label: 'السلة' }, { label: 'الشحن' }, { label: 'الدفع' }]}\n />\n</LocaleProvider>\n```\n\nThe wrapper is a plain `<div>` with no class of its own. It takes the helper props and any other attributes, and forwards its `ref`.\n\n### Direction Only\n\n`dir` sets the direction and leaves the language alone. It also wins over a `locale`'s own direction.\n\n```tsx live\n<LocaleProvider dir=\"rtl\">\n <Buttons>\n <Button color=\"primary\">First</Button>\n <Button>Second</Button>\n </Buttons>\n</LocaleProvider>\n```\n\n### Nested Providers\n\nAn inner provider keeps whatever it leaves unset. One that sets only a `locale` takes that locale's direction, so a French quote inside a Hebrew section reads left to right, and one that sets only a `dir` keeps the outer locale.\n\n```tsx live\n<LocaleProvider locale=\"he\">\n <Content>\n <p>הציטוט האהוב עליי:</p>\n <LocaleProvider locale=\"fr\">\n <blockquote>La simplicité est la sophistication suprême.</blockquote>\n </LocaleProvider>\n </Content>\n</LocaleProvider>\n```\n\n### Date Pickers\n\nThe date and time pickers take the provider's `locale` unless they have their own, for their day and month names and any `Intl` format. Inside a provider, the week starts on the first day of the locale the picker uses: Monday for `\"de\"`, Saturday for `\"ar-EG\"`, Sunday for `\"en-US\"`. A picker's own `firstDayOfWeek` still wins, and a picker with its own `dayNames` keeps Sunday unless it sets `firstDayOfWeek` too, since it shows those names exactly as given.\n\n```tsx live\n<LocaleProvider locale=\"de\">\n <DateInput inline label=\"Liefertermin\" />\n</LocaleProvider>\n```\n\nOutside a provider a picker keeps Sunday, even with a `locale` of its own, so pages that never asked for a different first day don't get one. The first day comes from a copy of [CLDR](https://cldr.unicode.org/)'s week data that the library carries, rather than from each browser's, because browsers disagree about a few regions, China among them, and a calendar rendered on the server has to come out the same in the browser. A `-u-fw-` extension in the tag, such as `\"en-US-u-fw-mon\"`, picks the day outright.\n\n### Numbers and Matching\n\nWith a `locale`, the numbers the library writes itself are written the way that locale writes them, with its digits and separators: `Pagination`'s page numbers, `Steps` markers, a `Badge` count, the `Avatars` surplus, a `RingProgress` in sections, `Rate`'s score, the `Slider` output, `Taginput`'s counter and the count of files `File` shows. Where an accessible name repeats a number on screen, as a page link's does, it's written the same way, so the name still holds the text. A label function you pass, such as `getPageLabel` or `formatOutput`, takes over as before.\n\n```tsx live\n<LocaleProvider locale=\"ar-EG\">\n <Pagination total={12} current={5} />\n</LocaleProvider>\n```\n\nTyping in `Combobox`, `Autocomplete`, `Taginput` and `Command` filters the list the way the language compares letters: case and accents are ignored where it treats them as the same letter, so \"cafe\" finds \"Café\", while in Swedish \"a\" doesn't find \"å\", a letter of its own there. Vowel marks the language leaves out of comparisons, such as Arabic harakat and Hebrew niqqud, don't count on either side, so a name typed without them finds one written with them, and the other way round.\n\n```tsx live\n<LocaleProvider locale=\"fr\">\n <Combobox\n label=\"Boisson\"\n data={['Café', 'Thé', 'Chocolat chaud']}\n placeholder=\"Tapez « the »\"\n />\n</LocaleProvider>\n```\n\nThe pickers' digits stay as they are: their typed text is a token format of ASCII digits, and a calendar in another set of digits would sit under it. Numbers inside the library's English labels that aren't on screen, such as a carousel slide's \"1 of 3\", stay as they are too, since they get translated together with their words.\n\n### Portaled Content\n\nWhat the library portals renders outside the provider's wrapper, at the end of `document.body` or in the `portalContainer` a [`ConfigProvider`](https://bestax.io/docs/api/helpers/config) sets. Inside a provider, that content keeps the provider's `dir` and `lang`. That covers a `Portal`'s children, a `Popover`, `HoverCard` or `ContextMenu` panel, a `Combobox` menu or picker popover with `appendToBody`, a `Modal` or `Dialog` with `portal`, a `Sidebar`, and toasts and notifications.\n\nA container inside the provider's own wrapper takes the content as it is, and the content follows the provider through the page. Any other, `document.body` included, gets it inside one `<div>` carrying the values, with `display: contents`, so it adds no box and changes no layout. It is still an element, though, so content that must be its container's direct child, such as a `<tr>` portaled into a `<tbody>`, belongs in a container inside the provider. Which of the two is settled when the content mounts: switching the locale while a dialog or a toast is open updates that `<div>` in place, so what's open keeps its typed text, focus and timers.\n\n```tsx live\n<LocaleProvider locale=\"fa\">\n <Popover trigger={<Button>جزئیات</Button>} appendToBody ariaLabel=\"جزئیات\">\n <Popover.Body>\n این پنل بیرون از بخش رندر میشود و همچنان راستبهچپ است.\n </Popover.Body>\n </Popover>\n</LocaleProvider>\n```\n\nA date or time picker with a `locale` of its own is read the way a nested provider is: its popover, portaled or not, and an inline calendar take its `lang`, and the direction of its locale unless it has a `dir` of its own. So a French picker in an Arabic section shows a French calendar laid out left to right.\n\nFor content you portal yourself without `Portal`, put the values from `useLocale()` on it.\n\n### Server Rendering\n\nThe wrapper's `dir` and `lang` come from its props, so the server and the browser write the same ones, and portaled content only renders after hydration.\n\nSet a `locale` when an `inline` picker renders on the server. With none, `Intl` names its days in the runtime's own language, which is the server's on the server and the reader's in the browser, and the two renders don't match when those differ. With a locale they match, as long as the server's `Intl` data and the browser's spell the names alike. They don't always: Node and Safari write the short name for Saturday differently in Arabic. Where that matters, pass the picker its own `dayNames`, and with them the `firstDayOfWeek` they start on. The calendar shows `dayNames` exactly as given, from the first column, so a picker that brings its own keeps the week on Sunday, as it did before the provider, unless `firstDayOfWeek` says otherwise.\n\n```tsx live\n<LocaleProvider locale=\"ar-EG\">\n <DateInput\n inline\n label=\"تاريخ التسليم\"\n firstDayOfWeek={6}\n dayNames={[\n 'السبت',\n 'الأحد',\n 'الاثنين',\n 'الثلاثاء',\n 'الأربعاء',\n 'الخميس',\n 'الجمعة',\n ]}\n />\n</LocaleProvider>\n```\n\nFor an app that's in one language throughout, also set `lang` and `dir` on `<html>` in your page shell. That reaches what sits outside any provider, and the provider still carries them onto portaled content.\n\nIn the Next.js App Router, `LocaleProvider` is a client component, since it holds React context, so render it from a file marked `'use client'` and use that in the root layout, which stays a Server Component:\n\n```tsx title=\"app/providers.tsx\"\n'use client';\n\nimport { LocaleProvider } from '@allxsmith/bestax-bulma';\n\nexport function Providers({ children }: { children: React.ReactNode }) {\n return <LocaleProvider locale=\"ar-EG\">{children}</LocaleProvider>;\n}\n```\n\n```tsx title=\"app/layout.tsx\"\nimport { Providers } from './providers';\n\nexport default function RootLayout({\n children,\n}: {\n children: React.ReactNode;\n}) {\n return (\n <html lang=\"ar-EG\" dir=\"rtl\">\n <body>\n <Providers>{children}</Providers>\n </body>\n </html>\n );\n}\n```\n\n### A Locale Intl Doesn't Accept\n\nA tag `Intl` refuses, such as `\"en_US\"` with an underscore, is ignored: the provider writes no `lang`, keeps an outer provider's locale, and warns once in development. A picker's own `locale` isn't checked this way, and `Intl` throws on such a tag when the picker formats with it, as it always has.\n\n---\n\n## Accessibility\n\n- `lang` tells a screen reader which voice and pronunciation to use, and a translation tool what it's reading. The provider puts it on its wrapper and on portaled content, so a dialog or a notification announced from the end of the page comes in the same language.\n- `dir` decides the reading order of the content inside, and which side text starts on. Set the one the content is written in: a left-to-right quote in a right-to-left page needs its own provider or `dir`.\n- The provider changes no focus order and adds no role. The element it wraps portaled content in has `display: contents`, so it adds no box and no landmark.\n\n---\n\n## Related Components\n\n- [`ConfigProvider`](https://bestax.io/docs/api/helpers/config): The class prefix, icon library and portal container. A nested one replaces the outer one's settings, which is why the locale lives here instead.\n- [`Portal`](https://bestax.io/docs/api/helpers/portal): Inside a `LocaleProvider`, its children keep the provider's `dir` and `lang`.\n- [`DateInput`](https://bestax.io/docs/api/form/datetime/dateinput): Takes the provider's locale and first day of the week.\n- [`Theme`](https://bestax.io/docs/api/helpers/theme): Its scoped wrapper is the same idea for CSS variables.\n\n---\n\n## Additional Resources\n\n- [Storybook: LocaleProvider Stories](https://bestax.io/storybook/?path=/story/helpers-localeprovider--default)\n- [W3C: Structural markup and right-to-left text in HTML](https://www.w3.org/International/questions/qa-html-dir)\n- [MDN: the `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)\n- [MDN: `Intl.Locale.prototype.getWeekInfo()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo)\n\n---\n\n## Props\n\n| Prop | Type | Default | Description |\n| ---------- | ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `locale` | `string` | — | A BCP 47 language tag, such as `\"de\"` or `\"ar-EG\"`: the wrapper's `lang`, the pickers' default `locale`, and, with no `dir`, the direction of its script. Unset, a nested provider keeps the outer one's. A tag `Intl` refuses is ignored. |\n| `dir` | `'ltr'` \\| `'rtl'` | — | The direction, whatever the locale. Unset, it follows this provider's `locale`, else an outer provider's direction, else the page's. |\n| `children` | `ReactNode` | — | The part of the app it covers. |\n\nThe helper props, the other attributes of a `<div>` and the `ref` land on the wrapper."
|
|
110
|
+
"doc": "# LocaleProvider\n\n## Overview\n\n`LocaleProvider` sets the language and writing direction for the part of the app inside it, on a wrapper `<div>` and on what the library portals out of it.\n\nIt takes a `locale` and a `dir`, and each works alone. A `locale` such as `\"ar-EG\"` becomes the wrapper's `lang`, and its script decides the direction, so `dir=\"rtl\"` comes with it. A `dir` sets the direction whatever the locale, for a right-to-left layout with no particular language, or a locale whose script reads one way on a page laid out the other. A nested provider keeps whatever it leaves unset.\n\nThe direction lives on the wrapper as a `dir` attribute, so CSS follows it, and so do the components that read the direction they're laid out in, as they follow `<html dir>`. A page whose `<html>` already has `dir=\"rtl\"` needs no provider for that. What the provider adds is the rest:\n\n- a section of the page in another language or direction than the page around it;\n- the content the library portals to the end of `document.body`, such as a `Popover` panel, a `Modal` with `portal`, a `Toast` or a `Portal`'s children, which leaves the section it came from and gets the provider's `dir` and `lang` back;\n- the date and time pickers inside, which take its `locale` and start the week on that locale's first day;\n- the numbers the library writes, such as page numbers, badge counts and a slider's output, and the filtering in `Combobox`, `Autocomplete`, `Taginput` and `Command`, which follow the `locale` too.\n\nWithout a provider none of this changes: a picker uses the runtime's own locale and starts the week on Sunday, numbers are written as they always have been, and filtering ignores case only.\n\n---\n\n## Import\n\n```tsx\nimport { LocaleProvider, useLocale } from '@allxsmith/bestax-bulma';\n```\n\n---\n\n## Hooks\n\n### useLocale\n\nReturns the `locale` and `dir` the nearest provider sets, both `undefined` outside one. The locale is in its canonical form, so `\"en-us\"` comes back as `\"en-US\"`. Use it for your own `Intl` calls, so they match the components around them, or for `dir` and `lang` on content you portal yourself.\n\n```tsx\nfunction Price({ amount }: { amount: number }) {\n const { locale } = useLocale();\n return (\n <span>\n {new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: 'EUR',\n }).format(amount)}\n </span>\n );\n}\n```\n\nIt isn't the direction of the page: with no provider, or one that sets no direction, `<html dir>` still decides. To act on the direction an element is laid out in, read `getComputedStyle(element).direction`.\n\n---\n\n## Usage\n\n### A Right-to-Left Section\n\nA `locale` alone sets the direction of its script. Arabic reads right to left, so the wrapper gets `dir=\"rtl\"` and `lang=\"ar-EG\"`, and the steps lay out from the right.\n\n```tsx live\n<LocaleProvider locale=\"ar-EG\">\n <Steps\n value={1}\n items={[{ label: 'السلة' }, { label: 'الشحن' }, { label: 'الدفع' }]}\n />\n</LocaleProvider>\n```\n\nThe wrapper is a plain `<div>` with no class of its own. It takes the helper props and any other attributes, and forwards its `ref`.\n\n### Direction Only\n\n`dir` sets the direction and leaves the language alone. It also wins over a `locale`'s own direction.\n\n```tsx live\n<LocaleProvider dir=\"rtl\">\n <Buttons>\n <Button color=\"primary\">First</Button>\n <Button>Second</Button>\n </Buttons>\n</LocaleProvider>\n```\n\n### Nested Providers\n\nAn inner provider keeps whatever it leaves unset. One that sets only a `locale` takes that locale's direction, so a French quote inside a Hebrew section reads left to right, and one that sets only a `dir` keeps the outer locale.\n\n```tsx live\n<LocaleProvider locale=\"he\">\n <Content>\n <p>הציטוט האהוב עליי:</p>\n <LocaleProvider locale=\"fr\">\n <blockquote>La simplicité est la sophistication suprême.</blockquote>\n </LocaleProvider>\n </Content>\n</LocaleProvider>\n```\n\n### Date Pickers\n\nThe date and time pickers take the provider's `locale` unless they have their own, for their day and month names and any `Intl` format. Inside a provider, the week starts on the first day of the locale the picker uses: Monday for `\"de\"`, Saturday for `\"ar-EG\"`, Sunday for `\"en-US\"`. A picker's own `firstDayOfWeek` still wins, and a picker with its own `dayNames` keeps Sunday unless it sets `firstDayOfWeek` too, since it shows those names exactly as given.\n\n```tsx live\n<LocaleProvider locale=\"de\">\n <DateInput inline label=\"Liefertermin\" />\n</LocaleProvider>\n```\n\nOutside a provider a picker keeps Sunday, even with a `locale` of its own, so pages that never asked for a different first day don't get one. The first day comes from a copy of [CLDR](https://cldr.unicode.org/)'s week data that the library carries, rather than from each browser's, because browsers disagree about a few regions, China among them, and a calendar rendered on the server has to come out the same in the browser. A `-u-fw-` extension in the tag, such as `\"en-US-u-fw-mon\"`, picks the day outright.\n\n### Numbers and Matching\n\nWith a `locale`, the numbers the library writes itself are written the way that locale writes them, with its digits and separators: `Pagination`'s page numbers, `Steps` markers, a `Badge` count, the `Avatars` surplus, a `RingProgress` in sections, `Rate`'s score, the `Slider` output, `Taginput`'s counter and the count of files `File` shows. Where an accessible name repeats a number on screen, as a page link's does, it's written the same way, so the name still holds the text. A label function you pass, such as `getPageLabel` or `formatOutput`, takes over as before.\n\n```tsx live\n<LocaleProvider locale=\"ar-EG\">\n <Pagination total={12} current={5} />\n</LocaleProvider>\n```\n\nTyping in `Combobox`, `Autocomplete`, `Taginput` and `Command` filters the list the way the language compares letters: case and accents are ignored where it treats them as the same letter, so \"cafe\" finds \"Café\", while in Swedish \"a\" doesn't find \"å\", a letter of its own there. Vowel marks the language leaves out of comparisons, such as Arabic harakat and Hebrew niqqud, don't count on either side, so a name typed without them finds one written with them, and the other way round.\n\n```tsx live\n<LocaleProvider locale=\"fr\">\n <Combobox\n label=\"Boisson\"\n data={['Café', 'Thé', 'Chocolat chaud']}\n placeholder=\"Tapez « the »\"\n />\n</LocaleProvider>\n```\n\nThe pickers' digits stay as they are: their typed text is a token format of ASCII digits, and a calendar in another set of digits would sit under it. Numbers inside the library's English labels that aren't on screen, such as a carousel slide's \"1 of 3\", stay as they are too, since they get translated together with their words.\n\n### Portaled Content\n\nWhat the library portals renders outside the provider's wrapper, at the end of `document.body` or in the `portalContainer` a [`ConfigProvider`](https://bestax.io/docs/api/helpers/config) sets. Inside a provider, that content keeps the provider's `dir` and `lang`. That covers a `Portal`'s children, a `Popover`, `HoverCard` or `ContextMenu` panel, a `Combobox` menu or picker popover with `appendToBody`, a `Modal` or `Dialog` with `portal`, a `Sidebar`, and toasts and notifications.\n\nA container inside the provider's own wrapper takes the content as it is, and the content follows the provider through the page. Any other, `document.body` included, gets it inside one `<div>` carrying the values, with `display: contents`, so it adds no box and changes no layout. It is still an element, though, so content that must be its container's direct child, such as a `<tr>` portaled into a `<tbody>`, belongs in a container inside the provider. Which of the two is settled when the content mounts: switching the locale while a dialog or a toast is open updates that `<div>` in place, so what's open keeps its typed text, focus and timers.\n\n```tsx live\n<LocaleProvider locale=\"fa\">\n <Popover trigger={<Button>جزئیات</Button>} appendToBody ariaLabel=\"جزئیات\">\n <Popover.Body>\n این پنل بیرون از بخش رندر میشود و همچنان راستبهچپ است.\n </Popover.Body>\n </Popover>\n</LocaleProvider>\n```\n\nA date or time picker with a `locale` of its own is read the way a nested provider is: its popover, portaled or not, and an inline calendar take its `lang`, and the direction of its locale unless it has a `dir` of its own. So a French picker in an Arabic section shows a French calendar laid out left to right.\n\nFor content you portal yourself without `Portal`, put the values from `useLocale()` on it.\n\n### Server Rendering\n\nThe wrapper's `dir` and `lang` come from its props, so the server and the browser write the same ones, and portaled content only renders after hydration.\n\nSet a `locale` when an `inline` picker renders on the server. With none, `Intl` names its days in the runtime's own language, which is the server's on the server and the reader's in the browser, and the two renders don't match when those differ. With a locale they match, as long as the server's `Intl` data and the browser's spell the names alike. They don't always: Node and Safari write the short name for Saturday differently in Arabic. Where that matters, pass the picker its own `dayNames`, and with them the `firstDayOfWeek` they start on. The calendar shows `dayNames` exactly as given, from the first column, so a picker that brings its own keeps the week on Sunday, as it did before the provider, unless `firstDayOfWeek` says otherwise.\n\n```tsx live\n<LocaleProvider locale=\"ar-EG\">\n <DateInput\n inline\n label=\"تاريخ التسليم\"\n firstDayOfWeek={6}\n dayNames={[\n 'السبت',\n 'الأحد',\n 'الاثنين',\n 'الثلاثاء',\n 'الأربعاء',\n 'الخميس',\n 'الجمعة',\n ]}\n />\n</LocaleProvider>\n```\n\nFor an app that's in one language throughout, also set `lang` and `dir` on `<html>` in your page shell. That reaches what sits outside any provider, and the provider still carries them onto portaled content.\n\nIn the Next.js App Router, render it straight from the root layout, which stays a Server Component. `LocaleProvider` holds React context, so it's a client component, and bestax-bulma marks it one, so the layout can render it without a `'use client'` wrapper of its own. The `locale` and `children` here are values a Server Component can pass. It also takes the wrapper `<div>`'s attributes, and an event handler among them can't cross from a Server Component, so set one from a client component:\n\n```tsx title=\"app/layout.tsx\"\nimport type { ReactNode } from 'react';\nimport { LocaleProvider } from '@allxsmith/bestax-bulma';\n\nexport default function RootLayout({ children }: { children: ReactNode }) {\n return (\n <html lang=\"ar-EG\" dir=\"rtl\">\n <body>\n <LocaleProvider locale=\"ar-EG\">{children}</LocaleProvider>\n </body>\n </html>\n );\n}\n```\n\n### A Locale Intl Doesn't Accept\n\nA tag `Intl` refuses, such as `\"en_US\"` with an underscore, is ignored: the provider writes no `lang`, keeps an outer provider's locale, and warns once in development. A picker's own `locale` isn't checked this way, and `Intl` throws on such a tag when the picker formats with it, as it always has.\n\n---\n\n## Accessibility\n\n- `lang` tells a screen reader which voice and pronunciation to use, and a translation tool what it's reading. The provider puts it on its wrapper and on portaled content, so a dialog or a notification announced from the end of the page comes in the same language.\n- `dir` decides the reading order of the content inside, and which side text starts on. Set the one the content is written in: a left-to-right quote in a right-to-left page needs its own provider or `dir`.\n- The provider changes no focus order and adds no role. The element it wraps portaled content in has `display: contents`, so it adds no box and no landmark.\n\n---\n\n## Related Components\n\n- [`ConfigProvider`](https://bestax.io/docs/api/helpers/config): The class prefix, icon library and portal container. A nested one replaces the outer one's settings, which is why the locale lives here instead.\n- [`Portal`](https://bestax.io/docs/api/helpers/portal): Inside a `LocaleProvider`, its children keep the provider's `dir` and `lang`.\n- [`DateInput`](https://bestax.io/docs/api/form/datetime/dateinput): Takes the provider's locale and first day of the week.\n- [`Theme`](https://bestax.io/docs/api/helpers/theme): Its scoped wrapper is the same idea for CSS variables.\n\n---\n\n## Additional Resources\n\n- [Storybook: LocaleProvider Stories](https://bestax.io/storybook/?path=/story/helpers-localeprovider--default)\n- [W3C: Structural markup and right-to-left text in HTML](https://www.w3.org/International/questions/qa-html-dir)\n- [MDN: the `lang` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang)\n- [MDN: `Intl.Locale.prototype.getWeekInfo()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getWeekInfo)\n\n---\n\n## Props\n\n| Prop | Type | Default | Description |\n| ---------- | ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `locale` | `string` | — | A BCP 47 language tag, such as `\"de\"` or `\"ar-EG\"`: the wrapper's `lang`, the pickers' default `locale`, and, with no `dir`, the direction of its script. Unset, a nested provider keeps the outer one's. A tag `Intl` refuses is ignored. |\n| `dir` | `'ltr'` \\| `'rtl'` | — | The direction, whatever the locale. Unset, it follows this provider's `locale`, else an outer provider's direction, else the page's. |\n| `children` | `ReactNode` | — | The part of the app it covers. |\n\nThe helper props, the other attributes of a `<div>` and the `ref` land on the wrapper."
|
|
115
111
|
}
|
|
@@ -37,7 +37,7 @@ instead of hand-writing markup.
|
|
|
37
37
|
- Raw `*Base` form exports (`InputBase`, `SelectBase`, `TextAreaBase`, …) are
|
|
38
38
|
escape-hatch variants of the convenience wrappers above them; see the Form docs.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
118 documented components. Generated from the API docs — every exported
|
|
41
41
|
component is guaranteed to appear (the generator fails if one lacks an API page).
|
|
42
42
|
|
|
43
43
|
## Elements
|
|
@@ -121,6 +121,7 @@ component is guaranteed to appear (the generator fails if one lacks an API page)
|
|
|
121
121
|
- [Checkbox](https://bestax.io/docs/api/form/checkbox) — The `Checkbox` component provides a Bulma-styled checkbox input.
|
|
122
122
|
- [CheckboxCard](https://bestax.io/docs/api/form/checkboxcard) — The `CheckboxCard` component is a checkbox drawn as a card, with a title and a description, that toggles wherever you click it.
|
|
123
123
|
- [Checkboxes](https://bestax.io/docs/api/form/checkboxes) — The `Checkboxes` component wraps multiple `Checkbox` components in a Bulma-styled group.
|
|
124
|
+
- [ColorInput](https://bestax.io/docs/api/form/colorinput) — The `ColorInput` component is a form field for a color: type it, or open a color picker from its launcher or its swatch.
|
|
124
125
|
- [ColorPicker](https://bestax.io/docs/api/form/colorpicker) — The `ColorPicker` component is a panel for choosing a color: a saturation and brightness square, a hue slider, and the value as text…
|
|
125
126
|
- [Combobox](https://bestax.io/docs/api/form/combobox) — The `Combobox` component is a text field with a list to pick from under it, for a searchable select, a multi-select with tags, grouped items or a server search…
|
|
126
127
|
- [Control](https://bestax.io/docs/api/form/control) — The `Control` component is a Bulma-styled wrapper for form controls (`Input`, `Select`, `TextArea`, etc.), supporting icons (left/right), loading state…
|
|
@@ -100,30 +100,30 @@ only: a `Rate` inside one keeps taking input while its value is dropped from the
|
|
|
100
100
|
All import from `@allxsmith/bestax-bulma`. Convenience components auto-wrap Field+Control;
|
|
101
101
|
`*Base` components are the raw styled elements for explicit composition.
|
|
102
102
|
|
|
103
|
-
| Component | What it is
|
|
104
|
-
| ------------------------------------------------------- |
|
|
105
|
-
| `Field`, `Field.Label`, `Field.Body` | Field container + horizontal label/body parts.
|
|
106
|
-
| `Control` | Wraps one input; left/right icons, `isLoading`, `isExpanded`, `size`.
|
|
107
|
-
| `Fieldset` | A section named by its `legend`; `disabled` switches off all of it.
|
|
108
|
-
| `Input` / `InputBase` | Text input (convenience / raw).
|
|
109
|
-
| `Select` / `SelectBase` | Dropdown select.
|
|
110
|
-
| `TextArea` / `TextAreaBase` | Multiline text.
|
|
111
|
-
| `Checkbox` / `Checkboxes` | Single checkbox / managed group (array value).
|
|
112
|
-
| `Radio` / `Radios` | Single radio / managed single-select group.
|
|
113
|
-
| `CheckboxCard` / `RadioCard` | A checkbox or radio as a card with a title and a description.
|
|
114
|
-
| `Switch` | Toggle switch (`isRounded`, `isThin`, `isOutlined`, RTL).
|
|
115
|
-
| `File` | File upload input with label/message.
|
|
116
|
-
| `Dropzone` | Drop or pick files; checks `accept`/size/count, lists them, form-ready.
|
|
117
|
-
| `Autocomplete` | Free text with suggestions it filters for you, + keyboard nav.
|
|
118
|
-
| `Combobox` | A value from a list: `data` for a select, tags or groups, or parts.
|
|
119
|
-
| `Slider` | Range slider; single/dual thumbs, steps, tooltips, vertical.
|
|
120
|
-
| `Numberinput` | Numeric input with increment/decrement, min/max, step, stepper.
|
|
121
|
-
| `PinInput` | A one-time code or PIN as a row of boxes, all in one real input.
|
|
122
|
-
| `Rate` | Star rating; `max`, `precision` (half/quarter), custom icons, `disabled`.
|
|
123
|
-
| `Taginput` | Tag/chip input; suggestions, confirm keys, closable tags.
|
|
124
|
-
| `ColorPicker`
|
|
125
|
-
| `DateInput` / `TimeInput` / `DateTimeInput` (+ `*Base`) | Date / time / datetime pickers; month or year via `granularity`.
|
|
126
|
-
| `DateRangeInput` (+ `*Base`) | Start and end date: `[Date \| null, Date \| null]`, one calendar.
|
|
103
|
+
| Component | What it is |
|
|
104
|
+
| ------------------------------------------------------- | -------------------------------------------------------------------------- |
|
|
105
|
+
| `Field`, `Field.Label`, `Field.Body` | Field container + horizontal label/body parts. |
|
|
106
|
+
| `Control` | Wraps one input; left/right icons, `isLoading`, `isExpanded`, `size`. |
|
|
107
|
+
| `Fieldset` | A section named by its `legend`; `disabled` switches off all of it. |
|
|
108
|
+
| `Input` / `InputBase` | Text input (convenience / raw). |
|
|
109
|
+
| `Select` / `SelectBase` | Dropdown select. |
|
|
110
|
+
| `TextArea` / `TextAreaBase` | Multiline text. |
|
|
111
|
+
| `Checkbox` / `Checkboxes` | Single checkbox / managed group (array value). |
|
|
112
|
+
| `Radio` / `Radios` | Single radio / managed single-select group. |
|
|
113
|
+
| `CheckboxCard` / `RadioCard` | A checkbox or radio as a card with a title and a description. |
|
|
114
|
+
| `Switch` | Toggle switch (`isRounded`, `isThin`, `isOutlined`, RTL). |
|
|
115
|
+
| `File` | File upload input with label/message. |
|
|
116
|
+
| `Dropzone` | Drop or pick files; checks `accept`/size/count, lists them, form-ready. |
|
|
117
|
+
| `Autocomplete` | Free text with suggestions it filters for you, + keyboard nav. |
|
|
118
|
+
| `Combobox` | A value from a list: `data` for a select, tags or groups, or parts. |
|
|
119
|
+
| `Slider` | Range slider; single/dual thumbs, steps, tooltips, vertical. |
|
|
120
|
+
| `Numberinput` | Numeric input with increment/decrement, min/max, step, stepper. |
|
|
121
|
+
| `PinInput` | A one-time code or PIN as a row of boxes, all in one real input. |
|
|
122
|
+
| `Rate` | Star rating; `max`, `precision` (half/quarter), custom icons, `disabled`. |
|
|
123
|
+
| `Taginput` | Tag/chip input; suggestions, confirm keys, closable tags. |
|
|
124
|
+
| `ColorInput` (+ `ColorInputBase`) / `ColorPicker` | A color as a CSS string, HSL by default: a field with a popover / a panel. |
|
|
125
|
+
| `DateInput` / `TimeInput` / `DateTimeInput` (+ `*Base`) | Date / time / datetime pickers; month or year via `granularity`. |
|
|
126
|
+
| `DateRangeInput` (+ `*Base`) | Start and end date: `[Date \| null, Date \| null]`, one calendar. |
|
|
127
127
|
|
|
128
128
|
(`NumberInput` and `TagInput` also exist as deprecated aliases of `Numberinput`/`Taginput` —
|
|
129
129
|
same components; prefer the lowercase-second-word spellings.)
|
|
@@ -233,7 +233,7 @@ const [stay, setStay] = useState<DateRangeValue>([null, null]);
|
|
|
233
233
|
/>;
|
|
234
234
|
```
|
|
235
235
|
|
|
236
|
-
## Color — `form/ColorPicker.tsx`
|
|
236
|
+
## Color — `form/ColorPicker.tsx`, `form/ColorInput.tsx`
|
|
237
237
|
|
|
238
238
|
`ColorPicker` is a panel: a saturation and brightness square, a hue slider, and the value as text
|
|
239
239
|
you can type in. `value`/`defaultValue` take any color it reads (hex, `rgb()`, `hsl()`, a CSS
|
|
@@ -248,6 +248,13 @@ a disabled `Fieldset`. Parts for a layout of your own: `ColorPicker.Area`, `.Hue
|
|
|
248
248
|
`Slider`s, and don't reach for `<Input type="color">` unless the browser's own well (hex only,
|
|
249
249
|
never empty) is enough. `ColorSwatch` (`color`, `label`) shows a color without choosing one.
|
|
250
250
|
|
|
251
|
+
`ColorInput` is the field: the value as text you can type (committed on Enter or blur, `''`
|
|
252
|
+
for none, so `required` works), a swatch, and a launcher that opens the same square, hue,
|
|
253
|
+
`alpha`, `swatches` and `eyeDropper` in the pickers' popover. It opens on the launcher, the
|
|
254
|
+
swatch or Alt+ArrowDown; `openOnFocus` and `closeOnSwatchClick` are opt-in. It takes the same
|
|
255
|
+
`value`/`onChange`/`onChangeEnd`/`format`, the Field props, `isLoading`, and `Input`'s
|
|
256
|
+
`color`/`size`/`isRounded`. `ColorInputBase` is the field without Field and Control.
|
|
257
|
+
|
|
251
258
|
## Validation-related props (no library)
|
|
252
259
|
|
|
253
260
|
There is no validation engine. The props you use to reflect externally-computed validation are:
|
|
@@ -107,7 +107,8 @@ Centered; a collection of items → Card grid. For mixed requests, pick the domi
|
|
|
107
107
|
`table.state.selected` or call `table.setFilter`; `useDataTable({ columns, data, … })` returns
|
|
108
108
|
the same table for `<DataTable table={table} />` or for markup of your own through its
|
|
109
109
|
`get…Props` getters; `manual` with `rowCount` hands sorting, filtering and paging to a server.
|
|
110
|
-
|
|
110
|
+
`table.toCSV()` writes what's shown as CSV, escaping formulas, for a download button; there's
|
|
111
|
+
no Excel export. A table with nothing to sort, search or pick stays `Table`.
|
|
111
112
|
- **An order's history, a ticket's activity, a changelog or an activity feed is `Timeline`**,
|
|
112
113
|
not a hand-built list with a border down the side: `<Timeline titleAs="h3">` with a
|
|
113
114
|
`<Timeline.Item title="Shipped" time="14 October 2026" dateTime="2026-10-14">` per event, any
|
|
@@ -88,7 +88,7 @@ is **more complete** than the docs page's Option C example, which omits several)
|
|
|
88
88
|
**Form** (`@allxsmith/bestax-bulma/scss/form/<name>`):
|
|
89
89
|
`checkbox`, `checkboxcard`, `radio`, `radiocard`, `switch`, `slider`, `numberinput`, `pininput`,
|
|
90
90
|
`rate`, `autocomplete`, `combobox`, `taginput`, `picker-popover`, `dateinput`, `timeinput`,
|
|
91
|
-
`datetimeinput`, `daterangeinput`, `file`, `fieldset`, `dropzone`, `colorpicker`
|
|
91
|
+
`datetimeinput`, `daterangeinput`, `file`, `fieldset`, `dropzone`, `colorpicker`, `colorinput`
|
|
92
92
|
|
|
93
93
|
**Elements** (`@allxsmith/bestax-bulma/scss/elements/<name>`): `colorswatch`,
|
|
94
94
|
`descriptionlist`, `kbd`, `linkbutton`, `loader`, `notification`, `progress`, `ringprogress`,
|
|
@@ -144,6 +144,8 @@ Notes:
|
|
|
144
144
|
dropper button are Bulma's, so an app using it needs `scss/elements/colorswatch`,
|
|
145
145
|
`bulma/sass/form/input-textarea` and `bulma/sass/elements/button` next to
|
|
146
146
|
`scss/form/colorpicker`, and `bulma/sass/form/tools` for the label and help text around it.
|
|
147
|
+
- `ColorInput` opens a `ColorPicker` in the pickers' popover, so it needs `colorpicker` (and what
|
|
148
|
+
that needs) and `picker-popover` next to `colorinput`.
|
|
147
149
|
- `PinInput`'s boxes are Bulma inputs, so an app using it needs `bulma/sass/form/input-textarea`
|
|
148
150
|
next to `scss/form/pininput`, and `bulma/sass/form/tools` for the label and help text around it.
|
|
149
151
|
- `Popover.Close` renders a Bulma button, so an app using it needs `bulma/sass/elements/button`
|
|
@@ -420,6 +420,17 @@ items of a `Collapses` group, which reads it with a 0.5rem fallback and declares
|
|
|
420
420
|
so set it on the group or on any ancestor, `:root` included. (`Theme`'s `bulmaVars` does not
|
|
421
421
|
list it, so set it in your CSS or through a `style` prop.)
|
|
422
422
|
|
|
423
|
+
### ColorInput
|
|
424
|
+
|
|
425
|
+
Declared on the field's container, `.colorinput`. The swatch at the field's start and
|
|
426
|
+
the launcher at its end each take `--bulma-colorinput-side-width`, in em so they grow with the
|
|
427
|
+
input's size, and they swap sides right to left. The panel is a `.color-picker` in a
|
|
428
|
+
`.picker-popover`, so the ColorPicker and picker popover variables style it.
|
|
429
|
+
|
|
430
|
+
`--bulma-colorinput-disabled-opacity`, `--bulma-colorinput-side-width`,
|
|
431
|
+
`--bulma-colorinput-swatch-size`, `--bulma-colorinput-trigger-color`,
|
|
432
|
+
`--bulma-colorinput-trigger-hover-color`
|
|
433
|
+
|
|
423
434
|
### ColorPicker
|
|
424
435
|
|
|
425
436
|
Declared on the root, `.color-picker`, and inherited by its parts, so a value set there, or on a
|
|
@@ -705,7 +716,11 @@ in `em`, so they follow the size of the boxes, and the caret is `currentColor`,
|
|
|
705
716
|
`--bulma-pin-input-caret-color`, `--bulma-pin-input-caret-height`, `--bulma-pin-input-caret-width`,
|
|
706
717
|
`--bulma-pin-input-gap`
|
|
707
718
|
|
|
708
|
-
### Picker popover (DateInput / TimeInput / DateTimeInput / DateRangeInput)
|
|
719
|
+
### Picker popover (DateInput / TimeInput / DateTimeInput / DateRangeInput / ColorInput)
|
|
720
|
+
|
|
721
|
+
ColorInput's panel takes the `--bulma-picker-popover-*` variables here. The `--bulma-picker-trigger-*`
|
|
722
|
+
ones are the date and time pickers' launcher; ColorInput's swatch and launcher take the
|
|
723
|
+
`--bulma-colorinput-*` variables in its own section, above.
|
|
709
724
|
|
|
710
725
|
`--bulma-picker-popover-animation-duration`, `--bulma-picker-popover-background`,
|
|
711
726
|
`--bulma-picker-popover-border-color`, `--bulma-picker-popover-offset`,
|
|
@@ -61,6 +61,7 @@ Shades (`colorShade` / `backgroundColorShade`): `00, 05, 10, … 95, invert, lig
|
|
|
61
61
|
| `Autocomplete` | `primary \| link \| info \| success \| warning \| danger` | `small \| medium \| large` | the 6 only |
|
|
62
62
|
| `Checkbox` | `primary \| link \| info \| success \| warning \| danger` | `small \| normal \| medium \| large` | the 6 only |
|
|
63
63
|
| `CheckboxCard` | `primary \| link \| info \| success \| warning \| danger` | — | the indicator and a checked edge; the surface is Bulma's `.card`, so `--bulma-card-*` styles it |
|
|
64
|
+
| `ColorInput` | `primary \| link \| info \| success \| warning \| danger` (the field) | `small \| medium \| large` | the field is Bulma's `.input`; the swatch and launcher are `--bulma-colorinput-*`, the panel `ColorPicker`'s |
|
|
64
65
|
| `ColorPicker` | — (no `color`: its colors are the ones it shows) | — | retheme through `--bulma-color-picker-*`; the square and the hue track are the color model, so they take no variable |
|
|
65
66
|
| `ColorSwatch` | any CSS color (`color` is the color it shows, not a Bulma color name) | `small \| medium \| large` | `var(--bulma-primary)` shows a theme color; `--bulma-color-swatch-*` |
|
|
66
67
|
| `Combobox` | none on the root (`Combobox.Input` takes `Input`'s `color`) | `small \| medium \| large` | sizes the field and the items together; the highlight is `--bulma-combobox-highlight-*`; `--bulma-combobox-*` |
|
package/data/skills.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
{
|
|
11
11
|
"id": "component-catalog",
|
|
12
12
|
"file": "references/component-catalog.md",
|
|
13
|
-
"bytes":
|
|
13
|
+
"bytes": 23626
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"id": "library-contributor",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"promptName": "form",
|
|
30
30
|
"dir": "bestax-form",
|
|
31
31
|
"references": [
|
|
32
|
-
{ "id": "api", "file": "references/api.md", "bytes":
|
|
32
|
+
{ "id": "api", "file": "references/api.md", "bytes": 27028 },
|
|
33
33
|
{ "id": "patterns", "file": "references/patterns.md", "bytes": 9835 }
|
|
34
34
|
],
|
|
35
35
|
"examples": []
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
{
|
|
163
163
|
"id": "modular-build",
|
|
164
164
|
"file": "references/modular-build.md",
|
|
165
|
-
"bytes":
|
|
165
|
+
"bytes": 13622
|
|
166
166
|
}
|
|
167
167
|
],
|
|
168
168
|
"examples": []
|
|
@@ -176,12 +176,12 @@
|
|
|
176
176
|
{
|
|
177
177
|
"id": "css-variables",
|
|
178
178
|
"file": "references/css-variables.md",
|
|
179
|
-
"bytes":
|
|
179
|
+
"bytes": 64350
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
"id": "themeable-components",
|
|
183
183
|
"file": "references/themeable-components.md",
|
|
184
|
-
"bytes":
|
|
184
|
+
"bytes": 30602
|
|
185
185
|
}
|
|
186
186
|
],
|
|
187
187
|
"examples": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bestax-mcp",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.22",
|
|
4
4
|
"mcpName": "io.github.allxsmith/bestax-mcp",
|
|
5
5
|
"description": "MCP server for @allxsmith/bestax-bulma — component props, examples, CSS variables and agent skills, served offline from a version-pinned index",
|
|
6
6
|
"type": "module",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
44
44
|
"zod": "^4.6.7",
|
|
45
|
-
"@allxsmith/bestax-bulma": "^5.
|
|
45
|
+
"@allxsmith/bestax-bulma": "^5.57.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jest/globals": "^30.0.0",
|