Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
"WebFetch(domain:code.claude.com)"
]
},
"enabledMcpjsonServers": [
"elements"
],
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three commits, one commit was a prettier fix. The migration scripts I thought were re-formatting at the end but I guess at some point it stopped causing edited files to drift.

"enabledMcpjsonServers": ["elements"],
"enabledPlugins": {
"frontend-design@claude-plugins-official": false
},
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "daily"
interval: 'daily'
13 changes: 6 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,24 @@ projects/core/src/css/*.css
projects/core/src/icon/server.ts
projects/internals/metadata/static/*.json
projects/monaco/src/themes/generated/*
projects/starters/angular/.angular/**/*
projects/starters/hugo/**/*
projects/starters/nuxt/.nuxt/**/*
projects/**/src/vendor/**/*
projects/**/.screencast/.auth/*
.vscode/*.json.code-snippets
.output/**/*

# ignore starter templates as they are used for project generation and formatting is picky
projects/starters/angular/src/app/app.component.html
projects/starters/angular/.angular/**/*
projects/starters/angular/src/app/app.html
projects/starters/bundles/src/index.html
projects/starters/eleventy/src/_layouts/index.11ty.js
projects/starters/eleventy/src/index.11ty.js
projects/starters/go/src/index.html
projects/starters/hugo/**/*
projects/starters/importmaps/src/index.html
projects/starters/mpa/src/**/*.html
projects/starters/nextjs/src/pages/index.tsx
projects/starters/react/src/App.tsx
projects/starters/solidjs/src/App.tsx
projects/starters/typescript/src/index.html
projects/starters/vue/src/App.vue
projects/starters/nuxt/.nuxt/**/*
projects/starters/vue/src/**/*
projects/starters/nuxt/.nuxt/**/*
projects/starters/nuxt/app/**/*
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down Expand Up @@ -81,4 +81,4 @@ available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.h
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>
<https://www.contributor-covenant.org/faq>
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ All contributions to this project must adhere to the requirements of the [Develo
We require that all contributors sign-off on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. Any contribution which contains commits that do not have the Signed-off-by trailer will not be accepted.

To sign off on a commit you must use the `--signoff` (or `-s`) option when committing your change:
``` shell

```shell
git commit -s -m "feat: Add some feature."
```

This will append the following trailer to your commit message:
``` text

```text
Signed-off-by: Your Name <yourname@example.com>
```

Expand Down
15 changes: 8 additions & 7 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ If you need to report a security issue, please use the appropriate contact point
## Reporting Potential Security Vulnerability in an NVIDIA Product

To report a potential security vulnerability in any NVIDIA product:

- Web: [Security Vulnerability Submission Form](https://www.nvidia.com/object/submit-security-vulnerability.html)
- E-Mail: psirt@nvidia.com
- We encourage you to use the following PGP key for secure email communication: [NVIDIA public PGP Key for communication](https://www.nvidia.com/en-us/security/pgp-key)
- Please include the following information:
- Product/Driver name and version/branch that contains the vulnerability
- Type of vulnerability (code execution, denial of service, buffer overflow, etc.)
- Instructions to reproduce the vulnerability
- Proof-of-concept or exploit code
- Potential impact of the vulnerability, including how an attacker could exploit the vulnerability
- We encourage you to use the following PGP key for secure email communication: [NVIDIA public PGP Key for communication](https://www.nvidia.com/en-us/security/pgp-key)
- Please include the following information:
- Product/Driver name and version/branch that contains the vulnerability
- Type of vulnerability (code execution, denial of service, buffer overflow, etc.)
- Instructions to reproduce the vulnerability
- Proof-of-concept or exploit code
- Potential impact of the vulnerability, including how an attacker could exploit the vulnerability
Comment thread
coderabbitai[bot] marked this conversation as resolved.

While NVIDIA currently does not have a bug bounty program, we do offer acknowledgement when an externally reported security issue is addressed under our coordinated vulnerability disclosure policy. Please visit our [Product Security Incident Response Team (PSIRT)](https://www.nvidia.com/en-us/security/psirt-policies/) policies page for more information.

Expand Down
8 changes: 1 addition & 7 deletions projects/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ This package serves two primary modes:
To use the Elements CLI you must have [NodeJS](https://nodejs.org/) installed.

```shell
# local .npmrc file
registry=https://registry.npmjs.org

# https://registry.npmjs.org
npm login

npm install -g @nvidia-elements/cli

nve
Expand Down Expand Up @@ -147,4 +141,4 @@ Skills provide persistent context to AI agents for building UI with Elements.
- [Documentation](https://NVIDIA.github.io/elements/docs/cli/)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
- [GitHub Repo](https://github.com/NVIDIA/elements)
- [NPM](https://registry.npmjs.org
- [npm](https://www.npmjs.com/package/@nvidia-elements/cli)
4 changes: 3 additions & 1 deletion projects/cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ yargsInstance.command(
}
} else {
const greeting = colors.complete(`\x1b[?7l\n${JSON.parse(banner)}\n\n`);
console.log(`${greeting}${colors.complete(`@nvidia-elements/cli (${BUILD_SHA})`)}\n\n${await yargsInstance.getHelp()}`);
console.log(
`${greeting}${colors.complete(`@nvidia-elements/cli (${BUILD_SHA})`)}\n\n${await yargsInstance.getHelp()}`
);
await notifyIfUpdateAvailable(BUILD_SHA);
}
}
Expand Down
1 change: 0 additions & 1 deletion projects/cli/src/mcp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0


import { startMcpServer } from './mcp.js';

// deprecated: use `nve mcp` command instead
Expand Down
8 changes: 1 addition & 7 deletions projects/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,11 @@ Syntax-highlighted code block components supporting many programming languages.
- [Documentation](https://NVIDIA.github.io/elements/docs/code/)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
- [GitHub Repo](https://github.com/NVIDIA/elements)
- [NPM](https://registry.npmjs.org
- [npm](https://www.npmjs.com/package/@nvidia-elements/code)

## Getting Started

```bash
# local .npmrc file
registry=https://registry.npmjs.org

# https://registry.npmjs.org
npm login

npm install @nvidia-elements/code
```

Expand Down
2 changes: 1 addition & 1 deletion projects/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The design language for AI/ML factories. Provides a set of accessible, theme-rea
- [Documentation](https://NVIDIA.github.io/elements/)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
- [Repo](https://github.com/NVIDIA/elements)
- [NPM](https://registry.npmjs.org
- [npm](https://www.npmjs.com/package/@nvidia-elements/core)

## Getting Started

Expand Down
1 change: 0 additions & 1 deletion projects/core/src/accordion/accordion-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
border-bottom: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);
}

:host([container='full']) ::slotted(mlv-accordion:not(:last-child)),
:host([container='full']) ::slotted(nve-accordion:not(:last-child)) {
border-bottom: var(--nve-ref-border-width-sm) solid var(--nve-ref-border-color-muted);
}
1 change: 0 additions & 1 deletion projects/core/src/accordion/accordion.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
--cursor: not-allowed;
}

:host([disabled]) ::slotted(mlv-accordion-header),
:host([disabled]) ::slotted(nve-accordion-header) {
--cursor: not-allowed;
}
Expand Down
4 changes: 1 addition & 3 deletions projects/core/src/alert/alert-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
--_icon-color: var(--icon-color);
}

::slotted(nve-alert),
::slotted(mlv-alert) {
::slotted(nve-alert) {
--color: var(--_alert-color);
--icon-color: var(--_icon-color);
--icon-size: var(--nve-ref-size-400);
Expand Down Expand Up @@ -65,7 +64,6 @@
--background: var(--nve-sys-support-danger-color);
}

:host([prominence='emphasis']) ::slotted(mlv-alert),
:host([prominence='emphasis']) ::slotted(nve-alert) {
--font-weight: var(--nve-ref-font-weight-regular);
}
Expand Down
8 changes: 7 additions & 1 deletion projects/core/src/alert/alert-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ import { html, LitElement } from 'lit';
import { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';
import { property } from 'lit/decorators/property.js';
import type { Color, Container, Prominence, SupportStatus } from '@nvidia-elements/core/internal';
import { attachInternals, useStyles, supportStateStyles, audit, colorStateStyles } from '@nvidia-elements/core/internal';
import {
attachInternals,
useStyles,
supportStateStyles,
audit,
colorStateStyles
} from '@nvidia-elements/core/internal';
import { Alert } from './alert.js';
import styles from './alert-group.css?inline';

Expand Down
4 changes: 1 addition & 3 deletions projects/core/src/alert/alert.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ slot[name='actions'] {
font-weight: var(--nve-ref-font-weight-semibold);
}

::slotted(mlv-button[interaction='flat']),
::slotted(nve-button[interaction='flat']) {
--color: inherit;
}
Expand Down Expand Up @@ -83,8 +82,7 @@ nve-icon-button {
margin-inline-start: auto;
}

::slotted([nve-text]),
::slotted([mlv-text]) {
::slotted([nve-text]) {
color: inherit !important;
}

Expand Down
1 change: 0 additions & 1 deletion projects/core/src/alert/alert.global.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */
/* SPDX-License-Identifier: Apache-2.0 */

mlv-alert:has([slot='content'])::part(_content),
nve-alert:has([slot='content'])::part(_content) {
display: block;
}
Expand Down
4 changes: 1 addition & 3 deletions projects/core/src/badge/badge.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ slot:not([name]) {
display: contents;
}

::slotted([nve-text]),
::slotted([mlv-text]) {
::slotted([nve-text]) {
color: inherit !important;
}

Expand All @@ -59,7 +58,6 @@ slot:not([name]) {
}

nve-icon,
::slotted(mlv-icon),
::slotted(nve-icon) {
--color: var(--icon-color);
--width: var(--nve-ref-size-300);
Expand Down
2 changes: 1 addition & 1 deletion projects/core/src/badge/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class Badge extends LitElement {
#assignDefaultIcon() {
const unassignedIcon = this.shadowRoot!.querySelector<HTMLSlotElement>('slot:not([name])')!
.assignedElements()
.find(i => i.matches('nve-icon, mlv-icon') && !i.slot);
.find(i => i.matches('nve-icon') && !i.slot);
if (unassignedIcon) {
unassignedIcon.slot = 'prefix-icon';
}
Expand Down
2 changes: 0 additions & 2 deletions projects/core/src/breadcrumb/breadcrumb.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ li {
height: var(--_height);
}

::slotted(mlv-button),
::slotted(nve-button) {
--border-radius: calc(var(--nve-ref-border-radius-xs) / 2);
--font-size: var(--_font-size);
Expand All @@ -48,7 +47,6 @@ li {
--_border-bottom-width: 85%;
}

::slotted(mlv-icon-button),
::slotted(nve-icon-button) {
--border-radius: calc(var(--nve-ref-border-radius-xs) / 2);
--icon-width: var(--nve-ref-size-300);
Expand Down
6 changes: 2 additions & 4 deletions projects/core/src/breadcrumb/breadcrumb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ export class Breadcrumb extends LitElement {
if (e.target && (e.target as HTMLSlotElement).assignedElements().length) {
this.#resetItems();
const items = this.shadowRoot!.querySelector<HTMLSlotElement>('slot:not([name])')!.assignedElements();
items.filter(i => i.matches('nve-button, nve-icon-button, span, a')).forEach(i => (i.slot = generateId()));
items
.filter(i => i.matches('nve-button, nve-icon-button, mlv-button, mlv-icon-button, span, a'))
.forEach(i => (i.slot = generateId()));
items
.filter(i => i.matches('nve-button, nve-icon-button, mlv-button, mlv-icon-button'))
.filter(i => i.matches('nve-button, nve-icon-button'))
.forEach((i: Element) => ((i as Button).container = 'inline'));
this.breadcrumbItems = items.length ? items : this.breadcrumbItems;
Comment on lines 103 to 108
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Filter breadcrumbItems to the same supported subset used for slot assignment.

On Line 108, this.breadcrumbItems is set from all items, but on Line 104 only a subset gets generated slot names. This can leave unsupported children (including migrated-out legacy tags) with empty slot values, causing incorrect slot distribution/rendering in the <li> list.

Suggested fix
-      const items = this.shadowRoot!.querySelector<HTMLSlotElement>('slot:not([name])')!.assignedElements();
-      items.filter(i => i.matches('nve-button, nve-icon-button, span, a')).forEach(i => (i.slot = generateId()));
-      items
+      const items = this.shadowRoot!.querySelector<HTMLSlotElement>('slot:not([name])')!.assignedElements();
+      const supportedItems = items.filter(i => i.matches('nve-button, nve-icon-button, span, a'));
+      supportedItems.forEach(i => (i.slot = generateId()));
+      supportedItems
         .filter(i => i.matches('nve-button, nve-icon-button'))
         .forEach((i: Element) => ((i as Button).container = 'inline'));
-      this.breadcrumbItems = items.length ? items : this.breadcrumbItems;
+      this.breadcrumbItems = supportedItems;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@projects/core/src/breadcrumb/breadcrumb.ts` around lines 103 - 108, Assigned
slot names are only created for elements matching 'nve-button, nve-icon-button,
span, a' but breadcrumbItems is set to all assignedElements, which can include
unsupported nodes; change the code to compute a filtered list (e.g., const
supported = items.filter(i => i.matches('nve-button, nve-icon-button, span,
a'))), use supported for generating slots and for setting this.breadcrumbItems
(e.g., this.breadcrumbItems = supported.length ? supported :
this.breadcrumbItems), and keep the subsequent container assignment targeting
supported elements (the same filter used for (i as Button).container =
'inline').

}
Expand Down
1 change: 0 additions & 1 deletion projects/core/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
/// <reference path="./declarations.d.ts" />


import '@nvidia-elements/core/accordion/define.js';
import '@nvidia-elements/core/alert/define.js';
import '@nvidia-elements/core/avatar/define.js';
Expand Down
10 changes: 0 additions & 10 deletions projects/core/src/button-group/button-group.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
align-items: center;
}

::slotted(mlv-button),
::slotted(mlv-icon-button),
::slotted(nve-button),
::slotted(nve-icon-button) {
--height: var(--nve-sys-interaction-field-height);
Expand All @@ -36,7 +34,6 @@
--width: var(--nve-sys-interaction-field-height);
}

::slotted(mlv-divider),
::slotted(nve-divider) {
margin-block-start: calc(-1 * var(--padding));
height: calc(100% + var(--padding));
Expand All @@ -51,8 +48,6 @@
--border-radius: var(--nve-ref-border-radius-full);
}

:host([container='rounded']:not(:state(split))) ::slotted(mlv-button),
:host([container='rounded']:not(:state(split))) ::slotted(mlv-icon-button),
:host([container='rounded']:not(:state(split))) ::slotted(nve-button),
:host([container='rounded']:not(:state(split))) ::slotted(nve-icon-button) {
--border-radius: var(--nve-ref-border-radius-full);
Expand All @@ -66,8 +61,6 @@
flex-direction: column;
}

:host([interaction='emphasize']) ::slotted(mlv-divider), /* deprecated */
:host([interaction='emphasis']) ::slotted(mlv-divider),
:host([interaction='emphasis']) ::slotted(nve-divider) {
--color: color-mix(
in oklab,
Expand All @@ -76,7 +69,6 @@
);
}

:host([interaction='destructive']) ::slotted(mlv-divider),
:host([interaction='destructive']) ::slotted(nve-divider) {
--color: color-mix(
in oklab,
Expand All @@ -90,12 +82,10 @@
--gap: 0;
}

:host(:state(split)) ::slotted(mlv-button),
:host(:state(split)) ::slotted(nve-button) {
--border-radius: var(--nve-ref-border-radius-none);
}

:host(:state(split)) ::slotted(mlv-icon-button),
:host(:state(split)) ::slotted(nve-icon-button) {
--border-radius: var(--nve-ref-border-radius-none);
}
Loading
Loading