@fusion.dev/helix-headless 0.0.0-dev → 0.0.2
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 +4513 -4483
- package/dist/accordion/item/accordion-item.d.ts +13 -15
- package/dist/accordion/item/accordion-item.js +15 -17
- package/dist/announcement/root/announcement-root.d.ts +7 -25
- package/dist/announcement/root/announcement-root.js +7 -20
- package/dist/app-header/root/app-header-root.d.ts +10 -17
- package/dist/app-header/root/app-header-root.js +9 -18
- package/dist/avatar/group/avatar-group.d.ts +10 -19
- package/dist/avatar/group/avatar-group.js +12 -17
- package/dist/avatar/root/avatar-root.d.ts +8 -8
- package/dist/avatar/root/avatar-root.js +19 -20
- package/dist/badge/root/badge-root.d.ts +6 -6
- package/dist/badge/root/badge-root.js +13 -13
- package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
- package/dist/bar-chart/root/bar-chart-root.js +42 -57
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
- package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
- package/dist/button/root/button-root.d.ts +84 -94
- package/dist/button/root/button-root.js +82 -92
- package/dist/callout/root/callout-root.d.ts +4 -5
- package/dist/carousel/root/carousel-root.d.ts +59 -71
- package/dist/carousel/root/carousel-root.js +73 -101
- package/dist/chat/composer/chat-composer.d.ts +29 -33
- package/dist/chat/composer/chat-composer.js +40 -44
- package/dist/chat/message/chat-message.d.ts +25 -25
- package/dist/chat/message/chat-message.js +26 -26
- package/dist/chat/root/chat-root.d.ts +28 -41
- package/dist/chat/root/chat-root.js +27 -40
- package/dist/checkbox/root/checkbox-root.d.ts +10 -12
- package/dist/checkbox/root/checkbox-root.js +29 -35
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
- package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
- package/dist/code-block/root/code-block-root.d.ts +3 -4
- package/dist/code-block/root/code-block-root.js +8 -12
- package/dist/color-input/root/color-input-root.d.ts +36 -37
- package/dist/color-input/root/color-input-root.js +29 -34
- package/dist/color-picker/color.d.ts +7 -8
- package/dist/color-picker/color.js +7 -8
- package/dist/color-picker/root/color-picker-root.d.ts +55 -57
- package/dist/color-picker/root/color-picker-root.js +60 -64
- package/dist/combobox/root/combobox-root.d.ts +53 -58
- package/dist/combobox/root/combobox-root.js +85 -94
- package/dist/command/root/command-root.d.ts +8 -8
- package/dist/command/root/command-root.js +29 -33
- package/dist/copy-button/root/copy-button-root.d.ts +21 -24
- package/dist/copy-button/root/copy-button-root.js +25 -35
- package/dist/data-table/root/data-table-root.d.ts +77 -76
- package/dist/data-table/root/data-table-root.js +95 -84
- package/dist/data-table/root/order.d.ts +2 -2
- package/dist/data-table/root/order.js +1 -3
- package/dist/date-input/root/date-input-root.d.ts +88 -93
- package/dist/date-input/root/date-input-root.js +147 -158
- package/dist/date-picker/root/date-picker-root.d.ts +75 -83
- package/dist/date-picker/root/date-picker-root.js +120 -143
- package/dist/dialog/root/dialog-root.d.ts +41 -24
- package/dist/dialog/root/dialog-root.js +47 -24
- package/dist/divider/root/divider-root.d.ts +5 -6
- package/dist/divider/root/divider-root.js +4 -5
- package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
- package/dist/donut-chart/root/donut-chart-root.js +37 -51
- package/dist/drawer/root/drawer-root.d.ts +24 -29
- package/dist/drawer/root/drawer-root.js +15 -22
- package/dist/drilldown/item/drilldown-item.d.ts +14 -14
- package/dist/drilldown/item/drilldown-item.js +24 -26
- package/dist/drilldown/root/drilldown-root.d.ts +8 -10
- package/dist/drilldown/root/drilldown-root.js +6 -7
- package/dist/element-events.generated.js +1 -1
- package/dist/file-input/root/file-input-root.d.ts +20 -24
- package/dist/file-input/root/file-input-root.js +42 -57
- package/dist/format-date/root/format-date-root.js +1 -1
- package/dist/heatmap/root/buckets.d.ts +8 -8
- package/dist/heatmap/root/buckets.js +8 -8
- package/dist/heatmap/root/heatmap-root.d.ts +57 -63
- package/dist/heatmap/root/heatmap-root.js +72 -83
- package/dist/icon/root/icon-root.d.ts +4 -4
- package/dist/icon/root/icon-root.js +9 -9
- package/dist/icon-button/root/icon-button-root.d.ts +4 -6
- package/dist/icon-button/root/icon-button-root.js +4 -6
- package/dist/image/root/image-root.d.ts +49 -59
- package/dist/image/root/image-root.js +55 -65
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/input/root/input-root.d.ts +61 -85
- package/dist/input/root/input-root.js +79 -106
- package/dist/kbd/root/kbd-root.d.ts +8 -7
- package/dist/kbd/root/kbd-root.js +71 -11
- package/dist/legend/root/legend-root.d.ts +1 -1
- package/dist/legend/root/legend-root.js +4 -5
- package/dist/line-chart/root/line-chart-root.d.ts +26 -30
- package/dist/line-chart/root/line-chart-root.js +10 -10
- package/dist/list/item/list-item.d.ts +14 -18
- package/dist/list/item/list-item.js +18 -22
- package/dist/list/root/list-root.d.ts +4 -4
- package/dist/list/root/list-root.js +3 -3
- package/dist/listbox/root/listbox-root.d.ts +31 -58
- package/dist/listbox/root/listbox-root.js +66 -109
- package/dist/megamenu/root/megamenu-root.d.ts +34 -35
- package/dist/megamenu/root/megamenu-root.js +53 -58
- package/dist/menu/item/menu-item.d.ts +39 -53
- package/dist/menu/item/menu-item.js +50 -64
- package/dist/menu/root/menu-root.d.ts +30 -40
- package/dist/menu/root/menu-root.js +49 -82
- package/dist/meter/root/meter-root.d.ts +49 -53
- package/dist/meter/root/meter-root.js +22 -27
- package/dist/navigation/root/navigation-root.js +11 -19
- package/dist/notifications/notification/notification.d.ts +16 -22
- package/dist/notifications/notification/notification.js +21 -27
- package/dist/notifications/root/notifications-root.d.ts +31 -39
- package/dist/notifications/root/notifications-root.js +41 -52
- package/dist/number-input/root/number-input-root.d.ts +31 -33
- package/dist/number-input/root/number-input-root.js +37 -39
- package/dist/option/root/option-root.d.ts +73 -74
- package/dist/option/root/option-root.js +62 -64
- package/dist/outline/root/outline-root.d.ts +38 -44
- package/dist/outline/root/outline-root.js +66 -82
- package/dist/pagination/root/pagination-root.d.ts +87 -92
- package/dist/pagination/root/pagination-root.js +116 -123
- package/dist/pagination/size/pagination-size.d.ts +31 -50
- package/dist/pagination/size/pagination-size.js +35 -55
- package/dist/pagination/summary/pagination-summary.d.ts +12 -12
- package/dist/pagination/summary/pagination-summary.js +18 -18
- package/dist/pin-input/root/pin-input-root.d.ts +53 -70
- package/dist/pin-input/root/pin-input-root.js +74 -94
- package/dist/popover/root/popover-root.d.ts +15 -20
- package/dist/popover/root/popover-root.js +19 -36
- package/dist/progress/root/progress-root.d.ts +12 -14
- package/dist/progress/root/progress-root.js +22 -25
- package/dist/qr-code/root/qr-code-root.d.ts +11 -11
- package/dist/qr-code/root/qr-code-root.js +12 -14
- package/dist/radio/group/radio-group.js +19 -26
- package/dist/radio/root/radio-root.d.ts +12 -13
- package/dist/radio/root/radio-root.js +12 -13
- package/dist/rating/root/rating-root.d.ts +25 -30
- package/dist/rating/root/rating-root.js +43 -50
- package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
- package/dist/scroll-area/root/scroll-area-root.js +39 -33
- package/dist/select/root/select-root.d.ts +7 -12
- package/dist/select/root/select-root.js +40 -55
- package/dist/slider/root/slider-root.d.ts +53 -60
- package/dist/slider/root/slider-root.js +74 -85
- package/dist/sparkline/root/sparkline-root.d.ts +43 -47
- package/dist/sparkline/root/sparkline-root.js +23 -32
- package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
- package/dist/speed-dial/item/speed-dial-item.js +9 -9
- package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
- package/dist/speed-dial/root/speed-dial-root.js +32 -40
- package/dist/splitter/root/splitter-root.d.ts +98 -111
- package/dist/splitter/root/splitter-root.js +96 -123
- package/dist/stat/root/stat-root.d.ts +2 -7
- package/dist/stat/root/stat-root.js +0 -5
- package/dist/steps/step/step.d.ts +19 -24
- package/dist/steps/step/step.js +27 -32
- package/dist/switch/root/switch-root.js +2 -2
- package/dist/table/column/table-column.d.ts +54 -60
- package/dist/table/column/table-column.js +95 -68
- package/dist/table/root/table-root.d.ts +5 -6
- package/dist/table/root/table-root.js +7 -10
- package/dist/tabs/panel/tab-panel.d.ts +21 -25
- package/dist/tabs/panel/tab-panel.js +25 -29
- package/dist/tabs/root/tabs-root.d.ts +25 -34
- package/dist/tabs/root/tabs-root.js +22 -28
- package/dist/tabs/tab/tab.d.ts +12 -12
- package/dist/tabs/tab/tab.js +19 -20
- package/dist/textarea/root/textarea-root.d.ts +36 -36
- package/dist/textarea/root/textarea-root.js +43 -47
- package/dist/time-input/root/time-input-root.d.ts +58 -68
- package/dist/time-input/root/time-input-root.js +62 -77
- package/dist/time-picker/root/time-picker-root.d.ts +73 -79
- package/dist/time-picker/root/time-picker-root.js +72 -84
- package/dist/timeline/item/timeline-item.d.ts +8 -11
- package/dist/timeline/item/timeline-item.js +8 -11
- package/dist/timeline/root/timeline-root.d.ts +5 -7
- package/dist/timeline/root/timeline-root.js +5 -7
- package/dist/toast/item/toast-item.d.ts +9 -27
- package/dist/toast/item/toast-item.js +19 -41
- package/dist/toast/root/toast-root.d.ts +10 -14
- package/dist/toast/root/toast-root.js +4 -5
- package/dist/toggle/group/toggle-group.d.ts +6 -15
- package/dist/toggle/group/toggle-group.js +21 -36
- package/dist/toggle/root/toggle-root.d.ts +26 -27
- package/dist/toggle/root/toggle-root.js +30 -31
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/toolbar/root/toolbar-root.js +10 -14
- package/dist/tooltip/root/tooltip-root.d.ts +52 -59
- package/dist/tooltip/root/tooltip-root.js +98 -93
- package/dist/tour/root/tour-root.d.ts +19 -23
- package/dist/tour/root/tour-root.js +31 -41
- package/dist/tour/stop/tour-stop.d.ts +14 -15
- package/dist/tour/stop/tour-stop.js +31 -34
- package/dist/tree/item/tree-item.d.ts +30 -35
- package/dist/tree/item/tree-item.js +43 -55
- package/dist/tree/root/tree-root.d.ts +7 -10
- package/dist/tree/root/tree-root.js +33 -42
- package/dist/trend/root/trend-root.d.ts +3 -5
- package/dist/trend/root/trend-root.js +5 -9
- package/dist/video/root/video-root.d.ts +100 -124
- package/dist/video/root/video-root.js +142 -176
- package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
- package/dist/video-playlist/item/video-playlist-item.js +24 -24
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
- package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
- package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
- package/dist/video-playlist/root/video-playlist-root.js +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
- package/dist/virtual-list/root/virtual-list-root.js +11 -16
- package/jsx.d.ts +9797 -12561
- package/package.json +6 -6
- package/vue.d.ts +2684 -3228
|
@@ -6,8 +6,8 @@ declare const HelixHeadlessTabs_base: (new (...args: any[]) => import("@fusion.d
|
|
|
6
6
|
*
|
|
7
7
|
* @description
|
|
8
8
|
* Selection is coordinated by event, the same shape the accordion and the tree
|
|
9
|
-
* use: a tab dispatches `
|
|
10
|
-
*
|
|
9
|
+
* use: a tab dispatches `helix-select` and the root pairs it with the panel of
|
|
10
|
+
* the same value. Nothing registers with anything, so tabs added later work
|
|
11
11
|
* without the root being told.
|
|
12
12
|
*
|
|
13
13
|
* The tab list is a single tab stop, moved with the arrow keys through
|
|
@@ -35,6 +35,18 @@ declare const HelixHeadlessTabs_base: (new (...args: any[]) => import("@fusion.d
|
|
|
35
35
|
export declare class HelixHeadlessTabs extends HelixHeadlessTabs_base {
|
|
36
36
|
protected readonly keys: KeyboardNavigationController;
|
|
37
37
|
private readonly indicator;
|
|
38
|
+
/**
|
|
39
|
+
* Accessible name for the tab list.
|
|
40
|
+
*/
|
|
41
|
+
label: string;
|
|
42
|
+
/**
|
|
43
|
+
* Whether arrowing to a tab also selects it.
|
|
44
|
+
*
|
|
45
|
+
* Automatic is the default because showing a panel is usually cheap. Set this
|
|
46
|
+
* where it is not, so a reader arrowing past four tabs does not load four
|
|
47
|
+
* panels on the way.
|
|
48
|
+
*/
|
|
49
|
+
manual: boolean;
|
|
38
50
|
/**
|
|
39
51
|
* How the row reads.
|
|
40
52
|
*
|
|
@@ -44,35 +56,14 @@ export declare class HelixHeadlessTabs extends HelixHeadlessTabs_base {
|
|
|
44
56
|
* heads a page. `segmented` puts the pill in a framed, sunken track, which
|
|
45
57
|
* reads as one control rather than as a row.
|
|
46
58
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* every other appearance in the library describes itself: `outlined`,
|
|
51
|
-
* `spaced`, `plain`. This component's own comments called it segmented in
|
|
52
|
-
* both places it explained itself, which is the name that was doing the work.
|
|
53
|
-
*
|
|
54
|
-
* `underlined` and not `underline` for the shape of the word rather than the
|
|
55
|
-
* sense: the two values sit in one list and read as a pair, and `segmented`
|
|
56
|
-
* is a participle. `outlined` on Accordion is the same word doing the same
|
|
57
|
-
* job. The example file was already `underlined.html`, which is what a reader
|
|
58
|
-
* meets first.
|
|
59
|
+
* A value describes itself rather than naming another component: `segmented`
|
|
60
|
+
* and `underlined` are participles reading as a pair, the way `outlined` on
|
|
61
|
+
* Accordion does.
|
|
59
62
|
*
|
|
60
63
|
* Reflected and left unset by default, so the host carries nothing a
|
|
61
64
|
* consumer's server markup does not already have.
|
|
62
65
|
*/
|
|
63
66
|
variant?: 'segmented' | 'underlined';
|
|
64
|
-
/**
|
|
65
|
-
* Accessible name for the tab list.
|
|
66
|
-
*/
|
|
67
|
-
label: string;
|
|
68
|
-
/**
|
|
69
|
-
* Whether arrowing to a tab also selects it.
|
|
70
|
-
*
|
|
71
|
-
* Automatic is the default because showing a panel is usually cheap. Set this
|
|
72
|
-
* where it is not, so a reader arrowing past four tabs does not load four
|
|
73
|
-
* panels on the way.
|
|
74
|
-
*/
|
|
75
|
-
manual: boolean;
|
|
76
67
|
/** Watches for anything that moves a tab, since none of it is a property. */
|
|
77
68
|
private observer;
|
|
78
69
|
private get tabs();
|
|
@@ -99,17 +90,17 @@ export declare class HelixHeadlessTabs extends HelixHeadlessTabs_base {
|
|
|
99
90
|
/**
|
|
100
91
|
* The set changed: pair it up, watch it, and measure it.
|
|
101
92
|
*
|
|
102
|
-
* All three,
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
93
|
+
* All three, and dropping `place()` leaves an indicator unplaced for the life
|
|
94
|
+
* of the page. The order of events is what does it: the host renders and
|
|
95
|
+
* measures before its tabs have upgraded, so there is no selected tab to
|
|
96
|
+
* measure and `place` refuses; the ResizeObserver's one initial callback
|
|
97
|
+
* lands in that same gap; and then the tabs upgrade, `slotchange` pairs them,
|
|
98
|
+
* nothing measures, and nothing ever will again, because the host's size
|
|
99
|
+
* never changes.
|
|
109
100
|
*
|
|
110
101
|
* Invisible in every example, because a tab strip that is only tabs is
|
|
111
102
|
* exactly as tall as its tabs, so a mark at the top of the strip is a mark on
|
|
112
|
-
* the tab. It
|
|
103
|
+
* the tab. It shows only where something gives the strip a height of its own.
|
|
113
104
|
*/
|
|
114
105
|
private readonly handleSlotChange;
|
|
115
106
|
protected updated(changed: PropertyValues): void;
|
|
@@ -14,8 +14,8 @@ import { HelixHeadlessTab } from '../tab/tab.js';
|
|
|
14
14
|
*
|
|
15
15
|
* @description
|
|
16
16
|
* Selection is coordinated by event, the same shape the accordion and the tree
|
|
17
|
-
* use: a tab dispatches `
|
|
18
|
-
*
|
|
17
|
+
* use: a tab dispatches `helix-select` and the root pairs it with the panel of
|
|
18
|
+
* the same value. Nothing registers with anything, so tabs added later work
|
|
19
19
|
* without the root being told.
|
|
20
20
|
*
|
|
21
21
|
* The tab list is a single tab stop, moved with the arrow keys through
|
|
@@ -44,13 +44,8 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
44
44
|
constructor() {
|
|
45
45
|
super(...arguments);
|
|
46
46
|
/* Arrow keys, Home and End. Same controller as the radio group and the toggle
|
|
47
|
-
group
|
|
48
|
-
|
|
49
|
-
because `manual` lets focus and selection diverge, and `selects` because
|
|
50
|
-
`manual` is what decides whether arriving chooses.
|
|
51
|
-
|
|
52
|
-
Roughly thirty lines of index arithmetic went, and with them the last copy
|
|
53
|
-
of a wrap that had to be right in four places. */
|
|
47
|
+
group: `origin: 'focus'` because `manual` lets focus and selection diverge,
|
|
48
|
+
and `selects` because `manual` is what decides whether arriving chooses. */
|
|
54
49
|
this.keys = new KeyboardNavigationController(this, {
|
|
55
50
|
items: () => this.tabs,
|
|
56
51
|
origin: 'focus',
|
|
@@ -74,26 +69,26 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
74
69
|
* panels on the way.
|
|
75
70
|
*/
|
|
76
71
|
this.manual = false;
|
|
77
|
-
/* Through the mixin, so a consumer can refuse the change.
|
|
78
|
-
straight from the event
|
|
79
|
-
nobody
|
|
72
|
+
/* Through the mixin, so a consumer can refuse the change. Moving `active`
|
|
73
|
+
straight from the event leaves `helix-before-activate` an announcement
|
|
74
|
+
nobody can answer. */
|
|
80
75
|
this.handleSelection = (event) => {
|
|
81
76
|
this.requestActive(event.detail.value);
|
|
82
77
|
};
|
|
83
78
|
/**
|
|
84
79
|
* The set changed: pair it up, watch it, and measure it.
|
|
85
80
|
*
|
|
86
|
-
* All three,
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
81
|
+
* All three, and dropping `place()` leaves an indicator unplaced for the life
|
|
82
|
+
* of the page. The order of events is what does it: the host renders and
|
|
83
|
+
* measures before its tabs have upgraded, so there is no selected tab to
|
|
84
|
+
* measure and `place` refuses; the ResizeObserver's one initial callback
|
|
85
|
+
* lands in that same gap; and then the tabs upgrade, `slotchange` pairs them,
|
|
86
|
+
* nothing measures, and nothing ever will again, because the host's size
|
|
87
|
+
* never changes.
|
|
93
88
|
*
|
|
94
89
|
* Invisible in every example, because a tab strip that is only tabs is
|
|
95
90
|
* exactly as tall as its tabs, so a mark at the top of the strip is a mark on
|
|
96
|
-
* the tab. It
|
|
91
|
+
* the tab. It shows only where something gives the strip a height of its own.
|
|
97
92
|
*/
|
|
98
93
|
this.handleSlotChange = () => {
|
|
99
94
|
this.sync();
|
|
@@ -110,9 +105,9 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
110
105
|
/** Pushes the current value down to whichever tab and panel own it. */
|
|
111
106
|
sync() {
|
|
112
107
|
const tabs = this.tabs;
|
|
113
|
-
/* Through the mixin, which also skips a disabled first tab.
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
/* Through the mixin, which also skips a disabled first tab. A hand-written
|
|
109
|
+
fallback to the first child shows a disabled tab as current and opens its
|
|
110
|
+
panel with it. */
|
|
116
111
|
const value = this.resolveActive(tabs)?.value ?? '';
|
|
117
112
|
for (const tab of tabs) {
|
|
118
113
|
tab.selected = tab.value === value;
|
|
@@ -136,8 +131,7 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
136
131
|
* reordering a list left this permanently dead: the observer gone, nothing
|
|
137
132
|
* to rebuild it, and the component still rendering as though it were
|
|
138
133
|
* watching. Guarded on `hasUpdated`, because the first connection happens
|
|
139
|
-
* before the first render and there is nothing to watch yet.
|
|
140
|
-
* `check:observers` holds it. */
|
|
134
|
+
* before the first render and there is nothing to watch yet. */
|
|
141
135
|
if (this.hasUpdated) {
|
|
142
136
|
this.measure();
|
|
143
137
|
this.watch();
|
|
@@ -202,15 +196,15 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
202
196
|
<div part="panels"><slot name="panels" @slotchange=${this.handleSlotChange}></slot></div>`;
|
|
203
197
|
}
|
|
204
198
|
};
|
|
205
|
-
__decorate([
|
|
206
|
-
property({ reflect: true })
|
|
207
|
-
], HelixHeadlessTabs.prototype, "variant", void 0);
|
|
208
199
|
__decorate([
|
|
209
200
|
property()
|
|
210
201
|
], HelixHeadlessTabs.prototype, "label", void 0);
|
|
211
202
|
__decorate([
|
|
212
203
|
property({ reflect: true, type: Boolean })
|
|
213
204
|
], HelixHeadlessTabs.prototype, "manual", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
property({ reflect: true })
|
|
207
|
+
], HelixHeadlessTabs.prototype, "variant", void 0);
|
|
214
208
|
HelixHeadlessTabs = __decorate([
|
|
215
209
|
customElement('helix-headless-tabs')
|
|
216
210
|
], HelixHeadlessTabs);
|
package/dist/tabs/tab/tab.d.ts
CHANGED
|
@@ -24,17 +24,17 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
24
24
|
*/
|
|
25
25
|
export declare class HelixHeadlessTab extends HelixElement {
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Whether the tab can be chosen.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
disabled: boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Whether this tab is the current one.
|
|
32
32
|
*/
|
|
33
33
|
selected: boolean;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Identifies the tab, and pairs it with the panel of the same value.
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
value: string;
|
|
38
38
|
/** Moves focus to this tab, for the list's arrow keys. */
|
|
39
39
|
focusItem(): void;
|
|
40
40
|
/** Selects this tab and announces it. */
|
|
@@ -42,17 +42,17 @@ export declare class HelixHeadlessTab extends HelixElement {
|
|
|
42
42
|
/**
|
|
43
43
|
* Mirrors the chosen state where a stylesheet can select on it.
|
|
44
44
|
*
|
|
45
|
-
* **A custom state
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
45
|
+
* **A custom state, not a reflected `selected` attribute.** The parent writes
|
|
46
|
+
* this: a listbox choosing a row, a tab strip moving the tab, a radio group
|
|
47
|
+
* answering for its set. Reflected, it puts the element's own bookkeeping onto
|
|
48
|
+
* markup a consumer wrote and a consumer's server never sent, which React
|
|
49
|
+
* reconciles and reports as a mismatch, and which a serialized element pasted
|
|
50
|
+
* back declares as a choice nobody made. `ElementInternals` holds it instead,
|
|
51
|
+
* where it is not in the DOM at all.
|
|
52
52
|
*
|
|
53
53
|
* Reading `selected` is unaffected and so is writing it: the attribute still
|
|
54
54
|
* seeds the property, which is what `<helix-tab selected>` in a consumer's
|
|
55
|
-
* markup means. What stops is the write back.
|
|
55
|
+
* markup means. What stops is the write back.
|
|
56
56
|
*/
|
|
57
57
|
protected willUpdate(changed: PropertyValues): void;
|
|
58
58
|
protected render(): TemplateResult;
|
package/dist/tabs/tab/tab.js
CHANGED
|
@@ -33,17 +33,17 @@ let HelixHeadlessTab = class HelixHeadlessTab extends HelixElement {
|
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Whether the tab can be chosen.
|
|
37
37
|
*/
|
|
38
|
-
this.
|
|
38
|
+
this.disabled = false;
|
|
39
39
|
/**
|
|
40
40
|
* Whether this tab is the current one.
|
|
41
41
|
*/
|
|
42
42
|
this.selected = false;
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Identifies the tab, and pairs it with the panel of the same value.
|
|
45
45
|
*/
|
|
46
|
-
this.
|
|
46
|
+
this.value = '';
|
|
47
47
|
}
|
|
48
48
|
/** Moves focus to this tab, for the list's arrow keys. */
|
|
49
49
|
focusItem() {
|
|
@@ -59,17 +59,17 @@ let HelixHeadlessTab = class HelixHeadlessTab extends HelixElement {
|
|
|
59
59
|
/**
|
|
60
60
|
* Mirrors the chosen state where a stylesheet can select on it.
|
|
61
61
|
*
|
|
62
|
-
* **A custom state
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
62
|
+
* **A custom state, not a reflected `selected` attribute.** The parent writes
|
|
63
|
+
* this: a listbox choosing a row, a tab strip moving the tab, a radio group
|
|
64
|
+
* answering for its set. Reflected, it puts the element's own bookkeeping onto
|
|
65
|
+
* markup a consumer wrote and a consumer's server never sent, which React
|
|
66
|
+
* reconciles and reports as a mismatch, and which a serialized element pasted
|
|
67
|
+
* back declares as a choice nobody made. `ElementInternals` holds it instead,
|
|
68
|
+
* where it is not in the DOM at all.
|
|
69
69
|
*
|
|
70
70
|
* Reading `selected` is unaffected and so is writing it: the attribute still
|
|
71
71
|
* seeds the property, which is what `<helix-tab selected>` in a consumer's
|
|
72
|
-
* markup means. What stops is the write back.
|
|
72
|
+
* markup means. What stops is the write back.
|
|
73
73
|
*/
|
|
74
74
|
willUpdate(changed) {
|
|
75
75
|
super.willUpdate(changed);
|
|
@@ -78,10 +78,9 @@ let HelixHeadlessTab = class HelixHeadlessTab extends HelixElement {
|
|
|
78
78
|
render() {
|
|
79
79
|
/* No `aria-controls`, and no id for one to point at.
|
|
80
80
|
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
* file's own comment said a dangling `aria-controls` is worse than none.
|
|
81
|
+
* An IDREF resolves only within the tree it is written in, and the panel's
|
|
82
|
+
* id is rendered inside the panel's *own* shadow root, so an `aria-controls`
|
|
83
|
+
* here would point at nothing on every tab.
|
|
85
84
|
*
|
|
86
85
|
* There is no id form that could work and no element reference either: a
|
|
87
86
|
* reference is valid only into the same tree or a shadow-including ancestor
|
|
@@ -102,14 +101,14 @@ let HelixHeadlessTab = class HelixHeadlessTab extends HelixElement {
|
|
|
102
101
|
}
|
|
103
102
|
};
|
|
104
103
|
__decorate([
|
|
105
|
-
property()
|
|
106
|
-
], HelixHeadlessTab.prototype, "
|
|
104
|
+
property({ reflect: true, type: Boolean })
|
|
105
|
+
], HelixHeadlessTab.prototype, "disabled", void 0);
|
|
107
106
|
__decorate([
|
|
108
107
|
property({ type: Boolean })
|
|
109
108
|
], HelixHeadlessTab.prototype, "selected", void 0);
|
|
110
109
|
__decorate([
|
|
111
|
-
property(
|
|
112
|
-
], HelixHeadlessTab.prototype, "
|
|
110
|
+
property()
|
|
111
|
+
], HelixHeadlessTab.prototype, "value", void 0);
|
|
113
112
|
HelixHeadlessTab = __decorate([
|
|
114
113
|
customElement('helix-headless-tab')
|
|
115
114
|
], HelixHeadlessTab);
|
|
@@ -51,20 +51,6 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
|
|
|
51
51
|
* Whether the box follows its own content rather than scrolling.
|
|
52
52
|
*/
|
|
53
53
|
autoGrow: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* Shown while the field is empty.
|
|
56
|
-
*
|
|
57
|
-
* Not a label: it goes when typing starts.
|
|
58
|
-
*/
|
|
59
|
-
placeholder: string;
|
|
60
|
-
/**
|
|
61
|
-
* Whether the field refuses input while still submitting its value.
|
|
62
|
-
*/
|
|
63
|
-
readOnly: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* How many lines the box is before anything is typed.
|
|
66
|
-
*/
|
|
67
|
-
rows: number;
|
|
68
54
|
/**
|
|
69
55
|
* How many characters wide the box is, where the layout is not deciding.
|
|
70
56
|
*
|
|
@@ -87,10 +73,28 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
|
|
|
87
73
|
*/
|
|
88
74
|
dirName: string;
|
|
89
75
|
/**
|
|
90
|
-
*
|
|
91
|
-
* it.
|
|
76
|
+
* Most characters the value may have.
|
|
92
77
|
*/
|
|
93
|
-
|
|
78
|
+
maxLength?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Fewest characters the value may have.
|
|
81
|
+
*
|
|
82
|
+
* Forwarded to the real `<textarea>` rather than checked here, which is what
|
|
83
|
+
* makes the message the browser's and therefore the reader's own language.
|
|
84
|
+
* No `pattern`: the platform does not give a textarea one, and inventing it
|
|
85
|
+
* would be this library guessing where the point is to stop guessing.
|
|
86
|
+
*/
|
|
87
|
+
minLength?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Shown while the field is empty.
|
|
90
|
+
*
|
|
91
|
+
* Not a label: it goes when typing starts.
|
|
92
|
+
*/
|
|
93
|
+
placeholder: string;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the field refuses input while still submitting its value.
|
|
96
|
+
*/
|
|
97
|
+
readOnly: boolean;
|
|
94
98
|
/** Focus is delegated to the control, so the host is never the target. */
|
|
95
99
|
static shadowRootOptions: ShadowRootInit;
|
|
96
100
|
private get control();
|
|
@@ -119,11 +123,11 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
|
|
|
119
123
|
/**
|
|
120
124
|
* Re-measures when the box changes rather than only when a property does.
|
|
121
125
|
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
126
|
+
* Nothing about a container narrowing, a font swapping, or the field finally
|
|
127
|
+
* gaining a layout box is a property change here, so on Lit updates alone a
|
|
128
|
+
* field that wrapped to three lines at one width keeps that three-line height
|
|
129
|
+
* at half the width and clips the rest behind `overflow: hidden`, with no way
|
|
130
|
+
* for a reader to reach it.
|
|
127
131
|
*
|
|
128
132
|
* Observing the control also covers the zero case above from the other side:
|
|
129
133
|
* a `ResizeObserver` fires when an element gains a box, so a field that was
|
|
@@ -143,11 +147,11 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
|
|
|
143
147
|
* The caret and the selection, under the platform's own names.
|
|
144
148
|
*
|
|
145
149
|
* **The whole reason this renders a real `<textarea>` is the caret**, and the
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
150
|
+
* control is inside this shadow root, so `querySelector` does not find it and
|
|
151
|
+
* a consumer has no other way to ask where the selection is, let alone move
|
|
152
|
+
* it. A field that cannot be scripted at the caret cannot do an
|
|
153
|
+
* insert-at-cursor toolbar, which is the first thing anybody builds on a
|
|
154
|
+
* textarea.
|
|
151
155
|
*
|
|
152
156
|
* Written through to the control, and answering zero before there is one,
|
|
153
157
|
* which is where an empty field's caret would be anyway.
|
|
@@ -193,18 +197,14 @@ export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
|
|
|
193
197
|
protected willUpdate(changed: PropertyValues): void;
|
|
194
198
|
protected updated(changed: PropertyValues): void;
|
|
195
199
|
/**
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
* Forwarded to the real `<textarea>` rather than checked here, which is what
|
|
199
|
-
* makes the message the browser's and therefore the reader's own language.
|
|
200
|
-
* No `pattern`: the platform does not give a textarea one, and inventing it
|
|
201
|
-
* would be this library guessing where the point is to stop guessing.
|
|
200
|
+
* How many lines the box is before anything is typed.
|
|
202
201
|
*/
|
|
203
|
-
|
|
202
|
+
rows: number;
|
|
204
203
|
/**
|
|
205
|
-
*
|
|
204
|
+
* How the browser wraps the text, and whether the breaks are submitted with
|
|
205
|
+
* it.
|
|
206
206
|
*/
|
|
207
|
-
|
|
207
|
+
wrap: 'hard' | 'off' | 'soft';
|
|
208
208
|
protected render(): TemplateResult;
|
|
209
209
|
}
|
|
210
210
|
declare global {
|
|
@@ -66,20 +66,6 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
66
66
|
* Whether the box follows its own content rather than scrolling.
|
|
67
67
|
*/
|
|
68
68
|
this.autoGrow = false;
|
|
69
|
-
/**
|
|
70
|
-
* Shown while the field is empty.
|
|
71
|
-
*
|
|
72
|
-
* Not a label: it goes when typing starts.
|
|
73
|
-
*/
|
|
74
|
-
this.placeholder = '';
|
|
75
|
-
/**
|
|
76
|
-
* Whether the field refuses input while still submitting its value.
|
|
77
|
-
*/
|
|
78
|
-
this.readOnly = false;
|
|
79
|
-
/**
|
|
80
|
-
* How many lines the box is before anything is typed.
|
|
81
|
-
*/
|
|
82
|
-
this.rows = 3;
|
|
83
69
|
/**
|
|
84
70
|
* The name a second entry carries, holding which way the text runs.
|
|
85
71
|
*
|
|
@@ -92,10 +78,15 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
92
78
|
*/
|
|
93
79
|
this.dirName = '';
|
|
94
80
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
81
|
+
* Shown while the field is empty.
|
|
82
|
+
*
|
|
83
|
+
* Not a label: it goes when typing starts.
|
|
97
84
|
*/
|
|
98
|
-
this.
|
|
85
|
+
this.placeholder = '';
|
|
86
|
+
/**
|
|
87
|
+
* Whether the field refuses input while still submitting its value.
|
|
88
|
+
*/
|
|
89
|
+
this.readOnly = false;
|
|
99
90
|
/**
|
|
100
91
|
* Every keystroke, cancelable, and put back where it is refused.
|
|
101
92
|
*
|
|
@@ -111,9 +102,7 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
111
102
|
const next = control.value;
|
|
112
103
|
/* Through the mixin, which announces and then applies only if the value is
|
|
113
104
|
the element's to move. The native control has already changed either way,
|
|
114
|
-
so wherever the answer does not follow it has to be put back
|
|
115
|
-
refusal, and it is equally a consumer who owns the value and has not
|
|
116
|
-
given a new one yet. Both are "what is on screen is not the answer". */
|
|
105
|
+
so wherever the answer does not follow it has to be put back. */
|
|
117
106
|
this.requestValue(next);
|
|
118
107
|
restoreValue(control, this.value);
|
|
119
108
|
this.grow();
|
|
@@ -123,6 +112,15 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
123
112
|
event.stopPropagation();
|
|
124
113
|
this.dispatchEvent(new Event('change', { bubbles: true, composed: false }));
|
|
125
114
|
};
|
|
115
|
+
/**
|
|
116
|
+
* How many lines the box is before anything is typed.
|
|
117
|
+
*/
|
|
118
|
+
this.rows = 3;
|
|
119
|
+
/**
|
|
120
|
+
* How the browser wraps the text, and whether the breaks are submitted with
|
|
121
|
+
* it.
|
|
122
|
+
*/
|
|
123
|
+
this.wrap = 'soft';
|
|
126
124
|
}
|
|
127
125
|
/** Focus is delegated to the control, so the host is never the target. */
|
|
128
126
|
static { this.shadowRootOptions = {
|
|
@@ -152,11 +150,10 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
152
150
|
/* Zero is not a height, it is the absence of a layout box.
|
|
153
151
|
*
|
|
154
152
|
* An element with `display: none` anywhere above it reports `scrollHeight`
|
|
155
|
-
* as zero
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* renders shut and opens later came out as a hairline with the text hidden
|
|
153
|
+
* as zero. Written back as a fixed `block-size` it pins the field there,
|
|
154
|
+
* since every later call then measures a control at zero and measures zero
|
|
155
|
+
* again: a textarea inside a tab panel, an accordion, or anything else that
|
|
156
|
+
* renders shut and opens later comes out as a hairline with the text hidden
|
|
160
157
|
* behind it. `tabs-root` refuses zero for the same reason.
|
|
161
158
|
*
|
|
162
159
|
* The reset to `auto` above has already been written by this point, which
|
|
@@ -190,11 +187,11 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
190
187
|
* The caret and the selection, under the platform's own names.
|
|
191
188
|
*
|
|
192
189
|
* **The whole reason this renders a real `<textarea>` is the caret**, and the
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
*
|
|
197
|
-
*
|
|
190
|
+
* control is inside this shadow root, so `querySelector` does not find it and
|
|
191
|
+
* a consumer has no other way to ask where the selection is, let alone move
|
|
192
|
+
* it. A field that cannot be scripted at the caret cannot do an
|
|
193
|
+
* insert-at-cursor toolbar, which is the first thing anybody builds on a
|
|
194
|
+
* textarea.
|
|
198
195
|
*
|
|
199
196
|
* Written through to the control, and answering zero before there is one,
|
|
200
197
|
* which is where an empty field's caret would be anyway.
|
|
@@ -267,11 +264,10 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
267
264
|
/* Rebuilt on reconnection, because nothing else does it.
|
|
268
265
|
*
|
|
269
266
|
* `firstUpdated` runs once for the life of the element and
|
|
270
|
-
* `disconnectedCallback` runs every time it moves, so
|
|
271
|
-
* a list
|
|
272
|
-
* it
|
|
273
|
-
*
|
|
274
|
-
* render and there is nothing to watch yet. `check:observers` holds it. */
|
|
267
|
+
* `disconnectedCallback` runs every time it moves, so without this a
|
|
268
|
+
* framework reordering a list leaves the observer gone with nothing to
|
|
269
|
+
* rebuild it. Guarded on `hasUpdated`, because the first connection happens
|
|
270
|
+
* before the first render and there is nothing to watch yet. */
|
|
275
271
|
connectedCallback() {
|
|
276
272
|
super.connectedCallback();
|
|
277
273
|
if (this.hasUpdated) {
|
|
@@ -350,6 +346,18 @@ __decorate([
|
|
|
350
346
|
__decorate([
|
|
351
347
|
property({ attribute: 'auto-grow', reflect: true, type: Boolean })
|
|
352
348
|
], HelixHeadlessTextarea.prototype, "autoGrow", void 0);
|
|
349
|
+
__decorate([
|
|
350
|
+
property({ type: Number })
|
|
351
|
+
], HelixHeadlessTextarea.prototype, "cols", void 0);
|
|
352
|
+
__decorate([
|
|
353
|
+
property({ attribute: 'dirname' })
|
|
354
|
+
], HelixHeadlessTextarea.prototype, "dirName", void 0);
|
|
355
|
+
__decorate([
|
|
356
|
+
property({ attribute: 'maxlength', type: Number })
|
|
357
|
+
], HelixHeadlessTextarea.prototype, "maxLength", void 0);
|
|
358
|
+
__decorate([
|
|
359
|
+
property({ attribute: 'minlength', type: Number })
|
|
360
|
+
], HelixHeadlessTextarea.prototype, "minLength", void 0);
|
|
353
361
|
__decorate([
|
|
354
362
|
property()
|
|
355
363
|
], HelixHeadlessTextarea.prototype, "placeholder", void 0);
|
|
@@ -359,21 +367,9 @@ __decorate([
|
|
|
359
367
|
__decorate([
|
|
360
368
|
property({ type: Number })
|
|
361
369
|
], HelixHeadlessTextarea.prototype, "rows", void 0);
|
|
362
|
-
__decorate([
|
|
363
|
-
property({ type: Number })
|
|
364
|
-
], HelixHeadlessTextarea.prototype, "cols", void 0);
|
|
365
|
-
__decorate([
|
|
366
|
-
property({ attribute: 'dirname' })
|
|
367
|
-
], HelixHeadlessTextarea.prototype, "dirName", void 0);
|
|
368
370
|
__decorate([
|
|
369
371
|
property()
|
|
370
372
|
], HelixHeadlessTextarea.prototype, "wrap", void 0);
|
|
371
|
-
__decorate([
|
|
372
|
-
property({ attribute: 'minlength', type: Number })
|
|
373
|
-
], HelixHeadlessTextarea.prototype, "minLength", void 0);
|
|
374
|
-
__decorate([
|
|
375
|
-
property({ attribute: 'maxlength', type: Number })
|
|
376
|
-
], HelixHeadlessTextarea.prototype, "maxLength", void 0);
|
|
377
373
|
HelixHeadlessTextarea = __decorate([
|
|
378
374
|
customElement('helix-headless-textarea')
|
|
379
375
|
], HelixHeadlessTextarea);
|