@nvidia-elements/core 2.19.0 → 2.19.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 +12 -0
- package/dist/_virtual/_rolldown/runtime.js +17 -0
- package/dist/accordion/accordion2.js +60 -57
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +37 -31
- package/dist/alert/alert2.js.map +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge.d.ts +0 -6
- package/dist/badge/badge2.js +31 -36
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundles/index.d.ts +25 -27
- package/dist/bundles/index.js +9 -9
- 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/color.d.ts +2 -0
- package/dist/color/color2.js +7 -4
- package/dist/color/color2.js.map +1 -1
- package/dist/combobox/combobox.d.ts +2 -0
- package/dist/combobox/combobox2.js +14 -6
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button2.js +26 -23
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements-jsx.d.ts +0 -4
- package/dist/custom-elements-vue.d.ts +0 -4
- package/dist/custom-elements.json +3 -173
- package/dist/data.html.json +0 -10
- package/dist/data.snippets.json +27 -27
- package/dist/date/date.d.ts +2 -0
- package/dist/date/date2.js +7 -4
- package/dist/date/date2.js.map +1 -1
- package/dist/datetime/datetime.d.ts +2 -0
- package/dist/datetime/datetime2.js +7 -4
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +1 -1
- package/dist/dialog/dialog-header2.js +1 -1
- package/dist/dialog/dialog2.js +27 -27
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +27 -27
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +23 -23
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +28 -22
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.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/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control.d.ts +3 -0
- package/dist/forms/control/control2.js +34 -31
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +26 -21
- package/dist/gauge/gauge2.js.map +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/iframe/iframe2.js +1 -1
- package/dist/index.js +5 -6
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/index.d.ts +1 -2
- package/dist/internal/index.js +150 -33
- package/dist/internal/index.js.map +1 -0
- package/dist/internal/types/index.d.ts +1 -1
- package/dist/internal/types/index.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month.d.ts +2 -0
- package/dist/month/month2.js +7 -4
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +38 -32
- package/dist/notification/notification2.js.map +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-panel.d.ts +0 -7
- package/dist/page/page-panel/page-panel2.js +18 -20
- package/dist/page/page-panel/page-panel2.js.map +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 +45 -38
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +43 -38
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password.d.ts +2 -0
- package/dist/password/password2.js +10 -4
- package/dist/password/password2.js.map +1 -1
- package/dist/preferences-input/preferences-input2.js +32 -27
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/progress-dot2.js +17 -17
- package/dist/progress-dot/progress-dot2.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +27 -22
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +30 -30
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +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 +17 -17
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +44 -41
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/sort-button/sort-button2.js +20 -20
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline2.js +1 -1
- package/dist/star-rating/star-rating2.js +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs-item-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +19 -19
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time.d.ts +2 -0
- package/dist/time/time2.js +7 -4
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/toast2.js +35 -29
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip2.js +25 -25
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +45 -45
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week.d.ts +2 -0
- package/dist/week/week2.js +7 -4
- package/dist/week/week2.js.map +1 -1
- package/package.json +2 -2
- package/dist/internal/controllers/i18n.controller.d.ts +0 -19
- package/dist/internal/controllers/i18n.controller.examples.js +0 -6
- package/dist/internal/controllers/i18n.controller.examples.js.map +0 -1
- package/dist/internal/controllers/i18n.controller.examples.json +0 -16
- package/dist/internal/controllers/i18n.controller.js +0 -38
- package/dist/internal/controllers/i18n.controller.js.map +0 -1
- package/dist/internal/services/i18n.service.d.ts +0 -64
- package/dist/internal/services/i18n.service.js +0 -73
- package/dist/internal/services/i18n.service.js.map +0 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import r from "../
|
|
5
|
-
import
|
|
6
|
-
import a from "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
|
+
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
|
+
import { Icon as r } from "../icon/icon2.js";
|
|
5
|
+
import i from "./sort-button.js";
|
|
6
|
+
import { LitElement as a, html as o } from "lit";
|
|
7
|
+
import { property as s } from "lit/decorators/property.js";
|
|
8
|
+
import { I18nController as c } from "@nvidia-elements/foundations/internal/i18n";
|
|
9
9
|
import { ButtonFormControlMixin as l } from "@nvidia-elements/forms/mixins";
|
|
10
10
|
//#region src/sort-button/sort-button.ts
|
|
11
|
-
var u = {
|
|
11
|
+
var u = { sort: "sort" }, d = {
|
|
12
12
|
none: "ascending",
|
|
13
13
|
ascending: "descending",
|
|
14
14
|
descending: "none"
|
|
15
|
-
},
|
|
15
|
+
}, f = class extends l(a) {
|
|
16
16
|
static {
|
|
17
|
-
this.styles =
|
|
17
|
+
this.styles = t([i]);
|
|
18
18
|
}
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-sort-button",
|
|
22
|
-
version: "2.19.
|
|
22
|
+
version: "2.19.1"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
26
|
-
this.elementDefinitions = { [
|
|
26
|
+
this.elementDefinitions = { [r.metadata.tag]: r };
|
|
27
27
|
}
|
|
28
28
|
#e;
|
|
29
29
|
render() {
|
|
30
|
-
return
|
|
30
|
+
return o`<div internal-host focus-within><nve-icon part="icon" .name="${this.sort === "descending" ? "sort-descending" : "sort-ascending"}" aria-hidden="true"></nve-icon></div>`;
|
|
31
31
|
}
|
|
32
32
|
constructor() {
|
|
33
|
-
super(), this.sort = "none", this.#e = new
|
|
34
|
-
this._internals.ariaLabel = `${this.#e.i18n.sort} ${
|
|
33
|
+
super(), this.sort = "none", this.#e = new c(this, u), this.i18n = this.#e.i18n, this.#t = () => {
|
|
34
|
+
this._internals.ariaLabel = `${this.#e.i18n.sort} ${d[this.sort]}`, this.dispatchEvent(new CustomEvent("sort", {
|
|
35
35
|
detail: {
|
|
36
36
|
value: this.sort,
|
|
37
|
-
next:
|
|
37
|
+
next: d[this.sort]
|
|
38
38
|
},
|
|
39
39
|
bubbles: !0,
|
|
40
40
|
composed: !0
|
|
@@ -49,11 +49,11 @@ var u = {
|
|
|
49
49
|
}
|
|
50
50
|
#t;
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
n([s({
|
|
53
53
|
type: String,
|
|
54
54
|
reflect: !0
|
|
55
|
-
})],
|
|
55
|
+
})], f.prototype, "sort", void 0), n([s({ type: Object })], f.prototype, "i18n", void 0), f = n([e()], f);
|
|
56
56
|
//#endregion
|
|
57
|
-
export {
|
|
57
|
+
export { f as SortButton };
|
|
58
58
|
|
|
59
59
|
//# sourceMappingURL=sort-button2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sort-button2.js","names":[],"sources":["../../src/sort-button/sort-button.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 { Icon } from '@nvidia-elements/core/icon';\nimport { useStyles, I18nController,
|
|
1
|
+
{"version":3,"file":"sort-button2.js","names":[],"sources":["../../src/sort-button/sort-button.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 { Icon } from '@nvidia-elements/core/icon';\nimport { useStyles, scopedRegistry } from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport styles from './sort-button.css?inline';\n\nconst i18nDefaults = {\n sort: 'sort'\n} satisfies I18nDefaults;\n\nconst nextSort = {\n none: 'ascending',\n ascending: 'descending',\n descending: 'none'\n};\n\n/**\n * @element nve-sort-button\n * @description A sort button is a control that enables users to sort a list of items in ascending or descending order.\n * @documentation https://nvidia.github.io/elements/docs/elements/sort-button/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/sort-button\n * @event sort - Dispatched on activation with `detail: { value, next }`, where `value` is the current sort and `next` follows the cycle `none` → `ascending` → `descending` → `none`.\n * @cssprop --width\n * @cssprop --height\n * @cssprop --border-radius\n * @cssprop --color\n * @csspart icon - The icon element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/\n */\n@scopedRegistry()\nexport class SortButton extends ButtonFormControlMixin(LitElement) {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-sort-button',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /**\n * The current sort value, can be ascending, descending, or none.\n */\n @property({ type: String, reflect: true }) sort: 'ascending' | 'descending' | 'none' = 'none';\n\n #i18nController: I18nController<this> = new I18nController<this>(this, i18nDefaults);\n\n /**\n * Updates internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n render() {\n return html`\n <div internal-host focus-within>\n <nve-icon part=\"icon\" .name=${this.sort === 'descending' ? 'sort-descending' : 'sort-ascending'} aria-hidden=\"true\"></nve-icon>\n </div>\n `;\n }\n\n constructor() {\n super();\n this.type = 'button';\n }\n\n connectedCallback() {\n super.connectedCallback();\n this._internals.role = 'spinbutton';\n this.addEventListener('click', this.#onClick);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('click', this.#onClick);\n }\n\n #onClick = () => {\n this._internals.ariaLabel = `${this.#i18nController.i18n.sort} ${nextSort[this.sort]}`;\n this.dispatchEvent(\n new CustomEvent('sort', {\n detail: { value: this.sort, next: nextSort[this.sort] },\n bubbles: true,\n composed: true\n })\n );\n };\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAe,EACnB,MAAM,OACR,GAEM,IAAW;CACf,MAAM;CACN,WAAW;CACX,YAAY;AACd,GAiBa,IAAN,cAAyB,EAAuB,CAAU,CAAC,CAAC;;EACjD,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAK,SAAS,MAAM,EACvB;;CAOA;CAOA,SAAS;EACP,OAAO,CAAI,gEAEuB,KAAK,SAAS,eAAe,oBAAoB,iBAAiB;CAGtG;CAEA,cAAc;EAEZ,AADA,MAAM,GAlB+E,KAAA,OAAA,QAE/C,KAAA,KAAA,IAAI,EAAqB,MAAM,CAAY,GAKhD,KAAA,OAAA,KAAK,GAAgB,MA0BvC,KAAA,WAAA;GAEf,AADA,KAAK,WAAW,YAAY,GAAG,KAAK,GAAgB,KAAK,KAAK,GAAG,EAAS,KAAK,SAC/E,KAAK,cACH,IAAI,YAAY,QAAQ;IACtB,QAAQ;KAAE,OAAO,KAAK;KAAM,MAAM,EAAS,KAAK;IAAM;IACtD,SAAS;IACT,UAAU;GACZ,CAAC,CACH;EACF,GAvBE,KAAK,OAAO;CACd;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,KAAK,WAAW,OAAO,cACvB,KAAK,iBAAiB,SAAS,KAAK,EAAQ;CAC9C;CAEA,uBAAuB;EAErB,AADA,MAAM,qBAAqB,GAC3B,KAAK,oBAAoB,SAAS,KAAK,EAAQ;CACjD;CAEA;AAUF;AA3CG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAOxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAvB3B,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/steps/steps2.js
CHANGED
|
@@ -23,7 +23,7 @@ var v = class extends h(d) {
|
|
|
23
23
|
static {
|
|
24
24
|
this.metadata = {
|
|
25
25
|
tag: "nve-steps-item",
|
|
26
|
-
version: "2.19.
|
|
26
|
+
version: "2.19.1",
|
|
27
27
|
parents: ["nve-steps"]
|
|
28
28
|
};
|
|
29
29
|
}
|
|
@@ -69,7 +69,7 @@ var y = class extends d {
|
|
|
69
69
|
static {
|
|
70
70
|
this.metadata = {
|
|
71
71
|
tag: "nve-steps",
|
|
72
|
-
version: "2.19.
|
|
72
|
+
version: "2.19.1",
|
|
73
73
|
children: ["nve-steps-item"]
|
|
74
74
|
};
|
|
75
75
|
}
|
package/dist/switch/switch2.js
CHANGED
package/dist/tabs/tabs-group2.js
CHANGED
package/dist/tabs/tabs2.js
CHANGED
|
@@ -21,7 +21,7 @@ var y = class extends _(m) {
|
|
|
21
21
|
static {
|
|
22
22
|
this.metadata = {
|
|
23
23
|
tag: "nve-tabs-item",
|
|
24
|
-
version: "2.19.
|
|
24
|
+
version: "2.19.1",
|
|
25
25
|
parents: ["nve-tabs", "nve-tabs-item-group"]
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -65,7 +65,7 @@ var b = class extends m {
|
|
|
65
65
|
static {
|
|
66
66
|
this.metadata = {
|
|
67
67
|
tag: "nve-tabs",
|
|
68
|
-
version: "2.19.
|
|
68
|
+
version: "2.19.1",
|
|
69
69
|
children: ["nve-tabs-item", "nve-tabs-item-group"]
|
|
70
70
|
};
|
|
71
71
|
}
|
package/dist/tag/tag2.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import a from "../
|
|
6
|
-
import
|
|
7
|
-
import s from "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { TypeClosableController as e } from "../internal/controllers/type-closable.controller.js";
|
|
2
|
+
import { scopedRegistry as t } from "../internal/decorators/scoped-registry.js";
|
|
3
|
+
import { colorStateStyles as n, useStyles as r } from "../internal/styles/index.js";
|
|
4
|
+
import i from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
5
|
+
import { Icon as a } from "../icon/icon2.js";
|
|
6
|
+
import o from "./tag.js";
|
|
7
|
+
import { LitElement as s, html as c } from "lit";
|
|
8
|
+
import { property as l } from "lit/decorators/property.js";
|
|
9
|
+
import { I18nController as u } from "@nvidia-elements/foundations/internal/i18n";
|
|
10
10
|
import { ButtonFormControlMixin as d } from "@nvidia-elements/forms/mixins";
|
|
11
11
|
import { ifDefined as f } from "lit/directives/if-defined.js";
|
|
12
12
|
//#region src/tag/tag.ts
|
|
13
|
-
var p = class extends d(
|
|
13
|
+
var p = { close: "close" }, m = class extends d(s) {
|
|
14
14
|
static {
|
|
15
|
-
this.styles =
|
|
15
|
+
this.styles = r([n, o]);
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.metadata = {
|
|
19
19
|
tag: "nve-tag",
|
|
20
|
-
version: "2.19.
|
|
20
|
+
version: "2.19.1"
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
static {
|
|
24
|
-
this.elementDefinitions = { [
|
|
24
|
+
this.elementDefinitions = { [a.metadata.tag]: a };
|
|
25
25
|
}
|
|
26
26
|
#e;
|
|
27
27
|
#t;
|
|
28
28
|
render() {
|
|
29
|
-
return
|
|
29
|
+
return c`<div internal-host interaction-state focus-within><slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>${this.closable ? c`<nve-icon part="icon" @click="${() => this.#t.close()}" container="flat" name="cancel" size="sm" role="img" aria-label="${f(this.i18n.close)}"></nve-icon>` : ""}</div>`;
|
|
30
30
|
}
|
|
31
31
|
constructor() {
|
|
32
|
-
super(), this.closable = !1, this.#e = new
|
|
32
|
+
super(), this.closable = !1, this.#e = new u(this, p), this.i18n = this.#e.i18n, this.#t = new e(this), this.type = "button";
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
i([l({ type: Boolean })], m.prototype, "closable", void 0), i([l({
|
|
36
36
|
type: String,
|
|
37
37
|
reflect: !0
|
|
38
|
-
})],
|
|
38
|
+
})], m.prototype, "color", void 0), i([l({
|
|
39
39
|
type: String,
|
|
40
40
|
reflect: !0
|
|
41
|
-
})],
|
|
41
|
+
})], m.prototype, "prominence", void 0), i([l({ type: Object })], m.prototype, "i18n", void 0), m = i([t()], m);
|
|
42
42
|
//#endregion
|
|
43
|
-
export {
|
|
43
|
+
export { m as Tag };
|
|
44
44
|
|
|
45
45
|
//# sourceMappingURL=tag2.js.map
|
package/dist/tag/tag2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag2.js","names":[],"sources":["../../src/tag/tag.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 { ifDefined } from 'lit/directives/if-defined.js';\nimport { ButtonFormControlMixin } from '@nvidia-elements/forms/mixins';\nimport type { Color, Prominence } from '@nvidia-elements/core/internal';\nimport {
|
|
1
|
+
{"version":3,"file":"tag2.js","names":[],"sources":["../../src/tag/tag.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 { ifDefined } from 'lit/directives/if-defined.js';\nimport { ButtonFormControlMixin } from '@nvidia-elements/forms/mixins';\nimport type { Color, Prominence } from '@nvidia-elements/core/internal';\nimport { TypeClosableController, useStyles, colorStateStyles, scopedRegistry } from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './tag.css?inline';\n\nconst i18nDefaults = {\n close: 'close'\n} satisfies I18nDefaults;\n\n/**\n * @element nve-tag\n * @description A interactive element that represents a category or group of content. Typically used to filter or organize content for one to many relations.\n * @documentation https://nvidia.github.io/elements/docs/elements/tag/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/tag\n * @slot - Text or other content that identifies the category or group.\n * @slot prefix - Optional prefix content, such as a status nve-icon.\n * @slot suffix - Optional suffix content, such as a nve-dot counter.\n * @cssprop --background\n * @cssprop --color\n * @cssprop --gap\n * @cssprop --font-size\n * @cssprop --padding\n * @cssprop --border\n * @cssprop --border-radius\n * @cssprop --font-weight\n * @cssprop --cursor\n * @cssprop --height\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --text-decoration\n * @csspart icon - The icon element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/\n */\n@scopedRegistry()\nexport class Tag extends ButtonFormControlMixin(LitElement) {\n static styles = useStyles([colorStateStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-tag',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** Determines if tag is closable, if true, the component renders a close icon. */\n @property({ type: Boolean }) closable = false;\n\n /** Determines the color of the tag. */\n @property({ type: String, reflect: true }) color: Color;\n\n /** Determines the visual prominence or weight */\n @property({ type: String, reflect: true }) prominence?: Extract<Prominence, 'emphasis'>;\n\n #i18nController: I18nController<this> = new I18nController<this>(this, i18nDefaults);\n\n /** Updates internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n #typeClosableController = new TypeClosableController(this);\n\n render() {\n return html`\n <div internal-host interaction-state focus-within>\n <slot name=\"prefix\"></slot>\n <slot></slot>\n <slot name=\"suffix\"></slot>\n ${this.closable ? html`<nve-icon part=\"icon\" @click=${() => this.#typeClosableController.close()} container=\"flat\" name=\"cancel\" size=\"sm\" role=\"img\" aria-label=${ifDefined(this.i18n.close)}></nve-icon>` : ''}\n </div>\n `;\n }\n\n constructor() {\n super();\n this.type = 'button';\n }\n}\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,IAAe,EACnB,OAAO,QACT,GA4Ba,IAAN,cAAkB,EAAuB,CAAU,CAAC,CAAC;;EAC1C,KAAA,SAAA,EAAU,CAAC,GAAkB,CAAM,CAAC;;;EAEzB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAK,SAAS,MAAM,EACvB;;CAWA;CAKA;CAEA,SAAS;EACP,OAAO,CAAI,wHAKL,KAAK,WAAW,CAAI,uCAAsC,KAAK,GAAwB,MAAM,EAAE,oEAAkE,EAAU,KAAK,KAAK,KAAK,EAAE,iBAAgB,GAAG;CAGvN;CAEA,cAAc;EAEZ,AADA,MAAM,GA3BgC,KAAA,WAAA,IAQA,KAAA,KAAA,IAAI,EAAqB,MAAM,CAAY,GAGhD,KAAA,OAAA,KAAK,GAAgB,MAE9B,KAAA,KAAA,IAAI,EAAuB,IAAI,GAevD,KAAK,OAAO;CACd;AACF;AA9BG,EAAA,CAAA,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAG1B,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,GAGxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAzB3B,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/time/time.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ContainerElement } from '@nvidia-elements/core/internal';
|
|
2
2
|
import { Control } from '@nvidia-elements/core/forms';
|
|
3
3
|
import { IconButton } from '@nvidia-elements/core/icon-button';
|
|
4
|
+
import type { I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';
|
|
4
5
|
/**
|
|
5
6
|
* @element nve-time
|
|
6
7
|
* @description A time picker is a control that enables users to choose a time value.
|
|
@@ -18,6 +19,7 @@ import { IconButton } from '@nvidia-elements/core/icon-button';
|
|
|
18
19
|
* @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time
|
|
19
20
|
*/
|
|
20
21
|
export declare class Time extends Control implements ContainerElement {
|
|
22
|
+
protected get i18nDefaults(): I18nDefaults;
|
|
21
23
|
/**
|
|
22
24
|
* Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.
|
|
23
25
|
* Use when embedding within another container such as a toolbar.
|
package/dist/time/time2.js
CHANGED
|
@@ -8,7 +8,10 @@ import o from "./time.js";
|
|
|
8
8
|
import { html as s } from "lit";
|
|
9
9
|
import { property as c } from "lit/decorators/property.js";
|
|
10
10
|
//#region src/time/time.ts
|
|
11
|
-
var l = class extends r {
|
|
11
|
+
var l = { expand: "expand" }, u = class extends r {
|
|
12
|
+
get i18nDefaults() {
|
|
13
|
+
return l;
|
|
14
|
+
}
|
|
12
15
|
static {
|
|
13
16
|
this.styles = t([
|
|
14
17
|
...r.styles,
|
|
@@ -19,7 +22,7 @@ var l = class extends r {
|
|
|
19
22
|
static {
|
|
20
23
|
this.metadata = {
|
|
21
24
|
tag: "nve-time",
|
|
22
|
-
version: "2.19.
|
|
25
|
+
version: "2.19.1"
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
static {
|
|
@@ -32,8 +35,8 @@ var l = class extends r {
|
|
|
32
35
|
n([c({
|
|
33
36
|
type: String,
|
|
34
37
|
reflect: !0
|
|
35
|
-
})],
|
|
38
|
+
})], u.prototype, "container", void 0), u = n([e()], u);
|
|
36
39
|
//#endregion
|
|
37
|
-
export {
|
|
40
|
+
export { u as Time };
|
|
38
41
|
|
|
39
42
|
//# sourceMappingURL=time2.js.map
|
package/dist/time/time2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time2.js","names":[],"sources":["../../src/time/time.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport styles from './time.css?inline';\n\n/**\n * @element nve-time\n * @description A time picker is a control that enables users to choose a time value.\n * @documentation https://nvidia.github.io/elements/docs/elements/time/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/time\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @csspart icon-button - The clock icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time\n */\n@scopedRegistry()\nexport class Time extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-time',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"clock\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"time2.js","names":[],"sources":["../../src/time/time.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport type { I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport styles from './time.css?inline';\n\nconst i18nDefaults = {\n expand: 'expand'\n} satisfies I18nDefaults;\n\n/**\n * @element nve-time\n * @description A time picker is a control that enables users to choose a time value.\n * @documentation https://nvidia.github.io/elements/docs/elements/time/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/time\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @csspart icon-button - The clock icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/time\n */\n@scopedRegistry()\nexport class Time extends Control implements ContainerElement {\n protected override get i18nDefaults(): I18nDefaults {\n return i18nDefaults;\n }\n\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-time',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"clock\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAM,IAAe,EACnB,QAAQ,SACV,GAmBa,IAAN,cAAmB,EAAoC;CAC5D,IAAuB,eAA6B;EAClD,OAAO;CACT;;EAQgB,KAAA,SAAA,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;EAEvC,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,IAAc,gBAAgB;EAC5B,OAAO,CAAI,mDAAkD,KAAK,KAAK,OAAO,iDAA+C,KAAK,WAAW;CAC/I;AACF;AAhBG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAV1C,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/toast/toast2.js
CHANGED
|
@@ -1,66 +1,72 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import c from "../
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import d from "
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { attachInternals as t } from "../internal/utils/a11y.js";
|
|
3
|
+
import { TypeNativePopoverController as n } from "../internal/controllers/type-native-popover.controller.js";
|
|
4
|
+
import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
|
|
5
|
+
import { useStyles as i } from "../internal/styles/index.js";
|
|
6
|
+
import { popoverStyles as a } from "../internal/styles/popover2.js";
|
|
7
|
+
import { statusIcons as o } from "../internal/types/index.js";
|
|
8
|
+
import s from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
9
|
+
import { Icon as c } from "../icon/icon2.js";
|
|
10
|
+
import { IconButton as l } from "../icon-button/icon-button2.js";
|
|
11
|
+
import u from "./toast.js";
|
|
12
|
+
import { LitElement as d, html as f, nothing as p } from "lit";
|
|
13
|
+
import { property as m } from "lit/decorators/property.js";
|
|
14
|
+
import { I18nController as h } from "@nvidia-elements/foundations/internal/i18n";
|
|
15
15
|
//#region src/toast/toast.ts
|
|
16
|
-
var g =
|
|
16
|
+
var g = {
|
|
17
|
+
close: "close",
|
|
18
|
+
danger: "danger",
|
|
19
|
+
information: "information",
|
|
20
|
+
success: "success",
|
|
21
|
+
warning: "warning"
|
|
22
|
+
}, _ = class extends d {
|
|
17
23
|
constructor(...e) {
|
|
18
|
-
super(...e), this.position = "top", this.closable = !1, this.closeTimeout = 0, this.#e = new
|
|
24
|
+
super(...e), this.position = "top", this.closable = !1, this.closeTimeout = 0, this.#e = new h(this, g), this.i18n = this.#e.i18n, this.popoverType = "manual", this.typeNativePopoverController = new n(this);
|
|
19
25
|
}
|
|
20
26
|
static {
|
|
21
|
-
this.styles =
|
|
27
|
+
this.styles = i([a, u]);
|
|
22
28
|
}
|
|
23
29
|
static {
|
|
24
30
|
this.metadata = {
|
|
25
31
|
tag: "nve-toast",
|
|
26
|
-
version: "2.19.
|
|
32
|
+
version: "2.19.1"
|
|
27
33
|
};
|
|
28
34
|
}
|
|
29
35
|
static {
|
|
30
36
|
this.elementDefinitions = {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
37
|
+
[l.metadata.tag]: l,
|
|
38
|
+
[c.metadata.tag]: c
|
|
33
39
|
};
|
|
34
40
|
}
|
|
35
41
|
#e;
|
|
36
42
|
render() {
|
|
37
|
-
return
|
|
43
|
+
return f`<div internal-host><slot name="prefix"><nve-icon part="prefix-icon" .name="${o[this.status]}" .ariaLabel="${this.i18n[this.status] ?? this.i18n.information}"></nve-icon></slot>${this.closable ? f`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" @click="${this.hidePopover}" icon-name="cancel" container="flat" .ariaLabel="${this.i18n.close}"></nve-icon-button>` : p}<slot></slot></div>`;
|
|
38
44
|
}
|
|
39
45
|
connectedCallback() {
|
|
40
|
-
super.connectedCallback(),
|
|
46
|
+
super.connectedCallback(), t(this), this._internals.role = "alert";
|
|
41
47
|
}
|
|
42
48
|
};
|
|
43
|
-
|
|
49
|
+
s([m({ type: String })], _.prototype, "anchor", void 0), s([m({ type: String })], _.prototype, "trigger", void 0), s([m({
|
|
44
50
|
type: String,
|
|
45
51
|
reflect: !0
|
|
46
|
-
})],
|
|
52
|
+
})], _.prototype, "position", void 0), s([m({
|
|
47
53
|
type: String,
|
|
48
54
|
reflect: !0
|
|
49
|
-
})],
|
|
55
|
+
})], _.prototype, "alignment", void 0), s([m({
|
|
50
56
|
type: String,
|
|
51
57
|
reflect: !0
|
|
52
|
-
})],
|
|
58
|
+
})], _.prototype, "prominence", void 0), s([m({
|
|
53
59
|
type: Boolean,
|
|
54
60
|
reflect: !0,
|
|
55
61
|
attribute: "behavior-trigger"
|
|
56
|
-
})],
|
|
62
|
+
})], _.prototype, "behaviorTrigger", void 0), s([m({ type: Boolean })], _.prototype, "closable", void 0), s([m({
|
|
57
63
|
type: Number,
|
|
58
64
|
attribute: "close-timeout"
|
|
59
|
-
})],
|
|
65
|
+
})], _.prototype, "closeTimeout", void 0), s([m({
|
|
60
66
|
type: String,
|
|
61
67
|
reflect: !0
|
|
62
|
-
})],
|
|
68
|
+
})], _.prototype, "status", void 0), s([m({ type: Object })], _.prototype, "i18n", void 0), _ = s([r(), e({ excessiveInstanceLimit: 50 })], _);
|
|
63
69
|
//#endregion
|
|
64
|
-
export {
|
|
70
|
+
export { _ as Toast };
|
|
65
71
|
|
|
66
72
|
//# sourceMappingURL=toast2.js.map
|
package/dist/toast/toast2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast2.js","names":[],"sources":["../../src/toast/toast.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { PopoverAlign, PopoverPosition, PopoverType, SupportStatus } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n audit,\n excessiveInstanceLimit,\n
|
|
1
|
+
{"version":3,"file":"toast2.js","names":[],"sources":["../../src/toast/toast.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { PopoverAlign, PopoverPosition, PopoverType, SupportStatus } from '@nvidia-elements/core/internal';\nimport {\n attachInternals,\n audit,\n excessiveInstanceLimit,\n popoverStyles,\n scopedRegistry,\n statusIcons,\n TypeNativePopoverController,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { I18nController, type I18nDefaults } from '@nvidia-elements/foundations/internal/i18n';\nimport { Icon, type IconName } from '@nvidia-elements/core/icon';\nimport styles from './toast.css?inline';\n\nconst i18nDefaults = {\n close: 'close',\n danger: 'danger',\n information: 'information',\n success: 'success',\n warning: 'warning'\n} satisfies I18nDefaults;\n\n/**\n * @element nve-toast\n * @description A contextual popup that displays a status. Toasts are [triggered](https://w3c.github.io/aria/#tooltip) by clicking, focusing, or tapping an element and cannot have interactive elements within them.\n * @documentation https://nvidia.github.io/elements/docs/elements/toast/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/toast\n * @event beforetoggle - Dispatched on a popover just before showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforetoggle_event)\n * @event toggle - Dispatched on a popover element just after showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event)\n * @event open - Dispatched when the toast opens.\n * @event close - Dispatched when the toast closes.\n * @slot - The message communicated by the toast.\n * @slot prefix - custom status icon slot\n * @cssprop --padding\n * @cssprop --justify-content\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --color\n * @cssprop --font-size\n * @cssprop --font-weight\n * @cssprop --box-shadow\n * @cssprop --gap\n * @csspart prefix-icon - The prefix icon slot\n * @csspart icon-button - The close icon button element\n * @cssprop --animation-duration - Duration of toast open/close animations\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/\n */\n@scopedRegistry()\n@audit({ excessiveInstanceLimit })\nexport class Toast extends LitElement {\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-toast',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton,\n [Icon.metadata.tag]: Icon\n };\n\n /**\n * (optional) By default the popover automatically anchors itself relative to the trigger element.\n * Pass an optional custom anchor element as an idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) anchor: string | HTMLElement;\n\n /**\n * @deprecated Use the popover API instead.\n * The trigger defines what element triggers an `open` interaction event.\n * A trigger can accept a idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) trigger: string | HTMLElement;\n\n /**\n * Sets the side position of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) position: PopoverPosition = 'top';\n\n /**\n * Sets the alignment of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) alignment: PopoverAlign;\n\n /**\n * Sets the visual prominence of the toast.\n */\n @property({ type: String, reflect: true }) prominence: 'muted';\n\n /**\n * @deprecated Use the popover API instead.\n * Determines if popover visibility behavior should be automatically controlled by the trigger.\n */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-trigger' }) behaviorTrigger: boolean;\n\n /**\n * Determines if a close button should render within toast.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * A delayed `close` event occurs after the provided millisecond value elapses.\n */\n @property({ type: Number, attribute: 'close-timeout' }) closeTimeout = 0;\n\n /**\n * Visual treatment to represent a support status.\n */\n @property({ type: String, reflect: true }) status: SupportStatus;\n\n #i18nController: I18nController<this> = new I18nController<this>(this, i18nDefaults);\n\n /**\n * Updates internal string values for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n /** @private */\n readonly popoverType: PopoverType = 'manual';\n\n protected typeNativePopoverController = new TypeNativePopoverController<Toast>(this);\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <slot name=\"prefix\"><nve-icon part=\"prefix-icon\" .name=${statusIcons[this.status] as IconName} .ariaLabel=${(this.i18n as Record<string, string>)[this.status] ?? this.i18n.information}></nve-icon></slot>\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" @click=${this.hidePopover} icon-name=\"cancel\" container=\"flat\" .ariaLabel=${this.i18n.close}></nve-icon-button>` : nothing}\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'alert';\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,IAAM,IAAe;CACnB,OAAO;CACP,QAAQ;CACR,aAAa;CACb,SAAS;CACT,SAAS;AACX,GA+Ba,IAAN,cAAoB,EAAW;;EAwEI,aA3C+B,KAAA,WAAA,OAqB/B,KAAA,WAAA,IAK+B,KAAA,eAAA,GAO/B,KAAA,KAAA,IAAI,EAAqB,MAAM,CAAY,GAKhD,KAAA,OAAA,KAAK,GAAgB,MAGpB,KAAA,cAAA,UAEI,KAAA,8BAAA,IAAI,EAAmC,IAAI;;;EAvEnE,KAAA,SAAA,EAAU,CAAC,GAAe,CAAM,CAAC;;;EAEtB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA;IACzB,EAAW,SAAS,MAAM;IAC1B,EAAK,SAAS,MAAM;EACvB;;CAmDA;CAeA,SAAS;EACP,OAAO,CAAI,8EAEkD,EAAY,KAAK,QAAoB,gBAAe,KAAK,KAAgC,KAAK,WAAW,KAAK,KAAK,YAAY,sBACtL,KAAK,WAAW,CAAI,mFAAkF,KAAK,YAAY,oDAAkD,KAAK,KAAK,MAAM,wBAAuB,EAAQ;CAIhO;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF;AA3EG,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAOzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GAMxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAmB,CAAC,CAAA,GAAA,EAAA,WAAA,mBAAA,KAAA,CAAA,GAKxE,EAAA,CAAA,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAK1B,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAgB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,GAKrD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAOxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GArE3B,IAAA,EAAA,CAAA,EAAe,GACf,EAAM,EAAE,wBAAA,GAAuB,CAAC,CAAA,GAAA,CAAA"}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import c from "../
|
|
10
|
-
import
|
|
11
|
-
import u from "./toggletip.js";
|
|
12
|
-
import d from "
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { appendRootNodeStyle as t } from "../internal/utils/dom.js";
|
|
3
|
+
import { attachInternals as n } from "../internal/utils/a11y.js";
|
|
4
|
+
import { TypeNativePopoverController as r } from "../internal/controllers/type-native-popover.controller.js";
|
|
5
|
+
import { scopedRegistry as i } from "../internal/decorators/scoped-registry.js";
|
|
6
|
+
import { useStyles as a } from "../internal/styles/index.js";
|
|
7
|
+
import { popoverStyles as o } from "../internal/styles/popover2.js";
|
|
8
|
+
import s from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
9
|
+
import { IconButton as c } from "../icon-button/icon-button2.js";
|
|
10
|
+
import l from "./toggletip.js";
|
|
11
|
+
import u from "./toggletip.global.js";
|
|
12
|
+
import { LitElement as d, html as f } from "lit";
|
|
13
|
+
import { property as p } from "lit/decorators/property.js";
|
|
14
|
+
import { I18nController as m } from "@nvidia-elements/foundations/internal/i18n";
|
|
15
15
|
import { query as h } from "lit/decorators/query.js";
|
|
16
16
|
//#region src/toggletip/toggletip.ts
|
|
17
|
-
var g = class extends
|
|
17
|
+
var g = { close: "close" }, _ = class extends d {
|
|
18
18
|
constructor(...e) {
|
|
19
|
-
super(...e), this.position = "top", this.alignment = "center", this.closable = !1, this.arrow = !0, this.popoverType = "auto", this.typeNativePopoverController = new
|
|
19
|
+
super(...e), this.position = "top", this.alignment = "center", this.closable = !1, this.arrow = !0, this.popoverType = "auto", this.typeNativePopoverController = new r(this), this.#e = new m(this, g), this.i18n = this.#e.i18n;
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
|
-
this.styles =
|
|
22
|
+
this.styles = a([o, l]);
|
|
23
23
|
}
|
|
24
24
|
static {
|
|
25
25
|
this.metadata = {
|
|
26
26
|
tag: "nve-toggletip",
|
|
27
|
-
version: "2.19.
|
|
27
|
+
version: "2.19.1"
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
static {
|
|
31
|
-
this.elementDefinitions = { [
|
|
31
|
+
this.elementDefinitions = { [c.metadata.tag]: c };
|
|
32
32
|
}
|
|
33
33
|
#e;
|
|
34
34
|
render() {
|
|
35
|
-
return
|
|
35
|
+
return f`<div internal-host><slot name="header"></slot>${this.closable ? f`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" @click="${this.hidePopover}" icon-name="cancel" container="flat" size="sm" .ariaLabel="${this.i18n.close}"></nve-icon-button>` : ""}<div id="content" part="_content"><slot></slot></div><slot name="footer"></slot></div>${this.arrow ? f`<div class="arrow"></div>` : ""}`;
|
|
36
36
|
}
|
|
37
37
|
connectedCallback() {
|
|
38
|
-
super.connectedCallback(),
|
|
38
|
+
super.connectedCallback(), n(this), this._internals.role = "toggletip", t(this, u);
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
s([p({ type: String })], _.prototype, "anchor", void 0), s([p({ type: String })], _.prototype, "trigger", void 0), s([p({
|
|
42
42
|
type: String,
|
|
43
43
|
reflect: !0
|
|
44
|
-
})],
|
|
44
|
+
})], _.prototype, "position", void 0), s([p({
|
|
45
45
|
type: String,
|
|
46
46
|
reflect: !0
|
|
47
|
-
})],
|
|
47
|
+
})], _.prototype, "alignment", void 0), s([p({
|
|
48
48
|
type: Boolean,
|
|
49
49
|
reflect: !0,
|
|
50
50
|
attribute: "behavior-trigger"
|
|
51
|
-
})],
|
|
51
|
+
})], _.prototype, "behaviorTrigger", void 0), s([p({ type: Boolean })], _.prototype, "closable", void 0), s([p({ type: Boolean })], _.prototype, "arrow", void 0), s([h(".arrow")], _.prototype, "popoverArrow", void 0), s([p({ type: Object })], _.prototype, "i18n", void 0), _ = s([i(), e({ excessiveInstanceLimit: 50 })], _);
|
|
52
52
|
//#endregion
|
|
53
|
-
export {
|
|
53
|
+
export { _ as Toggletip };
|
|
54
54
|
|
|
55
55
|
//# sourceMappingURL=toggletip2.js.map
|