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
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@
"release:cli",
"release:code",
"release:create",
"release:foundations",
"release:themes",
"release:core",
"release:lint",
"release:labs-forms",
"release:forms",
"release:markdown",
"release:media",
"release:monaco",
Expand All @@ -193,7 +194,8 @@
"command": "cd projects/core && HUSKY=0 pnpm exec semantic-release",
"dependencies": [
"release:themes",
"release:labs-forms"
"release:foundations",
"release:forms"
]
},
"release:cli": {
Expand All @@ -208,9 +210,15 @@
"release:core"
]
},
"release:labs-forms": {
"release:forms": {
"command": "cd projects/forms && HUSKY=0 pnpm exec semantic-release"
},
"release:foundations": {
"command": "cd projects/foundations && HUSKY=0 pnpm exec semantic-release",
"dependencies": [
"release:themes"
]
},
"release:lint": {
"command": "cd projects/lint && HUSKY=0 pnpm exec semantic-release",
"dependencies": [
Expand All @@ -235,7 +243,7 @@
"dependencies": [
"release:core",
"release:themes",
"release:labs-forms"
"release:forms"
]
},
"release:pi": {
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions projects/foundations/.visual/foundations.dark.png

This file was deleted.

3 changes: 0 additions & 3 deletions projects/foundations/.visual/foundations.png

This file was deleted.

3 changes: 3 additions & 0 deletions projects/foundations/.visual/scroll-box.dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/foundations/.visual/scroll-box.focus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/foundations/.visual/scroll-box.forced-colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions projects/foundations/.visual/scroll-box.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 48 additions & 1 deletion projects/foundations/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
# @nvidia-elements/foundations

A slotted container component for NVIDIA Elements.
NVIDIA UI SDK and agent-ready developer toolkit for AI factories, robotics, and autonomous vehicles.

Shared components and utilities for NVIDIA Elements libraries and custom component development.

Elements packages use foundations to share components and behavior without depending directly on `@nvidia-elements/core`. Advanced users can also use its utility components and internal helpers when building their own Web Components.

- [Documentation](https://NVIDIA.github.io/elements/)
- [Changelog](https://NVIDIA.github.io/elements/docs/changelog/)
- [GitHub Repo](https://github.com/NVIDIA/elements)
- [npm](https://www.npmjs.com/package/@nvidia-elements/foundations)

## Internal Utilities

Shared helpers support element registration, styling, and other library implementation details. The `/internal` entrypoint provides a semi-public API for Elements packages and advanced component authors but are not API stable:

```javascript
import { define, useStyles } from '@nvidia-elements/foundations/internal';
```

## Public Utility Components

Utility components have separate entrypoints for application and library use. The package currently provides:

| Component | Tag | Description |
| --------- | --- | ----------- |
| [Scroll Box](https://NVIDIA.github.io/elements/docs/elements/scroll-box/) | `nve-scroll-box` | A scrollable container with optional edge shadows and automatic scrolling. |

## Getting Started

Install the package and its peer dependency:

```shell
npm install @nvidia-elements/foundations @nvidia-elements/themes
```

Load the base theme in your application's stylesheet:

```css
@import '@nvidia-elements/themes/index.css';
```

## NVIDIA Elements Skill

Install the Elements agent skill with the open [skills](https://www.skills.sh/nvidia/elements/elements) CLI:

```shell
npx skills add https://github.com/nvidia/elements --skill elements
```
15 changes: 14 additions & 1 deletion projects/foundations/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@ import { elementsRecommended } from '@nvidia-elements/lint/eslint';
import { browserTypescriptConfig, libraryConfig, litConfig, jsonConfig } from '@internals/eslint';

/** @type {import('eslint').Linter.Config[]} */
export default [...elementsRecommended, ...browserTypescriptConfig, ...libraryConfig, ...litConfig, ...jsonConfig];
export default [
...elementsRecommended,
...browserTypescriptConfig,
...libraryConfig,
...litConfig,
...jsonConfig,
{
files: ['src/scroll-box/scroll-box.css'],
rules: {
// Scroll edge shadows use gradients.
'@nvidia-elements/lint/no-custom-background-gradients': 'off'
}
}
];
42 changes: 26 additions & 16 deletions projects/foundations/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "@nvidia-elements/foundations",
"version": "0.0.0",
"private": true,
"release": {
"extends": "../../release.config.js"
},
"description": "A slotted container component for NVIDIA Elements.",
"description": "Shared foundational components and utilities for NVIDIA UI libraries and custom component development.",
"keywords": [
"nvidia",
"web-components",
Expand Down Expand Up @@ -52,13 +51,25 @@
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./foundations": {
"types": "./dist/foundations/index.d.ts",
"default": "./dist/foundations/index.js"
"./scroll-box": {
"types": "./dist/scroll-box/index.d.ts",
"default": "./dist/scroll-box/index.js"
},
"./foundations/define.js": {
"types": "./dist/foundations/define.d.ts",
"default": "./dist/foundations/define.js"
"./scroll-box/index.js": {
"types": "./dist/scroll-box/index.d.ts",
"default": "./dist/scroll-box/index.js"
},
"./scroll-box/define.js": {
"types": "./dist/scroll-box/define.d.ts",
"default": "./dist/scroll-box/define.js"
},
"./internal": {
"types": "./dist/internal/index.d.ts",
"default": "./dist/internal/index.js"
},
"./internal/index.js": {
"types": "./dist/internal/index.d.ts",
"default": "./dist/internal/index.js"
}
},
"sideEffects": [
Expand All @@ -84,14 +95,14 @@
"lit": "catalog:publish"
},
"peerDependencies": {
"@nvidia-elements/core": "workspace:^",
"@nvidia-elements/themes": "workspace:^"
},
"devDependencies": {
"@eslint/js": "catalog:",
"@internals/eslint": "workspace:*",
"@internals/testing": "workspace:*",
"@internals/vite": "workspace:*",
"@nvidia-elements/core": "workspace:*",
"@nvidia-elements/lint": "workspace:*",
"@nvidia-elements/styles": "workspace:*",
"@vitest/browser": "catalog:",
Expand All @@ -111,7 +122,8 @@
"command": "NODE_ENV=development vite build --watch",
"service": true,
"dependencies": [
"../core:build",
"../themes:build",
"../styles:build",
"../internals/vite:ci"
]
},
Expand Down Expand Up @@ -160,10 +172,6 @@
{
"script": "../themes:build",
"cascade": false
},
{
"script": "../core:build",
"cascade": false
}
]
},
Expand Down Expand Up @@ -191,7 +199,7 @@
"dependencies": [
"../internals/testing:build",
"../internals/vite:ci",
"../core:build"
"../themes:build"
]
},
"test:coverage": {
Expand All @@ -213,7 +221,7 @@
"dependencies": [
"../internals/testing:build",
"../internals/vite:ci",
"../core:build"
"../themes:build"
]
},
"test:watch": {
Expand All @@ -233,6 +241,7 @@
],
"dependencies": [
"build",
"../styles:build",
"../internals/vite:ci"
],
"env": {
Expand All @@ -254,6 +263,7 @@
],
"dependencies": [
"../internals/vite:ci",
"../styles:build",
{
"script": "build",
"cascade": false
Expand Down
6 changes: 0 additions & 6 deletions projects/foundations/src/foundations/foundations.css

This file was deleted.

19 changes: 0 additions & 19 deletions projects/foundations/src/foundations/foundations.examples.ts

This file was deleted.

31 changes: 0 additions & 31 deletions projects/foundations/src/foundations/foundations.test.axe.ts

This file was deleted.

This file was deleted.

Loading
Loading