@fusion.dev/helix-headless 0.178.0 → 0.180.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 +543 -145
- package/dist/button/root/button-root.d.ts +12 -0
- package/dist/button/root/button-root.js +9 -0
- package/dist/chat/composer/chat-composer.d.ts +2 -1
- package/dist/chat/composer/chat-composer.js +1 -1
- package/dist/combobox/root/combobox-root.d.ts +12 -0
- package/dist/combobox/root/combobox-root.js +3 -2
- package/dist/command/root/command-root.d.ts +12 -0
- package/dist/command/root/command-root.js +3 -2
- package/dist/data-table/root/data-table-root.d.ts +13 -1
- package/dist/data-table/root/data-table-root.js +18 -15
- package/dist/date-input/root/date-input-root.d.ts +7 -0
- package/dist/date-input/root/date-input-root.js +12 -0
- package/dist/date-picker/root/date-picker-root.d.ts +7 -1
- package/dist/date-picker/root/date-picker-root.js +12 -0
- package/dist/drilldown/item/drilldown-item.d.ts +6 -0
- package/dist/drilldown/item/drilldown-item.js +9 -0
- package/dist/drilldown/root/drilldown-root.js +9 -0
- package/dist/element-events.generated.js +7 -1
- package/dist/filter-input/root/filter-input-root.d.ts +13 -0
- package/dist/filter-input/root/filter-input-root.js +2 -1
- package/dist/heatmap/root/heatmap-root.d.ts +54 -42
- package/dist/heatmap/root/heatmap-root.js +72 -54
- package/dist/listbox/root/listbox-root.d.ts +16 -2
- package/dist/listbox/root/listbox-root.js +8 -4
- package/dist/menu/item/menu-item.d.ts +6 -0
- package/dist/menu/item/menu-item.js +9 -0
- package/dist/meter/root/meter-root.js +1 -2
- package/dist/notifications/notification/notification.d.ts +37 -9
- package/dist/notifications/notification/notification.js +35 -5
- package/dist/option/among.d.ts +23 -0
- package/dist/option/among.js +2 -0
- package/dist/option/root/option-root.d.ts +1 -17
- package/dist/option/root/option-root.js +1 -4
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +5 -4
- package/dist/scatter-chart/root/scatter-chart-root.js +1 -0
- package/dist/select/root/select-root.d.ts +13 -2
- package/dist/select/root/select-root.js +3 -3
- package/dist/speed-dial/item/speed-dial-item.d.ts +6 -0
- package/dist/speed-dial/item/speed-dial-item.js +9 -0
- package/dist/table/column/table-column.d.ts +1 -10
- package/dist/table/column/table-column.js +1 -2
- package/dist/table/edge.d.ts +10 -0
- package/dist/table/edge.js +2 -0
- package/dist/tabs/root/tabs-root.d.ts +1 -0
- package/dist/tabs/root/tabs-root.js +13 -0
- package/dist/tabs/tab/tab.d.ts +6 -0
- package/dist/tabs/tab/tab.js +9 -0
- package/dist/tooltip/root/tooltip-root.js +1 -0
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +472 -130
- package/types/vue.d.ts +71 -50
- package/types/words.d.ts +27 -6
|
@@ -4,15 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { AriaForwardController, afterLinkFollowed, chosenValues, customElement, dataOptions, drawAutofill, drawStatus, HelixFormElement, hostAria, hostWords, inlineStep, isRtl, MixinControllerOpen, MixinControllerValue, MixinField, onApple, PopoverController, reportValues, StatusController, sideOf, typesCharacter, UpgradeController, words, wordsLocale, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, afterLinkFollowed, auditChildren, chosenValues, customElement, dataOptions, drawAutofill, drawStatus, HelixFormElement, hostAria, hostWords, inlineStep, isRtl, MixinControllerOpen, MixinControllerValue, MixinField, onApple, PopoverController, reportValues, StatusController, sideOf, typesCharacter, UpgradeController, words, wordsLocale, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { caretDown } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { nothing } from 'lit';
|
|
10
10
|
import { property } from 'lit/decorators.js';
|
|
11
11
|
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
12
12
|
import { html } from 'lit/static-html.js';
|
|
13
|
-
import { optionsAmong } from '../../option/
|
|
13
|
+
import { optionsAmong } from '../../option/among.js';
|
|
14
14
|
import '../../listbox/index.js';
|
|
15
|
-
import '../../option/index.js';
|
|
16
15
|
import { over } from '../align.js';
|
|
17
16
|
let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(MixinControllerValue(MixinField(HelixFormElement))) {
|
|
18
17
|
constructor() {
|
|
@@ -210,6 +209,7 @@ let HelixHeadlessSelect = class HelixHeadlessSelect extends MixinControllerOpen(
|
|
|
210
209
|
}
|
|
211
210
|
connectedCallback() {
|
|
212
211
|
super.connectedCallback();
|
|
212
|
+
auditChildren(this, 'option', 'option', 'it offers no choices');
|
|
213
213
|
this.addEventListener('helix-select', this.handleLinkFollowed);
|
|
214
214
|
const words = new MutationObserver(() => this.requestUpdate());
|
|
215
215
|
words.observe(this, {
|
|
@@ -87,6 +87,12 @@ export declare class HelixHeadlessSpeedDialItem extends HelixElement {
|
|
|
87
87
|
* keyboard controller uses for the arrow keys.
|
|
88
88
|
*/
|
|
89
89
|
focusItem(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Presses the action, as `click()` presses a native button: passed to the
|
|
92
|
+
* control inside, which is what answers a click, so a script's `click()`
|
|
93
|
+
* chooses the action and follows its link, once.
|
|
94
|
+
*/
|
|
95
|
+
click(): void;
|
|
90
96
|
/** Chooses the action, the same as pressing it. */
|
|
91
97
|
select(): void;
|
|
92
98
|
/**
|
|
@@ -43,6 +43,15 @@ let HelixHeadlessSpeedDialItem = class HelixHeadlessSpeedDialItem extends HelixE
|
|
|
43
43
|
focusItem() {
|
|
44
44
|
this.focus();
|
|
45
45
|
}
|
|
46
|
+
click() {
|
|
47
|
+
const control = this.partNamed('item');
|
|
48
|
+
if (control) {
|
|
49
|
+
control.click();
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
super.click();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
46
55
|
select() {
|
|
47
56
|
this.choose();
|
|
48
57
|
}
|
|
@@ -10,16 +10,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
10
10
|
* `undefined` falls back to the field.
|
|
11
11
|
*/
|
|
12
12
|
export type CellReader = (row: Readonly<Record<string, unknown>>) => unknown;
|
|
13
|
-
|
|
14
|
-
* The edge a column names, where it names one of the three.
|
|
15
|
-
*
|
|
16
|
-
* **`text-align` is a string anybody can write**, the union on the property being a
|
|
17
|
-
* compile-time claim and nothing else, and both tables put the value straight
|
|
18
|
-
* into CSS: `Table` into a rule in each row's shadow root, `DataTable` into the
|
|
19
|
-
* cell it draws. One guard, here with the property, rather than one in each
|
|
20
|
-
* table and only one of them written.
|
|
21
|
-
*/
|
|
22
|
-
export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
13
|
+
export { edgeOf } from '../edge.js';
|
|
23
14
|
/**
|
|
24
15
|
* @summary One column of a table: its heading, its width, and the field it reads from each row.
|
|
25
16
|
*
|
|
@@ -10,8 +10,7 @@ import { dotsSixVertical } from '@fusion.dev/helix-icons';
|
|
|
10
10
|
import { html, nothing } from 'lit';
|
|
11
11
|
import { property, state } from 'lit/decorators.js';
|
|
12
12
|
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
13
|
-
|
|
14
|
-
export const edgeOf = (align) => align && EDGES.has(align) ? align : undefined;
|
|
13
|
+
export { edgeOf } from '../edge.js';
|
|
15
14
|
let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixElement {
|
|
16
15
|
constructor() {
|
|
17
16
|
super(...arguments);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The edge a column names, where it names one of the three.
|
|
3
|
+
*
|
|
4
|
+
* **`text-align` is a string anybody can write**, the union on the property being a
|
|
5
|
+
* compile-time claim and nothing else, and both tables put the value straight
|
|
6
|
+
* into CSS: `Table` into a rule in each row's shadow root, `DataTable` into the
|
|
7
|
+
* cell it draws. One guard, here with the property, rather than one in each
|
|
8
|
+
* table and only one of them written.
|
|
9
|
+
*/
|
|
10
|
+
export declare const edgeOf: (align: string | undefined) => string | undefined;
|
|
@@ -192,6 +192,7 @@ export declare class HelixHeadlessTabs extends HelixHeadlessTabs_base {
|
|
|
192
192
|
private refocus;
|
|
193
193
|
connectedCallback(): void;
|
|
194
194
|
disconnectedCallback(): void;
|
|
195
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
195
196
|
protected firstUpdated(changed: PropertyValues): void;
|
|
196
197
|
/** Watches the strip's size while `scroll-controls` asks, and reads it. */
|
|
197
198
|
private watchStrip;
|
|
@@ -68,6 +68,9 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
68
68
|
};
|
|
69
69
|
this.handleSlotChange = () => {
|
|
70
70
|
this.sync();
|
|
71
|
+
if (this.active === '') {
|
|
72
|
+
this.requestUpdate();
|
|
73
|
+
}
|
|
71
74
|
this.indicator.place();
|
|
72
75
|
this.refocus();
|
|
73
76
|
this.measure();
|
|
@@ -161,6 +164,16 @@ let HelixHeadlessTabs = class HelixHeadlessTabs extends MixinControllerActive(He
|
|
|
161
164
|
this.resizing?.disconnect();
|
|
162
165
|
this.resizing = undefined;
|
|
163
166
|
}
|
|
167
|
+
willUpdate(changed) {
|
|
168
|
+
super.willUpdate(changed);
|
|
169
|
+
if (this.active === '' && this.childrenKnown) {
|
|
170
|
+
const tabs = this.tabs;
|
|
171
|
+
const shown = tabs.find((tab) => tab.selected) ?? this.resolveActive(tabs);
|
|
172
|
+
if (shown) {
|
|
173
|
+
this.active = shown.value;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
164
177
|
firstUpdated(changed) {
|
|
165
178
|
super.firstUpdated(changed);
|
|
166
179
|
this.sync();
|
package/dist/tabs/tab/tab.d.ts
CHANGED
|
@@ -112,6 +112,12 @@ export declare class HelixHeadlessTab extends HelixHeadlessTab_base {
|
|
|
112
112
|
* which changes nothing and so re-renders nothing.
|
|
113
113
|
*/
|
|
114
114
|
protected firstUpdated(changed: PropertyValues): void;
|
|
115
|
+
/**
|
|
116
|
+
* Presses the tab, as `click()` presses a native button: passed to the
|
|
117
|
+
* control inside, which is what answers a click, so a script's `click()`
|
|
118
|
+
* selects the tab, or follows its link, once.
|
|
119
|
+
*/
|
|
120
|
+
click(): void;
|
|
115
121
|
protected render(): TemplateResult;
|
|
116
122
|
}
|
|
117
123
|
declare global {
|
package/dist/tabs/tab/tab.js
CHANGED
|
@@ -67,6 +67,15 @@ let HelixHeadlessTab = class HelixHeadlessTab extends MixinDismissible(MixinSele
|
|
|
67
67
|
super.firstUpdated(changed);
|
|
68
68
|
this.finishHydration();
|
|
69
69
|
}
|
|
70
|
+
click() {
|
|
71
|
+
const control = this.partNamed('tab');
|
|
72
|
+
if (control) {
|
|
73
|
+
control.click();
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
super.click();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
70
79
|
render() {
|
|
71
80
|
const tabindex = this.selected || !this.childrenKnown ? '0' : '-1';
|
|
72
81
|
const shortcut = this.dismissible && !this.disabled ? 'Delete' : nothing;
|
|
@@ -353,6 +353,7 @@ let HelixHeadlessTooltip = class HelixHeadlessTooltip extends MixinControllerOpe
|
|
|
353
353
|
hostAria(this.internals, {
|
|
354
354
|
describedBy: this.hasContent ? [bubble] : [],
|
|
355
355
|
label: this.describedText,
|
|
356
|
+
role: 'none',
|
|
356
357
|
});
|
|
357
358
|
this.internals.ariaHidden = this.for !== '' && !this.open ? 'true' : null;
|
|
358
359
|
}
|