@nvidia-elements/core 2.23.3 → 2.23.5
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 +16 -0
- package/dist/accordion/accordion2.js +49 -49
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +22 -21
- package/dist/alert/alert-group2.js.map +1 -1
- package/dist/alert/alert2.js +29 -28
- package/dist/alert/alert2.js.map +1 -1
- package/dist/avatar/avatar-group2.js +9 -9
- package/dist/avatar/avatar-group2.js.map +1 -1
- package/dist/avatar/avatar2.js +12 -11
- package/dist/avatar/avatar2.js.map +1 -1
- package/dist/badge/badge2.js +27 -26
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +17 -17
- package/dist/breadcrumb/breadcrumb2.js.map +1 -1
- package/dist/bundles/index.js +6 -6
- package/dist/button/button2.js +12 -12
- package/dist/button/button2.js.map +1 -1
- package/dist/button-group/button-group2.js +18 -18
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/card/card2.js +28 -28
- package/dist/card/card2.js.map +1 -1
- package/dist/chat-message/chat-message2.js +15 -14
- package/dist/chat-message/chat-message2.js.map +1 -1
- package/dist/checkbox/checkbox-group2.js +8 -8
- package/dist/checkbox/checkbox-group2.js.map +1 -1
- package/dist/checkbox/checkbox2.js +8 -8
- package/dist/checkbox/checkbox2.js.map +1 -1
- package/dist/color/color2.js +21 -21
- package/dist/color/color2.js.map +1 -1
- package/dist/combobox/combobox2.js +37 -37
- 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 +21 -21
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements.json +0 -76
- package/dist/data.snippets.json +27 -27
- package/dist/date/date2.js +19 -19
- package/dist/date/date2.js.map +1 -1
- package/dist/datetime/datetime2.js +19 -19
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +7 -7
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header2.js +7 -7
- package/dist/dialog/dialog-header2.js.map +1 -1
- package/dist/dialog/dialog.js +1 -1
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/dialog/dialog2.js +25 -25
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/divider2.js +12 -12
- package/dist/divider/divider2.js.map +1 -1
- package/dist/dot/dot2.js +17 -16
- package/dist/dot/dot2.js.map +1 -1
- package/dist/drag-handle/drag-handle2.js +12 -12
- package/dist/drag-handle/drag-handle2.js.map +1 -1
- package/dist/drawer/drawer-content2.js +7 -7
- package/dist/drawer/drawer-content2.js.map +1 -1
- package/dist/drawer/drawer-footer2.js +7 -7
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header2.js +7 -7
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer.js +1 -1
- package/dist/drawer/drawer.js.map +1 -1
- package/dist/drawer/drawer2.js +21 -21
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +7 -7
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header2.js +7 -7
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown2.js +21 -21
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +10 -10
- package/dist/dropdown-group/dropdown-group.js.map +1 -1
- package/dist/dropzone/dropzone2.js +19 -19
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +8 -8
- package/dist/file/file2.js.map +1 -1
- package/dist/format-bytes/format-bytes2.js +13 -13
- package/dist/format-bytes/format-bytes2.js.map +1 -1
- package/dist/format-datetime/format-datetime2.js +14 -14
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/format-number2.js +20 -20
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/format-relative-time2.js +11 -11
- package/dist/format-relative-time/format-relative-time2.js.map +1 -1
- package/dist/format-truncate/format-truncate2.js +21 -21
- package/dist/format-truncate/format-truncate2.js.map +1 -1
- package/dist/forms/control/control2.js +30 -29
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +19 -18
- package/dist/forms/control-group/control-group2.js.map +1 -1
- package/dist/forms/control-message/control-message2.js +15 -15
- package/dist/forms/control-message/control-message2.js.map +1 -1
- package/dist/gauge/gauge2.js +20 -20
- package/dist/gauge/gauge2.js.map +1 -1
- package/dist/ghost/ghost2.js +10 -10
- package/dist/ghost/ghost2.js.map +1 -1
- package/dist/grid/cell/cell2.js +9 -9
- package/dist/grid/cell/cell2.js.map +1 -1
- package/dist/grid/column/column2.js +16 -16
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/footer/footer2.js +12 -12
- package/dist/grid/footer/footer2.js.map +1 -1
- package/dist/grid/grid2.js +30 -30
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header2.js +20 -20
- package/dist/grid/header/header2.js.map +1 -1
- package/dist/grid/placeholder/placeholder2.js +9 -9
- package/dist/grid/placeholder/placeholder2.js.map +1 -1
- package/dist/grid/row/row2.js +15 -15
- package/dist/grid/row/row2.js.map +1 -1
- package/dist/icon/icon2.js +40 -40
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon-button/icon-button2.js +17 -17
- package/dist/icon-button/icon-button2.js.map +1 -1
- package/dist/iframe/iframe2.js +7 -7
- package/dist/iframe/iframe2.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +8 -8
- package/dist/input/input-group2.js.map +1 -1
- package/dist/input/input2.js +10 -10
- package/dist/input/input2.js.map +1 -1
- package/dist/internal/controllers/state-expanded.controller.js +1 -1
- package/dist/internal/controllers/state-expanded.controller.js.map +1 -1
- package/dist/internal/controllers/state-highlighted.controller.js +1 -1
- package/dist/internal/controllers/state-highlighted.controller.js.map +1 -1
- package/dist/internal/controllers/state-scroll.controller.js +1 -1
- package/dist/internal/controllers/state-scroll.controller.js.map +1 -1
- package/dist/internal/controllers/state-selected.controller.js +1 -1
- package/dist/internal/controllers/state-selected.controller.js.map +1 -1
- package/dist/internal/controllers/type-anchor.controller.js +1 -1
- package/dist/internal/controllers/type-anchor.controller.js.map +1 -1
- package/dist/internal/controllers/type-closable.controller.js +1 -1
- package/dist/internal/controllers/type-closable.controller.js.map +1 -1
- package/dist/internal/controllers/type-expandable.controller.js +1 -1
- package/dist/internal/controllers/type-expandable.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.controller.js +6 -6
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/controllers/type-popover.controller.examples.js.map +1 -1
- package/dist/internal/controllers/type-selectable.controller.js +1 -1
- package/dist/internal/controllers/type-selectable.controller.js.map +1 -1
- package/dist/internal/index.d.ts +0 -1
- package/dist/internal/index.js +57 -61
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/styles/index.d.ts +0 -1
- package/dist/internal/styles/index.js +5 -15
- package/dist/internal/styles/index.js.map +1 -1
- package/dist/internal/utils/a11y.d.ts +0 -3
- package/dist/internal/utils/a11y.js +6 -9
- package/dist/internal/utils/a11y.js.map +1 -1
- package/dist/joystick/joystick2.js +19 -19
- package/dist/joystick/joystick2.js.map +1 -1
- package/dist/logo/logo2.js +14 -13
- package/dist/logo/logo2.js.map +1 -1
- package/dist/menu/menu-group2.js +20 -20
- package/dist/menu/menu-group2.js.map +1 -1
- package/dist/menu/menu-item2.js +11 -11
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu2.js +14 -14
- package/dist/menu/menu2.js.map +1 -1
- package/dist/month/month2.js +19 -19
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/notification-group2.js +13 -13
- package/dist/notification/notification-group2.js.map +1 -1
- package/dist/notification/notification2.js +31 -31
- package/dist/notification/notification2.js.map +1 -1
- package/dist/page/page-panel/page-panel-content2.js +7 -7
- package/dist/page/page-panel/page-panel-content2.js.map +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +9 -9
- package/dist/page/page-panel/page-panel-footer2.js.map +1 -1
- package/dist/page/page-panel/page-panel-header2.js +9 -9
- package/dist/page/page-panel/page-panel-header2.js.map +1 -1
- package/dist/page/page-panel/page-panel2.js +15 -15
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +13 -13
- package/dist/page/page2.js.map +1 -1
- package/dist/page-header/page-header2.js +10 -10
- package/dist/page-header/page-header2.js.map +1 -1
- package/dist/page-loader/page-loader2.js +13 -13
- package/dist/page-loader/page-loader2.js.map +1 -1
- package/dist/pagination/pagination2.js +34 -34
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +36 -36
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password2.js +19 -19
- package/dist/password/password2.js.map +1 -1
- package/dist/preferences-input/preferences-input.d.ts +1 -1
- package/dist/preferences-input/preferences-input2.js +25 -25
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +13 -13
- package/dist/progress-bar/progress-bar2.js.map +1 -1
- package/dist/progress-dot/progress-dot2.js +15 -15
- package/dist/progress-dot/progress-dot2.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +20 -20
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +28 -28
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/pulse2.js +15 -15
- package/dist/pulse/pulse2.js.map +1 -1
- package/dist/radio/radio-group2.js +8 -8
- package/dist/radio/radio-group2.js.map +1 -1
- package/dist/radio/radio2.js +8 -8
- package/dist/radio/radio2.js.map +1 -1
- package/dist/range/range2.js +16 -16
- package/dist/range/range2.js.map +1 -1
- package/dist/resize-handle/resize-handle2.js +17 -17
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +20 -20
- package/dist/search/search2.js.map +1 -1
- package/dist/select/select2.js +32 -32
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/skeleton2.js +14 -14
- package/dist/skeleton/skeleton2.js.map +1 -1
- package/dist/sort-button/sort-button.d.ts +1 -1
- package/dist/sort-button/sort-button2.js +16 -16
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline2.js +45 -44
- package/dist/sparkline/sparkline2.js.map +1 -1
- package/dist/star-rating/star-rating2.js +14 -14
- package/dist/star-rating/star-rating2.js.map +1 -1
- package/dist/steps/steps2.js +32 -32
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/switch-group2.js +8 -8
- package/dist/switch/switch-group2.js.map +1 -1
- package/dist/switch/switch2.js +8 -8
- package/dist/switch/switch2.js.map +1 -1
- package/dist/tabs/tabs-group2.js +18 -18
- package/dist/tabs/tabs-group2.js.map +1 -1
- package/dist/tabs/tabs-item-group2.js +9 -9
- package/dist/tabs/tabs-item-group2.js.map +1 -1
- package/dist/tabs/tabs2.js +28 -28
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/tag2.js +19 -18
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +9 -9
- package/dist/textarea/textarea2.js.map +1 -1
- package/dist/time/time2.js +19 -19
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/toast2.js +28 -28
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +7 -7
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +7 -7
- package/dist/toggletip/toggletip-header2.js.map +1 -1
- package/dist/toggletip/toggletip2.js +23 -23
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar2.js +20 -19
- package/dist/toolbar/toolbar2.js.map +1 -1
- package/dist/tooltip/tooltip2.js +20 -20
- package/dist/tooltip/tooltip2.js.map +1 -1
- package/dist/tree/tree-node2.js +39 -39
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +20 -20
- package/dist/tree/tree2.js.map +1 -1
- package/dist/week/week2.js +19 -19
- package/dist/week/week2.js.map +1 -1
- package/dist/workspace/panel/panel2.js +14 -14
- package/dist/workspace/panel/panel2.js.map +1 -1
- package/dist/workspace/panel-content/panel-content2.js +7 -7
- package/dist/workspace/panel-content/panel-content2.js.map +1 -1
- package/dist/workspace/panel-footer/panel-footer2.js +9 -9
- package/dist/workspace/panel-footer/panel-footer2.js.map +1 -1
- package/dist/workspace/panel-header/panel-header2.js +16 -16
- package/dist/workspace/panel-header/panel-header2.js.map +1 -1
- package/dist/workspace/workspace2.js +97 -97
- package/dist/workspace/workspace2.js.map +1 -1
- package/package.json +2 -2
- package/dist/internal/decorators/scoped-registry.d.ts +0 -2
- package/dist/internal/decorators/scoped-registry.js +0 -36
- package/dist/internal/decorators/scoped-registry.js.map +0 -1
- package/dist/internal/styles/base.js +0 -5
- package/dist/internal/styles/base.js.map +0 -1
- package/dist/internal/styles/interaction-state.js +0 -5
- package/dist/internal/styles/interaction-state.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { GestureController as e } from "../internal/controllers/gesture.controller.js";
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
3
|
+
import n from "./joystick.js";
|
|
4
|
+
import { LitElement as r, html as i, isServer as a } from "lit";
|
|
5
|
+
import { property as o } from "lit/decorators/property.js";
|
|
6
|
+
import { I18nController as s } from "@nvidia-elements/foundations/internal/i18n";
|
|
7
|
+
import { styleMap as c } from "lit/directives/style-map.js";
|
|
8
|
+
import { useStyles as l } from "@nvidia-elements/foundations/internal/styles";
|
|
9
9
|
import { FormControlMixin as u } from "@nvidia-elements/forms/mixins";
|
|
10
10
|
// src/joystick/joystick.ts
|
|
11
11
|
var d = {
|
|
@@ -31,14 +31,14 @@ var d = {
|
|
|
31
31
|
x: 0,
|
|
32
32
|
y: 1
|
|
33
33
|
}
|
|
34
|
-
}, p = class extends u(
|
|
34
|
+
}, p = class extends u(r) {
|
|
35
35
|
static {
|
|
36
|
-
this.styles =
|
|
36
|
+
this.styles = l([n]);
|
|
37
37
|
}
|
|
38
38
|
static {
|
|
39
39
|
this.metadata = {
|
|
40
40
|
tag: "nve-joystick",
|
|
41
|
-
version: "2.23.
|
|
41
|
+
version: "2.23.5",
|
|
42
42
|
valueSchema: {
|
|
43
43
|
type: "object",
|
|
44
44
|
properties: {
|
|
@@ -88,7 +88,7 @@ var d = {
|
|
|
88
88
|
super.readOnly = !!e, this.#S();
|
|
89
89
|
}
|
|
90
90
|
constructor() {
|
|
91
|
-
super(), this.constraint = "circle", this.size = "md", this.opacity = !1, this.release = "center", this.keyboardStep = .1, this.announce = "polite", this.#e = new
|
|
91
|
+
super(), this.constraint = "circle", this.size = "md", this.opacity = !1, this.release = "center", this.keyboardStep = .1, this.announce = "polite", this.#e = new s(this, d), this.i18n = this.#e.i18n, this.#t = "", this.#a = !1, this.#o = new e(this, {
|
|
92
92
|
touchAction: () => this.disabled || this.readOnly ? void 0 : "none",
|
|
93
93
|
suppressNativeDrag: !0
|
|
94
94
|
}), this.#s = /* @__PURE__ */ new Set(), this.#l = !1, this.#u = !1, this.#w = (e) => {
|
|
@@ -131,7 +131,7 @@ var d = {
|
|
|
131
131
|
this.#o.target = this;
|
|
132
132
|
}
|
|
133
133
|
willUpdate(e) {
|
|
134
|
-
if (
|
|
134
|
+
if (a && this.hasAttribute("value") && this._handleAttributeChange("value", this.getAttribute("value")), this.#S(), this.announce === "off" && this.#b(), (e.has("constraint") || e.has("release") || e.has("keyboardStep")) && (this.#h("configuration-change"), this.#b(), this.value)) {
|
|
135
135
|
let e = this.#f(this.value);
|
|
136
136
|
h(this.value, e) || (this.value = e);
|
|
137
137
|
}
|
|
@@ -148,7 +148,7 @@ var d = {
|
|
|
148
148
|
x: 0,
|
|
149
149
|
y: 0
|
|
150
150
|
};
|
|
151
|
-
return
|
|
151
|
+
return i`<div internal-host aria-hidden="true"><div class="background"></div><div class="travel"><div class="thumb" ?hidden="${!this.value}" style="${c({
|
|
152
152
|
left: `${(e.x + 1) * 50}%`,
|
|
153
153
|
top: `${(e.y + 1) * 50}%`
|
|
154
154
|
})}"></div></div></div><span class="announcement" role="status" aria-live="${this.announce === "off" ? "off" : "polite"}" aria-atomic="true">${this.#t}</span>`;
|
|
@@ -319,22 +319,22 @@ var d = {
|
|
|
319
319
|
#M;
|
|
320
320
|
#N;
|
|
321
321
|
};
|
|
322
|
-
|
|
322
|
+
t([o({
|
|
323
323
|
type: String,
|
|
324
324
|
reflect: !0
|
|
325
|
-
})], p.prototype, "constraint", void 0),
|
|
325
|
+
})], p.prototype, "constraint", void 0), t([o({
|
|
326
326
|
type: String,
|
|
327
327
|
reflect: !0
|
|
328
|
-
})], p.prototype, "size", void 0),
|
|
328
|
+
})], p.prototype, "size", void 0), t([o({
|
|
329
329
|
type: Boolean,
|
|
330
330
|
reflect: !0
|
|
331
|
-
})], p.prototype, "opacity", void 0),
|
|
331
|
+
})], p.prototype, "opacity", void 0), t([o({
|
|
332
332
|
type: String,
|
|
333
333
|
reflect: !0
|
|
334
|
-
})], p.prototype, "release", void 0),
|
|
334
|
+
})], p.prototype, "release", void 0), t([o({
|
|
335
335
|
type: Number,
|
|
336
336
|
attribute: "keyboard-step"
|
|
337
|
-
})], p.prototype, "keyboardStep", void 0),
|
|
337
|
+
})], p.prototype, "keyboardStep", void 0), t([o({ type: String })], p.prototype, "announce", void 0), t([o({ type: Object })], p.prototype, "i18n", void 0);
|
|
338
338
|
function m(e) {
|
|
339
339
|
return typeof e == "object" && !!e && "x" in e && "y" in e && typeof e.x == "number" && typeof e.y == "number" && Number.isFinite(e.x) && Number.isFinite(e.y) && Object.keys(e).length === 2;
|
|
340
340
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"joystick2.js","names":["styles","_decorate","__decorate","joystick_default","i18nDefaults","directions","Joystick","FormControlMixin","LitElement","useStyles","name","oldValue","newValue","#ownsTabIndex","value","#checkAvailability","#i18nController","I18nController","#announcement","#writingInput","#gestureController","GestureController","#keys","#resetting","#handleGestureInput","event","input","#startPointer","#session","#movePointer","#end","#handleGesture","gesture","#handleKeyDown","direction","#acceptKey","#begin","#moveKey","#handleKeyUp","#handleBlur","#clearFeedback","#handleVisibility","tabIndex","ownsTabIndex","isServer","changes","#constrain","sameVector","#description","position","#describePosition","styleMap","nextValue","isVector","#lastInput","state","data","constraint","length","x","y","session","#queueFeedback","lastInput","#releasePointer","reason","#input","#finishFeedback","formatter","options","format","number","#canAnnounce","#pendingFeedback","#announcementTimer","feedback","message","pointerId","bounds","step","#step","property","first","second"],"sources":["../../src/joystick/joystick.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, type PropertyValues } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport {\n GestureController,\n useStyles,\n type Gesture,\n type GestureInput,\n type Size\n} from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport styles from './joystick.css?inline';\n\nexport interface JoystickValue {\n readonly x: number;\n readonly y: number;\n}\n\nexport type JoystickConstraint = 'circle' | 'square' | 'horizontal' | 'vertical';\nexport type JoystickRelease = 'center' | 'hold';\n\nexport interface JoystickInteractionStart {\n readonly source: 'pointer' | 'keyboard';\n}\n\nexport interface JoystickInteractionEnd extends JoystickInteractionStart {\n readonly reason:\n | 'release'\n | 'escape'\n | 'pointer-cancel'\n | 'lost-capture'\n | 'blur'\n | 'hidden'\n | 'disabled'\n | 'readonly'\n | 'configuration-change'\n | 'reset'\n | 'disconnect';\n}\n\ntype Session = JoystickInteractionStart & { pointerId?: number; changed: boolean };\n\nconst i18nDefaults = {\n joystickPosition: 'X {x}, Y {y}.',\n joystickNoPosition: 'No position.',\n joystickInstructions:\n 'Use arrow keys to adjust the enabled axes. Release to return to center. Press Escape to cancel.',\n joystickHoldInstructions:\n 'Use arrow keys to adjust the enabled axes. Release to keep the position. Escape and interruptions return to center.',\n joystickReturnedToCenter: '{position} Returned to center.'\n} satisfies I18nDefaults;\n\nconst directions: Record<string, JoystickValue> = {\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 },\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 }\n};\n\n/* eslint-disable jsdoc/no-types -- The metadata analyzer needs the inherited generic value type. */\n/**\n * @element nve-joystick\n * @description A joystick selects a normalized two-axis vector with pointer or keyboard input.\n * Applications own physical units, coordinate frames, input shaping, publishing cadence, recording clocks,\n * command-outcome feedback, and alternative controls when needed.\n *\n * Give each joystick an accessible name with a label, aria-label, or aria-labelledby.\n * Editable controls use the application role to receive two-axis keyboard input.\n * The default accessible description includes both normalized coordinates, keyboard instructions, and release behavior.\n * A locked axis stays at zero; an absent value reads \"No position.\" Disabled and read-only controls omit instructions.\n * Coordinates use up to six decimal places and the document language for number formatting.\n * An explicit aria-description or aria-describedby replaces the default focus description through standard ARIA precedence;\n * it does not disable live announcements.\n * @documentation https://nvidia.github.io/elements/docs/elements/joystick/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/joystick\n * @property {JoystickValue | undefined} value - The normalized vector: positive x points right and positive y points down, independent of text direction. Assign a complete finite object within the selected constraint. Invalid vectors throw TypeError without replacing the previous value. Programmatic writes do not dispatch input or change events. Use undefined for an absent sample and a zero vector for recorded neutral input. Set readOnly before assigning replay ownership. User input can replace external writes during an interaction.\n * @attribute {string} value - A JSON object containing normalized x and y coordinates.\n * @event input - Dispatched after user input changes the vector, including a return to neutral. Read .value for the current vector. A held position does not generate repeated events. Publish commands at an application-controlled cadence.\n * @event change - Dispatched after a normal interaction completes and produces input. Cancellation sends any necessary neutral input without change.\n * @event interaction-start - Dispatched with the pointer or keyboard source after setting :state(active), including engagement at neutral.\n * @event interaction-end - Dispatched with the source and terminal reason after clearing :state(active). Interruption first sends any necessary neutral input. Reset restores the declared default without value events. Detached events cannot bubble to former ancestors.\n * @cssprop --width\n * @cssprop --height\n * @cssprop --background\n * @cssprop --opacity - Background opacity when the opacity flag is present. Defaults to 0.6. The border, crosshair, thumb, and focus indicator keep their opacity.\n * @cssprop --border\n * @cssprop --thumb-width\n * @cssprop --thumb-height\n * @cssprop --thumb-background\n * @cssprop --thumb-border\n * @stable false\n */\nexport class Joystick extends FormControlMixin<typeof LitElement, JoystickValue>(LitElement) {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-joystick',\n version: '0.0.0',\n valueSchema: {\n type: 'object' as const,\n properties: {\n x: { type: 'number' as const, minimum: -1, maximum: 1 },\n y: { type: 'number' as const, minimum: -1, maximum: 1 }\n },\n required: ['x', 'y'],\n additionalProperties: false\n }\n };\n\n /**\n * Constrains the movement region or selects one axis. Circle limits vector magnitude to one;\n * square permits both axes at full scale and a magnitude of up to Math.SQRT2.\n * With equally scaled planar velocity axes, square corners allow about 41% greater speed.\n * Mixed forward-velocity and turning-rate axes have no common physical magnitude.\n * Changing the constraint projects the current value silently and cancels an active interaction.\n */\n @property({ type: String, reflect: true }) constraint: JoystickConstraint = 'circle';\n\n /** Sets surface and thumb size. At the default font size, sm is 104px, md is 130px, and lg is 156px. */\n @property({ type: String, reflect: true }) size: Size = 'md';\n\n /** Enables background transparency using the --opacity CSS custom property. */\n @property({ type: Boolean, reflect: true }) opacity = false;\n\n /**\n * Determines whether normal release returns to center or holds the final vector.\n * Interrupted interactions return to neutral in either mode. Form reset restores the declared default instead.\n */\n @property({ type: String, reflect: true }) release: JoystickRelease = 'center';\n\n /**\n * Sets the normalized increment for each arrow key press. Repeated presses continue adjusting;\n * releasing the final arrow applies the release behavior. Escape cancels the interaction.\n * Invalid steps fall back to 0.1. Modifier shortcuts and locked-axis directions remain available to the browser.\n */\n @property({ type: Number, attribute: 'keyboard-step' }) keyboardStep = 0.1;\n\n /**\n * Controls automatic position announcements. Focused user input produces polite announcements at most every 500 ms.\n * A quick tap in center mode reports the input coordinates and the return to center.\n * Escape announces the resulting coordinates without a separate cancellation message.\n * Programmatic writes and read-only playback update the description without live announcements.\n * Set off when the application supplies spoken output, the position description on focus remains available.\n */\n @property({ type: String }) announce: 'polite' | 'off' = 'polite';\n\n readonly #i18nController: I18nController<this> = new I18nController(this, i18nDefaults);\n\n /** Enables updating internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n #announcement = '';\n #pendingFeedback?: { value: JoystickValue; kind: 'position' | 'return' };\n #announcementTimer?: ReturnType<typeof setTimeout>;\n #lastInput?: JoystickValue;\n #writingInput = false;\n\n readonly #gestureController = new GestureController(this, {\n touchAction: () => (this.disabled || this.readOnly ? undefined : 'none'),\n suppressNativeDrag: true\n });\n readonly #keys = new Set<string>();\n #session?: Session;\n #resetting = false;\n #ownsTabIndex = false;\n\n static override get observedAttributes() {\n return [...super.observedAttributes, 'tabindex'];\n }\n\n override attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === 'tabindex') this.#ownsTabIndex = false;\n }\n\n override get disabled(): boolean {\n return super.disabled;\n }\n\n override set disabled(value: boolean | unknown) {\n super.disabled = Boolean(value);\n this.#checkAvailability();\n }\n\n override get readOnly(): boolean {\n return super.readOnly;\n }\n\n override set readOnly(value: boolean | unknown) {\n super.readOnly = Boolean(value);\n this.#checkAvailability();\n }\n\n constructor() {\n super();\n this.value = { x: 0, y: 0 };\n }\n\n connectedCallback() {\n const tabIndex = this.getAttribute('tabindex');\n const ownsTabIndex = this.#ownsTabIndex || tabIndex === null;\n super.connectedCallback();\n // The forms mixin assigns tabindex on connection; keep the caller's focus order.\n if (tabIndex !== null) this.setAttribute('tabindex', tabIndex);\n this.#ownsTabIndex = ownsTabIndex;\n if (this.hasUpdated) this.#gestureController.target = this;\n this.addEventListener('nve-gesture-input', this.#handleGestureInput);\n this.addEventListener('nve-gesture', this.#handleGesture);\n this.addEventListener('keydown', this.#handleKeyDown);\n this.addEventListener('keyup', this.#handleKeyUp);\n this.addEventListener('blur', this.#handleBlur);\n globalThis.window?.addEventListener('blur', this.#handleBlur);\n globalThis.document?.addEventListener('visibilitychange', this.#handleVisibility);\n }\n\n disconnectedCallback() {\n this.#end('disconnect');\n this.#clearFeedback();\n this.removeEventListener('nve-gesture-input', this.#handleGestureInput);\n this.removeEventListener('nve-gesture', this.#handleGesture);\n this.removeEventListener('keydown', this.#handleKeyDown);\n this.removeEventListener('keyup', this.#handleKeyUp);\n this.removeEventListener('blur', this.#handleBlur);\n globalThis.window?.removeEventListener('blur', this.#handleBlur);\n globalThis.document?.removeEventListener('visibilitychange', this.#handleVisibility);\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this.#gestureController.target = this;\n }\n\n willUpdate(changes: PropertyValues<this>) {\n // Lit SSR converts reactive attributes without invoking the forms mixin callback.\n if (isServer && this.hasAttribute('value')) this._handleAttributeChange('value', this.getAttribute('value'));\n this.#checkAvailability();\n if (this.announce === 'off') this.#clearFeedback();\n if (changes.has('constraint') || changes.has('release') || changes.has('keyboardStep')) {\n this.#end('configuration-change');\n this.#clearFeedback();\n if (this.value) {\n const value = this.#constrain(this.value);\n if (!sameVector(this.value, value)) this.value = value;\n }\n }\n }\n\n updated() {\n if (this.#ownsTabIndex || !this.hasAttribute('tabindex')) {\n this.tabIndex = this.disabled ? -1 : 0;\n this.#ownsTabIndex = true;\n }\n // Editable joysticks own the two-axis keyboard interaction, including release and cancellation.\n this._internals.role = this.disabled || this.readOnly ? 'group' : 'application';\n this._internals.ariaLabel = this.ariaLabel || this.composedLabel || null;\n this._internals.ariaReadOnly = null;\n this._internals.ariaDescription = this.#description;\n }\n\n get #description() {\n const position = this.#describePosition(this.value);\n if (this.disabled || this.readOnly) return position;\n const instructions = this.release === 'hold' ? this.i18n.joystickHoldInstructions : this.i18n.joystickInstructions;\n return `${position} ${instructions}`;\n }\n\n render() {\n const value = this.value ?? { x: 0, y: 0 };\n return html`\n <div internal-host aria-hidden=\"true\">\n <div class=\"background\"></div>\n <div class=\"travel\">\n <div class=\"thumb\" ?hidden=${!this.value} style=${styleMap({ left: `${(value.x + 1) * 50}%`, top: `${(value.y + 1) * 50}%` })}></div>\n </div>\n </div>\n <span class=\"announcement\" role=\"status\" aria-live=${this.announce === 'off' ? 'off' : 'polite'} aria-atomic=\"true\">${this.#announcement}</span>\n `;\n }\n\n override updateValue(value: JoystickValue) {\n // Only project the default assignment; writes from reset listeners still use strict validation.\n const nextValue = this.#resetting && isVector(value) ? this.#constrain(value) : value;\n this.#resetting = false;\n if (nextValue !== undefined && (!isVector(nextValue) || !sameVector(nextValue, this.#constrain(nextValue)))) {\n throw new TypeError('Joystick value must contain finite x and y coordinates within its constraint.');\n }\n super.updateValue(nextValue);\n if (!this.#writingInput) {\n this.#lastInput = undefined;\n this.#clearFeedback();\n }\n }\n\n override reset() {\n this.#end('reset');\n this.#clearFeedback();\n this.#resetting = true;\n try {\n super.reset();\n } finally {\n this.#resetting = false;\n }\n }\n\n override formStateRestoreCallback(state: unknown, _reason?: string) {\n if (typeof state !== 'string') return;\n let value: unknown;\n try {\n value = state === '' ? undefined : JSON.parse(state);\n } catch {\n return;\n }\n if (value !== undefined && (!isVector(value) || !sameVector(value, this.#constrain(value)))) return;\n this.#end('reset');\n this.value = value;\n }\n\n override _updateFormState() {\n if (!this.name || !this.value) {\n this._internals.setFormValue(null, this.valueAsString);\n return;\n }\n const data = new FormData();\n data.set(`${this.name}-x`, `${this.value.x}`);\n data.set(`${this.name}-y`, `${this.value.y}`);\n this._internals.setFormValue(data, this.valueAsString);\n }\n\n #constrain({ x, y }: JoystickValue): JoystickValue {\n const constraint = this.hasUpdated ? this.constraint : (this.getAttribute('constraint') ?? this.constraint);\n if (constraint === 'circle') {\n const length = Math.max(1, Math.hypot(x, y));\n return { x: x / length, y: y / length };\n }\n return {\n x: constraint === 'vertical' ? 0 : Math.max(-1, Math.min(1, x)),\n y: constraint === 'horizontal' ? 0 : Math.max(-1, Math.min(1, y))\n };\n }\n\n #begin(session: Session) {\n this.#session = session;\n this.#lastInput = undefined;\n // A later interaction can report identical text after an empty region.\n this.#announcement = '';\n this.requestUpdate();\n this._internals.states.add('active');\n this.dispatchEvent(\n new CustomEvent<JoystickInteractionStart>('interaction-start', {\n bubbles: true,\n composed: true,\n detail: { source: session.source }\n })\n );\n this.#checkAvailability();\n }\n\n #input(value: JoystickValue) {\n if (sameVector(this.value, value)) return;\n this.#writingInput = true;\n try {\n this.value = value;\n } finally {\n this.#writingInput = false;\n }\n if (this.#session) this.#lastInput = value;\n if (this.#session) this.#session.changed = true;\n this.dispatchInputEvent();\n this.#checkAvailability();\n if (this.#session && this.#lastInput === value) this.#queueFeedback(value, 'position');\n }\n\n #end(reason: JoystickInteractionEnd['reason']) {\n const session = this.#session;\n if (!session) return;\n const lastInput = this.#lastInput;\n this.#session = undefined;\n this.#keys.clear();\n this._internals.states.delete('active');\n this.#releasePointer(session.pointerId);\n if (reason !== 'reset' && (reason !== 'release' || this.release !== 'hold')) {\n this.#input({ x: 0, y: 0 });\n }\n this.#finishFeedback(reason, this.#lastInput ? lastInput : undefined);\n if (reason === 'release' && session.changed) this.dispatchChangeEvent();\n this.dispatchEvent(\n new CustomEvent<JoystickInteractionEnd>('interaction-end', {\n bubbles: true,\n composed: true,\n detail: { source: session.source, reason }\n })\n );\n }\n\n #finishFeedback(reason: JoystickInteractionEnd['reason'], lastInput: JoystickValue | undefined) {\n if (reason === 'escape') {\n if (sameVector(this.value, { x: 0, y: 0 })) this.#queueFeedback({ x: 0, y: 0 }, 'position');\n } else if (reason === 'release' && lastInput) {\n if (this.release === 'hold' && sameVector(this.value, lastInput)) this.#queueFeedback(lastInput, 'position');\n else if (this.release !== 'hold' && sameVector(this.value, { x: 0, y: 0 }))\n this.#queueFeedback(lastInput, 'return');\n } else {\n this.#clearFeedback();\n }\n }\n\n #describePosition(value: JoystickValue | undefined): string {\n if (!value) return this.i18n.joystickNoPosition ?? i18nDefaults.joystickNoPosition;\n let formatter: Intl.NumberFormat;\n const options = { maximumFractionDigits: 6, useGrouping: false };\n try {\n formatter = new Intl.NumberFormat(globalThis.document?.documentElement.lang || undefined, options);\n } catch {\n formatter = new Intl.NumberFormat(undefined, options);\n }\n const format = (number: number) => formatter.format(Number(number.toFixed(6)) || 0);\n return (this.i18n.joystickPosition ?? '').replaceAll('{x}', format(value.x)).replaceAll('{y}', format(value.y));\n }\n\n get #canAnnounce() {\n return (\n this.isConnected &&\n this.matches(':focus') &&\n !this.disabled &&\n !this.readOnly &&\n this.announce !== 'off' &&\n !globalThis.document.hidden\n );\n }\n\n #queueFeedback(value: JoystickValue, kind: 'position' | 'return') {\n if (!this.#canAnnounce) return;\n this.#pendingFeedback = { value, kind };\n if (this.#announcementTimer !== undefined) return;\n this.#announcementTimer = setTimeout(() => {\n this.#announcementTimer = undefined;\n const feedback = this.#pendingFeedback;\n this.#pendingFeedback = undefined;\n if (!feedback || !this.#canAnnounce) return;\n const position = this.#describePosition(feedback.value);\n const message =\n feedback.kind === 'return' ? this.i18n.joystickReturnedToCenter?.replaceAll('{position}', position) : position;\n if (!message || message === this.#announcement) return;\n this.#announcement = message;\n this.requestUpdate();\n }, 500);\n }\n\n #clearFeedback() {\n clearTimeout(this.#announcementTimer);\n this.#announcementTimer = undefined;\n this.#pendingFeedback = undefined;\n if (this.#announcement) {\n this.#announcement = '';\n this.requestUpdate();\n }\n }\n\n #releasePointer(pointerId: number | undefined) {\n if (pointerId === undefined) return;\n if (this.hasPointerCapture(pointerId)) this.releasePointerCapture(pointerId);\n this.#gestureController.target = undefined;\n if (this.isConnected && this.hasUpdated) this.#gestureController.target = this;\n }\n\n #checkAvailability() {\n if (this.disabled || this.readOnly) {\n this.#end(this.disabled ? 'disabled' : 'readonly');\n this.#clearFeedback();\n }\n }\n\n #movePointer(event: PointerEvent) {\n const bounds = this.shadowRoot?.querySelector('.travel')?.getBoundingClientRect();\n if (!bounds || bounds.width <= 0 || bounds.height <= 0) return;\n this.#input(\n this.#constrain({\n x: ((event.clientX - bounds.left) / bounds.width) * 2 - 1,\n y: ((event.clientY - bounds.top) / bounds.height) * 2 - 1\n })\n );\n }\n\n #handleGestureInput = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const input: GestureInput = event.detail;\n this.#checkAvailability();\n if (input.kind === 'pointerdown') {\n this.#startPointer(input);\n } else if (input.kind === 'pointerend' && this.#session?.pointerId === input.event.pointerId) {\n if (!input.interrupted) this.#movePointer(input.event);\n this.#end(input.interrupted ? (input.reason === 'cancel' ? 'pointer-cancel' : 'lost-capture') : 'release');\n }\n };\n\n #startPointer(input: Extract<GestureInput, { kind: 'pointerdown' }>) {\n if (!this.hasUpdated || this.disabled || this.readOnly || this.#session || input.event.button !== 0) return;\n if (!input.claim({ kind: 'drag' })) return;\n input.event.preventDefault();\n // Touch controls can operate together without transferring keyboard focus.\n if (input.event.pointerType !== 'touch') this.focus({ preventScroll: true });\n this.#begin({ source: 'pointer', pointerId: input.event.pointerId, changed: false });\n if (this.#session) this.#movePointer(input.event);\n }\n\n #handleGesture = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const gesture: Gesture<undefined> = event.detail;\n this.#checkAvailability();\n if (gesture.kind === 'drag' && this.#session?.pointerId === gesture.event.pointerId) {\n this.#movePointer(gesture.event);\n }\n };\n\n #handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && this.#session) {\n event.preventDefault();\n this.#end('escape');\n return;\n }\n const direction = directions[event.key];\n if (!direction || !this.#acceptKey(event, direction)) return;\n event.preventDefault();\n this.#keys.add(event.key);\n if (!this.#session) this.#begin({ source: 'keyboard', changed: false });\n if (!this.#session) return;\n this.#moveKey(direction);\n };\n\n #moveKey(direction: JoystickValue) {\n const step = this.#step;\n const value = this.value ?? { x: 0, y: 0 };\n this.#input(\n this.#constrain({\n x: Number((value.x + direction.x * step).toFixed(6)),\n y: Number((value.y + direction.y * step).toFixed(6))\n })\n );\n }\n\n get #step() {\n return Number.isFinite(this.keyboardStep) && this.keyboardStep > 0 && this.keyboardStep <= 1\n ? this.keyboardStep\n : 0.1;\n }\n\n #acceptKey(event: KeyboardEvent, direction: JoystickValue) {\n if (event.altKey || event.ctrlKey || event.metaKey || this.disabled || this.readOnly) return false;\n if (this.#session?.source === 'pointer') return false;\n if (this.constraint === 'horizontal') return direction.y === 0;\n if (this.constraint === 'vertical') return direction.x === 0;\n return true;\n }\n\n #handleKeyUp = (event: KeyboardEvent) => {\n if (this.#session?.source !== 'keyboard' || !this.#keys.delete(event.key)) return;\n event.preventDefault();\n if (!this.#keys.size) this.#end('release');\n };\n\n #handleBlur = () => {\n this.#checkAvailability();\n this.#end('blur');\n this.#clearFeedback();\n };\n #handleVisibility = () => {\n if (globalThis.document.hidden) {\n this.#end('hidden');\n this.#clearFeedback();\n }\n };\n}\n\nfunction isVector(value: unknown): value is JoystickValue {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'x' in value &&\n 'y' in value &&\n typeof value.x === 'number' &&\n typeof value.y === 'number' &&\n Number.isFinite(value.x) &&\n Number.isFinite(value.y) &&\n Object.keys(value).length === 2\n );\n}\n\nfunction sameVector(first: JoystickValue | undefined, second: JoystickValue): boolean {\n return first !== undefined && Math.abs(first.x - second.x) < 1e-12 && Math.abs(first.y - second.y) < 1e-12;\n}\n"],"mappings":";;;;;;;;;;AA8CA,IAAMI,IAAe;CACnB,kBAAkB;CAClB,oBAAoB;CACpB,sBACE;CACF,0BACE;CACF,0BAA0B;AAC5B,GAEMC,IAA4C;CAChD,WAAW;EAAE,GAAG;EAAI,GAAG;CAAE;CACzB,YAAY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MAAU,KAAA,KAAa,KAAK,IAAIA,EAAM,IAAIC,EAAO,CAAC,IAAI,SAAS,KAAK,IAAID,EAAM,IAAIC,EAAO,CAAC,IAAI;AACvG"}
|
|
1
|
+
{"version":3,"file":"joystick2.js","names":["styles","_decorate","__decorate","joystick_default","i18nDefaults","directions","Joystick","FormControlMixin","LitElement","useStyles","name","oldValue","newValue","#ownsTabIndex","value","#checkAvailability","#i18nController","I18nController","#announcement","#writingInput","#gestureController","GestureController","#keys","#resetting","#handleGestureInput","event","input","#startPointer","#session","#movePointer","#end","#handleGesture","gesture","#handleKeyDown","direction","#acceptKey","#begin","#moveKey","#handleKeyUp","#handleBlur","#clearFeedback","#handleVisibility","tabIndex","ownsTabIndex","isServer","changes","#constrain","sameVector","#description","position","#describePosition","styleMap","nextValue","isVector","#lastInput","state","data","constraint","length","x","y","session","#queueFeedback","lastInput","#releasePointer","reason","#input","#finishFeedback","formatter","options","format","number","#canAnnounce","#pendingFeedback","#announcementTimer","feedback","message","pointerId","bounds","step","#step","property","first","second"],"sources":["../../src/joystick/joystick.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, type PropertyValues } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { GestureController, type Gesture, type GestureInput, type Size } from '@nvidia-elements/core/internal';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport styles from './joystick.css?inline';\n\nexport interface JoystickValue {\n readonly x: number;\n readonly y: number;\n}\n\nexport type JoystickConstraint = 'circle' | 'square' | 'horizontal' | 'vertical';\nexport type JoystickRelease = 'center' | 'hold';\n\nexport interface JoystickInteractionStart {\n readonly source: 'pointer' | 'keyboard';\n}\n\nexport interface JoystickInteractionEnd extends JoystickInteractionStart {\n readonly reason:\n | 'release'\n | 'escape'\n | 'pointer-cancel'\n | 'lost-capture'\n | 'blur'\n | 'hidden'\n | 'disabled'\n | 'readonly'\n | 'configuration-change'\n | 'reset'\n | 'disconnect';\n}\n\ntype Session = JoystickInteractionStart & { pointerId?: number; changed: boolean };\n\nconst i18nDefaults = {\n joystickPosition: 'X {x}, Y {y}.',\n joystickNoPosition: 'No position.',\n joystickInstructions:\n 'Use arrow keys to adjust the enabled axes. Release to return to center. Press Escape to cancel.',\n joystickHoldInstructions:\n 'Use arrow keys to adjust the enabled axes. Release to keep the position. Escape and interruptions return to center.',\n joystickReturnedToCenter: '{position} Returned to center.'\n} satisfies I18nDefaults;\n\nconst directions: Record<string, JoystickValue> = {\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 },\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 }\n};\n\n/* eslint-disable jsdoc/no-types -- The metadata analyzer needs the inherited generic value type. */\n/**\n * @element nve-joystick\n * @description A joystick selects a normalized two-axis vector with pointer or keyboard input.\n * Applications own physical units, coordinate frames, input shaping, publishing cadence, recording clocks,\n * command-outcome feedback, and alternative controls when needed.\n *\n * Give each joystick an accessible name with a label, aria-label, or aria-labelledby.\n * Editable controls use the application role to receive two-axis keyboard input.\n * The default accessible description includes both normalized coordinates, keyboard instructions, and release behavior.\n * A locked axis stays at zero; an absent value reads \"No position.\" Disabled and read-only controls omit instructions.\n * Coordinates use up to six decimal places and the document language for number formatting.\n * An explicit aria-description or aria-describedby replaces the default focus description through standard ARIA precedence;\n * it does not disable live announcements.\n * @documentation https://nvidia.github.io/elements/docs/elements/joystick/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/joystick\n * @property {JoystickValue | undefined} value - The normalized vector: positive x points right and positive y points down, independent of text direction. Assign a complete finite object within the selected constraint. Invalid vectors throw TypeError without replacing the previous value. Programmatic writes do not dispatch input or change events. Use undefined for an absent sample and a zero vector for recorded neutral input. Set readOnly before assigning replay ownership. User input can replace external writes during an interaction.\n * @attribute {string} value - A JSON object containing normalized x and y coordinates.\n * @event input - Dispatched after user input changes the vector, including a return to neutral. Read .value for the current vector. A held position does not generate repeated events. Publish commands at an application-controlled cadence.\n * @event change - Dispatched after a normal interaction completes and produces input. Cancellation sends any necessary neutral input without change.\n * @event interaction-start - Dispatched with the pointer or keyboard source after setting :state(active), including engagement at neutral.\n * @event interaction-end - Dispatched with the source and terminal reason after clearing :state(active). Interruption first sends any necessary neutral input. Reset restores the declared default without value events. Detached events cannot bubble to former ancestors.\n * @cssprop --width\n * @cssprop --height\n * @cssprop --background\n * @cssprop --opacity - Background opacity when the opacity flag is present. Defaults to 0.6. The border, crosshair, thumb, and focus indicator keep their opacity.\n * @cssprop --border\n * @cssprop --thumb-width\n * @cssprop --thumb-height\n * @cssprop --thumb-background\n * @cssprop --thumb-border\n * @stable false\n */\nexport class Joystick extends FormControlMixin<typeof LitElement, JoystickValue>(LitElement) {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-joystick',\n version: '0.0.0',\n valueSchema: {\n type: 'object' as const,\n properties: {\n x: { type: 'number' as const, minimum: -1, maximum: 1 },\n y: { type: 'number' as const, minimum: -1, maximum: 1 }\n },\n required: ['x', 'y'],\n additionalProperties: false\n }\n };\n\n /**\n * Constrains the movement region or selects one axis. Circle limits vector magnitude to one;\n * square permits both axes at full scale and a magnitude of up to Math.SQRT2.\n * With equally scaled planar velocity axes, square corners allow about 41% greater speed.\n * Mixed forward-velocity and turning-rate axes have no common physical magnitude.\n * Changing the constraint projects the current value silently and cancels an active interaction.\n */\n @property({ type: String, reflect: true }) constraint: JoystickConstraint = 'circle';\n\n /** Sets surface and thumb size. At the default font size, sm is 104px, md is 130px, and lg is 156px. */\n @property({ type: String, reflect: true }) size: Size = 'md';\n\n /** Enables background transparency using the --opacity CSS custom property. */\n @property({ type: Boolean, reflect: true }) opacity = false;\n\n /**\n * Determines whether normal release returns to center or holds the final vector.\n * Interrupted interactions return to neutral in either mode. Form reset restores the declared default instead.\n */\n @property({ type: String, reflect: true }) release: JoystickRelease = 'center';\n\n /**\n * Sets the normalized increment for each arrow key press. Repeated presses continue adjusting;\n * releasing the final arrow applies the release behavior. Escape cancels the interaction.\n * Invalid steps fall back to 0.1. Modifier shortcuts and locked-axis directions remain available to the browser.\n */\n @property({ type: Number, attribute: 'keyboard-step' }) keyboardStep = 0.1;\n\n /**\n * Controls automatic position announcements. Focused user input produces polite announcements at most every 500 ms.\n * A quick tap in center mode reports the input coordinates and the return to center.\n * Escape announces the resulting coordinates without a separate cancellation message.\n * Programmatic writes and read-only playback update the description without live announcements.\n * Set off when the application supplies spoken output, the position description on focus remains available.\n */\n @property({ type: String }) announce: 'polite' | 'off' = 'polite';\n\n readonly #i18nController: I18nController<this> = new I18nController(this, i18nDefaults);\n\n /** Enables updating internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n #announcement = '';\n #pendingFeedback?: { value: JoystickValue; kind: 'position' | 'return' };\n #announcementTimer?: ReturnType<typeof setTimeout>;\n #lastInput?: JoystickValue;\n #writingInput = false;\n\n readonly #gestureController = new GestureController(this, {\n touchAction: () => (this.disabled || this.readOnly ? undefined : 'none'),\n suppressNativeDrag: true\n });\n readonly #keys = new Set<string>();\n #session?: Session;\n #resetting = false;\n #ownsTabIndex = false;\n\n static override get observedAttributes() {\n return [...super.observedAttributes, 'tabindex'];\n }\n\n override attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === 'tabindex') this.#ownsTabIndex = false;\n }\n\n override get disabled(): boolean {\n return super.disabled;\n }\n\n override set disabled(value: boolean | unknown) {\n super.disabled = Boolean(value);\n this.#checkAvailability();\n }\n\n override get readOnly(): boolean {\n return super.readOnly;\n }\n\n override set readOnly(value: boolean | unknown) {\n super.readOnly = Boolean(value);\n this.#checkAvailability();\n }\n\n constructor() {\n super();\n this.value = { x: 0, y: 0 };\n }\n\n connectedCallback() {\n const tabIndex = this.getAttribute('tabindex');\n const ownsTabIndex = this.#ownsTabIndex || tabIndex === null;\n super.connectedCallback();\n // The forms mixin assigns tabindex on connection; keep the caller's focus order.\n if (tabIndex !== null) this.setAttribute('tabindex', tabIndex);\n this.#ownsTabIndex = ownsTabIndex;\n if (this.hasUpdated) this.#gestureController.target = this;\n this.addEventListener('nve-gesture-input', this.#handleGestureInput);\n this.addEventListener('nve-gesture', this.#handleGesture);\n this.addEventListener('keydown', this.#handleKeyDown);\n this.addEventListener('keyup', this.#handleKeyUp);\n this.addEventListener('blur', this.#handleBlur);\n globalThis.window?.addEventListener('blur', this.#handleBlur);\n globalThis.document?.addEventListener('visibilitychange', this.#handleVisibility);\n }\n\n disconnectedCallback() {\n this.#end('disconnect');\n this.#clearFeedback();\n this.removeEventListener('nve-gesture-input', this.#handleGestureInput);\n this.removeEventListener('nve-gesture', this.#handleGesture);\n this.removeEventListener('keydown', this.#handleKeyDown);\n this.removeEventListener('keyup', this.#handleKeyUp);\n this.removeEventListener('blur', this.#handleBlur);\n globalThis.window?.removeEventListener('blur', this.#handleBlur);\n globalThis.document?.removeEventListener('visibilitychange', this.#handleVisibility);\n super.disconnectedCallback();\n }\n\n firstUpdated() {\n this.#gestureController.target = this;\n }\n\n willUpdate(changes: PropertyValues<this>) {\n // Lit SSR converts reactive attributes without invoking the forms mixin callback.\n if (isServer && this.hasAttribute('value')) this._handleAttributeChange('value', this.getAttribute('value'));\n this.#checkAvailability();\n if (this.announce === 'off') this.#clearFeedback();\n if (changes.has('constraint') || changes.has('release') || changes.has('keyboardStep')) {\n this.#end('configuration-change');\n this.#clearFeedback();\n if (this.value) {\n const value = this.#constrain(this.value);\n if (!sameVector(this.value, value)) this.value = value;\n }\n }\n }\n\n updated() {\n if (this.#ownsTabIndex || !this.hasAttribute('tabindex')) {\n this.tabIndex = this.disabled ? -1 : 0;\n this.#ownsTabIndex = true;\n }\n // Editable joysticks own the two-axis keyboard interaction, including release and cancellation.\n this._internals.role = this.disabled || this.readOnly ? 'group' : 'application';\n this._internals.ariaLabel = this.ariaLabel || this.composedLabel || null;\n this._internals.ariaReadOnly = null;\n this._internals.ariaDescription = this.#description;\n }\n\n get #description() {\n const position = this.#describePosition(this.value);\n if (this.disabled || this.readOnly) return position;\n const instructions = this.release === 'hold' ? this.i18n.joystickHoldInstructions : this.i18n.joystickInstructions;\n return `${position} ${instructions}`;\n }\n\n render() {\n const value = this.value ?? { x: 0, y: 0 };\n return html`\n <div internal-host aria-hidden=\"true\">\n <div class=\"background\"></div>\n <div class=\"travel\">\n <div class=\"thumb\" ?hidden=${!this.value} style=${styleMap({ left: `${(value.x + 1) * 50}%`, top: `${(value.y + 1) * 50}%` })}></div>\n </div>\n </div>\n <span class=\"announcement\" role=\"status\" aria-live=${this.announce === 'off' ? 'off' : 'polite'} aria-atomic=\"true\">${this.#announcement}</span>\n `;\n }\n\n override updateValue(value: JoystickValue) {\n // Only project the default assignment; writes from reset listeners still use strict validation.\n const nextValue = this.#resetting && isVector(value) ? this.#constrain(value) : value;\n this.#resetting = false;\n if (nextValue !== undefined && (!isVector(nextValue) || !sameVector(nextValue, this.#constrain(nextValue)))) {\n throw new TypeError('Joystick value must contain finite x and y coordinates within its constraint.');\n }\n super.updateValue(nextValue);\n if (!this.#writingInput) {\n this.#lastInput = undefined;\n this.#clearFeedback();\n }\n }\n\n override reset() {\n this.#end('reset');\n this.#clearFeedback();\n this.#resetting = true;\n try {\n super.reset();\n } finally {\n this.#resetting = false;\n }\n }\n\n override formStateRestoreCallback(state: unknown, _reason?: string) {\n if (typeof state !== 'string') return;\n let value: unknown;\n try {\n value = state === '' ? undefined : JSON.parse(state);\n } catch {\n return;\n }\n if (value !== undefined && (!isVector(value) || !sameVector(value, this.#constrain(value)))) return;\n this.#end('reset');\n this.value = value;\n }\n\n override _updateFormState() {\n if (!this.name || !this.value) {\n this._internals.setFormValue(null, this.valueAsString);\n return;\n }\n const data = new FormData();\n data.set(`${this.name}-x`, `${this.value.x}`);\n data.set(`${this.name}-y`, `${this.value.y}`);\n this._internals.setFormValue(data, this.valueAsString);\n }\n\n #constrain({ x, y }: JoystickValue): JoystickValue {\n const constraint = this.hasUpdated ? this.constraint : (this.getAttribute('constraint') ?? this.constraint);\n if (constraint === 'circle') {\n const length = Math.max(1, Math.hypot(x, y));\n return { x: x / length, y: y / length };\n }\n return {\n x: constraint === 'vertical' ? 0 : Math.max(-1, Math.min(1, x)),\n y: constraint === 'horizontal' ? 0 : Math.max(-1, Math.min(1, y))\n };\n }\n\n #begin(session: Session) {\n this.#session = session;\n this.#lastInput = undefined;\n // A later interaction can report identical text after an empty region.\n this.#announcement = '';\n this.requestUpdate();\n this._internals.states.add('active');\n this.dispatchEvent(\n new CustomEvent<JoystickInteractionStart>('interaction-start', {\n bubbles: true,\n composed: true,\n detail: { source: session.source }\n })\n );\n this.#checkAvailability();\n }\n\n #input(value: JoystickValue) {\n if (sameVector(this.value, value)) return;\n this.#writingInput = true;\n try {\n this.value = value;\n } finally {\n this.#writingInput = false;\n }\n if (this.#session) this.#lastInput = value;\n if (this.#session) this.#session.changed = true;\n this.dispatchInputEvent();\n this.#checkAvailability();\n if (this.#session && this.#lastInput === value) this.#queueFeedback(value, 'position');\n }\n\n #end(reason: JoystickInteractionEnd['reason']) {\n const session = this.#session;\n if (!session) return;\n const lastInput = this.#lastInput;\n this.#session = undefined;\n this.#keys.clear();\n this._internals.states.delete('active');\n this.#releasePointer(session.pointerId);\n if (reason !== 'reset' && (reason !== 'release' || this.release !== 'hold')) {\n this.#input({ x: 0, y: 0 });\n }\n this.#finishFeedback(reason, this.#lastInput ? lastInput : undefined);\n if (reason === 'release' && session.changed) this.dispatchChangeEvent();\n this.dispatchEvent(\n new CustomEvent<JoystickInteractionEnd>('interaction-end', {\n bubbles: true,\n composed: true,\n detail: { source: session.source, reason }\n })\n );\n }\n\n #finishFeedback(reason: JoystickInteractionEnd['reason'], lastInput: JoystickValue | undefined) {\n if (reason === 'escape') {\n if (sameVector(this.value, { x: 0, y: 0 })) this.#queueFeedback({ x: 0, y: 0 }, 'position');\n } else if (reason === 'release' && lastInput) {\n if (this.release === 'hold' && sameVector(this.value, lastInput)) this.#queueFeedback(lastInput, 'position');\n else if (this.release !== 'hold' && sameVector(this.value, { x: 0, y: 0 }))\n this.#queueFeedback(lastInput, 'return');\n } else {\n this.#clearFeedback();\n }\n }\n\n #describePosition(value: JoystickValue | undefined): string {\n if (!value) return this.i18n.joystickNoPosition ?? i18nDefaults.joystickNoPosition;\n let formatter: Intl.NumberFormat;\n const options = { maximumFractionDigits: 6, useGrouping: false };\n try {\n formatter = new Intl.NumberFormat(globalThis.document?.documentElement.lang || undefined, options);\n } catch {\n formatter = new Intl.NumberFormat(undefined, options);\n }\n const format = (number: number) => formatter.format(Number(number.toFixed(6)) || 0);\n return (this.i18n.joystickPosition ?? '').replaceAll('{x}', format(value.x)).replaceAll('{y}', format(value.y));\n }\n\n get #canAnnounce() {\n return (\n this.isConnected &&\n this.matches(':focus') &&\n !this.disabled &&\n !this.readOnly &&\n this.announce !== 'off' &&\n !globalThis.document.hidden\n );\n }\n\n #queueFeedback(value: JoystickValue, kind: 'position' | 'return') {\n if (!this.#canAnnounce) return;\n this.#pendingFeedback = { value, kind };\n if (this.#announcementTimer !== undefined) return;\n this.#announcementTimer = setTimeout(() => {\n this.#announcementTimer = undefined;\n const feedback = this.#pendingFeedback;\n this.#pendingFeedback = undefined;\n if (!feedback || !this.#canAnnounce) return;\n const position = this.#describePosition(feedback.value);\n const message =\n feedback.kind === 'return' ? this.i18n.joystickReturnedToCenter?.replaceAll('{position}', position) : position;\n if (!message || message === this.#announcement) return;\n this.#announcement = message;\n this.requestUpdate();\n }, 500);\n }\n\n #clearFeedback() {\n clearTimeout(this.#announcementTimer);\n this.#announcementTimer = undefined;\n this.#pendingFeedback = undefined;\n if (this.#announcement) {\n this.#announcement = '';\n this.requestUpdate();\n }\n }\n\n #releasePointer(pointerId: number | undefined) {\n if (pointerId === undefined) return;\n if (this.hasPointerCapture(pointerId)) this.releasePointerCapture(pointerId);\n this.#gestureController.target = undefined;\n if (this.isConnected && this.hasUpdated) this.#gestureController.target = this;\n }\n\n #checkAvailability() {\n if (this.disabled || this.readOnly) {\n this.#end(this.disabled ? 'disabled' : 'readonly');\n this.#clearFeedback();\n }\n }\n\n #movePointer(event: PointerEvent) {\n const bounds = this.shadowRoot?.querySelector('.travel')?.getBoundingClientRect();\n if (!bounds || bounds.width <= 0 || bounds.height <= 0) return;\n this.#input(\n this.#constrain({\n x: ((event.clientX - bounds.left) / bounds.width) * 2 - 1,\n y: ((event.clientY - bounds.top) / bounds.height) * 2 - 1\n })\n );\n }\n\n #handleGestureInput = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const input: GestureInput = event.detail;\n this.#checkAvailability();\n if (input.kind === 'pointerdown') {\n this.#startPointer(input);\n } else if (input.kind === 'pointerend' && this.#session?.pointerId === input.event.pointerId) {\n if (!input.interrupted) this.#movePointer(input.event);\n this.#end(input.interrupted ? (input.reason === 'cancel' ? 'pointer-cancel' : 'lost-capture') : 'release');\n }\n };\n\n #startPointer(input: Extract<GestureInput, { kind: 'pointerdown' }>) {\n if (!this.hasUpdated || this.disabled || this.readOnly || this.#session || input.event.button !== 0) return;\n if (!input.claim({ kind: 'drag' })) return;\n input.event.preventDefault();\n // Touch controls can operate together without transferring keyboard focus.\n if (input.event.pointerType !== 'touch') this.focus({ preventScroll: true });\n this.#begin({ source: 'pointer', pointerId: input.event.pointerId, changed: false });\n if (this.#session) this.#movePointer(input.event);\n }\n\n #handleGesture = (event: Event) => {\n if (!(event instanceof CustomEvent)) return;\n const gesture: Gesture<undefined> = event.detail;\n this.#checkAvailability();\n if (gesture.kind === 'drag' && this.#session?.pointerId === gesture.event.pointerId) {\n this.#movePointer(gesture.event);\n }\n };\n\n #handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && this.#session) {\n event.preventDefault();\n this.#end('escape');\n return;\n }\n const direction = directions[event.key];\n if (!direction || !this.#acceptKey(event, direction)) return;\n event.preventDefault();\n this.#keys.add(event.key);\n if (!this.#session) this.#begin({ source: 'keyboard', changed: false });\n if (!this.#session) return;\n this.#moveKey(direction);\n };\n\n #moveKey(direction: JoystickValue) {\n const step = this.#step;\n const value = this.value ?? { x: 0, y: 0 };\n this.#input(\n this.#constrain({\n x: Number((value.x + direction.x * step).toFixed(6)),\n y: Number((value.y + direction.y * step).toFixed(6))\n })\n );\n }\n\n get #step() {\n return Number.isFinite(this.keyboardStep) && this.keyboardStep > 0 && this.keyboardStep <= 1\n ? this.keyboardStep\n : 0.1;\n }\n\n #acceptKey(event: KeyboardEvent, direction: JoystickValue) {\n if (event.altKey || event.ctrlKey || event.metaKey || this.disabled || this.readOnly) return false;\n if (this.#session?.source === 'pointer') return false;\n if (this.constraint === 'horizontal') return direction.y === 0;\n if (this.constraint === 'vertical') return direction.x === 0;\n return true;\n }\n\n #handleKeyUp = (event: KeyboardEvent) => {\n if (this.#session?.source !== 'keyboard' || !this.#keys.delete(event.key)) return;\n event.preventDefault();\n if (!this.#keys.size) this.#end('release');\n };\n\n #handleBlur = () => {\n this.#checkAvailability();\n this.#end('blur');\n this.#clearFeedback();\n };\n #handleVisibility = () => {\n if (globalThis.document.hidden) {\n this.#end('hidden');\n this.#clearFeedback();\n }\n };\n}\n\nfunction isVector(value: unknown): value is JoystickValue {\n return (\n typeof value === 'object' &&\n value !== null &&\n 'x' in value &&\n 'y' in value &&\n typeof value.x === 'number' &&\n typeof value.y === 'number' &&\n Number.isFinite(value.x) &&\n Number.isFinite(value.y) &&\n Object.keys(value).length === 2\n );\n}\n\nfunction sameVector(first: JoystickValue | undefined, second: JoystickValue): boolean {\n return first !== undefined && Math.abs(first.x - second.x) < 1e-12 && Math.abs(first.y - second.y) < 1e-12;\n}\n"],"mappings":";;;;;;;;;;AAyCA,IAAMI,IAAe;CACnB,kBAAkB;CAClB,oBAAoB;CACp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AM,CAAC,KACvB,OAAO,KAAKA,CAAK,CAAC,CAAC,WAAW;AAElC;AAEA,SAASiC,EAAW,GAAkC,GAAgC;CACpF,OAAOmC,MAAU,KAAA,KAAa,KAAK,IAAIA,EAAM,IAAIC,EAAO,CAAC,IAAI,SAAS,KAAK,IAAID,EAAM,IAAIC,EAAO,CAAC,IAAI;AACvG"}
|
package/dist/logo/logo2.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { property as
|
|
1
|
+
import { colorStateStyles as e } from "../internal/styles/index.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
3
|
+
import n from "./logo.js";
|
|
4
|
+
import { attachInternals as r } from "@nvidia-elements/foundations/internal/a11y";
|
|
5
|
+
import { LitElement as i, html as a } from "lit";
|
|
6
|
+
import { property as o } from "lit/decorators/property.js";
|
|
7
|
+
import { useStyles as s } from "@nvidia-elements/foundations/internal/styles";
|
|
7
8
|
// src/logo/logo.ts
|
|
8
|
-
var c = class extends
|
|
9
|
+
var c = class extends i {
|
|
9
10
|
static {
|
|
10
|
-
this.styles =
|
|
11
|
+
this.styles = s([n, e]);
|
|
11
12
|
}
|
|
12
13
|
static {
|
|
13
14
|
this.metadata = {
|
|
14
15
|
tag: "nve-logo",
|
|
15
|
-
version: "2.23.
|
|
16
|
+
version: "2.23.5"
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
render() {
|
|
19
|
-
return
|
|
20
|
+
return a`<div internal-host><slot></slot></div>`;
|
|
20
21
|
}
|
|
21
22
|
connectedCallback() {
|
|
22
|
-
super.connectedCallback(),
|
|
23
|
+
super.connectedCallback(), r(this), this._internals.role = "img";
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
t([o({
|
|
26
27
|
type: String,
|
|
27
28
|
reflect: !0
|
|
28
|
-
})], c.prototype, "color", void 0),
|
|
29
|
+
})], c.prototype, "color", void 0), t([o({
|
|
29
30
|
type: String,
|
|
30
31
|
reflect: !0
|
|
31
32
|
})], c.prototype, "size", void 0);
|
package/dist/logo/logo2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo2.js","names":["styles","_decorate","__decorate","logo_default","Logo","LitElement","useStyles","colorStateStyles","attachInternals","property"],"sources":["../../src/logo/logo.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Color, Size } from '@nvidia-elements/core/internal';\nimport {
|
|
1
|
+
{"version":3,"file":"logo2.js","names":["styles","_decorate","__decorate","logo_default","Logo","LitElement","useStyles","colorStateStyles","attachInternals","property"],"sources":["../../src/logo/logo.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Color, Size } from '@nvidia-elements/core/internal';\nimport { colorStateStyles } from '@nvidia-elements/core/internal';\nimport { attachInternals } from '@nvidia-elements/foundations/internal/a11y';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\nimport styles from './logo.css?inline';\n\n/**\n * @element nve-logo\n * @description A visual indicator for a brand or application.\n * @documentation https://nvidia.github.io/elements/docs/elements/logo/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/logo\n * @slot - Text, an image, or other visual content representing the brand or application.\n * @cssprop --background\n * @cssprop --gap\n * @cssprop --color\n * @cssprop --height\n * @cssprop --width\n * @cssprop --font-size\n * @cssprop --border-radius\n * @cssprop --font-weight\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\n */\nexport class Logo extends LitElement {\n /**\n * Visual treatment to represent unique color of an application\n */\n @property({ type: String, reflect: true }) color: Color;\n\n /**\n * Determines size of logo\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n static styles = useStyles([styles, colorStateStyles]);\n\n static readonly metadata = {\n tag: 'nve-logo',\n version: '0.0.0'\n };\n\n _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'img';\n }\n}\n"],"mappings":";;;;;;;;AA4BA,IAAaI,IAAb,cAA0BC,EAAW;;EAWnB,KAAA,SAAAC,EAAU,CAACN,GAAQO,CAAgB,CAAC;;;EAEzB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAIA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxBC,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF;AA7BGP,EAAA,CAAAQ,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAAL,EAAA,WAAA,SAAA,KAAA,CAAA,GAKxCH,EAAA,CAAAQ,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAAL,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
package/dist/menu/menu-group2.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { TypeExpandableController as t } from "../internal/controllers/type-expandable.controller.js";
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
4
|
+
import { Icon as r } from "../icon/icon2.js";
|
|
5
|
+
import i from "./menu-group.js";
|
|
6
|
+
import { attachInternals as a } from "@nvidia-elements/foundations/internal/a11y";
|
|
7
|
+
import { LitElement as o, html as s } from "lit";
|
|
8
|
+
import { property as c } from "lit/decorators/property.js";
|
|
9
|
+
import { scopedRegistry as l } from "@nvidia-elements/foundations/internal/decorators";
|
|
10
|
+
import { useStyles as u } from "@nvidia-elements/foundations/internal/styles";
|
|
11
11
|
// src/menu/menu-group.ts
|
|
12
|
-
var d = class extends
|
|
12
|
+
var d = class extends o {
|
|
13
13
|
constructor(...e) {
|
|
14
|
-
super(...e), this.expanded = !1, this.disabled = !1, this.behaviorExpand = !1, this.#e = new
|
|
14
|
+
super(...e), this.expanded = !1, this.disabled = !1, this.behaviorExpand = !1, this.#e = new t(this), this.#t = () => {
|
|
15
15
|
this.disabled || this.#e.toggle();
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
static {
|
|
19
|
-
this.styles =
|
|
19
|
+
this.styles = u([i]);
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
22
|
this.metadata = {
|
|
23
23
|
tag: "nve-menu-group",
|
|
24
|
-
version: "2.23.
|
|
24
|
+
version: "2.23.5",
|
|
25
25
|
children: ["nve-menu"]
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
static {
|
|
29
|
-
this.elementDefinitions = { [
|
|
29
|
+
this.elementDefinitions = { [r.metadata.tag]: r };
|
|
30
30
|
}
|
|
31
31
|
#e;
|
|
32
32
|
render() {
|
|
33
|
-
return
|
|
33
|
+
return s`<div internal-host><button id="trigger" type="button" aria-expanded="${this.expanded}" ?disabled="${this.disabled}" aria-controls="content" @click="${this.#t}"><slot name="prefix"></slot><slot></slot><slot name="suffix"></slot><nve-icon part="caret" name="caret" direction="${this.expanded ? "down" : "right"}" size="sm" aria-hidden="true"></nve-icon></button><slot id="content" name="menu" ?hidden="${!this.expanded}"></slot></div>`;
|
|
34
34
|
}
|
|
35
35
|
connectedCallback() {
|
|
36
|
-
super.connectedCallback(),
|
|
36
|
+
super.connectedCallback(), a(this), this._internals.role = "group";
|
|
37
37
|
}
|
|
38
38
|
#t;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
n([c({
|
|
41
41
|
type: Boolean,
|
|
42
42
|
reflect: !0
|
|
43
|
-
})], d.prototype, "expanded", void 0),
|
|
43
|
+
})], d.prototype, "expanded", void 0), n([c({
|
|
44
44
|
type: Boolean,
|
|
45
45
|
reflect: !0
|
|
46
|
-
})], d.prototype, "disabled", void 0),
|
|
46
|
+
})], d.prototype, "disabled", void 0), n([c({
|
|
47
47
|
type: Boolean,
|
|
48
48
|
attribute: "behavior-expand"
|
|
49
|
-
})], d.prototype, "behaviorExpand", void 0), d =
|
|
49
|
+
})], d.prototype, "behaviorExpand", void 0), d = n([e(), l()], d);
|
|
50
50
|
export { d as MenuGroup };
|
|
51
51
|
|
|
52
52
|
//# sourceMappingURL=menu-group2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-group2.js","names":["styles","_decorate","__decorate","menu_group_default","MenuGroup","LitElement","_args","#typeExpandableController","TypeExpandableController","#toggle","useStyles","Icon","attachInternals","property","audit","scopedRegistry"],"sources":["../../src/menu/menu-group.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport {
|
|
1
|
+
{"version":3,"file":"menu-group2.js","names":["styles","_decorate","__decorate","menu_group_default","MenuGroup","LitElement","_args","#typeExpandableController","TypeExpandableController","#toggle","useStyles","Icon","attachInternals","property","audit","scopedRegistry"],"sources":["../../src/menu/menu-group.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { audit, TypeExpandableController } from '@nvidia-elements/core/internal';\nimport { scopedRegistry } from '@nvidia-elements/foundations/internal/decorators';\nimport { attachInternals } from '@nvidia-elements/foundations/internal/a11y';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './menu-group.css?inline';\n\n/**\n * @element nve-menu-group\n * @description Organizes related menu items under a disclosure header that can show or hide one child menu.\n * @documentation https://nvidia.github.io/elements/docs/elements/menu/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/menu\n * @command --open - Opens the menu group.\n * @command --close - Closes the menu group.\n * @command --toggle - Toggles the menu group.\n * @event open - Dispatched when the user requests that the menu group open.\n * @event close - Dispatched when the user requests that the menu group close.\n * @slot - Label content for the disclosure header.\n * @slot prefix - Non-interactive content before the header label, such as an icon or avatar.\n * @slot suffix - Non-interactive content after the header label, such as a badge or count.\n * @slot menu - One `nve-menu` containing the grouped menu items. Direct menus use this slot automatically in browsers; server-rendered menus must set `slot=\"menu\"` explicitly.\n * @cssprop --background\n * @cssprop --font-size\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --border-radius\n * @cssprop --color\n * @cssprop --width\n * @cssprop --min-height\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/\n * @stable false\n */\n@audit()\n@scopedRegistry()\nexport class MenuGroup extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-menu-group',\n version: '0.0.0',\n children: ['nve-menu']\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** Determines whether the child menu is visible. */\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n /** Prevents user activation of the disclosure header. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Determines whether user activation automatically updates the expanded state. */\n @property({ type: Boolean, attribute: 'behavior-expand' }) behaviorExpand = false;\n\n /** @private */\n declare _internals: ElementInternals;\n\n #typeExpandableController = new TypeExpandableController(this);\n\n render() {\n return html`\n <div internal-host>\n <button\n id=\"trigger\"\n type=\"button\"\n aria-expanded=${this.expanded}\n ?disabled=${this.disabled}\n aria-controls=\"content\"\n @click=${this.#toggle}\n >\n <slot name=\"prefix\"></slot>\n <slot></slot>\n <slot name=\"suffix\"></slot>\n <nve-icon\n part=\"caret\"\n name=\"caret\"\n direction=${this.expanded ? 'down' : 'right'}\n size=\"sm\"\n aria-hidden=\"true\"\n ></nve-icon>\n </button>\n <slot id=\"content\" name=\"menu\" ?hidden=${!this.expanded}></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'group';\n }\n\n #toggle = () => {\n if (!this.disabled) {\n this.#typeExpandableController.toggle();\n }\n };\n}\n"],"mappings":";;;;;;;;;;;AAwCO,IAAMI,IAAN,cAAwBC,EAAW;;EA4DxB,A,aA9CuC,KAAA,WAAA,IAGA,KAAA,WAAA,IAGqB,KAAA,iBAAA,IAKhD,KAAAE,KAAA,IAAIC,EAAyB,IAAI,GAmC7C,KAAAC,WAAA;GACd,AAAK,KAAK,YACR,KAAKF,GAA0B,OAAO;EAE1C;;;EA/DgB,KAAA,SAAAG,EAAU,CAACV,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,UAAU,CAAC,UAAU;EACvB;;;EAE4B,KAAA,qBAAA,GACzBW,EAAK,SAAS,MAAMA,EACvB;;CAcA;CAEA,SAAS;EACP,OAAO,CAAI,wEAKW,KAAK,SAAS,eAClB,KAAK,SAAS,oCAEjB,KAAKF,GAAQ,sHAQR,KAAK,WAAW,SAAS,QAAQ,6FAKR,CAAC,KAAK,SAAS;CAG9D;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxBG,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;CAEA;AAKF;AAnDGX,EAAA,CAAAY,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAAT,EAAA,WAAA,YAAA,KAAA,CAAA,GAGzCH,EAAA,CAAAY,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAAT,EAAA,WAAA,YAAA,KAAA,CAAA,GAGzCH,EAAA,CAAAY,EAAS;CAAE,MAAM;CAAS,WAAW;AAAkB,CAAC,CAAA,GAAAT,EAAA,WAAA,kBAAA,KAAA,CAAA,GAtB1D,IAAAH,EAAA,CAAAa,EAAM,GACNC,EAAe,CAAA,GAAAX,CAAA"}
|
package/dist/menu/menu-item2.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
3
|
+
import n from "./menu-item.js";
|
|
4
|
+
import { LitElement as r, html as i } from "lit";
|
|
5
|
+
import { property as a } from "lit/decorators/property.js";
|
|
6
|
+
import { useStyles as o } from "@nvidia-elements/foundations/internal/styles";
|
|
7
7
|
import { ButtonFormControlMixin as s } from "@nvidia-elements/forms/mixins";
|
|
8
8
|
// src/menu/menu-item.ts
|
|
9
|
-
var c = class extends s(
|
|
9
|
+
var c = class extends s(r) {
|
|
10
10
|
static {
|
|
11
|
-
this.styles =
|
|
11
|
+
this.styles = o([n]);
|
|
12
12
|
}
|
|
13
13
|
static {
|
|
14
14
|
this.metadata = {
|
|
15
15
|
tag: "nve-menu-item",
|
|
16
|
-
version: "2.23.
|
|
16
|
+
version: "2.23.5",
|
|
17
17
|
parents: ["nve-menu"]
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -21,7 +21,7 @@ var c = class extends s(i) {
|
|
|
21
21
|
this.elementDefinitions = {};
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return
|
|
24
|
+
return i`<div internal-host interaction-state focus-within part="_internal"><slot name="prefix" part="_prefix"></slot><slot part="_slot"></slot><slot name="suffix" part="_suffix"></slot></div>`;
|
|
25
25
|
}
|
|
26
26
|
constructor() {
|
|
27
27
|
super(), this.type = "button";
|
|
@@ -30,10 +30,10 @@ var c = class extends s(i) {
|
|
|
30
30
|
super.connectedCallback(), this._internals.role = "menuitem";
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
t([a({
|
|
34
34
|
type: String,
|
|
35
35
|
reflect: !0
|
|
36
|
-
})], c.prototype, "status", void 0), c =
|
|
36
|
+
})], c.prototype, "status", void 0), c = t([e()], c);
|
|
37
37
|
export { c as MenuItem };
|
|
38
38
|
|
|
39
39
|
//# sourceMappingURL=menu-item2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item2.js","names":["styles","_decorate","__decorate","menu_item_default","MenuItem","ButtonFormControlMixin","LitElement","useStyles","property","audit"],"sources":["../../src/menu/menu-item.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ButtonFormControlMixin } from '@nvidia-elements/forms/mixins';\nimport {
|
|
1
|
+
{"version":3,"file":"menu-item2.js","names":["styles","_decorate","__decorate","menu_item_default","MenuItem","ButtonFormControlMixin","LitElement","useStyles","property","audit"],"sources":["../../src/menu/menu-item.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ButtonFormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { audit } from '@nvidia-elements/core/internal';\nimport { useStyles } from '@nvidia-elements/foundations/internal/styles';\nimport styles from './menu-item.css?inline';\n\n/**\n * @element nve-menu-item\n * @description Represents a selectable option within a menu, providing an interactive button for navigation or actions.\n * @documentation https://nvidia.github.io/elements/docs/elements/menu/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/menu\n * @slot - Label and supporting content for the menu option.\n * @slot prefix - slot for prefix icon\n * @slot suffix - slot for suffix icon\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border-background\n * @cssprop --font-size\n * @cssprop --font-weight\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @cssprop --min-height\n * @cssprop --line-height\n * @cssprop --cursor\n * @cssprop --opacity\n * @cssprop --text-transform\n\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class MenuItem extends ButtonFormControlMixin(LitElement) {\n static styles = useStyles([styles]);\n\n /** Applies danger styling to destructive or high-risk menu actions. */\n @property({ type: String, reflect: true }) status: 'danger';\n\n static readonly metadata = {\n tag: 'nve-menu-item',\n version: '0.0.0',\n parents: ['nve-menu']\n };\n\n static elementDefinitions = {};\n\n render() {\n return html`\n <div internal-host interaction-state focus-within part=\"_internal\">\n <slot name=\"prefix\" part=\"_prefix\"></slot>\n <slot part=\"_slot\"></slot>\n <slot name=\"suffix\" part=\"_suffix\"></slot>\n </div>\n `;\n }\n\n constructor() {\n super();\n this.type = 'button';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = 'menuitem';\n }\n}\n"],"mappings":";;;;;;;;AAqCO,IAAMI,IAAN,cAAuBC,EAAuBC,CAAU,CAAC,CAAC;;EAC/C,KAAA,SAAAC,EAAU,CAACP,CAAM,CAAC;;;EAKP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,UAAU;EACtB;;;EAE4B,KAAA,qBAAA,CAAC;;CAE7B,SAAS;EACP,OAAO,CAAI;CAOb;CAEA,cAAc;EAEZ,AADA,MAAM,GACN,KAAK,OAAO;CACd;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,WAAW,OAAO;CACzB;AACF;AA7BGC,EAAA,CAAAO,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAAJ,EAAA,WAAA,UAAA,KAAA,CAAA,GAL1C,IAAAH,EAAA,CAAAQ,EAAM,CAAA,GAAAL,CAAA"}
|
package/dist/menu/menu2.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
2
|
import { appendRootNodeStyle as t } from "../internal/utils/dom.js";
|
|
3
3
|
import { KeyNavigationListController as n } from "../internal/controllers/keynav-list.controller.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "
|
|
8
|
-
import s from "
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
|
|
5
|
+
import i from "./menu.js";
|
|
6
|
+
import a from "./menu.global.js";
|
|
7
|
+
import { attachInternals as o } from "@nvidia-elements/foundations/internal/a11y";
|
|
8
|
+
import { LitElement as s, html as c } from "lit";
|
|
9
|
+
import { property as l } from "lit/decorators/property.js";
|
|
10
|
+
import { useStyles as u } from "@nvidia-elements/foundations/internal/styles";
|
|
11
11
|
import { queryAssignedElements as d } from "lit/decorators/query-assigned-elements.js";
|
|
12
12
|
// src/menu/menu.ts
|
|
13
|
-
var f = class extends
|
|
13
|
+
var f = class extends s {
|
|
14
14
|
static {
|
|
15
|
-
this.styles =
|
|
15
|
+
this.styles = u([i]);
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.metadata = {
|
|
19
19
|
tag: "nve-menu",
|
|
20
|
-
version: "2.23.
|
|
20
|
+
version: "2.23.5",
|
|
21
21
|
children: ["nve-menu-item", "nve-divider"]
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -52,13 +52,13 @@ var f = class extends c {
|
|
|
52
52
|
}));
|
|
53
53
|
};
|
|
54
54
|
render() {
|
|
55
|
-
return
|
|
55
|
+
return c`<div internal-host><slot @slotchange="${this.#a}"></slot></div>`;
|
|
56
56
|
}
|
|
57
57
|
async firstUpdated() {
|
|
58
58
|
await this.updateComplete, this.shadowRoot?.querySelector("[internal-host]")?.addEventListener("scroll", this.#i, { passive: !0 });
|
|
59
59
|
}
|
|
60
60
|
connectedCallback() {
|
|
61
|
-
super.connectedCallback(),
|
|
61
|
+
super.connectedCallback(), o(this), this._internals.role = "menu", t(this, a), this.hasUpdated && (this.#t = this.items), this.parentElement?.localName === "nve-menu-group" && !this.slot && (this.slot = "menu", this.#r = !0);
|
|
62
62
|
}
|
|
63
63
|
disconnectedCallback() {
|
|
64
64
|
super.disconnectedCallback(), this.#t = [], this.#r && this.slot === "menu" && (this.slot = ""), this.#r = !1;
|
|
@@ -67,10 +67,10 @@ var f = class extends c {
|
|
|
67
67
|
this.#e.refreshItems(this.#t), this.#t = this.items;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
r([l({
|
|
71
71
|
type: String,
|
|
72
72
|
reflect: !0
|
|
73
|
-
})], f.prototype, "density", void 0),
|
|
73
|
+
})], f.prototype, "density", void 0), r([d({ selector: "nve-menu-item" })], f.prototype, "items", void 0), f = r([e()], f);
|
|
74
74
|
export { f as Menu };
|
|
75
75
|
|
|
76
76
|
//# sourceMappingURL=menu2.js.map
|