@nvidia-elements/core 0.2.2 → 0.2.4
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/CHANGELOG.md +26 -0
- package/NOTICE.md +4 -4
- package/dist/_virtual/{_@oxc-project_runtime@0.130.0 → _@oxc-project_runtime@0.132.0}/helpers/decorate.js +1 -1
- package/dist/accordion/accordion-header.js +1 -1
- package/dist/accordion/accordion-header.js.map +1 -1
- package/dist/accordion/accordion.d.ts +4 -7
- package/dist/accordion/accordion.examples.js.map +1 -1
- package/dist/accordion/accordion.examples.json +1 -12
- package/dist/accordion/accordion.js +1 -1
- package/dist/accordion/accordion.js.map +1 -1
- package/dist/accordion/accordion2.js +41 -44
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group.d.ts +1 -1
- package/dist/alert/alert-group2.js +14 -14
- package/dist/alert/alert.d.ts +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/alert/alert.js.map +1 -1
- package/dist/alert/alert2.js +20 -20
- package/dist/avatar/avatar-group.d.ts +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar.d.ts +1 -1
- package/dist/avatar/avatar2.js +6 -6
- package/dist/badge/badge.d.ts +3 -3
- package/dist/badge/badge.js +1 -1
- package/dist/badge/badge.js.map +1 -1
- package/dist/badge/badge2.js +22 -23
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb.d.ts +1 -6
- package/dist/breadcrumb/breadcrumb.js +1 -1
- package/dist/breadcrumb/breadcrumb.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +12 -12
- package/dist/breadcrumb/breadcrumb2.js.map +1 -1
- package/dist/bundle.d.ts +14 -0
- package/dist/bundles/index.d.ts +1229 -1877
- package/dist/bundles/index.js +6 -6
- package/dist/button/button.d.ts +7 -4
- package/dist/button/button.js +1 -1
- package/dist/button/button.js.map +1 -1
- package/dist/button/button2.js +13 -13
- package/dist/button/button2.js.map +1 -1
- package/dist/button-group/button-group.d.ts +1 -1
- package/dist/button-group/button-group2.js +15 -15
- package/dist/card/card-header.js +1 -1
- package/dist/card/card-header.js.map +1 -1
- package/dist/card/card.d.ts +4 -7
- package/dist/card/card2.js +18 -18
- package/dist/card/card2.js.map +1 -1
- package/dist/chat-message/chat-message.d.ts +1 -1
- package/dist/chat-message/chat-message2.js +7 -7
- package/dist/checkbox/checkbox-group2.js +7 -7
- package/dist/checkbox/checkbox2.js +7 -7
- package/dist/color/color.d.ts +1 -1
- package/dist/color/color2.js +7 -7
- package/dist/combobox/combobox.d.ts +2 -8
- package/dist/combobox/combobox.examples.js.map +1 -1
- package/dist/combobox/combobox2.js +10 -13
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button.d.ts +1 -1
- package/dist/copy-button/copy-button2.js +11 -11
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements-jsx.d.ts +374 -646
- package/dist/custom-elements-vue.d.ts +374 -646
- package/dist/custom-elements.json +5999 -15468
- package/dist/data.html.json +322 -191
- package/dist/data.snippets.json +30 -30
- package/dist/date/date.d.ts +1 -1
- package/dist/date/date2.js +7 -7
- package/dist/datetime/datetime.d.ts +1 -1
- package/dist/datetime/datetime2.js +7 -7
- package/dist/dialog/dialog-footer.d.ts +1 -1
- package/dist/dialog/dialog-footer2.js +6 -6
- package/dist/dialog/dialog-header.d.ts +1 -1
- package/dist/dialog/dialog-header2.js +6 -6
- package/dist/dialog/dialog.d.ts +1 -1
- package/dist/dialog/dialog.examples.js.map +1 -1
- package/dist/dialog/dialog2.js +19 -19
- package/dist/divider/divider.d.ts +1 -1
- package/dist/divider/divider2.js +5 -5
- package/dist/dot/dot.d.ts +1 -1
- package/dist/dot/dot2.js +8 -8
- package/dist/drawer/drawer-content.d.ts +1 -1
- package/dist/drawer/drawer-content2.js +6 -6
- package/dist/drawer/drawer-footer.d.ts +1 -1
- package/dist/drawer/drawer-footer2.js +6 -6
- package/dist/drawer/drawer-header.d.ts +1 -1
- package/dist/drawer/drawer-header2.js +6 -6
- package/dist/drawer/drawer.d.ts +1 -1
- package/dist/drawer/drawer2.js +19 -19
- package/dist/dropdown/dropdown-footer.d.ts +1 -1
- package/dist/dropdown/dropdown-footer2.js +6 -6
- package/dist/dropdown/dropdown-header.d.ts +1 -1
- package/dist/dropdown/dropdown-header2.js +6 -6
- package/dist/dropdown/dropdown.d.ts +1 -1
- package/dist/dropdown/dropdown2.js +16 -16
- package/dist/dropdown-group/dropdown-group.d.ts +1 -1
- package/dist/dropdown-group/dropdown-group.js +16 -16
- package/dist/dropzone/dropzone.d.ts +2 -405
- package/dist/dropzone/dropzone2.js +14 -14
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-datetime/format-datetime.d.ts +1 -1
- package/dist/format-datetime/format-datetime2.js +10 -10
- package/dist/format-number/format-number.d.ts +1 -1
- package/dist/format-number/format-number2.js +16 -16
- package/dist/format-relative-time/format-relative-time.d.ts +1 -1
- package/dist/format-relative-time/format-relative-time2.js +7 -7
- package/dist/forms/control/control2.js +19 -19
- package/dist/forms/control-group/control-group.d.ts +1 -1
- package/dist/forms/control-group/control-group.js +1 -1
- package/dist/forms/control-group/control-group.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +6 -6
- package/dist/forms/control-message/control-message.d.ts +1 -1
- package/dist/forms/control-message/control-message2.js +9 -9
- package/dist/grid/cell/cell.d.ts +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column.d.ts +1 -1
- package/dist/grid/column/column2.js +10 -10
- package/dist/grid/footer/footer.d.ts +1 -1
- package/dist/grid/footer/footer2.js +6 -6
- package/dist/grid/grid.d.ts +3 -2
- package/dist/grid/grid.examples.js.map +1 -1
- package/dist/grid/grid2.js +38 -30
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header.d.ts +1 -1
- package/dist/grid/header/header2.js +9 -9
- package/dist/grid/placeholder/placeholder.d.ts +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row.d.ts +1 -1
- package/dist/grid/row/row2.js +9 -9
- package/dist/icon/icon.d.ts +1 -1
- package/dist/icon/icon2.js +29 -21
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon/icons.d.ts +0 -2
- package/dist/icon/icons.js.map +1 -1
- package/dist/icon-button/icon-button.d.ts +1 -1
- package/dist/icon-button/icon-button.js +1 -1
- package/dist/icon-button/icon-button.js.map +1 -1
- package/dist/icon-button/icon-button2.js +9 -9
- package/dist/index.js +4 -4
- package/dist/input/input-group.examples.js.map +1 -1
- package/dist/input/input-group.examples.json +11 -0
- package/dist/input/input-group.js +1 -1
- package/dist/input/input-group.js.map +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +6 -6
- package/dist/internal/controllers/keynav-grid.controller.js +39 -39
- package/dist/internal/controllers/state-scroll.controller.d.ts +1 -0
- package/dist/internal/controllers/state-scroll.controller.js +25 -8
- package/dist/internal/controllers/state-scroll.controller.js.map +1 -1
- package/dist/internal/controllers/type-button.controller.examples.js.map +1 -1
- package/dist/internal/controllers/type-button.controller.examples.json +1 -1
- package/dist/internal/controllers/type-command.controller.d.ts +6 -1
- package/dist/internal/controllers/type-command.controller.js +20 -14
- package/dist/internal/controllers/type-command.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.controller.js +28 -21
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.utils.js +7 -7
- package/dist/internal/index.d.ts +0 -1
- package/dist/internal/index.js +40 -41
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/types/index.d.ts +0 -10
- package/dist/internal/types/index.js +0 -3
- package/dist/internal/types/index.js.map +1 -1
- package/dist/logo/logo.d.ts +1 -1
- package/dist/logo/logo2.js +6 -6
- package/dist/menu/menu-item.d.ts +5 -3
- package/dist/menu/menu-item2.js +12 -12
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu.d.ts +1 -1
- package/dist/menu/menu.examples.js.map +1 -1
- package/dist/menu/menu.examples.json +1 -1
- package/dist/menu/menu2.js +10 -10
- package/dist/month/month.d.ts +1 -1
- package/dist/month/month2.js +7 -7
- package/dist/notification/notification-group.d.ts +1 -1
- package/dist/notification/notification-group2.js +11 -11
- package/dist/notification/notification.d.ts +2 -1
- package/dist/notification/notification.examples.js.map +1 -1
- package/dist/notification/notification.examples.json +0 -11
- package/dist/notification/notification2.js +36 -28
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/page-panel/page-panel-content.d.ts +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer.d.ts +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +6 -6
- package/dist/page/page-panel/page-panel-header.d.ts +1 -1
- package/dist/page/page-panel/page-panel-header2.js +6 -6
- package/dist/page/page-panel/page-panel.d.ts +2 -17
- package/dist/page/page-panel/page-panel.global.js +1 -1
- package/dist/page/page-panel/page-panel.global.js.map +1 -1
- package/dist/page/page-panel/page-panel2.js +21 -44
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page.d.ts +1 -1
- package/dist/page/page.examples.js.map +1 -1
- package/dist/page/page.examples.json +0 -32
- package/dist/page/page2.js +9 -9
- package/dist/page-header/page-header.d.ts +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader.d.ts +1 -1
- package/dist/page-loader/page-loader2.js +10 -10
- package/dist/pagination/pagination.d.ts +2 -405
- package/dist/pagination/pagination2.js +17 -17
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel.d.ts +8 -5
- package/dist/panel/panel.examples.js.map +1 -1
- package/dist/panel/panel2.js +21 -21
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password.d.ts +1 -1
- package/dist/password/password2.js +7 -7
- package/dist/preferences-input/preferences-input.d.ts +2 -405
- package/dist/preferences-input/preferences-input2.js +9 -9
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar.d.ts +1 -1
- package/dist/progress-bar/progress-bar2.js +8 -8
- package/dist/progress-ring/progress-ring.d.ts +1 -3
- package/dist/progress-ring/progress-ring2.js +17 -22
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip.d.ts +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +15 -15
- package/dist/pulse/pulse.d.ts +1 -1
- package/dist/pulse/pulse2.js +6 -6
- package/dist/radio/radio-group2.js +7 -7
- package/dist/radio/radio2.js +7 -7
- package/dist/range/range.d.ts +1 -1
- package/dist/range/range2.js +5 -5
- package/dist/resize-handle/resize-handle.d.ts +2 -405
- package/dist/resize-handle/resize-handle2.js +16 -16
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search.d.ts +1 -1
- package/dist/search/search2.js +8 -8
- package/dist/select/select.d.ts +2 -2
- package/dist/select/select2.js +18 -18
- package/dist/skeleton/skeleton.d.ts +1 -1
- package/dist/skeleton/skeleton2.js +7 -7
- package/dist/sort-button/sort-button.d.ts +5 -3
- package/dist/sort-button/sort-button2.js +19 -19
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline.d.ts +1 -1
- package/dist/sparkline/sparkline2.js +14 -14
- package/dist/star-rating/star-rating.d.ts +1 -1
- package/dist/star-rating/star-rating2.js +6 -6
- package/dist/steps/steps.d.ts +6 -4
- package/dist/steps/steps2.js +36 -36
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/switch-group2.js +6 -6
- package/dist/switch/switch2.js +7 -7
- package/dist/tabs/tabs-group.d.ts +1 -1
- package/dist/tabs/tabs-group2.js +21 -21
- package/dist/tabs/tabs-item.js +1 -1
- package/dist/tabs/tabs-item.js.map +1 -1
- package/dist/tabs/tabs.d.ts +6 -8
- package/dist/tabs/tabs.global.js +1 -1
- package/dist/tabs/tabs.global.js.map +1 -1
- package/dist/tabs/tabs.js +1 -1
- package/dist/tabs/tabs.js.map +1 -1
- package/dist/tabs/tabs2.js +30 -30
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/tag.d.ts +6 -3
- package/dist/tag/tag2.js +20 -20
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time.d.ts +1 -1
- package/dist/time/time2.js +7 -7
- package/dist/toast/toast.d.ts +3 -4
- package/dist/toast/toast2.js +21 -21
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer.d.ts +1 -1
- package/dist/toggletip/toggletip-footer2.js +6 -6
- package/dist/toggletip/toggletip-header.d.ts +1 -1
- package/dist/toggletip/toggletip-header2.js +6 -6
- package/dist/toggletip/toggletip.d.ts +1 -1
- package/dist/toggletip/toggletip.examples.js.map +1 -1
- package/dist/toggletip/toggletip2.js +17 -17
- package/dist/toolbar/toolbar.d.ts +1 -1
- package/dist/toolbar/toolbar2.js +11 -11
- package/dist/tooltip/tooltip.d.ts +1 -1
- package/dist/tooltip/tooltip2.js +16 -16
- package/dist/tree/tree-node.d.ts +1 -1
- package/dist/tree/tree-node2.js +30 -30
- package/dist/tree/tree.d.ts +1 -1
- package/dist/tree/tree2.js +14 -14
- package/dist/week/week.d.ts +1 -1
- package/dist/week/week2.js +7 -7
- package/package.json +15 -15
- package/dist/internal/base/button.d.ts +0 -114
- package/dist/internal/base/button.js +0 -117
- package/dist/internal/base/button.js.map +0 -1
package/dist/tree/tree-node2.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
+
import { I18nController as t } from "../internal/controllers/i18n.controller.js";
|
|
3
|
+
import { getFlattenedFocusableItems as n } from "../internal/utils/dom.js";
|
|
4
|
+
import { attachInternals as r } from "../internal/utils/a11y.js";
|
|
5
|
+
import { stateExpanded as i } from "../internal/controllers/state-expanded.controller.js";
|
|
6
|
+
import { stateHighlighted as a } from "../internal/controllers/state-highlighted.controller.js";
|
|
7
|
+
import { stateSelected as o } from "../internal/controllers/state-selected.controller.js";
|
|
8
|
+
import { typeAnchor as s } from "../internal/controllers/type-anchor.controller.js";
|
|
9
|
+
import { TypeExpandableController as c } from "../internal/controllers/type-expandable.controller.js";
|
|
10
|
+
import { TypeSelectableController as l } from "../internal/controllers/type-selectable.controller.js";
|
|
11
|
+
import { typeSSR as u } from "../internal/controllers/type-ssr.controller.js";
|
|
12
|
+
import { hostAttr as d } from "../internal/decorators/host-attr.js";
|
|
13
|
+
import { scopedRegistry as f } from "../internal/decorators/scoped-registry.js";
|
|
14
|
+
import { useStyles as p } from "../internal/styles/index.js";
|
|
15
|
+
import { __decorate as m } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
|
|
16
16
|
import { Icon as h } from "../icon/icon2.js";
|
|
17
17
|
import { IconButton as g } from "../icon-button/icon-button2.js";
|
|
18
18
|
import { updateNodeSelection as _ } from "./utils.js";
|
|
@@ -25,7 +25,7 @@ import { queryAssignedElements as T } from "lit/decorators/query-assigned-elemen
|
|
|
25
25
|
//#region src/tree/tree-node.ts
|
|
26
26
|
var E = class extends b {
|
|
27
27
|
constructor(...e) {
|
|
28
|
-
super(...e), this.expanded = !1, this.selected = !1, this.expandable = !1, this.highlighted = !1, this.#e = new
|
|
28
|
+
super(...e), this.expanded = !1, this.selected = !1, this.expandable = !1, this.highlighted = !1, this.#e = new t(this), this.i18n = this.#e.i18n, this.slot = "nodes", this.indeterminate = !1, this.behaviorExpand = !1, this.behaviorSelect = !1, this.#n = new c(this), this.#r = new l(this), this.#s = (e) => {
|
|
29
29
|
this.#i && e.code === "ArrowLeft" && e.target === this && this.close(), this.#i && e.code === "ArrowRight" && e.target === this && this.open(), e.code === "Space" && e.target === this && this.selectable && (e.preventDefault(), this.#u());
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -41,7 +41,7 @@ var E = class extends b {
|
|
|
41
41
|
static {
|
|
42
42
|
this.metadata = {
|
|
43
43
|
tag: "nve-tree-node",
|
|
44
|
-
version: "0.2.
|
|
44
|
+
version: "0.2.4",
|
|
45
45
|
parents: ["nve-tree", "nve-tree-node"]
|
|
46
46
|
};
|
|
47
47
|
}
|
|
@@ -53,13 +53,13 @@ var E = class extends b {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
static {
|
|
56
|
-
this.styles =
|
|
56
|
+
this.styles = p([y]);
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
59
|
return x`<div internal-host @slotchange="${this.#a}"><div part="_node">${this.#i ? x`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" @pointerup="${this.#l}" role="presentation" tabindex="-1" size="sm" container="inline" nofocus><nve-icon part="icon" name="caret" direction="${this.expanded ? "down" : "right"}" size="sm"></nve-icon></nve-icon-button>` : S} ${this.selectable === "multi" ? x`<nve-checkbox part="checkbox" nofocus><input type="checkbox" @change="${this.#f}" .checked="${this.selected}" .indeterminate="${this.indeterminate}" .ariaLabel="${this.i18n.expand}" tabindex="-1"></nve-checkbox>` : S}<div tabindex="0" part="_node-header"><slot tabindex="0" class="node-title" @click="${this.#c}"></slot><slot name="content" part="_content"></slot></div></div><div role="group" part="_nodes"><slot name="nodes"></slot></div></div>`;
|
|
60
60
|
}
|
|
61
61
|
connectedCallback() {
|
|
62
|
-
super.connectedCallback(),
|
|
62
|
+
super.connectedCallback(), r(this), this._internals.role = "treeitem", this.addEventListener("keyup", this.#s), this.#a();
|
|
63
63
|
}
|
|
64
64
|
disconnectedCallback() {
|
|
65
65
|
super.disconnectedCallback(), this.removeEventListener("keyup", this.#s);
|
|
@@ -77,9 +77,9 @@ var E = class extends b {
|
|
|
77
77
|
this.#i ? this._internals.states.add("is-expandable") : this._internals.states.delete("is-expandable");
|
|
78
78
|
}
|
|
79
79
|
#s;
|
|
80
|
-
#c(
|
|
81
|
-
let
|
|
82
|
-
this.#i && !this.selectable && !
|
|
80
|
+
#c(e) {
|
|
81
|
+
let t = n(e.currentTarget).length;
|
|
82
|
+
this.#i && !this.selectable && !t && this.#l(), this.selectable && (!t || e.target.localName === "a") && this.#u();
|
|
83
83
|
}
|
|
84
84
|
#l() {
|
|
85
85
|
this.#n.toggle();
|
|
@@ -96,20 +96,20 @@ var E = class extends b {
|
|
|
96
96
|
}), this.#t.nodes.forEach((e) => _(e)));
|
|
97
97
|
}
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
m([C({
|
|
100
100
|
type: Boolean,
|
|
101
101
|
reflect: !0
|
|
102
|
-
})], E.prototype, "expanded", void 0),
|
|
102
|
+
})], E.prototype, "expanded", void 0), m([C({
|
|
103
103
|
type: Boolean,
|
|
104
104
|
reflect: !0
|
|
105
|
-
})], E.prototype, "selected", void 0),
|
|
105
|
+
})], E.prototype, "selected", void 0), m([C({ type: Boolean })], E.prototype, "expandable", void 0), m([C({ type: String })], E.prototype, "selectable", void 0), m([C({ type: Boolean })], E.prototype, "highlighted", void 0), m([C({ type: Object })], E.prototype, "i18n", void 0), m([d()], E.prototype, "slot", void 0), m([T({ slot: "nodes" })], E.prototype, "nodes", void 0), m([w()], E.prototype, "indeterminate", void 0), m([w()], E.prototype, "behaviorExpand", void 0), m([w()], E.prototype, "behaviorSelect", void 0), E = m([
|
|
106
|
+
e(),
|
|
107
|
+
u({ log: !1 }),
|
|
108
|
+
s(),
|
|
106
109
|
o(),
|
|
107
|
-
d({ log: !1 }),
|
|
108
110
|
i(),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
p(),
|
|
112
|
-
c()
|
|
111
|
+
f(),
|
|
112
|
+
a()
|
|
113
113
|
], E);
|
|
114
114
|
//#endregion
|
|
115
115
|
export { E as TreeNode };
|
package/dist/tree/tree.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ export declare class Tree extends LitElement {
|
|
|
45
45
|
get keynavListConfig(): KeynavListConfig;
|
|
46
46
|
/** @private */
|
|
47
47
|
get openNodes(): TreeNode[];
|
|
48
|
-
render(): import('lit
|
|
48
|
+
render(): import('lit').TemplateResult<1>;
|
|
49
49
|
connectedCallback(): void;
|
|
50
50
|
disconnectedCallback(): void;
|
|
51
51
|
updated(props: PropertyValues<this>): Promise<void>;
|
package/dist/tree/tree2.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
+
import { onChildListMutation as t } from "../internal/utils/events.js";
|
|
3
|
+
import { appendRootNodeStyle as n } from "../internal/utils/dom.js";
|
|
4
|
+
import { keyNavigationList as r } from "../internal/controllers/keynav-list.controller.js";
|
|
5
|
+
import { attachInternals as i } from "../internal/utils/a11y.js";
|
|
6
|
+
import { useStyles as a } from "../internal/styles/index.js";
|
|
7
|
+
import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
|
|
8
8
|
import { updateNodeSelection as s } from "./utils.js";
|
|
9
9
|
import { TreeNode as c } from "./tree-node2.js";
|
|
10
10
|
import l from "./tree.js";
|
|
@@ -17,12 +17,12 @@ var m = class extends d {
|
|
|
17
17
|
super(...e), this.behaviorExpand = !1, this.behaviorSelect = !1, this.border = !1, this.#e = [];
|
|
18
18
|
}
|
|
19
19
|
static {
|
|
20
|
-
this.styles =
|
|
20
|
+
this.styles = a([l]);
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
23
23
|
this.metadata = {
|
|
24
24
|
tag: "nve-tree",
|
|
25
|
-
version: "0.2.
|
|
25
|
+
version: "0.2.4",
|
|
26
26
|
children: ["nve-tree-node"]
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -43,7 +43,7 @@ var m = class extends d {
|
|
|
43
43
|
}
|
|
44
44
|
#e;
|
|
45
45
|
connectedCallback() {
|
|
46
|
-
super.connectedCallback(),
|
|
46
|
+
super.connectedCallback(), i(this), n(this, u), this._internals.role = "tree", this.#e.push(t(this, () => {
|
|
47
47
|
this.#t();
|
|
48
48
|
}, { subtree: !0 }));
|
|
49
49
|
}
|
|
@@ -65,16 +65,16 @@ var m = class extends d {
|
|
|
65
65
|
this.behaviorSelect && this.selectable === "multi" && this.nodes.forEach((e) => s(e));
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
o([p({ type: String })], m.prototype, "selectable", void 0), o([p({
|
|
69
69
|
type: Boolean,
|
|
70
70
|
attribute: "behavior-expand"
|
|
71
|
-
})], m.prototype, "behaviorExpand", void 0),
|
|
71
|
+
})], m.prototype, "behaviorExpand", void 0), o([p({
|
|
72
72
|
type: Boolean,
|
|
73
73
|
attribute: "behavior-select"
|
|
74
|
-
})], m.prototype, "behaviorSelect", void 0),
|
|
74
|
+
})], m.prototype, "behaviorSelect", void 0), o([p({
|
|
75
75
|
type: Boolean,
|
|
76
76
|
reflect: !0
|
|
77
|
-
})], m.prototype, "border", void 0), m =
|
|
77
|
+
})], m.prototype, "border", void 0), m = o([e(), r()], m);
|
|
78
78
|
//#endregion
|
|
79
79
|
export { m as Tree };
|
|
80
80
|
|
package/dist/week/week.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ export declare class Week extends Control implements ContainerElement {
|
|
|
30
30
|
static elementDefinitions: {
|
|
31
31
|
[IconButton.metadata.tag]: typeof IconButton;
|
|
32
32
|
};
|
|
33
|
-
protected get suffixContent(): import('lit
|
|
33
|
+
protected get suffixContent(): import('lit').TemplateResult<1>;
|
|
34
34
|
}
|
package/dist/week/week2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
|
+
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
+
import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
|
|
4
4
|
import { Control as r } from "../forms/control/control2.js";
|
|
5
5
|
import { IconButton as i } from "../icon-button/icon-button2.js";
|
|
6
6
|
import { inputStyles as a } from "../input/input2.js";
|
|
@@ -10,7 +10,7 @@ import { property as c } from "lit/decorators/property.js";
|
|
|
10
10
|
//#region src/week/week.ts
|
|
11
11
|
var l = class extends r {
|
|
12
12
|
static {
|
|
13
|
-
this.styles =
|
|
13
|
+
this.styles = t([
|
|
14
14
|
...r.styles,
|
|
15
15
|
a,
|
|
16
16
|
o
|
|
@@ -19,7 +19,7 @@ var l = class extends r {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-week",
|
|
22
|
-
version: "0.2.
|
|
22
|
+
version: "0.2.4"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
@@ -29,10 +29,10 @@ var l = class extends r {
|
|
|
29
29
|
return s`<nve-icon-button exportparts="icon:icon-button-icon" part="icon-button" .ariaLabel="${this.i18n.expand}" icon-name="calendar" container="inline" @click="${this.showPicker}"></nve-icon-button>`;
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
n([c({
|
|
33
33
|
type: String,
|
|
34
34
|
reflect: !0
|
|
35
|
-
})], l.prototype, "container", void 0), l =
|
|
35
|
+
})], l.prototype, "container", void 0), l = n([e()], l);
|
|
36
36
|
//#endregion
|
|
37
37
|
export { l as Week };
|
|
38
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nvidia-elements/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"release": {
|
|
5
5
|
"extends": "../../release.config.js"
|
|
6
6
|
},
|
|
@@ -919,9 +919,9 @@
|
|
|
919
919
|
}
|
|
920
920
|
},
|
|
921
921
|
"dependencies": {
|
|
922
|
-
"lit": "^3.3.
|
|
923
|
-
"lit-html": "^3.3.
|
|
924
|
-
"@nvidia-elements/forms": "^0.0
|
|
922
|
+
"lit": "^3.3.3",
|
|
923
|
+
"lit-html": "^3.3.3",
|
|
924
|
+
"@nvidia-elements/forms": "^0.1.0"
|
|
925
925
|
},
|
|
926
926
|
"peerDependencies": {
|
|
927
927
|
"@nvidia-elements/themes": ">=0.0.0 <1.0.0"
|
|
@@ -937,26 +937,26 @@
|
|
|
937
937
|
"@eslint/js": "10.0.1",
|
|
938
938
|
"@lit-labs/virtualizer": "2.1.1",
|
|
939
939
|
"@typescript/lib-dom": "npm:@types/web@0.0.312",
|
|
940
|
-
"@vitest/browser": "4.1.
|
|
941
|
-
"@vitest/coverage-istanbul": "4.1.
|
|
940
|
+
"@vitest/browser": "4.1.7",
|
|
941
|
+
"@vitest/coverage-istanbul": "4.1.7",
|
|
942
942
|
"axe-core": "4.11.0",
|
|
943
|
-
"eslint": "10.
|
|
944
|
-
"lit": "3.3.
|
|
943
|
+
"eslint": "10.4.0",
|
|
944
|
+
"lit": "3.3.3",
|
|
945
945
|
"lit-analyzer": "2.0.3",
|
|
946
|
-
"lit-html": "3.3.
|
|
947
|
-
"publint": "0.3.
|
|
948
|
-
"stylelint": "17.
|
|
946
|
+
"lit-html": "3.3.3",
|
|
947
|
+
"publint": "0.3.21",
|
|
948
|
+
"stylelint": "17.12.0",
|
|
949
949
|
"stylelint-config-standard": "40.0.0",
|
|
950
950
|
"svgo": "4.0.1",
|
|
951
951
|
"ts-lit-plugin": "2.0.2",
|
|
952
952
|
"typescript": "6.0.3",
|
|
953
|
-
"vite": "8.0.
|
|
954
|
-
"vitest": "4.1.
|
|
955
|
-
"@internals/testing": "0.0.0",
|
|
953
|
+
"vite": "8.0.14",
|
|
954
|
+
"vitest": "4.1.7",
|
|
956
955
|
"@internals/vite": "0.0.0",
|
|
956
|
+
"@internals/testing": "0.0.0",
|
|
957
957
|
"@nvidia-elements/lint": "0.3.1",
|
|
958
958
|
"@internals/eslint": "0.0.0",
|
|
959
|
-
"@nvidia-elements/styles": "^0.0.
|
|
959
|
+
"@nvidia-elements/styles": "^0.0.10"
|
|
960
960
|
},
|
|
961
961
|
"wireit": {
|
|
962
962
|
"ci": {
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* Standard button behaviors for custom elements.
|
|
4
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
|
|
5
|
-
* @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/
|
|
6
|
-
*/
|
|
7
|
-
export declare class BaseButton extends LitElement {
|
|
8
|
-
#private;
|
|
9
|
-
static formAssociated: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Use for toggle button types.
|
|
12
|
-
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed
|
|
13
|
-
*/
|
|
14
|
-
pressed: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Use for buttons that expand/collapse content.
|
|
17
|
-
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded
|
|
18
|
-
*/
|
|
19
|
-
expanded: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Like input readonly, sets a button semantically as visual treatment only
|
|
22
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly
|
|
23
|
-
*/
|
|
24
|
-
readOnly: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `readOnly`. The `readonly` attribute remains supported.
|
|
27
|
-
*/
|
|
28
|
-
get readonly(): boolean;
|
|
29
|
-
set readonly(value: boolean);
|
|
30
|
-
/**
|
|
31
|
-
* Like input form, sets a button to submit a form outside its parent form.
|
|
32
|
-
* Returns a reference to the form element if available.
|
|
33
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/form
|
|
34
|
-
*/
|
|
35
|
-
set form(form: string | HTMLFormElement);
|
|
36
|
-
get form(): HTMLFormElement | null | string;
|
|
37
|
-
/**
|
|
38
|
-
* The name of the button, submitted as a pair with the button's value as part of the form data, when that button submits the form.
|
|
39
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name
|
|
40
|
-
*/
|
|
41
|
-
name: string;
|
|
42
|
-
/**
|
|
43
|
-
* Defines the value associated with the button's name when submitting the form data. The server receives this value in params when the form submits through this button.
|
|
44
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-value
|
|
45
|
-
*/
|
|
46
|
-
value: string;
|
|
47
|
-
/**
|
|
48
|
-
* Defines the button behavior when associated within an <form> element.
|
|
49
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type
|
|
50
|
-
*/
|
|
51
|
-
type: 'button' | 'submit' | 'reset';
|
|
52
|
-
/**
|
|
53
|
-
* This Boolean attribute prevents the user from interacting with the button: it cannot receive press or focus events.
|
|
54
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-disabled
|
|
55
|
-
*/
|
|
56
|
-
disabled: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* This Boolean attribute prevents the selected state when the button belongs to a multi-choice selection group
|
|
59
|
-
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected
|
|
60
|
-
*/
|
|
61
|
-
selected: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* This Boolean attribute sets the current state, used to represent the current page or navigation link
|
|
64
|
-
* https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current
|
|
65
|
-
*/
|
|
66
|
-
current: 'page' | 'step';
|
|
67
|
-
/**
|
|
68
|
-
* Establishing a relationship between a popover and its invoker button.
|
|
69
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/popoverTargetElement
|
|
70
|
-
*/
|
|
71
|
-
popoverTargetElement: HTMLElement | null;
|
|
72
|
-
/**
|
|
73
|
-
* The idref of the element that receives the popover.
|
|
74
|
-
* https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#popovertarget
|
|
75
|
-
*/
|
|
76
|
-
popovertarget: string;
|
|
77
|
-
/**
|
|
78
|
-
* The popover target action to perform on the popover target element.
|
|
79
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/popoverTargetAction
|
|
80
|
-
*/
|
|
81
|
-
popoverTargetAction: 'show' | 'hide' | 'toggle';
|
|
82
|
-
/**
|
|
83
|
-
* The element that receives the command.
|
|
84
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API
|
|
85
|
-
*/
|
|
86
|
-
commandForElement: HTMLElement | null;
|
|
87
|
-
/**
|
|
88
|
-
* The idref of the element that receives the command.
|
|
89
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API
|
|
90
|
-
*/
|
|
91
|
-
commandfor: string | null;
|
|
92
|
-
/**
|
|
93
|
-
* The command to execute on the element.
|
|
94
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API
|
|
95
|
-
*/
|
|
96
|
-
command: string;
|
|
97
|
-
/**
|
|
98
|
-
* The element that receives the interest.
|
|
99
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/interestForElement
|
|
100
|
-
*/
|
|
101
|
-
interestForElement: HTMLElement | null;
|
|
102
|
-
/**
|
|
103
|
-
* The idref of the element that receives the interest.
|
|
104
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/interestForElement
|
|
105
|
-
*/
|
|
106
|
-
interestfor: string | null;
|
|
107
|
-
/**
|
|
108
|
-
* @private
|
|
109
|
-
* An instance of `ElementInternals` that decorators/controllers set dynamically
|
|
110
|
-
*/
|
|
111
|
-
_internals: ElementInternals;
|
|
112
|
-
connectedCallback(): void;
|
|
113
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
114
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { attachInternals as e } from "../utils/a11y.js";
|
|
2
|
-
import { stateActive as t } from "../controllers/state-active.controller.js";
|
|
3
|
-
import { stateDisabled as n } from "../controllers/state-disabled.controller.js";
|
|
4
|
-
import { stateExpanded as r } from "../controllers/state-expanded.controller.js";
|
|
5
|
-
import { statePressed as i } from "../controllers/state-pressed.controller.js";
|
|
6
|
-
import { stateSelected as a } from "../controllers/state-selected.controller.js";
|
|
7
|
-
import { typeButton as o } from "../controllers/type-button.controller.js";
|
|
8
|
-
import { typeAnchor as s } from "../controllers/type-anchor.controller.js";
|
|
9
|
-
import { typeSubmit as c } from "../controllers/type-submit.controller.js";
|
|
10
|
-
import { typeNativePopoverTrigger as l } from "../controllers/type-native-popover-trigger.controller.js";
|
|
11
|
-
import { stateCurrent as u } from "../controllers/state-current.controller.js";
|
|
12
|
-
import { typeCommand as d } from "../controllers/type-command.controller.js";
|
|
13
|
-
import { typeInterest as f } from "../controllers/type-interest.controller.js";
|
|
14
|
-
import { __decorate as p } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
|
|
15
|
-
import { LitElement as m, html as h, isServer as g } from "lit";
|
|
16
|
-
import { property as _ } from "lit/decorators/property.js";
|
|
17
|
-
//#region src/internal/base/button.ts
|
|
18
|
-
var v = class extends m {
|
|
19
|
-
constructor(...e) {
|
|
20
|
-
super(...e), this.readOnly = !1, this.#e = null, this.disabled = !1, this.popoverTargetElement = null, this.commandForElement = null, this.commandfor = null, this.interestForElement = null, this.interestfor = null;
|
|
21
|
-
}
|
|
22
|
-
static {
|
|
23
|
-
this.formAssociated = !0;
|
|
24
|
-
}
|
|
25
|
-
get readonly() {
|
|
26
|
-
return this.readOnly;
|
|
27
|
-
}
|
|
28
|
-
set readonly(e) {
|
|
29
|
-
this.readOnly = e;
|
|
30
|
-
}
|
|
31
|
-
#e;
|
|
32
|
-
set form(e) {
|
|
33
|
-
this.#e = e, typeof e == "string" ? this.setAttribute("form", e) : this.removeAttribute("form");
|
|
34
|
-
}
|
|
35
|
-
get form() {
|
|
36
|
-
if (this.#e && typeof this.#e != "string") return this.#e;
|
|
37
|
-
if (typeof this.#e == "string" && !g) {
|
|
38
|
-
let e = this.getRootNode();
|
|
39
|
-
return e.getElementById ? e.getElementById(this.#e) : null;
|
|
40
|
-
} else return this._internals?.form;
|
|
41
|
-
}
|
|
42
|
-
connectedCallback() {
|
|
43
|
-
super.connectedCallback(), e(this);
|
|
44
|
-
}
|
|
45
|
-
render() {
|
|
46
|
-
return h`<div internal-host><slot></slot></div>`;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
p([_({
|
|
50
|
-
type: Boolean,
|
|
51
|
-
reflect: !0
|
|
52
|
-
})], v.prototype, "pressed", void 0), p([_({
|
|
53
|
-
type: Boolean,
|
|
54
|
-
reflect: !0
|
|
55
|
-
})], v.prototype, "expanded", void 0), p([_({
|
|
56
|
-
type: Boolean,
|
|
57
|
-
attribute: "readonly",
|
|
58
|
-
reflect: !0
|
|
59
|
-
})], v.prototype, "readOnly", void 0), p([_({
|
|
60
|
-
type: String,
|
|
61
|
-
attribute: "form",
|
|
62
|
-
converter: { fromAttribute: (e) => e }
|
|
63
|
-
})], v.prototype, "form", null), p([_({
|
|
64
|
-
type: String,
|
|
65
|
-
reflect: !0
|
|
66
|
-
})], v.prototype, "name", void 0), p([_({
|
|
67
|
-
type: String,
|
|
68
|
-
reflect: !0
|
|
69
|
-
})], v.prototype, "value", void 0), p([_({
|
|
70
|
-
type: String,
|
|
71
|
-
reflect: !0
|
|
72
|
-
})], v.prototype, "type", void 0), p([_({
|
|
73
|
-
type: Boolean,
|
|
74
|
-
reflect: !0
|
|
75
|
-
})], v.prototype, "disabled", void 0), p([_({
|
|
76
|
-
type: Boolean,
|
|
77
|
-
reflect: !0
|
|
78
|
-
})], v.prototype, "selected", void 0), p([_({
|
|
79
|
-
type: String,
|
|
80
|
-
reflect: !0
|
|
81
|
-
})], v.prototype, "current", void 0), p([_({ type: Object })], v.prototype, "popoverTargetElement", void 0), p([_({
|
|
82
|
-
type: String,
|
|
83
|
-
attribute: "popovertarget",
|
|
84
|
-
reflect: !0
|
|
85
|
-
})], v.prototype, "popovertarget", void 0), p([_({
|
|
86
|
-
type: String,
|
|
87
|
-
attribute: "popovertargetaction",
|
|
88
|
-
reflect: !0
|
|
89
|
-
})], v.prototype, "popoverTargetAction", void 0), p([_({ type: Object })], v.prototype, "commandForElement", void 0), p([_({
|
|
90
|
-
type: String,
|
|
91
|
-
attribute: "commandfor",
|
|
92
|
-
reflect: !0
|
|
93
|
-
})], v.prototype, "commandfor", void 0), p([_({
|
|
94
|
-
type: String,
|
|
95
|
-
attribute: "command",
|
|
96
|
-
reflect: !0
|
|
97
|
-
})], v.prototype, "command", void 0), p([_({ type: Object })], v.prototype, "interestForElement", void 0), p([_({
|
|
98
|
-
type: String,
|
|
99
|
-
reflect: !0
|
|
100
|
-
})], v.prototype, "interestfor", void 0), v = p([
|
|
101
|
-
o(),
|
|
102
|
-
s(),
|
|
103
|
-
c(),
|
|
104
|
-
l(),
|
|
105
|
-
d(),
|
|
106
|
-
f(),
|
|
107
|
-
t(),
|
|
108
|
-
u(),
|
|
109
|
-
i(),
|
|
110
|
-
a(),
|
|
111
|
-
n(),
|
|
112
|
-
r()
|
|
113
|
-
], v);
|
|
114
|
-
//#endregion
|
|
115
|
-
export { v as BaseButton };
|
|
116
|
-
|
|
117
|
-
//# sourceMappingURL=button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","names":["#form"],"sources":["../../../src/internal/base/button.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, isServer, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { stateActive } from '../controllers/state-active.controller.js';\nimport { stateDisabled } from '../controllers/state-disabled.controller.js';\nimport { stateExpanded } from '../controllers/state-expanded.controller.js';\nimport { statePressed } from '../controllers/state-pressed.controller.js';\nimport { stateSelected } from '../controllers/state-selected.controller.js';\nimport { typeButton } from '../controllers/type-button.controller.js';\nimport { typeAnchor } from '../controllers/type-anchor.controller.js';\nimport { typeSubmit } from '../controllers/type-submit.controller.js';\nimport { typeNativePopoverTrigger } from '../controllers/type-native-popover-trigger.controller.js';\nimport { stateCurrent } from '../controllers/state-current.controller.js';\nimport { typeCommand } from '../controllers/type-command.controller.js';\nimport { attachInternals } from '../utils/a11y.js';\nimport { typeInterest } from '../controllers/type-interest.controller.js';\n\n/**\n * Standard button behaviors for custom elements.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/\n */\n@typeButton<BaseButton>()\n@typeAnchor<BaseButton>()\n@typeSubmit<BaseButton & { form: HTMLFormElement | null }>() // override to exclude type string from getter, see comment in getter below\n@typeNativePopoverTrigger<BaseButton>()\n@typeCommand<BaseButton>()\n@typeInterest<BaseButton>()\n@stateActive<BaseButton>()\n@stateCurrent<BaseButton>()\n@statePressed<BaseButton>()\n@stateSelected<BaseButton>()\n@stateDisabled<BaseButton>()\n@stateExpanded<BaseButton>()\nexport class BaseButton extends LitElement {\n static formAssociated = true;\n\n /**\n * Use for toggle button types.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed\n */\n @property({ type: Boolean, reflect: true }) pressed: boolean;\n\n /**\n * Use for buttons that expand/collapse content.\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded\n */\n @property({ type: Boolean, reflect: true }) expanded: boolean;\n\n /**\n * Like input readonly, sets a button semantically as visual treatment only\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly\n */\n @property({ type: Boolean, attribute: 'readonly', reflect: true }) readOnly = false;\n\n /**\n * @deprecated Use `readOnly`. The `readonly` attribute remains supported.\n */\n get readonly(): boolean {\n return this.readOnly;\n }\n\n set readonly(value: boolean) {\n this.readOnly = value; // eslint-disable-line local/stateless-property\n }\n\n #form: string | HTMLFormElement | null = null;\n\n /**\n * Like input form, sets a button to submit a form outside its parent form.\n * Returns a reference to the form element if available.\n * https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/form\n */\n @property({\n type: String,\n attribute: 'form',\n converter: {\n fromAttribute: (value: string) => value\n }\n })\n set form(form: string | HTMLFormElement) {\n this.#form = form;\n if (typeof form === 'string') {\n this.setAttribute('form', form);\n } else {\n this.removeAttribute('form');\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/related-getter-setter-pairs\n get form(): HTMLFormElement | null | string {\n // string should drop from the type but without it the type does not derive from the setter correctly\n if (this.#form && typeof this.#form !== 'string') {\n return this.#form;\n } else if (typeof this.#form === 'string' && !isServer) {\n const rootNode = this.getRootNode() as Document | ShadowRoot;\n return rootNode.getElementById ? (rootNode.getElementById(this.#form) as HTMLFormElement) : null;\n } else {\n return this._internals?.form;\n }\n }\n\n /**\n * The name of the button, submitted as a pair with the button's value as part of the form data, when that button submits the form.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name\n */\n @property({ type: String, reflect: true }) name: string;\n\n /**\n * Defines the value associated with the button's name when submitting the form data. The server receives this value in params when the form submits through this button.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-value\n */\n @property({ type: String, reflect: true }) value: string;\n\n /**\n * Defines the button behavior when associated within an <form> element.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n */\n @property({ type: String, reflect: true }) type: 'button' | 'submit' | 'reset';\n\n /**\n * This Boolean attribute prevents the user from interacting with the button: it cannot receive press or focus events.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-disabled\n */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * This Boolean attribute prevents the selected state when the button belongs to a multi-choice selection group\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected\n */\n @property({ type: Boolean, reflect: true }) selected: boolean;\n\n /**\n * This Boolean attribute sets the current state, used to represent the current page or navigation link\n * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current\n */\n @property({ type: String, reflect: true }) current: 'page' | 'step';\n\n /**\n * Establishing a relationship between a popover and its invoker button.\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/popoverTargetElement\n */\n @property({ type: Object }) popoverTargetElement: HTMLElement | null = null; // eslint-disable-line local/primitive-property\n\n /**\n * The idref of the element that receives the popover.\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#popovertarget\n */\n @property({ type: String, attribute: 'popovertarget', reflect: true }) popovertarget: string;\n\n /**\n * The popover target action to perform on the popover target element.\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/popoverTargetAction\n */\n @property({ type: String, attribute: 'popovertargetaction', reflect: true })\n popoverTargetAction: 'show' | 'hide' | 'toggle';\n\n /**\n * The element that receives the command.\n * https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API\n */\n @property({ type: Object }) commandForElement: HTMLElement | null = null; // eslint-disable-line local/primitive-property\n\n /**\n * The idref of the element that receives the command.\n * https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API\n */\n @property({ type: String, attribute: 'commandfor', reflect: true }) commandfor: string | null = null;\n\n /**\n * The command to execute on the element.\n * https://developer.mozilla.org/en-US/docs/Web/API/Invoker_Commands_API\n */\n @property({ type: String, attribute: 'command', reflect: true }) command: string;\n\n /**\n * The element that receives the interest.\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/interestForElement\n */\n @property({ type: Object }) interestForElement: HTMLElement | null = null; // eslint-disable-line local/primitive-property\n\n /**\n * The idref of the element that receives the interest.\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement/interestForElement\n */\n @property({ type: String, reflect: true }) interestfor: string | null = null;\n\n /**\n * @private\n * An instance of `ElementInternals` that decorators/controllers set dynamically\n */\n declare _internals: ElementInternals;\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n }\n\n render() {\n return html`<div internal-host><slot></slot></div>`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCO,IAAA,IAAA,cAAyB,EAAW;;+BAmBqC,cAarC,sBA0Dc,gCAkBgB,+BAmBH,wBAM4B,gCAY3B,yBAMG;;;wBAtJhD;;CAuBxB,IAAI,WAAoB;EACtB,OAAO,KAAK;CACd;CAEA,IAAI,SAAS,GAAgB;EAC3B,KAAK,WAAW;CAClB;CAEA;CAOA,IAOI,KAAK,GAAgC;EAEvC,AADA,KAAKA,KAAQ,GACT,OAAO,KAAS,WAClB,KAAK,aAAa,QAAQ,CAAI,IAE9B,KAAK,gBAAgB,MAAM;CAE/B;CAGA,IAAI,OAAwC;EAE1C,IAAI,KAAKA,MAAS,OAAO,KAAKA,MAAU,UACtC,OAAO,KAAKA;EACP,IAAI,OAAO,KAAKA,MAAU,YAAY,CAAC,GAAU;GACtD,IAAM,IAAW,KAAK,YAAY;GAClC,OAAO,EAAS,iBAAkB,EAAS,eAAe,KAAKA,EAAK,IAAwB;EAC9F,OACE,OAAO,KAAK,YAAY;CAE5B;CA6FA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,EAAgB,IAAI;CACtB;CAEA,SAAS;EACP,OAAO,CAAI;CACb;AACF;GAhKG,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,MAMzC,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAMzC,EAAS;CAAE,MAAM;CAAS,WAAW;CAAY,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAoBhE,EAAS;CACR,MAAM;CACN,WAAW;CACX,WAAW,EACT,gBAAgB,MAAkB,EACpC;AACF,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,IAAA,MA2BA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAMxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAMxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAMxC,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAMzC,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAMzC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,MAMxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,wBAAA,KAAA,CAAA,MAMzB,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAiB,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,iBAAA,KAAA,CAAA,MAMpE,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAuB,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,uBAAA,KAAA,CAAA,MAO1E,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,qBAAA,KAAA,CAAA,MAMzB,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAc,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,MAMjE,EAAS;CAAE,MAAM;CAAQ,WAAW;CAAW,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,MAM9D,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,sBAAA,KAAA,CAAA,MAMzB,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA;CAnK1C,EAAuB;CACvB,EAAuB;CACvB,EAA0D;CAC1D,EAAqC;CACrC,EAAwB;CACxB,EAAyB;CACzB,EAAwB;CACxB,EAAyB;CACzB,EAAyB;CACzB,EAA0B;CAC1B,EAA0B;CAC1B,EAA0B"}
|