@nvidia-elements/core 2.15.5 → 2.17.0
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 +26 -0
- package/dist/accordion/accordion2.js +4 -4
- package/dist/alert/alert-group2.js +1 -1
- package/dist/alert/alert2.js +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar2.js +1 -1
- package/dist/badge/badge2.js +1 -1
- package/dist/breadcrumb/breadcrumb2.js +1 -1
- package/dist/bundle.d.ts +4 -0
- package/dist/bundles/index.d.ts +63 -0
- package/dist/bundles/index.js +73 -6
- package/dist/button/button2.js +1 -1
- package/dist/button-group/button-group2.js +1 -1
- package/dist/card/card2.js +4 -4
- package/dist/chat-message/chat-message2.js +1 -1
- package/dist/checkbox/checkbox-group2.js +1 -1
- package/dist/checkbox/checkbox2.js +1 -1
- package/dist/color/color2.js +1 -1
- package/dist/combobox/combobox2.js +1 -1
- package/dist/copy-button/copy-button2.js +1 -1
- package/dist/custom-elements-jsx.d.ts +49 -0
- package/dist/custom-elements-vue.d.ts +49 -0
- package/dist/custom-elements.json +370 -55
- package/dist/data.html.json +42 -0
- 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/dialog2.js +1 -1
- package/dist/divider/divider2.js +1 -1
- package/dist/dot/dot2.js +1 -1
- package/dist/drag-handle/drag-handle2.js +1 -1
- package/dist/drawer/drawer-content2.js +1 -1
- package/dist/drawer/drawer-footer2.js +1 -1
- package/dist/drawer/drawer-header2.js +1 -1
- package/dist/drawer/drawer2.js +1 -1
- package/dist/dropdown/dropdown-footer2.js +1 -1
- package/dist/dropdown/dropdown-header2.js +1 -1
- package/dist/dropdown/dropdown2.js +1 -1
- package/dist/dropdown-group/dropdown-group.js +1 -1
- package/dist/dropzone/dropzone2.js +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/format-bytes/format-bytes2.js +1 -1
- package/dist/format-datetime/format-datetime2.js +1 -1
- package/dist/format-number/format-number2.js +1 -1
- package/dist/format-relative-time/format-relative-time2.js +1 -1
- package/dist/format-truncate/format-truncate2.js +1 -1
- package/dist/forms/control/control2.js +1 -1
- package/dist/forms/control-group/control-group2.js +1 -1
- package/dist/forms/control-message/control-message2.js +1 -1
- package/dist/gauge/gauge2.js +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/column/column2.js +1 -1
- package/dist/grid/footer/footer2.js +1 -1
- package/dist/grid/grid2.js +1 -1
- package/dist/grid/header/header2.js +1 -1
- package/dist/grid/placeholder/placeholder2.js +1 -1
- package/dist/grid/row/row2.js +1 -1
- package/dist/icon/icon2.js +2 -2
- package/dist/icon-button/icon-button.d.ts +5 -0
- package/dist/icon-button/icon-button2.js +3 -3
- package/dist/icon-button/icon-button2.js.map +1 -1
- package/dist/iframe/define.d.ts +6 -0
- package/dist/iframe/define.js +7 -0
- package/dist/iframe/define.js.map +1 -0
- package/dist/iframe/iframe.d.ts +28 -0
- package/dist/iframe/iframe.examples.js +6 -0
- package/dist/iframe/iframe.examples.js.map +1 -0
- package/dist/iframe/iframe.examples.json +59 -0
- package/dist/iframe/iframe.js +6 -0
- package/dist/iframe/iframe.js.map +1 -0
- package/dist/iframe/iframe2.js +183 -0
- package/dist/iframe/iframe2.js.map +1 -0
- package/dist/iframe/index.d.ts +1 -0
- package/dist/iframe/index.js +2 -0
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input2.js +1 -1
- package/dist/internal/controllers/keynav-grid.controller.js +93 -62
- package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/utils/events.d.ts +6 -1
- package/dist/internal/utils/events.js +22 -4
- package/dist/internal/utils/events.js.map +1 -1
- package/dist/logo/logo2.js +1 -1
- package/dist/menu/menu-group2.js +1 -1
- package/dist/menu/menu-item2.js +1 -1
- package/dist/menu/menu2.js +1 -1
- package/dist/month/month2.js +1 -1
- package/dist/notification/notification-group2.js +1 -1
- package/dist/notification/notification2.js +1 -1
- package/dist/page/page-panel/page-panel-content2.js +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +1 -1
- package/dist/page/page-panel/page-panel-header2.js +1 -1
- package/dist/page/page-panel/page-panel2.js +1 -1
- package/dist/page/page2.js +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-loader/page-loader2.js +1 -1
- package/dist/pagination/pagination2.js +1 -1
- package/dist/panel/panel2.js +4 -4
- package/dist/password/password2.js +1 -1
- package/dist/preferences-input/preferences-input2.js +1 -1
- package/dist/progress-bar/progress-bar2.js +1 -1
- package/dist/progress-dot/define.d.ts +6 -0
- package/dist/progress-dot/define.js +7 -0
- package/dist/progress-dot/define.js.map +1 -0
- package/dist/progress-dot/index.d.ts +1 -0
- package/dist/progress-dot/index.js +2 -0
- package/dist/progress-dot/progress-dot.d.ts +33 -0
- package/dist/progress-dot/progress-dot.examples.js +6 -0
- package/dist/progress-dot/progress-dot.examples.js.map +1 -0
- package/dist/progress-dot/progress-dot.examples.json +64 -0
- package/dist/progress-dot/progress-dot.js +6 -0
- package/dist/progress-dot/progress-dot.js.map +1 -0
- package/dist/progress-dot/progress-dot2.js +40 -0
- package/dist/progress-dot/progress-dot2.js.map +1 -0
- package/dist/progress-ring/progress-ring2.js +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +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/skeleton2.js +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/steps2.js +2 -2
- package/dist/switch/switch-group2.js +1 -1
- package/dist/switch/switch2.js +1 -1
- package/dist/tabs/tabs-group2.js +1 -1
- package/dist/tabs/tabs2.js +2 -2
- package/dist/tag/tag2.js +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/time/time2.js +1 -1
- package/dist/toast/toast2.js +1 -1
- package/dist/toggletip/toggletip-footer2.js +1 -1
- package/dist/toggletip/toggletip-header.js +1 -1
- package/dist/toggletip/toggletip-header.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +1 -1
- package/dist/toggletip/toggletip.examples.js.map +1 -1
- package/dist/toggletip/toggletip.examples.json +1 -1
- package/dist/toggletip/toggletip2.js +1 -1
- package/dist/toolbar/toolbar2.js +1 -1
- package/dist/tooltip/tooltip2.js +1 -1
- package/dist/tree/tree-node2.js +1 -1
- package/dist/tree/tree2.js +1 -1
- package/dist/week/week2.js +1 -1
- package/package.json +26 -1
package/dist/data.html.json
CHANGED
|
@@ -2710,6 +2710,11 @@
|
|
|
2710
2710
|
"description": "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\n- `md` Standard size that works well in most contexts and provides balanced visibility.\n\n- `lg` Larger size for emphasizing important elements or improving touch targets in spacious layouts.",
|
|
2711
2711
|
"values": [{ "name": "sm" }, { "name": "md" }, { "name": "lg" }]
|
|
2712
2712
|
},
|
|
2713
|
+
{
|
|
2714
|
+
"name": "appearance",
|
|
2715
|
+
"description": "Selects the outline or solid form of the named icon. Solid icons use an optional `-solid` asset and fall back to\nthe outline form when that asset is unavailable.",
|
|
2716
|
+
"values": [{ "name": "outline" }, { "name": "solid" }]
|
|
2717
|
+
},
|
|
2713
2718
|
{
|
|
2714
2719
|
"name": "container",
|
|
2715
2720
|
"description": "Determines the container of the button. Flat suits nesting within other containers or more muted style. Inline suits inline content such as text.",
|
|
@@ -3140,6 +3145,17 @@
|
|
|
3140
3145
|
}
|
|
3141
3146
|
]
|
|
3142
3147
|
},
|
|
3148
|
+
{
|
|
3149
|
+
"name": "nve-iframe",
|
|
3150
|
+
"description": "An iframe component that syncs with the parent document's theme and template content. Use when needing to render dynamically generated or isolated content.\n---\n\n\n### **Slots:**\n - _default_ - A template containing the iframe body content.\n- **head** - A template containing content inserted into the iframe head.\n\n### **CSS Properties:**\n - **--border** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border) _(default: undefined)_\n- **--width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_\n- **--height** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/height) _(default: undefined)_",
|
|
3151
|
+
"attributes": [{ "name": "aria-label", "values": [] }],
|
|
3152
|
+
"references": [
|
|
3153
|
+
{
|
|
3154
|
+
"name": "Documentation",
|
|
3155
|
+
"url": "https://nvidia.github.io/elements/docs/elements/iframe/"
|
|
3156
|
+
}
|
|
3157
|
+
]
|
|
3158
|
+
},
|
|
3143
3159
|
{
|
|
3144
3160
|
"name": "nve-input-group",
|
|
3145
3161
|
"description": "Visually combines many related input controls into a unified composite field with shared styling.\n---\n\n\n### **Slots:**\n - _default_ - Control input elements\n\n### **CSS Properties:**\n - **--background** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/background) _(default: undefined)_\n- **--color** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color) _(default: undefined)_\n- **--border-radius** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) _(default: undefined)_\n- **--gap** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) _(default: undefined)_\n- **--border** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border) _(default: undefined)_\n- **--padding** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) _(default: undefined)_\n- **--label-color** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color) _(default: undefined)_\n- **--label-text-transform** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform) _(default: undefined)_\n- **--label-font-weight** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) _(default: undefined)_\n- **--label-font-size** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) _(default: undefined)_",
|
|
@@ -4112,6 +4128,32 @@
|
|
|
4112
4128
|
}
|
|
4113
4129
|
]
|
|
4114
4130
|
},
|
|
4131
|
+
{
|
|
4132
|
+
"name": "nve-progress-dot",
|
|
4133
|
+
"description": "An inline visual indicator that shows the progress of an ongoing task with an unknown completion percentage.\n---\n\n\n### **CSS Properties:**\n - **--color** - Dot color. Defaults to the inherited text color. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color) _(default: undefined)_\n- **--width** - Indicator width. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_\n- **--height** - Indicator height. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/height) _(default: undefined)_\n- **--animation-duration** - Duration of one animation cycle. Set to 0s for static dots. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-duration) _(default: undefined)_",
|
|
4134
|
+
"attributes": [
|
|
4135
|
+
{
|
|
4136
|
+
"name": "size",
|
|
4137
|
+
"description": "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\n- `md` Standard size that works well in most contexts and provides balanced visibility.\n\n- `lg` Larger size for emphasizing important elements or improving touch targets in spacious layouts.",
|
|
4138
|
+
"values": [{ "name": "sm" }, { "name": "md" }, { "name": "lg" }]
|
|
4139
|
+
},
|
|
4140
|
+
{
|
|
4141
|
+
"name": "i18n",
|
|
4142
|
+
"description": "Enables updating the default loading label for internationalization.",
|
|
4143
|
+
"values": []
|
|
4144
|
+
}
|
|
4145
|
+
],
|
|
4146
|
+
"references": [
|
|
4147
|
+
{
|
|
4148
|
+
"name": "WAI-ARIA Reference",
|
|
4149
|
+
"url": "https://www.w3.org/TR/wai-aria-1.2/#progressbar"
|
|
4150
|
+
},
|
|
4151
|
+
{
|
|
4152
|
+
"name": "Documentation",
|
|
4153
|
+
"url": "https://nvidia.github.io/elements/docs/elements/progress-dot/"
|
|
4154
|
+
}
|
|
4155
|
+
]
|
|
4156
|
+
},
|
|
4115
4157
|
{
|
|
4116
4158
|
"name": "nve-progress-ring",
|
|
4117
4159
|
"description": "The `progress-ring` component shows the status of a pending task. It also serves the basis of the page loading element.\n---\n\n\n### **Slots:**\n - _default_ - Content to display in the ring center. Defaults to a status icon.\n\n### **CSS Properties:**\n - **--background-color** - _(default: undefined)_\n- **--ring-color** - _(default: undefined)_\n- **--ring-background-opacity** - _(default: undefined)_\n- **--ring-width** - _(default: undefined)_\n- **--width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_\n- **--height** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/height) _(default: undefined)_\n- **--animation-duration** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-duration) _(default: undefined)_\n- **--color** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color) _(default: undefined)_\n\n### **CSS Parts:**\n - **icon** - The icon element",
|
package/dist/date/date2.js
CHANGED
package/dist/dialog/dialog2.js
CHANGED
package/dist/divider/divider2.js
CHANGED
package/dist/dot/dot2.js
CHANGED
package/dist/drawer/drawer2.js
CHANGED
package/dist/file/file2.js
CHANGED
package/dist/gauge/gauge2.js
CHANGED
package/dist/grid/cell/cell2.js
CHANGED
package/dist/grid/grid2.js
CHANGED
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.
|
|
19
|
+
version: "2.17.0"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
static {
|
|
@@ -103,7 +103,7 @@ a([l({
|
|
|
103
103
|
})], f.prototype, "name", void 0), a([d()], f.prototype, "svg", void 0);
|
|
104
104
|
function p(t) {
|
|
105
105
|
if (typeof globalThis.customElements?.get == "function") {
|
|
106
|
-
let n = e(t.metadata.version), i = e("2.
|
|
106
|
+
let n = e(t.metadata.version), i = e("2.17.0");
|
|
107
107
|
n.minor <= i.minor && n.major <= i.major && (t._icons = {
|
|
108
108
|
...t._icons,
|
|
109
109
|
...r
|
|
@@ -35,6 +35,11 @@ export declare class IconButton extends Button {
|
|
|
35
35
|
* Sets size of the icon button.
|
|
36
36
|
*/
|
|
37
37
|
size?: Size;
|
|
38
|
+
/**
|
|
39
|
+
* Selects the outline or solid form of the named icon. Solid icons use an optional `-solid` asset and fall back to
|
|
40
|
+
* the outline form when that asset is unavailable.
|
|
41
|
+
*/
|
|
42
|
+
appearance?: 'outline' | 'solid';
|
|
38
43
|
static styles: import("lit").CSSResult[];
|
|
39
44
|
static readonly metadata: {
|
|
40
45
|
tag: string;
|
|
@@ -15,14 +15,14 @@ var l = class extends a {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-icon-button",
|
|
18
|
-
version: "2.
|
|
18
|
+
version: "2.17.0"
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
static {
|
|
22
22
|
this.elementDefinitions = { [i.metadata.tag]: i };
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return s`<div internal-host interaction-state focus-within aria-hidden="true"><slot @slotchange="${(t) => e(t.target)}"><nve-icon .name="${this.iconName}" .direction="${this.direction}" .size="${this.size}" aria-hidden="true" part="icon"></nve-icon></slot></div><slot name="anchor"></slot>`;
|
|
25
|
+
return s`<div internal-host interaction-state focus-within aria-hidden="true"><slot @slotchange="${(t) => e(t.target)}"><nve-icon .name="${this.iconName}" .appearance="${this.appearance}" .direction="${this.direction}" .size="${this.size}" aria-hidden="true" part="icon"></nve-icon></slot></div><slot name="anchor"></slot>`;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
r([c({
|
|
@@ -34,7 +34,7 @@ r([c({
|
|
|
34
34
|
})], l.prototype, "direction", void 0), r([c({
|
|
35
35
|
type: String,
|
|
36
36
|
reflect: !0
|
|
37
|
-
})], l.prototype, "size", void 0), l = r([t()], l);
|
|
37
|
+
})], l.prototype, "size", void 0), r([c({ type: String })], l.prototype, "appearance", void 0), l = r([t()], l);
|
|
38
38
|
//#endregion
|
|
39
39
|
export { l as IconButton };
|
|
40
40
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button2.js","names":[],"sources":["../../src/icon-button/icon-button.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size } from '@nvidia-elements/core/internal';\nimport { removeEmptySlotWhitespace, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Button } from '@nvidia-elements/core/button';\nimport type { IconName } from '@nvidia-elements/core/icon';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './icon-button.css?inline';\n\n/**\n * @element nve-icon-button\n * @description An icon button is a button that displays only an icon without a visual label.\n * @documentation https://nvidia.github.io/elements/docs/elements/icon-button/\n * @since 0.2.1\n * @entrypoint \\@nvidia-elements/core/icon-button\n * @slot - default slot for custom icons\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --line-height\n * @cssprop --gap\n * @cssprop --height\n * @cssprop --width\n * @cssprop --font-size\n * @cssprop --color\n * @cssprop --background\n * @csspart icon - The icon element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/\n */\n@scopedRegistry()\nexport class IconButton extends Button {\n /**\n * Sets the icon name, which determines which icon to display.\n */\n @property({ type: String, attribute: 'icon-name' }) iconName: IconName;\n\n /**\n * Sets the direction of the icon.\n * Only supported by expand-panel/collapse-panel (horizontal axis) and arrow/caret/chevron icons (4-directions)\n */\n @property({ type: String, reflect: true }) direction: 'up' | 'down' | 'left' | 'right';\n\n /**\n * Sets size of the icon button.\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n static styles = useStyles([...Button.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-icon-button',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n render() {\n return html`\n <div internal-host interaction-state focus-within aria-hidden=\"true\">\n <slot @slotchange=${(e: Event) => removeEmptySlotWhitespace(e.target as HTMLSlotElement)}>\n <nve-icon .name=${this.iconName} .direction=${this.direction} .size=${this.size} aria-hidden=\"true\" part=\"icon\"></nve-icon>\n </slot>\n </div>\n <slot name=\"anchor\"></slot>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;AAgCO,IAAM,IAAN,cAAyB,EAAO;;
|
|
1
|
+
{"version":3,"file":"icon-button2.js","names":[],"sources":["../../src/icon-button/icon-button.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport type { Size } from '@nvidia-elements/core/internal';\nimport { removeEmptySlotWhitespace, scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Button } from '@nvidia-elements/core/button';\nimport type { IconName } from '@nvidia-elements/core/icon';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './icon-button.css?inline';\n\n/**\n * @element nve-icon-button\n * @description An icon button is a button that displays only an icon without a visual label.\n * @documentation https://nvidia.github.io/elements/docs/elements/icon-button/\n * @since 0.2.1\n * @entrypoint \\@nvidia-elements/core/icon-button\n * @slot - default slot for custom icons\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --line-height\n * @cssprop --gap\n * @cssprop --height\n * @cssprop --width\n * @cssprop --font-size\n * @cssprop --color\n * @cssprop --background\n * @csspart icon - The icon element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/\n */\n@scopedRegistry()\nexport class IconButton extends Button {\n /**\n * Sets the icon name, which determines which icon to display.\n */\n @property({ type: String, attribute: 'icon-name' }) iconName: IconName;\n\n /**\n * Sets the direction of the icon.\n * Only supported by expand-panel/collapse-panel (horizontal axis) and arrow/caret/chevron icons (4-directions)\n */\n @property({ type: String, reflect: true }) direction: 'up' | 'down' | 'left' | 'right';\n\n /**\n * Sets size of the icon button.\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n /**\n * Selects the outline or solid form of the named icon. Solid icons use an optional `-solid` asset and fall back to\n * the outline form when that asset is unavailable.\n */\n @property({ type: String }) appearance?: 'outline' | 'solid';\n\n static styles = useStyles([...Button.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-icon-button',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n render() {\n return html`\n <div internal-host interaction-state focus-within aria-hidden=\"true\">\n <slot @slotchange=${(e: Event) => removeEmptySlotWhitespace(e.target as HTMLSlotElement)}>\n <nve-icon .name=${this.iconName} .appearance=${this.appearance} .direction=${this.direction} .size=${this.size} aria-hidden=\"true\" part=\"icon\"></nve-icon>\n </slot>\n </div>\n <slot name=\"anchor\"></slot>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;AAgCO,IAAM,IAAN,cAAyB,EAAO;;EAuBrB,KAAA,SAAA,EAAU,CAAC,GAAG,EAAO,QAAQ,CAAM,CAAC;;;EAEzB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAK,SAAS,MAAM,EACvB;;CAEA,SAAS;EACP,OAAO,CAAI,4FAEc,MAAa,EAA0B,EAAE,MAAyB,EAAE,qBACrE,KAAK,SAAS,iBAAe,KAAK,WAAW,gBAAc,KAAK,UAAU,WAAS,KAAK,KAAK;CAKvH;AACF;AAxCG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAMjD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAMxC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,cAAA,KAAA,CAAA,GAtB3B,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.js","names":[],"sources":["../../src/iframe/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { Iframe } from './iframe.js';\n\ndefine(Iframe);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-iframe': Iframe;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAM"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @element nve-iframe
|
|
4
|
+
* @description An iframe component that syncs with the parent document's theme and template content. Use when needing to render dynamically generated or isolated content.
|
|
5
|
+
* @since 0.0.0
|
|
6
|
+
* @entrypoint \@nvidia-elements/core/iframe
|
|
7
|
+
* @documentation https://nvidia.github.io/elements/docs/elements/iframe/
|
|
8
|
+
* @slot - A template containing the iframe body content.
|
|
9
|
+
* @slot head - A template containing content inserted into the iframe head.
|
|
10
|
+
* @cssprop --border
|
|
11
|
+
* @cssprop --width
|
|
12
|
+
* @cssprop --height
|
|
13
|
+
* @beta
|
|
14
|
+
*/
|
|
15
|
+
export declare class Iframe extends LitElement {
|
|
16
|
+
#private;
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
18
|
+
static readonly metadata: {
|
|
19
|
+
tag: string;
|
|
20
|
+
version: string;
|
|
21
|
+
};
|
|
22
|
+
static get observedAttributes(): string[];
|
|
23
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
26
|
+
firstUpdated(props: PropertyValues<this>): void;
|
|
27
|
+
disconnectedCallback(): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iframe.examples.js","names":[],"sources":["../../src/iframe/iframe.examples.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport '@nvidia-elements/core/iframe/define.js';\n\nexport default {\n title: 'Elements/Iframe',\n component: 'nve-iframe'\n};\n\n/**\n * @summary Supplies the iframe with Elements themes, utilities, fonts, and component registrations through its head template. Use this structure because iframe documents do not inherit resources from the parent document.\n */\nexport const Default = {\n render: () => html`\n<nve-iframe aria-label=\"Elements iframe example\">\n <template slot=\"head\">\n <title>Elements iframe example</title>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/bundles/index.css\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/fonts/inter.css\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/styles/dist/bundles/index.css\" />\n <script type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/core/dist/bundles/index.min.js\"></script>\n </template>\n <template>\n <nve-alert status=\"success\">isolated iframe content</nve-alert>\n </template>\n</nve-iframe>\n `\n};\n\n/**\n * @summary Synchronizes the iframe height with expandable content so the host layout avoids empty space or internal scrollbars. Use for previews whose intrinsic height changes after interaction.\n * @tags test-case\n */\nexport const DynamicHeight = {\n render: () => html`\n<nve-iframe aria-label=\"Dynamic height iframe example\" style=\"--border: 1px solid red\">\n <template slot=\"head\">\n <title>Dynamic iframe height</title>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/bundles/index.css\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/fonts/inter.css\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/styles/dist/bundles/index.css\" />\n <script type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/core/dist/bundles/index.min.js\"></script>\n </template>\n <template>\n <nve-accordion behavior-expand>\n <nve-accordion-header>\n <h2 nve-text=\"heading xs medium\" slot=\"prefix\">Dynamic height in iframe</h2>\n </nve-accordion-header>\n <nve-accordion-content>\n The iframe expands when this content opens and contracts when it closes.\n </nve-accordion-content>\n </nve-accordion>\n </template>\n</nve-iframe>\n `\n};\n\n/**\n * @summary Overrides intrinsic iframe dimensions with `--width` and `--height` to create a stable preview viewport. Use when you need to inspect embedded content at a fixed size regardless of its rendered bounds.\n * @tags test-case\n */\nexport const FixedSize = {\n render: () => html`\n<nve-iframe aria-label=\"Fixed-size iframe example\" style=\"--height: 256px; --width: 256px; --border: 1px solid red\">\n <template><p style=\"height: 128px; width: 128px; margin: 1px; outline: 1px solid yellow;\">override iframe size</p></template>\n</nve-iframe>\n `\n};\n\n/**\n * @summary The iframe browsing-context boundary clips popovers at its viewport and prevents them from escaping. Keep overlays inside the frame, or render them outside the iframe when they must overlap surrounding content.\n * @tags test-case\n */\nexport const OverflowClip = {\n render: () => html`\n<nve-iframe aria-label=\"Overflow clipping iframe example\" style=\"--height: 150px; --border: 1px solid red\">\n <template slot=\"head\">\n <title>Clipped iframe popover</title>\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/bundles/index.css\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/themes/dist/fonts/inter.css\" />\n <link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/styles/dist/bundles/index.css\" />\n <script type=\"module\" src=\"https://cdn.jsdelivr.net/npm/@nvidia-elements/core/dist/bundles/index.min.js\"></script>\n </template>\n <template>\n <div nve-layout=\"pad:md\">\n <nve-dropdown id=\"dropdown\">Popovers <strong>are clipped</strong> by the iframe.</nve-dropdown>\n <nve-button popovertarget=\"dropdown\">Open popover</nve-button>\n </div>\n </template>\n</nve-iframe>\n `\n};\n\n/**\n * @summary Regenerates the iframe document when its source template changes. Use for live previews or generated output that must stay synchronized with edits made in the parent document.\n * @tags test-case\n */\nexport const DynamicallyUpdatedContent = {\n render: () => html`\n<nve-iframe id=\"property-example\" aria-label=\"Dynamically updated iframe example\">\n <template>\n <p nve-text=\"body\">Initial iframe content.</p>\n </template>\n</nve-iframe>\n<script type=\"module\">\n document.querySelector('#property-example template').innerHTML =\n '<p nve-text=\"body\">This template was dynamically updated.</p>';\n</script>\n `\n};\n"],"mappings":";AAGA,IAAA,IAAS"}
|