@nvidia-elements/core 2.2.0 → 2.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 +12 -0
- package/dist/accordion/accordion.d.ts +7 -5
- package/dist/accordion/accordion2.js +4 -4
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/avatar/avatar-group.d.ts +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar-group2.js.map +1 -1
- package/dist/avatar/avatar.d.ts +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/avatar/avatar2.js.map +1 -1
- package/dist/badge/badge.d.ts +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundles/index.d.ts +67 -45
- 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/card.d.ts +3 -1
- package/dist/card/card2.js +4 -4
- package/dist/card/card2.js.map +1 -1
- package/dist/chat-message/chat-message.d.ts +3 -1
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/chat-message/chat-message2.js.map +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-button.d.ts +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements-jsx.d.ts +1340 -982
- package/dist/custom-elements-vue.d.ts +1048 -859
- package/dist/custom-elements.json +1382 -1948
- package/dist/data.html.json +330 -510
- 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/dialog.d.ts +1 -1
- package/dist/dialog/dialog2.js +1 -1
- package/dist/dialog/dialog2.js.map +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/drawer.d.ts +1 -1
- package/dist/drawer/drawer2.js +1 -1
- 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/dropdown.d.ts +1 -0
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.d.ts +1 -2
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropdown-group/dropdown-group.js.map +1 -1
- package/dist/dropzone/dropzone.d.ts +6 -3
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number.d.ts +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-number/format-number2.js.map +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-message.d.ts +2 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/forms/control-message/control-message2.js.map +1 -1
- package/dist/gauge/gauge2.js +1 -1
- package/dist/grid/cell/cell.d.ts +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/cell/cell2.js.map +1 -1
- package/dist/grid/column/column.d.ts +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/footer/footer.d.ts +2 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/footer/footer2.js.map +1 -1
- package/dist/grid/grid.d.ts +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder.d.ts +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js.map +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/services/global.service.js +1 -1
- package/dist/internal/types/index.d.ts +3 -3
- package/dist/internal/types/index.js.map +1 -1
- package/dist/logo/logo.d.ts +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/logo/logo2.js.map +1 -1
- package/dist/menu/menu-item.d.ts +2 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu-item2.js.map +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/notification.d.ts +1 -1
- package/dist/notification/notification2.js +1 -1
- 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-footer.d.ts +1 -0
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js.map +1 -1
- package/dist/page/page-panel/page-panel-header.d.ts +1 -0
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js.map +1 -1
- package/dist/page/page-panel/page-panel.d.ts +1 -1
- package/dist/page/page-panel/page-panel2.js +1 -1
- 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-loader.d.ts +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/page-loader/page-loader2.js.map +1 -1
- package/dist/pagination/pagination.d.ts +4 -3
- package/dist/pagination/pagination2.js +5 -2
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input.d.ts +2 -0
- package/dist/preferences-input/preferences-input2.js +1 -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-chip.d.ts +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
- 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 +1 -1
- package/dist/search/search2.js +1 -1
- package/dist/select/select2.js +1 -1
- package/dist/skeleton/skeleton.d.ts +2 -2
- package/dist/skeleton/skeleton2.js +1 -1
- package/dist/skeleton/skeleton2.js.map +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/steps.d.ts +1 -1
- package/dist/steps/steps2.js +2 -2
- package/dist/steps/steps2.js.map +1 -1
- 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.d.ts +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/tag.d.ts +1 -1
- package/dist/tag/tag2.js +1 -1
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast.d.ts +1 -1
- package/dist/toast/toast2.js +1 -1
- 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/toggletip.d.ts +1 -0
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar.d.ts +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/toolbar/toolbar2.js.map +1 -1
- package/dist/tooltip/tooltip.d.ts +2 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tooltip/tooltip2.js.map +1 -1
- package/dist/tree/tree-node.d.ts +3 -0
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-message2.js","names":[],"sources":["../../../src/forms/control-message/control-message.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { hostAttr, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { type ValidityStateError } from '../utils/types.js';\nimport styles from './control-message.css?inline';\n\nconst statusIcons = {\n undefined: 'information-circle-stroke',\n disabled: 'information-circle-stroke',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n error: 'exclamation-circle'\n} as const;\n\n/**\n * @element nve-control-message\n * @description Defining a Validity State on a control-message allows messages to show conditionally based on the current HTML5 validity state.\n * @documentation https://nvidia.github.io/elements/docs/elements/control/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/forms\n * @slot -
|
|
1
|
+
{"version":3,"file":"control-message2.js","names":[],"sources":["../../../src/forms/control-message/control-message.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { hostAttr, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { type ValidityStateError } from '../utils/types.js';\nimport styles from './control-message.css?inline';\n\nconst statusIcons = {\n undefined: 'information-circle-stroke',\n disabled: 'information-circle-stroke',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n error: 'exclamation-circle'\n} as const;\n\n/**\n * @element nve-control-message\n * @description Defining a Validity State on a control-message allows messages to show conditionally based on the current HTML5 validity state.\n * @documentation https://nvidia.github.io/elements/docs/elements/control/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/forms\n * @slot - Validation or supporting message text for the associated control.\n * @cssprop --color\n * @cssprop --font-weight\n * @cssprop --font-size\n * @csspart icon - The icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals\n * @package true\n */\n@scopedRegistry()\nexport class ControlMessage extends LitElement {\n /**\n * Visual treatment for current form control validation status\n */\n @property({ type: String, reflect: true }) status?: 'warning' | 'error' | 'success' | 'disabled';\n\n /**\n * Validation error code for current form control\n * https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n */\n @property({ type: String, reflect: true }) error: ValidityStateError | null = null;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-control-message',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** @private */\n @hostAttr() slot = 'messages';\n\n render() {\n return html`\n <div internal-host>\n <slot name=\"icon\"><nve-icon part=\"icon\" name=${this.error ? statusIcons.error : statusIcons[this.status!]}></nve-icon></slot>\n <slot></slot>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAM,IAAc;CAClB,WAAW;CACX,UAAU;CACV,SAAS;CACT,SAAS;CACT,OAAO;AACT,GAiBO,IAAA,cAA6B,EAAW;;4BAUiC,kBAc3D;;;gBAZH,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAK,SAAS,MAAM,EACvB;;CAKA,SAAS;EACP,OAAO,CAAI,oEAEwC,KAAK,QAAQ,EAAY,QAAQ,EAAY,KAAK,QAAS;CAIhH;AACF;GA9BG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAMxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAcxC,EAAS,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UAzBX,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/gauge/gauge2.js
CHANGED
package/dist/grid/cell/cell.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { LitElement } from 'lit';
|
|
|
5
5
|
* @documentation https://nvidia.github.io/elements/docs/elements/data-grid/
|
|
6
6
|
* @since 0.11.0
|
|
7
7
|
* @entrypoint \@nvidia-elements/core/grid
|
|
8
|
-
* @slot -
|
|
8
|
+
* @slot - Data or interactive controls displayed within the cell.
|
|
9
9
|
* @cssprop --background
|
|
10
10
|
* @cssprop --color
|
|
11
11
|
* @cssprop --padding
|
package/dist/grid/cell/cell2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell2.js","names":[],"sources":["../../../src/grid/cell/cell.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 { useStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport styles from './cell.css?inline';\n\n/**\n * @element nve-grid-cell\n * @description Represents an individual data cell within a grid row, displaying content aligned to its parent column.\n * @documentation https://nvidia.github.io/elements/docs/elements/data-grid/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot -
|
|
1
|
+
{"version":3,"file":"cell2.js","names":[],"sources":["../../../src/grid/cell/cell.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 { useStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport styles from './cell.css?inline';\n\n/**\n * @element nve-grid-cell\n * @description Represents an individual data cell within a grid row, displaying content aligned to its parent column.\n * @documentation https://nvidia.github.io/elements/docs/elements/data-grid/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot - Data or interactive controls displayed within the cell.\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --min-height\n * @cssprop --min-width\n * @cssprop --font-weight\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --border-left\n * @cssprop --border-right\n * @cssprop --justify-content\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\nexport class GridCell extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid-cell',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host focusable=\"active\">\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'gridcell';\n }\n}\n"],"mappings":";;;;;AA2BA,IAAa,IAAb,cAA8B,EAAW;;gBACvB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;CAKA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF"}
|
|
@@ -6,7 +6,7 @@ import { LitElement } from 'lit';
|
|
|
6
6
|
* @documentation https://nvidia.github.io/elements/docs/elements/data-grid/
|
|
7
7
|
* @since 0.11.0
|
|
8
8
|
* @entrypoint \@nvidia-elements/core/grid
|
|
9
|
-
* @slot -
|
|
9
|
+
* @slot - Column heading text or controls.
|
|
10
10
|
* @slot actions - slot for column actions
|
|
11
11
|
* @cssprop --color
|
|
12
12
|
* @cssprop --padding
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column2.js","names":["#grid","#onSort","#computeColumnAlignment","#computeColumnPositions","#positionStylesheet","#buildFixedStyles","#buildBorderStyle"],"sources":["../../../src/grid/column/column.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { PropertyValues } from 'lit';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { useStyles, attachInternals, appendRootNodeStyle } from '@nvidia-elements/core/internal';\nimport type { Grid } from '@nvidia-elements/core/grid';\nimport styles from './column.css?inline';\n\n/**\n * @element nve-grid-column\n * @description Defines a column header within a grid, specifying the column's label, width, and alignment for all cells beneath it.\n * @documentation https://nvidia.github.io/elements/docs/elements/data-grid/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot -
|
|
1
|
+
{"version":3,"file":"column2.js","names":["#grid","#onSort","#computeColumnAlignment","#computeColumnPositions","#positionStylesheet","#buildFixedStyles","#buildBorderStyle"],"sources":["../../../src/grid/column/column.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { PropertyValues } from 'lit';\nimport { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { useStyles, attachInternals, appendRootNodeStyle } from '@nvidia-elements/core/internal';\nimport type { Grid } from '@nvidia-elements/core/grid';\nimport styles from './column.css?inline';\n\n/**\n * @element nve-grid-column\n * @description Defines a column header within a grid, specifying the column's label, width, and alignment for all cells beneath it.\n * @documentation https://nvidia.github.io/elements/docs/elements/data-grid/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot - Column heading text or controls.\n * @slot actions - slot for column actions\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --font-weight\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --min-width\n * @cssprop --justify-content\n * @cssprop --border-left\n * @cssprop --border-right\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\nexport class GridColumn extends LitElement {\n /**\n * Only set a fixed px width when you know the grid width. Most cases this should remain unset.\n * If the total width of all columns is less than the grid width then the last column fills the remaining space.\n * By default column widths are evenly divided unless width is explicitly provided.\n */\n @property({ type: String, reflect: true }) width: string;\n\n /**\n * Set the `position` property or attribute to `fixed` or `sticky` to make the column fixed or sticky.\n * Fixed columns do not scroll horizontally with the grid. Sticky columns scroll horizontally with the grid\n * until the column reaches the edge of the grid.\n */\n @property({ type: String, reflect: true }) position: 'fixed' | 'sticky' | '';\n\n /**\n * Control the content alignment within a given column.\n */\n @property({ type: String, reflect: true, attribute: 'column-align' }) columnAlign: 'start' | 'center' | 'end';\n\n /**\n * @private\n */\n @property({ type: String, reflect: true, attribute: 'aria-colindex' }) ariaColIndex: string; // eslint-disable-line local/reserved-property-names\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid-column',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n get #grid() {\n return this.parentElement!.parentElement as Grid;\n }\n\n render() {\n return html`\n <div internal-host focusable=\"active\">\n <slot></slot>\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'columnheader';\n this.addEventListener('sort', this.#onSort);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('sort', this.#onSort);\n }\n\n #onSort = (e: Event) => {\n this.ariaSort = (e as CustomEvent<{ next: string }>).detail.next;\n };\n\n willUpdate(props: PropertyValues<this>) {\n if (props.has('width') && this.width && Number.isFinite(Number(this.width))) {\n this.width = `${this.width}px`; // eslint-disable-line local/stateless-property\n }\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n\n if (props.get('columnAlign') !== this.columnAlign) {\n this.#computeColumnAlignment();\n }\n\n if (props.get('position') !== this.position) {\n this.#computeColumnPositions();\n }\n\n if (props.get('ariaColIndex') !== this.ariaColIndex) {\n this.#computeColumnPositions();\n this.#computeColumnAlignment();\n }\n\n if (props.get('width') !== this.width) {\n this.dispatchEvent(new CustomEvent('nve-grid-column-resize', { bubbles: true, composed: true }));\n }\n }\n\n #positionStylesheet: CSSStyleSheet;\n\n #computeColumnPositions() {\n if (this.position !== 'fixed') {\n this.removeAttribute('left');\n this.removeAttribute('right');\n this.#positionStylesheet?.replaceSync('');\n return;\n }\n\n const { side, positionStyle, borderStyle } = this.#buildFixedStyles();\n const combinedStyle = `${positionStyle}\\n${borderStyle}`;\n\n if (this.#positionStylesheet) {\n this.#positionStylesheet.replaceSync(combinedStyle);\n } else {\n this.#positionStylesheet = appendRootNodeStyle(this.#grid, combinedStyle);\n }\n\n this.setAttribute(side, '');\n }\n\n #buildFixedStyles() {\n const columns = Array.from(this.parentElement!.querySelectorAll<GridColumn>(GridColumn.metadata.tag));\n const rightColumns = columns.slice(columns.indexOf(this) + 1, columns.length);\n const position = this.getBoundingClientRect();\n const gridPosition = this.#grid.getBoundingClientRect();\n const side = this.offsetLeft < gridPosition.width / 2 ? 'left' : 'right';\n const leftStyle = position.left - gridPosition.left;\n const rightStyle = rightColumns.reduce((width, c) => width + c.getBoundingClientRect().width, 0);\n const selector = `[id='${this.#grid.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),\n [id='${this.#grid.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex})`;\n\n const positionStyle = `\n ${selector} {\n position: sticky;\n z-index: 99;\n ${side === 'left' ? `left: ${leftStyle}px;` : `right: ${rightStyle}px;`}\n }\n `;\n\n const borderStyle = this.#buildBorderStyle(selector, side);\n return { side, positionStyle, borderStyle };\n }\n\n #buildBorderStyle(selector: string, side: 'left' | 'right') {\n const isLastLeft = side === 'left' && (this.nextElementSibling as GridColumn)?.position !== this.position;\n const isLastRight = side === 'right' && (this.previousElementSibling as GridColumn)?.position !== this.position;\n\n if (!isLastLeft && !isLastRight) {\n return '';\n }\n\n return `\n ${selector} {\n box-shadow: var(--scroll-shadow);\n clip-path: inset(0px ${isLastLeft ? '-4px' : '0'} 0px ${isLastRight ? '-4px' : '0'});\n --border-${side === 'right' ? 'left' : 'right'}: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);\n }\n `;\n }\n\n #computeColumnAlignment() {\n if (this.columnAlign !== undefined) {\n appendRootNodeStyle(\n this.#grid,\n `[id='${this.#grid.id}'] nve-grid-column:nth-of-type(${this.ariaColIndex}),\n [id='${this.#grid.id}'] nve-grid-cell:nth-of-type(${this.ariaColIndex}) {\n --justify-content: ${this.columnAlign}\n }`\n );\n }\n }\n}\n"],"mappings":";;;;;;;;AA6BA,IAAa,IAAb,MAAa,UAAmB,EAAW;;gBAyBzB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;CAKA,IAAIA,KAAQ;EACV,OAAO,KAAK,cAAe;CAC7B;CAEA,SAAS;EACP,OAAO,CAAI;CAMb;CAEA,oBAAoB;EAIlB,AAHA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO,gBACvB,KAAK,iBAAiB,QAAQ,KAAKC,EAAO;CAC5C;CAEA,uBAAuB;EAErB,AADA,MAAM,qBAAqB,GAC3B,KAAK,oBAAoB,QAAQ,KAAKA,EAAO;CAC/C;CAEA,MAAW,MAAa;EACtB,KAAK,WAAY,EAAoC,OAAO;CAC9D;CAEA,WAAW,GAA6B;EACtC,AAAI,EAAM,IAAI,OAAO,KAAK,KAAK,SAAS,OAAO,SAAS,OAAO,KAAK,KAAK,CAAC,MACxE,KAAK,QAAQ,GAAG,KAAK,MAAM;CAE/B;CAEA,MAAM,QAAQ,GAA6B;EAgBzC,AAfA,MAAM,QAAQ,CAAK,GAEf,EAAM,IAAI,aAAa,MAAM,KAAK,eACpC,KAAKC,GAAwB,GAG3B,EAAM,IAAI,UAAU,MAAM,KAAK,YACjC,KAAKC,GAAwB,GAG3B,EAAM,IAAI,cAAc,MAAM,KAAK,iBACrC,KAAKA,GAAwB,GAC7B,KAAKD,GAAwB,IAG3B,EAAM,IAAI,OAAO,MAAM,KAAK,SAC9B,KAAK,cAAc,IAAI,YAAY,0BAA0B;GAAE,SAAS;GAAM,UAAU;EAAK,CAAC,CAAC;CAEnG;CAEA;CAEA,KAA0B;EACxB,IAAI,KAAK,aAAa,SAAS;GAG7B,AAFA,KAAK,gBAAgB,MAAM,GAC3B,KAAK,gBAAgB,OAAO,GAC5B,KAAKE,IAAqB,YAAY,EAAE;GACxC;EACF;EAEA,IAAM,EAAE,SAAM,kBAAe,mBAAgB,KAAKC,GAAkB,GAC9D,IAAgB,GAAG,EAAc,IAAI;EAQ3C,AANI,KAAKD,KACP,KAAKA,GAAoB,YAAY,CAAa,IAElD,KAAKA,KAAsB,EAAoB,KAAKJ,IAAO,CAAa,GAG1E,KAAK,aAAa,GAAM,EAAE;CAC5B;CAEA,KAAoB;EAClB,IAAM,IAAU,MAAM,KAAK,KAAK,cAAe,iBAA6B,EAAW,SAAS,GAAG,CAAC,GAC9F,IAAe,EAAQ,MAAM,EAAQ,QAAQ,IAAI,IAAI,GAAG,EAAQ,MAAM,GACtE,IAAW,KAAK,sBAAsB,GACtC,IAAe,KAAKA,GAAM,sBAAsB,GAChD,IAAO,KAAK,aAAa,EAAa,QAAQ,IAAI,SAAS,SAC3D,IAAY,EAAS,OAAO,EAAa,MACzC,IAAa,EAAa,QAAQ,GAAO,MAAM,IAAQ,EAAE,sBAAsB,CAAC,CAAC,OAAO,CAAC,GACzF,IAAW,QAAQ,KAAKA,GAAM,GAAG,iCAAiC,KAAK,aAAa;eAC/E,KAAKA,GAAM,GAAG,+BAA+B,KAAK,aAAa;EAW1E,OAAO;GAAE;GAAM,eAAA;UART,EAAS;;;YAGP,MAAS,SAAS,SAAS,EAAU,OAAO,UAAU,EAAW,KAAA;;;GAK3C,aADV,KAAKM,GAAkB,GAAU,CACvB;EAAY;CAC5C;CAEA,GAAkB,GAAkB,GAAwB;EAC1D,IAAM,IAAa,MAAS,UAAW,KAAK,oBAAmC,aAAa,KAAK,UAC3F,IAAc,MAAS,WAAY,KAAK,wBAAuC,aAAa,KAAK;EAMvG,OAJI,CAAC,KAAc,CAAC,IACX,KAGF;UACD,EAAS;;iCAEc,IAAa,SAAS,IAAI,OAAO,IAAc,SAAS,IAAI;qBACxE,MAAS,UAAU,SAAS,QAAQ;;;CAGvD;CAEA,KAA0B;EACxB,AAAI,KAAK,gBAAgB,KAAA,KACvB,EACE,KAAKN,IACL,QAAQ,KAAKA,GAAM,GAAG,iCAAiC,KAAK,aAAa;eAClE,KAAKA,GAAM,GAAG,+BAA+B,KAAK,aAAa;+BAC/C,KAAK,YAAA;UAE9B;CAEJ;AACF;GA9JG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAOxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,WAAW;AAAe,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,MAKnE,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,WAAW;AAAgB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { LitElement } from 'lit';
|
|
|
4
4
|
* @since 0.11.0
|
|
5
5
|
* @entrypoint \@nvidia-elements/core/grid
|
|
6
6
|
* @description Grid footer displays contextual information or user actions such as pagination.
|
|
7
|
-
* @slot -
|
|
7
|
+
* @slot - Grid summary, pagination, or other footer controls.
|
|
8
8
|
* @cssprop --background
|
|
9
9
|
* @cssprop --color
|
|
10
10
|
* @cssprop --padding
|
|
@@ -20,6 +20,7 @@ export declare class GridFooter extends LitElement {
|
|
|
20
20
|
static elementDefinitions: {};
|
|
21
21
|
/** @private */
|
|
22
22
|
_internals: ElementInternals;
|
|
23
|
+
/** @private */
|
|
23
24
|
slot: string;
|
|
24
25
|
render(): import("lit").TemplateResult<1>;
|
|
25
26
|
connectedCallback(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footer2.js","names":[],"sources":["../../../src/grid/footer/footer.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 { useStyles, attachInternals, hostAttr } from '@nvidia-elements/core/internal';\nimport styles from './footer.css?inline';\n\n/**\n * @element nve-grid-footer\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @description Grid footer displays contextual information or user actions such as pagination.\n * @slot -
|
|
1
|
+
{"version":3,"file":"footer2.js","names":[],"sources":["../../../src/grid/footer/footer.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 { useStyles, attachInternals, hostAttr } from '@nvidia-elements/core/internal';\nimport styles from './footer.css?inline';\n\n/**\n * @element nve-grid-footer\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @description Grid footer displays contextual information or user actions such as pagination.\n * @slot - Grid summary, pagination, or other footer controls.\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --height\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\nexport class GridFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid-footer',\n version: '0.0.0'\n };\n\n static elementDefinitions = {};\n\n /** @private */\n _internals: ElementInternals;\n\n /** @private */\n @hostAttr() slot = 'footer';\n\n render() {\n return html`\n <div internal-host role=\"gridcell\">\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'row';\n }\n}\n"],"mappings":";;;;;;;AAmBA,IAAa,IAAb,cAAgC,EAAW;;2BActB;;;gBAbH,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,CAAC;;CAQ7B,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF;GAfG,EAAS,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
package/dist/grid/grid.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GridCell } from './cell/cell.js';
|
|
|
11
11
|
* @documentation https://nvidia.github.io/elements/docs/elements/data-grid/
|
|
12
12
|
* @since 0.11.0
|
|
13
13
|
* @entrypoint \@nvidia-elements/core/grid
|
|
14
|
-
* @slot -
|
|
14
|
+
* @slot - `nve-grid-header`, `nve-grid-row`, and `nve-grid-placeholder` elements.
|
|
15
15
|
* @slot footer - slot for grid-footer or toolbar
|
|
16
16
|
* @cssprop --background
|
|
17
17
|
* @cssprop --color
|
package/dist/grid/grid2.js
CHANGED
package/dist/grid/grid2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid2.js","names":["#columns","#header","#rows","#cells"],"sources":["../../src/grid/grid.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 { ContainerElement } from '@nvidia-elements/core/internal';\nimport {\n keyNavigationGrid,\n stateScroll,\n type StateScrollConfig,\n useStyles,\n attachInternals,\n appendRootNodeStyle,\n generateId,\n audit\n} from '@nvidia-elements/core/internal';\nimport { GridPlaceholder } from './placeholder/placeholder.js';\nimport { GridHeader } from './header/header.js';\nimport { GridColumn } from './column/column.js';\nimport { GridFooter } from './footer/footer.js';\nimport { GridRow } from './row/row.js';\nimport { GridCell } from './cell/cell.js';\nimport styles from './grid.css?inline';\nimport globalStyles from './grid.global.css?inline';\n\n/**\n * @element nve-grid\n * @description A versatile table/datagrid component with built-in keyboard navigation for displaying and interacting with structured data. Use it for anything from simple read-only tables to fully interactive, spreadsheet experiences.\n * @documentation https://nvidia.github.io/elements/docs/elements/data-grid/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot -
|
|
1
|
+
{"version":3,"file":"grid2.js","names":["#columns","#header","#rows","#cells"],"sources":["../../src/grid/grid.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 { ContainerElement } from '@nvidia-elements/core/internal';\nimport {\n keyNavigationGrid,\n stateScroll,\n type StateScrollConfig,\n useStyles,\n attachInternals,\n appendRootNodeStyle,\n generateId,\n audit\n} from '@nvidia-elements/core/internal';\nimport { GridPlaceholder } from './placeholder/placeholder.js';\nimport { GridHeader } from './header/header.js';\nimport { GridColumn } from './column/column.js';\nimport { GridFooter } from './footer/footer.js';\nimport { GridRow } from './row/row.js';\nimport { GridCell } from './cell/cell.js';\nimport styles from './grid.css?inline';\nimport globalStyles from './grid.global.css?inline';\n\n/**\n * @element nve-grid\n * @description A versatile table/datagrid component with built-in keyboard navigation for displaying and interacting with structured data. Use it for anything from simple read-only tables to fully interactive, spreadsheet experiences.\n * @documentation https://nvidia.github.io/elements/docs/elements/data-grid/\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @slot - `nve-grid-header`, `nve-grid-row`, and `nve-grid-placeholder` elements.\n * @slot footer - slot for grid-footer or toolbar\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --box-shadow\n * @cssprop --font-size\n * @cssprop --row-height - fixed height of each row\n * @cssprop --scroll-height - height of the scrollable area\n\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\n@audit()\n@stateScroll<Grid>()\n@keyNavigationGrid<Grid>()\nexport class Grid extends LitElement implements ContainerElement {\n /**\n * Determines the container styles of component. Flat nests the grid within other containers. Full spans the full edge-to-edge viewport width.\n */\n @property({ type: String, reflect: true }) container?: 'flat' | 'full';\n\n /**\n * Determine style variant stripe rows\n */\n @property({ type: Boolean, reflect: true }) stripe: boolean;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid',\n version: '0.0.0',\n children: [GridRow.metadata.tag, GridHeader.metadata.tag, GridFooter.metadata.tag, GridPlaceholder.metadata.tag]\n };\n\n static elementDefinitions = {};\n\n get keynavGridConfig() {\n return {\n columns: this.#columns,\n rows: [this.#header!, ...this.#rows],\n cells: [...this.#columns, ...this.#cells]\n };\n }\n\n get stateScrollConfig(): StateScrollConfig {\n return {\n target: this.shadowRoot?.querySelector<HTMLElement>('[part=\"_scrollbox\"]') ?? undefined\n };\n }\n\n get #rows() {\n return Array.from(this.querySelectorAll<GridRow>(GridRow.metadata.tag));\n }\n\n get #header() {\n return this.querySelector<GridHeader>(GridHeader.metadata.tag);\n }\n\n get #columns() {\n return Array.from(this.querySelectorAll<GridColumn>(GridColumn.metadata.tag));\n }\n\n get #cells() {\n return Array.from(this.querySelectorAll<GridCell>(GridCell.metadata.tag));\n }\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <div part=\"_scrollbox\">\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'grid';\n this.id ||= generateId();\n appendRootNodeStyle(this, globalStyles);\n }\n\n /**\n * Scroll to a specific position in the grid.\n */\n scrollTo(options?: ScrollToOptions): Promise<void>;\n scrollTo(x: number, y: number): Promise<void>;\n async scrollTo(...args: [options?: ScrollToOptions] | [x: number, y: number]): Promise<void> {\n await this.shadowRoot!.querySelector('[part=\"_scrollbox\"]')?.scrollTo(...(args as [ScrollToOptions]));\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA8CO,IAAA,IAAA,cAAmB,EAAuC;;gBAW/C,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,UAAU;IAAC,EAAQ,SAAS;IAAK,EAAW,SAAS;IAAK,EAAW,SAAS;IAAK,EAAgB,SAAS;GAAG;EACjH;;;4BAE4B,CAAC;;CAE7B,IAAI,mBAAmB;EACrB,OAAO;GACL,SAAS,KAAKA;GACd,MAAM,CAAC,KAAKC,IAAU,GAAG,KAAKC,EAAK;GACnC,OAAO,CAAC,GAAG,KAAKF,IAAU,GAAG,KAAKG,EAAM;EAC1C;CACF;CAEA,IAAI,oBAAuC;EACzC,OAAO,EACL,QAAQ,KAAK,YAAY,cAA2B,uBAAqB,KAAK,KAAA,EAChF;CACF;CAEA,IAAID,KAAQ;EACV,OAAO,MAAM,KAAK,KAAK,iBAA0B,EAAQ,SAAS,GAAG,CAAC;CACxE;CAEA,IAAID,KAAU;EACZ,OAAO,KAAK,cAA0B,EAAW,SAAS,GAAG;CAC/D;CAEA,IAAID,KAAW;EACb,OAAO,MAAM,KAAK,KAAK,iBAA6B,EAAW,SAAS,GAAG,CAAC;CAC9E;CAEA,IAAIG,KAAS;EACX,OAAO,MAAM,KAAK,KAAK,iBAA2B,EAAS,SAAS,GAAG,CAAC;CAC1E;CAKA,SAAS;EACP,OAAO,CAAI;CAQb;CAEA,oBAAoB;EAKlB,AAJA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO,QACvB,KAAK,OAAO,EAAW,GACvB,EAAoB,MAAM,CAAY;CACxC;CAOA,MAAM,SAAS,GAAG,GAA2E;EAC3F,MAAM,KAAK,WAAY,cAAc,uBAAqB,CAAC,EAAE,SAAS,GAAI,CAA0B;CACtG;AACF;GA7EG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA;CAZ3C,EAAM;CACN,EAAkB;CAClB,EAAwB"}
|
|
@@ -4,7 +4,7 @@ import { LitElement } from 'lit';
|
|
|
4
4
|
* @since 0.11.0
|
|
5
5
|
* @entrypoint \@nvidia-elements/core/grid
|
|
6
6
|
* @description Placeholder displays a message while data loads for the grid or shows empty states for datasets.
|
|
7
|
-
* @slot -
|
|
7
|
+
* @slot - Loading or empty-state message displayed in place of grid rows.
|
|
8
8
|
* @cssprop --color
|
|
9
9
|
* @cssprop --padding
|
|
10
10
|
* @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholder2.js","names":[],"sources":["../../../src/grid/placeholder/placeholder.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 { useStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport styles from './placeholder.css?inline';\n\n/**\n * @element nve-grid-placeholder\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @description Placeholder displays a message while data loads for the grid or shows empty states for datasets.\n * @slot -
|
|
1
|
+
{"version":3,"file":"placeholder2.js","names":[],"sources":["../../../src/grid/placeholder/placeholder.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 { useStyles, attachInternals } from '@nvidia-elements/core/internal';\nimport styles from './placeholder.css?inline';\n\n/**\n * @element nve-grid-placeholder\n * @since 0.11.0\n * @entrypoint \\@nvidia-elements/core/grid\n * @description Placeholder displays a message while data loads for the grid or shows empty states for datasets.\n * @slot - Loading or empty-state message displayed in place of grid rows.\n * @cssprop --color\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/grid/\n */\nexport class GridPlaceholder extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-grid-placeholder',\n version: '0.0.0'\n };\n\n /** @private */\n _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host focusable=\"active\" role=\"gridcell\">\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'row';\n }\n}\n"],"mappings":";;;;;AAiBA,IAAa,IAAb,cAAqC,EAAW;;gBAC9B,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;CAKA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF"}
|
package/dist/grid/row/row2.js
CHANGED
package/dist/icon/icon2.js
CHANGED
|
@@ -16,7 +16,7 @@ var f = class e extends o {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-icon",
|
|
19
|
-
version: "2.2.
|
|
19
|
+
version: "2.2.1"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -94,7 +94,7 @@ a([l({
|
|
|
94
94
|
})], f.prototype, "name", void 0), a([d()], f.prototype, "svg", void 0);
|
|
95
95
|
function p(t) {
|
|
96
96
|
if (typeof globalThis.customElements?.get == "function") {
|
|
97
|
-
let n = e(t.metadata.version), i = e("2.2.
|
|
97
|
+
let n = e(t.metadata.version), i = e("2.2.1");
|
|
98
98
|
n.minor <= i.minor && n.major <= i.major && (t._icons = {
|
|
99
99
|
...t._icons,
|
|
100
100
|
...r
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { I18nService as e } from "./internal/services/i18n.service.js";
|
|
|
2
2
|
import { getThemeTokens as t } from "./internal/utils/dom.js";
|
|
3
3
|
import { statusIcons as n } from "./internal/types/index.js";
|
|
4
4
|
//#region src/index.ts
|
|
5
|
-
var r = "2.2.
|
|
5
|
+
var r = "2.2.1", i = "@nvidia-elements";
|
|
6
6
|
//#endregion
|
|
7
7
|
export { e as I18nService, i as SCOPE, r as VERSION, t as getThemeTokens, n as statusIcons };
|
|
8
8
|
|
package/dist/input/input2.js
CHANGED
|
@@ -19,7 +19,7 @@ var a = class {
|
|
|
19
19
|
i18nRegistry: {},
|
|
20
20
|
audit: {}
|
|
21
21
|
}
|
|
22
|
-
}, globalThis.NVE_ELEMENTS.state.versions = Array.from(/* @__PURE__ */ new Set([...globalThis.NVE_ELEMENTS.state.versions, "2.2.
|
|
22
|
+
}, globalThis.NVE_ELEMENTS.state.versions = Array.from(/* @__PURE__ */ new Set([...globalThis.NVE_ELEMENTS.state.versions, "2.2.1"])), globalThis.NVE_ELEMENTS.state.scopedRegistry ??= {}, globalThis.NVE_ELEMENTS.state.scopedRegistry["2.2.1"] = i(), globalThis.NVE_ELEMENTS.state.versions.length > 1 && globalThis.NVE_ELEMENTS.state.env !== "production" && console.warn(e(), `\n\n${JSON.stringify(globalThis.NVE_ELEMENTS.state.versions, null, 2)}`);
|
|
23
23
|
}
|
|
24
24
|
get state() {
|
|
25
25
|
return globalThis.NVE_ELEMENTS.state;
|
|
@@ -223,9 +223,9 @@ export interface NveElement {
|
|
|
223
223
|
position?: 'top-start' | 'top-end' | 'top-center' | 'bottom-start' | 'bottom-end' | 'bottom-center' | 'left-start' | 'left-end' | 'left-center' | 'right-start' | 'right-end' | 'right-center';
|
|
224
224
|
/** Determines the alignment of the popover relative to the provided anchor element. */
|
|
225
225
|
alignment?: 'start' | 'end' | 'center';
|
|
226
|
-
/** Provides the element that the popover should position relative to.
|
|
226
|
+
/** Provides the element that the popover should position relative to. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */
|
|
227
227
|
anchor?: string | HTMLElement;
|
|
228
|
-
/** Defines
|
|
228
|
+
/** Defines the element that triggers an `open` interaction event. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */
|
|
229
229
|
trigger?: string | HTMLElement;
|
|
230
230
|
/** Defines named content areas where users can insert custom markup into the element.
|
|
231
231
|
* - `default` - The primary content area for the element.
|
|
@@ -246,7 +246,7 @@ export interface NveElement {
|
|
|
246
246
|
*/
|
|
247
247
|
closeTimeout?: number;
|
|
248
248
|
/**
|
|
249
|
-
* Sets the delay in milliseconds before the element emits
|
|
249
|
+
* Sets the delay in milliseconds before the element emits an `open` event.
|
|
250
250
|
* - `0` - Keyboard focus interactions (always immediate for accessibility).
|
|
251
251
|
* - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.
|
|
252
252
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal/types/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TemplateResult } from 'lit';\nimport type { IconName } from '@nvidia-elements/core/icon';\nimport type { I18nStrings } from '../services/i18n.service.js';\n\nexport type Color =\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\nexport type Size = 'sm' | 'md' | 'lg';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `xs` - Extra small size for minimal elements or highly dense layouts.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n * - `xl` - Extra large size for emphasizing elements or sparse layouts.\n */\nexport type SizeExpanded = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\nexport type Prominence = 'emphasis' | 'muted';\n\n/**\n * Determines the container bounds of the element\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n * - `condensed` Element container optimizes for small, summarized or contained spaces.\n */\nexport type Container = 'inline' | 'flat' | 'inset' | 'full' | 'condensed';\n\n/** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\nexport type SupportStatus = 'accent' | 'warning' | 'success' | 'danger';\n\n/** Controls how the chart connects intermediate values between points in a data series.\n * - `linear` - Connects points with straight line segments.\n * - `smooth` - Connects points with smooth bezier curves.\n * - `step` - Connects points with horizontal and vertical step segments.\n */\nexport type Interpolation = 'linear' | 'smooth' | 'step';\n\n/** Determines the orientation of an element. */\nexport type Orientation = 'vertical' | 'horizontal';\n\n/** Communicates the current state of a task or process to keep users informed of progress and outcomes.\n * - `scheduled` - Task has a scheduled future execution at a specific time.\n * - `queued` - Task is waiting in line to begin after other tasks complete.\n * - `pending` - Task is awaiting approval, user input, or external conditions before proceeding.\n * - `starting` - Task is initializing and preparing to begin active execution.\n * - `running` - Task is actively executing and making progress.\n * - `restarting` - Task restarts after an interruption or reset.\n * - `stopping` - Task is gracefully shutting down and completing cleanup operations.\n * - `finished` - Task has completed successfully with the expected outcome.\n * - `failed` - Task encountered an error and did not complete as intended.\n * - `unknown` - Task status remains unknown or unavailable.\n * - `ignored` - Task was intentionally skipped or excluded from execution.\n */\nexport type TaskStatus =\n | 'scheduled'\n | 'queued'\n | 'pending'\n | 'starting'\n | 'running'\n | 'restarting'\n | 'stopping'\n | 'finished'\n | 'failed'\n | 'unknown'\n | 'ignored';\n\n/**\n * https://open-ui.org/components/popup.research.explainer#api-shape\n * - `auto` light dismiss, focus on open, return to trigger\n * - `manual` no light dismiss, no auto focus\n * - `hint` no light dismiss, no auto focus, open/close on hover/focus\n */\nexport type PopoverType = 'auto' | 'manual' | 'hint' | 'inline';\n\nexport type InterestEvent = Event & {\n source: HTMLElement;\n};\n\n/** Controls how the popover aligns along the edge of its anchor element.\n * - `start` - Aligns the popover to the beginning edge of the anchor for left or top alignment.\n * - `end` - Aligns the popover to the ending edge of the anchor for right or bottom alignment.\n * - `center` - Centers the popover along the anchor's edge for balanced positioning.\n */\nexport type PopoverAlign = 'start' | 'end' | 'center';\n\n/** Determines the popover position relative to its assigned anchor and alignment.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverSides = 'top' | 'bottom' | 'left' | 'right';\n\n/** Controls the placement of the popover relative to its anchor element.\n * - `center` - Centers the popover directly over the anchor element.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';\n\n/** Determines the position of an element relative to its anchor */\nexport type Placement = PopoverPosition | `${PopoverSides}-${PopoverAlign}`;\n\n/** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\nexport type ControlLayout = 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n/** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\nexport type Current = 'page' | 'step';\n\n/** Controls how data points are visually encoded in a sparkline chart.\n * - `line` - Renders data as a connected line to emphasize macro trend.\n * - `area` - Renders data as a filled area beneath a line to emphasize magnitude over time.\n * - `gradient` - Renders a line with gradient color treatment to communicate value intensity across the series.\n * - `column` - Renders data as vertical columns for easy comparison of discrete values.\n * - `winloss` - Renders outcomes as binary or ternary bars to highlight wins, losses, and optional ties.\n */\nexport type SparklineMark = 'line' | 'area' | 'gradient' | 'column' | 'winloss';\n\nexport interface NveElement {\n /**\n * This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - `true` - The element has a disabled state and does not accept interaction.\n * - `false` - The element has an enabled state and accepts interaction.\n */\n disabled?: boolean;\n\n /** Indicates whether the element is currently actively engaged through user interaction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:active)\n * - `true` - The user is pressing or activating the element (mousedown, keydown, or touch).\n * - `false` - No active user engagement on the element.\n */\n active?: boolean;\n\n /** Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - `true` - The associated content expands and becomes visible to the user.\n * - `false` - The associated content collapses and hides from the user.\n */\n expanded?: boolean;\n\n /** Indicates the current state of a toggle button that switches on or off. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed)\n * - `true` - The button is in the pressed (on) state and the associated action or setting is active.\n * - `false` - The button is in the unpressed (off) state and the associated action or setting is inactive.\n */\n pressed?: boolean;\n\n /** Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n * - `true` - The element holds selection and represents the user's current choice within the group.\n * - `false` - The element does not hold selection and the user can choose it.\n */\n selected?: boolean;\n\n /** Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)\n * - `true` - The element has a readonly state: the user cannot change its value, but can still focus and copy it.\n * - `false` - The element allows editing and the user can change its value through interaction.\n */\n readOnly?: boolean;\n\n /** Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value) */\n value?: string;\n\n /** The name of the element, submitted as a pair with the element value as part of the form data. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name) */\n name?: string;\n\n /** Indicates whether the user can dismiss or close the element.\n * - `true` - The element displays a close control and the user can dismiss it.\n * - `false` - The user cannot close the element and must dismiss it programmatically.\n */\n closable?: boolean;\n\n /** Enables updating internal string values for internationalization. */\n i18n?: Partial<I18nStrings & { __set: boolean }>;\n\n /** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\n current?: 'page' | 'step';\n\n /** Controls the horizontal alignment of the element within its container, respecting the text direction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the beginning of the inline axis (left in LTR, right in RTL).\n * - `center` - Centers the element along the inline axis for balanced visual positioning.\n * - `end` - Aligns the element to the end of the inline axis (right in LTR, left in RTL).\n */\n inlinePosition?: 'start' | 'center' | 'end';\n\n /** Controls the vertical alignment of the element within its container. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the top of the block axis for top-aligned positioning.\n * - `center` - Centers the element along the block axis for balanced vertical positioning.\n * - `end` - Aligns the element to the bottom of the block axis for bottom-aligned positioning.\n */\n blockPosition?: 'start' | 'center' | 'end';\n\n /** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\n layout?: 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n /** Controls the directional flow of the element's layout and interaction pattern.\n * - `vertical` - Element orients vertically with top-to-bottom flow.\n * - `horizontal` - Element orients horizontally with left-to-right flow.\n */\n orientation?: 'vertical' | 'horizontal';\n\n /** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\n prominence?: 'emphasis' | 'muted';\n\n /** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\n interaction?: 'emphasis' | 'destructive';\n\n /** Defines a base color from the theme color palette */\n color?:\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n /** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\n status?: 'accent' | 'warning' | 'success' | 'danger';\n\n /** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Demonstrates different container styles to accommodate visual weight and context.\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\n container?: 'inline' | 'flat' | 'inset' | 'full';\n\n /** Determines the position of an element along both inline and block axis. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout) */\n position?:\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center'\n | 'left-start'\n | 'left-end'\n | 'left-center'\n | 'right-start'\n | 'right-end'\n | 'right-center';\n\n /** Determines the alignment of the popover relative to the provided anchor element. */\n alignment?: 'start' | 'end' | 'center';\n\n /** Provides the element that the popover should position relative to. Anchor can accept a idref string within the same render root or a HTMLElement DOM reference. */\n anchor?: string | HTMLElement;\n\n /** Defines what element triggers an `open` interaction event. A trigger can accept a idref string within the same render root or a HTMLElement DOM reference. */\n trigger?: string | HTMLElement;\n\n /** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\n slots?: 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n /**\n * Sets the automatic dismissal time in milliseconds before the element emits a `close` event. Allow ~200-250ms per word for comfortable reading.\n * - `0` - Warning or error messages requiring immediate acknowledgment.\n * - `3000` - Brief success or confirmation messages.\n * - `7000` - Standard informational messages.\n * - `10000` - Messages with actions or requiring user decision.\n */\n closeTimeout?: number;\n\n /**\n * Sets the delay in milliseconds before the element emits a `open` event.\n * - `0` - Keyboard focus interactions (always immediate for accessibility).\n * - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.\n */\n openDelay?: number;\n\n /** @private An instance of `ElementInternals` that decorators/controllers set dynamically */\n _internals: ElementInternals;\n\n render: TemplateResult;\n}\n\n/** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\nexport type SlotName = 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n/** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\nexport type Interaction = 'emphasis' | 'destructive';\n\nexport interface ContainerElement {\n container?: Partial<Container>;\n}\n\n/** An element that renders complex data structures (e.g., arrays, series, matrices) rather than composable UI content and values expressible with primitive attributes. */\nexport interface DataElement<T extends unknown[] | Record<string, unknown>> {\n data?: T;\n}\n\nexport const statusIcons: { [key: string]: IconName } = {\n '': 'information-circle-stroke',\n undefined: 'information-circle-stroke',\n default: 'information-circle-stroke',\n accent: 'information-circle-stroke',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n danger: 'exclamation-circle',\n scheduled: 'clock',\n failed: 'x-circle',\n finished: 'checkmark-circle',\n unknown: 'question-mark-circle',\n queued: 'bar-pill-stack',\n running: 'running',\n restarting: 'refresh',\n stopping: 'stop-sign',\n pending: 'circle-dash',\n starting: 'circle-dot',\n ignored: 'circle-angled-line'\n} as const;\n\ndeclare global {\n var NVE_ELEMENTS: {\n state: {\n bundle: boolean;\n env: 'watch' | 'production' | 'development';\n pageHost: string;\n moduleHost: string;\n versions: string[];\n scopedRegistry: { [key: string]: CustomElementRegistry };\n elementRegistry: Readonly<{ [key: string]: string }>;\n i18nRegistry: Readonly<{ [key: string]: string }>;\n audit: Readonly<{\n [key: string]: {\n count?: number;\n excessiveInstanceLimitAudited?: boolean;\n };\n }>;\n };\n debug: (log?: (...args: unknown[]) => void) => void;\n };\n\n interface HTMLElement {\n 'nve-text': string;\n 'nve-layout': string;\n }\n\n interface CustomElementRegistry {\n initialize(root: ShadowRoot | Document): void;\n }\n\n var CustomElementRegistry: {\n new (): CustomElementRegistry;\n prototype: CustomElementRegistry;\n };\n}\n\nexport interface ElementDefinition extends CustomElementConstructor {\n metadata: { version: string; tag: string };\n elementDefinitions?: { [key: string]: ElementDefinition };\n shadowRootOptions?: { customElementRegistry?: CustomElementRegistry | null };\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface OffsetPoint {\n offsetX: number;\n offsetY: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport type Rect = Point & Dimensions;\n\nexport interface Scale {\n min: number;\n max: number;\n}\n\n/** https://github.com/tc39/proposal-decorators */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type LegacyDecoratorTarget = Function & {\n addInitializer?: (initializer: (instance: any) => void) => void; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n"],"mappings":";AAgZA,IAAa,IAA2C;CACtD,IAAI;CACJ,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,UAAU;CACV,SAAS;CACT,UAAU;CACV,SAAS;AACX"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/internal/types/index.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { TemplateResult } from 'lit';\nimport type { IconName } from '@nvidia-elements/core/icon';\nimport type { I18nStrings } from '../services/i18n.service.js';\n\nexport type Color =\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\nexport type Size = 'sm' | 'md' | 'lg';\n\n/** Controls the visual scale of an element to match its importance and available space.\n * - `xs` - Extra small size for minimal elements or highly dense layouts.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n * - `xl` - Extra large size for emphasizing elements or sparse layouts.\n */\nexport type SizeExpanded = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\nexport type Prominence = 'emphasis' | 'muted';\n\n/**\n * Determines the container bounds of the element\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n * - `condensed` Element container optimizes for small, summarized or contained spaces.\n */\nexport type Container = 'inline' | 'flat' | 'inset' | 'full' | 'condensed';\n\n/** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\nexport type SupportStatus = 'accent' | 'warning' | 'success' | 'danger';\n\n/** Controls how the chart connects intermediate values between points in a data series.\n * - `linear` - Connects points with straight line segments.\n * - `smooth` - Connects points with smooth bezier curves.\n * - `step` - Connects points with horizontal and vertical step segments.\n */\nexport type Interpolation = 'linear' | 'smooth' | 'step';\n\n/** Determines the orientation of an element. */\nexport type Orientation = 'vertical' | 'horizontal';\n\n/** Communicates the current state of a task or process to keep users informed of progress and outcomes.\n * - `scheduled` - Task has a scheduled future execution at a specific time.\n * - `queued` - Task is waiting in line to begin after other tasks complete.\n * - `pending` - Task is awaiting approval, user input, or external conditions before proceeding.\n * - `starting` - Task is initializing and preparing to begin active execution.\n * - `running` - Task is actively executing and making progress.\n * - `restarting` - Task restarts after an interruption or reset.\n * - `stopping` - Task is gracefully shutting down and completing cleanup operations.\n * - `finished` - Task has completed successfully with the expected outcome.\n * - `failed` - Task encountered an error and did not complete as intended.\n * - `unknown` - Task status remains unknown or unavailable.\n * - `ignored` - Task was intentionally skipped or excluded from execution.\n */\nexport type TaskStatus =\n | 'scheduled'\n | 'queued'\n | 'pending'\n | 'starting'\n | 'running'\n | 'restarting'\n | 'stopping'\n | 'finished'\n | 'failed'\n | 'unknown'\n | 'ignored';\n\n/**\n * https://open-ui.org/components/popup.research.explainer#api-shape\n * - `auto` light dismiss, focus on open, return to trigger\n * - `manual` no light dismiss, no auto focus\n * - `hint` no light dismiss, no auto focus, open/close on hover/focus\n */\nexport type PopoverType = 'auto' | 'manual' | 'hint' | 'inline';\n\nexport type InterestEvent = Event & {\n source: HTMLElement;\n};\n\n/** Controls how the popover aligns along the edge of its anchor element.\n * - `start` - Aligns the popover to the beginning edge of the anchor for left or top alignment.\n * - `end` - Aligns the popover to the ending edge of the anchor for right or bottom alignment.\n * - `center` - Centers the popover along the anchor's edge for balanced positioning.\n */\nexport type PopoverAlign = 'start' | 'end' | 'center';\n\n/** Determines the popover position relative to its assigned anchor and alignment.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverSides = 'top' | 'bottom' | 'left' | 'right';\n\n/** Controls the placement of the popover relative to its anchor element.\n * - `center` - Centers the popover directly over the anchor element.\n * - `top` - Positions the popover above the anchor element.\n * - `bottom` - Positions the popover below the anchor element.\n * - `left` - Positions the popover to the left side of the anchor element.\n * - `right` - Positions the popover to the right side of the anchor element.\n */\nexport type PopoverPosition = 'center' | 'top' | 'bottom' | 'left' | 'right';\n\n/** Determines the position of an element relative to its anchor */\nexport type Placement = PopoverPosition | `${PopoverSides}-${PopoverAlign}`;\n\n/** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\nexport type ControlLayout = 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n/** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\nexport type Current = 'page' | 'step';\n\n/** Controls how data points are visually encoded in a sparkline chart.\n * - `line` - Renders data as a connected line to emphasize macro trend.\n * - `area` - Renders data as a filled area beneath a line to emphasize magnitude over time.\n * - `gradient` - Renders a line with gradient color treatment to communicate value intensity across the series.\n * - `column` - Renders data as vertical columns for easy comparison of discrete values.\n * - `winloss` - Renders outcomes as binary or ternary bars to highlight wins, losses, and optional ties.\n */\nexport type SparklineMark = 'line' | 'area' | 'gradient' | 'column' | 'winloss';\n\nexport interface NveElement {\n /**\n * This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled)\n * - `true` - The element has a disabled state and does not accept interaction.\n * - `false` - The element has an enabled state and accepts interaction.\n */\n disabled?: boolean;\n\n /** Indicates whether the element is currently actively engaged through user interaction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/:active)\n * - `true` - The user is pressing or activating the element (mousedown, keydown, or touch).\n * - `false` - No active user engagement on the element.\n */\n active?: boolean;\n\n /** Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded)\n * - `true` - The associated content expands and becomes visible to the user.\n * - `false` - The associated content collapses and hides from the user.\n */\n expanded?: boolean;\n\n /** Indicates the current state of a toggle button that switches on or off. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-pressed)\n * - `true` - The button is in the pressed (on) state and the associated action or setting is active.\n * - `false` - The button is in the unpressed (off) state and the associated action or setting is inactive.\n */\n pressed?: boolean;\n\n /** Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)\n * - `true` - The element holds selection and represents the user's current choice within the group.\n * - `false` - The element does not hold selection and the user can choose it.\n */\n selected?: boolean;\n\n /** Indicates whether the user can change the element's value while it remains visible and focusable. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)\n * - `true` - The element has a readonly state: the user cannot change its value, but can still focus and copy it.\n * - `false` - The element allows editing and the user can change its value through interaction.\n */\n readOnly?: boolean;\n\n /** Defines the value associated with the element's name when submitting the form data. The server receives this value in params when the form submits through this button. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value) */\n value?: string;\n\n /** The name of the element, submitted as a pair with the element value as part of the form data. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-name) */\n name?: string;\n\n /** Indicates whether the user can dismiss or close the element.\n * - `true` - The element displays a close control and the user can dismiss it.\n * - `false` - The user cannot close the element and must dismiss it programmatically.\n */\n closable?: boolean;\n\n /** Enables updating internal string values for internationalization. */\n i18n?: Partial<I18nStrings & { __set: boolean }>;\n\n /** Indicates the element that represents the user's current location or position within a set. [MDN](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current)\n * - `page` - Marks the current page within a set of navigation links.\n * - `step` - Marks the current step within a multi-step process or workflow.\n */\n current?: 'page' | 'step';\n\n /** Controls the horizontal alignment of the element within its container, respecting the text direction. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the beginning of the inline axis (left in LTR, right in RTL).\n * - `center` - Centers the element along the inline axis for balanced visual positioning.\n * - `end` - Aligns the element to the end of the inline axis (right in LTR, left in RTL).\n */\n inlinePosition?: 'start' | 'center' | 'end';\n\n /** Controls the vertical alignment of the element within its container. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout)\n * - `start` - Aligns the element to the top of the block axis for top-aligned positioning.\n * - `center` - Centers the element along the block axis for balanced vertical positioning.\n * - `end` - Aligns the element to the bottom of the block axis for bottom-aligned positioning.\n */\n blockPosition?: 'start' | 'center' | 'end';\n\n /** Controls the directional arrangement and spacing behavior of the element's content.\n * - `vertical` - Arranges content in a vertical stack with block-level spacing.\n * - `vertical-inline` - Arranges content vertically with compact inline spacing for dense layouts.\n * - `horizontal` - Arranges content in a horizontal row with block-level spacing.\n * - `horizontal-inline` - Arranges content horizontally with compact inline spacing.\n */\n layout?: 'vertical' | 'vertical-inline' | 'horizontal' | 'horizontal-inline';\n\n /** Controls the directional flow of the element's layout and interaction pattern.\n * - `vertical` - Element orients vertically with top-to-bottom flow.\n * - `horizontal` - Element orients horizontally with left-to-right flow.\n */\n orientation?: 'vertical' | 'horizontal';\n\n /** Controls the visual prominence to establish hierarchy and guide user attention.\n * - `emphasis` - Increases visual weight to draw attention and highlight important elements.\n * - `muted` - Reduces visual weight for supporting content that should remain subtle and unobtrusive.\n */\n prominence?: 'emphasis' | 'muted';\n\n /** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\n interaction?: 'emphasis' | 'destructive';\n\n /** Defines a base color from the theme color palette */\n color?:\n | 'red-cardinal'\n | 'gray-slate'\n | 'gray-denim'\n | 'blue-indigo'\n | 'blue-cobalt'\n | 'blue-sky'\n | 'teal-cyan'\n | 'green-mint'\n | 'teal-seafoam'\n | 'green-grass'\n | 'yellow-amber'\n | 'orange-pumpkin'\n | 'red-tomato'\n | 'pink-magenta'\n | 'purple-plum'\n | 'purple-violet'\n | 'purple-lavender'\n | 'pink-rose'\n | 'green-jade'\n | 'lime-pear'\n | 'yellow-nova'\n | 'brand-green';\n\n /** Communicates the intent and semantic meaning of an element to help users understand the outcome of their actions.\n * - `accent` - Highlights important actions or draws attention to primary interactive elements.\n * - `warning` - Indicates cautionary actions that require careful consideration before proceeding.\n * - `success` - Represents positive outcomes, confirmations, or constructive actions.\n * - `danger` - Signals destructive or irreversible actions that need extra attention and confirmation.\n */\n status?: 'accent' | 'warning' | 'success' | 'danger';\n\n /** Controls the visual scale of an element to match its importance and available space.\n * - `sm` - Compact size for dense layouts or secondary elements with less visual prominence.\n * - `md` - Standard size that works well in most contexts and provides balanced visibility.\n * - `lg` - Larger size for emphasizing important elements or improving touch targets in spacious layouts.\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * Demonstrates different container styles to accommodate visual weight and context.\n * - `flat` Element has white space bounds but reduced visual container.\n * - `inline` Element container reduces to fit within inline content such as a block of text.\n * - `inset` Element container optimizes for embedding or inset placement inside another containing element.\n * - `full` Element container optimizes for filling its container bounds.\n */\n container?: 'inline' | 'flat' | 'inset' | 'full';\n\n /** Determines the position of an element along both inline and block axis. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout/Box_alignment_in_grid_layout#the_two_axes_of_a_grid_layout) */\n position?:\n | 'top-start'\n | 'top-end'\n | 'top-center'\n | 'bottom-start'\n | 'bottom-end'\n | 'bottom-center'\n | 'left-start'\n | 'left-end'\n | 'left-center'\n | 'right-start'\n | 'right-end'\n | 'right-center';\n\n /** Determines the alignment of the popover relative to the provided anchor element. */\n alignment?: 'start' | 'end' | 'center';\n\n /** Provides the element that the popover should position relative to. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */\n anchor?: string | HTMLElement;\n\n /** Defines the element that triggers an `open` interaction event. Set the property to an element or its ID within the same render root. The HTML attribute accepts only the element ID. */\n trigger?: string | HTMLElement;\n\n /** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\n slots?: 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n /**\n * Sets the automatic dismissal time in milliseconds before the element emits a `close` event. Allow ~200-250ms per word for comfortable reading.\n * - `0` - Warning or error messages requiring immediate acknowledgment.\n * - `3000` - Brief success or confirmation messages.\n * - `7000` - Standard informational messages.\n * - `10000` - Messages with actions or requiring user decision.\n */\n closeTimeout?: number;\n\n /**\n * Sets the delay in milliseconds before the element emits an `open` event.\n * - `0` - Keyboard focus interactions (always immediate for accessibility).\n * - `500` - Dense interfaces with many tooltips to reduce visual noise and prevent accidental triggers.\n */\n openDelay?: number;\n\n /** @private An instance of `ElementInternals` that decorators/controllers set dynamically */\n _internals: ElementInternals;\n\n render: TemplateResult;\n}\n\n/** Defines named content areas where users can insert custom markup into the element.\n * - `default` - The primary content area for the element.\n * - `prefix` - Content that appears before the main element content.\n * - `suffix` - Content that appears after the main element content.\n * - `header` - Content that appears at the top of the element, used for titles or introductory information.\n * - `footer` - Content that appears at the bottom of the element, used for supplementary information or actions.\n * - `actions` - Content area specifically for interactive controls like buttons or links.\n * - `icon` - Content area for displaying an icon that represents the element's purpose or state.\n */\nexport type SlotName = 'default' | 'prefix' | 'suffix' | 'header' | 'footer' | 'actions' | 'icon';\n\n/** The Interaction type provides a way to show the intent of an interactive element. This can help users quickly understand what each interaction does and reduce the potential for confusion or errors.\n * - `emphasis` Shows the interaction targets emphasis or highlighting primary actions.\n * - `destructive` Shows the interaction targets destructive actions such as deleting or removing.\n */\nexport type Interaction = 'emphasis' | 'destructive';\n\nexport interface ContainerElement {\n container?: Partial<Container>;\n}\n\n/** An element that renders complex data structures (e.g., arrays, series, matrices) rather than composable UI content and values expressible with primitive attributes. */\nexport interface DataElement<T extends unknown[] | Record<string, unknown>> {\n data?: T;\n}\n\nexport const statusIcons: { [key: string]: IconName } = {\n '': 'information-circle-stroke',\n undefined: 'information-circle-stroke',\n default: 'information-circle-stroke',\n accent: 'information-circle-stroke',\n warning: 'exclamation-triangle',\n success: 'checkmark-circle',\n danger: 'exclamation-circle',\n scheduled: 'clock',\n failed: 'x-circle',\n finished: 'checkmark-circle',\n unknown: 'question-mark-circle',\n queued: 'bar-pill-stack',\n running: 'running',\n restarting: 'refresh',\n stopping: 'stop-sign',\n pending: 'circle-dash',\n starting: 'circle-dot',\n ignored: 'circle-angled-line'\n} as const;\n\ndeclare global {\n var NVE_ELEMENTS: {\n state: {\n bundle: boolean;\n env: 'watch' | 'production' | 'development';\n pageHost: string;\n moduleHost: string;\n versions: string[];\n scopedRegistry: { [key: string]: CustomElementRegistry };\n elementRegistry: Readonly<{ [key: string]: string }>;\n i18nRegistry: Readonly<{ [key: string]: string }>;\n audit: Readonly<{\n [key: string]: {\n count?: number;\n excessiveInstanceLimitAudited?: boolean;\n };\n }>;\n };\n debug: (log?: (...args: unknown[]) => void) => void;\n };\n\n interface HTMLElement {\n 'nve-text': string;\n 'nve-layout': string;\n }\n\n interface CustomElementRegistry {\n initialize(root: ShadowRoot | Document): void;\n }\n\n var CustomElementRegistry: {\n new (): CustomElementRegistry;\n prototype: CustomElementRegistry;\n };\n}\n\nexport interface ElementDefinition extends CustomElementConstructor {\n metadata: { version: string; tag: string };\n elementDefinitions?: { [key: string]: ElementDefinition };\n shadowRootOptions?: { customElementRegistry?: CustomElementRegistry | null };\n}\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport interface OffsetPoint {\n offsetX: number;\n offsetY: number;\n}\n\nexport interface Dimensions {\n width: number;\n height: number;\n}\n\nexport type Rect = Point & Dimensions;\n\nexport interface Scale {\n min: number;\n max: number;\n}\n\n/** https://github.com/tc39/proposal-decorators */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport type LegacyDecoratorTarget = Function & {\n addInitializer?: (initializer: (instance: any) => void) => void; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n"],"mappings":";AAgZA,IAAa,IAA2C;CACtD,IAAI;CACJ,WAAW;CACX,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,UAAU;CACV,SAAS;CACT,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,UAAU;CACV,SAAS;CACT,UAAU;CACV,SAAS;AACX"}
|
package/dist/logo/logo.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { Color, Size } from '@nvidia-elements/core/internal';
|
|
|
6
6
|
* @documentation https://nvidia.github.io/elements/docs/elements/logo/
|
|
7
7
|
* @since 0.10.0
|
|
8
8
|
* @entrypoint \@nvidia-elements/core/logo
|
|
9
|
-
* @slot -
|
|
9
|
+
* @slot - Text, an image, or other visual content representing the brand or application.
|
|
10
10
|
* @cssprop --background
|
|
11
11
|
* @cssprop --gap
|
|
12
12
|
* @cssprop --color
|
package/dist/logo/logo2.js
CHANGED
package/dist/logo/logo2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo2.js","names":[],"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 { useStyles, colorStateStyles, attachInternals } from '@nvidia-elements/core/internal';\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 -
|
|
1
|
+
{"version":3,"file":"logo2.js","names":[],"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 { useStyles, colorStateStyles, attachInternals } from '@nvidia-elements/core/internal';\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":";;;;;;;AA0BA,IAAa,IAAb,cAA0B,EAAW;;gBAWnB,EAAU,CAAC,GAAQ,CAAgB,CAAC;;;kBAEzB;GACzB,KAAK;GACL,SAAS;EACX;;CAIA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;AACF;GA7BG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAKxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
package/dist/menu/menu-item.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const MenuItem_base: import("@nvidia-elements/forms/mixins").ButtonFormC
|
|
|
6
6
|
* @documentation https://nvidia.github.io/elements/docs/elements/menu/
|
|
7
7
|
* @since 0.11.0
|
|
8
8
|
* @entrypoint \@nvidia-elements/core/menu
|
|
9
|
-
* @slot -
|
|
9
|
+
* @slot - Label and supporting content for the menu option.
|
|
10
10
|
* @slot suffix - slot for suffix icon
|
|
11
11
|
* @cssprop --background
|
|
12
12
|
* @cssprop --border-radius
|
|
@@ -27,6 +27,7 @@ declare const MenuItem_base: import("@nvidia-elements/forms/mixins").ButtonFormC
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class MenuItem extends MenuItem_base {
|
|
29
29
|
static styles: import("lit").CSSResult[];
|
|
30
|
+
/** Applies danger styling to destructive or high-risk menu actions. */
|
|
30
31
|
status: 'danger';
|
|
31
32
|
static readonly metadata: {
|
|
32
33
|
tag: string;
|
package/dist/menu/menu-item2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item2.js","names":[],"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 { useStyles, audit } from '@nvidia-elements/core/internal';\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 -
|
|
1
|
+
{"version":3,"file":"menu-item2.js","names":[],"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 { useStyles, audit } from '@nvidia-elements/core/internal';\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 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></slot>\n <slot name=\"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":";;;;;;;;AAmCO,IAAA,IAAA,cAAuB,EAAuB,CAAU,CAAC,CAAC;;gBAC/C,EAAU,CAAC,CAAM,CAAC;;;kBAKP;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,UAAU;EACtB;;;4BAE4B,CAAC;;CAE7B,SAAS;EACP,OAAO,CAAI;CAMb;CAEA,cAAc;EAEZ,AADA,MAAM,GACN,KAAK,OAAO;CACd;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,WAAW,OAAO;CACzB;AACF;GA5BG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,UAL1C,EAAM,CAAA,GAAA,CAAA"}
|
package/dist/menu/menu2.js
CHANGED