@nvidia-elements/core 2.7.3 → 2.8.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 +23 -0
- package/README.md +8 -0
- package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/decorate.js +1 -1
- package/dist/accordion/accordion2.js +5 -5
- package/dist/accordion/accordion2.js.map +1 -1
- package/dist/alert/alert-group2.js +2 -2
- package/dist/alert/alert-group2.js.map +1 -1
- package/dist/alert/alert2.js +2 -2
- package/dist/alert/alert2.js.map +1 -1
- package/dist/avatar/avatar-group2.js +1 -1
- package/dist/avatar/avatar-group2.js.map +1 -1
- package/dist/avatar/avatar2.js +2 -2
- package/dist/avatar/avatar2.js.map +1 -1
- package/dist/badge/badge2.js +2 -2
- package/dist/badge/badge2.js.map +1 -1
- package/dist/breadcrumb/breadcrumb2.js +2 -2
- package/dist/breadcrumb/breadcrumb2.js.map +1 -1
- package/dist/bundles/index.d.ts +2 -0
- package/dist/bundles/index.js +6 -6
- package/dist/button/button2.js +2 -2
- package/dist/button/button2.js.map +1 -1
- package/dist/button-group/button-group2.js +2 -2
- package/dist/button-group/button-group2.js.map +1 -1
- package/dist/card/card2.js +5 -5
- package/dist/card/card2.js.map +1 -1
- package/dist/chat-message/chat-message2.js +2 -2
- package/dist/chat-message/chat-message2.js.map +1 -1
- package/dist/checkbox/checkbox-group2.js +2 -2
- package/dist/checkbox/checkbox-group2.js.map +1 -1
- package/dist/checkbox/checkbox2.js +2 -2
- package/dist/checkbox/checkbox2.js.map +1 -1
- package/dist/color/color2.js +2 -2
- package/dist/color/color2.js.map +1 -1
- package/dist/combobox/combobox.examples.js.map +1 -1
- package/dist/combobox/combobox2.js +7 -5
- package/dist/combobox/combobox2.js.map +1 -1
- package/dist/copy-button/copy-button2.js +2 -2
- package/dist/copy-button/copy-button2.js.map +1 -1
- package/dist/custom-elements-jsx.d.ts +2 -0
- package/dist/custom-elements-vue.d.ts +2 -0
- package/dist/custom-elements.json +9 -1
- package/dist/data.html.json +1 -1
- package/dist/date/date2.js +2 -2
- package/dist/date/date2.js.map +1 -1
- package/dist/datetime/datetime2.js +2 -2
- package/dist/datetime/datetime2.js.map +1 -1
- package/dist/dialog/dialog-footer2.js +2 -2
- package/dist/dialog/dialog-footer2.js.map +1 -1
- package/dist/dialog/dialog-header2.js +2 -2
- package/dist/dialog/dialog-header2.js.map +1 -1
- package/dist/dialog/dialog2.js +2 -2
- package/dist/dialog/dialog2.js.map +1 -1
- package/dist/divider/divider2.js +2 -2
- package/dist/divider/divider2.js.map +1 -1
- package/dist/dot/dot2.js +2 -2
- package/dist/dot/dot2.js.map +1 -1
- package/dist/drawer/drawer-content2.js +2 -2
- package/dist/drawer/drawer-content2.js.map +1 -1
- package/dist/drawer/drawer-footer2.js +2 -2
- package/dist/drawer/drawer-footer2.js.map +1 -1
- package/dist/drawer/drawer-header2.js +2 -2
- package/dist/drawer/drawer-header2.js.map +1 -1
- package/dist/drawer/drawer2.js +2 -2
- package/dist/drawer/drawer2.js.map +1 -1
- package/dist/dropdown/dropdown-footer2.js +2 -2
- package/dist/dropdown/dropdown-footer2.js.map +1 -1
- package/dist/dropdown/dropdown-header2.js +2 -2
- package/dist/dropdown/dropdown-header2.js.map +1 -1
- package/dist/dropdown/dropdown2.js +2 -2
- package/dist/dropdown/dropdown2.js.map +1 -1
- package/dist/dropdown-group/dropdown-group.js +2 -2
- package/dist/dropdown-group/dropdown-group.js.map +1 -1
- package/dist/dropzone/dropzone2.js +2 -2
- package/dist/dropzone/dropzone2.js.map +1 -1
- package/dist/file/file2.js +1 -1
- package/dist/file/file2.js.map +1 -1
- package/dist/format-bytes/format-bytes2.js +2 -2
- package/dist/format-bytes/format-bytes2.js.map +1 -1
- package/dist/format-datetime/format-datetime2.js +2 -2
- package/dist/format-datetime/format-datetime2.js.map +1 -1
- package/dist/format-number/format-number2.js +2 -2
- package/dist/format-number/format-number2.js.map +1 -1
- package/dist/format-relative-time/format-relative-time2.js +2 -2
- package/dist/format-relative-time/format-relative-time2.js.map +1 -1
- package/dist/format-truncate/format-truncate2.js +2 -2
- package/dist/format-truncate/format-truncate2.js.map +1 -1
- package/dist/forms/control/control2.js +2 -2
- package/dist/forms/control/control2.js.map +1 -1
- package/dist/forms/control-group/control-group2.js +2 -2
- package/dist/forms/control-group/control-group2.js.map +1 -1
- package/dist/forms/control-message/control-message2.js +2 -2
- package/dist/forms/control-message/control-message2.js.map +1 -1
- package/dist/forms/validation.examples.js.map +1 -1
- package/dist/gauge/gauge2.js +2 -2
- package/dist/gauge/gauge2.js.map +1 -1
- package/dist/grid/cell/cell2.js +1 -1
- package/dist/grid/cell/cell2.js.map +1 -1
- package/dist/grid/column/column2.js +2 -2
- package/dist/grid/column/column2.js.map +1 -1
- package/dist/grid/footer/footer2.js +2 -2
- package/dist/grid/footer/footer2.js.map +1 -1
- package/dist/grid/grid.examples.js.map +1 -1
- package/dist/grid/grid2.js +2 -2
- package/dist/grid/grid2.js.map +1 -1
- package/dist/grid/header/header2.js +2 -2
- package/dist/grid/header/header2.js.map +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 +2 -2
- package/dist/grid/row/row2.js.map +1 -1
- package/dist/icon/icon2.js +3 -3
- package/dist/icon/icon2.js.map +1 -1
- package/dist/icon-button/icon-button2.js +2 -2
- package/dist/icon-button/icon-button2.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/input/input-group2.js +1 -1
- package/dist/input/input-group2.js.map +1 -1
- package/dist/input/input2.js +2 -2
- package/dist/input/input2.js.map +1 -1
- package/dist/internal/controllers/audit.controller.js +9 -7
- package/dist/internal/controllers/audit.controller.js.map +1 -1
- package/dist/internal/controllers/gesture.controller.examples.js.map +1 -1
- package/dist/internal/controllers/gesture.controller.js +1 -3
- package/dist/internal/controllers/gesture.controller.js.map +1 -1
- package/dist/internal/controllers/i18n.controller.examples.js.map +1 -1
- package/dist/internal/controllers/i18n.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-list.controller.js +1 -4
- package/dist/internal/controllers/keynav-list.controller.js.map +1 -1
- package/dist/internal/controllers/keynav-spatial.controller.js.map +1 -1
- package/dist/internal/controllers/state-scroll.controller.js.map +1 -1
- package/dist/internal/controllers/type-anchor.controller.js.map +1 -1
- package/dist/internal/controllers/type-closable.controller.js.map +1 -1
- package/dist/internal/controllers/type-expandable.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
- package/dist/internal/controllers/type-native-popover.utils.js +2 -2
- package/dist/internal/controllers/type-native-popover.utils.js.map +1 -1
- package/dist/internal/controllers/type-selectable.controller.js.map +1 -1
- package/dist/internal/controllers/type-ssr.controller.js.map +1 -1
- package/dist/internal/services/global.service.js +1 -1
- package/dist/internal/services/global.utils.js.map +1 -1
- package/dist/internal/services/log.service.js.map +1 -1
- package/dist/internal/services/transition.service.js.map +1 -1
- package/dist/internal/utils/dom.js +2 -1
- package/dist/internal/utils/dom.js.map +1 -1
- package/dist/internal/utils/strings.js +1 -1
- package/dist/internal/utils/strings.js.map +1 -1
- package/dist/logo/logo2.js +2 -2
- package/dist/logo/logo2.js.map +1 -1
- package/dist/menu/menu-item2.js +2 -2
- package/dist/menu/menu-item2.js.map +1 -1
- package/dist/menu/menu2.js +2 -2
- package/dist/menu/menu2.js.map +1 -1
- package/dist/month/month2.js +2 -2
- package/dist/month/month2.js.map +1 -1
- package/dist/notification/notification-group2.js +2 -2
- package/dist/notification/notification-group2.js.map +1 -1
- package/dist/notification/notification2.js +2 -2
- 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-content2.js.map +1 -1
- package/dist/page/page-panel/page-panel-footer2.js +2 -2
- package/dist/page/page-panel/page-panel-footer2.js.map +1 -1
- package/dist/page/page-panel/page-panel-header2.js +2 -2
- package/dist/page/page-panel/page-panel-header2.js.map +1 -1
- package/dist/page/page-panel/page-panel2.js +2 -2
- package/dist/page/page-panel/page-panel2.js.map +1 -1
- package/dist/page/page2.js +2 -2
- package/dist/page/page2.js.map +1 -1
- package/dist/page-header/page-header2.js +1 -1
- package/dist/page-header/page-header2.js.map +1 -1
- package/dist/page-loader/page-loader2.js +2 -2
- package/dist/page-loader/page-loader2.js.map +1 -1
- package/dist/pagination/pagination2.js +2 -2
- package/dist/pagination/pagination2.js.map +1 -1
- package/dist/panel/panel2.js +5 -5
- package/dist/panel/panel2.js.map +1 -1
- package/dist/password/password2.js +2 -2
- package/dist/password/password2.js.map +1 -1
- package/dist/polyfills/index.js +1 -1
- package/dist/polyfills/index.js.map +1 -1
- package/dist/preferences-input/preferences-input2.js +2 -2
- package/dist/preferences-input/preferences-input2.js.map +1 -1
- package/dist/progress-bar/progress-bar2.js +2 -2
- package/dist/progress-bar/progress-bar2.js.map +1 -1
- package/dist/progress-ring/progress-ring2.js +2 -2
- package/dist/progress-ring/progress-ring2.js.map +1 -1
- package/dist/progressive-filter-chip/progressive-filter-chip2.js +2 -2
- package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
- package/dist/pulse/pulse2.js +2 -2
- package/dist/pulse/pulse2.js.map +1 -1
- package/dist/radio/radio-group2.js +2 -2
- package/dist/radio/radio-group2.js.map +1 -1
- package/dist/radio/radio2.js +2 -2
- package/dist/radio/radio2.js.map +1 -1
- package/dist/range/range2.js +4 -4
- package/dist/range/range2.js.map +1 -1
- package/dist/resize-handle/resize-handle2.js +2 -2
- package/dist/resize-handle/resize-handle2.js.map +1 -1
- package/dist/search/search2.js +2 -2
- package/dist/search/search2.js.map +1 -1
- package/dist/select/select2.js +2 -2
- package/dist/select/select2.js.map +1 -1
- package/dist/skeleton/skeleton2.js +2 -2
- package/dist/skeleton/skeleton2.js.map +1 -1
- package/dist/sort-button/sort-button2.js +2 -2
- package/dist/sort-button/sort-button2.js.map +1 -1
- package/dist/sparkline/sparkline.utils.js +1 -3
- package/dist/sparkline/sparkline.utils.js.map +1 -1
- package/dist/sparkline/sparkline2.js +8 -6
- package/dist/sparkline/sparkline2.js.map +1 -1
- package/dist/star-rating/star-rating2.js +2 -2
- package/dist/star-rating/star-rating2.js.map +1 -1
- package/dist/steps/steps2.js +3 -3
- package/dist/steps/steps2.js.map +1 -1
- package/dist/switch/switch-group2.js +2 -2
- package/dist/switch/switch-group2.js.map +1 -1
- package/dist/switch/switch2.js +2 -2
- package/dist/switch/switch2.js.map +1 -1
- package/dist/tabs/tabs-group2.js +2 -2
- package/dist/tabs/tabs-group2.js.map +1 -1
- package/dist/tabs/tabs2.js +3 -3
- package/dist/tabs/tabs2.js.map +1 -1
- package/dist/tag/tag.d.ts +2 -0
- package/dist/tag/tag.examples.js.map +1 -1
- package/dist/tag/tag.examples.json +20 -3
- package/dist/tag/tag.js +1 -1
- package/dist/tag/tag.js.map +1 -1
- package/dist/tag/tag2.js +3 -3
- package/dist/tag/tag2.js.map +1 -1
- package/dist/textarea/textarea2.js +1 -1
- package/dist/textarea/textarea2.js.map +1 -1
- package/dist/time/time2.js +2 -2
- package/dist/time/time2.js.map +1 -1
- package/dist/toast/toast2.js +2 -2
- package/dist/toast/toast2.js.map +1 -1
- package/dist/toggletip/toggletip-footer2.js +2 -2
- package/dist/toggletip/toggletip-footer2.js.map +1 -1
- package/dist/toggletip/toggletip-header2.js +2 -2
- package/dist/toggletip/toggletip-header2.js.map +1 -1
- package/dist/toggletip/toggletip2.js +2 -2
- package/dist/toggletip/toggletip2.js.map +1 -1
- package/dist/toolbar/toolbar2.js +2 -2
- package/dist/toolbar/toolbar2.js.map +1 -1
- package/dist/tooltip/tooltip.examples.js.map +1 -1
- package/dist/tooltip/tooltip2.js +2 -2
- package/dist/tooltip/tooltip2.js.map +1 -1
- package/dist/tree/tree-node2.js +2 -2
- package/dist/tree/tree-node2.js.map +1 -1
- package/dist/tree/tree.examples.js.map +1 -1
- package/dist/tree/tree2.js +2 -2
- package/dist/tree/tree2.js.map +1 -1
- package/dist/week/week2.js +2 -2
- package/dist/week/week2.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox2.js","names":["#datalist","#_datalist","#select","#_select","#options","#items","#dropdown","#input","#tags","#hasAvailableOptions","#hasFooterContent","#showCreateItem","#findOptionMatch","#tagLayoutIsHidden","#selectValue","#largeOptionsList","#isPristine","#openDropdown","#closeDropdown","#getOptionCheckbox","#characterAtIndexMatches","#onCreateItemClick","#onSlottedChildMutation","#setupSingleSelect","#setupMultipleSelect","#setupAutoCompleteKeyEvents","#setupMenuItemUpdateEvents","#setupOpenKeyEvents","#setupOverflowListener","#setupSlotStates","#setupLightDismiss","#observers","#setupInitialValue","#syncSelectValueStates","#syncOptionSelectedStates","#updateInputValue","#trackedOptions","#syncPending","#cleanupStaleTrackedOptions","#validateSingleSelectValue","#setInputValue","#setSelectValue","#dispatchCreate","#filterOptions","#openListBox","#updateMultipleOverflow","#setSlotStates"],"sources":["../../src/combobox/combobox.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, isServer, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport {\n createLightDismiss,\n focusElementTimeout,\n getDisplayValue,\n getElementUpdate,\n getPropertyChanges,\n scopedRegistry,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Dropdown } from '@nvidia-elements/core/dropdown';\nimport { Tag } from '@nvidia-elements/core/tag';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Checkbox } from '@nvidia-elements/core/checkbox';\nimport styles from './combobox.css?inline';\n\n/**\n * @element nve-combobox\n * @description An editable combobox with autocomplete behavior and selection support.\n * @documentation https://nvidia.github.io/elements/docs/elements/combobox/\n * @since 0.17.0\n * @entrypoint \\@nvidia-elements/core/combobox\n * @slot - default slot for an input and a datalist/select element\n * @slot prefix-icon - slot for icon before the input\n * @slot footer - slot for dropdown footer content\n * @cssprop --scroll-height\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --width\n * @cssprop --border-color\n * @cssprop --max-height\n * @cssprop --text-transform\n * @csspart tag - The tag element for selected items\n * @csspart dropdown - The dropdown popup element\n * @csspart menu - The menu element\n * @csspart menu-item - The menu item elements\n * @csspart checkbox - The checkbox element\n * @csspart icon - The icon element\n * @event scroll - Fires when the user scrolls the dropdown option list. Throttled to one dispatch per animation frame. `detail: { scrollTop, scrollHeight, clientHeight }`.\n * @event create - Fires when the user confirms a value that doesn't match any existing option and the `behavior-create` attribute exists. `detail: { value }`.\n * @csspart create-option - The menu item element for creating new options\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/\n */\n@scopedRegistry()\nexport class Combobox extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container: 'flat';\n\n /** Manage inline tag rendering for many-item select */\n @property({ type: String, reflect: true, attribute: 'tag-layout' }) tagLayout: 'hidden' | 'wrap';\n\n /** Enable creation of new options when the input value doesn't match any existing option. Dispatches a `create` event with `{ value }` detail. */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-create' }) behaviorCreate: boolean;\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-combobox',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Checkbox.metadata.tag]: Checkbox,\n [Icon.metadata.tag]: Icon,\n [Dropdown.metadata.tag]: Dropdown,\n [Menu.metadata.tag]: Menu,\n [MenuItem.metadata.tag]: MenuItem,\n [Tag.metadata.tag]: Tag\n };\n\n /**\n * If a <select> exists, on focus all options show by default.\n * If a <datalist> exists, on focus only options that match the current input value show.\n */\n\n #_datalist: HTMLSelectElement | null;\n get #datalist(): HTMLSelectElement | null {\n if (!this.#_datalist) {\n this.#_datalist = this.shadowRoot\n ? ((this.shadowRoot\n .querySelector('slot')\n ?.assignedElements({ flatten: true })\n ?.find(i => i.tagName === 'DATALIST' || i.tagName === 'SELECT') ??\n this.querySelector('datalist, select')) as HTMLSelectElement)\n : null;\n }\n return this.#_datalist;\n }\n\n #_select: HTMLSelectElement | null;\n get #select(): HTMLSelectElement | null {\n if (!this.#_select) {\n this.#_select = this.shadowRoot\n ? ((this.shadowRoot\n .querySelector('slot')\n ?.assignedElements({ flatten: true })\n ?.find(i => i.tagName === 'SELECT') ?? this.querySelector('select')) as HTMLSelectElement)\n : null;\n }\n return this.#_select;\n }\n\n get #options(): HTMLOptionElement[] {\n return Array.from(this.#datalist?.options ? this.#datalist.options : []);\n }\n\n get #items() {\n return Array.from(this.shadowRoot!.querySelectorAll<MenuItem>(MenuItem.metadata.tag));\n }\n\n get #dropdown() {\n return this.shadowRoot!.querySelector<Dropdown>(Dropdown.metadata.tag);\n }\n\n get #input() {\n return this.shadowRoot!.querySelector('[input]');\n }\n\n get #tags() {\n return this.shadowRoot!.querySelector('.tags');\n }\n\n get #hasAvailableOptions() {\n return this.#options.find(o => !o.disabled && !o.hidden);\n }\n\n get #hasFooterContent() {\n return !!this.querySelector('[slot=\"footer\"]');\n }\n\n get #showCreateItem(): boolean {\n if (!this.behaviorCreate || this.input?.disabled) return false;\n const value = this.input?.value.trim();\n if (!value) return false;\n return !this.#findOptionMatch(value);\n }\n\n #findOptionMatch(value: string): HTMLOptionElement | undefined {\n const lower = value.toLowerCase();\n return this.#options.find(o => {\n const display = o.textContent!.trim() || o.value;\n return display.toLowerCase() === lower || o.value.toLowerCase() === lower;\n });\n }\n\n #observers: (MutationObserver | ResizeObserver)[] = [];\n #syncPending = false;\n\n protected _associateDatalist = false;\n\n protected get prefixContent() {\n return this.#select?.multiple && !this.#tagLayoutIsHidden\n ? html`\n <div class=\"tags-label\" aria-hidden=\"true\">${this.#select.selectedOptions.length} ${this.i18n.selected}</div>\n <div class=\"tags\">\n ${Array.from<HTMLOptionElement>(this.#select.selectedOptions).map(\n o => html`\n <nve-tag part=\"tag\" readonly color=\"gray-slate\" closable .value=${o.value} @click=${() => this.#selectValue(o)}>${getDisplayValue(o)}</nve-tag>`\n )}\n </div>`\n : html`<slot name=\"prefix-icon\"></slot>`;\n }\n\n get #tagLayoutIsHidden() {\n return this.tagLayout === 'hidden';\n }\n\n get #largeOptionsList() {\n return (this.#datalist?.options?.length ?? 0) > 50;\n }\n\n get #isPristine() {\n return !this._internals.states.has('dirty');\n }\n\n protected get suffixContent() {\n if (isServer) return nothing;\n const options = this.#options;\n const largeOptionsList = this.#largeOptionsList;\n const isPristine = this.#isPristine;\n const visibleOptions = options.filter(o => !o.hidden).filter(o => !(o.value === '' && o.disabled));\n const hasNoResults = visibleOptions.filter(o => !o.disabled).length === 0;\n const showCreateItem = this.#showCreateItem;\n return html`\n <nve-dropdown part=\"dropdown\" .popoverType=${'manual'} .modal=${false} @open=${this.#openDropdown} @close=${this.#closeDropdown} hidden .anchor=${this.#input as HTMLElement} position=\"bottom\">\n <nve-menu part=\"menu\" role=\"listbox\" style=\"--width: 100%; --min-width: fit-content\" aria-label=${ifDefined(this.i18n.select)}>\n ${visibleOptions.map(\n o => html`\n <nve-menu-item part=\"menu-item\" .option=${getDisplayValue(o)} role=\"option\" @click=${() => this.#selectValue(o)} ?selected=${o.selected} aria-selected=${o.selected ? 'true' : 'false'} ?disabled=${o.disabled} aria-label=${getDisplayValue(o)}>\n ${this.#getOptionCheckbox(o)}\n ${largeOptionsList || isPristine ? getDisplayValue(o) : html`<span role=\"presentation\">${(o.label ? o.label : o.value)?.split('')?.map((c, ci) => html`<span ?matches=${this.#characterAtIndexMatches(c, ci)}>${c}</span>`)}</span>`}\n </nve-menu-item>`\n )}\n ${hasNoResults && !showCreateItem ? html`<nve-menu-item part=\"menu-item\" .value=${''} disabled>${this.i18n.noResults}</nve-menu-item>` : nothing}\n ${\n showCreateItem\n ? html`<nve-menu-item part=\"create-option\" role=\"button\" aria-label=${`${this.i18n.create} \"${this.input?.value.trim()}\"`} @click=${this.#onCreateItemClick}>\n <nve-icon part=\"icon\" name=\"add\" size=\"sm\"></nve-icon> \"${this.input?.value.trim()}\"\n </nve-menu-item>`\n : nothing\n }\n </nve-menu>\n <slot name=\"footer\"></slot>\n </nve-dropdown>`;\n }\n\n #getOptionCheckbox(o: HTMLOptionElement) {\n const select = this.#select;\n if (select?.multiple && this.#largeOptionsList) {\n return html`<input aria-hidden=\"true\" type=\"checkbox\" .checked=${o.selected} .disabled=${o.disabled} .name=${o.selected ? 'check' : undefined} />`;\n } else if (select?.multiple) {\n /* eslint-disable @nvidia-elements/lint/no-missing-control-label */\n return html`<nve-checkbox part=\"checkbox\"><input aria-hidden=\"true\" type=\"checkbox\" .checked=${o.selected} .disabled=${o.disabled} .name=${o.selected ? 'check' : undefined} /></nve-checkbox>`;\n } else if (select) {\n return html`<nve-icon part=\"icon\" name=\"check\" size=\"sm\"></nve-icon>`;\n } else {\n return nothing;\n }\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n this.shadowRoot!.addEventListener('slotchange', () => {\n this.#_datalist = null;\n this.#_select = null;\n this.#onSlottedChildMutation();\n });\n await this.updateComplete;\n this.#setupSingleSelect();\n this.#setupMultipleSelect();\n this.#setupAutoCompleteKeyEvents();\n this.#setupMenuItemUpdateEvents();\n this.#setupOpenKeyEvents();\n this.#setupOverflowListener();\n this.#setupSlotStates();\n await this.#setupLightDismiss();\n this.input.setAttribute('list', '');\n this.input.autocomplete = 'off';\n }\n\n connectedCallback() {\n super.connectedCallback();\n const observer = new MutationObserver(mutations => {\n if (mutations.some(m => m.type === 'childList' && m.target === this)) {\n this.#_datalist = null;\n this.#_select = null;\n }\n this.#onSlottedChildMutation();\n });\n observer.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['selected', 'disabled', 'value'],\n characterData: true\n });\n this.#observers.push(observer);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.#observers.forEach(observer => observer.disconnect());\n }\n\n reset() {\n this.#dropdown!.hidePopover();\n if (this.#select) {\n this.#select.selectedIndex = -1;\n }\n super.reset();\n }\n\n /** Select all options provided */\n selectAll() {\n this.#options.forEach(o => (o.selected = true));\n this.requestUpdate();\n this.#select!.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select!.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n #setupSingleSelect() {\n if (this.#select && !this.#select.multiple) {\n this.#setupInitialValue();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n }\n }\n\n #setupMultipleSelect() {\n if (this.#select?.multiple) {\n this.#setupInitialValue();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n this._internals.states.add('multiple');\n }\n }\n\n #setupInitialValue() {\n const selected = Array.from(this.#select!.selectedOptions).find((o: HTMLOptionElement) =>\n o.hasAttribute('selected')\n );\n if (selected && !this.#select!.multiple && !this.input.defaultValue) {\n this.input.value = getDisplayValue(selected);\n }\n }\n\n #updateInputValue() {\n if (!this.#select!.multiple && !this.input.defaultValue) {\n this.input.value = getDisplayValue(\n Array.from(this.#select!.selectedOptions).find(o => o.value === this.#select!.value)!\n );\n }\n }\n\n #syncSelectValueStates() {\n this.#observers.push(\n getElementUpdate(this.#select!, 'value', () => {\n this.#updateInputValue();\n this.requestUpdate();\n })\n );\n }\n\n #trackedOptions = new Set<HTMLOptionElement>();\n #syncOptionSelectedStates() {\n this.#options.forEach(o => {\n if (!this.#trackedOptions.has(o)) {\n this.#trackedOptions.add(o);\n getPropertyChanges(o, 'selected', () => this.requestUpdate());\n }\n });\n }\n\n #onSlottedChildMutation() {\n if (!this.#syncPending) {\n this.#syncPending = true;\n queueMicrotask(() => {\n this.#syncPending = false;\n this.#cleanupStaleTrackedOptions();\n this.#syncOptionSelectedStates();\n this.requestUpdate();\n });\n }\n }\n\n #cleanupStaleTrackedOptions() {\n const currentOptions = new Set(this.#options);\n for (const tracked of this.#trackedOptions) {\n if (!currentOptions.has(tracked)) {\n this.#trackedOptions.delete(tracked);\n }\n }\n }\n\n #openDropdown() {\n this.#dropdown!.hidden = false;\n }\n\n #closeDropdown() {\n this.#dropdown!.hidden = true;\n this._internals.states.delete('dirty');\n this.#validateSingleSelectValue();\n }\n\n #setupAutoCompleteKeyEvents() {\n this.addEventListener('keydown', (e: KeyboardEvent) => {\n const value = this.input.value.trim();\n\n if (e.code === 'Tab') {\n if (this.#hasAvailableOptions && this.#dropdown!.matches(':popover-open') && value !== '') {\n e.preventDefault();\n // the menu item option property caches/stores the option value instead of value to prevent unnecessary lit lifecycle updates for each menu item\n this.#setInputValue((this.#items[0] as MenuItem & { option: string }).option);\n this.#setSelectValue(\n this.#options.find(\n o => (o.label ? o.label : o.value) === (this.#items[0] as MenuItem & { option: string }).option\n )!\n );\n }\n this.#dropdown!.hidePopover();\n }\n\n if (e.code === 'Enter' && this.behaviorCreate && !this.input.disabled && value) {\n const match = this.#findOptionMatch(value);\n if (match) {\n this.#selectValue(match);\n } else {\n e.preventDefault();\n e.stopImmediatePropagation();\n this.#dispatchCreate();\n }\n }\n });\n }\n\n #setupMenuItemUpdateEvents() {\n this.input.addEventListener('input', () => this.#filterOptions());\n this.shadowRoot!.addEventListener('slotchange', () => this.#filterOptions());\n }\n\n async #setupLightDismiss() {\n const dropdown = this.#dropdown!;\n await dropdown.updateComplete;\n const options = {\n element: dropdown.shadowRoot!.querySelector<HTMLElement>('[internal-host]')!,\n focusElement: this.input\n };\n createLightDismiss(options, () => {\n if (this.#dropdown!.matches(':popover-open')) {\n this.#dropdown!.hidePopover();\n }\n });\n }\n\n #setupOpenKeyEvents() {\n this.#tags?.addEventListener('pointerup', () => {\n if (this.tagLayout !== 'wrap') return;\n this.input.focus();\n setTimeout(() => this.#openListBox(), 0);\n });\n\n this.input.addEventListener('pointerdown', () => {\n this.#openListBox();\n });\n\n this.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.code !== 'Tab' && e.code !== 'Escape') {\n this.#openListBox();\n }\n\n if (e?.code === 'ArrowDown' && (this.getRootNode() as ShadowRoot).activeElement === this.input) {\n this.#dropdown!.tabIndex = 0;\n this.#items[0]?.focus();\n e.preventDefault();\n }\n });\n }\n\n #selectValue(option: { selected?: boolean; label?: string; value?: string }) {\n if (!this.#select?.multiple) {\n this.#setInputValue(getDisplayValue(option));\n this.#dropdown!.hidePopover();\n focusElementTimeout(this.input);\n }\n\n if (this.#select) {\n option.selected = !option.selected;\n this.#setSelectValue(option);\n }\n\n this.requestUpdate();\n }\n\n #onCreateItemClick() {\n this.#dispatchCreate();\n }\n\n #dispatchCreate() {\n const value = this.input.value.trim();\n if (value) {\n this.dispatchEvent(new CustomEvent('create', { detail: { value }, bubbles: true, composed: true }));\n this.input.value = '';\n this.#dropdown!.hidePopover();\n focusElementTimeout(this.input);\n this.requestUpdate();\n }\n }\n\n #characterAtIndexMatches(character: string, index: number) {\n if (this.#hasAvailableOptions) {\n return this.input.value.toLowerCase()[index]?.toLowerCase() === character.toLowerCase();\n }\n return false;\n }\n\n #filterOptions() {\n this.#options.forEach(option => {\n const hasLabel = option.textContent!.trim().length;\n if (hasLabel) {\n const matchesLabel = option.textContent!.toLocaleLowerCase().includes(this.input?.value.toLowerCase());\n option.hidden = !matchesLabel;\n } else {\n const matchesValue = option.value.toLocaleLowerCase().includes(this.input?.value.toLowerCase());\n option.hidden = !matchesValue;\n }\n });\n this.requestUpdate();\n }\n\n #openListBox() {\n if (!this.input.disabled && !this.#dropdown!.matches(':popover-open')) {\n if (this.#select) {\n this.#options.forEach(option => (option.hidden = false));\n this.requestUpdate();\n } else {\n this.#filterOptions();\n }\n this.#dropdown!.style.setProperty('--min-width', `${this.#input!.getBoundingClientRect().width}px`);\n // explicitly provide source as the performance optimizations in the suffixContent getter prevent the dropdown from setting its anchor/trigger reliably\n this.#dropdown!.showPopover({ source: this.#input as HTMLElement });\n this.#dropdown!.tabIndex = -1;\n }\n }\n\n #validateSingleSelectValue() {\n const invalidInputValue =\n this.#select &&\n !this.#select.multiple &&\n !this.#options.filter(o => !(o.value === '' && o.disabled)).find(o => getDisplayValue(o) === this.input.value);\n if (invalidInputValue) {\n this.#options.forEach(o => (o.selected = false));\n this.#setInputValue('');\n this.#setSelectValue({ value: '', selected: false });\n }\n }\n\n #setInputValue(value: string) {\n this.input.value = value;\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n #setSelectValue(option: { value?: string; selected?: boolean }) {\n const found = [...this.#options, { value: '', selected: null as boolean | null }].find(\n o => o.value === option.value\n );\n if (found) found.selected = option.selected ?? null;\n\n if (this.#select && !this.#select.multiple) {\n this.#select.value = option.value!;\n }\n\n this.#select?.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select?.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n #setupOverflowListener() {\n if (this.#select?.multiple && !this.#tagLayoutIsHidden) {\n if (this.#select.selectedOptions.length > 1) {\n // only calculate initial overflow if many tags exist\n this.#updateMultipleOverflow(this.#tags!.getBoundingClientRect().width);\n }\n const observer = new ResizeObserver(entries => this.#updateMultipleOverflow(entries[0]!.contentRect.width));\n this.#observers.push(observer);\n observer.observe(this.#tags!);\n }\n }\n\n #updateMultipleOverflow(tagWidth: number) {\n const INPUT_MIN_WIDTH = 100;\n if (this.#select?.multiple && tagWidth > this.#input!.getBoundingClientRect().width - INPUT_MIN_WIDTH) {\n this._internals.states.add('multiple-overflow');\n } else {\n this._internals.states.delete('multiple-overflow');\n }\n }\n\n #setupSlotStates() {\n this.#setSlotStates();\n this.shadowRoot!.addEventListener('slotchange', () => this.#setSlotStates());\n }\n\n #setSlotStates() {\n if (this.#hasFooterContent) {\n this._internals.states.add('footer-content');\n } else {\n this._internals.states.delete('footer-content');\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6DO,IAAA,IAAA,cAAuB,EAAoC;;yBAwGZ,CAAC,aACtC,8BAEgB,8BA+Kb,IAAI,IAAuB;;;gBA7Q7B,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;kBAEvC;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B;IACzB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAI,SAAS,MAAM;EACtB;;CAOA;CACA,IAAIA,KAAsC;EAUxC,OATA,AACE,KAAKC,OAAa,KAAK,aACjB,KAAK,WACJ,cAAc,MAAM,CAAC,EACpB,iBAAiB,EAAE,SAAS,GAAK,CAAC,CAAC,EACnC,MAAK,MAAK,EAAE,YAAY,cAAc,EAAE,YAAY,QAAQ,KAC9D,KAAK,cAAc,kBAAkB,IACvC,MAEC,KAAKA;CACd;CAEA;CACA,IAAIC,KAAoC;EAStC,OARA,AACE,KAAKC,OAAW,KAAK,aACf,KAAK,WACJ,cAAc,MAAM,CAAC,EACpB,iBAAiB,EAAE,SAAS,GAAK,CAAC,CAAC,EACnC,MAAK,MAAK,EAAE,YAAY,QAAQ,KAAK,KAAK,cAAc,QAAQ,IACpE,MAEC,KAAKA;CACd;CAEA,IAAIC,KAAgC;EAClC,OAAO,MAAM,KAAK,KAAKJ,IAAW,UAAU,KAAKA,GAAU,UAAU,CAAC,CAAC;CACzE;CAEA,IAAIK,KAAS;EACX,OAAO,MAAM,KAAK,KAAK,WAAY,iBAA2B,EA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,OAAO,mBAAmB;CAErD;CAEA,KAAmB;EAEjB,AADA,KAAKuC,GAAe,GACpB,KAAK,WAAY,iBAAiB,oBAAoB,KAAKA,GAAe,CAAC;CAC7E;CAEA,KAAiB;EACf,AAAI,KAAKpC,KACP,KAAK,WAAW,OAAO,IAAI,gBAAgB,IAE3C,KAAK,WAAW,OAAO,OAAO,gBAAgB;CAElD;AACF;GA3gBG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAGxC,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAGjE,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAkB,CAAC,CAAA,GAAA,EAAA,WAAA,kBAAA,KAAA,CAAA,UAZzE,EAAe,CAAA,GAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"combobox2.js","names":[],"sources":["../../src/combobox/combobox.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, isServer, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { ContainerElement } from '@nvidia-elements/core/internal';\nimport {\n createLightDismiss,\n focusElementTimeout,\n getDisplayValue,\n getElementUpdate,\n getPropertyChanges,\n scopedRegistry,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Dropdown } from '@nvidia-elements/core/dropdown';\nimport { Tag } from '@nvidia-elements/core/tag';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Checkbox } from '@nvidia-elements/core/checkbox';\nimport styles from './combobox.css?inline';\n\n/**\n * @element nve-combobox\n * @description An editable combobox with autocomplete behavior and selection support.\n * @documentation https://nvidia.github.io/elements/docs/elements/combobox/\n * @since 0.17.0\n * @entrypoint \\@nvidia-elements/core/combobox\n * @slot - default slot for an input and a datalist/select element\n * @slot prefix-icon - slot for icon before the input\n * @slot footer - slot for dropdown footer content\n * @cssprop --scroll-height\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --width\n * @cssprop --border-color\n * @cssprop --max-height\n * @cssprop --text-transform\n * @csspart tag - The tag element for selected items\n * @csspart dropdown - The dropdown popup element\n * @csspart menu - The menu element\n * @csspart menu-item - The menu item elements\n * @csspart checkbox - The checkbox element\n * @csspart icon - The icon element\n * @event scroll - Fires when the user scrolls the dropdown option list. Throttled to one dispatch per animation frame. `detail: { scrollTop, scrollHeight, clientHeight }`.\n * @event create - Fires when the user confirms a value that doesn't match any existing option and the `behavior-create` attribute exists. `detail: { value }`.\n * @csspart create-option - The menu item element for creating new options\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-list/\n */\n@scopedRegistry()\nexport class Combobox extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container: 'flat';\n\n /** Manage inline tag rendering for many-item select */\n @property({ type: String, reflect: true, attribute: 'tag-layout' }) tagLayout: 'hidden' | 'wrap';\n\n /** Enable creation of new options when the input value doesn't match any existing option. Dispatches a `create` event with `{ value }` detail. */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-create' }) behaviorCreate: boolean;\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-combobox',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Checkbox.metadata.tag]: Checkbox,\n [Icon.metadata.tag]: Icon,\n [Dropdown.metadata.tag]: Dropdown,\n [Menu.metadata.tag]: Menu,\n [MenuItem.metadata.tag]: MenuItem,\n [Tag.metadata.tag]: Tag\n };\n\n /**\n * If a <select> exists, on focus all options show by default.\n * If a <datalist> exists, on focus only options that match the current input value show.\n */\n\n #_datalist: HTMLSelectElement | null;\n get #datalist(): HTMLSelectElement | null {\n if (!this.#_datalist) {\n this.#_datalist = this.shadowRoot\n ? ((this.shadowRoot\n .querySelector('slot')\n ?.assignedElements({ flatten: true })\n ?.find(i => i.tagName === 'DATALIST' || i.tagName === 'SELECT') ??\n this.querySelector('datalist, select')) as HTMLSelectElement)\n : null;\n }\n return this.#_datalist;\n }\n\n #_select: HTMLSelectElement | null;\n get #select(): HTMLSelectElement | null {\n if (!this.#_select) {\n this.#_select = this.shadowRoot\n ? ((this.shadowRoot\n .querySelector('slot')\n ?.assignedElements({ flatten: true })\n ?.find(i => i.tagName === 'SELECT') ?? this.querySelector('select')) as HTMLSelectElement)\n : null;\n }\n return this.#_select;\n }\n\n get #options(): HTMLOptionElement[] {\n return Array.from(this.#datalist?.options ? this.#datalist.options : []);\n }\n\n get #items() {\n return Array.from(this.shadowRoot!.querySelectorAll<MenuItem>(MenuItem.metadata.tag));\n }\n\n get #dropdown() {\n return this.shadowRoot!.querySelector<Dropdown>(Dropdown.metadata.tag);\n }\n\n get #input() {\n return this.shadowRoot!.querySelector('[input]');\n }\n\n get #tags() {\n return this.shadowRoot!.querySelector('.tags');\n }\n\n get #hasAvailableOptions() {\n return this.#options.find(o => !o.disabled && !o.hidden);\n }\n\n get #hasFooterContent() {\n return !!this.querySelector('[slot=\"footer\"]');\n }\n\n get #showCreateItem(): boolean {\n if (!this.behaviorCreate || this.input?.disabled) return false;\n const value = this.input?.value.trim();\n if (!value) return false;\n return !this.#findOptionMatch(value);\n }\n\n #findOptionMatch(value: string): HTMLOptionElement | undefined {\n const lower = value.toLowerCase();\n return this.#options.find(o => {\n const display = o.textContent!.trim() || o.value;\n return display.toLowerCase() === lower || o.value.toLowerCase() === lower;\n });\n }\n\n #observers: (MutationObserver | ResizeObserver)[] = [];\n #syncPending = false;\n\n protected _associateDatalist = false;\n\n protected get prefixContent() {\n return this.#select?.multiple && !this.#tagLayoutIsHidden\n ? html`\n <div class=\"tags-label\" aria-hidden=\"true\">${this.#select.selectedOptions.length} ${this.i18n.selected}</div>\n <div class=\"tags\">\n ${Array.from<HTMLOptionElement>(this.#select.selectedOptions).map(\n o => html`\n <nve-tag part=\"tag\" readonly color=\"gray-slate\" closable .value=${o.value} @click=${() => this.#selectValue(o)}>${getDisplayValue(o)}</nve-tag>`\n )}\n </div>`\n : html`<slot name=\"prefix-icon\"></slot>`;\n }\n\n get #tagLayoutIsHidden() {\n return this.tagLayout === 'hidden';\n }\n\n get #largeOptionsList() {\n return (this.#datalist?.options?.length ?? 0) > 50;\n }\n\n get #isPristine() {\n return !this._internals.states.has('dirty');\n }\n\n protected get suffixContent() {\n if (isServer) return nothing;\n const options = this.#options;\n const largeOptionsList = this.#largeOptionsList;\n const isPristine = this.#isPristine;\n const visibleOptions = options.filter(o => !o.hidden).filter(o => !(o.value === '' && o.disabled));\n const hasNoResults = visibleOptions.filter(o => !o.disabled).length === 0;\n const showCreateItem = this.#showCreateItem;\n return html`\n <nve-dropdown part=\"dropdown\" .popoverType=${'manual'} .modal=${false} @open=${this.#openDropdown} @close=${this.#closeDropdown} hidden .anchor=${this.#input as HTMLElement} position=\"bottom\">\n <nve-menu part=\"menu\" role=\"listbox\" style=\"--width: 100%; --min-width: fit-content\" aria-label=${ifDefined(this.i18n.select)}>\n ${visibleOptions.map(\n o => html`\n <nve-menu-item part=\"menu-item\" .option=${getDisplayValue(o)} role=\"option\" @click=${() => this.#selectValue(o)} ?selected=${o.selected} aria-selected=${o.selected ? 'true' : 'false'} ?disabled=${o.disabled} aria-label=${getDisplayValue(o)}>\n ${this.#getOptionCheckbox(o)}\n ${largeOptionsList || isPristine ? getDisplayValue(o) : html`<span role=\"presentation\">${(o.label ? o.label : o.value)?.split('')?.map((c, ci) => html`<span ?matches=${this.#characterAtIndexMatches(c, ci)}>${c}</span>`)}</span>`}\n </nve-menu-item>`\n )}\n ${hasNoResults && !showCreateItem ? html`<nve-menu-item part=\"menu-item\" .value=${''} disabled>${this.i18n.noResults}</nve-menu-item>` : nothing}\n ${\n showCreateItem\n ? html`<nve-menu-item part=\"create-option\" role=\"button\" aria-label=${`${this.i18n.create} \"${this.input?.value.trim()}\"`} @click=${this.#onCreateItemClick}>\n <nve-icon part=\"icon\" name=\"add\" size=\"sm\"></nve-icon> \"${this.input?.value.trim()}\"\n </nve-menu-item>`\n : nothing\n }\n </nve-menu>\n <slot name=\"footer\"></slot>\n </nve-dropdown>`;\n }\n\n #getOptionCheckbox(o: HTMLOptionElement) {\n const select = this.#select;\n if (select?.multiple && this.#largeOptionsList) {\n return html`<input aria-hidden=\"true\" type=\"checkbox\" .checked=${o.selected} .disabled=${o.disabled} .name=${o.selected ? 'check' : undefined} />`;\n } else if (select?.multiple) {\n /* eslint-disable @nvidia-elements/lint/no-missing-control-label */\n return html`<nve-checkbox part=\"checkbox\"><input aria-hidden=\"true\" type=\"checkbox\" .checked=${o.selected} .disabled=${o.disabled} .name=${o.selected ? 'check' : undefined} /></nve-checkbox>`;\n } else if (select) {\n return html`<nve-icon part=\"icon\" name=\"check\" size=\"sm\"></nve-icon>`;\n } else {\n return nothing;\n }\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n this.shadowRoot!.addEventListener('slotchange', () => {\n this.#_datalist = null;\n this.#_select = null;\n this.#onSlottedChildMutation();\n });\n await this.updateComplete;\n this.#setupSingleSelect();\n this.#setupMultipleSelect();\n this.#setupAutoCompleteKeyEvents();\n this.#setupMenuItemUpdateEvents();\n this.#setupOpenKeyEvents();\n this.#setupOverflowListener();\n this.#setupSlotStates();\n await this.#setupLightDismiss();\n this.input.setAttribute('list', '');\n this.input.autocomplete = 'off';\n }\n\n connectedCallback() {\n super.connectedCallback();\n const observer = new MutationObserver(mutations => {\n if (mutations.some(m => m.type === 'childList' && m.target === this)) {\n this.#_datalist = null;\n this.#_select = null;\n }\n this.#onSlottedChildMutation();\n });\n observer.observe(this, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['selected', 'disabled', 'value'],\n characterData: true\n });\n this.#observers.push(observer);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.#observers.forEach(observer => observer.disconnect());\n }\n\n reset() {\n this.#dropdown!.hidePopover();\n if (this.#select) {\n this.#select.selectedIndex = -1;\n }\n super.reset();\n }\n\n /** Select all options provided */\n selectAll() {\n this.#options.forEach(o => (o.selected = true));\n this.requestUpdate();\n this.#select!.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select!.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n #setupSingleSelect() {\n if (this.#select && !this.#select.multiple) {\n this.#setupInitialValue();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n }\n }\n\n #setupMultipleSelect() {\n if (this.#select?.multiple) {\n this.#setupInitialValue();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n this._internals.states.add('multiple');\n }\n }\n\n #setupInitialValue() {\n const selected = Array.from(this.#select!.selectedOptions).find((o: HTMLOptionElement) =>\n o.hasAttribute('selected')\n );\n if (selected && !this.#select!.multiple && !this.input.defaultValue) {\n this.input.value = getDisplayValue(selected);\n }\n }\n\n #updateInputValue() {\n if (!this.#select!.multiple && !this.input.defaultValue) {\n this.input.value = getDisplayValue(\n Array.from(this.#select!.selectedOptions).find(o => o.value === this.#select!.value)!\n );\n }\n }\n\n #syncSelectValueStates() {\n this.#observers.push(\n getElementUpdate(this.#select!, 'value', () => {\n this.#updateInputValue();\n this.requestUpdate();\n })\n );\n }\n\n #trackedOptions = new Set<HTMLOptionElement>();\n #syncOptionSelectedStates() {\n this.#options.forEach(o => {\n if (!this.#trackedOptions.has(o)) {\n this.#trackedOptions.add(o);\n getPropertyChanges(o, 'selected', () => this.requestUpdate());\n }\n });\n }\n\n #onSlottedChildMutation() {\n if (!this.#syncPending) {\n this.#syncPending = true;\n queueMicrotask(() => {\n this.#syncPending = false;\n this.#cleanupStaleTrackedOptions();\n this.#syncOptionSelectedStates();\n this.requestUpdate();\n });\n }\n }\n\n #cleanupStaleTrackedOptions() {\n const currentOptions = new Set(this.#options);\n for (const tracked of this.#trackedOptions) {\n if (!currentOptions.has(tracked)) {\n this.#trackedOptions.delete(tracked);\n }\n }\n }\n\n #openDropdown() {\n this.#dropdown!.hidden = false;\n }\n\n #closeDropdown() {\n this.#dropdown!.hidden = true;\n this._internals.states.delete('dirty');\n this.#validateSingleSelectValue();\n }\n\n #setupAutoCompleteKeyEvents() {\n this.addEventListener('keydown', (e: KeyboardEvent) => {\n const value = this.input.value.trim();\n\n if (e.code === 'Tab') {\n if (this.#hasAvailableOptions && this.#dropdown!.matches(':popover-open') && value !== '') {\n e.preventDefault();\n // the menu item option property caches/stores the option value instead of value to prevent unnecessary lit lifecycle updates for each menu item\n this.#setInputValue((this.#items[0] as MenuItem & { option: string }).option);\n this.#setSelectValue(\n this.#options.find(\n o => (o.label ? o.label : o.value) === (this.#items[0] as MenuItem & { option: string }).option\n )!\n );\n }\n this.#dropdown!.hidePopover();\n }\n\n if (e.code === 'Enter' && this.behaviorCreate && !this.input.disabled && value) {\n const match = this.#findOptionMatch(value);\n if (match) {\n this.#selectValue(match);\n } else {\n e.preventDefault();\n e.stopImmediatePropagation();\n this.#dispatchCreate();\n }\n }\n });\n }\n\n #setupMenuItemUpdateEvents() {\n this.input.addEventListener('input', () => this.#filterOptions());\n this.shadowRoot!.addEventListener('slotchange', () => this.#filterOptions());\n }\n\n async #setupLightDismiss() {\n const dropdown = this.#dropdown!;\n await dropdown.updateComplete;\n const options = {\n element: dropdown.shadowRoot!.querySelector<HTMLElement>('[internal-host]')!,\n focusElement: this.input\n };\n createLightDismiss(options, () => {\n if (this.#dropdown!.matches(':popover-open')) {\n this.#dropdown!.hidePopover();\n }\n });\n }\n\n #setupOpenKeyEvents() {\n this.#tags?.addEventListener('pointerup', () => {\n if (this.tagLayout !== 'wrap') return;\n this.input.focus();\n setTimeout(() => this.#openListBox(), 0);\n });\n\n this.input.addEventListener('pointerdown', () => {\n this.#openListBox();\n });\n\n this.addEventListener('keydown', (e: KeyboardEvent) => {\n if (e.code !== 'Tab' && e.code !== 'Escape') {\n this.#openListBox();\n }\n\n if (e?.code === 'ArrowDown' && (this.getRootNode() as ShadowRoot).activeElement === this.input) {\n this.#dropdown!.tabIndex = 0;\n this.#items[0]?.focus();\n e.preventDefault();\n }\n });\n }\n\n #selectValue(option: { selected?: boolean; label?: string; value?: string }) {\n if (!this.#select?.multiple) {\n this.#setInputValue(getDisplayValue(option));\n this.#dropdown!.hidePopover();\n focusElementTimeout(this.input);\n }\n\n if (this.#select) {\n option.selected = !option.selected;\n this.#setSelectValue(option);\n }\n\n this.requestUpdate();\n }\n\n #onCreateItemClick() {\n this.#dispatchCreate();\n }\n\n #dispatchCreate() {\n const value = this.input.value.trim();\n if (value) {\n this.dispatchEvent(new CustomEvent('create', { detail: { value }, bubbles: true, composed: true }));\n this.input.value = '';\n this.#dropdown!.hidePopover();\n focusElementTimeout(this.input);\n this.requestUpdate();\n }\n }\n\n #characterAtIndexMatches(character: string, index: number) {\n if (this.#hasAvailableOptions) {\n return this.input.value.toLowerCase()[index]?.toLowerCase() === character.toLowerCase();\n }\n return false;\n }\n\n #filterOptions() {\n this.#options.forEach(option => {\n const hasLabel = option.textContent!.trim().length;\n if (hasLabel) {\n const matchesLabel = option.textContent!.toLocaleLowerCase().includes(this.input?.value.toLowerCase());\n option.hidden = !matchesLabel;\n } else {\n const matchesValue = option.value.toLocaleLowerCase().includes(this.input?.value.toLowerCase());\n option.hidden = !matchesValue;\n }\n });\n this.requestUpdate();\n }\n\n #openListBox() {\n if (!this.input.disabled && !this.#dropdown!.matches(':popover-open')) {\n if (this.#select) {\n this.#options.forEach(option => (option.hidden = false));\n this.requestUpdate();\n } else {\n this.#filterOptions();\n }\n this.#dropdown!.style.setProperty('--min-width', `${this.#input!.getBoundingClientRect().width}px`);\n // explicitly provide source as the performance optimizations in the suffixContent getter prevent the dropdown from setting its anchor/trigger reliably\n this.#dropdown!.showPopover({ source: this.#input as HTMLElement });\n this.#dropdown!.tabIndex = -1;\n }\n }\n\n #validateSingleSelectValue() {\n const invalidInputValue =\n this.#select &&\n !this.#select.multiple &&\n !this.#options.filter(o => !(o.value === '' && o.disabled)).find(o => getDisplayValue(o) === this.input.value);\n if (invalidInputValue) {\n this.#options.forEach(o => (o.selected = false));\n this.#setInputValue('');\n this.#setSelectValue({ value: '', selected: false });\n }\n }\n\n #setInputValue(value: string) {\n this.input.value = value;\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n #setSelectValue(option: { value?: string; selected?: boolean }) {\n const found = [...this.#options, { value: '', selected: null as boolean | null }].find(\n o => o.value === option.value\n );\n if (found) found.selected = option.selected ?? null;\n\n if (this.#select && !this.#select.multiple) {\n this.#select.value = option.value!;\n }\n\n this.#select?.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select?.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n #setupOverflowListener() {\n if (this.#select?.multiple && !this.#tagLayoutIsHidden) {\n if (this.#select.selectedOptions.length > 1) {\n // only calculate initial overflow if many tags exist\n this.#updateMultipleOverflow(this.#tags!.getBoundingClientRect().width);\n }\n const observer = new ResizeObserver(entries => this.#updateMultipleOverflow(entries[0]!.contentRect.width));\n this.#observers.push(observer);\n observer.observe(this.#tags!);\n }\n }\n\n #updateMultipleOverflow(tagWidth: number) {\n const INPUT_MIN_WIDTH = 100;\n if (this.#select?.multiple && tagWidth > this.#input!.getBoundingClientRect().width - INPUT_MIN_WIDTH) {\n this._internals.states.add('multiple-overflow');\n } else {\n this._internals.states.delete('multiple-overflow');\n }\n }\n\n #setupSlotStates() {\n this.#setSlotStates();\n this.shadowRoot!.addEventListener('slotchange', () => this.#setSlotStates());\n }\n\n #setSlotStates() {\n if (this.#hasFooterContent) {\n this._internals.states.add('footer-content');\n } else {\n this._internals.states.delete('footer-content');\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6DO,IAAM,IAAN,cAAuB,EAAoC;;EA0R9C,aAlLkC,KAAA,KAAA,CAAC,GACtC,KAAA,KAAA,IAEgB,KAAA,qBAAA,IA+Kb,KAAA,qBAAA,IAAI,IAAuB;;;EA7Q7B,KAAA,SAAA,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;EAEvC,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA;IACzB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAI,SAAS,MAAM;EACtB;;CAOA;CACA,IAAI,KAAsC;EAUxC,OATA,AACE,KAAK,OAAa,KAAK,aACjB,KAAK,WACJ,cAAc,MAAM,CAAC,EACpB,iBAAiB,EAAE,SAAS,GAAK,CAAC,CAAC,EACnC,MAAK,MAAK,EAAE,YAAY,cAAc,EAAE,YAAY,QAAQ,KAC9D,KAAK,cAAc,kBAAkB,IACvC,MAEC,KAAK;CACd;CAEA;CACA,IAAI,KAAoC;EAStC,OARA,AACE,KAAK,OAAW,KAAK,aACf,KAAK,WACJ,cAAc,MAAM,CAAC,EACpB,iBAAiB,EAAE,SAAS,GAAK,CAAC,CAAC,EACnC,MAAK,MAAK,EAAE,YAAY,QAAQ,KAAK,KAAK,cAAc,QAAQ,IACpE,MAEC,KAAK;CACd;CAEA,IAAI,KAAgC;EAClC,OAAO,MAAM,KAAK,KAAK,IAAW,UAAU,KAAK,GAAU,UAAU,CAAC,CAAC;CACzE;CAEA,IAAI,KAAS;EACX,OAAO,MAAM,KAAK,K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,gBAAgB;CAElD;AACF;AA3gBG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAGxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;CAAM,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAGjE,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAkB,CAAC,CAAA,GAAA,EAAA,WAAA,kBAAA,KAAA,CAAA,GAZzE,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I18nController as e } from "../internal/controllers/i18n.controller.js";
|
|
2
2
|
import { scopedRegistry as t } from "../internal/decorators/scoped-registry.js";
|
|
3
3
|
import { useStyles as n } from "../internal/styles/index.js";
|
|
4
|
-
import r from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
5
5
|
import { Icon as i } from "../icon/icon2.js";
|
|
6
6
|
import { Button as a } from "../button/button2.js";
|
|
7
7
|
import { Tooltip as o } from "../tooltip/tooltip2.js";
|
|
@@ -32,7 +32,7 @@ var p = class extends a {
|
|
|
32
32
|
static {
|
|
33
33
|
this.metadata = {
|
|
34
34
|
tag: "nve-copy-button",
|
|
35
|
-
version: "2.
|
|
35
|
+
version: "2.8.0"
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-button2.js","names":[
|
|
1
|
+
{"version":3,"file":"copy-button2.js","names":[],"sources":["../../src/copy-button/copy-button.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { state } from 'lit/decorators/state.js';\nimport { useStyles, I18nController, scopedRegistry } from '@nvidia-elements/core/internal';\nimport { Button } from '@nvidia-elements/core/button';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Toast } from '@nvidia-elements/core/toast';\nimport { Tooltip } from '@nvidia-elements/core/tooltip';\nimport styles from './copy-button.css?inline';\n\n/**\n * @element nve-copy-button\n * @description A copy button is a button that easily enables the copy to clipboard pattern.\n * @documentation https://nvidia.github.io/elements/docs/elements/copy-button/\n * @since 1.1.4\n * @entrypoint \\@nvidia-elements/core/copy-button\n * @slot - Text label displayed before the copy icon.\n * @slot icon - slot for custom icon\n * @cssprop --color\n * @cssprop --background\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --height\n * @cssprop --min-width\n * @cssprop --font-size\n * @cssprop --line-height\n * @csspart icon - The icon element\n * @csspart toast - The toast notification element\n * @csspart tooltip - The tooltip element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/button/\n *\n */\n@scopedRegistry()\nexport class CopyButton extends Button {\n @state() private copied = false;\n\n @state() private showToast = false;\n\n @state() private showTooltip = false;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables internal string values to update for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n /**\n * Determines if the copy button should auto write to clipboard by the trigger.\n */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-copy' }) behaviorCopy: boolean;\n\n /**\n * Defines the value that copies to the user clipboard. Use `aria-label` to set the tooltip hint.\n */\n @property({ type: String }) value: string;\n\n static styles = useStyles([...Button.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-copy-button',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon,\n [Toast.metadata.tag]: Toast,\n [Tooltip.metadata.tag]: Tooltip\n };\n\n render() {\n return html`\n <div id=\"btn\" internal-host interaction-state focus-within>\n <slot></slot>\n ${\n this.copied\n ? html`<nve-icon part=\"icon\" name=\"check\" status=\"success\" .size=${this.size} aria-hidden=\"true\"></nve-icon>`\n : html`<slot name=\"icon\"><nve-icon part=\"icon\" name=\"copy\" .size=${this.size} aria-hidden=\"true\"></nve-icon></slot>`\n }\n </div>\n ${this.showToast ? html`<nve-toast part=\"toast\" @close=${this.#close} status=\"success\" anchor=\"btn\" position=\"top\" close-timeout=\"1500\">${this.i18n.copied}</nve-toast>` : nothing}\n ${this.showTooltip && !this.showToast ? html`<nve-tooltip part=\"tooltip\" exportparts=\"arrow:tooltip-arrow\" anchor=\"btn\">${this.ariaLabel ?? this.i18n.copy}</nve-tooltip>` : nothing}\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.#copy);\n this.addEventListener('mouseenter', this.#openTooltip);\n this.addEventListener('mouseleave', this.#closeTooltip);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('click', this.#copy);\n this.removeEventListener('mouseenter', this.#openTooltip);\n this.removeEventListener('mouseleave', this.#closeTooltip);\n }\n\n #copy = () => {\n if (this.behaviorCopy) {\n navigator.clipboard\n .writeText(this.value)\n .then(() => {\n this.showToast = true;\n this.copied = true;\n })\n .catch(err => {\n this.showToast = false;\n console.error(err);\n });\n }\n };\n\n #close() {\n this.showToast = false;\n this.copied = false;\n this.showTooltip = false;\n }\n\n #openTooltip = () => {\n this.showTooltip = true;\n };\n\n #closeTooltip = () => {\n this.showTooltip = false;\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAoCO,IAAM,IAAN,cAAyB,EAAO;;EA2Ff,aA1FI,KAAA,SAAA,IAEG,KAAA,YAAA,IAEE,KAAA,cAAA,IAES,KAAA,KAAA,IAAI,EAAqB,IAAI,GAKlC,KAAA,OAAA,KAAK,GAAgB,MAsD1C,KAAA,WAAA;GACZ,AAAI,KAAK,gBACP,UAAU,UACP,UAAU,KAAK,KAAK,CAAC,CACrB,WAAW;IAEV,AADA,KAAK,YAAY,IACj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N,EAAA,CAAA,EAAM,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAEN,EAAA,CAAA,EAAM,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,GAON,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAgB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,GAKrE,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,GAvB3B,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -6328,6 +6328,8 @@ export type CustomElements = {
|
|
|
6328
6328
|
*
|
|
6329
6329
|
* ### **Slots:**
|
|
6330
6330
|
* - _default_ - Text or other content that identifies the category or group.
|
|
6331
|
+
* - **prefix** - Optional prefix content, such as a status nve-icon.
|
|
6332
|
+
* - **suffix** - Optional suffix content, such as a nve-dot counter.
|
|
6331
6333
|
*
|
|
6332
6334
|
* ### **CSS Properties:**
|
|
6333
6335
|
* - **--background** - undefined _(default: undefined)_
|
|
@@ -6086,6 +6086,8 @@ export type CustomElements = {
|
|
|
6086
6086
|
*
|
|
6087
6087
|
* ### **Slots:**
|
|
6088
6088
|
* - _default_ - Text or other content that identifies the category or group.
|
|
6089
|
+
* - **prefix** - Optional prefix content, such as a status nve-icon.
|
|
6090
|
+
* - **suffix** - Optional suffix content, such as a nve-dot counter.
|
|
6089
6091
|
*
|
|
6090
6092
|
* ### **CSS Properties:**
|
|
6091
6093
|
* - **--background** - undefined _(default: undefined)_
|
|
@@ -46420,6 +46420,14 @@
|
|
|
46420
46420
|
{
|
|
46421
46421
|
"description": "Text or other content that identifies the category or group.",
|
|
46422
46422
|
"name": ""
|
|
46423
|
+
},
|
|
46424
|
+
{
|
|
46425
|
+
"description": "Optional prefix content, such as a status nve-icon.",
|
|
46426
|
+
"name": "prefix"
|
|
46427
|
+
},
|
|
46428
|
+
{
|
|
46429
|
+
"description": "Optional suffix content, such as a nve-dot counter.",
|
|
46430
|
+
"name": "suffix"
|
|
46423
46431
|
}
|
|
46424
46432
|
],
|
|
46425
46433
|
"members": [
|
|
@@ -47381,7 +47389,7 @@
|
|
|
47381
47389
|
"since": "0.10.0",
|
|
47382
47390
|
"status": "stable",
|
|
47383
47391
|
"behavior": "button",
|
|
47384
|
-
"markdown": "## nve-tag\n\nA interactive element that represents a category or group of content. Typically used to filter or organize content for one to many relations.\n\n### Example\n\n```html\n<nve-tag>topic-tag</nve-tag>\n```\n\n### Import\n\n```javascript\nimport '@nvidia-elements/core/tag/define.js';\n```\n\n### Slots\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| (default) | `string` | Text or other content that identifies the category or group. |\n\n### Properties / Attributes\n\n| property (attribute) | value | description |\n| -------------------- | ----- | ----------- |\n| closable | `boolean` | Indicates whether the user can dismiss or close the element. - `true` The element displays a close control and the user can dismiss it. - `false` The user cannot close the element and must dismiss it programmatically. |\n| color | `'red-cardinal' \\| 'gray-slate' \\| 'gray-denim' \\| 'blue-indigo' \\| 'blue-cobalt' \\| 'blue-sky' \\| 'teal-cyan' \\| 'green-mint' \\| 'teal-seafoam' \\| 'green-grass' \\| 'yellow-amber' \\| 'orange-pumpkin' \\| 'red-tomato' \\| 'pink-magenta' \\| 'purple-plum' \\| 'purple-violet' \\| 'purple-lavender' \\| 'pink-rose' \\| 'green-jade' \\| 'lime-pear' \\| 'yellow-nova' \\| 'brand-green'` | Defines a base color from the theme color palette |\n| prominence | `'emphasis' \\| undefined` | Determines the visual prominence or weight |\n| i18n | | Updates internal string values for internationalization. |\n| type | `'button' \\| 'submit' \\| 'reset'` | Defines the button behavior when associated within a form element. https://mdn.dev/HTML/Element/button#attr-type |\n| pressed | `boolean` | Indicates the current state of a toggle button that switches on or off. [MDN](https://mdn.dev/ARIA/Attributes/aria-pressed) - `true` The button is in the pressed (on) state and the associated action or setting is active. - `false` The button is in the unpressed (off) state and the associated action or setting is inactive. |\n| expanded | `boolean` | Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://mdn.dev/ARIA/Attributes/aria-expanded) - `true` The associated content expands and becomes visible to the user. - `false` The associated content collapses and hides from the user. |\n| readOnly (readonly) | `boolean` | Indicates whether the element is a noninteractive visual treatment instead of a button. https://mdn.dev/HTML/Attributes/readonly |\n| form | property: `string \\| HTMLFormElement \\| null`; attribute: `string` | Associates the button with a form. Set the property to a form element or its ID. The HTML attribute accepts only the form ID. Reading the property returns the associated form element or `null`. https://mdn.dev/ElementInternals/form |\n| name | `string` | The name of the button, submitted as a pair with the button value as part of the form data. https://mdn.dev/HTML/Element/button#attr-name |\n| value | `string` | 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://mdn.dev/HTML/Element/input#value) |\n| disabled | `boolean` | This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://mdn.dev/ARIA/Attributes/aria-disabled) - `true` The element has a disabled state and does not accept interaction. - `false` The element has an enabled state and accepts interaction. |\n| selected | `boolean` | Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://mdn.dev/ARIA/Attributes/aria-selected) - `true` The element holds selection and represents the user's current choice within the group. - `false` The element does not hold selection and the user can choose it. |\n| current | `'page' \\| 'step'` | Indicates the element that represents the user's current location or position within a set. [MDN](https://mdn.dev/ARIA/Attributes/aria-current) - `page` Marks the current page within a set of navigation links. - `step` Marks the current step within a multi-step process or workflow. |\n| popoverTargetElement (popovertarget) | property: `HTMLElement \\| null`; attribute: `string` | Establishes a relationship between a popover and its invoker button. https://mdn.dev/HTMLInputElement/popoverTargetElement |\n| popoverTargetAction (popovertargetaction) | `'show' \\| 'hide' \\| 'toggle'` | The popover target action to perform on the popover target element. https://mdn.dev/HTMLInputElement/popoverTargetAction |\n| commandForElement (commandfor) | property: `HTMLElement \\| null`; attribute: `string` | The element that receives the command. https://mdn.dev/Invoker_Commands_API |\n| command | `string` | The command to execute on the element. https://mdn.dev/Invoker_Commands_API |\n| interestForElement (interestfor) | property: `HTMLElement \\| null`; attribute: `string` | The element that receives the interest. https://mdn.dev/HTMLAnchorElement/interestForElement |\n\n### CSS Properties\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| --background | `string` | [MDN](https://mdn.dev/CSS/background) |\n| --color | `string` | [MDN](https://mdn.dev/CSS/color) |\n| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |\n| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |\n| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |\n| --border | `string` | [MDN](https://mdn.dev/CSS/border) |\n| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |\n| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |\n| --cursor | `string` | [MDN](https://mdn.dev/CSS/cursor) |\n| --height | `string` | [MDN](https://mdn.dev/CSS/height) |\n| --width | `string` | [MDN](https://mdn.dev/CSS/width) |\n| --max-width | `string` | [MDN](https://mdn.dev/CSS/max-width) |\n| --text-decoration | `string` | [MDN](https://mdn.dev/CSS/text-decoration) |"
|
|
47392
|
+
"markdown": "## nve-tag\n\nA interactive element that represents a category or group of content. Typically used to filter or organize content for one to many relations.\n\n### Example\n\n```html\n<nve-tag>topic-tag</nve-tag>\n```\n\n### Import\n\n```javascript\nimport '@nvidia-elements/core/tag/define.js';\n```\n\n### Slots\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| (default) | `string` | Text or other content that identifies the category or group. |\n| prefix | `string` | Optional prefix content, such as a status nve-icon. |\n| suffix | `string` | Optional suffix content, such as a nve-dot counter. |\n\n### Properties / Attributes\n\n| property (attribute) | value | description |\n| -------------------- | ----- | ----------- |\n| closable | `boolean` | Indicates whether the user can dismiss or close the element. - `true` The element displays a close control and the user can dismiss it. - `false` The user cannot close the element and must dismiss it programmatically. |\n| color | `'red-cardinal' \\| 'gray-slate' \\| 'gray-denim' \\| 'blue-indigo' \\| 'blue-cobalt' \\| 'blue-sky' \\| 'teal-cyan' \\| 'green-mint' \\| 'teal-seafoam' \\| 'green-grass' \\| 'yellow-amber' \\| 'orange-pumpkin' \\| 'red-tomato' \\| 'pink-magenta' \\| 'purple-plum' \\| 'purple-violet' \\| 'purple-lavender' \\| 'pink-rose' \\| 'green-jade' \\| 'lime-pear' \\| 'yellow-nova' \\| 'brand-green'` | Defines a base color from the theme color palette |\n| prominence | `'emphasis' \\| undefined` | Determines the visual prominence or weight |\n| i18n | | Updates internal string values for internationalization. |\n| type | `'button' \\| 'submit' \\| 'reset'` | Defines the button behavior when associated within a form element. https://mdn.dev/HTML/Element/button#attr-type |\n| pressed | `boolean` | Indicates the current state of a toggle button that switches on or off. [MDN](https://mdn.dev/ARIA/Attributes/aria-pressed) - `true` The button is in the pressed (on) state and the associated action or setting is active. - `false` The button is in the unpressed (off) state and the associated action or setting is inactive. |\n| expanded | `boolean` | Indicates whether collapsible content is currently visible or hidden from the user. [MDN](https://mdn.dev/ARIA/Attributes/aria-expanded) - `true` The associated content expands and becomes visible to the user. - `false` The associated content collapses and hides from the user. |\n| readOnly (readonly) | `boolean` | Indicates whether the element is a noninteractive visual treatment instead of a button. https://mdn.dev/HTML/Attributes/readonly |\n| form | property: `string \\| HTMLFormElement \\| null`; attribute: `string` | Associates the button with a form. Set the property to a form element or its ID. The HTML attribute accepts only the form ID. Reading the property returns the associated form element or `null`. https://mdn.dev/ElementInternals/form |\n| name | `string` | The name of the button, submitted as a pair with the button value as part of the form data. https://mdn.dev/HTML/Element/button#attr-name |\n| value | `string` | 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://mdn.dev/HTML/Element/input#value) |\n| disabled | `boolean` | This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. [MDN](https://mdn.dev/ARIA/Attributes/aria-disabled) - `true` The element has a disabled state and does not accept interaction. - `false` The element has an enabled state and accepts interaction. |\n| selected | `boolean` | Indicates whether an element currently holds selection within a multi-option selection group. [MDN](https://mdn.dev/ARIA/Attributes/aria-selected) - `true` The element holds selection and represents the user's current choice within the group. - `false` The element does not hold selection and the user can choose it. |\n| current | `'page' \\| 'step'` | Indicates the element that represents the user's current location or position within a set. [MDN](https://mdn.dev/ARIA/Attributes/aria-current) - `page` Marks the current page within a set of navigation links. - `step` Marks the current step within a multi-step process or workflow. |\n| popoverTargetElement (popovertarget) | property: `HTMLElement \\| null`; attribute: `string` | Establishes a relationship between a popover and its invoker button. https://mdn.dev/HTMLInputElement/popoverTargetElement |\n| popoverTargetAction (popovertargetaction) | `'show' \\| 'hide' \\| 'toggle'` | The popover target action to perform on the popover target element. https://mdn.dev/HTMLInputElement/popoverTargetAction |\n| commandForElement (commandfor) | property: `HTMLElement \\| null`; attribute: `string` | The element that receives the command. https://mdn.dev/Invoker_Commands_API |\n| command | `string` | The command to execute on the element. https://mdn.dev/Invoker_Commands_API |\n| interestForElement (interestfor) | property: `HTMLElement \\| null`; attribute: `string` | The element that receives the interest. https://mdn.dev/HTMLAnchorElement/interestForElement |\n\n### CSS Properties\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| --background | `string` | [MDN](https://mdn.dev/CSS/background) |\n| --color | `string` | [MDN](https://mdn.dev/CSS/color) |\n| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |\n| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |\n| --padding | `string` | [MDN](https://mdn.dev/CSS/padding) |\n| --border | `string` | [MDN](https://mdn.dev/CSS/border) |\n| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |\n| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |\n| --cursor | `string` | [MDN](https://mdn.dev/CSS/cursor) |\n| --height | `string` | [MDN](https://mdn.dev/CSS/height) |\n| --width | `string` | [MDN](https://mdn.dev/CSS/width) |\n| --max-width | `string` | [MDN](https://mdn.dev/CSS/max-width) |\n| --text-decoration | `string` | [MDN](https://mdn.dev/CSS/text-decoration) |"
|
|
47385
47393
|
}
|
|
47386
47394
|
}
|
|
47387
47395
|
],
|
package/dist/data.html.json
CHANGED
|
@@ -5134,7 +5134,7 @@
|
|
|
5134
5134
|
},
|
|
5135
5135
|
{
|
|
5136
5136
|
"name": "nve-tag",
|
|
5137
|
-
"description": "A interactive element that represents a category or group of content. Typically used to filter or organize content for one to many relations.\n---\n\n\n### **Slots:**\n - _default_ - Text or other content that identifies the category or group.\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- **--gap** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) _(default: undefined)_\n- **--font-size** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) _(default: undefined)_\n- **--padding** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) _(default: undefined)_\n- **--border** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border) _(default: undefined)_\n- **--border-radius** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) _(default: undefined)_\n- **--font-weight** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) _(default: undefined)_\n- **--cursor** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor) _(default: undefined)_\n- **--height** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/height) _(default: undefined)_\n- **--width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_\n- **--max-width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width) _(default: undefined)_\n- **--text-decoration** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) _(default: undefined)_\n\n### **CSS Parts:**\n - **icon** - The icon element",
|
|
5137
|
+
"description": "A interactive element that represents a category or group of content. Typically used to filter or organize content for one to many relations.\n---\n\n\n### **Slots:**\n - _default_ - Text or other content that identifies the category or group.\n- **prefix** - Optional prefix content, such as a status nve-icon.\n- **suffix** - Optional suffix content, such as a nve-dot counter.\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- **--gap** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/gap) _(default: undefined)_\n- **--font-size** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-size) _(default: undefined)_\n- **--padding** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/padding) _(default: undefined)_\n- **--border** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border) _(default: undefined)_\n- **--border-radius** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius) _(default: undefined)_\n- **--font-weight** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight) _(default: undefined)_\n- **--cursor** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor) _(default: undefined)_\n- **--height** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/height) _(default: undefined)_\n- **--width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/width) _(default: undefined)_\n- **--max-width** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/max-width) _(default: undefined)_\n- **--text-decoration** - [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration) _(default: undefined)_\n\n### **CSS Parts:**\n - **icon** - The icon element",
|
|
5138
5138
|
"attributes": [
|
|
5139
5139
|
{
|
|
5140
5140
|
"name": "closable",
|
package/dist/date/date2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { Control as r } from "../forms/control/control2.js";
|
|
5
5
|
import { IconButton as i } from "../icon-button/icon-button2.js";
|
|
6
6
|
import { inputStyles as a } from "../input/input2.js";
|
|
@@ -19,7 +19,7 @@ var l = class extends r {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-date",
|
|
22
|
-
version: "2.
|
|
22
|
+
version: "2.8.0"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
static {
|
package/dist/date/date2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date2.js","names":[],"sources":["../../src/date/date.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 { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './date.css?inline';\n\n/**\n * @element nve-date\n * @description A date picker is a control that enables users to choose a date value.\n * @documentation https://nvidia.github.io/elements/docs/elements/date/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/date\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --border-bottom\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --min-width\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date\n */\n@scopedRegistry()\nexport class Date extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-date',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAmCO,
|
|
1
|
+
{"version":3,"file":"date2.js","names":[],"sources":["../../src/date/date.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 { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './date.css?inline';\n\n/**\n * @element nve-date\n * @description A date picker is a control that enables users to choose a date value.\n * @documentation https://nvidia.github.io/elements/docs/elements/date/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/date\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --border-bottom\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --min-width\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date\n */\n@scopedRegistry()\nexport class Date extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-date',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAmCO,IAAM,IAAN,cAAmB,EAAoC;;EAO5C,KAAA,SAAA,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;EAEvC,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,IAAc,gBAAgB;EAC5B,OAAO,CAAI,mDAAkD,KAAK,KAAK,OAAO,oDAAkD,KAAK,WAAW;CAClJ;AACF;AAhBG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAN1C,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { scopedRegistry as e } from "../internal/decorators/scoped-registry.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import { Control as r } from "../forms/control/control2.js";
|
|
5
5
|
import { IconButton as i } from "../icon-button/icon-button2.js";
|
|
6
6
|
import { inputStyles as a } from "../input/input2.js";
|
|
@@ -19,7 +19,7 @@ var l = class extends r {
|
|
|
19
19
|
static {
|
|
20
20
|
this.metadata = {
|
|
21
21
|
tag: "nve-datetime",
|
|
22
|
-
version: "2.
|
|
22
|
+
version: "2.8.0"
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime2.js","names":[],"sources":["../../src/datetime/datetime.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 { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './datetime.css?inline';\n\n/**\n * @element nve-datetime\n * @description A datetime picker is a control that enables users to choose a datetime value.\n * @documentation https://nvidia.github.io/elements/docs/elements/datetime/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/datetime\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --border-bottom\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --min-width\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local\n */\n@scopedRegistry()\nexport class Datetime extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-datetime',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAmCO,
|
|
1
|
+
{"version":3,"file":"datetime2.js","names":[],"sources":["../../src/datetime/datetime.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 { ContainerElement } from '@nvidia-elements/core/internal';\nimport { scopedRegistry, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { inputStyles } from '@nvidia-elements/core/input';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './datetime.css?inline';\n\n/**\n * @element nve-datetime\n * @description A datetime picker is a control that enables users to choose a datetime value.\n * @documentation https://nvidia.github.io/elements/docs/elements/datetime/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/datetime\n * @cssprop --padding\n * @cssprop --font-size\n * @cssprop --height\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --border-bottom\n * @cssprop --cursor\n * @cssprop --font-weight\n * @cssprop --width\n * @cssprop --max-width\n * @cssprop --min-width\n * @csspart icon-button - The calendar icon button element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local\n */\n@scopedRegistry()\nexport class Datetime extends Control implements ContainerElement {\n /**\n * Reduces the visual container for a minimal borderless appearance while preserving whitespace bounds.\n * Use when embedding within another container such as a toolbar.\n */\n @property({ type: String, reflect: true }) container?: 'flat';\n\n static styles = useStyles([...Control.styles, inputStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-datetime',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n protected get suffixContent() {\n return html`<nve-icon-button part=\"icon-button\" .ariaLabel=${this.i18n.expand} icon-name=\"calendar\" container=\"inline\" @click=${this.showPicker}></nve-icon-button>`;\n }\n}\n"],"mappings":";;;;;;;;;;AAmCO,IAAM,IAAN,cAAuB,EAAoC;;EAOhD,KAAA,SAAA,EAAU;GAAC,GAAG,EAAQ;GAAQ;GAAa;EAAM,CAAC;;;EAEvC,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,IAAc,gBAAgB;EAC5B,OAAO,CAAI,mDAAkD,KAAK,KAAK,OAAO,oDAAkD,KAAK,WAAW;CAClJ;AACF;AAhBG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAN1C,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import r from "./dialog-footer.js";
|
|
5
5
|
import { LitElement as i, html as a } from "lit";
|
|
6
6
|
//#region src/dialog/dialog-footer.ts
|
|
@@ -11,7 +11,7 @@ var o = class extends i {
|
|
|
11
11
|
static {
|
|
12
12
|
this.metadata = {
|
|
13
13
|
tag: "nve-dialog-footer",
|
|
14
|
-
version: "2.
|
|
14
|
+
version: "2.8.0",
|
|
15
15
|
parents: ["nve-dialog"]
|
|
16
16
|
};
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-footer2.js","names":[],"sources":["../../src/dialog/dialog-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 { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dialog-footer.css?inline';\n\n/**\n * @element nve-dialog-footer\n * @description Contains the action buttons and controls at the bottom of a dialog for confirming, canceling, or navigating.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @slot - default slot for the dialog footer\n * @cssprop --border-top\n * @cssprop --padding\n * @cssprop --gap\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DialogFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog-footer',\n version: '0.0.0',\n parents: ['nve-dialog']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.slot = 'footer';\n }\n}\n"],"mappings":";;;;;;AAoBO,
|
|
1
|
+
{"version":3,"file":"dialog-footer2.js","names":[],"sources":["../../src/dialog/dialog-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 { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dialog-footer.css?inline';\n\n/**\n * @element nve-dialog-footer\n * @description Contains the action buttons and controls at the bottom of a dialog for confirming, canceling, or navigating.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @slot - default slot for the dialog footer\n * @cssprop --border-top\n * @cssprop --padding\n * @cssprop --gap\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DialogFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog-footer',\n version: '0.0.0',\n parents: ['nve-dialog']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.slot = 'footer';\n }\n}\n"],"mappings":";;;;;;AAoBO,IAAM,IAAN,cAA2B,EAAW;;EAC3B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,YAAY;EACxB;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,OAAO;CACd;AACF;AAtBC,IAAA,EAAA,CAAA,EAAM,CAAA,GAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import r from "./dialog-header.js";
|
|
5
5
|
import { LitElement as i, html as a } from "lit";
|
|
6
6
|
//#region src/dialog/dialog-header.ts
|
|
@@ -11,7 +11,7 @@ var o = class extends i {
|
|
|
11
11
|
static {
|
|
12
12
|
this.metadata = {
|
|
13
13
|
tag: "nve-dialog-header",
|
|
14
|
-
version: "2.
|
|
14
|
+
version: "2.8.0",
|
|
15
15
|
parents: ["nve-dialog"]
|
|
16
16
|
};
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog-header2.js","names":[],"sources":["../../src/dialog/dialog-header.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 { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dialog-header.css?inline';\n\n/**\n * @element nve-dialog-header\n * @description Displays the title and contextual information at the top of a dialog to orient users to the dialog's purpose.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @slot - default slot for the dialog header\n * @cssprop --border-bottom\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DialogHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog-header',\n version: '0.0.0',\n parents: ['nve-dialog']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.slot = 'header';\n }\n}\n"],"mappings":";;;;;;AAmBO,
|
|
1
|
+
{"version":3,"file":"dialog-header2.js","names":[],"sources":["../../src/dialog/dialog-header.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 { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dialog-header.css?inline';\n\n/**\n * @element nve-dialog-header\n * @description Displays the title and contextual information at the top of a dialog to orient users to the dialog's purpose.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @slot - default slot for the dialog header\n * @cssprop --border-bottom\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DialogHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog-header',\n version: '0.0.0',\n parents: ['nve-dialog']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.slot = 'header';\n }\n}\n"],"mappings":";;;;;;AAmBO,IAAM,IAAN,cAA2B,EAAW;;EAC3B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,YAAY;EACxB;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,OAAO;CACd;AACF;AAtBC,IAAA,EAAA,CAAA,EAAM,CAAA,GAAA,CAAA"}
|
package/dist/dialog/dialog2.js
CHANGED
|
@@ -6,7 +6,7 @@ import { TypeNativePopoverController as i } from "../internal/controllers/type-n
|
|
|
6
6
|
import { scopedRegistry as a } from "../internal/decorators/scoped-registry.js";
|
|
7
7
|
import { useStyles as o } from "../internal/styles/index.js";
|
|
8
8
|
import { popoverStyles as s } from "../internal/styles/popover2.js";
|
|
9
|
-
import c from "../_virtual/_@oxc-project_runtime@0.
|
|
9
|
+
import c from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
10
10
|
import { IconButton as l } from "../icon-button/icon-button2.js";
|
|
11
11
|
import u from "./dialog.global.js";
|
|
12
12
|
import d from "./dialog.js";
|
|
@@ -30,7 +30,7 @@ var h = class extends f {
|
|
|
30
30
|
static {
|
|
31
31
|
this.metadata = {
|
|
32
32
|
tag: "nve-dialog",
|
|
33
|
-
version: "2.
|
|
33
|
+
version: "2.8.0"
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
static {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog2.js","names":[
|
|
1
|
+
{"version":3,"file":"dialog2.js","names":[],"sources":["../../src/dialog/dialog.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 { PopoverAlign, PopoverPosition, PopoverType, Size } from '@nvidia-elements/core/internal';\nimport {\n audit,\n excessiveInstanceLimit,\n I18nController,\n popoverStyles,\n TypeNativePopoverController,\n useStyles,\n attachInternals,\n appendRootNodeStyle,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport globalStyles from './dialog.global.css?inline';\nimport styles from './dialog.css?inline';\n\n/**\n * @element nve-dialog\n * @description Dialog is a component that appears above main content. A modal dialog displays critical information that requires user attention and interrupts user flow.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @event beforetoggle - Dispatched on a popover just before showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/beforetoggle_event)\n * @event toggle - Dispatched on a popover element just after showing or hiding. [MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/toggle_event)\n * @event open - Dispatched when the dialog opens.\n * @event close - Dispatched when the dialog closes.\n * @slot - Dialog body content displayed between the header and footer.\n * @cssprop --border\n * @cssprop --border-radius\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --gap\n * @cssprop --max-width\n * @cssprop --min-height\n * @cssprop --max-height\n * @cssprop --animation-duration - Duration of dialog open/close animations\n * @csspart close-button - The inner template reference for the close button of the dialog.\n * @csspart icon-button - The icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit({ excessiveInstanceLimit })\n@scopedRegistry()\nexport class Dialog extends LitElement {\n /**\n * Sets the side position of the popover relative to the provided anchor element.\n * For dialog the anchor defaults to the document body.\n */\n @property({ type: String, reflect: true }) position: PopoverPosition = 'center';\n\n /**\n * Sets the alignment of the popover relative to the provided anchor element.\n * If an arrow exists the alignment will be relative to the arrow against the anchor.\n */\n @property({ type: String, reflect: true }) alignment: PopoverAlign = 'center';\n\n /**\n * Sets the max size of the dialog.\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n /**\n * Determines if a close button should render within dialog. Non-closable\n * dialogs suit dialogs that require user confirmation steps.\n */\n @property({ type: Boolean }) closable: boolean;\n\n /**\n * Determines if a dialog should have a modal backdrop that visually overlays the UI.\n */\n @property({ type: Boolean, reflect: true }) modal: boolean;\n\n /**\n * (optional) By default the popover will automatically anchor itself relative to the trigger element.\n * Pass an optional custom anchor element as an idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) anchor: string | HTMLElement = globalThis.document?.body;\n\n /**\n * @deprecated Use the popover API instead.\n * The trigger defines what element triggers an `open` interaction event.\n * A trigger can accept a idref string within the same render root or a HTMLElement DOM reference.\n */\n @property({ type: String }) trigger: string | HTMLElement;\n\n /**\n * @deprecated Use the popover API instead.\n * Determines if popover visibility behavior should be automatically controlled by the trigger.\n */\n @property({ type: Boolean, reflect: true, attribute: 'behavior-trigger' }) behaviorTrigger: boolean;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /**\n * Enables internal string values to update for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n /** @private */\n get popoverType(): PopoverType {\n return this.modal ? 'auto' : 'manual';\n }\n\n /** @private */\n get popoverDismissible() {\n return this.closable ?? false;\n }\n\n protected typeNativePopoverController = new TypeNativePopoverController<Dialog>(this);\n\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host part=\"_host\">\n <div class=\"header\">\n ${this.closable ? html`<nve-icon-button part=\"close-button icon-button\" exportparts=\"icon:icon-button-icon\" size=\"sm\" @click=${this.hidePopover} icon-name=\"cancel\" .ariaLabel=${this.i18n.close}></nve-icon-button>` : ''}\n <slot name=\"header\"></slot>\n </div>\n <div class=\"content\" part=\"_content\">\n <slot></slot>\n </div>\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\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AA,GAK1B,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,GAMzC,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAOzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,GAMzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAmB,CAAC,CAAA,GAAA,EAAA,WAAA,mBAAA,KAAA,CAAA,GAOxE,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAvD3B,IAAA,EAAA,CAAA,EAAM,EAAE,wBAAA,GAAuB,CAAC,GAChC,EAAe,CAAA,GAAA,CAAA"}
|
package/dist/divider/divider2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachInternals as e } from "../internal/utils/a11y.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import r from "./divider.js";
|
|
5
5
|
import { LitElement as i, html as a } from "lit";
|
|
6
6
|
import { property as o } from "lit/decorators/property.js";
|
|
@@ -15,7 +15,7 @@ var s = class extends i {
|
|
|
15
15
|
static {
|
|
16
16
|
this.metadata = {
|
|
17
17
|
tag: "nve-divider",
|
|
18
|
-
version: "2.
|
|
18
|
+
version: "2.8.0"
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider2.js","names":[],"sources":["../../src/divider/divider.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 } from '@nvidia-elements/core/internal';\nimport styles from './divider.css?inline';\n\n/**\n * @element nve-divider\n * @description Divider is a component that separates and distinguishes sections of content or groups of menuitems.\n * @documentation https://nvidia.github.io/elements/docs/elements/divider/\n * @since 0.12.0\n * @entrypoint \\@nvidia-elements/core/divider\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --size\n * @cssprop --border-radius\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role\n */\nexport class Divider extends LitElement {\n /**\n * Determines the orientation of the divider.\n */\n @property({ type: String, reflect: true }) orientation: 'vertical' | 'horizontal' = 'horizontal';\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-divider',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`<div internal-host></div>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'separator';\n this._internals.ariaOrientation = this.orientation;\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n if (props.has('orientation')) {\n this._internals.ariaOrientation = this.orientation;\n }\n }\n}\n"],"mappings":";;;;;;;AAqBA,IAAa,IAAb,cAA6B,EAAW;;
|
|
1
|
+
{"version":3,"file":"divider2.js","names":[],"sources":["../../src/divider/divider.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 } from '@nvidia-elements/core/internal';\nimport styles from './divider.css?inline';\n\n/**\n * @element nve-divider\n * @description Divider is a component that separates and distinguishes sections of content or groups of menuitems.\n * @documentation https://nvidia.github.io/elements/docs/elements/divider/\n * @since 0.12.0\n * @entrypoint \\@nvidia-elements/core/divider\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --size\n * @cssprop --border-radius\n * @aria https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/separator_role\n */\nexport class Divider extends LitElement {\n /**\n * Determines the orientation of the divider.\n */\n @property({ type: String, reflect: true }) orientation: 'vertical' | 'horizontal' = 'horizontal';\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-divider',\n version: '0.0.0'\n };\n\n /** @private */\n declare _internals: ElementInternals;\n\n render() {\n return html`<div internal-host></div>`;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'separator';\n this._internals.ariaOrientation = this.orientation;\n }\n\n updated(props: PropertyValues<this>) {\n super.updated(props);\n if (props.has('orientation')) {\n this._internals.ariaOrientation = this.orientation;\n }\n }\n}\n"],"mappings":";;;;;;;AAqBA,IAAa,IAAb,cAA6B,EAAW;;EAI8C,aAAA,KAAA,cAAA;;;EAEpE,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAKA,SAAS;EACP,OAAO,CAAI;CACb;CAEA,oBAAoB;EAIlB,AAHA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO,aACvB,KAAK,WAAW,kBAAkB,KAAK;CACzC;CAEA,QAAQ,GAA6B;EAEnC,AADA,MAAM,QAAQ,CAAK,GACf,EAAM,IAAI,aAAa,MACzB,KAAK,WAAW,kBAAkB,KAAK;CAE3C;AACF;AA7BG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA"}
|
package/dist/dot/dot2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { attachInternals as e } from "../internal/utils/a11y.js";
|
|
2
2
|
import { statusStateStyles as t, supportStateStyles as n, useStyles as r } from "../internal/styles/index.js";
|
|
3
|
-
import i from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import i from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import a from "./dot.js";
|
|
5
5
|
import { LitElement as o, html as s } from "lit";
|
|
6
6
|
import { property as c } from "lit/decorators/property.js";
|
|
@@ -16,7 +16,7 @@ var l = class extends o {
|
|
|
16
16
|
static {
|
|
17
17
|
this.metadata = {
|
|
18
18
|
tag: "nve-dot",
|
|
19
|
-
version: "2.
|
|
19
|
+
version: "2.8.0"
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
render() {
|
package/dist/dot/dot2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dot2.js","names":[
|
|
1
|
+
{"version":3,"file":"dot2.js","names":[],"sources":["../../src/dot/dot.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 { Size, SupportStatus, TaskStatus } from '@nvidia-elements/core/internal';\nimport { attachInternals, statusStateStyles, supportStateStyles, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dot.css?inline';\n\n/**\n * @element nve-dot\n * @description A visual indicator that communicates a status or notification of an associated component.\n * @documentation https://nvidia.github.io/elements/docs/elements/dot/\n * @since 0.10.0\n * @entrypoint \\@nvidia-elements/core/dot\n * @slot - default text content no more than 2 characters in length\n * @cssprop --gap\n * @cssprop --font-size\n * @cssprop --font-weight\n * @cssprop --background\n * @cssprop --color\n * @cssprop --border-radius\n * @cssprop --height\n * @cssprop --width\n * @cssprop --padding\n * @cssprop --border\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\n */\nexport class Dot extends LitElement {\n /** Defines visual treatment to represent a ongoing task or support status. */\n @property({ type: String, reflect: true }) status: SupportStatus | TaskStatus;\n\n /** Determines size of dot relative to provided text. */\n @property({ type: String, reflect: true }) size: Size;\n\n static styles = useStyles([styles, statusStateStyles, supportStateStyles]);\n\n static readonly metadata = {\n tag: 'nve-dot',\n version: '0.0.0'\n };\n\n _internals: ElementInternals;\n\n render() {\n return html`\n <div internal-host>\n <slot @slotchange=${() => this.#updateSlot()}></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n attachInternals(this);\n this._internals.role = 'img';\n }\n\n #updateSlot() {\n this.textContent.length ? this._internals.states.add('has-text') : this._internals.states.delete('has-text');\n }\n}\n"],"mappings":";;;;;;;AA4BA,IAAa,IAAb,cAAyB,EAAW;;EAOlB,KAAA,SAAA,EAAU;GAAC;GAAQ;GAAmB;EAAkB,CAAC;;;EAE9C,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAIA,SAAS;EACP,OAAO,CAAI,+CAEmB,KAAK,GAAY,EAAE;CAGnD;CAEA,oBAAoB;EAGlB,AAFA,MAAM,kBAAkB,GACxB,EAAgB,IAAI,GACpB,KAAK,WAAW,OAAO;CACzB;CAEA,KAAc;EACZ,KAAK,YAAY,SAAS,KAAK,WAAW,OAAO,IAAI,UAAU,IAAI,KAAK,WAAW,OAAO,OAAO,UAAU;CAC7G;AACF;AA/BG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAGxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { audit as e } from "../internal/controllers/audit.controller.js";
|
|
2
2
|
import { useStyles as t } from "../internal/styles/index.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
|
|
4
4
|
import r from "./drawer-content.js";
|
|
5
5
|
import { LitElement as i, html as a } from "lit";
|
|
6
6
|
//#region src/drawer/drawer-content.ts
|
|
@@ -11,7 +11,7 @@ var o = class extends i {
|
|
|
11
11
|
static {
|
|
12
12
|
this.metadata = {
|
|
13
13
|
tag: "nve-drawer-content",
|
|
14
|
-
version: "2.
|
|
14
|
+
version: "2.8.0",
|
|
15
15
|
parents: ["nve-drawer"]
|
|
16
16
|
};
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-content2.js","names":[],"sources":["../../src/drawer/drawer-content.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 { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './drawer-content.css?inline';\n\n/**\n * @element nve-drawer-content\n * @description Contains the scrollable main body content within a drawer panel.\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer content\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerContent extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-content',\n version: '0.0.0',\n parents: ['nve-drawer']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;AAmBO,
|
|
1
|
+
{"version":3,"file":"drawer-content2.js","names":[],"sources":["../../src/drawer/drawer-content.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 { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './drawer-content.css?inline';\n\n/**\n * @element nve-drawer-content\n * @description Contains the scrollable main body content within a drawer panel.\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer content\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerContent extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-content',\n version: '0.0.0',\n parents: ['nve-drawer']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;AAmBO,IAAM,IAAN,cAA4B,EAAW;;EAC5B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,YAAY;EACxB;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;AACF;AAjBC,IAAA,EAAA,CAAA,EAAM,CAAA,GAAA,CAAA"}
|