@fusion.dev/helix-headless 0.105.0 → 0.106.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/custom-elements.json +7324 -3890
- package/dist/accordion/item/accordion-item.d.ts +17 -16
- package/dist/accordion/root/accordion-root.d.ts +13 -17
- package/dist/announcement/root/announcement-root.d.ts +24 -31
- package/dist/app-header/root/app-header-root.d.ts +14 -14
- package/dist/area-chart/root/area-chart-root.d.ts +29 -48
- package/dist/avatar/group/avatar-group.d.ts +6 -8
- package/dist/avatar/root/avatar-root.d.ts +11 -11
- package/dist/badge/root/badge-root.d.ts +14 -15
- package/dist/bar-chart/root/bar-chart-root.d.ts +40 -44
- package/dist/blockquote/root/blockquote-root.d.ts +5 -7
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +25 -33
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +12 -11
- package/dist/button/root/button-root.d.ts +16 -17
- package/dist/button-group/root/button-group-root.d.ts +9 -10
- package/dist/callout/root/callout-root.d.ts +10 -15
- package/dist/canvas/edge/canvas-edge.d.ts +21 -21
- package/dist/canvas/node/canvas-node.d.ts +43 -45
- package/dist/canvas/root/canvas-root.d.ts +100 -99
- package/dist/card/root/card-root.d.ts +10 -12
- package/dist/carousel/root/carousel-root.d.ts +32 -33
- package/dist/chat/composer/chat-composer.d.ts +24 -26
- package/dist/chat/message/chat-message.d.ts +30 -33
- package/dist/chat/root/chat-root.d.ts +63 -80
- package/dist/checkbox/root/checkbox-root.d.ts +30 -32
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +25 -25
- package/dist/code/root/code-root.d.ts +6 -10
- package/dist/code-block/root/code-block-root.d.ts +35 -48
- package/dist/color-input/root/color-input-root.d.ts +52 -56
- package/dist/color-picker/root/color-picker-root.d.ts +49 -49
- package/dist/combobox/root/combobox-root.d.ts +52 -53
- package/dist/command/root/command-root.d.ts +35 -40
- package/dist/copy-button/root/copy-button-root.d.ts +24 -26
- package/dist/data-table/root/data-table-root.d.ts +106 -107
- package/dist/date-input/root/date-input-root.d.ts +54 -53
- package/dist/date-picker/root/date-picker-root.d.ts +25 -21
- package/dist/description-list/item/description-list-item.d.ts +7 -7
- package/dist/description-list/root/description-list-root.d.ts +10 -15
- package/dist/dialog/root/dialog-root.d.ts +22 -19
- package/dist/divider/root/divider-root.d.ts +12 -13
- package/dist/donut-chart/root/donut-chart-root.d.ts +19 -20
- package/dist/drawer/root/drawer-root.d.ts +19 -18
- package/dist/drilldown/item/drilldown-item.d.ts +28 -28
- package/dist/drilldown/root/drilldown-root.d.ts +22 -28
- package/dist/element-events.generated.js +7 -0
- package/dist/empty/root/empty-root.d.ts +16 -19
- package/dist/file-input/root/file-input-root.d.ts +32 -32
- package/dist/filter-input/chip/filter-chip.d.ts +36 -39
- package/dist/filter-input/field/filter-field.d.ts +25 -31
- package/dist/filter-input/menu/filter-menu.d.ts +50 -47
- package/dist/filter-input/operator/filter-operator.d.ts +15 -20
- package/dist/filter-input/root/filter-input-root.d.ts +80 -98
- package/dist/format-date/root/format-date-root.d.ts +19 -27
- package/dist/heatmap/root/heatmap-root.d.ts +40 -41
- package/dist/icon/root/icon-root.d.ts +21 -23
- package/dist/icon-button/root/icon-button-root.d.ts +12 -14
- package/dist/image/root/image-root.d.ts +30 -30
- package/dist/input/root/input-root.d.ts +36 -35
- package/dist/kbd/root/kbd-root.d.ts +13 -15
- package/dist/legend/root/legend-root.d.ts +18 -16
- package/dist/lightbox/item/lightbox-item.d.ts +13 -15
- package/dist/lightbox/root/lightbox-root.d.ts +40 -41
- package/dist/line-chart/root/line-chart-root.d.ts +20 -29
- package/dist/list/item/list-item.d.ts +17 -22
- package/dist/list/root/list-root.d.ts +6 -7
- package/dist/listbox/root/listbox-root.d.ts +42 -41
- package/dist/loader/root/loader-root.d.ts +16 -20
- package/dist/map/area/map-area.d.ts +6 -0
- package/dist/map/area/map-area.js +3 -0
- package/dist/map/buildings/map-buildings.d.ts +45 -0
- package/dist/map/buildings/map-buildings.js +37 -0
- package/dist/map/contours/map-contours.d.ts +61 -0
- package/dist/map/contours/map-contours.js +54 -0
- package/dist/map/index.d.ts +7 -0
- package/dist/map/index.js +5 -0
- package/dist/map/landcover/map-landcover.d.ts +47 -0
- package/dist/map/landcover/map-landcover.js +37 -0
- package/dist/map/marker/map-marker.d.ts +11 -4
- package/dist/map/marker/map-marker.js +13 -1
- package/dist/map/points/map-points.d.ts +7 -1
- package/dist/map/points/map-points.js +3 -0
- package/dist/map/raster/map-raster.d.ts +84 -0
- package/dist/map/raster/map-raster.js +96 -0
- package/dist/map/root/map-root.d.ts +169 -7
- package/dist/map/root/map-root.js +352 -4
- package/dist/map/route/map-route.d.ts +6 -0
- package/dist/map/route/map-route.js +3 -0
- package/dist/map/terrain/map-terrain.d.ts +68 -0
- package/dist/map/terrain/map-terrain.js +58 -0
- package/dist/megamenu/root/megamenu-root.d.ts +27 -25
- package/dist/menu/item/menu-item.d.ts +30 -31
- package/dist/menu/root/menu-root.d.ts +25 -29
- package/dist/meter/root/meter-root.d.ts +22 -21
- package/dist/navigation/root/navigation-root.d.ts +13 -16
- package/dist/notifications/group/notification-group.d.ts +27 -28
- package/dist/notifications/notification/notification.d.ts +35 -42
- package/dist/notifications/root/notifications-root.d.ts +22 -24
- package/dist/number-input/root/number-input-root.d.ts +46 -50
- package/dist/object-inspector/root/object-inspector-root.d.ts +46 -58
- package/dist/option/group/option-group.d.ts +11 -11
- package/dist/option/root/option-root.d.ts +28 -33
- package/dist/outline/root/outline-root.d.ts +18 -17
- package/dist/pagination/root/pagination-root.d.ts +37 -39
- package/dist/pagination/size/pagination-size.d.ts +37 -43
- package/dist/pagination/summary/pagination-summary.d.ts +12 -14
- package/dist/pin-input/root/pin-input-root.d.ts +32 -38
- package/dist/popover/root/popover-root.d.ts +16 -21
- package/dist/progress/root/progress-root.d.ts +16 -14
- package/dist/qr-code/root/qr-code-root.d.ts +22 -25
- package/dist/quote/root/quote-root.d.ts +5 -6
- package/dist/radio/group/radio-group.d.ts +26 -28
- package/dist/radio/root/radio-root.d.ts +24 -28
- package/dist/rating/root/rating-root.d.ts +27 -30
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +43 -55
- package/dist/scroll-area/root/scroll-area-root.d.ts +15 -21
- package/dist/select/root/select-root.d.ts +41 -44
- package/dist/skeleton/root/skeleton-root.d.ts +7 -8
- package/dist/skip-link/root/skip-link-root.d.ts +21 -28
- package/dist/slider/root/slider-root.d.ts +36 -39
- package/dist/sparkline/root/sparkline-root.d.ts +22 -28
- package/dist/speed-dial/item/speed-dial-item.d.ts +21 -21
- package/dist/speed-dial/root/speed-dial-root.d.ts +25 -27
- package/dist/splitter/root/splitter-root.d.ts +37 -41
- package/dist/stat/group/stat-group.d.ts +4 -4
- package/dist/stat/root/stat-root.d.ts +8 -9
- package/dist/steps/root/steps-root.d.ts +11 -14
- package/dist/steps/step/step.d.ts +22 -29
- package/dist/switch/root/switch-root.d.ts +20 -24
- package/dist/table/cell/table-cell.d.ts +18 -8
- package/dist/table/cell/table-cell.js +5 -1
- package/dist/table/column/table-column.d.ts +62 -55
- package/dist/table/root/table-root.d.ts +16 -17
- package/dist/table/row/table-row.d.ts +3 -3
- package/dist/tabs/panel/tab-panel.d.ts +3 -3
- package/dist/tabs/root/tabs-root.d.ts +19 -17
- package/dist/tabs/tab/tab.d.ts +6 -6
- package/dist/tag/root/tag-root.d.ts +11 -12
- package/dist/textarea/root/textarea-root.d.ts +29 -32
- package/dist/time-input/root/time-input-root.d.ts +70 -69
- package/dist/time-picker/root/time-picker-root.d.ts +58 -66
- package/dist/timeline/item/timeline-item.d.ts +18 -24
- package/dist/timeline/root/timeline-root.d.ts +13 -21
- package/dist/toast/item/toast-item.d.ts +21 -22
- package/dist/toast/root/toast-root.d.ts +18 -23
- package/dist/toggle/group/toggle-group.d.ts +23 -25
- package/dist/toggle/root/toggle-root.d.ts +8 -8
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/tooltip/root/tooltip-root.d.ts +41 -47
- package/dist/tour/root/tour-root.d.ts +24 -26
- package/dist/tour/stop/tour-stop.d.ts +39 -48
- package/dist/tree/item/tree-item.d.ts +23 -25
- package/dist/tree/root/tree-root.d.ts +13 -12
- package/dist/trend/root/trend-root.d.ts +18 -19
- package/dist/video/root/video-root.d.ts +108 -101
- package/dist/video-playlist/item/video-playlist-item.d.ts +23 -28
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +17 -21
- package/dist/video-playlist/root/video-playlist-root.d.ts +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +27 -26
- package/package.json +5 -5
- package/types/jsx.d.ts +10363 -9520
- package/types/svelte.d.ts +5 -0
- package/types/vue.d.ts +1440 -1032
|
@@ -5,23 +5,21 @@ import '../../button-group/index.js';
|
|
|
5
5
|
import '../../slider/index.js';
|
|
6
6
|
declare const HelixHeadlessColorPicker_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & typeof HelixFormElement;
|
|
7
7
|
/**
|
|
8
|
-
* @summary
|
|
8
|
+
* @summary A color picker made of a square and two ramps.
|
|
9
9
|
*
|
|
10
10
|
* @description
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* flat on the page with nothing to open.
|
|
11
|
+
* The picker on its own, with no field around it, for a settings pane or a
|
|
12
|
+
* toolbar. Color Input shows this element in a panel behind a text field.
|
|
14
13
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
14
|
+
* The saturation and brightness square is two `<input type="range">` elements,
|
|
15
|
+
* laid over the square and made invisible, and the handle is drawn from their
|
|
16
|
+
* values. The keyboard behavior, the announcements, and the touch targets come
|
|
17
|
+
* from the platform, and there is no `role="application"`.
|
|
19
18
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* model once.
|
|
19
|
+
* The picker works in HSB and derives the value from it. A value set from
|
|
20
|
+
* outside is read into the model once. Black is `brightness: 0`, which has no
|
|
21
|
+
* hue or saturation, so a model read back from the value would turn red into
|
|
22
|
+
* gray after you drag to the bottom of the square and back.
|
|
25
23
|
*
|
|
26
24
|
* @since 0.1.0
|
|
27
25
|
* @status stable
|
|
@@ -29,49 +27,48 @@ declare const HelixHeadlessColorPicker_base: (new (...args: any[]) => import("@f
|
|
|
29
27
|
* @aliases Color, ColorArea, Swatch picker
|
|
30
28
|
* @documentation https://fusion.dev/helix/components/color-picker
|
|
31
29
|
*
|
|
32
|
-
* @slot eyedropper-icon - The
|
|
30
|
+
* @slot eyedropper-icon - The icon on the eyedropper button, usually a dropper.
|
|
33
31
|
*
|
|
34
|
-
* @event {Event} change -
|
|
35
|
-
* @event {HelixBeforeChangeEvent} helix-before-change - Fired before the color changes. Cancelable:
|
|
32
|
+
* @event {Event} change - Fired after the value changes.
|
|
33
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - Fired before the color changes. Cancelable: call `preventDefault()` to keep the current color.
|
|
36
34
|
* @event {HelixCopyEvent} helix-copy - Fired when the color is put on the clipboard.
|
|
37
|
-
* @event {HelixSampleEndEvent} helix-sample-end -
|
|
38
|
-
* @event {HelixSampleStartEvent} helix-sample-start -
|
|
39
|
-
* @event {Event} input -
|
|
35
|
+
* @event {HelixSampleEndEvent} helix-sample-end - Fired when the eyedropper closes, whether or not a color was taken.
|
|
36
|
+
* @event {HelixSampleStartEvent} helix-sample-start - Fired as the eyedropper opens. Hide anything that covers the page.
|
|
37
|
+
* @event {Event} input - Fired after the value changes.
|
|
40
38
|
*
|
|
41
39
|
* @csspart actions - The group holding the eyedropper and the syntax toggle.
|
|
42
40
|
* @csspart channel - One ramp.
|
|
43
41
|
* @csspart channel-control - The range input.
|
|
44
|
-
* @csspart channel-feedback -
|
|
45
|
-
* @csspart channel-field - The row
|
|
46
|
-
* @csspart channel-hint -
|
|
47
|
-
* @csspart channel-label - The
|
|
48
|
-
* @csspart channel-marker - One mark.
|
|
42
|
+
* @csspart channel-feedback - The error message for a ramp.
|
|
43
|
+
* @csspart channel-field - The row that holds a ramp's control and its readout.
|
|
44
|
+
* @csspart channel-hint - The help text under the track, shown while there is no error.
|
|
45
|
+
* @csspart channel-label - The label above the track.
|
|
46
|
+
* @csspart channel-marker - One mark on the track.
|
|
49
47
|
* @csspart channel-marker-label - The value a mark stands at, when `marker-labels` is set.
|
|
50
48
|
* @csspart channel-markers - The row of marks along the track.
|
|
51
|
-
* @csspart channel-output - The current value, shown beside
|
|
52
|
-
* @csspart channels - The ramps beside
|
|
49
|
+
* @csspart channel-output - The current value, shown beside the track.
|
|
50
|
+
* @csspart channels - The ramps beside the sample.
|
|
53
51
|
* @csspart controls - The row under the square.
|
|
54
52
|
* @csspart eyedropper - The control that samples a color from the screen.
|
|
55
|
-
* @csspart eyedropper-button - The
|
|
53
|
+
* @csspart eyedropper-button - The button inside `eyedropper`.
|
|
56
54
|
* @csspart footer - The row holding the value and the tools.
|
|
57
55
|
* @csspart format - The control that changes the syntax the value is written in.
|
|
58
|
-
* @csspart format-button - The
|
|
59
|
-
* @csspart grid - The saturation and brightness square.
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* @csspart grid-brightness - The range input for its vertical axis.
|
|
56
|
+
* @csspart format-button - The button inside `format`.
|
|
57
|
+
* @csspart grid - The saturation and brightness square. Draw the mark that shows
|
|
58
|
+
* where the color sits with `::part(grid)::after` in your stylesheet. The
|
|
59
|
+
* square carries the two channels as `--color-picker-saturation` and
|
|
60
|
+
* `--color-picker-brightness`, and this tier ships no CSS.
|
|
61
|
+
* @csspart grid-brightness - The range input for the square's vertical axis.
|
|
65
62
|
* @csspart grid-saturation - The range input for the square's horizontal axis.
|
|
66
|
-
* @csspart sample -
|
|
63
|
+
* @csspart sample - A chip of the current color. Pressing it copies the value.
|
|
67
64
|
* @csspart swatch - One preset.
|
|
68
65
|
* @csspart swatches - The row of presets.
|
|
69
|
-
* @csspart value - The
|
|
66
|
+
* @csspart value - The text field that holds the color. It accepts a typed or pasted color.
|
|
70
67
|
*
|
|
71
68
|
* @cssproperty --color-picker-brightness - The chosen brightness, 0 to 100, as a percentage.
|
|
72
69
|
* @cssproperty --color-picker-hue - The chosen hue, 0 to 360, unitless.
|
|
73
70
|
* @cssproperty --color-picker-saturation - The chosen saturation, 0 to 100, as a percentage.
|
|
74
|
-
* @cssproperty --color-picker-swatch -
|
|
71
|
+
* @cssproperty --color-picker-swatch - The color a chip shows: the current color on the sample, and the preset's color on each preset.
|
|
75
72
|
*/
|
|
76
73
|
export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_base {
|
|
77
74
|
/**
|
|
@@ -98,11 +95,12 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
98
95
|
*/
|
|
99
96
|
brightnessLabel: string;
|
|
100
97
|
/**
|
|
101
|
-
*
|
|
98
|
+
* The text the sample shows for a moment after it copies the value.
|
|
102
99
|
*/
|
|
103
100
|
copiedLabel: string;
|
|
104
101
|
/**
|
|
105
|
-
*
|
|
102
|
+
* The name of the sample, which copies the value. `{value}` is replaced with
|
|
103
|
+
* the color.
|
|
106
104
|
*/
|
|
107
105
|
copyLabel: string;
|
|
108
106
|
/**
|
|
@@ -110,7 +108,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
110
108
|
*/
|
|
111
109
|
eyedropperLabel: string;
|
|
112
110
|
/**
|
|
113
|
-
* The syntax the value is written in: `hex`, `rgb
|
|
111
|
+
* The syntax the value is written in: `hex`, `rgb`, or `hsl`.
|
|
114
112
|
*
|
|
115
113
|
* Only what is written. Everything is read whatever this says, so a picker on
|
|
116
114
|
* `hex` still takes an `rgb()` handed to it and stores the hex for it.
|
|
@@ -135,15 +133,17 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
135
133
|
*/
|
|
136
134
|
invalid: boolean;
|
|
137
135
|
/**
|
|
138
|
-
*
|
|
136
|
+
* Hides the eyedropper. Without it, the eyedropper appears in browsers that
|
|
137
|
+
* support one.
|
|
139
138
|
*/
|
|
140
139
|
noEyedropper: boolean;
|
|
141
140
|
/**
|
|
142
|
-
*
|
|
141
|
+
* Hides the syntax toggle, so the format cannot be changed.
|
|
143
142
|
*/
|
|
144
143
|
noFormat: boolean;
|
|
145
144
|
/**
|
|
146
|
-
*
|
|
145
|
+
* Hides the text field that holds the value. Use it when the value is shown
|
|
146
|
+
* elsewhere.
|
|
147
147
|
*
|
|
148
148
|
* The row reads the color as text and lets it be typed or pasted, which is
|
|
149
149
|
* what makes this element complete standing on a page: a square and two ramps
|
|
@@ -166,7 +166,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
166
166
|
*/
|
|
167
167
|
presetsLabel: string;
|
|
168
168
|
/**
|
|
169
|
-
*
|
|
169
|
+
* Makes the color read-only. The value is still submitted with the form.
|
|
170
170
|
*
|
|
171
171
|
* **Enforced by refusing every request in one place**, which is the seam this
|
|
172
172
|
* component already has: `requestValue` is what every path here comes through,
|
|
@@ -193,7 +193,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
193
193
|
*/
|
|
194
194
|
readOnly: boolean;
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
196
|
+
* Requires a color before the form can submit.
|
|
197
197
|
*
|
|
198
198
|
* **A color is exactly as requirable as a date**, which is the comparison
|
|
199
199
|
* that settles it: this element extends `HelixFormElement`, carries `name`
|
|
@@ -234,7 +234,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
234
234
|
*/
|
|
235
235
|
valueLabel: string;
|
|
236
236
|
/**
|
|
237
|
-
*
|
|
237
|
+
* The message shown when a color is required and none is chosen.
|
|
238
238
|
*
|
|
239
239
|
* **Every sentence a control raises in the browser's bubble is a property**,
|
|
240
240
|
* named for the validity flag it reports, so a form in another language
|
|
@@ -266,7 +266,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
266
266
|
* which reads back as hue 0 and saturation 0, and the next drag starts gray.
|
|
267
267
|
*/
|
|
268
268
|
private owned;
|
|
269
|
-
/**
|
|
269
|
+
/** The current color: the last one moved to, the value, or the start color. */
|
|
270
270
|
get color(): Color;
|
|
271
271
|
/**
|
|
272
272
|
* Whether the tools row holds anything at all.
|
|
@@ -298,7 +298,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
298
298
|
private settled;
|
|
299
299
|
/** Takes what was typed, and lets the square follow only a whole color. */
|
|
300
300
|
private readonly handleValueInput;
|
|
301
|
-
/**
|
|
301
|
+
/** Blocks every change while `readOnly` is set. */
|
|
302
302
|
requestValue(next: string): boolean;
|
|
303
303
|
/** Moves part of the model and announces the value that follows from it. */
|
|
304
304
|
private readonly move;
|
|
@@ -373,7 +373,7 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
373
373
|
*/
|
|
374
374
|
private reportRequired;
|
|
375
375
|
protected updated(changed: import('lit').PropertyValues): void;
|
|
376
|
-
/**
|
|
376
|
+
/** Moves focus to the square. */
|
|
377
377
|
focus(options?: FocusOptions): void;
|
|
378
378
|
/**
|
|
379
379
|
* One of the ramps under the square.
|
|
@@ -4,34 +4,29 @@ import '../../listbox/index.js';
|
|
|
4
4
|
import '../../tag/index.js';
|
|
5
5
|
declare const HelixHeadlessCombobox_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinTokensInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
6
6
|
/**
|
|
7
|
-
* @summary A field that filters a list
|
|
7
|
+
* @summary A text field that filters a list of options as you type.
|
|
8
8
|
*
|
|
9
9
|
* @description
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* the traffic between them.
|
|
10
|
+
* The list is a `Listbox`, which handles filtering, the empty state, the
|
|
11
|
+
* highlight, `aria-activedescendant`, and scrolling an option into view. This
|
|
12
|
+
* element handles the field, the panel, and the communication between them.
|
|
14
13
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* then
|
|
18
|
-
*
|
|
19
|
-
* from the last visit's leftovers.
|
|
14
|
+
* The typed text and the value are separate. The text is a filter: it narrows
|
|
15
|
+
* the list and is then discarded. The value is the option you choose, and the
|
|
16
|
+
* field then shows that option's text. The filter clears on close, so a
|
|
17
|
+
* reopened combobox starts from the whole list.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* `navigate`. `role="combobox"` is on the input rather than on a wrapper,
|
|
24
|
-
* because the thing the pattern describes is the text field.
|
|
19
|
+
* Focus stays in the text field. The arrow keys move through the list with the
|
|
20
|
+
* listbox's public `navigate` method. `role="combobox"` is on the input itself.
|
|
25
21
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* starts from the whole list.
|
|
22
|
+
* With `multiple`, each chosen option is a tag in the field with its own remove
|
|
23
|
+
* control. The panel stays open and the filter clears after each choice, so the
|
|
24
|
+
* next choice starts from the whole list.
|
|
30
25
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
26
|
+
* With `creatable`, the combobox offers a create row and fires `helix-create`.
|
|
27
|
+
* It does not add the option. The options are your light DOM, and your
|
|
28
|
+
* framework would re-render over an element the combobox inserted, so add the
|
|
29
|
+
* option in your event handler.
|
|
35
30
|
*
|
|
36
31
|
* @since 0.1.0
|
|
37
32
|
* @status stable
|
|
@@ -40,38 +35,38 @@ declare const HelixHeadlessCombobox_base: (new (...args: any[]) => import("@fusi
|
|
|
40
35
|
* @documentation https://fusion.dev/helix/components/combobox
|
|
41
36
|
*
|
|
42
37
|
* @slot - The options.
|
|
43
|
-
* @slot end - After
|
|
44
|
-
* @slot indicator - Replaces the caret
|
|
38
|
+
* @slot end - After the text, for a unit or a clear button.
|
|
39
|
+
* @slot indicator - Replaces the caret that shows the field opens a list.
|
|
45
40
|
* @slot start - Before the text, for an icon.
|
|
46
41
|
*
|
|
47
|
-
* @event {Event} change -
|
|
48
|
-
* @event {HelixBeforeChangeEvent} helix-before-change - Fired before the chosen option changes. Cancelable:
|
|
49
|
-
* @event {HelixBeforeCloseEvent} helix-before-close - Fired before
|
|
50
|
-
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before the panel opens. Cancelable:
|
|
51
|
-
* @event {HelixCreateEvent} helix-create - Fired when the
|
|
52
|
-
* @event {HelixFilterEvent} helix-filter - Fired as the
|
|
53
|
-
* @event {Event} input -
|
|
54
|
-
* @event {Event} toggle -
|
|
42
|
+
* @event {Event} change - Fired after the value changes.
|
|
43
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - Fired before the chosen option changes. Cancelable: cancel it to keep the current option.
|
|
44
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - Fired before the panel closes. Cancelable: cancel it to keep the panel open.
|
|
45
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - Fired before the panel opens. Cancelable: cancel it to keep the panel closed.
|
|
46
|
+
* @event {HelixCreateEvent} helix-create - Fired when the user adds a value that is not in the list. Cancelable.
|
|
47
|
+
* @event {HelixFilterEvent} helix-filter - Fired as the user types, with the text the list is filtered by. Cancelable: cancel it to leave the list unfiltered and do the filtering yourself.
|
|
48
|
+
* @event {Event} input - Fired after the value changes.
|
|
49
|
+
* @event {Event} toggle - Fired when the panel opens or closes, with `newState` and `oldState`.
|
|
55
50
|
*
|
|
56
51
|
* @csspart control - The text field itself.
|
|
57
52
|
* @csspart create - The row offering to add what was typed.
|
|
58
|
-
* @csspart feedback -
|
|
53
|
+
* @csspart feedback - The message that explains what is wrong with the value.
|
|
59
54
|
* @csspart field - The box around the text and its marks.
|
|
60
|
-
* @csspart hint - Help under the field, while
|
|
55
|
+
* @csspart hint - Help text under the field, shown while there is no error.
|
|
61
56
|
* @csspart indicator - The caret.
|
|
62
|
-
* @csspart label - The
|
|
63
|
-
* @csspart listbox - The list inside
|
|
57
|
+
* @csspart label - The label above the field.
|
|
58
|
+
* @csspart listbox - The list inside the panel.
|
|
64
59
|
* @csspart listbox-empty - Shown when a filter has hidden everything.
|
|
65
|
-
* @csspart listbox-feedback -
|
|
66
|
-
* @csspart listbox-filter-icon - The
|
|
60
|
+
* @csspart listbox-feedback - The inner list's error message.
|
|
61
|
+
* @csspart listbox-filter-icon - The icon beside the list's filter field.
|
|
67
62
|
* @csspart listbox-filter-mark - The glyph beside the filter field, where none is slotted.
|
|
68
63
|
* @csspart listbox-hint - Help under the list.
|
|
69
|
-
* @csspart listbox-items - The
|
|
70
|
-
* @csspart listbox-label - The
|
|
71
|
-
* @csspart listbox-live - The inner list's `live
|
|
72
|
-
* @csspart listbox-loading - Shown while the options are
|
|
64
|
+
* @csspart listbox-items - The element that holds the options.
|
|
65
|
+
* @csspart listbox-label - The label above the list.
|
|
66
|
+
* @csspart listbox-live - The inner list's `live` part, the region screen readers announce its empty and loading messages from.
|
|
67
|
+
* @csspart listbox-loading - Shown while the options are loading.
|
|
73
68
|
* @csspart listbox-search - The region holding the field that narrows the list.
|
|
74
|
-
* @csspart listbox-search-field - The field
|
|
69
|
+
* @csspart listbox-search-field - The filter field inside that region.
|
|
75
70
|
* @csspart rest - The count of choices held beyond `max-tags`. A `<button>` with `expandable`, a `<span>` without it.
|
|
76
71
|
* @csspart surface - The floating panel.
|
|
77
72
|
* @csspart tag - One chosen option.
|
|
@@ -80,7 +75,7 @@ declare const HelixHeadlessCombobox_base: (new (...args: any[]) => import("@fusi
|
|
|
80
75
|
* @csspart tag-start - The category before the label.
|
|
81
76
|
* @csspart tags - The row of chosen options, when `multiple` is set.
|
|
82
77
|
*
|
|
83
|
-
* @cssstate invalid -
|
|
78
|
+
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
84
79
|
* @cssstate open - While the list is open.
|
|
85
80
|
*/
|
|
86
81
|
export declare class HelixHeadlessCombobox extends HelixHeadlessCombobox_base {
|
|
@@ -95,7 +90,7 @@ export declare class HelixHeadlessCombobox extends HelixHeadlessCombobox_base {
|
|
|
95
90
|
*/
|
|
96
91
|
autocomplete: string;
|
|
97
92
|
/**
|
|
98
|
-
* Whether the
|
|
93
|
+
* Whether the user can add a value that is not in the list.
|
|
99
94
|
*
|
|
100
95
|
* The row appears while what is typed matches no option's words exactly, so
|
|
101
96
|
* it is offered next to near misses too: a reader typing "Ruby on Rails" with
|
|
@@ -104,26 +99,26 @@ export declare class HelixHeadlessCombobox extends HelixHeadlessCombobox_base {
|
|
|
104
99
|
*/
|
|
105
100
|
creatable: boolean;
|
|
106
101
|
/**
|
|
107
|
-
*
|
|
102
|
+
* The text of the create row, shown before the typed words it adds.
|
|
108
103
|
*/
|
|
109
104
|
createLabel: string;
|
|
110
105
|
/**
|
|
111
|
-
*
|
|
106
|
+
* Text shown when the filter hides every option.
|
|
112
107
|
*/
|
|
113
108
|
emptyText: string;
|
|
114
109
|
/**
|
|
115
|
-
*
|
|
110
|
+
* The list's name, read by screen readers. The list has no visible name.
|
|
116
111
|
*/
|
|
117
112
|
listLabel: string;
|
|
118
113
|
/**
|
|
119
|
-
* Whether the options are still
|
|
114
|
+
* Whether the options are still loading.
|
|
120
115
|
*
|
|
121
116
|
* Passed straight to the list, which is where the rows are and so where the
|
|
122
117
|
* message belongs.
|
|
123
118
|
*/
|
|
124
119
|
loading: boolean;
|
|
125
120
|
/**
|
|
126
|
-
*
|
|
121
|
+
* Text the list shows while the options load.
|
|
127
122
|
*/
|
|
128
123
|
loadingText: string;
|
|
129
124
|
/**
|
|
@@ -151,14 +146,15 @@ export declare class HelixHeadlessCombobox extends HelixHeadlessCombobox_base {
|
|
|
151
146
|
*/
|
|
152
147
|
placeholder: string;
|
|
153
148
|
/**
|
|
154
|
-
*
|
|
149
|
+
* The name of the control that removes one chosen option, with `{name}`
|
|
150
|
+
* filled in.
|
|
155
151
|
*
|
|
156
152
|
* **The name goes in**, so a row of them is heard as which one each
|
|
157
153
|
* removes rather than as "Remove" said once per chosen option.
|
|
158
154
|
*/
|
|
159
155
|
removeLabel: string;
|
|
160
156
|
/**
|
|
161
|
-
* Whether the field
|
|
157
|
+
* Whether the field completes the word as the user types.
|
|
162
158
|
*
|
|
163
159
|
* `suggest` rather than `autocomplete`, which is a real HTML attribute this
|
|
164
160
|
* element already sets on the input it renders, and two things of one name
|
|
@@ -193,7 +189,10 @@ export declare class HelixHeadlessCombobox extends HelixHeadlessCombobox_base {
|
|
|
193
189
|
*/
|
|
194
190
|
get selectedIndex(): number;
|
|
195
191
|
set selectedIndex(at: number);
|
|
196
|
-
/**
|
|
192
|
+
/**
|
|
193
|
+
* The control type, `select-one` or `select-multiple`, as on a native
|
|
194
|
+
* `<select>`.
|
|
195
|
+
*/
|
|
197
196
|
get type(): string;
|
|
198
197
|
private get listbox();
|
|
199
198
|
protected readonly panel: PopoverController;
|
|
@@ -4,30 +4,25 @@ import '../../dialog/index.js';
|
|
|
4
4
|
import '../../listbox/index.js';
|
|
5
5
|
declare const HelixHeadlessCommand_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & typeof HelixElement;
|
|
6
6
|
/**
|
|
7
|
-
* @summary A list of commands
|
|
7
|
+
* @summary A command palette: a list of commands that opens from anywhere on the page and filters as you type.
|
|
8
8
|
*
|
|
9
9
|
* @description
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* opening it, and this is that something: a dialog, and a key that summons it.
|
|
10
|
+
* The list is a `Listbox`, which handles filtering, the empty state, the match
|
|
11
|
+
* highlight, `aria-activedescendant`, scrolling an option into view, and moving
|
|
12
|
+
* between options with the keyboard. The palette adds a dialog and a hotkey
|
|
13
|
+
* that opens it.
|
|
15
14
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* last command remembered is a consumer with somewhere better to keep it.
|
|
15
|
+
* The palette keeps no value. It is not a form control and submits nothing.
|
|
16
|
+
* Choosing an option dispatches `helix-select` once. To remember the last
|
|
17
|
+
* command, store it yourself.
|
|
20
18
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* a consumer writes one thing.
|
|
19
|
+
* The hotkey listener is on the document, so the hotkey works from anywhere on
|
|
20
|
+
* the page, including inside another control's text field, whether or not the
|
|
21
|
+
* palette is open. `mod` means Command on a Mac and Control elsewhere, so you
|
|
22
|
+
* write one binding.
|
|
26
23
|
*
|
|
27
|
-
* The filter is
|
|
28
|
-
*
|
|
29
|
-
* search is one whose second use starts from the first one's leftovers, and a
|
|
30
|
-
* palette is used far more often than either.
|
|
24
|
+
* The filter is cleared when the palette closes, so each opening starts from
|
|
25
|
+
* the full list. Combobox and Select do the same.
|
|
31
26
|
*
|
|
32
27
|
* @since 0.1.0
|
|
33
28
|
* @status stable
|
|
@@ -36,37 +31,37 @@ declare const HelixHeadlessCommand_base: (new (...args: any[]) => import("@fusio
|
|
|
36
31
|
* @documentation https://fusion.dev/helix/components/command
|
|
37
32
|
*
|
|
38
33
|
* @slot - The commands, and any groups of them.
|
|
39
|
-
* @slot footer -
|
|
34
|
+
* @slot footer - Content under the list, such as the keys that work in the palette.
|
|
40
35
|
*
|
|
41
|
-
* @event {HelixBeforeCloseEvent} helix-before-close -
|
|
42
|
-
* @event {HelixBeforeOpenEvent} helix-before-open -
|
|
43
|
-
* @event {HelixSelectEvent} helix-select -
|
|
44
|
-
* @event {Event} toggle -
|
|
36
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - The palette is about to close. Cancelable: cancel it to keep it open.
|
|
37
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - The palette is about to open. Cancelable: cancel it to keep it closed.
|
|
38
|
+
* @event {HelixSelectEvent} helix-select - A command was chosen. Cancelable: cancel it to keep the palette open.
|
|
39
|
+
* @event {Event} toggle - The palette opened or closed. The event carries `newState` and `oldState`.
|
|
45
40
|
*
|
|
46
|
-
* @csspart dialog - The
|
|
41
|
+
* @csspart dialog - The box of the dialog the palette opens in, forwarded from `Dialog`.
|
|
47
42
|
* @csspart footer - The row under the list.
|
|
48
|
-
* @csspart listbox - The
|
|
49
|
-
* @csspart listbox-empty -
|
|
50
|
-
* @csspart listbox-feedback -
|
|
51
|
-
* @csspart listbox-filter-icon - The
|
|
52
|
-
* @csspart listbox-filter-mark - The
|
|
53
|
-
* @csspart listbox-hint - Help under the list.
|
|
54
|
-
* @csspart listbox-items - The list
|
|
55
|
-
* @csspart listbox-label - The
|
|
56
|
-
* @csspart listbox-live - The
|
|
57
|
-
* @csspart listbox-loading -
|
|
58
|
-
* @csspart listbox-search - The region
|
|
59
|
-
* @csspart listbox-search-field - The field
|
|
43
|
+
* @csspart listbox - The listbox inside the palette.
|
|
44
|
+
* @csspart listbox-empty - The text shown when the filter matches no commands.
|
|
45
|
+
* @csspart listbox-feedback - The listbox's error message.
|
|
46
|
+
* @csspart listbox-filter-icon - The icon beside the filter field.
|
|
47
|
+
* @csspart listbox-filter-mark - The default icon beside the filter field, drawn when no icon is slotted.
|
|
48
|
+
* @csspart listbox-hint - Help text under the list.
|
|
49
|
+
* @csspart listbox-items - The list of commands.
|
|
50
|
+
* @csspart listbox-label - The label above the list.
|
|
51
|
+
* @csspart listbox-live - The listbox's `live` part, a live region that holds the empty and loading text for screen readers.
|
|
52
|
+
* @csspart listbox-loading - The text shown while the commands are loading.
|
|
53
|
+
* @csspart listbox-search - The region that holds the filter field.
|
|
54
|
+
* @csspart listbox-search-field - The filter field.
|
|
60
55
|
*
|
|
61
56
|
* @cssstate open - While the palette is open.
|
|
62
57
|
*/
|
|
63
58
|
export declare class HelixHeadlessCommand extends HelixHeadlessCommand_base {
|
|
64
59
|
/**
|
|
65
|
-
*
|
|
60
|
+
* The text shown when the filter matches no commands.
|
|
66
61
|
*/
|
|
67
62
|
emptyText: string;
|
|
68
63
|
/**
|
|
69
|
-
* The key that opens
|
|
64
|
+
* The key that opens the palette, written as `mod+k`, `shift+p`, or `k`.
|
|
70
65
|
*
|
|
71
66
|
* Empty turns it off, for a consumer who opens the palette from a button or
|
|
72
67
|
* from their own shortcut handler. There is no list of defaults to fight
|
|
@@ -78,7 +73,7 @@ export declare class HelixHeadlessCommand extends HelixHeadlessCommand_base {
|
|
|
78
73
|
*/
|
|
79
74
|
label: string;
|
|
80
75
|
/**
|
|
81
|
-
*
|
|
76
|
+
* The text shown in the filter field before anything is typed.
|
|
82
77
|
*/
|
|
83
78
|
placeholder: string;
|
|
84
79
|
/**
|
|
@@ -2,19 +2,17 @@ import { type TemplateResult } from 'lit';
|
|
|
2
2
|
import { HelixHeadlessIconButton } from '../../icon-button/root/icon-button-root.js';
|
|
3
3
|
import '../../tooltip/index.js';
|
|
4
4
|
/**
|
|
5
|
-
* @summary A button that
|
|
5
|
+
* @summary A button that copies a string to the clipboard and confirms the copy.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* failed.
|
|
8
|
+
* Copies text to the clipboard and confirms the copy. The platform gives no
|
|
9
|
+
* feedback for a clipboard write, so without a confirmation a press that copies
|
|
10
|
+
* looks the same as one that fails.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* the button exactly as it was.
|
|
12
|
+
* The confirmation and the event wait for the write to finish. The browser can
|
|
13
|
+
* refuse a clipboard write, for example on an insecure origin, in a document
|
|
14
|
+
* that is not focused, or after a gesture that does not qualify. A refused
|
|
15
|
+
* write leaves the button unchanged.
|
|
18
16
|
*
|
|
19
17
|
* @since 0.1.0
|
|
20
18
|
* @status stable
|
|
@@ -22,34 +20,34 @@ import '../../tooltip/index.js';
|
|
|
22
20
|
* @aliases Copy, Copy to clipboard
|
|
23
21
|
* @documentation https://fusion.dev/helix/components/copy-button
|
|
24
22
|
*
|
|
25
|
-
* @slot - The
|
|
26
|
-
* @slot copied -
|
|
23
|
+
* @slot - The icon shown before a copy. Defaults to a clipboard.
|
|
24
|
+
* @slot copied - The icon shown after a successful copy. Defaults to a check mark.
|
|
27
25
|
*
|
|
28
26
|
* @event {HelixCopyEvent} helix-copy - Fired after the clipboard write succeeds.
|
|
29
27
|
*
|
|
30
28
|
* @csspart button - The inner button.
|
|
31
|
-
* @csspart mark - The clipboard
|
|
32
|
-
* @csspart tooltip - The bubble, forwarded from the tooltip inside.
|
|
33
|
-
* @csspart tooltip-arrow - The
|
|
34
|
-
* @csspart tooltip-arrow-bottom - The
|
|
35
|
-
* @csspart tooltip-arrow-left - The
|
|
36
|
-
* @csspart tooltip-arrow-right - The
|
|
37
|
-
* @csspart tooltip-arrow-top - The
|
|
38
|
-
* @csspart tooltip-bottom - The bubble while it is below the button
|
|
39
|
-
* @csspart tooltip-left - The bubble while it is left of the button
|
|
40
|
-
* @csspart tooltip-right - The bubble while it is right of the button
|
|
41
|
-
* @csspart tooltip-top - The bubble while it is above the button
|
|
29
|
+
* @csspart mark - The clipboard icon, and the confirmation icon that replaces it.
|
|
30
|
+
* @csspart tooltip - The tooltip bubble, forwarded from the tooltip inside the button.
|
|
31
|
+
* @csspart tooltip-arrow - The tooltip's arrow, which points at the button.
|
|
32
|
+
* @csspart tooltip-arrow-bottom - The arrow while the bubble is below the button, on the bubble's top edge. Set together with `tooltip-arrow`.
|
|
33
|
+
* @csspart tooltip-arrow-left - The arrow while the bubble is left of the button, on the bubble's right edge. Set together with `tooltip-arrow`.
|
|
34
|
+
* @csspart tooltip-arrow-right - The arrow while the bubble is right of the button, on the bubble's left edge. Set together with `tooltip-arrow`.
|
|
35
|
+
* @csspart tooltip-arrow-top - The arrow while the bubble is above the button, on the bubble's bottom edge. Set together with `tooltip-arrow`.
|
|
36
|
+
* @csspart tooltip-bottom - The bubble while it is below the button. Set together with `tooltip`.
|
|
37
|
+
* @csspart tooltip-left - The bubble while it is left of the button. Set together with `tooltip`.
|
|
38
|
+
* @csspart tooltip-right - The bubble while it is right of the button. Set together with `tooltip`.
|
|
39
|
+
* @csspart tooltip-top - The bubble while it is above the button. Set together with `tooltip`.
|
|
42
40
|
*/
|
|
43
41
|
export declare class HelixHeadlessCopyButton extends HelixHeadlessIconButton {
|
|
44
42
|
/**
|
|
45
|
-
*
|
|
43
|
+
* The button's name and tooltip text after a copy.
|
|
46
44
|
*
|
|
47
45
|
* `attribute` written out, because Lit lowercases a property name rather than
|
|
48
46
|
* dash-casing it, and `copiedlabel` is not what anyone would type.
|
|
49
47
|
*/
|
|
50
48
|
copiedLabel: string;
|
|
51
49
|
/**
|
|
52
|
-
*
|
|
50
|
+
* The button's name and tooltip text before a copy.
|
|
53
51
|
*
|
|
54
52
|
* Defaulted rather than left empty. An icon-only control must be named, and
|
|
55
53
|
* the name of this one is not a judgment call: every copy button in the
|
|
@@ -57,7 +55,7 @@ export declare class HelixHeadlessCopyButton extends HelixHeadlessIconButton {
|
|
|
57
55
|
*/
|
|
58
56
|
label: string;
|
|
59
57
|
/**
|
|
60
|
-
*
|
|
58
|
+
* The text copied to the clipboard.
|
|
61
59
|
*
|
|
62
60
|
* **Narrows `Button.value`, which is the submit value, and the two agree.**
|
|
63
61
|
* A copy button is `type="button"` and never submits, so the inherited
|