Deprecations
The following are the active deprecations. The next major release removes these deprecations. Read more about the versioning and deprecation cycle policy.
MLV/NVE Scope 1.0 deprecation
These steps are not required to initially migrate and use 1.0. If migrating from 0.x to 1.x please see the migration guide.
With the release of 1.0 the scope and namespace for Element APIs now use the nve prefix. All prior mlv prefixes no longer apply. The CSS bundle now divides into smaller independent bundles. This allows you to choose only the utilities and themes your application needs, improving application performance.
/* before */
@import '@elements/elements/index.css';
@import '@elements/elements/inter.css';
@import '@nvidia-elements/themes/fonts/inter.css';
@import '@nvidia-elements/themes/index.css';
@import '@nvidia-elements/themes/high-contrast.css';
@import '@nvidia-elements/themes/reduced-motion.css';
@import '@nvidia-elements/themes/compact.css';
@import '@nvidia-elements/themes/dark.css';
@import '@nvidia-elements/themes/debug.css';
@import '@nvidia-elements/styles/typography.css';
@import '@nvidia-elements/styles/layout.css';
@import '@nvidia-elements/styles/view-transitions.css';
Update any CSS Custom property usage
.selector {
color: var(--nve-ref-color-brand-green-200);
}
.selector {
color: var(--nve-ref-color-brand-green-200);
}
Update style utility attributes
<html nve-theme="...">
<div nve-layout="...">
<p nve-text="...">
<nve-alert status="success">After:</nve-alert>
```html
<html nve-theme="...">
<div nve-layout="...">
<p nve-text="...">
Update HTML elements
<nve-button>...</nve-button>
<nve-button>...</nve-button>
Alert Banner 1.0 deprecation
The alert banner component no longer exists. Use nve-alert-group with the prominence="emphasis" option.
<nve-alert-banner>
<nve-alert closable>
<span slot="prefix">Standard</span> banner message
</nve-alert>
</nve-alert-banner>
<nve-alert-group prominence="emphasis" container="full">
<nve-alert closable>
<span slot="prefix">Standard</span> banner message
</nve-alert>
</nve-alert-group>
Popover Behavior Triggers 1.0 deprecation
Before native HTML popovers, popovers required behaviorTrigger or behavior-trigger for stateful popovers. The native HTML popover API replaces this approach.
<nve-tooltip trigger="tooltip-btn" behavior-trigger position="top" hidden>hello there</nve-tooltip>
<nve-button id="tooltip-btn">tooltip</nve-button>
<nve-tooltip id="my-tooltip" position="top">hello there</nve-tooltip>
<nve-button popovertarget="my-tooltip">tooltip</nve-button>
JSON Viewer 1.0 deprecation
The JSON viewer element is an internal API. You can access this API via the public exports but should avoid using it. Use nve-codeblock or nve-monaco-input for JSON content rendering.
Layout Full 1.0 deprecation
The grow property now uses full instead to avoid confusion with flexbox grow behavior.
<div nve-layout="grow"></div>
<div nve-layout="full"></div>
Typography "eyebrow" 1.0 deprecation
The typography eyebrow utility no longer exists, to align with the standardized semantic names and size options available.
<div nve-text="eyebrow"></div>
<div nve-text="label sm"></div>
Icon Names 1.0 deprecation
The following icons now use new names:
| before | after |
|---|---|
| chevron-right | chevron |
| chevron-down | chevron |
| chevron-left | chevron |
| additional-actions | more-actions |
| analytics | pie-chart |
| annotation | transparent-box |
| app-switcher | switch-apps |
| assist | chat-bubble |
| checkmark | check |
| date | calendar |
| docs | book |
| expand-full-screen | maximize |
| expand-panel | arrow-stop |
| collapse-panel | arrow-stop |
| failed | x-circle |
| favorite-filled | star |
| favorite-outline | star-stroke |
| information | information-circle-stroke |
| maintenance | wrench |
| navigate-to | arrow |
| open-external-link | arrow-angle |
| location | map-pin |
| pinned-1 | pin |
| project | folder |
| settings | gear |
| user | person |
| video-pause | pause |
| video-play | play |
| video-stop | stop |
| visible | eye |
| warning | exclamation-triangle |
Icon Button Name Directions 1.0 deprecation
With the deprecation of directional icons the icon button now requires a explicit direction.
<nve-icon name="chevron-left"></nve-icon>
<nve-icon name="beginning"></nve-icon>
<nve-icon name="beginning-left"></nve-icon>
<nve-icon name="collapse-panel"></nve-icon>
<nve-icon name="navigate-back"></nve-icon>
<nve-icon name="chevron-right"></nve-icon>
<nve-icon name="end"></nve-icon>
<nve-icon name="expand-panel"></nve-icon>
<nve-icon name="navigate-to"></nve-icon>
<nve-icon name="carousel-horizontal"></nve-icon>
<nve-icon name="chevron-down"></nve-icon>
<nve-icon name="thumbs-down"></nve-icon>
<nve-icon name="chevron" direction="left"></nve-icon>
<nve-icon name="beginning" direction="left"></nve-icon>
<nve-icon name="arrow-stop" direction="left"></nve-icon>
<nve-icon name="navigate-back" direction="left"></nve-icon>
<nve-icon name="chevron" direction="right"></nve-icon>
<nve-icon name="end" direction="right"></nve-icon>
<nve-icon name="arrow-stop" direction="right"></nve-icon>
<nve-icon name="arrow" direction="right"></nve-icon>
<nve-icon name="carousel-horizontal" direction="right"></nve-icon>
<nve-icon name="chevron" direction="down"></nve-icon>
<nve-icon name="thumb" direction="down"></nve-icon>
Testing 1.0 deprecation
The exported test utilities from @elements/elements/test are now supported in a dedicated testing package @nvidia-elements/testing.
import { createFixture, removeFixture, elementIsStable, emulateClick, untilEvent } from '@elements/elements/test';
import { createFixture, removeFixture, elementIsStable, emulateClick, untilEvent } from '@nvidia-elements/testing';
Scoped Tags 1.0 deprecation
The defineScopedElement helper no longer exists. Instead, consuming applications define their own tag name. This allows the consuming application to have more control of the @lit-labs/scoped-registry-mixin package version.
import { defineScopedElement } from '@nvidia-elements/core/scoped';
defineScopedElement('suffix', Element);
import { scope } from '@nvidia-elements/core/scoped';
import { ScopedRegistryHost } from '@lit-labs/scoped-registry-mixin';
customElements.define(`suffix-element`, scope(Element, ScopedRegistryHost));