@nvidia-elements/core 0.2.0 → 0.2.1
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 +7 -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.js +1 -1
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- 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.json +5 -0
- package/dist/data.snippets.json +9 -9
- package/dist/date/date2.js +1 -1
- package/dist/datetime/datetime2.js +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +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/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +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-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.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/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 +1 -1
- 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/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/controllers/type-native-popover.controller.js +18 -15
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/controllers/type-touch.controller.js +1 -0
- package/dist/internal/controllers/type-touch.controller.js.map +1 -1
- package/dist/internal/services/global.service.js +1 -1
- package/dist/logo/logo2.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 +1 -1
- package/dist/page/page2.js +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 +2 -1
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.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/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 +1 -1
- package/dist/toggletip/toggletip-header2.js +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/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +2 -2
package/dist/button/button2.js
CHANGED
package/dist/card/card2.js
CHANGED
|
@@ -16,7 +16,7 @@ var d = class extends c {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-card",
|
|
19
|
-
version: "0.2.
|
|
19
|
+
version: "0.2.1"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
@@ -37,7 +37,7 @@ var f = class extends c {
|
|
|
37
37
|
static {
|
|
38
38
|
this.metadata = {
|
|
39
39
|
tag: "nve-card-header",
|
|
40
|
-
version: "0.2.
|
|
40
|
+
version: "0.2.1",
|
|
41
41
|
parents: ["nve-card"]
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -53,7 +53,7 @@ var p = class extends c {
|
|
|
53
53
|
static {
|
|
54
54
|
this.metadata = {
|
|
55
55
|
tag: "nve-card-content",
|
|
56
|
-
version: "0.2.
|
|
56
|
+
version: "0.2.1",
|
|
57
57
|
parents: ["nve-card"]
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -72,7 +72,7 @@ var m = class extends c {
|
|
|
72
72
|
static {
|
|
73
73
|
this.metadata = {
|
|
74
74
|
tag: "nve-card-footer",
|
|
75
|
-
version: "0.2.
|
|
75
|
+
version: "0.2.1",
|
|
76
76
|
parents: ["nve-card"]
|
|
77
77
|
};
|
|
78
78
|
}
|
package/dist/color/color2.js
CHANGED
|
@@ -31325,6 +31325,11 @@
|
|
|
31325
31325
|
"kind": "method",
|
|
31326
31326
|
"name": "hostDisconnected"
|
|
31327
31327
|
},
|
|
31328
|
+
{
|
|
31329
|
+
"kind": "method",
|
|
31330
|
+
"name": "#clearInterestTimeout",
|
|
31331
|
+
"privacy": "private"
|
|
31332
|
+
},
|
|
31328
31333
|
{
|
|
31329
31334
|
"kind": "method",
|
|
31330
31335
|
"name": "#parseInterestDelay",
|
package/dist/data.snippets.json
CHANGED
|
@@ -179,15 +179,6 @@
|
|
|
179
179
|
"description": "Dropdown with checkbox select pattern",
|
|
180
180
|
"body": "<nve-button id=\"btn\" nve-control>test suites <nve-icon name=\"caret\" direction=\"down\" size=\"sm\"></nve-icon></nve-button>\n\n<nve-dropdown anchor=\"btn\">\n <nve-checkbox-group style=\"width: 250px\">\n <label>${1:Test Suites}</label>\n\n <nve-checkbox>\n <label>${2:Local}</label>\n <input type=\"checkbox\">\n </nve-checkbox>\n\n <nve-checkbox>\n <label>${3:Nightly}</label>\n <input type=\"checkbox\" checked>\n </nve-checkbox>\n\n <nve-checkbox>\n <label>${4:Remote}</label>\n <input type=\"checkbox\">\n </nve-checkbox>\n </nve-checkbox-group>\n</nve-dropdown>\n$0\n"
|
|
181
181
|
},
|
|
182
|
-
"Dialog": {
|
|
183
|
-
"srcFile": "dialog.snippets.html",
|
|
184
|
-
"prefix": [
|
|
185
|
-
"dialog"
|
|
186
|
-
],
|
|
187
|
-
"type": "pattern",
|
|
188
|
-
"description": "Dialog is a component that appears above main content. A modal dialog is used to display critical information that requires users attention.",
|
|
189
|
-
"body": "<nve-dialog size=\"${6:md}\" closable>\n <nve-dialog-header>\n <h3 nve-text=\"heading semibold\">${1:Title}</h3>\n </nve-dialog-header>\n <p nve-text=\"body\">${2:Content}</p>\n <nve-dialog-footer>\n <nve-button>${3:Cancel}</nve-button>\n <nve-button interaction=\"${4:emphasis}\">${5:OK}</nve-button>\n </nve-dialog-footer>\n</nve-dialog>\n$0\n"
|
|
190
|
-
},
|
|
191
182
|
"Card": {
|
|
192
183
|
"srcFile": "card.snippets.html",
|
|
193
184
|
"prefix": [
|
|
@@ -304,5 +295,14 @@
|
|
|
304
295
|
"type": "pattern",
|
|
305
296
|
"description": "Accordion group with two accordion children.",
|
|
306
297
|
"body": "<nve-accordion-group behavior-expand-single container=\"${1:flat}\">\n <nve-accordion>\n <nve-accordion-header>\n <div slot=\"title\">${2:Title}</div>\n </nve-accordion-header>\n\n <nve-accordion-content> ${3:Content} </nve-accordion-content>\n </nve-accordion>\n\n <nve-accordion>\n <nve-accordion-header>\n <div slot=\"title\">${4:Title}</div>\n </nve-accordion-header>\n\n <nve-accordion-content> ${5:Content} </nve-accordion-content>\n </nve-accordion>\n\n <nve-accordion>\n <nve-accordion-header>\n <div slot=\"title\">${6:Title}</div>\n </nve-accordion-header>\n\n <nve-accordion-content> ${7:Content} </nve-accordion-content>\n </nve-accordion>\n</nve-accordion-group>\n$0\n"
|
|
298
|
+
},
|
|
299
|
+
"Dialog": {
|
|
300
|
+
"srcFile": "dialog.snippets.html",
|
|
301
|
+
"prefix": [
|
|
302
|
+
"dialog"
|
|
303
|
+
],
|
|
304
|
+
"type": "pattern",
|
|
305
|
+
"description": "Dialog is a component that appears above main content. A modal dialog is used to display critical information that requires users attention.",
|
|
306
|
+
"body": "<nve-dialog size=\"${6:md}\" closable>\n <nve-dialog-header>\n <h3 nve-text=\"heading semibold\">${1:Title}</h3>\n </nve-dialog-header>\n <p nve-text=\"body\">${2:Content}</p>\n <nve-dialog-footer>\n <nve-button>${3:Cancel}</nve-button>\n <nve-button interaction=\"${4:emphasis}\">${5:OK}</nve-button>\n </nve-dialog-footer>\n</nve-dialog>\n$0\n"
|
|
307
307
|
}
|
|
308
308
|
}
|
package/dist/date/date2.js
CHANGED
package/dist/dialog/dialog2.js
CHANGED
package/dist/divider/divider2.js
CHANGED
package/dist/dot/dot2.js
CHANGED
package/dist/drawer/drawer2.js
CHANGED
package/dist/file/file2.js
CHANGED
package/dist/grid/cell/cell2.js
CHANGED
package/dist/grid/grid2.js
CHANGED
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: "0.2.
|
|
19
|
+
version: "0.2.1"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -86,7 +86,7 @@ n([l({
|
|
|
86
86
|
})], f.prototype, "name", void 0), n([d()], f.prototype, "svg", void 0);
|
|
87
87
|
function p(t) {
|
|
88
88
|
if (typeof globalThis.customElements?.get == "function") {
|
|
89
|
-
let n = e(t.metadata.version), r = e("0.2.
|
|
89
|
+
let n = e(t.metadata.version), r = e("0.2.1");
|
|
90
90
|
n.minor <= r.minor && n.major <= r.major && (t._icons = {
|
|
91
91
|
...t._icons,
|
|
92
92
|
...i
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { getThemeTokens as e } from "./internal/utils/dom.js";
|
|
|
2
2
|
import { I18nService as t } from "./internal/services/i18n.service.js";
|
|
3
3
|
import { statusIcons as n } from "./internal/types/index.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
var r = "0.2.
|
|
5
|
+
var r = "0.2.1", i = "@nvidia-elements";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { t as I18nService, i as SCOPE, r as VERSION, e as getThemeTokens, n as statusIcons };
|
|
8
8
|
|
package/dist/input/input2.js
CHANGED
|
@@ -23,19 +23,19 @@ var c = class {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
async hostConnected() {
|
|
26
|
-
i(this.host), this.host.popover = this.host.popoverType ?? null, await this.host.updateComplete, this.host.setAttribute("nve-popover", ""), this.#
|
|
26
|
+
i(this.host), this.host.popover = this.host.popoverType ?? null, await this.host.updateComplete, this.host.setAttribute("nve-popover", ""), this.#u(), this.#l(), this.#s(), this.host.inert = this.host.matches(":not(:popover-open)") && !!this.#e.length, this.host.addEventListener("beforetoggle", (e) => {
|
|
27
27
|
e.newState === "open" && this.host._internals.states.add("transition-start");
|
|
28
28
|
}), this.host.addEventListener("toggle", (e) => {
|
|
29
|
-
this.host.behaviorTrigger && (this.host.hidden = e.newState === "closed"), e.newState === "open" && this.host.closeTimeout && setTimeout(() => this.host.hidePopover(), this.host.closeTimeout), this.host.inert = this.host.matches(":not(:popover-open)"), this.host.modal && this.#
|
|
29
|
+
this.host.behaviorTrigger && (this.host.hidden = e.newState === "closed"), e.newState === "open" && this.host.closeTimeout && setTimeout(() => this.host.hidePopover(), this.host.closeTimeout), e.newState === "closed" && this.#i(), this.host.inert = this.host.matches(":not(:popover-open)"), this.host.modal && this.#d(e.newState === "open", e.target), this.host.dispatchEvent(new CustomEvent(e.newState === "open" && e.oldState !== "open" ? "open" : "close", {
|
|
30
30
|
bubbles: !0,
|
|
31
31
|
composed: !0,
|
|
32
32
|
detail: { trigger: e.source }
|
|
33
33
|
}));
|
|
34
34
|
}), this.host.addEventListener("command", ((e) => {
|
|
35
|
-
e.command === "toggle-popover" && this.host.togglePopover({ source: e.source }), e.command === "hide-popover" && this.host.hidePopover(), e.command === "show-popover" && this.host.showPopover({ source: e.source });
|
|
35
|
+
e.command === "toggle-popover" && this.host.togglePopover({ source: e.source }), e.command === "hide-popover" && (this.host.hidePopover(), this.#i()), e.command === "show-popover" && this.host.showPopover({ source: e.source });
|
|
36
36
|
})), this.host.addEventListener("interest", ((e) => {
|
|
37
37
|
if (e.source?.localName.includes("-")) {
|
|
38
|
-
let t = this.host.openDelay ?? this.#
|
|
38
|
+
let t = this.host.openDelay ?? this.#a();
|
|
39
39
|
t ? this.#t = setTimeout(() => {
|
|
40
40
|
this.host.isConnected && this.host.showPopover({ source: e.source });
|
|
41
41
|
}, t) : this.host.showPopover({ source: e.source });
|
|
@@ -48,38 +48,41 @@ var c = class {
|
|
|
48
48
|
#n = [];
|
|
49
49
|
#r = null;
|
|
50
50
|
async hostUpdated() {
|
|
51
|
-
this.host.popover = this.host.popoverType ?? null, this.#
|
|
51
|
+
this.host.popover = this.host.popoverType ?? null, this.#u();
|
|
52
52
|
}
|
|
53
53
|
hostDisconnected() {
|
|
54
|
-
this.#n.forEach((e) => e.disconnect()), this.#
|
|
54
|
+
this.#n.forEach((e) => e.disconnect()), this.#i();
|
|
55
55
|
}
|
|
56
56
|
#i() {
|
|
57
|
+
this.#t &&= (clearTimeout(this.#t), null);
|
|
58
|
+
}
|
|
59
|
+
#a() {
|
|
57
60
|
let e = getComputedStyle(this.host).interestDelayStart;
|
|
58
61
|
if (!e) return 0;
|
|
59
62
|
let t = parseFloat(e);
|
|
60
63
|
return e.endsWith("ms") ? t : t * 1e3;
|
|
61
64
|
}
|
|
62
|
-
#
|
|
63
|
-
#
|
|
65
|
+
#o = !1;
|
|
66
|
+
#s() {
|
|
64
67
|
this.host.addEventListener("pointerdown", (e) => {
|
|
65
|
-
this.host.modal && this.host.matches(":popover-open") && (this.#
|
|
68
|
+
this.host.modal && this.host.matches(":popover-open") && (this.#o = t(e, this.host));
|
|
66
69
|
}), this.host.addEventListener("pointerup", (e) => {
|
|
67
|
-
this.#
|
|
70
|
+
this.#o && this.host.popoverDismissible && this.host.modal && this.host.matches(":popover-open") && !s(this.host) && t(e, this.host) && this.host.hidePopover();
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
|
-
get #
|
|
73
|
+
get #c() {
|
|
71
74
|
return this.host.trigger ? o(this.host, this.host.trigger) : null;
|
|
72
75
|
}
|
|
73
|
-
async #
|
|
76
|
+
async #l() {
|
|
74
77
|
await new Promise((e) => requestAnimationFrame(e)), this.#n.push(r(this.host, ["hidden"], () => {
|
|
75
78
|
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();
|
|
76
79
|
})), this.host.isConnected && !this.#e.length && !this.host.hidden && !this.host.matches(":popover-open") && (this.host.popover = "manual", this.host.showPopover());
|
|
77
80
|
}
|
|
78
|
-
#
|
|
79
|
-
let e = this.#
|
|
81
|
+
#u() {
|
|
82
|
+
let e = this.#c;
|
|
80
83
|
this.#r && this.#r !== e && (this.#r.popoverTargetElement = null, this.#r.removeAttribute("popovertarget")), e && (this.host.popoverType === "hint" ? (e.addEventListener("mouseenter", () => this.host.showPopover({ source: e })), e.addEventListener("mouseleave", () => this.host.hidePopover()), e.addEventListener("focusout", () => this.host.hidePopover())) : (this.host.id = this.host.id ? this.host.id : n(), e.popoverTargetElement = this.host, e.setAttribute("popovertarget", this.host.id)), this.#r = e);
|
|
81
84
|
}
|
|
82
|
-
#
|
|
85
|
+
#d(t, n) {
|
|
83
86
|
t ? this.host.getRootNode().activeElement !== this.host && !this.host.shadowRoot.activeElement && e(this.host) : e(n);
|
|
84
87
|
}
|
|
85
88
|
};
|