@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
|
@@ -2,26 +2,24 @@ import { AriaForwardController, HelixFormElement } from '@fusion.dev/helix-core'
|
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
declare const HelixHeadlessCheckbox_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerCheckedInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
4
4
|
/**
|
|
5
|
-
* @summary A box that is
|
|
5
|
+
* @summary A box that is checked, unchecked, or indeterminate.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
* Renders a
|
|
9
|
-
* and the indeterminate glyph come from the platform. `delegatesFocus`
|
|
10
|
-
* focus
|
|
11
|
-
*
|
|
8
|
+
* Renders a native `<input type="checkbox">`, so the Space key, the focus ring,
|
|
9
|
+
* and the indeterminate glyph come from the platform. `delegatesFocus` sends
|
|
10
|
+
* focus to the input, and the input is in the server-rendered markup, so the
|
|
11
|
+
* control works before any script loads.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* validity and what answers a form reset.
|
|
13
|
+
* An input inside a shadow root does not submit with a form. The host is
|
|
14
|
+
* form-associated and uses `ElementInternals` for its value, its validity, and
|
|
15
|
+
* form reset.
|
|
17
16
|
*
|
|
18
|
-
* A checked box submits its `value`, and an unchecked one submits nothing
|
|
19
|
-
*
|
|
20
|
-
* the absence rather than a `false`.
|
|
17
|
+
* A checked box submits its `value`, and an unchecked one submits nothing, as a
|
|
18
|
+
* native checkbox does.
|
|
21
19
|
*
|
|
22
|
-
* `indeterminate`
|
|
23
|
-
*
|
|
24
|
-
*
|
|
20
|
+
* `indeterminate` changes only the presentation. Assistive technology reports
|
|
21
|
+
* it as neither checked nor unchecked, it never submits, and the first click
|
|
22
|
+
* resolves it.
|
|
25
23
|
*
|
|
26
24
|
* @since 0.1.0
|
|
27
25
|
* @status stable
|
|
@@ -31,34 +29,34 @@ declare const HelixHeadlessCheckbox_base: (new (...args: any[]) => import("@fusi
|
|
|
31
29
|
*
|
|
32
30
|
* @slot - The label.
|
|
33
31
|
*
|
|
34
|
-
* @event {Event} change -
|
|
35
|
-
* @event {HelixBeforeToggleEvent} helix-before-toggle -
|
|
36
|
-
* @event {Event} input -
|
|
32
|
+
* @event {Event} change - The box was checked or unchecked. Relayed from the native input.
|
|
33
|
+
* @event {HelixBeforeToggleEvent} helix-before-toggle - The box is about to be checked or unchecked. Cancelable: cancel it to keep its state.
|
|
34
|
+
* @event {Event} input - The box was checked or unchecked.
|
|
37
35
|
*
|
|
38
|
-
* @csspart box - The
|
|
39
|
-
* @csspart control - The input.
|
|
40
|
-
* @csspart feedback -
|
|
41
|
-
* @csspart field - The row the box and its label
|
|
42
|
-
* @csspart hint - Help under the control, while
|
|
43
|
-
* @csspart label - The label
|
|
44
|
-
* @csspart mark - The
|
|
45
|
-
* @csspart mark-checked -
|
|
46
|
-
* @csspart mark-indeterminate -
|
|
36
|
+
* @csspart box - The box drawn for the input, under the mark.
|
|
37
|
+
* @csspart control - The native input.
|
|
38
|
+
* @csspart feedback - The message that says what is wrong.
|
|
39
|
+
* @csspart field - The row that holds the box and its label. It is the card when `separation` is set.
|
|
40
|
+
* @csspart hint - Help text under the control, shown while there is no feedback.
|
|
41
|
+
* @csspart label - The label next to the box.
|
|
42
|
+
* @csspart mark - The check mark, or the dash when the box is indeterminate.
|
|
43
|
+
* @csspart mark-checked - Added to `mark` while the box is checked.
|
|
44
|
+
* @csspart mark-indeterminate - Added to `mark` while the box is indeterminate.
|
|
47
45
|
*
|
|
48
46
|
* @cssstate checked - While the box is checked.
|
|
49
|
-
* @cssstate has-label -
|
|
50
|
-
* @cssstate invalid -
|
|
47
|
+
* @cssstate has-label - The label slot has content, so the label is drawn.
|
|
48
|
+
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
51
49
|
*/
|
|
52
50
|
export declare class HelixHeadlessCheckbox extends HelixHeadlessCheckbox_base {
|
|
53
51
|
protected readonly aria: AriaForwardController;
|
|
54
52
|
/**
|
|
55
|
-
*
|
|
53
|
+
* Shows the box as neither checked nor unchecked.
|
|
56
54
|
*
|
|
57
55
|
* Presentation only. It never submits, and the first change resolves it.
|
|
58
56
|
*/
|
|
59
57
|
indeterminate: boolean;
|
|
60
58
|
/**
|
|
61
|
-
*
|
|
59
|
+
* The value submitted when the box is checked.
|
|
62
60
|
*/
|
|
63
61
|
value: string;
|
|
64
62
|
/** Focus is delegated to the input, so the host is never the focus target. */
|
|
@@ -66,7 +64,7 @@ export declare class HelixHeadlessCheckbox extends HelixHeadlessCheckbox_base {
|
|
|
66
64
|
private readonly handleChange;
|
|
67
65
|
/** Reports the value and the validity the host stands behind. */
|
|
68
66
|
private sync;
|
|
69
|
-
/**
|
|
67
|
+
/** Resets the box to the state set in its markup. */
|
|
70
68
|
formResetCallback(): void;
|
|
71
69
|
protected willUpdate(changed: PropertyValues): void;
|
|
72
70
|
protected updated(changed: PropertyValues): void;
|
|
@@ -3,25 +3,25 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
import { HelixHeadlessCheckbox } from '../../checkbox/root/checkbox-root.js';
|
|
4
4
|
declare const HelixHeadlessCheckboxGroup_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
5
5
|
/**
|
|
6
|
-
* @summary
|
|
6
|
+
* @summary A group of related checkboxes under one label, with one value for the set.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
|
-
* The host is the group
|
|
10
|
-
*
|
|
11
|
-
* controls
|
|
9
|
+
* The host is the group. It has `role="group"` through internals, and `label`
|
|
10
|
+
* names it. Without a name, screen readers announce the checkboxes as separate
|
|
11
|
+
* controls.
|
|
12
12
|
*
|
|
13
|
-
* **Each checkbox
|
|
14
|
-
* a native group is several inputs
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* write the whole set.
|
|
13
|
+
* **Each checkbox submits its own value.** Checkboxes are already
|
|
14
|
+
* form-associated, and a native group is several inputs that share a name, so
|
|
15
|
+
* the group adds no form value of its own. It adds the grouping, a shared
|
|
16
|
+
* `name` that you write once, and one place to read and write the whole set.
|
|
18
17
|
*
|
|
19
|
-
* `value` is the checked values,
|
|
20
|
-
* written. Setting it
|
|
18
|
+
* `value` is the checked values, separated by commas, in the order the
|
|
19
|
+
* checkboxes are written. Setting it checks exactly those values and unchecks
|
|
20
|
+
* the rest.
|
|
21
21
|
*
|
|
22
|
-
* **
|
|
23
|
-
* for validity
|
|
24
|
-
*
|
|
22
|
+
* **The group shows the message you set in `feedback`.** It is form-associated
|
|
23
|
+
* only for validity and never calls `setFormValue`, so the browser does not
|
|
24
|
+
* generate a message for it.
|
|
25
25
|
*
|
|
26
26
|
* @since 0.1.0
|
|
27
27
|
* @status stable
|
|
@@ -30,19 +30,19 @@ declare const HelixHeadlessCheckboxGroup_base: (new (...args: any[]) => import("
|
|
|
30
30
|
* @documentation https://fusion.dev/helix/components/checkbox-group
|
|
31
31
|
*
|
|
32
32
|
* @slot - The checkboxes.
|
|
33
|
-
* @slot hint -
|
|
34
|
-
* @slot label -
|
|
33
|
+
* @slot hint - Help under the checkboxes, for help that needs more than plain text.
|
|
34
|
+
* @slot label - The group's label, for a label that needs more than plain text.
|
|
35
35
|
*
|
|
36
|
-
* @event {Event} change -
|
|
37
|
-
* @event {HelixBeforeChangeEvent} helix-before-change -
|
|
38
|
-
* @event {Event} input -
|
|
36
|
+
* @event {Event} change - The set of checked boxes changed.
|
|
37
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - A box is about to change. Carries the whole set that would result. Cancelable: canceling it leaves every box as it was.
|
|
38
|
+
* @event {Event} input - The set of checked boxes changed.
|
|
39
39
|
*
|
|
40
|
-
* @csspart feedback -
|
|
41
|
-
* @csspart hint -
|
|
42
|
-
* @csspart items - The
|
|
43
|
-
* @csspart label - The group's
|
|
40
|
+
* @csspart feedback - The message that says what is wrong with the set.
|
|
41
|
+
* @csspart hint - The help under the checkboxes.
|
|
42
|
+
* @csspart items - The element that holds the checkboxes, laid out by `orientation`.
|
|
43
|
+
* @csspart label - The group's label, above the checkboxes.
|
|
44
44
|
*
|
|
45
|
-
* @cssstate invalid -
|
|
45
|
+
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
46
46
|
*/
|
|
47
47
|
export declare class HelixHeadlessCheckboxGroup extends HelixHeadlessCheckboxGroup_base {
|
|
48
48
|
/**
|
|
@@ -50,7 +50,7 @@ export declare class HelixHeadlessCheckboxGroup extends HelixHeadlessCheckboxGro
|
|
|
50
50
|
*/
|
|
51
51
|
value: string;
|
|
52
52
|
protected readonly cascade: DisabledCascadeController;
|
|
53
|
-
/** The
|
|
53
|
+
/** The checkboxes in the group, in the order they are written. Browser only. */
|
|
54
54
|
get boxes(): HelixHeadlessCheckbox[];
|
|
55
55
|
/**
|
|
56
56
|
* Pushes the group's name and value onto the boxes.
|
|
@@ -4,17 +4,13 @@ import { type TemplateResult } from 'lit';
|
|
|
4
4
|
* @summary A fragment of code inside a line of prose.
|
|
5
5
|
*
|
|
6
6
|
* @description
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* cannot tell it from emphasis. The tag is the whole point, which is also why
|
|
11
|
-
* this component is so small.
|
|
7
|
+
* Renders a real `<code>` element, which marks the text as code for translation
|
|
8
|
+
* tools and document search. A styled span carries no such meaning, and a
|
|
9
|
+
* screen reader announces nothing about it.
|
|
12
10
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* its own box, its own overflow and something to copy. Namespacing them
|
|
17
|
-
* together would say `CodeBlock` is part of `Code`, and it is not.
|
|
11
|
+
* `Code` is inline only and never scrolls. For a block of code with its own
|
|
12
|
+
* box, its own overflow, and copying, use `CodeBlock`, which is a separate
|
|
13
|
+
* family.
|
|
18
14
|
*
|
|
19
15
|
* @since 0.1.0
|
|
20
16
|
* @status stable
|
|
@@ -2,44 +2,31 @@ import { HelixElement } from '@fusion.dev/helix-core';
|
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import '../../copy-button/index.js';
|
|
4
4
|
/**
|
|
5
|
-
* @summary A block of code
|
|
5
|
+
* @summary A block of code with an optional name and a copy button.
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* back. Indentation in a `div` is a paragraph with odd spacing.
|
|
8
|
+
* Renders a `<pre><code>` pair: `pre` keeps the whitespace, and `code` marks it
|
|
9
|
+
* as code. Long lines scroll inside the block and do not wrap, because a line
|
|
10
|
+
* break can be significant in code.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
* the
|
|
15
|
-
* a lie that costs someone an afternoon. The box takes its own scrollbar.
|
|
12
|
+
* A copy button is on by default. Set `no-copy` to remove it. The button copies
|
|
13
|
+
* the slotted text, so there is no second copy of the code to keep in sync.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
* Every consumer would otherwise put one there, slightly differently, and the
|
|
19
|
-
* one that forgot would be the one with the longest snippet. It is on unless
|
|
20
|
-
* `no-copy` says otherwise, and takes its text from the slot rather than from a
|
|
21
|
-
* property, so there is no second copy of the code to keep in step.
|
|
15
|
+
* For a fragment of code inside a sentence, use `Code`.
|
|
22
16
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
17
|
+
* Set `diff` to show a change. Put a unified diff, the output of `git diff` or
|
|
18
|
+
* `diff -u`, in the same slot, and the block draws the lines it added and
|
|
19
|
+
* removed. The block never computes a diff itself. Line numbers come from the
|
|
20
|
+
* hunk headers and are hidden from the accessibility tree. Changed lines are
|
|
21
|
+
* `<ins>` and `<del>` with the `+` and `-` kept as text, so the change does not
|
|
22
|
+
* depend on color. Each file in the patch is its own block under its own name,
|
|
23
|
+
* and its copy button copies the new version of the file. `variant="split"`
|
|
24
|
+
* shows the old version beside the new, each removal opposite its replacement.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Numbers come from the hunk headers, which makes them the file's; changed lines
|
|
31
|
-
* are `<ins>` and `<del>` with the `+` and `-` kept as text, so the change is not
|
|
32
|
-
* carried by color; the numbers are hidden from the accessibility tree. Each
|
|
33
|
-
* file in the patch is a block of its own under its own name, and its copy
|
|
34
|
-
* button takes the file as it now reads. `variant="split"` sets the old version
|
|
35
|
-
* beside the new, each removal opposite its replacement.
|
|
36
|
-
*
|
|
37
|
-
* **Before the script runs, a diff is its own text.** A server has no children
|
|
38
|
-
* to read, so it renders the slot as ordinary code, which for a diff is the
|
|
39
|
-
* patch in a `<pre>`: a legible diff, and the first render the client makes
|
|
40
|
-
* too, which is what keeps hydration clean. The drawn diff replaces it once the
|
|
41
|
-
* content can be read. Diff mode is experimental while the rest of the family
|
|
42
|
-
* is stable.
|
|
26
|
+
* On the server, the slot renders as ordinary code, so a diff first appears as
|
|
27
|
+
* the patch text in a `<pre>`. The client makes the same first render, which
|
|
28
|
+
* keeps hydration clean, and draws the diff once it can read the content. Diff
|
|
29
|
+
* mode is experimental. The rest of the family is stable.
|
|
43
30
|
*
|
|
44
31
|
* @since 0.1.0
|
|
45
32
|
* @status stable
|
|
@@ -53,26 +40,26 @@ import '../../copy-button/index.js';
|
|
|
53
40
|
* @csspart block - The scrolling `<pre>`.
|
|
54
41
|
* @csspart code - The `<code>` inside it.
|
|
55
42
|
* @csspart context - In a diff, a line both versions share.
|
|
56
|
-
* @csspart copy - The copy button
|
|
43
|
+
* @csspart copy - The copy button. It sits in the header when there is one, and beside the code otherwise.
|
|
57
44
|
* @csspart copy-button - The inner button.
|
|
58
|
-
* @csspart copy-mark - The clipboard
|
|
59
|
-
* @csspart copy-tooltip - The
|
|
60
|
-
* @csspart copy-tooltip-arrow - The
|
|
61
|
-
* @csspart copy-tooltip-arrow-bottom - The
|
|
62
|
-
* @csspart copy-tooltip-arrow-left - The
|
|
63
|
-
* @csspart copy-tooltip-arrow-right - The
|
|
64
|
-
* @csspart copy-tooltip-arrow-top - The
|
|
65
|
-
* @csspart copy-tooltip-bottom - The
|
|
66
|
-
* @csspart copy-tooltip-left - The
|
|
67
|
-
* @csspart copy-tooltip-right - The
|
|
68
|
-
* @csspart copy-tooltip-top - The
|
|
45
|
+
* @csspart copy-mark - The clipboard icon, and the check mark that replaces it after a copy.
|
|
46
|
+
* @csspart copy-tooltip - The copy button's tooltip.
|
|
47
|
+
* @csspart copy-tooltip-arrow - The tooltip's arrow, which points at the copy button.
|
|
48
|
+
* @csspart copy-tooltip-arrow-bottom - The arrow while the tooltip is below the copy button, on the tooltip's top edge. Applied with `copy-tooltip-arrow`.
|
|
49
|
+
* @csspart copy-tooltip-arrow-left - The arrow while the tooltip is left of the copy button, on the tooltip's right edge. Applied with `copy-tooltip-arrow`.
|
|
50
|
+
* @csspart copy-tooltip-arrow-right - The arrow while the tooltip is right of the copy button, on the tooltip's left edge. Applied with `copy-tooltip-arrow`.
|
|
51
|
+
* @csspart copy-tooltip-arrow-top - The arrow while the tooltip is above the copy button, on the tooltip's bottom edge. Applied with `copy-tooltip-arrow`.
|
|
52
|
+
* @csspart copy-tooltip-bottom - The tooltip while it is below the copy button. Applied with `copy-tooltip`.
|
|
53
|
+
* @csspart copy-tooltip-left - The tooltip while it is left of the copy button. Applied with `copy-tooltip`.
|
|
54
|
+
* @csspart copy-tooltip-right - The tooltip while it is right of the copy button. Applied with `copy-tooltip`.
|
|
55
|
+
* @csspart copy-tooltip-top - The tooltip while it is above the copy button. Applied with `copy-tooltip`.
|
|
69
56
|
* @csspart file - In a diff, one file's header and block.
|
|
70
57
|
* @csspart filler - In a split diff, the empty row opposite a line the other side does not have.
|
|
71
58
|
* @csspart frame - The code, and the copy button beside it where there is no header.
|
|
72
|
-
* @csspart header - The bar
|
|
59
|
+
* @csspart header - The bar that holds the name and the copy button, shown when there is a name.
|
|
73
60
|
* @csspart hunk - In a diff, a `@@` line saying where the lines under it are.
|
|
74
61
|
* @csspart label - The file name or language, where one is given.
|
|
75
|
-
* @csspart marker - In a diff, the `+`,
|
|
62
|
+
* @csspart marker - In a diff, the `+`, `-`, or space that starts a line.
|
|
76
63
|
* @csspart new - In a split diff, the new version's `<pre>`.
|
|
77
64
|
* @csspart number - In a diff, a line number.
|
|
78
65
|
* @csspart old - In a split diff, the old version's `<pre>`.
|
|
@@ -89,7 +76,7 @@ export declare class HelixHeadlessCodeBlock extends HelixElement {
|
|
|
89
76
|
*/
|
|
90
77
|
diff: boolean;
|
|
91
78
|
/**
|
|
92
|
-
*
|
|
79
|
+
* The block's name, usually a file name or a language.
|
|
93
80
|
*
|
|
94
81
|
* In a diff, each file is named from the patch, and this names a patch that
|
|
95
82
|
* carries no name of its own.
|
|
@@ -118,7 +105,7 @@ export declare class HelixHeadlessCodeBlock extends HelixElement {
|
|
|
118
105
|
*/
|
|
119
106
|
noCopy: boolean;
|
|
120
107
|
/**
|
|
121
|
-
* How a diff's two versions are arranged
|
|
108
|
+
* How a diff's two versions are arranged. It has no effect without `diff`.
|
|
122
109
|
*
|
|
123
110
|
* Absent is unified, each removal above its replacement, which fits any
|
|
124
111
|
* width. `split` sets the old version beside the new one. Optional rather
|
|
@@ -3,33 +3,29 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
3
3
|
import '../../color-picker/index.js';
|
|
4
4
|
declare const HelixHeadlessColorInput_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinPickerFieldInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerOpenInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinControllerValueInterface) & (new (...args: any[]) => import("@fusion.dev/helix-core").MixinFieldInterface) & typeof HelixFormElement;
|
|
5
5
|
/**
|
|
6
|
-
* @summary A color, typed in any syntax or picked from a panel.
|
|
6
|
+
* @summary A field for a color, typed in any syntax or picked from a panel.
|
|
7
7
|
*
|
|
8
8
|
* @description
|
|
9
|
-
*
|
|
10
|
-
* square, the ramps, the eyedropper and the syntax
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* A text field with a button that opens `ColorPicker` in an overlay.
|
|
10
|
+
* `ColorPicker` provides the square, the ramps, the eyedropper, and the syntax
|
|
11
|
+
* toggle, and you can also use it on its own, flat on the page. Color Input
|
|
12
|
+
* adds the field, the overlay, and the form value, the same arrangement Date
|
|
13
|
+
* Input has with `DatePicker`.
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* `<input type="color"
|
|
17
|
-
*
|
|
18
|
-
* panel to match everything around it. What is kept from the native one is the
|
|
19
|
-
* part worth keeping: a real text field, so a reader who has the hex pastes it
|
|
20
|
-
* and never opens anything.
|
|
15
|
+
* You can type or paste a color into the field without opening the picker.
|
|
16
|
+
* Color Input is a custom control, unlike `<input type="color">`, so you can
|
|
17
|
+
* style the panel to match your interface.
|
|
21
18
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* `hsl(0 100% 50%)
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
19
|
+
* The field reads every color syntax, including `#f00`, `#ff0000`,
|
|
20
|
+
* `rgb(255 0 0)`, `rgba(255,0,0,.5)`, `rgb(255 0 0 / 50%)`, and
|
|
21
|
+
* `hsl(0 100% 50%)`. It writes colors in the syntax that `format` names. The
|
|
22
|
+
* field shows the value without reformatting it, because half-typed input does
|
|
23
|
+
* not survive a round trip through a formatter. Date Input does the same with
|
|
24
|
+
* dates.
|
|
28
25
|
*
|
|
29
|
-
* The
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* itself.
|
|
26
|
+
* The component sets `--color-input-swatch`, so do not set it yourself. It
|
|
27
|
+
* holds the resolved color, so the styled tier can paint the swatch without
|
|
28
|
+
* parsing the value.
|
|
33
29
|
*
|
|
34
30
|
* @since 0.1.0
|
|
35
31
|
* @status stable
|
|
@@ -38,58 +34,58 @@ declare const HelixHeadlessColorInput_base: (new (...args: any[]) => import("@fu
|
|
|
38
34
|
* @documentation https://fusion.dev/helix/components/color-input
|
|
39
35
|
*
|
|
40
36
|
* @slot end - Content at the trailing end, before the trigger.
|
|
41
|
-
* @slot feedback -
|
|
42
|
-
* @slot hint - Help under the field.
|
|
37
|
+
* @slot feedback - The message that says what is wrong with the value.
|
|
38
|
+
* @slot hint - Help text under the field.
|
|
43
39
|
* @slot start - Content at the leading end of the field, inside its border.
|
|
44
|
-
* @slot trigger - The
|
|
40
|
+
* @slot trigger - The icon on the trigger, which shows that the field opens a panel.
|
|
45
41
|
*
|
|
46
|
-
* @event {Event} change -
|
|
47
|
-
* @event {HelixBeforeChangeEvent} helix-before-change -
|
|
48
|
-
* @event {HelixBeforeCloseEvent} helix-before-close -
|
|
49
|
-
* @event {HelixBeforeOpenEvent} helix-before-open -
|
|
50
|
-
* @event {Event} input -
|
|
51
|
-
* @event {Event} toggle -
|
|
42
|
+
* @event {Event} change - Sent when the user finishes changing the value.
|
|
43
|
+
* @event {HelixBeforeChangeEvent} helix-before-change - The color is about to change. Cancelable: cancel it to keep the current color.
|
|
44
|
+
* @event {HelixBeforeCloseEvent} helix-before-close - The panel is about to close. Cancelable: cancel it to keep it open.
|
|
45
|
+
* @event {HelixBeforeOpenEvent} helix-before-open - The panel is about to open. Cancelable: cancel it to keep it closed.
|
|
46
|
+
* @event {Event} input - Fired as the value changes.
|
|
47
|
+
* @event {Event} toggle - The panel opened or closed. The event carries `newState` and `oldState`.
|
|
52
48
|
*
|
|
53
|
-
* @csspart control - The text input
|
|
54
|
-
* @csspart feedback -
|
|
49
|
+
* @csspart control - The text input that holds the value. Absent in the `swatch` variant.
|
|
50
|
+
* @csspart feedback - The message that says what is wrong with the value.
|
|
55
51
|
* @csspart field - The box holding the text and the trigger.
|
|
56
|
-
* @csspart hint - Help under the field, while
|
|
57
|
-
* @csspart label - The
|
|
58
|
-
* @csspart picker - The color picker inside
|
|
52
|
+
* @csspart hint - Help text under the field, shown while there is no feedback.
|
|
53
|
+
* @csspart label - The label above the field.
|
|
54
|
+
* @csspart picker - The color picker inside the panel.
|
|
59
55
|
* @csspart picker-actions - The group holding the eyedropper and the syntax toggle.
|
|
60
|
-
* @csspart picker-channel - One
|
|
61
|
-
* @csspart picker-channel-control - The range input.
|
|
62
|
-
* @csspart picker-channel-feedback -
|
|
63
|
-
* @csspart picker-channel-field - The row
|
|
64
|
-
* @csspart picker-channel-hint -
|
|
65
|
-
* @csspart picker-channel-label - The
|
|
66
|
-
* @csspart picker-channel-marker - One mark.
|
|
56
|
+
* @csspart picker-channel - One channel slider.
|
|
57
|
+
* @csspart picker-channel-control - The range input of a channel slider.
|
|
58
|
+
* @csspart picker-channel-feedback - The error message for a channel slider.
|
|
59
|
+
* @csspart picker-channel-field - The row that holds a channel slider's control and its readout.
|
|
60
|
+
* @csspart picker-channel-hint - The help text under the track, shown while there is no error.
|
|
61
|
+
* @csspart picker-channel-label - The label above the track.
|
|
62
|
+
* @csspart picker-channel-marker - One mark on the track.
|
|
67
63
|
* @csspart picker-channel-marker-label - The value a mark stands at, when `marker-labels` is set.
|
|
68
64
|
* @csspart picker-channel-markers - The row of marks along the track.
|
|
69
|
-
* @csspart picker-channel-output - The current value, shown beside
|
|
70
|
-
* @csspart picker-channels - The
|
|
65
|
+
* @csspart picker-channel-output - The current value, shown beside the track.
|
|
66
|
+
* @csspart picker-channels - The channel sliders beside the sample.
|
|
71
67
|
* @csspart picker-controls - The row under the square.
|
|
72
68
|
* @csspart picker-eyedropper - The control that samples a color from the screen.
|
|
73
|
-
* @csspart picker-eyedropper-button - The
|
|
69
|
+
* @csspart picker-eyedropper-button - The button inside `picker-eyedropper`.
|
|
74
70
|
* @csspart picker-footer - The row holding the value and the tools.
|
|
75
71
|
* @csspart picker-format - The control that changes the syntax the value is written in.
|
|
76
|
-
* @csspart picker-format-button - The
|
|
72
|
+
* @csspart picker-format-button - The button inside `picker-format`.
|
|
77
73
|
* @csspart picker-grid - The saturation and brightness square.
|
|
78
|
-
* @csspart picker-grid-brightness - The range input for
|
|
74
|
+
* @csspart picker-grid-brightness - The range input for the square's vertical axis.
|
|
79
75
|
* @csspart picker-grid-handle - The mark showing where in the square the color sits.
|
|
80
76
|
* @csspart picker-grid-saturation - The range input for the square's horizontal axis.
|
|
81
|
-
* @csspart picker-icon -
|
|
82
|
-
* @csspart picker-sample -
|
|
77
|
+
* @csspart picker-icon - An icon drawn by the picker.
|
|
78
|
+
* @csspart picker-sample - A chip of the current color. Pressing it copies the value.
|
|
83
79
|
* @csspart picker-swatch - One preset.
|
|
84
80
|
* @csspart picker-swatches - The row of presets.
|
|
85
|
-
* @csspart picker-value - The
|
|
81
|
+
* @csspart picker-value - The text field that holds the color. It accepts a typed or pasted color.
|
|
86
82
|
* @csspart preview - The chip showing the color, inside the trigger.
|
|
87
83
|
* @csspart surface - The floating panel.
|
|
88
84
|
* @csspart trigger - The control that opens the panel.
|
|
89
85
|
*
|
|
90
|
-
* @cssproperty --color-input-swatch - The chosen color,
|
|
86
|
+
* @cssproperty --color-input-swatch - The chosen color, painted over the checkerboard that shows transparency.
|
|
91
87
|
*
|
|
92
|
-
* @cssstate invalid -
|
|
88
|
+
* @cssstate invalid - The control has an error to show, from the browser's validation or from your `feedback`.
|
|
93
89
|
* @cssstate open - While the picker is open.
|
|
94
90
|
*/
|
|
95
91
|
export declare class HelixHeadlessColorInput extends HelixHeadlessColorInput_base {
|
|
@@ -108,7 +104,7 @@ export declare class HelixHeadlessColorInput extends HelixHeadlessColorInput_bas
|
|
|
108
104
|
*/
|
|
109
105
|
autocomplete: string;
|
|
110
106
|
/**
|
|
111
|
-
* The syntax the value is written in: `hex`, `rgb
|
|
107
|
+
* The syntax the value is written in: `hex`, `rgb`, or `hsl`.
|
|
112
108
|
*
|
|
113
109
|
* **Undefaulted, because it reflects.** The two together stamp an attribute
|
|
114
110
|
* onto every host anybody renders, including the ones nobody configured: the
|
|
@@ -120,11 +116,11 @@ export declare class HelixHeadlessColorInput extends HelixHeadlessColorInput_bas
|
|
|
120
116
|
*/
|
|
121
117
|
format?: ColorFormat;
|
|
122
118
|
/**
|
|
123
|
-
*
|
|
119
|
+
* Hides the button in the panel that changes the format.
|
|
124
120
|
*/
|
|
125
121
|
noFormat: boolean;
|
|
126
122
|
/**
|
|
127
|
-
*
|
|
123
|
+
* The text the field shows before a color is entered.
|
|
128
124
|
*/
|
|
129
125
|
placeholder: string;
|
|
130
126
|
/**
|