@nvidia-elements/core 2.0.0 → 2.0.2

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.
Files changed (170) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +1 -1
  3. package/dist/_virtual/{_@oxc-project_runtime@0.132.0/helpers → _@oxc-project_runtime@0.133.0/helpers/esm}/decorate.js +1 -1
  4. package/dist/accordion/accordion2.js +5 -5
  5. package/dist/alert/alert-group2.js +2 -2
  6. package/dist/alert/alert2.js +2 -2
  7. package/dist/avatar/avatar-group2.js +1 -1
  8. package/dist/avatar/avatar2.js +2 -2
  9. package/dist/badge/badge2.js +2 -2
  10. package/dist/breadcrumb/breadcrumb2.js +2 -2
  11. package/dist/bundles/index.d.ts +2 -11
  12. package/dist/bundles/index.js +6 -6
  13. package/dist/button/button2.js +2 -2
  14. package/dist/button-group/button-group2.js +2 -2
  15. package/dist/card/card2.js +5 -5
  16. package/dist/chat-message/chat-message2.js +2 -2
  17. package/dist/checkbox/checkbox-group2.js +2 -2
  18. package/dist/checkbox/checkbox2.js +2 -2
  19. package/dist/color/color2.js +2 -2
  20. package/dist/combobox/combobox2.js +31 -31
  21. package/dist/combobox/combobox2.js.map +1 -1
  22. package/dist/copy-button/copy-button2.js +2 -2
  23. package/dist/custom-elements.json +168 -733
  24. package/dist/date/date2.js +2 -2
  25. package/dist/datetime/datetime2.js +2 -2
  26. package/dist/dialog/dialog-footer2.js +2 -2
  27. package/dist/dialog/dialog-header2.js +2 -2
  28. package/dist/dialog/dialog2.js +2 -2
  29. package/dist/divider/divider2.js +2 -2
  30. package/dist/dot/dot2.js +2 -2
  31. package/dist/drawer/drawer-content2.js +2 -2
  32. package/dist/drawer/drawer-footer2.js +2 -2
  33. package/dist/drawer/drawer-header2.js +2 -2
  34. package/dist/drawer/drawer2.js +2 -2
  35. package/dist/dropdown/dropdown-footer2.js +2 -2
  36. package/dist/dropdown/dropdown-header2.js +2 -2
  37. package/dist/dropdown/dropdown2.js +2 -2
  38. package/dist/dropdown-group/dropdown-group.js +2 -2
  39. package/dist/dropzone/dropzone2.js +2 -2
  40. package/dist/file/file2.js +1 -1
  41. package/dist/format-datetime/format-datetime2.js +2 -2
  42. package/dist/format-number/format-number2.js +2 -2
  43. package/dist/format-relative-time/format-relative-time2.js +6 -3
  44. package/dist/format-relative-time/format-relative-time2.js.map +1 -1
  45. package/dist/forms/control/control.js +1 -1
  46. package/dist/forms/control/control.js.map +1 -1
  47. package/dist/forms/control/control2.js +39 -21
  48. package/dist/forms/control/control2.js.map +1 -1
  49. package/dist/forms/control-group/control-group.js +1 -1
  50. package/dist/forms/control-group/control-group.js.map +1 -1
  51. package/dist/forms/control-group/control-group2.js +2 -2
  52. package/dist/forms/control-group/control-group2.js.map +1 -1
  53. package/dist/forms/control-message/control-message2.js +2 -2
  54. package/dist/forms/utils/states.d.ts +6 -3
  55. package/dist/forms/utils/states.js +40 -32
  56. package/dist/forms/utils/states.js.map +1 -1
  57. package/dist/grid/cell/cell2.js +1 -1
  58. package/dist/grid/column/column2.js +2 -2
  59. package/dist/grid/footer/footer2.js +2 -2
  60. package/dist/grid/grid2.js +2 -2
  61. package/dist/grid/header/header2.js +2 -2
  62. package/dist/grid/placeholder/placeholder2.js +1 -1
  63. package/dist/grid/row/row2.js +2 -2
  64. package/dist/icon/icon2.js +3 -3
  65. package/dist/icon-button/icon-button2.js +2 -2
  66. package/dist/index.js +1 -1
  67. package/dist/input/input-group2.js +1 -1
  68. package/dist/input/input2.js +2 -2
  69. package/dist/internal/controllers/keynav-grid.controller.js +22 -18
  70. package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
  71. package/dist/internal/controllers/keynav-list.controller.d.ts +1 -0
  72. package/dist/internal/controllers/keynav-list.controller.js +6 -1
  73. package/dist/internal/controllers/keynav-list.controller.js.map +1 -1
  74. package/dist/internal/controllers/type-native-popover.controller.js +70 -40
  75. package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
  76. package/dist/internal/index.d.ts +0 -9
  77. package/dist/internal/index.js +20 -29
  78. package/dist/internal/services/global.service.js +1 -1
  79. package/dist/internal/services/log.service.js +1 -1
  80. package/dist/internal/services/log.service.js.map +1 -1
  81. package/dist/internal/types/index.d.ts +3 -0
  82. package/dist/internal/types/index.js.map +1 -1
  83. package/dist/internal/utils/dom.d.ts +1 -1
  84. package/dist/internal/utils/dom.js +71 -54
  85. package/dist/internal/utils/dom.js.map +1 -1
  86. package/dist/logo/logo2.js +2 -2
  87. package/dist/menu/menu-item2.js +2 -2
  88. package/dist/menu/menu2.js +2 -2
  89. package/dist/month/month2.js +2 -2
  90. package/dist/notification/notification-group2.js +2 -2
  91. package/dist/notification/notification2.js +2 -2
  92. package/dist/page/page-panel/page-panel-content2.js +1 -1
  93. package/dist/page/page-panel/page-panel-footer2.js +2 -2
  94. package/dist/page/page-panel/page-panel-header2.js +2 -2
  95. package/dist/page/page-panel/page-panel2.js +2 -2
  96. package/dist/page/page2.js +2 -2
  97. package/dist/page-header/page-header2.js +1 -1
  98. package/dist/page-loader/page-loader2.js +2 -2
  99. package/dist/pagination/pagination2.js +2 -2
  100. package/dist/panel/panel2.js +5 -5
  101. package/dist/password/password2.js +2 -2
  102. package/dist/preferences-input/preferences-input2.js +2 -2
  103. package/dist/progress-bar/progress-bar2.js +2 -2
  104. package/dist/progress-ring/progress-ring2.js +2 -2
  105. package/dist/progressive-filter-chip/progressive-filter-chip2.js +2 -2
  106. package/dist/pulse/pulse2.js +2 -2
  107. package/dist/radio/radio-group2.js +2 -2
  108. package/dist/radio/radio2.js +2 -2
  109. package/dist/range/range2.js +2 -2
  110. package/dist/resize-handle/resize-handle2.js +2 -2
  111. package/dist/search/search2.js +2 -2
  112. package/dist/select/select.d.ts +1 -0
  113. package/dist/select/select.global.js +6 -0
  114. package/dist/select/select.global.js.map +1 -0
  115. package/dist/select/select2.js +64 -46
  116. package/dist/select/select2.js.map +1 -1
  117. package/dist/skeleton/skeleton2.js +2 -2
  118. package/dist/sort-button/sort-button2.js +2 -2
  119. package/dist/sparkline/sparkline.utils.js +4 -2
  120. package/dist/sparkline/sparkline.utils.js.map +1 -1
  121. package/dist/sparkline/sparkline2.js +2 -2
  122. package/dist/star-rating/star-rating2.js +2 -2
  123. package/dist/steps/steps2.js +3 -3
  124. package/dist/switch/switch-group2.js +2 -2
  125. package/dist/switch/switch2.js +2 -2
  126. package/dist/tabs/tabs-group2.js +2 -2
  127. package/dist/tabs/tabs2.js +3 -3
  128. package/dist/tag/tag2.js +2 -2
  129. package/dist/textarea/textarea2.js +1 -1
  130. package/dist/time/time2.js +2 -2
  131. package/dist/toast/toast2.js +2 -2
  132. package/dist/toggletip/toggletip-footer2.js +2 -2
  133. package/dist/toggletip/toggletip-header2.js +2 -2
  134. package/dist/toggletip/toggletip2.js +2 -2
  135. package/dist/toolbar/toolbar2.js +2 -2
  136. package/dist/tooltip/tooltip2.js +2 -2
  137. package/dist/tree/tree-node2.js +2 -2
  138. package/dist/tree/tree2.js +2 -2
  139. package/dist/week/week2.js +2 -2
  140. package/package.json +10 -10
  141. package/dist/internal/controllers/state-active.controller.d.ts +0 -18
  142. package/dist/internal/controllers/state-active.controller.js +0 -29
  143. package/dist/internal/controllers/state-active.controller.js.map +0 -1
  144. package/dist/internal/controllers/state-current.controller.d.ts +0 -18
  145. package/dist/internal/controllers/state-current.controller.js +0 -28
  146. package/dist/internal/controllers/state-current.controller.js.map +0 -1
  147. package/dist/internal/controllers/state-disabled.controller.d.ts +0 -18
  148. package/dist/internal/controllers/state-disabled.controller.js +0 -20
  149. package/dist/internal/controllers/state-disabled.controller.js.map +0 -1
  150. package/dist/internal/controllers/state-pressed.controller.d.ts +0 -18
  151. package/dist/internal/controllers/state-pressed.controller.js +0 -20
  152. package/dist/internal/controllers/state-pressed.controller.js.map +0 -1
  153. package/dist/internal/controllers/type-button.controller.d.ts +0 -18
  154. package/dist/internal/controllers/type-button.controller.examples.js +0 -6
  155. package/dist/internal/controllers/type-button.controller.examples.js.map +0 -1
  156. package/dist/internal/controllers/type-button.controller.examples.json +0 -16
  157. package/dist/internal/controllers/type-button.controller.js +0 -21
  158. package/dist/internal/controllers/type-button.controller.js.map +0 -1
  159. package/dist/internal/controllers/type-command.controller.d.ts +0 -25
  160. package/dist/internal/controllers/type-command.controller.js +0 -38
  161. package/dist/internal/controllers/type-command.controller.js.map +0 -1
  162. package/dist/internal/controllers/type-interest.controller.d.ts +0 -23
  163. package/dist/internal/controllers/type-interest.controller.js +0 -51
  164. package/dist/internal/controllers/type-interest.controller.js.map +0 -1
  165. package/dist/internal/controllers/type-native-popover-trigger.controller.d.ts +0 -16
  166. package/dist/internal/controllers/type-native-popover-trigger.controller.js +0 -25
  167. package/dist/internal/controllers/type-native-popover-trigger.controller.js.map +0 -1
  168. package/dist/internal/controllers/type-submit.controller.d.ts +0 -22
  169. package/dist/internal/controllers/type-submit.controller.js +0 -49
  170. package/dist/internal/controllers/type-submit.controller.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"select2.js","names":["#i18nController","#select","#options","#dropdown","#menuItems","#input","#tags","#caret","#placeholderOption","#multipleSelectLabel","#selectValue","#menu","#closeDropdown","#openDropdown","#setupCustomSelectUI","#setupOverflowListener","#syncSelectValueStates","#syncOptionSelectedStates","#observers","#trackedOptions","#updateMultipleOverflow"],"sources":["../../src/select/select.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, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n focusElementTimeout,\n onListboxActivate,\n useStyles,\n i18n,\n I18nController,\n onChildListMutation,\n getElementUpdate,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Dropdown } from '@nvidia-elements/core/dropdown';\nimport { Tag } from '@nvidia-elements/core/tag';\nimport styles from './select.css?inline';\n\n/**\n * @element nve-select\n * @description A select is a control that enables users to select an option from a list of options.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/select\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 --text-align\n * @cssprop --scroll-height\n * @cssprop --width\n * @cssprop --control-width\n * @cssprop --max-width\n * @cssprop --min-width\n * @cssprop --box-shadow\n * @cssprop --max-height\n * @cssprop --text-transform\n * @csspart tag\n * @csspart menu - The dropdown menu element\n * @csspart menu-item - The menu item elements\n * @csspart icon - The icon element\n * @csspart caret - The caret/chevron icon element\n * @csspart dropdown - The dropdown popup element\n * @slot - Select input element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select\n */\n@i18n<Select>()\n@scopedRegistry()\nexport class Select extends Control {\n static styles = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-select',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\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 /** Flat container option applies when embedding the component within another containing element */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Updates internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n get #select() {\n return this.input as unknown as HTMLSelectElement;\n }\n\n get #options() {\n return Array.from(this.#select?.options ? this.#select.options : []);\n }\n\n get #dropdown() {\n return this.shadowRoot!.querySelector<Dropdown>(Dropdown.metadata.tag);\n }\n\n get #menuItems() {\n return this.shadowRoot!.querySelectorAll<MenuItem>(MenuItem.metadata.tag);\n }\n\n get #input() {\n return this.shadowRoot!.querySelector<HTMLElement>('[input]');\n }\n\n get #tags() {\n return this.shadowRoot!.querySelector('.tags');\n }\n\n get #caret() {\n return this.shadowRoot!.querySelector<Icon>('[name=\"caret\"]');\n }\n\n get #placeholderOption() {\n return this.#options.find(o => o.selected && o.hidden && o.disabled);\n }\n\n #observers: (MutationObserver | ResizeObserver)[] = [];\n\n get #multipleSelectLabel() {\n const option = this.#placeholderOption;\n const label = option ? option.innerText : `${this.#select.selectedOptions.length} ${this.i18n.selected}`;\n return html`<div class=\"tags-label ${option ? 'placeholder' : ''}\" aria-hidden=\"true\">${label}</div>`;\n }\n\n protected get prefixContent() {\n return this.#select?.multiple && this.#select?.size === 0\n ? html`\n ${this.#multipleSelectLabel}\n <div class=\"tags\">\n ${this.#options\n .filter(o => o.selected && o !== this.#placeholderOption)\n .map(\n o => html`\n <nve-tag part=\"tag\" readonly color=\"gray-slate\" closable .value=${o.value} @click=${() => this.#selectValue(o, false)}>${o.textContent}</nve-tag>`\n )}\n </div>`\n : nothing;\n }\n\n get #menu() {\n return html`\n <nve-menu part=\"menu\" role=\"listbox\" style=\"--width: 100%; --min-width: fit-content\" aria-label=${ifDefined(this.i18n.select)}>\n ${this.#options\n .filter(o => o !== this.#placeholderOption)\n .map(\n (o, i) => html`\n <nve-menu-item part=\"menu-item\" role=\"option\" @click=${() => this.#selectValue(o, !o.selected)} ?selected=${o.selected} ?disabled=${o.disabled} ?hidden=${!!o.hidden} aria-selected=${o.selected}>\n <slot name=\"option-${i + 1}\">\n <nve-icon part=\"icon\" name=\"check\" size=\"sm\" aria-hidden=\"true\"></nve-icon> ${o.innerText}\n </slot>\n </nve-menu-item>`\n )}\n </nve-menu>`;\n }\n\n protected get suffixContent() {\n return this.#select?.size === 0\n ? html`\n <nve-icon name=\"caret\" part=\"caret\" direction=\"down\" size=\"sm\" aria-hidden=\"true\"></nve-icon>\n <nve-dropdown part=\"dropdown\" @close=${this.#closeDropdown} @open=${this.#openDropdown} hidden .anchor=${this.#input as HTMLElement} .trigger=${this.#input as HTMLElement} position=\"bottom\">\n ${this.#menu}\n </nve-dropdown>`\n : this.#menu;\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n await this.updateComplete;\n this.#setupCustomSelectUI();\n this.#setupOverflowListener();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n }\n\n #syncSelectValueStates() {\n this.#observers.push(\n getElementUpdate(this.#select, 'value', () => this.requestUpdate()),\n onChildListMutation(this.#select, () => this.requestUpdate(), { attributes: true, subtree: true }),\n onChildListMutation(this.#select, () => this.#syncOptionSelectedStates(), { subtree: true })\n );\n }\n\n #trackedOptions = new Set();\n #syncOptionSelectedStates() {\n this.#options.forEach(o => {\n if (!this.#trackedOptions.has(o)) {\n this.#trackedOptions.add(o);\n this.#observers.push(getElementUpdate(o, 'selected', () => this.requestUpdate()));\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.#observers.forEach(observer => observer.disconnect());\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n if (this.#select?.size && this.#select?.size !== 0) {\n this._internals.states.add('size');\n this.style.setProperty('--size', `${this.#select?.size + 0.75}`);\n }\n\n if (this.#select?.multiple && this.#select?.size === 0) {\n this._internals.states.add('multiple');\n }\n }\n\n #setupCustomSelectUI() {\n if (this.#select?.size === 0) {\n onListboxActivate(this.#select, () => {\n this.requestUpdate(); // update menu items\n this.#dropdown!.style.setProperty('--min-width', `${this.#input!.getBoundingClientRect().width}px`);\n this.#dropdown!.showPopover();\n focusElementTimeout(this.#menuItems[0] as HTMLElement);\n });\n }\n }\n\n #openDropdown() {\n this.#dropdown!.hidden = false;\n this.#caret!.direction = 'up';\n }\n\n #closeDropdown() {\n this.#dropdown!.hidden = true;\n this.#caret!.direction = 'down';\n }\n\n #setupOverflowListener() {\n const observer = new ResizeObserver(entries => this.#updateMultipleOverflow(entries[0]!.contentRect.width));\n this.#observers.push(observer);\n observer.observe(this.#input!);\n }\n\n async #selectValue(option: HTMLOptionElement, selected: boolean) {\n if (this.#select.multiple || (!this.#select.multiple && option.value !== this.#select.value)) {\n option.selected = selected;\n }\n\n // native select only the first selected option determines the select input value\n if (this.#select.selectedOptions.length < 1) {\n this.#select.value = selected ? option.value : '';\n }\n\n this.#select.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select.dispatchEvent(new Event('change', { bubbles: true }));\n this.requestUpdate();\n\n if (!this.#select.multiple && this.#dropdown) {\n this.#dropdown.hidePopover();\n } else {\n await this.updateComplete;\n this.#updateMultipleOverflow(this.#input!.getBoundingClientRect().width);\n }\n }\n\n #updateMultipleOverflow(width: number) {\n const tags = this.#tags;\n if (this.#select?.multiple && tags && tags.getBoundingClientRect().width > width - 48) {\n this._internals.states.add('multiple-overflow');\n } else {\n this._internals.states.delete('multiple-overflow');\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA2DO,IAAA,IAAA,cAAqB,EAAQ;;yBAmBM,IAAI,EAAqB,IAAI,eAGlC,KAAKA,GAAgB,gBAkCJ,CAAC,6BAkEnC,IAAI,IAAI;;;gBAzHV,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;kBAE1B;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B;IACzB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAI,SAAS,MAAM;EACtB;;CAKA;CAKA,IAAIC,KAAU;EACZ,OAAO,KAAK;CACd;CAEA,IAAIC,KAAW;EACb,OAAO,MAAM,KAAK,KAAKD,IAAS,UAAU,KAAKA,GAAQ,UAAU,CAAC,CAAC;CACrE;CAEA,IAAIE,KAAY;EACd,OAAO,KAAK,WAAY,cAAwB,EAAS,SAAS,GAAG;CACvE;CAEA,IAAIC,KAAa;EACf,OAAO,KAAK,WAAY,iBAA2B,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B;CAErD;AACF;GA7LG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UAxB3B,EAAa,GACb,EAAe,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"select2.js","names":["#i18nController","#select","#options","#dropdown","#menuItems","#input","#tags","#caret","#placeholderOption","#multipleSelectLabel","#selectValue","#menu","#closeDropdown","#openDropdown","#setupCustomSelectUI","#observers","#syncOptionSelectedStates","#disconnectObservers","#setupOverflowListener","#syncSelectValueStates","#optionObservers","#setupObservers","#updateMultipleOverflow"],"sources":["../../src/select/select.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, nothing } from 'lit';\nimport { property } from 'lit/decorators/property.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport {\n focusElementTimeout,\n onListboxActivate,\n useStyles,\n i18n,\n I18nController,\n onChildListMutation,\n getElementUpdate,\n scopedRegistry,\n appendRootNodeStyle\n} from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport { Menu, MenuItem } from '@nvidia-elements/core/menu';\nimport { Dropdown } from '@nvidia-elements/core/dropdown';\nimport { Tag } from '@nvidia-elements/core/tag';\nimport styles from './select.css?inline';\nimport globalStyles from './select.global.css?inline';\n\n/**\n * @element nve-select\n * @description A select is a control that enables users to select an option from a list of options.\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/select\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 --text-align\n * @cssprop --scroll-height\n * @cssprop --width\n * @cssprop --control-width\n * @cssprop --max-width\n * @cssprop --min-width\n * @cssprop --box-shadow\n * @cssprop --max-height\n * @cssprop --text-transform\n * @csspart tag\n * @csspart menu - The dropdown menu element\n * @csspart menu-item - The menu item elements\n * @csspart icon - The icon element\n * @csspart caret - The caret/chevron icon element\n * @csspart dropdown - The dropdown popup element\n * @slot - Select input element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select\n */\n@i18n<Select>()\n@scopedRegistry()\nexport class Select extends Control {\n static styles = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-select',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\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 /** Flat container option applies when embedding the component within another containing element */\n @property({ type: String, reflect: true }) container?: 'flat' | 'inline';\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n /** Updates internal string values for internationalization. */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n get #select() {\n return this.input as unknown as HTMLSelectElement;\n }\n\n get #options() {\n return Array.from(this.#select?.options ? this.#select.options : []);\n }\n\n get #dropdown() {\n return this.shadowRoot!.querySelector<Dropdown>(Dropdown.metadata.tag);\n }\n\n get #menuItems() {\n return this.shadowRoot!.querySelectorAll<MenuItem>(MenuItem.metadata.tag);\n }\n\n get #input() {\n return this.shadowRoot!.querySelector<HTMLElement>('[input]');\n }\n\n get #tags() {\n return this.shadowRoot!.querySelector('.tags');\n }\n\n get #caret() {\n return this.shadowRoot!.querySelector<Icon>('[name=\"caret\"]');\n }\n\n get #placeholderOption() {\n return this.#options.find(o => o.selected && o.hidden && o.disabled);\n }\n\n #observers: (MutationObserver | ResizeObserver)[] = [];\n\n get #multipleSelectLabel() {\n const option = this.#placeholderOption;\n const label = option ? option.innerText : `${this.#select.selectedOptions.length} ${this.i18n.selected}`;\n return html`<div class=\"tags-label ${option ? 'placeholder' : ''}\" aria-hidden=\"true\">${label}</div>`;\n }\n\n protected get prefixContent() {\n return this.#select?.multiple && this.#select?.size === 0\n ? html`\n ${this.#multipleSelectLabel}\n <div class=\"tags\">\n ${this.#options\n .filter(o => o.selected && o !== this.#placeholderOption)\n .map(\n o => html`\n <nve-tag part=\"tag\" readonly color=\"gray-slate\" closable .value=${o.value} @click=${() => this.#selectValue(o, false)}>${o.textContent}</nve-tag>`\n )}\n </div>`\n : nothing;\n }\n\n get #menu() {\n return html`\n <nve-menu part=\"menu\" role=\"listbox\" style=\"--width: 100%; --min-width: fit-content\" aria-label=${ifDefined(this.i18n.select)}>\n ${this.#options\n .filter(o => o !== this.#placeholderOption)\n .map(\n (o, i) => html`\n <nve-menu-item part=\"menu-item\" role=\"option\" @click=${() => this.#selectValue(o, !o.selected)} ?selected=${o.selected} ?disabled=${o.disabled} ?hidden=${!!o.hidden} aria-selected=${o.selected}>\n <slot name=\"option-${i + 1}\">\n <nve-icon part=\"icon\" name=\"check\" size=\"sm\" aria-hidden=\"true\"></nve-icon> ${o.innerText}\n </slot>\n </nve-menu-item>`\n )}\n </nve-menu>`;\n }\n\n protected get suffixContent() {\n return this.#select?.size === 0\n ? html`\n <nve-icon name=\"caret\" part=\"caret\" direction=\"down\" size=\"sm\" aria-hidden=\"true\"></nve-icon>\n <nve-dropdown part=\"dropdown\" @close=${this.#closeDropdown} @open=${this.#openDropdown} hidden .anchor=${this.#input as HTMLElement} position=\"bottom\">\n ${this.#menu}\n </nve-dropdown>`\n : this.#menu;\n }\n\n async firstUpdated(props: PropertyValues<this>) {\n super.firstUpdated(props);\n await this.updateComplete;\n this.#setupCustomSelectUI();\n }\n\n #syncSelectValueStates() {\n this.#observers.push(\n getElementUpdate(this.#select, 'value', () => this.requestUpdate()),\n onChildListMutation(this.#select, () => this.requestUpdate(), { attributes: true, subtree: true }),\n onChildListMutation(this.#select, () => this.#syncOptionSelectedStates(), { subtree: true })\n );\n }\n\n #optionObservers = new Map<HTMLOptionElement, MutationObserver>();\n\n #setupObservers() {\n this.#disconnectObservers();\n this.#setupOverflowListener();\n this.#syncSelectValueStates();\n this.#syncOptionSelectedStates();\n }\n\n #disconnectObservers() {\n this.#observers.forEach(observer => observer.disconnect());\n this.#observers = [];\n this.#optionObservers.clear();\n }\n\n #syncOptionSelectedStates() {\n const options = new Set(this.#options);\n\n this.#optionObservers.forEach((observer, option) => {\n if (!options.has(option)) {\n observer.disconnect();\n this.#optionObservers.delete(option);\n this.#observers = this.#observers.filter(o => o !== observer);\n }\n });\n\n this.#options.forEach(o => {\n if (!this.#optionObservers.has(o)) {\n const observer = getElementUpdate(o, 'selected', () => this.requestUpdate());\n this.#optionObservers.set(o, observer);\n this.#observers.push(observer);\n }\n });\n }\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n void this.updateComplete.then(() => {\n if (this.isConnected) {\n this.#setupObservers();\n }\n });\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.#disconnectObservers();\n }\n\n async updated(props: PropertyValues<this>) {\n super.updated(props);\n if (this.#select?.size && this.#select?.size !== 0) {\n this._internals.states.add('size');\n this.style.setProperty('--size', `${this.#select?.size + 0.75}`);\n } else {\n this._internals.states.delete('size');\n this.style.removeProperty('--size');\n }\n\n if (this.#select?.multiple && this.#select?.size === 0) {\n this._internals.states.add('multiple');\n } else {\n this._internals.states.delete('multiple');\n }\n }\n\n #setupCustomSelectUI() {\n if (this.#select?.size === 0) {\n onListboxActivate(this.#select, () => {\n this.requestUpdate(); // update menu items\n this.#dropdown!.style.setProperty('--min-width', `${this.#input!.getBoundingClientRect().width}px`);\n this.#dropdown!.showPopover();\n focusElementTimeout(this.#menuItems[0] as HTMLElement);\n });\n }\n }\n\n #openDropdown() {\n this.#dropdown!.hidden = false;\n this.#caret!.direction = 'up';\n }\n\n #closeDropdown() {\n this.#dropdown!.hidden = true;\n this.#caret!.direction = 'down';\n }\n\n #setupOverflowListener() {\n const observer = new ResizeObserver(entries => this.#updateMultipleOverflow(entries[0]!.contentRect.width));\n this.#observers.push(observer);\n observer.observe(this.#input!);\n }\n\n async #selectValue(option: HTMLOptionElement, selected: boolean) {\n if (this.#select.multiple || (!this.#select.multiple && option.value !== this.#select.value)) {\n option.selected = selected;\n }\n\n // native select only the first selected option determines the select input value\n if (this.#select.selectedOptions.length < 1) {\n this.#select.value = selected ? option.value : '';\n }\n\n this.#select.dispatchEvent(new Event('input', { bubbles: true }));\n this.#select.dispatchEvent(new Event('change', { bubbles: true }));\n this.requestUpdate();\n\n if (!this.#select.multiple && this.#dropdown) {\n this.#dropdown.hidePopover();\n } else {\n await this.updateComplete;\n this.#updateMultipleOverflow(this.#input!.getBoundingClientRect().width);\n }\n }\n\n #updateMultipleOverflow(width: number) {\n const tags = this.#tags;\n if (this.#select?.multiple && tags && tags.getBoundingClientRect().width > width - 48) {\n this._internals.states.add('multiple-overflow');\n } else {\n this._internals.states.delete('multiple-overflow');\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6DO,IAAA,IAAA,cAAqB,EAAQ;;yBAmBM,IAAI,EAAqB,IAAI,eAGlC,KAAKA,GAAgB,gBAkCJ,CAAC,6BA+DlC,IAAI,IAAyC;;;gBAtHhD,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;kBAE1B;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B;IACzB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAK,SAAS,MAAM;IACpB,EAAS,SAAS,MAAM;IACxB,EAAI,SAAS,MAAM;EACtB;;CAKA;CAKA,IAAIC,KAAU;EACZ,OAAO,KAAK;CACd;CAEA,IAAIC,KAAW;EACb,OAAO,MAAM,KAAK,KAAKD,IAAS,UAAU,KAAKA,GAAQ,UAAU,CAAC,CAAC;CACrE;CAEA,IAAIE,KAA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AQ,GAC7B,EAAS,QAAQ,KAAKV,EAAO;CAC/B;CAEA,MAAMK,GAAa,GAA2B,GAAmB;EAc/D,CAbI,KAAKT,GAAQ,YAAa,CAAC,KAAKA,GAAQ,YAAY,EAAO,UAAU,KAAKA,GAAQ,WACpF,EAAO,WAAW,IAIhB,KAAKA,GAAQ,gBAAgB,SAAS,MACxC,KAAKA,GAAQ,QAAQ,IAAW,EAAO,QAAQ,KAGjD,KAAKA,GAAQ,cAAc,IAAI,MAAM,SAAS,EAAE,SAAS,GAAK,CAAC,CAAC,GAChE,KAAKA,GAAQ,cAAc,IAAI,MAAM,UAAU,EAAE,SAAS,GAAK,CAAC,CAAC,GACjE,KAAK,cAAc,GAEf,CAAC,KAAKA,GAAQ,YAAY,KAAKE,KACjC,KAAKA,GAAU,YAAY,KAE3B,MAAM,KAAK,gBACX,KAAKmB,GAAwB,KAAKjB,GAAQ,sBAAsB,EAAE,KAAK;CAE3E;CAEA,GAAwB,GAAe;EACrC,IAAM,IAAO,KAAKC;EAClB,AAAI,KAAKL,IAAS,YAAY,KAAQ,EAAK,sBAAsB,EAAE,QAAQ,IAAQ,KACjF,KAAK,WAAW,OAAO,IAAI,mBAAmB,IAE9C,KAAK,WAAW,OAAO,OAAO,mBAAmB;CAErD;AACF;GAlOG,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKxC,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UAxB3B,EAAa,GACb,EAAe,CAAA,GAAA,CAAA"}
@@ -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 { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
4
4
  import r from "./skeleton.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-skeleton",
18
- version: "2.0.0"
18
+ version: "2.0.2"
19
19
  };
20
20
  }
21
21
  render() {
@@ -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 { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
4
+ import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
5
5
  import { Icon as i } from "../icon/icon2.js";
6
6
  import a from "./sort-button.js";
7
7
  import { LitElement as o, html as s } from "lit";
@@ -19,7 +19,7 @@ var u = {
19
19
  static {
20
20
  this.metadata = {
21
21
  tag: "nve-sort-button",
22
- version: "2.0.0"
22
+ version: "2.0.2"
23
23
  };
24
24
  }
25
25
  static {
@@ -54,7 +54,7 @@ function d(e, t, n) {
54
54
  case "step": return _(e);
55
55
  case "smooth": return g(e);
56
56
  case "linear": return h(e);
57
- default: throw Error(`Unhandled interpolation: ${t}`);
57
+ default: return h(e);
58
58
  }
59
59
  }
60
60
  function f(e, t, n = 100) {
@@ -70,7 +70,9 @@ function f(e, t, n = 100) {
70
70
  case "linear":
71
71
  r = h(e);
72
72
  break;
73
- default: throw Error(`Unhandled interpolation: ${t}`);
73
+ default:
74
+ r = h(e);
75
+ break;
74
76
  }
75
77
  let i = e[e.length - 1], a = e[0];
76
78
  return r += ` L ${i.x.toFixed(2)} ${n.toFixed(2)}`, r += ` L ${a.x.toFixed(2)} ${n.toFixed(2)} Z`, r;
@@ -1 +1 @@
1
- {"version":3,"file":"sparkline.utils.js","names":[],"sources":["../../src/sparkline/sparkline.utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Dimensions, Interpolation, Point, Rect, Scale, SparklineMark } from '@nvidia-elements/core/internal';\n\nexport const PRECISION = 2;\nexport const VIEW_HEIGHT = 100;\nconst DEFAULT_INTERVAL_LENGTH_EM = 0.6;\n\nconst HORIZONTAL_UNIT_WIDTH = VIEW_HEIGHT * DEFAULT_INTERVAL_LENGTH_EM;\nconst COLUMN_GAP_RATIO = 0.7;\nconst WINLOSS_GAP_RATIO = 0.85;\n\nexport function toValidData(data: unknown): number[] {\n if (!Array.isArray(data)) return [];\n return data.filter(Number.isFinite);\n}\n\nexport function calculateViewBox(\n mark: SparklineMark,\n pointCount: number,\n intervalLength = DEFAULT_INTERVAL_LENGTH_EM\n): Dimensions {\n const isIntervalBased = mark === 'line' || mark === 'area' || mark === 'gradient';\n const widthUnitCount = isIntervalBased ? Math.max(pointCount - 1, 1) : pointCount;\n const normalizedIntervalLength =\n Number.isFinite(intervalLength) && intervalLength > 0 ? intervalLength : DEFAULT_INTERVAL_LENGTH_EM;\n const width =\n mark === 'line' ? widthUnitCount * VIEW_HEIGHT * normalizedIntervalLength : widthUnitCount * HORIZONTAL_UNIT_WIDTH;\n\n return {\n width,\n height: VIEW_HEIGHT\n };\n}\n\nexport function calculateDomain(\n values: number[],\n options: { explicitMin?: number; explicitMax?: number; includeZero?: boolean } = {}\n): Scale | undefined {\n if (values.length === 0) return undefined;\n const { explicitMin, explicitMax, includeZero = false } = options;\n\n const dataMinimum = Math.min(...values);\n const dataMaximum = Math.max(...values);\n\n return {\n min: explicitMin ?? (includeZero ? Math.min(dataMinimum, 0) : dataMinimum),\n max: explicitMax ?? (includeZero ? Math.max(dataMaximum, 0) : dataMaximum)\n };\n}\n\nexport function valueToY(value: number, range: { min: number; max: number }, viewHeight = VIEW_HEIGHT): number {\n const span = range.max - range.min;\n if (span === 0) return viewHeight / 2;\n return viewHeight - ((value - range.min) / span) * viewHeight;\n}\n\nexport function toPlotPoints(\n values: number[],\n range: { min: number; max: number },\n view: { width: number; height?: number }\n): Point[] {\n const viewHeight = view.height ?? VIEW_HEIGHT;\n const stepX = values.length > 1 ? view.width / (values.length - 1) : 0;\n return values.map((value, index) => ({\n x: index * stepX,\n y: valueToY(value, range, viewHeight)\n }));\n}\n\nexport function calculateSymbolIndices(\n values: number[],\n denote: { first: boolean; last: boolean; min: boolean; max: boolean }\n): Set<number> {\n const indices = new Set<number>();\n if (values.length === 0) return indices;\n\n if (denote.first) indices.add(0);\n if (denote.last) indices.add(values.length - 1);\n\n const needsExtrema = denote.min || denote.max;\n if (!needsExtrema) return indices;\n\n const min = Math.min(...values);\n const max = Math.max(...values);\n\n values.forEach((value, index) => {\n if (denote.min && value === min) indices.add(index);\n if (denote.max && value === max) indices.add(index);\n });\n\n return indices;\n}\n\nexport function toInterpolation(interpolation: unknown): Interpolation {\n switch (interpolation) {\n case 'linear':\n return 'linear';\n case 'smooth':\n return 'smooth';\n case 'step':\n return 'step';\n default: {\n return 'linear';\n }\n }\n}\n\nexport function toLinePath(points: Point[], interpolation: Interpolation, viewWidth: number): string {\n if (points.length === 0) return '';\n if (points.length === 1) {\n const y = points[0]!.y.toFixed(PRECISION);\n return `M 0 ${y} L ${viewWidth.toFixed(PRECISION)} ${y}`;\n }\n\n switch (interpolation) {\n case 'step':\n return toStepOpenPath(points);\n case 'smooth':\n return toSmoothOpenPath(points);\n case 'linear':\n return toLinearOpenPath(points);\n default: {\n const exhaustiveCheck: never = interpolation;\n throw new Error(`Unhandled interpolation: ${exhaustiveCheck}`);\n }\n }\n}\n\nexport function toAreaPath(points: Point[], interpolation: Interpolation, viewHeight = VIEW_HEIGHT): string {\n if (points.length === 0) return '';\n\n let openPath = '';\n switch (interpolation) {\n case 'step':\n openPath = toStepOpenPath(points);\n break;\n case 'smooth':\n openPath = toSmoothOpenPath(points);\n break;\n case 'linear':\n openPath = toLinearOpenPath(points);\n break;\n default: {\n const exhaustiveCheck: never = interpolation;\n throw new Error(`Unhandled interpolation: ${exhaustiveCheck}`);\n }\n }\n\n const last = points[points.length - 1]!;\n const first = points[0]!;\n openPath += ` L ${last.x.toFixed(PRECISION)} ${viewHeight.toFixed(PRECISION)}`;\n openPath += ` L ${first.x.toFixed(PRECISION)} ${viewHeight.toFixed(PRECISION)} Z`;\n return openPath;\n}\n\nexport function toColumnRects(points: Point[], baselineY: number, width: number): Rect[] {\n const { bandSize: bandWidth, stepSize: stepX } = calculateBandSizing(points.length, width, COLUMN_GAP_RATIO);\n\n return points.map((point, index) => {\n const x = index * stepX + (stepX - bandWidth) / 2;\n const height = Math.abs(point.y - baselineY);\n const y = Math.min(point.y, baselineY);\n return { x, y, width: bandWidth, height };\n });\n}\n\nexport function toWinLossRects(\n values: number[],\n baselineY: number,\n dimensions: { width: number; height: number }\n): (Rect & { className: 'win' | 'loss' | 'draw' })[] {\n const { bandSize: bandWidth, stepSize: stepX } = calculateBandSizing(\n values.length,\n dimensions.width,\n WINLOSS_GAP_RATIO\n );\n const barHeight = dimensions.height / 2;\n\n return values.map((value, index) => {\n const x = index * stepX + (stepX - bandWidth) / 2;\n\n if (value > 0) {\n return { className: 'win', x, y: baselineY - barHeight, width: bandWidth, height: barHeight };\n }\n\n if (value < 0) {\n return { className: 'loss', x, y: baselineY, width: bandWidth, height: barHeight };\n }\n\n return {\n className: 'draw',\n x,\n y: baselineY - barHeight / 4,\n width: bandWidth,\n height: barHeight / 2\n };\n });\n}\n\nfunction toLinearOpenPath(points: Point[]): string {\n return points.reduce((path, point, index) => {\n if (index === 0) {\n return `M ${point.x.toFixed(PRECISION)} ${point.y.toFixed(PRECISION)}`;\n }\n return `${path} L ${point.x.toFixed(PRECISION)} ${point.y.toFixed(PRECISION)}`;\n }, '');\n}\n\nfunction toSmoothOpenPath(points: Point[]): string {\n const segments = points.map((point, index) => {\n if (index === 0) {\n return `M ${point.x.toFixed(PRECISION)} ${point.y.toFixed(PRECISION)}`;\n }\n const previous = points[index - 1]!;\n const deltaX = (point.x - previous.x) / 3;\n const p = PRECISION;\n return `C ${(previous.x + deltaX).toFixed(p)} ${previous.y.toFixed(p)} ${(point.x - deltaX).toFixed(p)} ${point.y.toFixed(p)} ${point.x.toFixed(p)} ${point.y.toFixed(p)}`;\n });\n return segments.join(' ');\n}\n\nfunction toStepOpenPath(points: Point[]): string {\n let path = `M ${points[0]!.x.toFixed(PRECISION)} ${points[0]!.y.toFixed(PRECISION)}`;\n for (let index = 1; index < points.length; index++) {\n const point = points[index]!;\n path += ` H ${point.x.toFixed(PRECISION)} V ${point.y.toFixed(PRECISION)}`;\n }\n return path;\n}\n\nfunction calculateBandSizing(count: number, viewDimension: number, gapRatio: number) {\n if (count <= 0) return { bandSize: 0, stepSize: 0 };\n\n const stepSize = viewDimension / count;\n const bandSize = stepSize * gapRatio;\n return { bandSize, stepSize };\n}\n"],"mappings":"AAOA,IAAM,IAA6B,IAE7B,IAAA,MAAsC,GACtC,IAAmB,IACnB,IAAoB;AAE1B,SAAgB,EAAY,GAAyB;CAEnD,OADK,MAAM,QAAQ,CAAI,IAChB,EAAK,OAAO,OAAO,QAAQ,IADD,CAAC;AAEpC;AAEA,SAAgB,EACd,GACA,GACA,IAAiB,GACL;CAEZ,IAAM,IADkB,MAAS,UAAU,MAAS,UAAU,MAAS,aAC9B,KAAK,IAAI,IAAa,GAAG,CAAC,IAAI,GACjE,IACJ,OAAO,SAAS,CAAc,KAAK,IAAiB,IAAI,IAAiB;CAI3E,OAAO;EACL,OAHA,MAAS,SAAS,IAAA,MAA+B,IAA2B,IAAiB;EAI7F,QAAA;CACF;AACF;AAEA,SAAgB,EACd,GACA,IAAiF,CAAC,GAC/D;CACnB,IAAI,EAAO,WAAW,GAAG;CACzB,IAAM,EAAE,gBAAa,gBAAa,iBAAc,OAAU,GAEpD,IAAc,KAAK,IAAI,GAAG,CAAM,GAChC,IAAc,KAAK,IAAI,GAAG,CAAM;CAEtC,OAAO;EACL,KAAK,MAAgB,IAA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AG,EAAO,GAAI,EAAE,QAAA,CAAiB;CACjF,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAO,QAAQ,KAAS;EAClD,IAAM,IAAQ,EAAO;EACrB,KAAQ,MAAM,EAAM,EAAE,QAAA,CAAiB,EAAE,KAAK,EAAM,EAAE,QAAA,CAAiB;CACzE;CACA,OAAO;AACT;AAEA,SAAS,EAAoB,GAAe,GAAuB,GAAkB;CACnF,IAAI,KAAS,GAAG,OAAO;EAAE,UAAU;EAAG,UAAU;CAAE;CAElD,IAAM,IAAW,IAAgB;CAEjC,OAAO;EAAE,UADQ,IAAW;EACT;CAAS;AAC9B"}
1
+ {"version":3,"file":"sparkline.utils.js","names":[],"sources":["../../src/sparkline/sparkline.utils.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { Dimensions, Interpolation, Point, Rect, Scale, SparklineMark } from '@nvidia-elements/core/internal';\n\nexport const PRECISION = 2;\nexport const VIEW_HEIGHT = 100;\nconst DEFAULT_INTERVAL_LENGTH_EM = 0.6;\n\nconst HORIZONTAL_UNIT_WIDTH = VIEW_HEIGHT * DEFAULT_INTERVAL_LENGTH_EM;\nconst COLUMN_GAP_RATIO = 0.7;\nconst WINLOSS_GAP_RATIO = 0.85;\n\nexport function toValidData(data: unknown): number[] {\n if (!Array.isArray(data)) return [];\n return data.filter(Number.isFinite);\n}\n\nexport function calculateViewBox(\n mark: SparklineMark,\n pointCount: number,\n intervalLength = DEFAULT_INTERVAL_LENGTH_EM\n): Dimensions {\n const isIntervalBased = mark === 'line' || mark === 'area' || mark === 'gradient';\n const widthUnitCount = isIntervalBased ? Math.max(pointCount - 1, 1) : pointCount;\n const normalizedIntervalLength =\n Number.isFinite(intervalLength) && intervalLength > 0 ? intervalLength : DEFAULT_INTERVAL_LENGTH_EM;\n const width =\n mark === 'line' ? widthUnitCount * VIEW_HEIGHT * normalizedIntervalLength : widthUnitCount * HORIZONTAL_UNIT_WIDTH;\n\n return {\n width,\n height: VIEW_HEIGHT\n };\n}\n\nexport function calculateDomain(\n values: number[],\n options: { explicitMin?: number; explicitMax?: number; includeZero?: boolean } = {}\n): Scale | undefined {\n if (values.length === 0) return undefined;\n const { explicitMin, explicitMax, includeZero = false } = options;\n\n const dataMinimum = Math.min(...values);\n const dataMaximum = Math.max(...values);\n\n return {\n min: explicitMin ?? (includeZero ? Math.min(dataMinimum, 0) : dataMinimum),\n max: explicitMax ?? (includeZero ? Math.max(dataMaximum, 0) : dataMaximum)\n };\n}\n\nexport function valueToY(value: number, range: { min: number; max: number }, viewHeight = VIEW_HEIGHT): number {\n const span = range.max - range.min;\n if (span === 0) return viewHeight / 2;\n return viewHeight - ((value - range.min) / span) * viewHeight;\n}\n\nexport function toPlotPoints(\n values: number[],\n range: { min: number; max: number },\n view: { width: number; height?: number }\n): Point[] {\n const viewHeight = view.height ?? VIEW_HEIGHT;\n const stepX = values.length > 1 ? view.width / (values.length - 1) : 0;\n return values.map((value, index) => ({\n x: index * stepX,\n y: valueToY(value, range, viewHeight)\n }));\n}\n\nexport function calculateSymbolIndices(\n values: number[],\n denote: { first: boolean; last: boolean; min: boolean; max: boolean }\n): Set<number> {\n const indices = new Set<number>();\n if (values.length === 0) return indices;\n\n if (denote.first) indices.add(0);\n if (denote.last) indices.add(values.length - 1);\n\n const needsExtrema = denote.min || denote.max;\n if (!needsExtrema) return indices;\n\n const min = Math.min(...values);\n const max = Math.max(...values);\n\n values.forEach((value, index) => {\n if (denote.min && value === min) indices.add(index);\n if (denote.max && value === max) indices.add(index);\n });\n\n return indices;\n}\n\nexport function toInterpolation(interpolation: unknown): Interpolation {\n switch (interpolation) {\n case 'linear':\n return 'linear';\n case 'smooth':\n return 'smooth';\n case 'step':\n return 'step';\n default: {\n return 'linear';\n }\n }\n}\n\nexport function toLinePath(points: Point[], interpolation: Interpolation, viewWidth: number): string {\n if (points.length === 0) return '';\n if (points.length === 1) {\n const y = points[0]!.y.toFixed(PRECISION);\n return `M 0 ${y} L ${viewWidth.toFixed(PRECISION)} ${y}`;\n }\n\n switch (interpolation) {\n case 'step':\n return toStepOpenPath(points);\n case 'smooth':\n return toSmoothOpenPath(points);\n case 'linear':\n return toLinearOpenPath(points);\n default:\n return toLinearOpenPath(points);\n }\n}\n\nexport function toAreaPath(points: Point[], interpolation: Interpolation, viewHeight = VIEW_HEIGHT): string {\n if (points.length === 0) return '';\n\n let openPath = '';\n switch (interpolation) {\n case 'step':\n openPath = toStepOpenPath(points);\n break;\n case 'smooth':\n openPath = toSmoothOpenPath(points);\n break;\n case 'linear':\n openPath = toLinearOpenPath(points);\n break;\n default:\n openPath = toLinearOpenPath(points);\n break;\n }\n\n const last = points[points.length - 1]!;\n const first = points[0]!;\n openPath += ` L ${last.x.toFixed(PRECISION)} ${viewHeight.toFixed(PRECISION)}`;\n openPath += ` L ${first.x.toFixed(PRECISION)} ${viewHeight.toFixed(PRECISION)} Z`;\n return openPath;\n}\n\nexport function toColumnRects(points: Point[], baselineY: number, width: number): Rect[] {\n const { bandSize: bandWidth, stepSize: stepX } = calculateBandSizing(points.length, width, COLUMN_GAP_RATIO);\n\n return points.map((point, index) => {\n const x = index * stepX + (stepX - bandWidth) / 2;\n const height = Math.abs(point.y - baselineY);\n const y = Math.min(point.y, baselineY);\n return { x, y, width: bandWidth, height };\n });\n}\n\nexport function toWinLossRects(\n values: number[],\n baselineY: number,\n dimensions: { width: number; height: number }\n): (Rect & { className: 'win' | 'loss' | 'draw' })[] {\n const { bandSize: bandWidth, stepSize: stepX } = calculateBandSizing(\n values.length,\n dimensions.width,\n WINLOSS_GAP_RATIO\n );\n const barHeight = dimensions.height / 2;\n\n return values.map((value, index) => {\n const x = index * stepX + (stepX - bandWidth) / 2;\n\n if (value > 0) {\n return { className: 'win', x, y: baselineY - barHeight, width: bandWidth, height: barHeight };\n }\n\n if (value < 0) {\n return { className: 'loss', x, y: baselineY, width: bandWidth, height: barHeight };\n }\n\n return {\n className: 'draw',\n x,\n y: baselineY - barHeight / 4,\n width: bandWidth,\n height: barHeight / 2\n };\n });\n}\n\nfunction toLinearOpenPath(points: Point[]): string {\n return points.reduce((path, point, index) => {\n if (index === 0) {\n return `M ${point.x.toFixed(PRECISION)} ${point.y.toFixed(PRECISION)}`;\n }\n return `${path} L ${point.x.toFixed(PRECISION)} ${point.y.toFixed(PRECISION)}`;\n }, '');\n}\n\nfunction toSmoothOpenPath(points: Point[]): string {\n const segments = points.map((point, index) => {\n if (index === 0) {\n return `M ${point.x.toFixed(PRECISION)} ${point.y.toFixed(PRECISION)}`;\n }\n const previous = points[index - 1]!;\n const deltaX = (point.x - previous.x) / 3;\n const p = PRECISION;\n return `C ${(previous.x + deltaX).toFixed(p)} ${previous.y.toFixed(p)} ${(point.x - deltaX).toFixed(p)} ${point.y.toFixed(p)} ${point.x.toFixed(p)} ${point.y.toFixed(p)}`;\n });\n return segments.join(' ');\n}\n\nfunction toStepOpenPath(points: Point[]): string {\n let path = `M ${points[0]!.x.toFixed(PRECISION)} ${points[0]!.y.toFixed(PRECISION)}`;\n for (let index = 1; index < points.length; index++) {\n const point = points[index]!;\n path += ` H ${point.x.toFixed(PRECISION)} V ${point.y.toFixed(PRECISION)}`;\n }\n return path;\n}\n\nfunction calculateBandSizing(count: number, viewDimension: number, gapRatio: number) {\n if (count <= 0) return { bandSize: 0, stepSize: 0 };\n\n const stepSize = viewDimension / count;\n const bandSize = stepSize * gapRatio;\n return { bandSize, stepSize };\n}\n"],"mappings":"AAOA,IAAM,IAA6B,IAE7B,IAAA,MAAsC,GACtC,IAAmB,IACnB,IAAoB;AAE1B,SAAgB,EAAY,GAAyB;CAEnD,OADK,MAAM,QAAQ,CAAI,IAChB,EAAK,OAAO,OAAO,QAAQ,IADD,CAAC;AAEpC;AAEA,SAAgB,EACd,GACA,GACA,IAAiB,GACL;CAEZ,IAAM,IADkB,MAAS,UAAU,MAAS,UAAU,MAAS,aAC9B,KAAK,IAA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AAS,KAAK;EAExC,OAAO,MAAM,EAAS,IAAI,GAAQ,QAAQ,CAAC,EAAE,GAAG,EAAS,EAAE,QAAQ,CAAC,EAAE,IAAI,EAAM,IAAI,GAAQ,QAAQ,CAAC,EAAE,GAAG,EAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAM,EAAE,QAAQ,CAAC,EAAE,GAAG,EAAM,EAAE,QAAQ,CAAC;CACzK,CACO,EAAS,KAAK,GAAG;AAC1B;AAEA,SAAS,EAAe,GAAyB;CAC/C,IAAI,IAAO,KAAK,EAAO,GAAI,EAAE,QAAA,CAAiB,EAAE,GAAG,EAAO,GAAI,EAAE,QAAA,CAAiB;CACjF,KAAK,IAAI,IAAQ,GAAG,IAAQ,EAAO,QAAQ,KAAS;EAClD,IAAM,IAAQ,EAAO;EACrB,KAAQ,MAAM,EAAM,EAAE,QAAA,CAAiB,EAAE,KAAK,EAAM,EAAE,QAAA,CAAiB;CACzE;CACA,OAAO;AACT;AAEA,SAAS,EAAoB,GAAe,GAAuB,GAAkB;CACnF,IAAI,KAAS,GAAG,OAAO;EAAE,UAAU;EAAG,UAAU;CAAE;CAElD,IAAM,IAAW,IAAgB;CAEjC,OAAO;EAAE,UADQ,IAAW;EACT;CAAS;AAC9B"}
@@ -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 { __decorate as i } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as i } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
4
4
  import { calculateDomain as a, calculateSymbolIndices as o, calculateViewBox as s, toAreaPath as c, toColumnRects as l, toInterpolation as u, toLinePath as d, toPlotPoints as f, toValidData as p, toWinLossRects as m, valueToY as h } from "./sparkline.utils.js";
5
5
  import g from "./sparkline.js";
6
6
  import { LitElement as _, html as v, nothing as y, svg as b } from "lit";
@@ -21,7 +21,7 @@ var C = class extends _ {
21
21
  static {
22
22
  this.metadata = {
23
23
  tag: "nve-sparkline",
24
- version: "2.0.0"
24
+ version: "2.0.2"
25
25
  };
26
26
  }
27
27
  render() {
@@ -1,7 +1,7 @@
1
1
  import { getElementUpdate as e } from "../internal/utils/dom.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 { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
4
+ import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
5
5
  import { Icon as i } from "../icon/icon2.js";
6
6
  import { Control as a } from "../forms/control/control2.js";
7
7
  import o from "./star-rating.js";
@@ -18,7 +18,7 @@ var l = class extends a {
18
18
  static {
19
19
  this.metadata = {
20
20
  tag: "nve-star-rating",
21
- version: "2.0.0"
21
+ version: "2.0.2"
22
22
  };
23
23
  }
24
24
  static {
@@ -4,7 +4,7 @@ import { attachInternals as n } from "../internal/utils/a11y.js";
4
4
  import { stateSelected as r } from "../internal/controllers/state-selected.controller.js";
5
5
  import { scopedRegistry as i } from "../internal/decorators/scoped-registry.js";
6
6
  import { useStyles as a } from "../internal/styles/index.js";
7
- import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
7
+ import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
8
8
  import { IconButton as s } from "../icon-button/icon-button2.js";
9
9
  import c from "./steps-item.js";
10
10
  import l from "./steps.js";
@@ -23,7 +23,7 @@ var v = class extends h(d) {
23
23
  static {
24
24
  this.metadata = {
25
25
  tag: "nve-steps-item",
26
- version: "2.0.0",
26
+ version: "2.0.2",
27
27
  parents: ["nve-steps"]
28
28
  };
29
29
  }
@@ -69,7 +69,7 @@ var y = class extends d {
69
69
  static {
70
70
  this.metadata = {
71
71
  tag: "nve-steps",
72
- version: "2.0.0",
72
+ version: "2.0.2",
73
73
  children: ["nve-steps-item"]
74
74
  };
75
75
  }
@@ -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 { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
4
4
  import { ControlGroup as r } from "../forms/control-group/control-group2.js";
5
5
  import i from "./switch-group.js";
6
6
  //#region src/switch/switch-group.ts
@@ -11,7 +11,7 @@ var a = class extends r {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-switch-group",
14
- version: "2.0.0",
14
+ version: "2.0.2",
15
15
  children: [
16
16
  "label",
17
17
  "nve-control-message",
@@ -1,7 +1,7 @@
1
1
  import { audit as e } from "../internal/controllers/audit.controller.js";
2
2
  import { hostAttr as t } from "../internal/decorators/host-attr.js";
3
3
  import { useStyles as n } from "../internal/styles/index.js";
4
- import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
4
+ import { __decorate as r } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
5
5
  import { Control as i } from "../forms/control/control2.js";
6
6
  import a from "./switch.js";
7
7
  //#region src/switch/switch.ts
@@ -15,7 +15,7 @@ var o = class extends i {
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-switch",
18
- version: "2.0.0",
18
+ version: "2.0.2",
19
19
  children: [
20
20
  "label",
21
21
  "input",
@@ -2,7 +2,7 @@ import { audit as e } from "../internal/controllers/audit.controller.js";
2
2
  import { generateId as t, sameOrderedStringArray as n, uniqueNonEmptyStrings as r } from "../internal/utils/dom.js";
3
3
  import { attachInternals as i } from "../internal/utils/a11y.js";
4
4
  import { useStyles as a } from "../internal/styles/index.js";
5
- import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
5
+ import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
6
6
  import { Tabs as s } from "./tabs2.js";
7
7
  import c from "./tabs-group.js";
8
8
  import { LitElement as l, html as u } from "lit";
@@ -33,7 +33,7 @@ var m, h = class extends l {
33
33
  static {
34
34
  this.metadata = {
35
35
  tag: "nve-tabs-group",
36
- version: "2.0.0",
36
+ version: "2.0.2",
37
37
  children: ["nve-tabs"]
38
38
  };
39
39
  }
@@ -4,7 +4,7 @@ import { keyNavigationList as i } from "../internal/controllers/keynav-list.cont
4
4
  import { attachInternals as a } from "../internal/utils/a11y.js";
5
5
  import { stateSelected as o } from "../internal/controllers/state-selected.controller.js";
6
6
  import { useStyles as s } from "../internal/styles/index.js";
7
- import { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
7
+ import { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
8
8
  import l from "./tabs.global.js";
9
9
  import u from "./tabs-item.js";
10
10
  import d from "./tabs.js";
@@ -20,7 +20,7 @@ var _ = class extends h(f) {
20
20
  static {
21
21
  this.metadata = {
22
22
  tag: "nve-tabs-item",
23
- version: "2.0.0",
23
+ version: "2.0.2",
24
24
  parents: ["nve-tabs"]
25
25
  };
26
26
  }
@@ -53,7 +53,7 @@ var v = class extends f {
53
53
  static {
54
54
  this.metadata = {
55
55
  tag: "nve-tabs",
56
- version: "2.0.0",
56
+ version: "2.0.2",
57
57
  children: ["nve-tabs-item"]
58
58
  };
59
59
  }
package/dist/tag/tag2.js CHANGED
@@ -2,7 +2,7 @@ import { I18nController as e } from "../internal/controllers/i18n.controller.js"
2
2
  import { TypeClosableController as t } from "../internal/controllers/type-closable.controller.js";
3
3
  import { scopedRegistry as n } from "../internal/decorators/scoped-registry.js";
4
4
  import { colorStateStyles as r, useStyles as i } from "../internal/styles/index.js";
5
- import { __decorate as a } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
5
+ import { __decorate as a } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
6
6
  import { Icon as o } from "../icon/icon2.js";
7
7
  import s from "./tag.js";
8
8
  import { LitElement as c, html as l } from "lit";
@@ -17,7 +17,7 @@ var p = class extends d(c) {
17
17
  static {
18
18
  this.metadata = {
19
19
  tag: "nve-tag",
20
- version: "2.0.0"
20
+ version: "2.0.2"
21
21
  };
22
22
  }
23
23
  static {
@@ -9,7 +9,7 @@ var r = class extends t {
9
9
  static {
10
10
  this.metadata = {
11
11
  tag: "nve-textarea",
12
- version: "2.0.0"
12
+ version: "2.0.2"
13
13
  };
14
14
  }
15
15
  };
@@ -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 { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.133.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-time",
22
- version: "2.0.0"
22
+ version: "2.0.2"
23
23
  };
24
24
  }
25
25
  static {
@@ -6,7 +6,7 @@ import { scopedRegistry as i } from "../internal/decorators/scoped-registry.js";
6
6
  import { useStyles as a } from "../internal/styles/index.js";
7
7
  import { popoverStyles as o } from "../internal/styles/popover2.js";
8
8
  import { statusIcons as s } from "../internal/types/index.js";
9
- import { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
9
+ import { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
10
10
  import { Icon as l } from "../icon/icon2.js";
11
11
  import { IconButton as u } from "../icon-button/icon-button2.js";
12
12
  import d from "./toast.js";
@@ -23,7 +23,7 @@ var g = class extends f {
23
23
  static {
24
24
  this.metadata = {
25
25
  tag: "nve-toast",
26
- version: "2.0.0"
26
+ version: "2.0.2"
27
27
  };
28
28
  }
29
29
  static {
@@ -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 { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
4
4
  import r from "./toggletip-footer.js";
5
5
  import { LitElement as i, html as a } from "lit";
6
6
  //#region src/toggletip/toggletip-footer.ts
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-toggletip-footer",
14
- version: "2.0.0",
14
+ version: "2.0.2",
15
15
  parents: ["nve-toggletip"]
16
16
  };
17
17
  }
@@ -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 { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
4
4
  import r from "./toggletip-header.js";
5
5
  import { LitElement as i, html as a } from "lit";
6
6
  //#region src/toggletip/toggletip-header.ts
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-toggletip-header",
14
- version: "2.0.0",
14
+ version: "2.0.2",
15
15
  parents: ["nve-toggletip"]
16
16
  };
17
17
  }
@@ -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 { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
9
+ import { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
10
10
  import { IconButton as l } from "../icon-button/icon-button2.js";
11
11
  import u from "./toggletip.js";
12
12
  import d from "./toggletip.global.js";
@@ -24,7 +24,7 @@ var g = class extends f {
24
24
  static {
25
25
  this.metadata = {
26
26
  tag: "nve-toggletip",
27
- version: "2.0.0"
27
+ version: "2.0.2"
28
28
  };
29
29
  }
30
30
  static {
@@ -1,7 +1,7 @@
1
1
  import { applySlotContentStates as e, hasHorizontalScrollBar as t } from "../internal/utils/dom.js";
2
2
  import { attachInternals as n } from "../internal/utils/a11y.js";
3
3
  import { statusStateStyles as r, supportStateStyles as i, useStyles as a } from "../internal/styles/index.js";
4
- import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
4
+ import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
5
5
  import s from "./toolbar.js";
6
6
  import { LitElement as c, html as l } from "lit";
7
7
  import { property as u } from "lit/decorators/property.js";
@@ -21,7 +21,7 @@ var f = class extends c {
21
21
  static {
22
22
  this.metadata = {
23
23
  tag: "nve-toolbar",
24
- version: "2.0.0"
24
+ version: "2.0.2"
25
25
  };
26
26
  }
27
27
  static {
@@ -3,7 +3,7 @@ import { attachInternals as t } from "../internal/utils/a11y.js";
3
3
  import { TypeNativePopoverController as n } from "../internal/controllers/type-native-popover.controller.js";
4
4
  import { useStyles as r } from "../internal/styles/index.js";
5
5
  import { popoverStyles as i } from "../internal/styles/popover2.js";
6
- import { __decorate as a } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
6
+ import { __decorate as a } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
7
7
  import o from "./tooltip.js";
8
8
  import { LitElement as s, html as c } from "lit";
9
9
  import { property as l } from "lit/decorators/property.js";
@@ -19,7 +19,7 @@ var d = class extends s {
19
19
  static {
20
20
  this.metadata = {
21
21
  tag: "nve-tooltip",
22
- version: "2.0.0"
22
+ version: "2.0.2"
23
23
  };
24
24
  }
25
25
  render() {
@@ -12,7 +12,7 @@ import { typeSSR as u } from "../internal/controllers/type-ssr.controller.js";
12
12
  import { hostAttr as d } from "../internal/decorators/host-attr.js";
13
13
  import { scopedRegistry as f } from "../internal/decorators/scoped-registry.js";
14
14
  import { useStyles as p } from "../internal/styles/index.js";
15
- import { __decorate as m } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
15
+ import { __decorate as m } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
16
16
  import { Icon as h } from "../icon/icon2.js";
17
17
  import { IconButton as g } from "../icon-button/icon-button2.js";
18
18
  import { updateNodeSelection as _ } from "./utils.js";
@@ -41,7 +41,7 @@ var E = class extends b {
41
41
  static {
42
42
  this.metadata = {
43
43
  tag: "nve-tree-node",
44
- version: "2.0.0",
44
+ version: "2.0.2",
45
45
  parents: ["nve-tree", "nve-tree-node"]
46
46
  };
47
47
  }
@@ -4,7 +4,7 @@ import { appendRootNodeStyle as n } from "../internal/utils/dom.js";
4
4
  import { keyNavigationList as r } from "../internal/controllers/keynav-list.controller.js";
5
5
  import { attachInternals as i } from "../internal/utils/a11y.js";
6
6
  import { useStyles as a } from "../internal/styles/index.js";
7
- import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
7
+ import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
8
8
  import { updateNodeSelection as s } from "./utils.js";
9
9
  import { TreeNode as c } from "./tree-node2.js";
10
10
  import l from "./tree.js";
@@ -22,7 +22,7 @@ var m = class extends d {
22
22
  static {
23
23
  this.metadata = {
24
24
  tag: "nve-tree",
25
- version: "2.0.0",
25
+ version: "2.0.2",
26
26
  children: ["nve-tree-node"]
27
27
  };
28
28
  }
@@ -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 { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.132.0/helpers/decorate.js";
3
+ import { __decorate as n } from "../_virtual/_@oxc-project_runtime@0.133.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-week",
22
- version: "2.0.0"
22
+ version: "2.0.2"
23
23
  };
24
24
  }
25
25
  static {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nvidia-elements/core",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "release": {
5
5
  "extends": "../../release.config.js"
6
6
  },
@@ -921,10 +921,10 @@
921
921
  "dependencies": {
922
922
  "lit": "^3.3.3",
923
923
  "lit-html": "^3.3.3",
924
- "@nvidia-elements/forms": "^2.0.0"
924
+ "@nvidia-elements/forms": "^2.0.1"
925
925
  },
926
926
  "peerDependencies": {
927
- "@nvidia-elements/themes": ">=0.0.0 <1.0.0"
927
+ "@nvidia-elements/themes": "^2.0.0"
928
928
  },
929
929
  "optionalDependencies": {
930
930
  "@lit-labs/scoped-registry-mixin": "^1.0.4",
@@ -937,8 +937,8 @@
937
937
  "@eslint/js": "10.0.1",
938
938
  "@lit-labs/virtualizer": "2.1.1",
939
939
  "@typescript/lib-dom": "npm:@types/web@0.0.312",
940
- "@vitest/browser": "4.1.7",
941
- "@vitest/coverage-istanbul": "4.1.7",
940
+ "@vitest/browser": "4.1.9",
941
+ "@vitest/coverage-istanbul": "4.1.9",
942
942
  "axe-core": "4.11.0",
943
943
  "eslint": "10.4.0",
944
944
  "lit": "3.3.3",
@@ -950,13 +950,13 @@
950
950
  "svgo": "4.0.1",
951
951
  "ts-lit-plugin": "2.0.2",
952
952
  "typescript": "6.0.3",
953
- "vite": "8.0.14",
954
- "vitest": "4.1.7",
955
- "@internals/eslint": "0.0.0",
953
+ "vite": "8.0.16",
954
+ "vitest": "4.1.9",
956
955
  "@internals/testing": "0.0.0",
957
956
  "@internals/vite": "0.0.0",
958
- "@nvidia-elements/lint": "0.4.0",
959
- "@nvidia-elements/styles": "^2.0.0"
957
+ "@nvidia-elements/lint": "2.0.1",
958
+ "@internals/eslint": "0.0.0",
959
+ "@nvidia-elements/styles": "^2.0.2"
960
960
  },
961
961
  "wireit": {
962
962
  "ci": {
@@ -1,18 +0,0 @@
1
- import { ReactiveController, ReactiveElement } from 'lit';
2
- /**
3
- * Adds CSS State psuedo-selector :state(active) behavior for keydown space/enter for custom elements
4
- * https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/states
5
- */
6
- export declare function stateActive<T extends Active>(): ClassDecorator;
7
- type Active = ReactiveElement & {
8
- disabled: boolean;
9
- _internals?: ElementInternals;
10
- };
11
- export declare class StateActiveController<T extends Active> implements ReactiveController {
12
- #private;
13
- private host;
14
- constructor(host: T);
15
- hostConnected(): void;
16
- hostDisconnected(): void;
17
- }
18
- export {};