@voidable/ui 0.6.0 → 0.8.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/README.md +168 -9
- package/dist/angular/index.d.ts +20 -0
- package/dist/angular/index.js +78 -0
- package/dist/autoloader-core.d.ts +45 -0
- package/dist/autoloader-table.generated.d.ts +5 -0
- package/dist/autoloader.d.ts +13 -0
- package/dist/autoloader.js +229 -0
- package/dist/base.d.ts +173 -2
- package/dist/base.js +2 -9
- package/dist/chunks/base-CMruMbxC.js +824 -0
- package/dist/chunks/{decorate-DKuCkHK4.js → decorate-CaYbmmmm.js} +1 -1
- package/dist/chunks/disclosure-Bj_49GcC.js +23 -0
- package/dist/chunks/dismiss-Drsy_dE5.js +37 -0
- package/dist/chunks/form-control-C0vH6gii.js +300 -0
- package/dist/chunks/keyboard-MQpfTX5I.js +46 -0
- package/dist/chunks/keyboard-activation-CV0m4hkn.js +29 -0
- package/dist/chunks/modal-D_YVy2vg.js +71 -0
- package/dist/chunks/overlay-BywGMcDW.js +467 -0
- package/dist/chunks/parts-D30c8OoG.js +229 -0
- package/dist/chunks/{shape-DmgCwYvY.js → shape-C_LW7EjG.js} +12 -4
- package/dist/components/accordion.d.ts +38 -10
- package/dist/components/accordion.js +52 -54
- package/dist/components/action-input.d.ts +64 -6
- package/dist/components/action-input.js +85 -42
- package/dist/components/alert.d.ts +24 -10
- package/dist/components/alert.js +27 -28
- package/dist/components/avatar.d.ts +8 -2
- package/dist/components/avatar.js +4 -4
- package/dist/components/badge.d.ts +8 -3
- package/dist/components/badge.js +3 -3
- package/dist/components/banner.d.ts +21 -10
- package/dist/components/banner.js +28 -28
- package/dist/components/bar-chart.d.ts +30 -6
- package/dist/components/bar-chart.js +29 -39
- package/dist/components/breadcrumbs.d.ts +19 -6
- package/dist/components/breadcrumbs.js +17 -23
- package/dist/components/button.d.ts +64 -10
- package/dist/components/button.js +71 -27
- package/dist/components/calendar.d.ts +65 -10
- package/dist/components/calendar.js +158 -107
- package/dist/components/card.d.ts +14 -9
- package/dist/components/card.js +9 -23
- package/dist/components/carousel.d.ts +65 -14
- package/dist/components/carousel.js +85 -94
- package/dist/components/charts/scale.d.ts +0 -1
- package/dist/components/charts/shape.d.ts +0 -1
- package/dist/components/checkbox-group.d.ts +38 -5
- package/dist/components/checkbox-group.js +61 -20
- package/dist/components/checkbox.d.ts +53 -7
- package/dist/components/checkbox.js +66 -29
- package/dist/components/collapsible.d.ts +29 -9
- package/dist/components/collapsible.js +43 -45
- package/dist/components/color-picker.d.ts +20 -4
- package/dist/components/color-picker.js +36 -30
- package/dist/components/combobox.d.ts +84 -10
- package/dist/components/combobox.js +142 -45
- package/dist/components/compose-input.d.ts +8 -1
- package/dist/components/compose-input.js +10 -4
- package/dist/components/dialog.d.ts +24 -20
- package/dist/components/dialog.js +8 -57
- package/dist/components/divider.d.ts +8 -1
- package/dist/components/divider.js +4 -4
- package/dist/components/donut-chart.d.ts +28 -5
- package/dist/components/donut-chart.js +55 -54
- package/dist/components/drawer.d.ts +19 -18
- package/dist/components/drawer.js +9 -53
- package/dist/components/dropdown-menu.d.ts +62 -7
- package/dist/components/dropdown-menu.js +125 -34
- package/dist/components/editable.d.ts +37 -3
- package/dist/components/editable.js +45 -24
- package/dist/components/error-fallback.d.ts +36 -5
- package/dist/components/error-fallback.js +74 -24
- package/dist/components/field.d.ts +38 -4
- package/dist/components/field.js +63 -21
- package/dist/components/file-upload.d.ts +23 -2
- package/dist/components/file-upload.js +48 -25
- package/dist/components/gauge.d.ts +48 -9
- package/dist/components/gauge.js +57 -55
- package/dist/components/hamburger.d.ts +19 -4
- package/dist/components/hamburger.js +29 -20
- package/dist/components/hover-card.d.ts +40 -14
- package/dist/components/hover-card.js +77 -60
- package/dist/components/indicator.d.ts +18 -7
- package/dist/components/indicator.js +17 -19
- package/dist/components/input.d.ts +70 -5
- package/dist/components/input.js +84 -21
- package/dist/components/line-chart.d.ts +27 -5
- package/dist/components/line-chart.js +19 -21
- package/dist/components/list.d.ts +10 -1
- package/dist/components/list.js +4 -4
- package/dist/components/menu.d.ts +67 -21
- package/dist/components/menu.js +117 -116
- package/dist/components/multiselect.d.ts +108 -13
- package/dist/components/multiselect.js +207 -70
- package/dist/components/nav-bar.d.ts +12 -7
- package/dist/components/nav-bar.js +12 -22
- package/dist/components/nav-menu.d.ts +52 -12
- package/dist/components/nav-menu.js +69 -71
- package/dist/components/number-input.d.ts +76 -8
- package/dist/components/number-input.js +117 -51
- package/dist/components/pagination.d.ts +19 -1
- package/dist/components/pagination.js +69 -8
- package/dist/components/panel.d.ts +16 -8
- package/dist/components/panel.js +21 -21
- package/dist/components/pin-input.d.ts +41 -4
- package/dist/components/pin-input.js +45 -27
- package/dist/components/popover.d.ts +29 -11
- package/dist/components/popover.js +48 -36
- package/dist/components/progress.d.ts +7 -3
- package/dist/components/progress.js +4 -4
- package/dist/components/radio-group.d.ts +30 -5
- package/dist/components/radio-group.js +56 -19
- package/dist/components/radio.d.ts +47 -7
- package/dist/components/radio.js +68 -29
- package/dist/components/scroll-area.d.ts +8 -5
- package/dist/components/scroll-area.js +19 -20
- package/dist/components/segmented-control.d.ts +52 -8
- package/dist/components/segmented-control.js +67 -37
- package/dist/components/select.d.ts +59 -12
- package/dist/components/select.js +97 -47
- package/dist/components/sidebar.d.ts +22 -3
- package/dist/components/sidebar.js +21 -11
- package/dist/components/skeleton.d.ts +5 -2
- package/dist/components/skeleton.js +5 -5
- package/dist/components/slider.d.ts +27 -5
- package/dist/components/slider.js +30 -18
- package/dist/components/spinner.d.ts +6 -2
- package/dist/components/spinner.js +4 -4
- package/dist/components/stat.d.ts +21 -4
- package/dist/components/stat.js +8 -4
- package/dist/components/status-dot.d.ts +4 -1
- package/dist/components/status-dot.js +4 -4
- package/dist/components/stepper.d.ts +5 -1
- package/dist/components/stepper.js +3 -3
- package/dist/components/switch.d.ts +24 -5
- package/dist/components/switch.js +38 -20
- package/dist/components/table.d.ts +51 -2
- package/dist/components/table.js +158 -9
- package/dist/components/tabs.d.ts +49 -17
- package/dist/components/tabs.js +86 -55
- package/dist/components/tag.d.ts +17 -7
- package/dist/components/tag.js +19 -21
- package/dist/components/tags-input.d.ts +33 -4
- package/dist/components/tags-input.js +41 -31
- package/dist/components/textarea.d.ts +61 -5
- package/dist/components/textarea.js +59 -22
- package/dist/components/toast.d.ts +89 -15
- package/dist/components/toast.js +106 -31
- package/dist/components/toggle-group.d.ts +30 -3
- package/dist/components/toggle-group.js +44 -17
- package/dist/components/toggle.d.ts +25 -4
- package/dist/components/toggle.js +29 -19
- package/dist/components/tooltip.d.ts +31 -12
- package/dist/components/tooltip.js +63 -29
- package/dist/components.json +1518 -0
- package/dist/custom-elements.json +31817 -0
- package/dist/dev/index.d.ts +40 -0
- package/dist/dev/rules.d.ts +46 -0
- package/dist/dev/table.generated.d.ts +8 -0
- package/dist/dev/types.d.ts +113 -0
- package/dist/dev.js +3364 -0
- package/dist/disclosure.d.ts +30 -0
- package/dist/dismiss.d.ts +20 -0
- package/dist/form-control.d.ts +92 -0
- package/dist/index.d.ts +5 -4
- package/dist/index.js +24 -24
- package/dist/keyboard-activation.d.ts +31 -0
- package/dist/keyboard.d.ts +32 -0
- package/dist/modal.d.ts +44 -0
- package/dist/overlay.d.ts +249 -0
- package/dist/parts.d.ts +171 -0
- package/dist/projection.d.ts +370 -0
- package/dist/types/elements.d.ts +648 -0
- package/dist/types/react.d.ts +163 -0
- package/dist/types/solid.d.ts +164 -0
- package/dist/types/solid2.d.ts +161 -0
- package/dist/types/svelte.d.ts +154 -0
- package/dist/types/vue.d.ts +156 -0
- package/dist/vscode.html-custom-data.json +6004 -0
- package/dist/web-types.json +8365 -0
- package/package.json +113 -25
- package/dist/base.d.ts.map +0 -1
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/action-input.d.ts.map +0 -1
- package/dist/components/alert.d.ts.map +0 -1
- package/dist/components/avatar.d.ts.map +0 -1
- package/dist/components/badge.d.ts.map +0 -1
- package/dist/components/banner.d.ts.map +0 -1
- package/dist/components/bar-chart.d.ts.map +0 -1
- package/dist/components/breadcrumbs.d.ts.map +0 -1
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/calendar.d.ts.map +0 -1
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/carousel.d.ts.map +0 -1
- package/dist/components/charts/scale.d.ts.map +0 -1
- package/dist/components/charts/shape.d.ts.map +0 -1
- package/dist/components/checkbox-group.d.ts.map +0 -1
- package/dist/components/checkbox.d.ts.map +0 -1
- package/dist/components/collapsible.d.ts.map +0 -1
- package/dist/components/color-picker.d.ts.map +0 -1
- package/dist/components/combobox.d.ts.map +0 -1
- package/dist/components/compose-input.d.ts.map +0 -1
- package/dist/components/dialog.d.ts.map +0 -1
- package/dist/components/divider.d.ts.map +0 -1
- package/dist/components/donut-chart.d.ts.map +0 -1
- package/dist/components/drawer.d.ts.map +0 -1
- package/dist/components/dropdown-menu.d.ts.map +0 -1
- package/dist/components/editable.d.ts.map +0 -1
- package/dist/components/error-fallback.d.ts.map +0 -1
- package/dist/components/field.d.ts.map +0 -1
- package/dist/components/file-upload.d.ts.map +0 -1
- package/dist/components/gauge.d.ts.map +0 -1
- package/dist/components/hamburger.d.ts.map +0 -1
- package/dist/components/hover-card.d.ts.map +0 -1
- package/dist/components/indicator.d.ts.map +0 -1
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/line-chart.d.ts.map +0 -1
- package/dist/components/list.d.ts.map +0 -1
- package/dist/components/menu.d.ts.map +0 -1
- package/dist/components/multiselect.d.ts.map +0 -1
- package/dist/components/nav-bar.d.ts.map +0 -1
- package/dist/components/nav-menu.d.ts.map +0 -1
- package/dist/components/number-input.d.ts.map +0 -1
- package/dist/components/pagination.d.ts.map +0 -1
- package/dist/components/panel.d.ts.map +0 -1
- package/dist/components/pin-input.d.ts.map +0 -1
- package/dist/components/popover.d.ts.map +0 -1
- package/dist/components/progress.d.ts.map +0 -1
- package/dist/components/radio-group.d.ts.map +0 -1
- package/dist/components/radio.d.ts.map +0 -1
- package/dist/components/scroll-area.d.ts.map +0 -1
- package/dist/components/segmented-control.d.ts.map +0 -1
- package/dist/components/select.d.ts.map +0 -1
- package/dist/components/sidebar.d.ts.map +0 -1
- package/dist/components/skeleton.d.ts.map +0 -1
- package/dist/components/slider.d.ts.map +0 -1
- package/dist/components/spinner.d.ts.map +0 -1
- package/dist/components/stat.d.ts.map +0 -1
- package/dist/components/status-dot.d.ts.map +0 -1
- package/dist/components/stepper.d.ts.map +0 -1
- package/dist/components/switch.d.ts.map +0 -1
- package/dist/components/table.d.ts.map +0 -1
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tag.d.ts.map +0 -1
- package/dist/components/tags-input.d.ts.map +0 -1
- package/dist/components/textarea.d.ts.map +0 -1
- package/dist/components/toast.d.ts.map +0 -1
- package/dist/components/toggle-group.d.ts.map +0 -1
- package/dist/components/toggle.d.ts.map +0 -1
- package/dist/components/tooltip.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- /package/dist/chunks/{scale-BFZNL3Ss.js → scale-_ccSuoYg.js} +0 -0
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
2
|
/** User identity display for comment threads, user lists, and profile cards; falls back to initials when no image is provided. */
|
|
3
3
|
export declare class VoidAvatar extends VoidElement {
|
|
4
|
+
/** URL of the image. When it is empty, or the image fails to load, the avatar shows `initials` instead. */
|
|
4
5
|
src: string;
|
|
6
|
+
/**
|
|
7
|
+
* Accessible name of the avatar, normally the person's name. Without it the name falls back to
|
|
8
|
+
* `initials`.
|
|
9
|
+
*/
|
|
5
10
|
alt: string;
|
|
11
|
+
/** One to three letters shown when there is no image. Used as the accessible name when `alt` is empty. */
|
|
6
12
|
initials: string;
|
|
7
|
-
|
|
13
|
+
/** Size step: `sm`, `md` (default) or `lg`. */
|
|
14
|
+
size: 'sm' | 'md' | 'lg';
|
|
8
15
|
connectedCallback(): void;
|
|
9
16
|
updated(changed: Map<string, unknown>): void;
|
|
10
17
|
render(): import('lit').TemplateResult<1>;
|
|
@@ -15,4 +22,3 @@ declare global {
|
|
|
15
22
|
'void-avatar': VoidAvatar;
|
|
16
23
|
}
|
|
17
24
|
}
|
|
18
|
-
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../chunks/decorate-
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
|
+
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { html as n } from "lit";
|
|
4
4
|
import { property as r } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/avatar.ts
|
|
@@ -10,10 +10,10 @@ var i = class extends e {
|
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
12
|
connectedCallback() {
|
|
13
|
-
super.connectedCallback(), this.
|
|
13
|
+
super.connectedCallback(), this.setHostAttribute("role", "img"), this.setHostAttribute("aria-label", this.alt || this.initials);
|
|
14
14
|
}
|
|
15
15
|
updated(e) {
|
|
16
|
-
(e.has("alt") || e.has("initials")) && this.
|
|
16
|
+
(e.has("alt") || e.has("initials")) && this.setHostAttribute("aria-label", this.alt || this.initials);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
return this.src ? n`<img src="${this.src}" alt="${this.alt}" @error="${this._onImgError}" />` : this.initials ? n`<span class="void-avatar-initials">${this.initials}</span>` : n``;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
2
|
/** Small status chip for issue trackers, tag systems, and categorization UIs where color conveys state at a glance. */
|
|
3
3
|
export declare class VoidBadge extends VoidElement {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Status colour: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`.
|
|
6
|
+
* Colour carries the state, so also say the state in the badge text.
|
|
7
|
+
*/
|
|
8
|
+
color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
|
|
9
|
+
/** `filled` (default) fills the badge with its colour; `outline` draws only a border and tinted text. */
|
|
5
10
|
variant: 'filled' | 'outline';
|
|
6
|
-
|
|
11
|
+
/** Size step: `sm`, `md` (default) or `lg`. */
|
|
12
|
+
size: 'sm' | 'md' | 'lg';
|
|
7
13
|
connectedCallback(): void;
|
|
8
14
|
}
|
|
9
15
|
declare global {
|
|
@@ -11,4 +17,3 @@ declare global {
|
|
|
11
17
|
'void-badge': VoidBadge;
|
|
12
18
|
}
|
|
13
19
|
}
|
|
14
|
-
//# sourceMappingURL=badge.d.ts.map
|
package/dist/components/badge.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../chunks/decorate-
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
|
+
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
3
|
import { property as n } from "lit/decorators.js";
|
|
4
4
|
//#region src/components/badge.ts
|
|
5
5
|
var r = class extends e {
|
|
@@ -7,7 +7,7 @@ var r = class extends e {
|
|
|
7
7
|
super(...e), this.color = "default", this.variant = "filled", this.size = "md";
|
|
8
8
|
}
|
|
9
9
|
connectedCallback() {
|
|
10
|
-
super.connectedCallback(), this.
|
|
10
|
+
super.connectedCallback(), this.setHostAttribute("role", "status");
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
t([n({
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { nothing } from 'lit';
|
|
2
1
|
import { VoidElement } from '../base.js';
|
|
3
|
-
|
|
2
|
+
import { PartsController } from '../parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Full-width site-level announcement for maintenance windows, cookie consent, and promotional messaging.
|
|
5
|
+
*
|
|
6
|
+
* Its text is written as parts: an optional `<void-banner-title>`, the `<void-banner-description>`, an optional
|
|
7
|
+
* `<void-banner-actions>` (buttons or links) and an optional `<void-banner-close>`. The parts are never moved. The
|
|
8
|
+
* close part wraps the one control the author writes (a `<void-button aria-label="Dismiss">`); pressing it fires
|
|
9
|
+
* `void-close` and removes the banner (focus inside it moves on to the next focusable element). Without a close part the banner cannot be dismissed.
|
|
10
|
+
*
|
|
11
|
+
* @fires {CustomEvent<{ reason: 'close-button' }>} void-close - The close part was pressed; the banner removes itself
|
|
12
|
+
* afterwards unless a listener cancels the event. Does not bubble.
|
|
13
|
+
*/
|
|
4
14
|
export declare class VoidBanner extends VoidElement {
|
|
5
|
-
|
|
6
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Status colour of the announcement: `default`, `error`, `warning`, `caution`, `success`, `info`,
|
|
17
|
+
* `notice` or `highlight`.
|
|
18
|
+
*/
|
|
19
|
+
color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
|
|
20
|
+
/** `subtle` (default) tints the background; `filled` fills it with the status colour. */
|
|
7
21
|
variant: 'subtle' | 'filled';
|
|
8
|
-
|
|
9
|
-
private _didSetup;
|
|
22
|
+
protected readonly _parts: PartsController;
|
|
10
23
|
connectedCallback(): void;
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
render(): typeof nothing | import('lit').TemplateResult<1>;
|
|
24
|
+
disconnectedCallback(): void;
|
|
25
|
+
private _onClick;
|
|
14
26
|
}
|
|
15
27
|
declare global {
|
|
16
28
|
interface HTMLElementTagNameMap {
|
|
17
29
|
'void-banner': VoidBanner;
|
|
18
30
|
}
|
|
19
31
|
}
|
|
20
|
-
//# sourceMappingURL=banner.d.ts.map
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../chunks/decorate-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
|
+
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
+
import { n } from "../chunks/parts-D30c8OoG.js";
|
|
4
|
+
import { n as r, t as i } from "../chunks/dismiss-Drsy_dE5.js";
|
|
5
|
+
import { property as a } from "lit/decorators.js";
|
|
5
6
|
//#region src/components/banner.ts
|
|
6
|
-
var
|
|
7
|
+
var o = class extends e {
|
|
7
8
|
constructor(...e) {
|
|
8
|
-
super(...e), this.color = "default", this.
|
|
9
|
+
super(...e), this.color = "default", this.variant = "subtle", this._parts = new n(this, {
|
|
10
|
+
tags: [
|
|
11
|
+
"void-banner-title",
|
|
12
|
+
"void-banner-description",
|
|
13
|
+
"void-banner-actions",
|
|
14
|
+
"void-banner-close"
|
|
15
|
+
],
|
|
16
|
+
onChange: () => void 0
|
|
17
|
+
}), this._onClick = (e) => {
|
|
18
|
+
i(this._parts.one("void-banner-close"), e) && this.dispatchEvent(new CustomEvent("void-close", {
|
|
19
|
+
bubbles: !1,
|
|
20
|
+
cancelable: !0,
|
|
21
|
+
detail: { reason: "close-button" }
|
|
22
|
+
})) && r(this);
|
|
23
|
+
};
|
|
9
24
|
}
|
|
10
25
|
connectedCallback() {
|
|
11
|
-
super.connectedCallback(), this.
|
|
26
|
+
super.connectedCallback(), this.setHostAttribute("role", "banner"), this.addEventListener("click", this._onClick);
|
|
12
27
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
this._didSetup = !0;
|
|
16
|
-
for (let e of this._userContent) this.appendChild(e);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
_close() {
|
|
20
|
-
this.dispatchEvent(new CustomEvent("void-close", {
|
|
21
|
-
bubbles: !0,
|
|
22
|
-
composed: !0
|
|
23
|
-
})), this.remove();
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return this.dismissable ? n`<button type="button" class="void-banner-close" aria-label="Close" @click="${this._close}">×</button>` : r;
|
|
28
|
+
disconnectedCallback() {
|
|
29
|
+
super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
|
|
27
30
|
}
|
|
28
31
|
};
|
|
29
|
-
t([
|
|
32
|
+
t([a({
|
|
30
33
|
type: String,
|
|
31
34
|
reflect: !0
|
|
32
|
-
})],
|
|
33
|
-
type: Boolean,
|
|
34
|
-
reflect: !0
|
|
35
|
-
})], a.prototype, "dismissable", void 0), t([i({
|
|
35
|
+
})], o.prototype, "color", void 0), t([a({
|
|
36
36
|
type: String,
|
|
37
37
|
reflect: !0
|
|
38
|
-
})],
|
|
38
|
+
})], o.prototype, "variant", void 0), customElements.get("void-banner") || customElements.define("void-banner", o);
|
|
39
39
|
//#endregion
|
|
40
|
-
export {
|
|
40
|
+
export { o as VoidBanner };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VoidElement } from '../base.js';
|
|
2
2
|
export interface BarChartSeries {
|
|
3
3
|
name: string;
|
|
4
4
|
values: number[];
|
|
@@ -13,14 +13,39 @@ export interface BarChartData {
|
|
|
13
13
|
series: BarChartSeries[];
|
|
14
14
|
labels?: string[];
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Bar chart for comparing categories and series, drawn in SVG with animated bars. Give it `data`
|
|
18
|
+
* (`{ series: [{ name, values }], labels }`) from script; it has no children. The chart is an image to
|
|
19
|
+
* assistive technology, so set `aria-label` and state the key figures in the surrounding text.
|
|
20
|
+
*/
|
|
21
|
+
export declare class VoidBarChart extends VoidElement {
|
|
22
|
+
/** Height of the chart in pixels. Defaults to 220. The width fills the container. */
|
|
18
23
|
height: number;
|
|
19
|
-
|
|
24
|
+
/** Print each bar's value above it (below it for a negative value), abbreviated above 1000 (`1.2k`). */
|
|
25
|
+
showValue: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* How bars are drawn: `filled` (default, solid), `outline` (tinted fill with a border) or `wireframe`
|
|
28
|
+
* (border only).
|
|
29
|
+
*/
|
|
20
30
|
variant: 'filled' | 'outline' | 'wireframe';
|
|
31
|
+
/**
|
|
32
|
+
* Accessible name of the chart, such as `Revenue by quarter`. The chart is an image to assistive
|
|
33
|
+
* technology, so set it and put the key figures in the text around it.
|
|
34
|
+
*/
|
|
21
35
|
ariaLabel: string;
|
|
22
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Delay in milliseconds between the bars as they animate in, one after another. Without it the theme's
|
|
38
|
+
* `--void-stagger-chart-bars` applies; `stagger="0"` animates them together.
|
|
39
|
+
*/
|
|
40
|
+
stagger: number | null;
|
|
23
41
|
private _data;
|
|
42
|
+
/**
|
|
43
|
+
* The chart's data: `{ series: [{ name, values, color?, colors? }], labels? }`. `values` are aligned with
|
|
44
|
+
* `labels` (the category names along the axis); `color` colours a whole series and `colors` overrides single
|
|
45
|
+
* bars. Negative values are bars below a zero baseline: the value axis then spans the lowest value as
|
|
46
|
+
* well, and a baseline is drawn at zero. Property only: assign a new object to update the chart and
|
|
47
|
+
* animate to it.
|
|
48
|
+
*/
|
|
24
49
|
get data(): BarChartData;
|
|
25
50
|
set data(next: BarChartData);
|
|
26
51
|
private _phase;
|
|
@@ -44,4 +69,3 @@ declare global {
|
|
|
44
69
|
'void-bar-chart': VoidBarChart;
|
|
45
70
|
}
|
|
46
71
|
}
|
|
47
|
-
//# sourceMappingURL=bar-chart.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { t as e } from "../chunks/
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
|
+
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
+
import { n, t as r } from "../chunks/scale-_ccSuoYg.js";
|
|
4
|
+
import { html as i, nothing as a, svg as o } from "lit";
|
|
4
5
|
import { property as s, state as c } from "lit/decorators.js";
|
|
5
6
|
//#region src/components/bar-chart.ts
|
|
6
7
|
function l(e) {
|
|
@@ -17,9 +18,9 @@ function f(e) {
|
|
|
17
18
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
18
19
|
return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
|
|
19
20
|
}
|
|
20
|
-
var p = class extends
|
|
21
|
+
var p = class extends e {
|
|
21
22
|
constructor(...e) {
|
|
22
|
-
super(...e), this.height = 220, this.
|
|
23
|
+
super(...e), this.height = 220, this.showValue = !1, this.variant = "filled", this.ariaLabel = "", this.stagger = null, this._data = { series: [] }, this._phase = "pre", this._display = /* @__PURE__ */ new Map(), this._targets = /* @__PURE__ */ new Map(), this._animFrom = /* @__PURE__ */ new Map(), this._animStart = 0, this._animDuration = 0, this._staggerMs = 0, this._rafHandle = 0, this._tick = (e) => {
|
|
23
24
|
let t = e - this._animStart, n = !1;
|
|
24
25
|
for (let [e, r] of this._targets) {
|
|
25
26
|
let [, i] = e.split("-"), a = Number(i) * this._staggerMs, o = a + this._animDuration, s = this._animFrom.get(e) ?? 0;
|
|
@@ -33,9 +34,6 @@ var p = class extends r {
|
|
|
33
34
|
this.requestUpdate(), n ? this._rafHandle = requestAnimationFrame(this._tick) : this._phase = "idle";
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
|
-
createRenderRoot() {
|
|
37
|
-
return this;
|
|
38
|
-
}
|
|
39
37
|
get data() {
|
|
40
38
|
return this._data;
|
|
41
39
|
}
|
|
@@ -48,11 +46,11 @@ var p = class extends r {
|
|
|
48
46
|
}
|
|
49
47
|
_refreshTargets() {
|
|
50
48
|
this._targets.clear(), this._data.series.forEach((e, t) => {
|
|
51
|
-
e.values.forEach((e, n) => this._targets.set(this._key(t, n), e));
|
|
49
|
+
e.values.forEach((e, n) => this._targets.set(this._key(t, n), Number.isFinite(e) ? e : 0));
|
|
52
50
|
});
|
|
53
51
|
}
|
|
54
52
|
connectedCallback() {
|
|
55
|
-
super.connectedCallback(), this.
|
|
53
|
+
super.connectedCallback(), this.setHostAttribute("role", "img"), this._refreshTargets(), requestAnimationFrame(() => {
|
|
56
54
|
this._startAnimation(/* @__PURE__ */ new Map());
|
|
57
55
|
});
|
|
58
56
|
}
|
|
@@ -62,16 +60,16 @@ var p = class extends r {
|
|
|
62
60
|
_startAnimation(e) {
|
|
63
61
|
cancelAnimationFrame(this._rafHandle);
|
|
64
62
|
let t = getComputedStyle(this), n = t.getPropertyValue("--void-anim-scale").trim(), r = n === "" ? 1 : parseFloat(n), i = parseFloat(t.getPropertyValue("--void-duration-chart-enter")) || 700, a = parseFloat(t.getPropertyValue("--void-stagger-chart-bars")) || 40;
|
|
65
|
-
if (this._animDuration = i * r, this.stagger ===
|
|
63
|
+
if (this._animDuration = i * r, this.stagger === null || Number.isNaN(this.stagger) ? this._staggerMs = a * r : this._staggerMs = this.stagger * r, this._animFrom = e, this._animStart = performance.now(), this._animDuration <= 0) {
|
|
66
64
|
this._display = new Map(this._targets), this._phase = "idle", this.requestUpdate();
|
|
67
65
|
return;
|
|
68
66
|
}
|
|
69
67
|
this._phase = "animating", this._rafHandle = requestAnimationFrame(this._tick);
|
|
70
68
|
}
|
|
71
69
|
render() {
|
|
72
|
-
let { series: e, labels:
|
|
73
|
-
if (e.length === 0) return i`<svg viewBox="0 0 600 ${this.height}" aria-label=${this.ariaLabel}></svg>`;
|
|
74
|
-
let s = this.height - 16 - 32, c = Math.max(...e.map((e) => e.values.length)), l = e.flatMap((e) => e.values), p =
|
|
70
|
+
let { series: e, labels: t = [] } = this._data;
|
|
71
|
+
if (e.length === 0) return i`<svg viewBox="0 0 600 ${this.height}" role="img" aria-label=${this.ariaLabel || "Bar chart"}></svg>`;
|
|
72
|
+
let s = this.height - 16 - 32, c = Math.max(...e.map((e) => e.values.length)), l = e.flatMap((e) => e.values).filter(Number.isFinite), p = Math.max(...l, 0), m = Math.min(...l, 0), h = m < 0 ? -f(-m * 1.1) : 0, g = new n([h, p > 0 || h === 0 ? f(p * 1.1) || 1 : 0], [16 + s, 16]), _ = g.scale(0), v = new r(c, [40, 584], .2), y = g.ticks(5);
|
|
75
73
|
return i`
|
|
76
74
|
<svg
|
|
77
75
|
viewBox="0 0 600 ${this.height}"
|
|
@@ -81,25 +79,27 @@ var p = class extends r {
|
|
|
81
79
|
data-phase=${this._phase}
|
|
82
80
|
>
|
|
83
81
|
<g class="void-bar-chart-grid">
|
|
84
|
-
${
|
|
85
|
-
let t =
|
|
82
|
+
${y.map((e) => {
|
|
83
|
+
let t = g.scale(e);
|
|
86
84
|
return o`<line x1=${40} x2=${584} y1=${t} y2=${t}></line>`;
|
|
87
85
|
})}
|
|
88
86
|
</g>
|
|
89
87
|
|
|
88
|
+
${h < 0 ? o`<line class="void-bar-chart-baseline" x1=${40} x2=${584} y1=${_} y2=${_}></line>` : a}
|
|
89
|
+
|
|
90
90
|
<g class="void-bar-chart-y-axis">
|
|
91
|
-
${
|
|
91
|
+
${y.map((e) => o`<text x=${32} y=${g.scale(e)} dy="0.32em" text-anchor="end">${u(e)}</text>`)}
|
|
92
92
|
</g>
|
|
93
93
|
|
|
94
94
|
${e.map((t, n) => {
|
|
95
|
-
let r = t.color ?? `var(--void-chart-series-${n % 6 + 1})`, i =
|
|
95
|
+
let r = t.color ?? `var(--void-chart-series-${n % 6 + 1})`, i = v.bandwidth / e.length;
|
|
96
96
|
return o`
|
|
97
97
|
<g class="void-bar-chart-series" style="--series-color: ${r}">
|
|
98
98
|
${t.values.map((e, r) => {
|
|
99
|
-
let
|
|
99
|
+
let s = this._display.get(this._key(n, r)) ?? 0, c = v.scale(r) + i * n, l = g.scale(s), u = Math.min(l, _), d = Math.abs(_ - l), f = t.colors?.[r];
|
|
100
100
|
return o`<rect
|
|
101
101
|
class="void-bar-chart-bar"
|
|
102
|
-
x=${
|
|
102
|
+
x=${c}
|
|
103
103
|
y=${u}
|
|
104
104
|
width=${i - 2}
|
|
105
105
|
height=${d}
|
|
@@ -110,42 +110,32 @@ var p = class extends r {
|
|
|
110
110
|
`;
|
|
111
111
|
})}
|
|
112
112
|
|
|
113
|
-
${this.
|
|
114
|
-
let r =
|
|
113
|
+
${this.showValue ? e.map((t, n) => {
|
|
114
|
+
let r = v.bandwidth / e.length;
|
|
115
115
|
return o`
|
|
116
116
|
<g class="void-bar-chart-values">
|
|
117
117
|
${t.values.map((e, t) => {
|
|
118
|
-
let i = this._display.get(this._key(n, t)) ?? 0;
|
|
119
|
-
return o`<text x=${
|
|
118
|
+
let i = this._display.get(this._key(n, t)) ?? 0, a = v.scale(t) + r * n + (r - 2) / 2, s = g.scale(i);
|
|
119
|
+
return o`<text x=${a} y=${i < 0 ? s + 14 : s - 6} text-anchor="middle">${d(i)}</text>`;
|
|
120
120
|
})}
|
|
121
121
|
</g>
|
|
122
122
|
`;
|
|
123
123
|
}) : a}
|
|
124
124
|
|
|
125
125
|
<g class="void-bar-chart-x-axis">
|
|
126
|
-
${
|
|
126
|
+
${t.slice(0, c).map((e, t) => o`<text x=${v.scale(t) + v.bandwidth / 2} y=${16 + s + 18} text-anchor="middle">${e}</text>`)}
|
|
127
127
|
</g>
|
|
128
128
|
</svg>
|
|
129
129
|
`;
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
t([s({
|
|
133
133
|
type: Number,
|
|
134
134
|
reflect: !0
|
|
135
|
-
})], p.prototype, "height", void 0),
|
|
135
|
+
})], p.prototype, "height", void 0), t([s({
|
|
136
136
|
type: Boolean,
|
|
137
|
-
attribute: "show-
|
|
137
|
+
attribute: "show-value",
|
|
138
138
|
reflect: !0
|
|
139
|
-
})], p.prototype, "
|
|
140
|
-
fromAttribute(e) {
|
|
141
|
-
if (e === null || e === "" || e === "true") return !0;
|
|
142
|
-
if (e === "false") return !1;
|
|
143
|
-
let t = Number(e);
|
|
144
|
-
return isNaN(t) ? !0 : t;
|
|
145
|
-
},
|
|
146
|
-
toAttribute(e) {
|
|
147
|
-
return e === !0 ? "" : e === !1 ? "false" : String(e);
|
|
148
|
-
}
|
|
149
|
-
} })], p.prototype, "stagger", void 0), e([c()], p.prototype, "_phase", void 0), customElements.get("void-bar-chart") || customElements.define("void-bar-chart", p);
|
|
139
|
+
})], p.prototype, "showValue", void 0), t([s({ reflect: !0 })], p.prototype, "variant", void 0), t([s({ attribute: "aria-label" })], p.prototype, "ariaLabel", void 0), t([s({ type: Number })], p.prototype, "stagger", void 0), t([c()], p.prototype, "_phase", void 0), customElements.get("void-bar-chart") || customElements.define("void-bar-chart", p);
|
|
150
140
|
//#endregion
|
|
151
141
|
export { p as VoidBarChart };
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
|
-
|
|
2
|
+
import { PartsController } from '../parts.js';
|
|
3
|
+
/**
|
|
4
|
+
* Navigation trail for deep page hierarchies in dashboards, e-commerce category trees, and file browsers.
|
|
5
|
+
*
|
|
6
|
+
* A navigation landmark named "Breadcrumb" holding an ordered list, as in the ARIA Authoring Practices breadcrumb
|
|
7
|
+
* pattern: write one `<void-breadcrumbs-list>` and, in it, one `<void-breadcrumbs-item>` per crumb, each holding a
|
|
8
|
+
* link (or plain text for the page you are on). Mark the current page with `aria-current="page"` on its item. The
|
|
9
|
+
* list and the items are CSS-only parts; the component gives them `role="list"` and `role="listitem"` (so a screen
|
|
10
|
+
* reader says "list, 3 items" and "2 of 3"), also for items added, removed or reordered later. It renders nothing of
|
|
11
|
+
* its own: the separators are drawn by the theme between the items and are not exposed to assistive technology.
|
|
12
|
+
*/
|
|
3
13
|
export declare class VoidBreadcrumbs extends VoidElement {
|
|
14
|
+
/**
|
|
15
|
+
* Character drawn between the crumbs. Defaults to `/`. It is drawn by CSS and hidden from assistive
|
|
16
|
+
* technology.
|
|
17
|
+
*/
|
|
4
18
|
separator: string;
|
|
5
|
-
|
|
6
|
-
|
|
19
|
+
protected readonly _parts: PartsController;
|
|
20
|
+
/** Writes the list and list-item roles onto the parts: items count only inside the list part. */
|
|
21
|
+
private _wire;
|
|
7
22
|
connectedCallback(): void;
|
|
8
|
-
protected updated(
|
|
9
|
-
render(): import('lit').TemplateResult<1>;
|
|
23
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
10
24
|
}
|
|
11
25
|
declare global {
|
|
12
26
|
interface HTMLElementTagNameMap {
|
|
13
27
|
'void-breadcrumbs': VoidBreadcrumbs;
|
|
14
28
|
}
|
|
15
29
|
}
|
|
16
|
-
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../chunks/decorate-
|
|
3
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/base-CMruMbxC.js";
|
|
2
|
+
import { t } from "../chunks/decorate-CaYbmmmm.js";
|
|
3
|
+
import { n } from "../chunks/parts-D30c8OoG.js";
|
|
4
4
|
import { property as r } from "lit/decorators.js";
|
|
5
5
|
//#region src/components/breadcrumbs.ts
|
|
6
|
-
var i = class extends e {
|
|
6
|
+
var i = "void-breadcrumbs-list", a = "void-breadcrumbs-item", o = class extends e {
|
|
7
7
|
constructor(...e) {
|
|
8
|
-
super(...e), this.separator = "/", this.
|
|
8
|
+
super(...e), this.separator = "/", this._parts = new n(this, {
|
|
9
|
+
tags: [i, a],
|
|
10
|
+
onChange: () => this._wire()
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
_wire() {
|
|
14
|
+
let e = this._parts.one(i);
|
|
15
|
+
e && this._parts.set(e, "role", "list");
|
|
16
|
+
for (let t of this._parts.within(e, a)) this._parts.set(t, "role", "listitem");
|
|
9
17
|
}
|
|
10
18
|
connectedCallback() {
|
|
11
|
-
super.connectedCallback(), this.
|
|
19
|
+
super.connectedCallback(), this.setHostAttribute("role", "navigation"), this.setHostAttribute("aria-label", "Breadcrumb");
|
|
12
20
|
}
|
|
13
21
|
updated(e) {
|
|
14
|
-
|
|
15
|
-
this._didSetup = !0;
|
|
16
|
-
let e = this.querySelector(".void-breadcrumbs-list");
|
|
17
|
-
if (!e) return;
|
|
18
|
-
this._items.forEach((t, n) => {
|
|
19
|
-
let r = document.createElement("li");
|
|
20
|
-
r.className = "void-breadcrumbs-item", r.setAttribute("data-separator", this.separator), n === this._items.length - 1 && r.setAttribute("aria-current", "page"), r.appendChild(t), e.appendChild(r);
|
|
21
|
-
});
|
|
22
|
-
} else if (e.has("separator")) {
|
|
23
|
-
let e = Array.from(this.querySelectorAll(".void-breadcrumbs-item"));
|
|
24
|
-
for (let t of e) t.setAttribute("data-separator", this.separator);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return n`<ol class="void-breadcrumbs-list"></ol>`;
|
|
22
|
+
super.updated(e), e.has("separator") && this.setHostStyle("--_void-breadcrumbs-separator", JSON.stringify(this.separator));
|
|
29
23
|
}
|
|
30
24
|
};
|
|
31
|
-
t([r({ type: String })],
|
|
25
|
+
t([r({ type: String })], o.prototype, "separator", void 0), customElements.get("void-breadcrumbs") || customElements.define("void-breadcrumbs", o);
|
|
32
26
|
//#endregion
|
|
33
|
-
export {
|
|
27
|
+
export { o as VoidBreadcrumbs };
|
|
@@ -1,25 +1,79 @@
|
|
|
1
1
|
import { VoidElement } from '../base.js';
|
|
2
|
-
|
|
2
|
+
import { KeyboardActivation } from '../keyboard-activation.js';
|
|
3
|
+
/**
|
|
4
|
+
* Action trigger for forms, dialogs, and toolbars; supports semantic color variants.
|
|
5
|
+
*
|
|
6
|
+
* Holding a link or a native button (`<void-button><a href="/docs">Docs</a></void-button>`) makes it a link
|
|
7
|
+
* button: the inner element is then the one control, so the host is presentational (no role, no tab stop, no key
|
|
8
|
+
* handling) and the theme draws the button's focus ring when the inner element has focus. `disabled` on a link
|
|
9
|
+
* button sets `aria-disabled="true"` and `tabindex="-1"` on the link and stops it navigating (a link cannot be
|
|
10
|
+
* disabled); on an inner `<button>` it disables that button.
|
|
11
|
+
*/
|
|
3
12
|
export declare class VoidButton extends VoidElement {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Visual weight. `outline` (default) is a bordered button, `filled` is the
|
|
15
|
+
* primary action, and `ghost` draws no border or fill until hovered: use it
|
|
16
|
+
* for row actions, toolbars and the quiet button beside a primary one.
|
|
17
|
+
*/
|
|
18
|
+
variant: 'outline' | 'filled' | 'ghost';
|
|
19
|
+
/**
|
|
20
|
+
* Status colour: `default`, `error`, `warning`, `caution`, `success`, `info`, `notice` or `highlight`. Use `error`
|
|
21
|
+
* for a destructive action such as Delete.
|
|
22
|
+
*/
|
|
23
|
+
color: 'default' | 'error' | 'warning' | 'caution' | 'success' | 'info' | 'notice' | 'highlight';
|
|
24
|
+
/**
|
|
25
|
+
* Stop the button reacting: clicks and Enter or Space do nothing and it leaves the tab order. A button
|
|
26
|
+
* inside a `<fieldset disabled>` is disabled too.
|
|
27
|
+
*/
|
|
7
28
|
disabled: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* What it does to the surrounding form: `button` (default) nothing, `submit` submits the form (running
|
|
31
|
+
* validation), `reset` resets it. Set `submit` on the primary action of a form.
|
|
32
|
+
*/
|
|
8
33
|
type: 'button' | 'submit' | 'reset';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
34
|
+
/** Size step: `sm`, `md` (default) or `lg`. Controls of the same step share one height. */
|
|
35
|
+
size: 'sm' | 'md' | 'lg';
|
|
36
|
+
/** Watches every ancestor's `disabled` attribute (a `<fieldset disabled>`). */
|
|
37
|
+
private _unwatch;
|
|
38
|
+
/**
|
|
39
|
+
* The control of a link button: a direct child `<a href>` or `<button>` (`<void-button><a href>…</a></void-button>`).
|
|
40
|
+
* While there is one it is the only interactive element and the host is presentational.
|
|
41
|
+
*/
|
|
42
|
+
private get _control();
|
|
43
|
+
/** What the button wrote on the control while disabled, to take back off when it is enabled or replaced. */
|
|
44
|
+
private _inert;
|
|
45
|
+
private _observer;
|
|
46
|
+
private _syncQueued;
|
|
47
|
+
/**
|
|
48
|
+
* Keyboard activation is a real `click`, as on a native button: Enter on keydown, Space on keyup. A link button
|
|
49
|
+
* has no keyboard handling of its own: the inner link or button takes the keys (Enter follows the link, Space
|
|
50
|
+
* does nothing on a link), as it does when the key's target is not the host.
|
|
51
|
+
*/
|
|
52
|
+
protected readonly _activation: KeyboardActivation;
|
|
53
|
+
/** The form the button sits in. */
|
|
13
54
|
private get _form();
|
|
14
55
|
connectedCallback(): void;
|
|
15
56
|
disconnectedCallback(): void;
|
|
16
57
|
updated(changed: Map<string, unknown>): void;
|
|
58
|
+
/** True when disabled directly or via an ancestor `<fieldset disabled>`. */
|
|
59
|
+
get formDisabled(): boolean;
|
|
60
|
+
private _requestSync;
|
|
61
|
+
/** Writes the host's button semantics, or, for a link button, none and the disabled state of its control. */
|
|
62
|
+
private _syncDisabledState;
|
|
63
|
+
/**
|
|
64
|
+
* A link cannot be disabled: it is announced as disabled (`aria-disabled`), leaves the tab order, and
|
|
65
|
+
* `_handleClick` stops it navigating. A native button is disabled for real. Only what is not already there is
|
|
66
|
+
* written, and remembered so enabling takes back exactly that.
|
|
67
|
+
*/
|
|
68
|
+
private _disableControl;
|
|
69
|
+
/** Takes back what a disabled state wrote on a control that is enabled now (or no longer the control). */
|
|
70
|
+
private _release;
|
|
71
|
+
/** A click on the link or button inside a disabled button goes nowhere: not to its own listeners, not to the page. */
|
|
72
|
+
private _blockDisabledControl;
|
|
17
73
|
private _handleClick;
|
|
18
|
-
private _handleKeydown;
|
|
19
74
|
}
|
|
20
75
|
declare global {
|
|
21
76
|
interface HTMLElementTagNameMap {
|
|
22
77
|
'void-button': VoidButton;
|
|
23
78
|
}
|
|
24
79
|
}
|
|
25
|
-
//# sourceMappingURL=button.d.ts.map
|