@nvidia-elements/core 2.18.0 → 2.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundles/index.d.ts +3 -3
- package/dist/bundles/index.js +9 -9
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group.d.ts +1 -1
- package/dist/button-group/button-group2.js +4 -2
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/card/card2.js +7 -9
- package/dist/card/card2.js.map +1 -1
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color2.js +1 -1
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +5 -5
- package/dist/custom-elements-vue.d.ts +5 -5
- package/dist/custom-elements.json +28 -50
- package/dist/data.html.json +3 -3
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +8 -11
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header2.js +8 -11
- package/dist/dialog/dialog-header2.js.map +1 -1
- package/dist/dialog/dialog2.js +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +8 -11
- package/dist/drawer/drawer-content2.js.map +1 -1
- package/dist/drawer/drawer-footer2.js +8 -11
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header2.js +8 -11
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +8 -11
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header2.js +8 -11
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +49 -54
- package/dist/format-bytes/format-bytes2.js.map +1 -1
- package/dist/format-datetime/format-datetime2.js +26 -27
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/format-number.d.ts +2 -2
- package/dist/format-number/format-number2.js +37 -38
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/format-relative-time2.js +27 -28
- package/dist/format-relative-time/format-relative-time2.js.map +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control2.js +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +7 -7
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +2 -2
- package/dist/icon-button/icon-button2.js +1 -1
- package/dist/iframe/iframe2.js +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/controllers/audit.controller.d.ts +0 -2
- package/dist/internal/controllers/audit.controller.js +42 -52
- package/dist/internal/controllers/audit.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-grid.controller.js +11 -11
- package/dist/internal/controllers/type-native-popover.controller.js +16 -11
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/index.js +28 -28
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/utils/audit-logs.d.ts +1 -1
- package/dist/internal/utils/audit-logs.js +3 -3
- package/dist/internal/utils/audit-logs.js.map +1 -1
- package/dist/internal/utils/audit.d.ts +0 -8
- package/dist/internal/utils/audit.js +1 -5
- package/dist/internal/utils/audit.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month2.js +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel2.js +19 -20
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +2 -2
- package/dist/page/page2.js.map +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input2.js +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/progress-dot2.js +1 -1
- package/dist/progress-ring/progress-ring2.js +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
- package/dist/pulse/pulse2.js +1 -1
- package/dist/radio/radio-group2.js +1 -1
- package/dist/radio/radio2.js +1 -1
- package/dist/range/range2.js +1 -1
- package/dist/resize-handle/resize-handle2.js +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +1 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast2.js +1 -1
- package/dist/toggletip/toggletip-footer2.js +8 -11
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +8 -11
- package/dist/toggletip/toggletip-header2.js.map +1 -1
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree.examples.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GlobalStateService as e } from "../../internal/services/global.service.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { LogService as t } from "../../internal/services/log.service.js";
|
|
3
|
+
import { audit as n } from "../../internal/controllers/audit.controller.js";
|
|
4
|
+
import { debounce as r } from "../../internal/utils/events.js";
|
|
5
5
|
import { attachInternals as i } from "../../internal/utils/a11y.js";
|
|
6
6
|
import { useStyles as a } from "../../internal/styles/index.js";
|
|
7
7
|
import o from "../../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
@@ -19,7 +19,7 @@ var m = class extends d {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-grid-header",
|
|
22
|
-
version: "2.18.
|
|
22
|
+
version: "2.18.2",
|
|
23
23
|
children: [c.metadata.tag]
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -30,7 +30,7 @@ var m = class extends d {
|
|
|
30
30
|
return f`<div internal-host><slot @slotchange="${() => this.#r()}"></slot></div>`;
|
|
31
31
|
}
|
|
32
32
|
connectedCallback() {
|
|
33
|
-
super.connectedCallback(), i(this), this._internals.role = "row", this.addEventListener("nve-grid-column-resize", this.#t), this.#n ??= new ResizeObserver(
|
|
33
|
+
super.connectedCallback(), i(this), this._internals.role = "row", this.addEventListener("nve-grid-column-resize", this.#t), this.#n ??= new ResizeObserver(r(() => this.#r(), 100)), this.#n.observe(this);
|
|
34
34
|
}
|
|
35
35
|
disconnectedCallback() {
|
|
36
36
|
super.disconnectedCallback(), this.removeEventListener("nve-grid-column-resize", this.#t), this.#n?.disconnect();
|
|
@@ -48,14 +48,14 @@ var m = class extends d {
|
|
|
48
48
|
#i() {
|
|
49
49
|
if (e.state.env !== "production") {
|
|
50
50
|
let e = this.#e.querySelector(u.metadata.tag)?.querySelectorAll(l.metadata.tag);
|
|
51
|
-
this.columns && e && this.columns.length !== e.length &&
|
|
51
|
+
this.columns && e && this.columns.length !== e.length && t.error(`grid-column (${this.columns.length}) and grid-cell (${e.length}) count mismatch`);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
o([p({
|
|
56
56
|
selector: c.metadata.tag,
|
|
57
57
|
flatten: !0
|
|
58
|
-
})], m.prototype, "columns", void 0), m = o([
|
|
58
|
+
})], m.prototype, "columns", void 0), m = o([n()], m);
|
|
59
59
|
//#endregion
|
|
60
60
|
export { m as GridHeader };
|
|
61
61
|
|
package/dist/grid/row/row2.js
CHANGED
package/dist/icon/icon2.js
CHANGED
|
@@ -16,7 +16,7 @@ var f = class e extends o {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-icon",
|
|
19
|
-
version: "2.18.
|
|
19
|
+
version: "2.18.2"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -103,7 +103,7 @@ a([l({
|
|
|
103
103
|
})], f.prototype, "name", void 0), a([d()], f.prototype, "svg", void 0);
|
|
104
104
|
function p(t) {
|
|
105
105
|
if (typeof globalThis.customElements?.get == "function") {
|
|
106
|
-
let n = e(t.metadata.version), i = e("2.18.
|
|
106
|
+
let n = e(t.metadata.version), i = e("2.18.2");
|
|
107
107
|
n.minor <= i.minor && n.major <= i.major && (t._icons = {
|
|
108
108
|
...t._icons,
|
|
109
109
|
...r
|
package/dist/iframe/iframe2.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { I18nService as e } from "./internal/services/i18n.service.js";
|
|
|
2
2
|
import { getThemeTokens as t } from "./internal/utils/dom.js";
|
|
3
3
|
import { statusIcons as n } from "./internal/types/index.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
var r = "2.18.
|
|
5
|
+
var r = "2.18.2", i = "@nvidia-elements";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { e as I18nService, i as SCOPE, r as VERSION, t as getThemeTokens, n as statusIcons };
|
|
8
8
|
|
package/dist/input/input2.js
CHANGED
|
@@ -9,8 +9,6 @@ export interface AuditOptions {
|
|
|
9
9
|
}
|
|
10
10
|
export interface AuditMetadata {
|
|
11
11
|
parents?: string[];
|
|
12
|
-
children?: string[];
|
|
13
|
-
disallowedChildren?: string[];
|
|
14
12
|
}
|
|
15
13
|
export declare function audit<T extends Audit>(options?: AuditOptions): ClassDecorator;
|
|
16
14
|
export type Audit = ReactiveElement;
|
|
@@ -1,76 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { getExcessiveInstanceLimitWarning as e, getInvalidParentWarning as t, getMultiplePageWarning as n } from "../utils/audit-logs.js";
|
|
2
|
+
import { GlobalStateService as r } from "../services/global.service.js";
|
|
3
|
+
import { LogService as i } from "../services/log.service.js";
|
|
4
|
+
import { auditParentElement as a } from "../utils/audit.js";
|
|
3
5
|
//#region src/internal/controllers/audit.controller.ts
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t.warn(e);
|
|
6
|
+
var o = 50;
|
|
7
|
+
function s(e = {}) {
|
|
8
|
+
return (t) => t.addInitializer((t) => new c(t, e));
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
var o = class {
|
|
13
|
-
get #e() {
|
|
14
|
-
return e.state.audit[this.host.localName] ?? { count: 0 };
|
|
15
|
-
}
|
|
10
|
+
var c = class {
|
|
11
|
+
#e = !1;
|
|
16
12
|
get #t() {
|
|
17
|
-
return
|
|
13
|
+
return r.state.audit[this.host.localName] ?? { count: 0 };
|
|
18
14
|
}
|
|
19
15
|
get #n() {
|
|
16
|
+
return r.state.env === "production";
|
|
17
|
+
}
|
|
18
|
+
get #r() {
|
|
20
19
|
return this.host.constructor.metadata;
|
|
21
20
|
}
|
|
22
21
|
constructor(e, t) {
|
|
23
|
-
this.host = e, this.options = t, this.#
|
|
22
|
+
this.host = e, this.options = t, this.#n || (this.host.addController(this), this.#i());
|
|
24
23
|
}
|
|
25
24
|
async hostConnected() {
|
|
26
|
-
await this.host.updateComplete, this.#
|
|
25
|
+
this.#n || this.#a(), await this.host.updateComplete, !this.#n && this.host.isConnected && this.#c();
|
|
27
26
|
}
|
|
28
27
|
hostDisconnected() {
|
|
29
|
-
this.#
|
|
30
|
-
}
|
|
31
|
-
#r() {
|
|
32
|
-
e.state.audit[this.host.localName] || this.#o({ [this.host.localName]: { count: 0 } });
|
|
28
|
+
this.#o();
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (this.#e.count > this.options.excessiveInstanceLimit && !this.#e.excessiveInstanceLimitAudited) {
|
|
37
|
-
let { getExcessiveInstanceLimitWarning: e } = await import("../utils/audit-logs.js");
|
|
38
|
-
i(e(this.#e.count, this.host.localName)), this.#o({ [this.host.localName]: {
|
|
39
|
-
count: this.#e.count + 1,
|
|
40
|
-
excessiveInstanceLimitAudited: !0
|
|
41
|
-
} });
|
|
42
|
-
} else this.#o({ [this.host.localName]: { count: this.#e.count + 1 } });
|
|
43
|
-
}
|
|
30
|
+
#i() {
|
|
31
|
+
r.state.audit[this.host.localName] || this.#s({ [this.host.localName]: { count: 0 } });
|
|
44
32
|
}
|
|
45
33
|
#a() {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
let t = this.options.excessiveInstanceLimit;
|
|
35
|
+
if (t === void 0 || this.#e) return;
|
|
36
|
+
this.#e = !0;
|
|
37
|
+
let r = (this.#t.count ?? 0) + 1, a = this.#t.excessiveInstanceLimitAudited ?? !1, o = r > t && !a;
|
|
38
|
+
this.#s({ [this.host.localName]: {
|
|
39
|
+
count: r,
|
|
40
|
+
excessiveInstanceLimitAudited: a || o
|
|
41
|
+
} }), o && this.#e && i.warn(this.host.localName === "nve-page" ? n(r) : e(r, this.host.localName));
|
|
50
42
|
}
|
|
51
|
-
#o(
|
|
52
|
-
e
|
|
43
|
+
#o() {
|
|
44
|
+
let e = this.options.excessiveInstanceLimit;
|
|
45
|
+
if (e === void 0 || !this.#e) return;
|
|
46
|
+
this.#e = !1;
|
|
47
|
+
let t = Math.max(0, (this.#t.count ?? 0) - 1);
|
|
48
|
+
this.#s({ [this.host.localName]: {
|
|
49
|
+
count: t,
|
|
50
|
+
excessiveInstanceLimitAudited: t > e && this.#t.excessiveInstanceLimitAudited
|
|
51
|
+
} });
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
let [e, t] = n(this.host);
|
|
57
|
-
if (e.length) {
|
|
58
|
-
let { getInvalidSlottedChildrenWarning: e } = await import("../utils/audit-logs.js");
|
|
59
|
-
i(e(this.host.localName, t));
|
|
60
|
-
}
|
|
61
|
-
}
|
|
53
|
+
#s(e) {
|
|
54
|
+
r.dispatch("NVE_ELEMENTS_AUDIT_UPDATE", { audit: e });
|
|
62
55
|
}
|
|
63
|
-
|
|
64
|
-
if (this.#
|
|
65
|
-
let [e, n] =
|
|
66
|
-
|
|
67
|
-
let { getInvalidParentWarning: e } = await import("../utils/audit-logs.js");
|
|
68
|
-
i(e(this.host.localName, n.join(", ")));
|
|
69
|
-
}
|
|
56
|
+
#c() {
|
|
57
|
+
if (this.#r.parents) {
|
|
58
|
+
let [e, n] = a(this.host);
|
|
59
|
+
e || i.warn(t(this.host.localName, n.join(", ")));
|
|
70
60
|
}
|
|
71
61
|
}
|
|
72
62
|
};
|
|
73
63
|
//#endregion
|
|
74
|
-
export {
|
|
64
|
+
export { c as AuditController, s as audit, o as excessiveInstanceLimit };
|
|
75
65
|
|
|
76
66
|
//# sourceMappingURL=audit.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.controller.js","names":[],"sources":["../../../src/internal/controllers/audit.controller.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport type { LegacyDecoratorTarget } from '../types/index.js';\nimport { GlobalStateService } from '../services/global.service.js';\nimport {
|
|
1
|
+
{"version":3,"file":"audit.controller.js","names":[],"sources":["../../../src/internal/controllers/audit.controller.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport type { LegacyDecoratorTarget } from '../types/index.js';\nimport { GlobalStateService } from '../services/global.service.js';\nimport { LogService } from '../services/log.service.js';\nimport { auditParentElement } from '../utils/audit.js';\nimport {\n getExcessiveInstanceLimitWarning,\n getInvalidParentWarning,\n getMultiplePageWarning\n} from '../utils/audit-logs.js';\n\nexport const excessiveInstanceLimit = 50;\n\nexport interface AuditOptions {\n excessiveInstanceLimit?: number;\n alternates?: { name: string; use: string }[];\n}\n\nexport interface AuditMetadata {\n parents?: string[];\n}\n\ninterface AuditRegistry {\n [key: string]: {\n count?: number;\n excessiveInstanceLimitAudited?: boolean;\n };\n}\n\nexport function audit<T extends Audit>(options: AuditOptions = {}): ClassDecorator {\n return (target: LegacyDecoratorTarget) =>\n target.addInitializer!((instance: T) => new AuditController(instance, options));\n}\n\nexport type Audit = ReactiveElement;\n\nexport class AuditController<T extends Audit> implements ReactiveController {\n #counted = false;\n\n get #hostAuditState() {\n return GlobalStateService.state.audit[this.host.localName] ?? { count: 0 };\n }\n\n get #production() {\n return GlobalStateService.state.env === 'production';\n }\n\n get #hostMetadata() {\n return (this.host.constructor as unknown as { metadata: AuditMetadata }).metadata;\n }\n\n constructor(\n private host: T,\n private options: AuditOptions\n ) {\n if (!this.#production) {\n this.host.addController(this);\n this.#initializeAudit();\n }\n }\n\n async hostConnected() {\n if (!this.#production) this.#auditExcessiveInstanceLimit();\n await this.host.updateComplete;\n if (!this.#production && this.host.isConnected) {\n this.#auditParentElement();\n }\n }\n\n hostDisconnected() {\n this.#cleanupExcessiveInstanceLimit();\n }\n\n #initializeAudit() {\n if (!GlobalStateService.state.audit[this.host.localName]) {\n this.#update({ [this.host.localName]: { count: 0 } });\n }\n }\n\n #auditExcessiveInstanceLimit() {\n const limit = this.options.excessiveInstanceLimit;\n if (limit === undefined || this.#counted) return;\n\n this.#counted = true;\n const count = (this.#hostAuditState.count ?? 0) + 1;\n const audited = this.#hostAuditState.excessiveInstanceLimitAudited ?? false;\n const shouldWarn = count > limit && !audited;\n this.#update({ [this.host.localName]: { count, excessiveInstanceLimitAudited: audited || shouldWarn } });\n\n if (shouldWarn && this.#counted) {\n LogService.warn(\n this.host.localName === 'nve-page'\n ? getMultiplePageWarning(count)\n : getExcessiveInstanceLimitWarning(count, this.host.localName)\n );\n }\n }\n\n #cleanupExcessiveInstanceLimit() {\n const limit = this.options.excessiveInstanceLimit;\n if (limit === undefined || !this.#counted) return;\n\n this.#counted = false;\n const count = Math.max(0, (this.#hostAuditState.count ?? 0) - 1);\n this.#update({\n [this.host.localName]: {\n count,\n excessiveInstanceLimitAudited: count > limit && this.#hostAuditState.excessiveInstanceLimitAudited\n }\n });\n }\n\n #update(registry: AuditRegistry) {\n GlobalStateService.dispatch('NVE_ELEMENTS_AUDIT_UPDATE', { audit: registry } as Partial<\n typeof globalThis.NVE_ELEMENTS.state\n >);\n }\n\n #auditParentElement() {\n if (this.#hostMetadata.parents) {\n const [valid, validParents] = auditParentElement(this.host);\n if (!valid) {\n LogService.warn(getInvalidParentWarning(this.host.localName, validParents.join(', ')));\n }\n }\n }\n}\n"],"mappings":";;;;;AAcA,IAAa,IAAyB;AAkBtC,SAAgB,EAAuB,IAAwB,CAAC,GAAmB;CACjF,QAAQ,MACN,EAAO,gBAAiB,MAAgB,IAAI,EAAgB,GAAU,CAAO,CAAC;AAClF;AAIA,IAAa,IAAb,MAA4E;CAC1E,KAAW;CAEX,IAAI,KAAkB;EACpB,OAAO,EAAmB,MAAM,MAAM,KAAK,KAAK,cAAc,EAAE,OAAO,EAAE;CAC3E;CAEA,IAAI,KAAc;EAChB,OAAO,EAAmB,MAAM,QAAQ;CAC1C;CAEA,IAAI,KAAgB;EAClB,OAAQ,KAAK,KAAK,YAAuD;CAC3E;CAEA,YACE,GACA,GACA;EACA,AAHQ,KAAA,OAAA,GACA,KAAA,UAAA,GAEH,KAAK,OACR,KAAK,KAAK,cAAc,IAAI,GAC5B,KAAK,GAAiB;CAE1B;CAEA,MAAM,gBAAgB;EAGpB,AAFK,KAAK,MAAa,KAAK,GAA6B,GACzD,MAAM,KAAK,KAAK,gBACZ,CAAC,KAAK,MAAe,KAAK,KAAK,eACjC,KAAK,GAAoB;CAE7B;CAEA,mBAAmB;EACjB,KAAK,GAA+B;CACtC;CAEA,KAAmB;EACjB,AAAK,EAAmB,MAAM,MAAM,KAAK,KAAK,cAC5C,KAAK,GAAQ,GAAG,KAAK,KAAK,YAAY,EAAE,OAAO,EAAE,EAAE,CAAC;CAExD;CAEA,KAA+B;EAC7B,IAAM,IAAQ,KAAK,QAAQ;EAC3B,IAAI,MAAU,KAAA,KAAa,KAAK,IAAU;EAE1C,KAAK,KAAW;EAChB,IAAM,KAAS,KAAK,GAAgB,SAAS,KAAK,GAC5C,IAAU,KAAK,GAAgB,iCAAiC,IAChE,IAAa,IAAQ,KAAS,CAAC;EAGrC,AAFA,KAAK,GAAQ,GAAG,KAAK,KAAK,YAAY;GAAE;GAAO,+BAA+B,KAAW;EAAW,EAAE,CAAC,GAEnG,KAAc,KAAK,MACrB,EAAW,KACT,KAAK,KAAK,cAAc,aACpB,EAAuB,CAAK,IAC5B,EAAiC,GAAO,KAAK,KAAK,SAAS,CACjE;CAEJ;CAEA,KAAiC;EAC/B,IAAM,IAAQ,KAAK,QAAQ;EAC3B,IAAI,MAAU,KAAA,KAAa,CAAC,KAAK,IAAU;EAE3C,KAAK,KAAW;EAChB,IAAM,IAAQ,KAAK,IAAI,IAAI,KAAK,GAAgB,SAAS,KAAK,CAAC;EAC/D,KAAK,GAAQ,GACV,KAAK,KAAK,YAAY;GACrB;GACA,+BAA+B,IAAQ,KAAS,KAAK,GAAgB;EACvE,EACF,CAAC;CACH;CAEA,GAAQ,GAAyB;EAC/B,EAAmB,SAAS,6BAA6B,EAAE,OAAO,EAAS,CAE1E;CACH;CAEA,KAAsB;EACpB,IAAI,KAAK,GAAc,SAAS;GAC9B,IAAM,CAAC,GAAO,KAAgB,EAAmB,KAAK,IAAI;GAC1D,AAAK,KACH,EAAW,KAAK,EAAwB,KAAK,KAAK,WAAW,EAAa,KAAK,IAAI,CAAC,CAAC;EAEzF;CACF;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GlobalStateService as e } from "../services/global.service.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { LogService as t } from "../services/log.service.js";
|
|
3
|
+
import { throttle as n } from "../utils/events.js";
|
|
4
4
|
import { focusElement as r, getActiveElement as i, isSimpleFocusable as a, setActiveKeyListItem as o } from "../utils/focus.js";
|
|
5
5
|
import { KeynavCode as s, getFlattenedDOMTree as c, getFlattenedFocusableItems as l, hasInvalidDOMGrid as u, isContextMenuClick as d, validKeyNavigationCode as f } from "../utils/dom.js";
|
|
6
6
|
//#region src/internal/controllers/keynav-grid.controller.ts
|
|
@@ -12,7 +12,7 @@ var m = class {
|
|
|
12
12
|
#t;
|
|
13
13
|
#n;
|
|
14
14
|
#r = /* @__PURE__ */ new WeakSet();
|
|
15
|
-
#i =
|
|
15
|
+
#i = n(() => this.#c(), 500, { trailing: !0 });
|
|
16
16
|
get #a() {
|
|
17
17
|
return {
|
|
18
18
|
grid: this.host,
|
|
@@ -68,21 +68,21 @@ var m = class {
|
|
|
68
68
|
n && this.#p(e, n);
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
#f = (
|
|
72
|
-
if (!f(
|
|
71
|
+
#f = (n) => {
|
|
72
|
+
if (!f(n)) return;
|
|
73
73
|
this.#u();
|
|
74
74
|
let r = Array.from(this.#o), o = Array.from(this.#s);
|
|
75
75
|
if (e.state.env !== "production" && u(r)) {
|
|
76
|
-
|
|
76
|
+
t.warn("Invalid grid structure, all rows must have the same number of cells");
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
79
|
if (a(i())) {
|
|
80
|
-
let { x: e, y:
|
|
81
|
-
code:
|
|
82
|
-
ctrlKey:
|
|
80
|
+
let { x: e, y: t } = _(o, r, {
|
|
81
|
+
code: n.code,
|
|
82
|
+
ctrlKey: n.ctrlKey,
|
|
83
83
|
dir: this.host.dir
|
|
84
|
-
}), i = Array.from(c(r[
|
|
85
|
-
this.#p(
|
|
84
|
+
}), i = Array.from(c(r[t])).filter((e) => !!o.find((t) => t === e))[e];
|
|
85
|
+
this.#p(n, i), n.preventDefault();
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
88
|
#p(e, t) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { focusElement as e } from "../utils/focus.js";
|
|
2
|
-
import { clickOutsideElementBounds as t, generateId as n
|
|
3
|
-
import { attachInternals as
|
|
4
|
-
import { getHostAnchor as
|
|
2
|
+
import { clickOutsideElementBounds as t, generateId as n } from "../utils/dom.js";
|
|
3
|
+
import { attachInternals as r } from "../utils/a11y.js";
|
|
4
|
+
import { getHostAnchor as i, getHostTrigger as a, hasOpenPopover as o } from "./type-native-popover.utils.js";
|
|
5
5
|
//#region src/internal/controllers/type-native-popover.controller.ts
|
|
6
|
-
var
|
|
6
|
+
var s = class {
|
|
7
7
|
get #e() {
|
|
8
8
|
let e = this.host.getRootNode(), t = Array.from(e.querySelectorAll(`[popovertarget="${CSS.escape ? CSS.escape(this.host.id) : this.host.id}"]`)), n = Array.from(e.querySelectorAll(`[commandfor="${CSS.escape ? CSS.escape(this.host.id) : this.host.id}"]`)), r = Array.from(e.querySelectorAll(`[interestfor="${CSS.escape ? CSS.escape(this.host.id) : this.host.id}"]`));
|
|
9
9
|
return [
|
|
@@ -18,12 +18,12 @@ var c = class {
|
|
|
18
18
|
this.host.showPopover = (e) => {
|
|
19
19
|
if (this.host.isConnected) {
|
|
20
20
|
let n = e?.source ?? null;
|
|
21
|
-
n ||= this.host.anchor ?
|
|
21
|
+
n ||= this.host.anchor ? i(this.host) : this.host.trigger ? a(this.host, this.host.trigger) : globalThis.document.activeElement, t.call(this.host, { source: n });
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
async hostConnected() {
|
|
26
|
-
|
|
26
|
+
r(this.host), this.host.popover = this.host.popoverType ?? null, await this.host.updateComplete, this.host.isConnected && (this.host.setAttribute("nve-popover", ""), this.#m(), this.#p(), this.#d(), this.host.inert = this.host.matches(":not(:popover-open)") && !!this.#e.length, this.host.addEventListener("beforetoggle", this.#b), this.host.addEventListener("toggle", this.#x), this.host.addEventListener("command", this.#S), this.host.addEventListener("interest", this.#C), this.host.addEventListener("loseinterest", this.#w));
|
|
27
27
|
}
|
|
28
28
|
#t = null;
|
|
29
29
|
#n = null;
|
|
@@ -56,12 +56,17 @@ var c = class {
|
|
|
56
56
|
this.host.removeEventListener("pointerdown", this.#T), this.host.removeEventListener("pointerup", this.#E), this.host.addEventListener("pointerdown", this.#T), this.host.addEventListener("pointerup", this.#E);
|
|
57
57
|
}
|
|
58
58
|
get #f() {
|
|
59
|
-
return this.host.trigger ?
|
|
59
|
+
return this.host.trigger ? a(this.host, this.host.trigger) : null;
|
|
60
60
|
}
|
|
61
61
|
async #p() {
|
|
62
|
-
await new Promise((e) => requestAnimationFrame(e))
|
|
62
|
+
await new Promise((e) => requestAnimationFrame(e));
|
|
63
|
+
let e = new MutationObserver(() => {
|
|
63
64
|
this.host.isConnected && !this.host.hidden && !this.host.matches(":popover-open") && this.host.showPopover(), this.host.isConnected && this.host.hidden && this.host.matches(":popover-open") && this.host.hidePopover();
|
|
64
|
-
})
|
|
65
|
+
});
|
|
66
|
+
e.observe(this.host, {
|
|
67
|
+
attributes: !0,
|
|
68
|
+
attributeFilter: ["hidden"]
|
|
69
|
+
}), this.#r.push(e), this.host.isConnected && !this.#e.length && !this.host.hidden && !this.host.matches(":popover-open") && (this.host.popover = "manual", this.host.showPopover());
|
|
65
70
|
}
|
|
66
71
|
#m() {
|
|
67
72
|
let e = this.#f;
|
|
@@ -114,7 +119,7 @@ var c = class {
|
|
|
114
119
|
this.host.modal && this.host.matches(":popover-open") && (this.#u = t(e, this.host));
|
|
115
120
|
};
|
|
116
121
|
#E = (e) => {
|
|
117
|
-
this.#u && this.host.popoverDismissible && this.host.modal && this.host.matches(":popover-open") && !
|
|
122
|
+
this.#u && this.host.popoverDismissible && this.host.modal && this.host.matches(":popover-open") && !o(this.host) && t(e, this.host) && this.host.hidePopover();
|
|
118
123
|
};
|
|
119
124
|
#D = (e) => {
|
|
120
125
|
this.host.showPopover({ source: e.currentTarget });
|
|
@@ -124,6 +129,6 @@ var c = class {
|
|
|
124
129
|
};
|
|
125
130
|
};
|
|
126
131
|
//#endregion
|
|
127
|
-
export {
|
|
132
|
+
export { s as TypeNativePopoverController };
|
|
128
133
|
|
|
129
134
|
//# sourceMappingURL=type-native-popover.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-native-popover.controller.js","names":[],"sources":["../../../src/internal/controllers/type-native-popover.controller.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport { clickOutsideElementBounds, generateId, getAttributeListChanges } from '../utils/dom.js';\nimport { attachInternals } from '../utils/a11y.js';\nimport { focusElement } from '../utils/focus.js';\nimport { getHostAnchor, getHostTrigger, hasOpenPopover } from './type-native-popover.utils.js';\nimport type { InterestEvent, PopoverType } from '../types/index.js';\n\nexport interface NativePopover extends ReactiveElement {\n anchor?: HTMLElement | string;\n closeTimeout?: number;\n popoverType?: PopoverType;\n modal?: boolean;\n popoverDismissible?: boolean;\n _activeTrigger?: HTMLElement;\n _internals?: ElementInternals;\n\n /** @deprecated */\n trigger?: HTMLElement | string;\n /** @deprecated */\n openDelay?: number;\n /** @deprecated */\n behaviorTrigger?: boolean;\n}\n\n/**\n * https://open-ui.org/components/popup.research.explainer\n */\nexport class TypeNativePopoverController<T extends NativePopover> implements ReactiveController {\n get #nativeTriggers(): HTMLElement[] {\n const root = this.host.getRootNode() as HTMLElement;\n const popoverTargetTriggers = Array.from(\n root.querySelectorAll(`[popovertarget=\"${CSS.escape ? CSS.escape(this.host.id) : this.host.id}\"]`)\n ) as HTMLElement[];\n\n const commandForTriggers = Array.from(\n root.querySelectorAll(`[commandfor=\"${CSS.escape ? CSS.escape(this.host.id) : this.host.id}\"]`)\n ) as HTMLElement[];\n\n const interestForTriggers = Array.from(\n root.querySelectorAll(`[interestfor=\"${CSS.escape ? CSS.escape(this.host.id) : this.host.id}\"]`)\n ) as HTMLElement[];\n\n return [...popoverTargetTriggers, ...commandForTriggers, ...interestForTriggers];\n }\n\n constructor(private host: T) {\n this.host.addController(this);\n\n const showPopover = this.host.showPopover;\n this.host.showPopover = (options?: ShowPopoverOptions) => {\n if (this.host.isConnected) {\n // provide legacy fallback for source anchor or trigger if not provided, this can happen if the popover is dynamically created in the DOM without the use of the standard popover api or legacy trigger based api\n let source: HTMLElement | Element | null = options?.source ?? null;\n if (!source) {\n if (this.host.anchor) {\n source = getHostAnchor(this.host);\n } else if (this.host.trigger) {\n source = getHostTrigger(this.host, this.host.trigger);\n } else {\n source = globalThis.document.activeElement;\n }\n }\n\n showPopover.call(this.host, { source: source as HTMLElement });\n }\n };\n }\n\n async hostConnected() {\n attachInternals(this.host);\n this.host.popover = this.host.popoverType ?? null;\n await this.host.updateComplete;\n if (!this.host.isConnected) return;\n\n this.host.setAttribute('nve-popover', '');\n this.#updateLegacyTriggers();\n this.#setupLegacyTriggers(); // eslint-disable-line @typescript-eslint/no-floating-promises\n this.#setupModalLightDismiss();\n this.host.inert = this.host.matches(':not(:popover-open)') && !!this.#nativeTriggers.length;\n\n this.host.addEventListener('beforetoggle', this.#onBeforeToggle);\n this.host.addEventListener('toggle', this.#onToggle as EventListener);\n this.host.addEventListener('command', this.#onCommand as EventListener);\n this.host.addEventListener('interest', this.#onInterest as EventListener);\n this.host.addEventListener('loseinterest', this.#onLoseInterest as EventListener);\n }\n\n #interestTimeout: ReturnType<typeof setTimeout> | null = null;\n #closeTimeout: ReturnType<typeof setTimeout> | null = null;\n #observers: MutationObserver[] = [];\n #previousLegacyTrigger: HTMLButtonElement | null = null;\n #hintTrigger: HTMLButtonElement | null = null;\n\n async hostUpdated() {\n this.host.popover = this.host.popoverType ?? null;\n this.#updateLegacyTriggers();\n }\n\n hostDisconnected() {\n this.#observers.forEach(observer => observer.disconnect());\n this.#observers.length = 0;\n this.host.removeEventListener('beforetoggle', this.#onBeforeToggle);\n this.host.removeEventListener('toggle', this.#onToggle as EventListener);\n this.host.removeEventListener('command', this.#onCommand as EventListener);\n this.host.removeEventListener('interest', this.#onInterest as EventListener);\n this.host.removeEventListener('loseinterest', this.#onLoseInterest as EventListener);\n this.host.removeEventListener('pointerdown', this.#onPointerDown);\n this.host.removeEventListener('pointerup', this.#onPointerUp);\n this.#removeHintTrigger();\n this.#clearInterestTimeout();\n this.#clearCloseTimeout();\n }\n\n #setCloseTimeout() {\n this.#clearCloseTimeout();\n if (this.host.closeTimeout) {\n this.#closeTimeout = setTimeout(() => this.host.hidePopover(), this.host.closeTimeout);\n }\n }\n\n #clearCloseTimeout() {\n if (this.#closeTimeout) {\n clearTimeout(this.#closeTimeout);\n this.#closeTimeout = null;\n }\n }\n\n #clearInterestTimeout() {\n if (this.#interestTimeout) {\n clearTimeout(this.#interestTimeout);\n this.#interestTimeout = null;\n }\n }\n\n #parseInterestDelay(): number {\n const style = getComputedStyle(this.host);\n const raw = (style as unknown as { interestDelayStart: string }).interestDelayStart;\n if (!raw) {\n return 0;\n }\n const value = parseFloat(raw);\n return raw.endsWith('ms') ? value : value * 1000;\n }\n\n #pointerdownWithinModal = false;\n\n #setupModalLightDismiss() {\n this.host.removeEventListener('pointerdown', this.#onPointerDown);\n this.host.removeEventListener('pointerup', this.#onPointerUp);\n this.host.addEventListener('pointerdown', this.#onPointerDown);\n this.host.addEventListener('pointerup', this.#onPointerUp);\n }\n\n get #legacyHostTrigger(): HTMLElement | null {\n return this.host.trigger ? (getHostTrigger(this.host, this.host.trigger) as HTMLButtonElement) : null;\n }\n\n /**\n * @deprecated Legacy behavior that allows popovers to show as open by default when using the legacy trigger based api\n */\n async #setupLegacyTriggers() {\n await new Promise(r => requestAnimationFrame(r));\n\n // setup hidden updates for legacy triggers\n this.#observers.push(\n getAttributeListChanges(this.host, ['hidden'], () => {\n if (this.host.isConnected && !this.host.hidden && !this.host.matches(':popover-open')) {\n this.host.showPopover();\n }\n\n if (this.host.isConnected && this.host.hidden && this.host.matches(':popover-open')) {\n this.host.hidePopover();\n }\n })\n );\n\n // determine if popover is open by default\n if (\n this.host.isConnected &&\n !this.#nativeTriggers.length &&\n !this.host.hidden &&\n !this.host.matches(':popover-open')\n ) {\n this.host.popover = 'manual';\n this.host.showPopover();\n }\n }\n\n /**\n * @deprecated Legacy behavior that allows popovers to show as open by default when using the legacy trigger based api\n */\n #updateLegacyTriggers() {\n const trigger = this.#legacyHostTrigger as HTMLButtonElement;\n\n if (this.#previousLegacyTrigger && this.#previousLegacyTrigger !== trigger) {\n this.#clearLegacyTrigger(this.#previousLegacyTrigger);\n }\n\n if (this.#hintTrigger && this.#hintTrigger !== trigger) {\n this.#removeHintTrigger();\n }\n\n if (!trigger) {\n this.#previousLegacyTrigger = null;\n return;\n }\n\n if (this.host.popoverType === 'hint') {\n this.#setupHintTrigger(trigger);\n } else {\n this.#setupPopoverTargetTrigger(trigger);\n }\n this.#previousLegacyTrigger = trigger;\n }\n\n #setupHintTrigger(trigger: HTMLButtonElement) {\n if (this.#hintTrigger === trigger) return;\n\n trigger.addEventListener('mouseenter', this.#onHintMouseEnter);\n trigger.addEventListener('mouseleave', this.#onHintMouseLeave);\n trigger.addEventListener('focusout', this.#onHintMouseLeave);\n this.#hintTrigger = trigger;\n }\n\n #setupPopoverTargetTrigger(trigger: HTMLButtonElement) {\n this.#removeHintTrigger();\n this.host.id = this.host.id ? this.host.id : generateId();\n trigger.popoverTargetElement = this.host;\n trigger.setAttribute('popovertarget', this.host.id);\n }\n\n #toggleFocus(open: boolean, target: HTMLElement) {\n if (open) {\n // only focus popover if not the active element and not containing the active element already\n if ((this.host.getRootNode() as Document).activeElement !== this.host && !this.host.shadowRoot!.activeElement) {\n focusElement(this.host);\n }\n } else {\n focusElement(target);\n }\n }\n\n #clearLegacyTrigger(trigger: HTMLButtonElement) {\n trigger.popoverTargetElement = null;\n trigger.removeAttribute('popovertarget');\n if (this.#hintTrigger === trigger) {\n this.#removeHintTrigger();\n }\n }\n\n #removeHintTrigger() {\n this.#hintTrigger?.removeEventListener('mouseenter', this.#onHintMouseEnter);\n this.#hintTrigger?.removeEventListener('mouseleave', this.#onHintMouseLeave);\n this.#hintTrigger?.removeEventListener('focusout', this.#onHintMouseLeave);\n this.#hintTrigger = null;\n }\n\n #onBeforeToggle = (e: ToggleEvent) => {\n if (e.newState === 'open') {\n this.host._internals!.states.add('transition-start');\n }\n };\n\n #onToggle = (e: ToggleEvent) => {\n if (this.host.behaviorTrigger) {\n this.host.hidden = e.newState === 'closed';\n }\n\n if (e.newState === 'open' && this.host.closeTimeout) {\n this.#setCloseTimeout();\n }\n\n if (e.newState === 'closed') {\n this.#clearInterestTimeout();\n this.#clearCloseTimeout();\n }\n\n this.host.inert = this.host.matches(':not(:popover-open)');\n\n if (this.host.modal) {\n this.#toggleFocus(e.newState === 'open', e.target as HTMLElement);\n }\n\n this.host.dispatchEvent(\n new CustomEvent(e.newState === 'open' && e.oldState !== 'open' ? 'open' : 'close', {\n bubbles: true,\n composed: true,\n detail: { trigger: e.source }\n })\n );\n };\n\n #onCommand = (e: CommandEvent) => {\n if (e.command === 'toggle-popover') {\n this.host.togglePopover({ source: e.source as HTMLElement });\n }\n\n if (e.command === 'hide-popover') {\n this.host.hidePopover();\n this.#clearInterestTimeout();\n }\n\n if (e.command === 'show-popover') {\n this.host.showPopover({ source: e.source as HTMLElement });\n }\n };\n\n #onInterest = (e: InterestEvent) => {\n const isCustomElement = e.source?.localName.includes('-');\n if (isCustomElement) {\n const interestDelayStart = this.host.openDelay ?? this.#parseInterestDelay();\n if (interestDelayStart) {\n this.#interestTimeout = setTimeout(() => {\n if (this.host.isConnected) {\n this.host.showPopover({ source: e.source as HTMLElement });\n }\n }, interestDelayStart);\n } else {\n this.host.showPopover({ source: e.source as HTMLElement });\n }\n }\n };\n\n #onLoseInterest = (e: InterestEvent) => {\n const isCustomElement = e.source?.localName.includes('-');\n if (isCustomElement) {\n this.host.hidePopover();\n }\n\n this.#clearInterestTimeout();\n };\n\n #onPointerDown = (e: PointerEvent) => {\n if (this.host.modal && this.host.matches(':popover-open')) {\n this.#pointerdownWithinModal = clickOutsideElementBounds(e, this.host);\n }\n };\n\n #onPointerUp = (e: PointerEvent) => {\n if (\n this.#pointerdownWithinModal &&\n this.host.popoverDismissible &&\n this.host.modal &&\n this.host.matches(':popover-open') &&\n !hasOpenPopover(this.host) &&\n clickOutsideElementBounds(e, this.host)\n ) {\n this.host.hidePopover();\n }\n };\n\n #onHintMouseEnter = (e: MouseEvent) => {\n this.host.showPopover({ source: e.currentTarget as HTMLElement });\n };\n\n #onHintMouseLeave = () => {\n this.host.hidePopover();\n };\n}\n"],"mappings":";;;;;AA8BA,IAAa,IAAb,MAAgG;CAC9F,IAAI,KAAiC;EACnC,IAAM,IAAO,KAAK,KAAK,YAAY,GAC7B,IAAwB,MAAM,KAClC,EAAK,iBAAiB,mBAAmB,IAAI,SAAS,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,GAAG,CACnG,GAEM,IAAqB,MAAM,KAC/B,EAAK,iBAAiB,gBAAgB,IAAI,SAAS,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,GAAG,CAChG,GAEM,IAAsB,MAAM,KAChC,EAAK,iBAAiB,iBAAiB,IAAI,SAAS,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,GAAG,CACjG;EAEA,OAAO;GAAC,GAAG;GAAuB,GAAG;GAAoB,GAAG;EAAmB;CACjF;CAEA,YAAY,GAAiB;EAC3B,AADkB,KAAA,OAAA,GAClB,KAAK,KAAK,cAAc,IAAI;EAE5B,IAAM,IAAc,KAAK,KAAK;EAC9B,KAAK,KAAK,eAAe,MAAiC;GACxD,IAAI,KAAK,KAAK,aAAa;IAEzB,IAAI,IAAuC,GAAS,UAAU;IAW9D,AAVA,AAMI,MALE,KAAK,KAAK,SACH,EAAc,KAAK,IAAI,IACvB,KAAK,KAAK,UACV,EAAe,KAAK,MAAM,KAAK,KAAK,OAAO,IAE3C,WAAW,SAAS,eAIjC,EAAY,KAAK,KAAK,MAAM,EAAU,UAAsB,CAAC;GAC/D;EACF;CACF;CAEA,MAAM,gBAAgB;EACpB,EAAgB,KAAK,IAAI,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A,MAAkB,MAAoB;EACpC,AAAI,KAAK,KAAK,SAAS,KAAK,KAAK,QAAQ,eAAe,MACtD,KAAK,KAA0B,EAA0B,GAAG,KAAK,IAAI;CAEzE;CAEA,MAAgB,MAAoB;EAClC,AACE,KAAK,MACL,KAAK,KAAK,sBACV,KAAK,KAAK,SACV,KAAK,KAAK,QAAQ,eAAe,KACjC,CAAC,EAAe,KAAK,IAAI,KACzB,EAA0B,GAAG,KAAK,IAAI,KAEtC,KAAK,KAAK,YAAY;CAE1B;CAEA,MAAqB,MAAkB;EACrC,KAAK,KAAK,YAAY,EAAE,QAAQ,EAAE,cAA6B,CAAC;CAClE;CAEA,WAA0B;EACxB,KAAK,KAAK,YAAY;CACxB;AACF"}
|
|
1
|
+
{"version":3,"file":"type-native-popover.controller.js","names":[],"sources":["../../../src/internal/controllers/type-native-popover.controller.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { ReactiveController, ReactiveElement } from 'lit';\nimport { clickOutsideElementBounds, generateId } from '../utils/dom.js';\nimport { attachInternals } from '../utils/a11y.js';\nimport { focusElement } from '../utils/focus.js';\nimport { getHostAnchor, getHostTrigger, hasOpenPopover } from './type-native-popover.utils.js';\nimport type { InterestEvent, PopoverType } from '../types/index.js';\n\nexport interface NativePopover extends ReactiveElement {\n anchor?: HTMLElement | string;\n closeTimeout?: number;\n popoverType?: PopoverType;\n modal?: boolean;\n popoverDismissible?: boolean;\n _activeTrigger?: HTMLElement;\n _internals?: ElementInternals;\n\n /** @deprecated */\n trigger?: HTMLElement | string;\n /** @deprecated */\n openDelay?: number;\n /** @deprecated */\n behaviorTrigger?: boolean;\n}\n\n/**\n * https://open-ui.org/components/popup.research.explainer\n */\nexport class TypeNativePopoverController<T extends NativePopover> implements ReactiveController {\n get #nativeTriggers(): HTMLElement[] {\n const root = this.host.getRootNode() as HTMLElement;\n const popoverTargetTriggers = Array.from(\n root.querySelectorAll(`[popovertarget=\"${CSS.escape ? CSS.escape(this.host.id) : this.host.id}\"]`)\n ) as HTMLElement[];\n\n const commandForTriggers = Array.from(\n root.querySelectorAll(`[commandfor=\"${CSS.escape ? CSS.escape(this.host.id) : this.host.id}\"]`)\n ) as HTMLElement[];\n\n const interestForTriggers = Array.from(\n root.querySelectorAll(`[interestfor=\"${CSS.escape ? CSS.escape(this.host.id) : this.host.id}\"]`)\n ) as HTMLElement[];\n\n return [...popoverTargetTriggers, ...commandForTriggers, ...interestForTriggers];\n }\n\n constructor(private host: T) {\n this.host.addController(this);\n\n const showPopover = this.host.showPopover;\n this.host.showPopover = (options?: ShowPopoverOptions) => {\n if (this.host.isConnected) {\n // provide legacy fallback for source anchor or trigger if not provided, this can happen if the popover is dynamically created in the DOM without the use of the standard popover api or legacy trigger based api\n let source: HTMLElement | Element | null = options?.source ?? null;\n if (!source) {\n if (this.host.anchor) {\n source = getHostAnchor(this.host);\n } else if (this.host.trigger) {\n source = getHostTrigger(this.host, this.host.trigger);\n } else {\n source = globalThis.document.activeElement;\n }\n }\n\n showPopover.call(this.host, { source: source as HTMLElement });\n }\n };\n }\n\n async hostConnected() {\n attachInternals(this.host);\n this.host.popover = this.host.popoverType ?? null;\n await this.host.updateComplete;\n if (!this.host.isConnected) return;\n\n this.host.setAttribute('nve-popover', '');\n this.#updateLegacyTriggers();\n this.#setupLegacyTriggers(); // eslint-disable-line @typescript-eslint/no-floating-promises\n this.#setupModalLightDismiss();\n this.host.inert = this.host.matches(':not(:popover-open)') && !!this.#nativeTriggers.length;\n\n this.host.addEventListener('beforetoggle', this.#onBeforeToggle);\n this.host.addEventListener('toggle', this.#onToggle as EventListener);\n this.host.addEventListener('command', this.#onCommand as EventListener);\n this.host.addEventListener('interest', this.#onInterest as EventListener);\n this.host.addEventListener('loseinterest', this.#onLoseInterest as EventListener);\n }\n\n #interestTimeout: ReturnType<typeof setTimeout> | null = null;\n #closeTimeout: ReturnType<typeof setTimeout> | null = null;\n #observers: MutationObserver[] = [];\n #previousLegacyTrigger: HTMLButtonElement | null = null;\n #hintTrigger: HTMLButtonElement | null = null;\n\n async hostUpdated() {\n this.host.popover = this.host.popoverType ?? null;\n this.#updateLegacyTriggers();\n }\n\n hostDisconnected() {\n this.#observers.forEach(observer => observer.disconnect());\n this.#observers.length = 0;\n this.host.removeEventListener('beforetoggle', this.#onBeforeToggle);\n this.host.removeEventListener('toggle', this.#onToggle as EventListener);\n this.host.removeEventListener('command', this.#onCommand as EventListener);\n this.host.removeEventListener('interest', this.#onInterest as EventListener);\n this.host.removeEventListener('loseinterest', this.#onLoseInterest as EventListener);\n this.host.removeEventListener('pointerdown', this.#onPointerDown);\n this.host.removeEventListener('pointerup', this.#onPointerUp);\n this.#removeHintTrigger();\n this.#clearInterestTimeout();\n this.#clearCloseTimeout();\n }\n\n #setCloseTimeout() {\n this.#clearCloseTimeout();\n if (this.host.closeTimeout) {\n this.#closeTimeout = setTimeout(() => this.host.hidePopover(), this.host.closeTimeout);\n }\n }\n\n #clearCloseTimeout() {\n if (this.#closeTimeout) {\n clearTimeout(this.#closeTimeout);\n this.#closeTimeout = null;\n }\n }\n\n #clearInterestTimeout() {\n if (this.#interestTimeout) {\n clearTimeout(this.#interestTimeout);\n this.#interestTimeout = null;\n }\n }\n\n #parseInterestDelay(): number {\n const style = getComputedStyle(this.host);\n const raw = (style as unknown as { interestDelayStart: string }).interestDelayStart;\n if (!raw) {\n return 0;\n }\n const value = parseFloat(raw);\n return raw.endsWith('ms') ? value : value * 1000;\n }\n\n #pointerdownWithinModal = false;\n\n #setupModalLightDismiss() {\n this.host.removeEventListener('pointerdown', this.#onPointerDown);\n this.host.removeEventListener('pointerup', this.#onPointerUp);\n this.host.addEventListener('pointerdown', this.#onPointerDown);\n this.host.addEventListener('pointerup', this.#onPointerUp);\n }\n\n get #legacyHostTrigger(): HTMLElement | null {\n return this.host.trigger ? (getHostTrigger(this.host, this.host.trigger) as HTMLButtonElement) : null;\n }\n\n /**\n * @deprecated Legacy behavior that allows popovers to show as open by default when using the legacy trigger based api\n */\n async #setupLegacyTriggers() {\n await new Promise(r => requestAnimationFrame(r));\n\n // setup host hidden updates for legacy triggers\n const observer = new MutationObserver(() => {\n if (this.host.isConnected && !this.host.hidden && !this.host.matches(':popover-open')) {\n this.host.showPopover();\n }\n\n if (this.host.isConnected && this.host.hidden && this.host.matches(':popover-open')) {\n this.host.hidePopover();\n }\n });\n observer.observe(this.host, { attributes: true, attributeFilter: ['hidden'] });\n this.#observers.push(observer);\n\n // determine if popover is open by default\n if (\n this.host.isConnected &&\n !this.#nativeTriggers.length &&\n !this.host.hidden &&\n !this.host.matches(':popover-open')\n ) {\n this.host.popover = 'manual';\n this.host.showPopover();\n }\n }\n\n /**\n * @deprecated Legacy behavior that allows popovers to show as open by default when using the legacy trigger based api\n */\n #updateLegacyTriggers() {\n const trigger = this.#legacyHostTrigger as HTMLButtonElement;\n\n if (this.#previousLegacyTrigger && this.#previousLegacyTrigger !== trigger) {\n this.#clearLegacyTrigger(this.#previousLegacyTrigger);\n }\n\n if (this.#hintTrigger && this.#hintTrigger !== trigger) {\n this.#removeHintTrigger();\n }\n\n if (!trigger) {\n this.#previousLegacyTrigger = null;\n return;\n }\n\n if (this.host.popoverType === 'hint') {\n this.#setupHintTrigger(trigger);\n } else {\n this.#setupPopoverTargetTrigger(trigger);\n }\n this.#previousLegacyTrigger = trigger;\n }\n\n #setupHintTrigger(trigger: HTMLButtonElement) {\n if (this.#hintTrigger === trigger) return;\n\n trigger.addEventListener('mouseenter', this.#onHintMouseEnter);\n trigger.addEventListener('mouseleave', this.#onHintMouseLeave);\n trigger.addEventListener('focusout', this.#onHintMouseLeave);\n this.#hintTrigger = trigger;\n }\n\n #setupPopoverTargetTrigger(trigger: HTMLButtonElement) {\n this.#removeHintTrigger();\n this.host.id = this.host.id ? this.host.id : generateId();\n trigger.popoverTargetElement = this.host;\n trigger.setAttribute('popovertarget', this.host.id);\n }\n\n #toggleFocus(open: boolean, target: HTMLElement) {\n if (open) {\n // only focus popover if not the active element and not containing the active element already\n if ((this.host.getRootNode() as Document).activeElement !== this.host && !this.host.shadowRoot!.activeElement) {\n focusElement(this.host);\n }\n } else {\n focusElement(target);\n }\n }\n\n #clearLegacyTrigger(trigger: HTMLButtonElement) {\n trigger.popoverTargetElement = null;\n trigger.removeAttribute('popovertarget');\n if (this.#hintTrigger === trigger) {\n this.#removeHintTrigger();\n }\n }\n\n #removeHintTrigger() {\n this.#hintTrigger?.removeEventListener('mouseenter', this.#onHintMouseEnter);\n this.#hintTrigger?.removeEventListener('mouseleave', this.#onHintMouseLeave);\n this.#hintTrigger?.removeEventListener('focusout', this.#onHintMouseLeave);\n this.#hintTrigger = null;\n }\n\n #onBeforeToggle = (e: ToggleEvent) => {\n if (e.newState === 'open') {\n this.host._internals!.states.add('transition-start');\n }\n };\n\n #onToggle = (e: ToggleEvent) => {\n if (this.host.behaviorTrigger) {\n this.host.hidden = e.newState === 'closed';\n }\n\n if (e.newState === 'open' && this.host.closeTimeout) {\n this.#setCloseTimeout();\n }\n\n if (e.newState === 'closed') {\n this.#clearInterestTimeout();\n this.#clearCloseTimeout();\n }\n\n this.host.inert = this.host.matches(':not(:popover-open)');\n\n if (this.host.modal) {\n this.#toggleFocus(e.newState === 'open', e.target as HTMLElement);\n }\n\n this.host.dispatchEvent(\n new CustomEvent(e.newState === 'open' && e.oldState !== 'open' ? 'open' : 'close', {\n bubbles: true,\n composed: true,\n detail: { trigger: e.source }\n })\n );\n };\n\n #onCommand = (e: CommandEvent) => {\n if (e.command === 'toggle-popover') {\n this.host.togglePopover({ source: e.source as HTMLElement });\n }\n\n if (e.command === 'hide-popover') {\n this.host.hidePopover();\n this.#clearInterestTimeout();\n }\n\n if (e.command === 'show-popover') {\n this.host.showPopover({ source: e.source as HTMLElement });\n }\n };\n\n #onInterest = (e: InterestEvent) => {\n const isCustomElement = e.source?.localName.includes('-');\n if (isCustomElement) {\n const interestDelayStart = this.host.openDelay ?? this.#parseInterestDelay();\n if (interestDelayStart) {\n this.#interestTimeout = setTimeout(() => {\n if (this.host.isConnected) {\n this.host.showPopover({ source: e.source as HTMLElement });\n }\n }, interestDelayStart);\n } else {\n this.host.showPopover({ source: e.source as HTMLElement });\n }\n }\n };\n\n #onLoseInterest = (e: InterestEvent) => {\n const isCustomElement = e.source?.localName.includes('-');\n if (isCustomElement) {\n this.host.hidePopover();\n }\n\n this.#clearInterestTimeout();\n };\n\n #onPointerDown = (e: PointerEvent) => {\n if (this.host.modal && this.host.matches(':popover-open')) {\n this.#pointerdownWithinModal = clickOutsideElementBounds(e, this.host);\n }\n };\n\n #onPointerUp = (e: PointerEvent) => {\n if (\n this.#pointerdownWithinModal &&\n this.host.popoverDismissible &&\n this.host.modal &&\n this.host.matches(':popover-open') &&\n !hasOpenPopover(this.host) &&\n clickOutsideElementBounds(e, this.host)\n ) {\n this.host.hidePopover();\n }\n };\n\n #onHintMouseEnter = (e: MouseEvent) => {\n this.host.showPopover({ source: e.currentTarget as HTMLElement });\n };\n\n #onHintMouseLeave = () => {\n this.host.hidePopover();\n };\n}\n"],"mappings":";;;;;AA8BA,IAAa,IAAb,MAAgG;CAC9F,IAAI,KAAiC;EACnC,IAAM,IAAO,KAAK,KAAK,YAAY,GAC7B,IAAwB,MAAM,KAClC,EAAK,iBAAiB,mBAAmB,IAAI,SAAS,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,GAAG,CACnG,GAEM,IAAqB,MAAM,KAC/B,EAAK,iBAAiB,gBAAgB,IAAI,SAAS,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,GAAG,CAChG,GAEM,IAAsB,MAAM,KAChC,EAAK,iBAAiB,iBAAiB,IAAI,SAAS,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,GAAG,CACjG;EAEA,OAAO;GAAC,GAAG;GAAuB,GAAG;GAAoB,GAAG;EAAmB;CACjF;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GzB,EAAE,YAAY,kBAChB,KAAK,KAAK,YAAY,EAAE,QAAQ,EAAE,OAAsB,CAAC;CAE7D;CAEA,MAAe,MAAqB;EAElC,IADwB,EAAE,QAAQ,UAAU,SAAS,GAAG,GACnC;GACnB,IAAM,IAAqB,KAAK,KAAK,aAAa,KAAK,GAAoB;GAC3E,AAAI,IACF,KAAK,KAAmB,iBAAiB;IACvC,AAAI,KAAK,KAAK,eACZ,KAAK,KAAK,YAAY,EAAE,QAAQ,EAAE,OAAsB,CAAC;GAE7D,GAAG,CAAkB,IAErB,KAAK,KAAK,YAAY,EAAE,QAAQ,EAAE,OAAsB,CAAC;EAE7D;CACF;CAEA,MAAmB,MAAqB;EAMtC,AALwB,EAAE,QAAQ,UAAU,SAAS,GAAG,KAEtD,KAAK,KAAK,YAAY,GAGxB,KAAK,GAAsB;CAC7B;CAEA,MAAkB,MAAoB;EACpC,AAAI,KAAK,KAAK,SAAS,KAAK,KAAK,QAAQ,eAAe,MACtD,KAAK,KAA0B,EAA0B,GAAG,KAAK,IAAI;CAEzE;CAEA,MAAgB,MAAoB;EAClC,AACE,KAAK,MACL,KAAK,KAAK,sBACV,KAAK,KAAK,SACV,KAAK,KAAK,QAAQ,eAAe,KACjC,CAAC,EAAe,KAAK,IAAI,KACzB,EAA0B,GAAG,KAAK,IAAI,KAEtC,KAAK,KAAK,YAAY;CAE1B;CAEA,MAAqB,MAAkB;EACrC,KAAK,KAAK,YAAY,EAAE,QAAQ,EAAE,cAA6B,CAAC;CAClE;CAEA,WAA0B;EACxB,KAAK,KAAK,YAAY;CACxB;AACF"}
|
package/dist/internal/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { DOCS_URL as e, formatFileSize as t, shiftLeft as n } from "./utils/strings.js";
|
|
2
2
|
import { deepMerge as r, formatStandardNumber as i, getDifference as a, isObject as o, isObjectLiteral as s, parseVersion as c } from "./utils/objects.js";
|
|
3
3
|
import { GlobalState as l, GlobalStateService as u } from "./services/global.service.js";
|
|
4
|
-
import {
|
|
4
|
+
import { LogService as d } from "./services/log.service.js";
|
|
5
|
+
import { auditParentElement as f } from "./utils/audit.js";
|
|
5
6
|
import { AuditController as p, audit as m, excessiveInstanceLimit as h } from "./controllers/audit.controller.js";
|
|
6
7
|
import { GestureController as g } from "./controllers/gesture.controller.js";
|
|
7
8
|
import { I18nService as _, I18nService_ as v } from "./services/i18n.service.js";
|
|
8
9
|
import { I18nController as y, i18n as b } from "./controllers/i18n.controller.js";
|
|
9
10
|
import { KeyStateController as x } from "./controllers/key-state.controller.js";
|
|
10
11
|
import { debounce as S, onChildListMutation as C, stopEvent as w, throttle as T } from "./utils/events.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
export { p as AuditController, e as DOCS_URL, g as GestureController, l as GlobalState, u as GlobalStateService, y as I18nController, _ as I18nService, v as I18nService_, xe as KeyNavigationGridController, we as KeyNavigationListController, De as KeyNavigationSpatialController, x as KeyStateController, I as KeynavCode, E as LogService, Pe as StateExpandedController, Ie as StateHighlightedController, Re as StateScrollController, Be as StateSelectedController, ot as TransitionService, He as TypeAnchorController, We as TypeClosableController, Ge as TypeExpandableController, qe as TypeNativePopoverController, Je as TypeSSRController, Ke as TypeSelectableController, L as appendAnchorName, R as appendRootNodeStyle, z as applySlotContentStates, Oe as associateAriaDescribedBy, ke as associateAriaLabel, Ae as associateControlGroup, je as associateDataList, Me as associateLabel, Ne as attachInternals, m as audit, d as auditParentElement, f as auditSlots, B as clickOutsideElementBounds, Qe as colorStateStyles, V as createGhostElement, ct as createLightDismiss, S as debounce, r as deepMerge, H as define, U as defineElement, W as endOfScrollBox, h as excessiveInstanceLimit, ut as finiteOr, D as focusElement, O as focusElementTimeout, t as formatFileSize, i as formatStandardNumber, G as generateId, k as getActiveElement, K as getAnchorNames, q as getAttributeChanges, J as getAttributeListChanges, Y as getChildren, X as getCustomElementRegistry, a as getDifference, Z as getDisplayValue, Q as getElementUpdate, $ as getFlattenedDOMTree, ee as getFlattenedFocusableItems, Se as getNextKeyGridItem, Te as getNextKeyListItem, te as getPropertyChanges, ne as getThemeTokens, re as hasHorizontalScrollBar, ie as hasInvalidDOMGrid, ae as hasScrollBar, Xe as hostAttr, b as i18n, A as initializeKeyListItems, oe as isContextMenuClick, j as isFocusable, M as isImmediateRootActiveElement, o as isObject, s as isObjectLiteral, N as isSimpleFocusable, Ce as keyNavigationGrid, Ee as keyNavigationList, se as matchesElementName, dt as nonnegativeFiniteOr, C as onChildListMutation, lt as onKeys, P as onListboxActivate, ce as openEyeDropper, le as parseTokenNumber, c as parseVersion, at as popoverStyles, ft as positiveFiniteOr, ue as removeAnchorName, de as removeEmptySlotWhitespace, fe as removeEmptyTextNode, pe as sameOrderedStringArray, me as sameRenderRoot, Ze as scopedRegistry, he as scrollBarWidth, F as setActiveKeyListItem, n as shiftLeft, ge as slotContainsOnlyWhitespace, Fe as stateExpanded, Le as stateHighlighted, ze as stateScroll, Ve as stateSelected, st as statusIcons, $e as statusStateStyles, w as stopEvent, _e as styleSheetToString, et as supportStateStyles, nt as supportsCSSLegacyInsetArea, rt as supportsCSSPositionArea, it as supportsNativeCSSAnchorPosition, ve as supportsScopedRegistry, T as throttle, Ue as typeAnchor, Ye as typeSSR, ye as uniqueNonEmptyStrings, tt as useStyles, be as validKeyNavigationCode };
|
|
12
|
+
import { focusElement as E, focusElementTimeout as D, getActiveElement as O, initializeKeyListItems as k, isFocusable as A, isImmediateRootActiveElement as j, isSimpleFocusable as M, onListboxActivate as N, setActiveKeyListItem as P } from "./utils/focus.js";
|
|
13
|
+
import { KeynavCode as F, appendAnchorName as I, appendRootNodeStyle as L, applySlotContentStates as R, clickOutsideElementBounds as z, createGhostElement as B, define as V, defineElement as H, endOfScrollBox as U, generateId as W, getAnchorNames as G, getAttributeChanges as K, getAttributeListChanges as q, getChildren as J, getCustomElementRegistry as Y, getDisplayValue as X, getElementUpdate as Z, getFlattenedDOMTree as Q, getFlattenedFocusableItems as $, getPropertyChanges as ee, getThemeTokens as te, hasHorizontalScrollBar as ne, hasInvalidDOMGrid as re, hasScrollBar as ie, isContextMenuClick as ae, matchesElementName as oe, openEyeDropper as se, parseTokenNumber as ce, removeAnchorName as le, removeEmptySlotWhitespace as ue, removeEmptyTextNode as de, sameOrderedStringArray as fe, sameRenderRoot as pe, scrollBarWidth as me, slotContainsOnlyWhitespace as he, styleSheetToString as ge, supportsScopedRegistry as _e, uniqueNonEmptyStrings as ve, validKeyNavigationCode as ye } from "./utils/dom.js";
|
|
14
|
+
import { KeyNavigationGridController as be, getNextKeyGridItem as xe, keyNavigationGrid as Se } from "./controllers/keynav-grid.controller.js";
|
|
15
|
+
import { KeyNavigationListController as Ce, getNextKeyListItem as we, keyNavigationList as Te } from "./controllers/keynav-list.controller.js";
|
|
16
|
+
import { KeyNavigationSpatialController as Ee } from "./controllers/keynav-spatial.controller.js";
|
|
17
|
+
import { associateAriaDescribedBy as De, associateAriaLabel as Oe, associateControlGroup as ke, associateDataList as Ae, associateLabel as je, attachInternals as Me } from "./utils/a11y.js";
|
|
18
|
+
import { StateExpandedController as Ne, stateExpanded as Pe } from "./controllers/state-expanded.controller.js";
|
|
19
|
+
import { StateHighlightedController as Fe, stateHighlighted as Ie } from "./controllers/state-highlighted.controller.js";
|
|
20
|
+
import { StateScrollController as Le, stateScroll as Re } from "./controllers/state-scroll.controller.js";
|
|
21
|
+
import { StateSelectedController as ze, stateSelected as Be } from "./controllers/state-selected.controller.js";
|
|
22
|
+
import { TypeAnchorController as Ve, typeAnchor as He } from "./controllers/type-anchor.controller.js";
|
|
23
|
+
import { TypeClosableController as Ue } from "./controllers/type-closable.controller.js";
|
|
24
|
+
import { TypeExpandableController as We } from "./controllers/type-expandable.controller.js";
|
|
25
|
+
import { TypeSelectableController as Ge } from "./controllers/type-selectable.controller.js";
|
|
26
|
+
import { TypeNativePopoverController as Ke } from "./controllers/type-native-popover.controller.js";
|
|
27
|
+
import { TypeSSRController as qe, typeSSR as Je } from "./controllers/type-ssr.controller.js";
|
|
28
|
+
import { hostAttr as Ye } from "./decorators/host-attr.js";
|
|
29
|
+
import { scopedRegistry as Xe } from "./decorators/scoped-registry.js";
|
|
30
|
+
import { colorStateStyles as Ze, statusStateStyles as Qe, supportStateStyles as $e, useStyles as et } from "./styles/index.js";
|
|
31
|
+
import { supportsCSSLegacyInsetArea as tt, supportsCSSPositionArea as nt, supportsNativeCSSAnchorPosition as rt } from "./utils/supports.js";
|
|
32
|
+
import { popoverStyles as it } from "./styles/popover2.js";
|
|
33
|
+
import { TransitionService as at } from "./services/transition.service.js";
|
|
34
|
+
import { statusIcons as ot } from "./types/index.js";
|
|
35
|
+
import { createLightDismiss as st, onKeys as ct } from "./utils/keynav.js";
|
|
36
|
+
import { finiteOr as lt, nonnegativeFiniteOr as ut, positiveFiniteOr as dt } from "./utils/numeric.js";
|
|
37
|
+
export { p as AuditController, e as DOCS_URL, g as GestureController, l as GlobalState, u as GlobalStateService, y as I18nController, _ as I18nService, v as I18nService_, be as KeyNavigationGridController, Ce as KeyNavigationListController, Ee as KeyNavigationSpatialController, x as KeyStateController, F as KeynavCode, d as LogService, Ne as StateExpandedController, Fe as StateHighlightedController, Le as StateScrollController, ze as StateSelectedController, at as TransitionService, Ve as TypeAnchorController, Ue as TypeClosableController, We as TypeExpandableController, Ke as TypeNativePopoverController, qe as TypeSSRController, Ge as TypeSelectableController, I as appendAnchorName, L as appendRootNodeStyle, R as applySlotContentStates, De as associateAriaDescribedBy, Oe as associateAriaLabel, ke as associateControlGroup, Ae as associateDataList, je as associateLabel, Me as attachInternals, m as audit, f as auditParentElement, z as clickOutsideElementBounds, Ze as colorStateStyles, B as createGhostElement, st as createLightDismiss, S as debounce, r as deepMerge, V as define, H as defineElement, U as endOfScrollBox, h as excessiveInstanceLimit, lt as finiteOr, E as focusElement, D as focusElementTimeout, t as formatFileSize, i as formatStandardNumber, W as generateId, O as getActiveElement, G as getAnchorNames, K as getAttributeChanges, q as getAttributeListChanges, J as getChildren, Y as getCustomElementRegistry, a as getDifference, X as getDisplayValue, Z as getElementUpdate, Q as getFlattenedDOMTree, $ as getFlattenedFocusableItems, xe as getNextKeyGridItem, we as getNextKeyListItem, ee as getPropertyChanges, te as getThemeTokens, ne as hasHorizontalScrollBar, re as hasInvalidDOMGrid, ie as hasScrollBar, Ye as hostAttr, b as i18n, k as initializeKeyListItems, ae as isContextMenuClick, A as isFocusable, j as isImmediateRootActiveElement, o as isObject, s as isObjectLiteral, M as isSimpleFocusable, Se as keyNavigationGrid, Te as keyNavigationList, oe as matchesElementName, ut as nonnegativeFiniteOr, C as onChildListMutation, ct as onKeys, N as onListboxActivate, se as openEyeDropper, ce as parseTokenNumber, c as parseVersion, it as popoverStyles, dt as positiveFiniteOr, le as removeAnchorName, ue as removeEmptySlotWhitespace, de as removeEmptyTextNode, fe as sameOrderedStringArray, pe as sameRenderRoot, Xe as scopedRegistry, me as scrollBarWidth, P as setActiveKeyListItem, n as shiftLeft, he as slotContainsOnlyWhitespace, Pe as stateExpanded, Ie as stateHighlighted, Re as stateScroll, Be as stateSelected, ot as statusIcons, Qe as statusStateStyles, w as stopEvent, ge as styleSheetToString, $e as supportStateStyles, tt as supportsCSSLegacyInsetArea, nt as supportsCSSPositionArea, rt as supportsNativeCSSAnchorPosition, _e as supportsScopedRegistry, T as throttle, He as typeAnchor, Je as typeSSR, ve as uniqueNonEmptyStrings, et as useStyles, ye as validKeyNavigationCode };
|
|
@@ -19,7 +19,7 @@ var a = class {
|
|
|
19
19
|
i18nRegistry: {},
|
|
20
20
|
audit: {}
|
|
21
21
|
}
|
|
22
|
-
}, globalThis.NVE_ELEMENTS.state.versions = Array.from(/* @__PURE__ */ new Set([...globalThis.NVE_ELEMENTS.state.versions, "2.18.
|
|
22
|
+
}, globalThis.NVE_ELEMENTS.state.versions = Array.from(/* @__PURE__ */ new Set([...globalThis.NVE_ELEMENTS.state.versions, "2.18.2"])), globalThis.NVE_ELEMENTS.state.scopedRegistry ??= {}, globalThis.NVE_ELEMENTS.state.scopedRegistry["2.18.2"] = i(), globalThis.NVE_ELEMENTS.state.versions.length > 1 && globalThis.NVE_ELEMENTS.state.env !== "production" && console.warn(e(), `\n\n${JSON.stringify(globalThis.NVE_ELEMENTS.state.versions, null, 2)}`);
|
|
23
23
|
}
|
|
24
24
|
get state() {
|
|
25
25
|
return globalThis.NVE_ELEMENTS.state;
|