@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.
Files changed (255) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +8 -0
  3. package/dist/_virtual/{_@oxc-project_runtime@0.139.0 → _@oxc-project_runtime@0.147.0}/helpers/esm/decorate.js +1 -1
  4. package/dist/accordion/accordion2.js +5 -5
  5. package/dist/accordion/accordion2.js.map +1 -1
  6. package/dist/alert/alert-group2.js +2 -2
  7. package/dist/alert/alert-group2.js.map +1 -1
  8. package/dist/alert/alert2.js +2 -2
  9. package/dist/alert/alert2.js.map +1 -1
  10. package/dist/avatar/avatar-group2.js +1 -1
  11. package/dist/avatar/avatar-group2.js.map +1 -1
  12. package/dist/avatar/avatar2.js +2 -2
  13. package/dist/avatar/avatar2.js.map +1 -1
  14. package/dist/badge/badge2.js +2 -2
  15. package/dist/badge/badge2.js.map +1 -1
  16. package/dist/breadcrumb/breadcrumb2.js +2 -2
  17. package/dist/breadcrumb/breadcrumb2.js.map +1 -1
  18. package/dist/bundles/index.d.ts +2 -0
  19. package/dist/bundles/index.js +6 -6
  20. package/dist/button/button2.js +2 -2
  21. package/dist/button/button2.js.map +1 -1
  22. package/dist/button-group/button-group2.js +2 -2
  23. package/dist/button-group/button-group2.js.map +1 -1
  24. package/dist/card/card2.js +5 -5
  25. package/dist/card/card2.js.map +1 -1
  26. package/dist/chat-message/chat-message2.js +2 -2
  27. package/dist/chat-message/chat-message2.js.map +1 -1
  28. package/dist/checkbox/checkbox-group2.js +2 -2
  29. package/dist/checkbox/checkbox-group2.js.map +1 -1
  30. package/dist/checkbox/checkbox2.js +2 -2
  31. package/dist/checkbox/checkbox2.js.map +1 -1
  32. package/dist/color/color2.js +2 -2
  33. package/dist/color/color2.js.map +1 -1
  34. package/dist/combobox/combobox.examples.js.map +1 -1
  35. package/dist/combobox/combobox2.js +7 -5
  36. package/dist/combobox/combobox2.js.map +1 -1
  37. package/dist/copy-button/copy-button2.js +2 -2
  38. package/dist/copy-button/copy-button2.js.map +1 -1
  39. package/dist/custom-elements-jsx.d.ts +2 -0
  40. package/dist/custom-elements-vue.d.ts +2 -0
  41. package/dist/custom-elements.json +9 -1
  42. package/dist/data.html.json +1 -1
  43. package/dist/date/date2.js +2 -2
  44. package/dist/date/date2.js.map +1 -1
  45. package/dist/datetime/datetime2.js +2 -2
  46. package/dist/datetime/datetime2.js.map +1 -1
  47. package/dist/dialog/dialog-footer2.js +2 -2
  48. package/dist/dialog/dialog-footer2.js.map +1 -1
  49. package/dist/dialog/dialog-header2.js +2 -2
  50. package/dist/dialog/dialog-header2.js.map +1 -1
  51. package/dist/dialog/dialog2.js +2 -2
  52. package/dist/dialog/dialog2.js.map +1 -1
  53. package/dist/divider/divider2.js +2 -2
  54. package/dist/divider/divider2.js.map +1 -1
  55. package/dist/dot/dot2.js +2 -2
  56. package/dist/dot/dot2.js.map +1 -1
  57. package/dist/drawer/drawer-content2.js +2 -2
  58. package/dist/drawer/drawer-content2.js.map +1 -1
  59. package/dist/drawer/drawer-footer2.js +2 -2
  60. package/dist/drawer/drawer-footer2.js.map +1 -1
  61. package/dist/drawer/drawer-header2.js +2 -2
  62. package/dist/drawer/drawer-header2.js.map +1 -1
  63. package/dist/drawer/drawer2.js +2 -2
  64. package/dist/drawer/drawer2.js.map +1 -1
  65. package/dist/dropdown/dropdown-footer2.js +2 -2
  66. package/dist/dropdown/dropdown-footer2.js.map +1 -1
  67. package/dist/dropdown/dropdown-header2.js +2 -2
  68. package/dist/dropdown/dropdown-header2.js.map +1 -1
  69. package/dist/dropdown/dropdown2.js +2 -2
  70. package/dist/dropdown/dropdown2.js.map +1 -1
  71. package/dist/dropdown-group/dropdown-group.js +2 -2
  72. package/dist/dropdown-group/dropdown-group.js.map +1 -1
  73. package/dist/dropzone/dropzone2.js +2 -2
  74. package/dist/dropzone/dropzone2.js.map +1 -1
  75. package/dist/file/file2.js +1 -1
  76. package/dist/file/file2.js.map +1 -1
  77. package/dist/format-bytes/format-bytes2.js +2 -2
  78. package/dist/format-bytes/format-bytes2.js.map +1 -1
  79. package/dist/format-datetime/format-datetime2.js +2 -2
  80. package/dist/format-datetime/format-datetime2.js.map +1 -1
  81. package/dist/format-number/format-number2.js +2 -2
  82. package/dist/format-number/format-number2.js.map +1 -1
  83. package/dist/format-relative-time/format-relative-time2.js +2 -2
  84. package/dist/format-relative-time/format-relative-time2.js.map +1 -1
  85. package/dist/format-truncate/format-truncate2.js +2 -2
  86. package/dist/format-truncate/format-truncate2.js.map +1 -1
  87. package/dist/forms/control/control2.js +2 -2
  88. package/dist/forms/control/control2.js.map +1 -1
  89. package/dist/forms/control-group/control-group2.js +2 -2
  90. package/dist/forms/control-group/control-group2.js.map +1 -1
  91. package/dist/forms/control-message/control-message2.js +2 -2
  92. package/dist/forms/control-message/control-message2.js.map +1 -1
  93. package/dist/forms/validation.examples.js.map +1 -1
  94. package/dist/gauge/gauge2.js +2 -2
  95. package/dist/gauge/gauge2.js.map +1 -1
  96. package/dist/grid/cell/cell2.js +1 -1
  97. package/dist/grid/cell/cell2.js.map +1 -1
  98. package/dist/grid/column/column2.js +2 -2
  99. package/dist/grid/column/column2.js.map +1 -1
  100. package/dist/grid/footer/footer2.js +2 -2
  101. package/dist/grid/footer/footer2.js.map +1 -1
  102. package/dist/grid/grid.examples.js.map +1 -1
  103. package/dist/grid/grid2.js +2 -2
  104. package/dist/grid/grid2.js.map +1 -1
  105. package/dist/grid/header/header2.js +2 -2
  106. package/dist/grid/header/header2.js.map +1 -1
  107. package/dist/grid/placeholder/placeholder2.js +1 -1
  108. package/dist/grid/placeholder/placeholder2.js.map +1 -1
  109. package/dist/grid/row/row2.js +2 -2
  110. package/dist/grid/row/row2.js.map +1 -1
  111. package/dist/icon/icon2.js +3 -3
  112. package/dist/icon/icon2.js.map +1 -1
  113. package/dist/icon-button/icon-button2.js +2 -2
  114. package/dist/icon-button/icon-button2.js.map +1 -1
  115. package/dist/index.js +1 -1
  116. package/dist/input/input-group2.js +1 -1
  117. package/dist/input/input-group2.js.map +1 -1
  118. package/dist/input/input2.js +2 -2
  119. package/dist/input/input2.js.map +1 -1
  120. package/dist/internal/controllers/audit.controller.js +9 -7
  121. package/dist/internal/controllers/audit.controller.js.map +1 -1
  122. package/dist/internal/controllers/gesture.controller.examples.js.map +1 -1
  123. package/dist/internal/controllers/gesture.controller.js +1 -3
  124. package/dist/internal/controllers/gesture.controller.js.map +1 -1
  125. package/dist/internal/controllers/i18n.controller.examples.js.map +1 -1
  126. package/dist/internal/controllers/i18n.controller.js.map +1 -1
  127. package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
  128. package/dist/internal/controllers/keynav-list.controller.js +1 -4
  129. package/dist/internal/controllers/keynav-list.controller.js.map +1 -1
  130. package/dist/internal/controllers/keynav-spatial.controller.js.map +1 -1
  131. package/dist/internal/controllers/state-scroll.controller.js.map +1 -1
  132. package/dist/internal/controllers/type-anchor.controller.js.map +1 -1
  133. package/dist/internal/controllers/type-closable.controller.js.map +1 -1
  134. package/dist/internal/controllers/type-expandable.controller.js.map +1 -1
  135. package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
  136. package/dist/internal/controllers/type-native-popover.utils.js +2 -2
  137. package/dist/internal/controllers/type-native-popover.utils.js.map +1 -1
  138. package/dist/internal/controllers/type-selectable.controller.js.map +1 -1
  139. package/dist/internal/controllers/type-ssr.controller.js.map +1 -1
  140. package/dist/internal/services/global.service.js +1 -1
  141. package/dist/internal/services/global.utils.js.map +1 -1
  142. package/dist/internal/services/log.service.js.map +1 -1
  143. package/dist/internal/services/transition.service.js.map +1 -1
  144. package/dist/internal/utils/dom.js +2 -1
  145. package/dist/internal/utils/dom.js.map +1 -1
  146. package/dist/internal/utils/strings.js +1 -1
  147. package/dist/internal/utils/strings.js.map +1 -1
  148. package/dist/logo/logo2.js +2 -2
  149. package/dist/logo/logo2.js.map +1 -1
  150. package/dist/menu/menu-item2.js +2 -2
  151. package/dist/menu/menu-item2.js.map +1 -1
  152. package/dist/menu/menu2.js +2 -2
  153. package/dist/menu/menu2.js.map +1 -1
  154. package/dist/month/month2.js +2 -2
  155. package/dist/month/month2.js.map +1 -1
  156. package/dist/notification/notification-group2.js +2 -2
  157. package/dist/notification/notification-group2.js.map +1 -1
  158. package/dist/notification/notification2.js +2 -2
  159. package/dist/notification/notification2.js.map +1 -1
  160. package/dist/page/page-panel/page-panel-content2.js +1 -1
  161. package/dist/page/page-panel/page-panel-content2.js.map +1 -1
  162. package/dist/page/page-panel/page-panel-footer2.js +2 -2
  163. package/dist/page/page-panel/page-panel-footer2.js.map +1 -1
  164. package/dist/page/page-panel/page-panel-header2.js +2 -2
  165. package/dist/page/page-panel/page-panel-header2.js.map +1 -1
  166. package/dist/page/page-panel/page-panel2.js +2 -2
  167. package/dist/page/page-panel/page-panel2.js.map +1 -1
  168. package/dist/page/page2.js +2 -2
  169. package/dist/page/page2.js.map +1 -1
  170. package/dist/page-header/page-header2.js +1 -1
  171. package/dist/page-header/page-header2.js.map +1 -1
  172. package/dist/page-loader/page-loader2.js +2 -2
  173. package/dist/page-loader/page-loader2.js.map +1 -1
  174. package/dist/pagination/pagination2.js +2 -2
  175. package/dist/pagination/pagination2.js.map +1 -1
  176. package/dist/panel/panel2.js +5 -5
  177. package/dist/panel/panel2.js.map +1 -1
  178. package/dist/password/password2.js +2 -2
  179. package/dist/password/password2.js.map +1 -1
  180. package/dist/polyfills/index.js +1 -1
  181. package/dist/polyfills/index.js.map +1 -1
  182. package/dist/preferences-input/preferences-input2.js +2 -2
  183. package/dist/preferences-input/preferences-input2.js.map +1 -1
  184. package/dist/progress-bar/progress-bar2.js +2 -2
  185. package/dist/progress-bar/progress-bar2.js.map +1 -1
  186. package/dist/progress-ring/progress-ring2.js +2 -2
  187. package/dist/progress-ring/progress-ring2.js.map +1 -1
  188. package/dist/progressive-filter-chip/progressive-filter-chip2.js +2 -2
  189. package/dist/progressive-filter-chip/progressive-filter-chip2.js.map +1 -1
  190. package/dist/pulse/pulse2.js +2 -2
  191. package/dist/pulse/pulse2.js.map +1 -1
  192. package/dist/radio/radio-group2.js +2 -2
  193. package/dist/radio/radio-group2.js.map +1 -1
  194. package/dist/radio/radio2.js +2 -2
  195. package/dist/radio/radio2.js.map +1 -1
  196. package/dist/range/range2.js +4 -4
  197. package/dist/range/range2.js.map +1 -1
  198. package/dist/resize-handle/resize-handle2.js +2 -2
  199. package/dist/resize-handle/resize-handle2.js.map +1 -1
  200. package/dist/search/search2.js +2 -2
  201. package/dist/search/search2.js.map +1 -1
  202. package/dist/select/select2.js +2 -2
  203. package/dist/select/select2.js.map +1 -1
  204. package/dist/skeleton/skeleton2.js +2 -2
  205. package/dist/skeleton/skeleton2.js.map +1 -1
  206. package/dist/sort-button/sort-button2.js +2 -2
  207. package/dist/sort-button/sort-button2.js.map +1 -1
  208. package/dist/sparkline/sparkline.utils.js +1 -3
  209. package/dist/sparkline/sparkline.utils.js.map +1 -1
  210. package/dist/sparkline/sparkline2.js +8 -6
  211. package/dist/sparkline/sparkline2.js.map +1 -1
  212. package/dist/star-rating/star-rating2.js +2 -2
  213. package/dist/star-rating/star-rating2.js.map +1 -1
  214. package/dist/steps/steps2.js +3 -3
  215. package/dist/steps/steps2.js.map +1 -1
  216. package/dist/switch/switch-group2.js +2 -2
  217. package/dist/switch/switch-group2.js.map +1 -1
  218. package/dist/switch/switch2.js +2 -2
  219. package/dist/switch/switch2.js.map +1 -1
  220. package/dist/tabs/tabs-group2.js +2 -2
  221. package/dist/tabs/tabs-group2.js.map +1 -1
  222. package/dist/tabs/tabs2.js +3 -3
  223. package/dist/tabs/tabs2.js.map +1 -1
  224. package/dist/tag/tag.d.ts +2 -0
  225. package/dist/tag/tag.examples.js.map +1 -1
  226. package/dist/tag/tag.examples.json +20 -3
  227. package/dist/tag/tag.js +1 -1
  228. package/dist/tag/tag.js.map +1 -1
  229. package/dist/tag/tag2.js +3 -3
  230. package/dist/tag/tag2.js.map +1 -1
  231. package/dist/textarea/textarea2.js +1 -1
  232. package/dist/textarea/textarea2.js.map +1 -1
  233. package/dist/time/time2.js +2 -2
  234. package/dist/time/time2.js.map +1 -1
  235. package/dist/toast/toast2.js +2 -2
  236. package/dist/toast/toast2.js.map +1 -1
  237. package/dist/toggletip/toggletip-footer2.js +2 -2
  238. package/dist/toggletip/toggletip-footer2.js.map +1 -1
  239. package/dist/toggletip/toggletip-header2.js +2 -2
  240. package/dist/toggletip/toggletip-header2.js.map +1 -1
  241. package/dist/toggletip/toggletip2.js +2 -2
  242. package/dist/toggletip/toggletip2.js.map +1 -1
  243. package/dist/toolbar/toolbar2.js +2 -2
  244. package/dist/toolbar/toolbar2.js.map +1 -1
  245. package/dist/tooltip/tooltip.examples.js.map +1 -1
  246. package/dist/tooltip/tooltip2.js +2 -2
  247. package/dist/tooltip/tooltip2.js.map +1 -1
  248. package/dist/tree/tree-node2.js +2 -2
  249. package/dist/tree/tree-node2.js.map +1 -1
  250. package/dist/tree/tree.examples.js.map +1 -1
  251. package/dist/tree/tree2.js +2 -2
  252. package/dist/tree/tree2.js.map +1 -1
  253. package/dist/week/week2.js +2 -2
  254. package/dist/week/week2.js.map +1 -1
  255. package/package.json +9 -9
@@ -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.139.0/helpers/esm/decorate.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
4
  import r from "./drawer-footer.js";
5
5
  import { LitElement as i, html as a } from "lit";
6
6
  //#region src/drawer/drawer-footer.ts
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-drawer-footer",
14
- version: "2.7.3",
14
+ version: "2.8.0",
15
15
  parents: ["nve-drawer"]
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-footer2.js","names":[],"sources":["../../src/drawer/drawer-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 './drawer-footer.css?inline';\n\n/**\n * @element nve-drawer-footer\n * @description Provides a fixed action area at the bottom of a drawer for primary actions such as save or cancel.\n * @documentation https://nvidia.github.io/elements/docs/elements/drawer/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer footer\n * @cssprop --border-top\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --min-height\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-footer',\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 connectedCallback() {\n super.connectedCallback();\n this.slot = 'footer';\n }\n}\n"],"mappings":";;;;;;AAqBO,IAAA,IAAA,cAA2B,EAAW;;gBAC3B,EAAU,CAAC,CAAM,CAAC;;;kBAEP;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;OAtBC,EAAM,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"drawer-footer2.js","names":[],"sources":["../../src/drawer/drawer-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 './drawer-footer.css?inline';\n\n/**\n * @element nve-drawer-footer\n * @description Provides a fixed action area at the bottom of a drawer for primary actions such as save or cancel.\n * @documentation https://nvidia.github.io/elements/docs/elements/drawer/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer footer\n * @cssprop --border-top\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --min-height\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-footer',\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 connectedCallback() {\n super.connectedCallback();\n this.slot = 'footer';\n }\n}\n"],"mappings":";;;;;;AAqBO,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.139.0/helpers/esm/decorate.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
4
  import r from "./drawer-header.js";
5
5
  import { LitElement as i, html as a } from "lit";
6
6
  //#region src/drawer/drawer-header.ts
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-drawer-header",
14
- version: "2.7.3",
14
+ version: "2.8.0",
15
15
  parents: ["nve-drawer"]
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-header2.js","names":[],"sources":["../../src/drawer/drawer-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 './drawer-header.css?inline';\n\n/**\n * @element nve-drawer-header\n * @description Displays the title and optional close control at the top of a drawer to identify its purpose.\n * @documentation https://nvidia.github.io/elements/docs/elements/drawer/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer header\n * @cssprop --border-bottom\n * @cssprop --min-height\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-header',\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 connectedCallback() {\n super.connectedCallback();\n this.slot = 'header';\n }\n}\n"],"mappings":";;;;;;AAoBO,IAAA,IAAA,cAA2B,EAAW;;gBAC3B,EAAU,CAAC,CAAM,CAAC;;;kBAEP;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;OAtBC,EAAM,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"drawer-header2.js","names":[],"sources":["../../src/drawer/drawer-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 './drawer-header.css?inline';\n\n/**\n * @element nve-drawer-header\n * @description Displays the title and optional close control at the top of a drawer to identify its purpose.\n * @documentation https://nvidia.github.io/elements/docs/elements/drawer/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer header\n * @cssprop --border-bottom\n * @cssprop --min-height\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-header',\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 connectedCallback() {\n super.connectedCallback();\n this.slot = 'header';\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"}
@@ -5,7 +5,7 @@ import { typeSSR as r } from "../internal/controllers/type-ssr.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
7
  import { popoverStyles as o } from "../internal/styles/popover2.js";
8
- import s from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
8
+ import s from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
9
9
  import { IconButton as c } from "../icon-button/icon-button2.js";
10
10
  import l from "./drawer.js";
11
11
  import { LitElement as u, html as d } from "lit";
@@ -30,7 +30,7 @@ var p = class extends u {
30
30
  static {
31
31
  this.metadata = {
32
32
  tag: "nve-drawer",
33
- version: "2.7.3"
33
+ version: "2.8.0"
34
34
  };
35
35
  }
36
36
  static {
@@ -1 +1 @@
1
- {"version":3,"file":"drawer2.js","names":["#i18nController","#inlineElement","#onToggle"],"sources":["../../src/drawer/drawer.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 { PopoverType, Size } from '@nvidia-elements/core/internal';\nimport {\n createGhostElement,\n I18nController,\n popoverStyles,\n scopedRegistry,\n TypeNativePopoverController,\n typeSSR,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './drawer.css?inline';\n\n/**\n * @element nve-drawer\n * @description A drawer displays content separate from the rest of the page, such as notifications, navigation, and settings.\n * @documentation https://nvidia.github.io/elements/docs/elements/drawer/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\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 drawer opens.\n * @event close - Dispatched when the drawer closes.\n * @slot - Drawer body content displayed between the header and footer.\n * @cssprop --border\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --gap\n * @cssprop --top\n * @cssprop --max-width\n * @cssprop --width\n * @cssprop --animation-duration - Duration of drawer open/close animations\n * @csspart icon-button - The close icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@typeSSR()\n@scopedRegistry()\nexport class Drawer extends LitElement {\n /**\n * Sets the side position of the popover relative to the provided anchor element.\n * For drawer the anchor defaults to the document body.\n */\n @property({ type: String, reflect: true }) position: 'left' | 'right' | 'bottom' | 'top' = 'left';\n\n /**\n * Sets the max size of the drawer.\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n /**\n * Determines if a close button should render within drawer. Non-closable\n * drawers suit drawers that require user confirmation steps.\n */\n @property({ type: Boolean }) closable: boolean;\n\n /**\n * Determines if a drawer 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 * Create a inline layout effect while retaining the a11y characteristics and top layer behavior (light dismiss, focus trap, non interactive background)\n * https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n @property({ type: Boolean, reflect: true }) inline: boolean;\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<Drawer>(this);\n\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n render() {\n return html`\n <div internal-host>\n <div class=\"header\">\n <nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" .hidden=${!this.closable} @click=${this.hidePopover} icon-name=\"cancel\" .ariaLabel=${this.i18n.close} container=\"flat\"></nve-icon-button>\n <slot name=\"header\"></slot>\n </div>\n <div class=\"content\">\n <slot></slot>\n </div>\n <div>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n #inlineElement?: HTMLElement;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('toggle', this.#onToggle);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('toggle', this.#onToggle);\n this.#inlineElement?.remove();\n this.#inlineElement = undefined;\n }\n\n #onToggle = (toggleEvent: ToggleEvent) => {\n if (this.inline) {\n if (this.#inlineElement && toggleEvent.newState === 'closed') {\n this.#inlineElement.remove();\n } else {\n this.#inlineElement = createGhostElement(this);\n this.after(this.#inlineElement);\n }\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;AA4CO,IAAA,IAAA,cAAqB,EAAW;;+BAKsD,sBAsBhC,WAAW,UAAU,gBAqBxC,IAAI,EAAqB,IAAI,eAKlC,KAAKA,GAAgB,yCAYhB,IAAI,EAAoC,IAAI,cA4CvE,MAA6B;GACxC,AAAI,KAAK,WACH,KAAKC,MAAkB,EAAY,aAAa,WAClD,KAAKA,GAAe,OAAO,KAE3B,KAAKA,KAAiB,EAAmB,IAAI,GAC7C,KAAK,MAAM,KAAKA,EAAc;EAGpC;;CAtEA;CAQA,IAAI,cAA2B;EAC7B,OAAO,KAAK,QAAQ,SAAS;CAC/B;CAGA,IAAI,qBAAqB;EACvB,OAAO,KAAK,YAAY;CAC1B;;gBAIgB,EAAU,CAAC,GAAe,CAAM,CAAC;;;kBAEtB;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,SAAS;EACP,OAAO,CAAI,2HAG2E,CAAC,KAAK,SAAS,YAAU,KAAK,Y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PORATION & 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 { PopoverType, Size } from '@nvidia-elements/core/internal';\nimport {\n createGhostElement,\n I18nController,\n popoverStyles,\n scopedRegistry,\n TypeNativePopoverController,\n typeSSR,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport styles from './drawer.css?inline';\n\n/**\n * @element nve-drawer\n * @description A drawer displays content separate from the rest of the page, such as notifications, navigation, and settings.\n * @documentation https://nvidia.github.io/elements/docs/elements/drawer/\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\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 drawer opens.\n * @event close - Dispatched when the drawer closes.\n * @slot - Drawer body content displayed between the header and footer.\n * @cssprop --border\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --gap\n * @cssprop --top\n * @cssprop --max-width\n * @cssprop --width\n * @cssprop --animation-duration - Duration of drawer open/close animations\n * @csspart icon-button - The close icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@typeSSR()\n@scopedRegistry()\nexport class Drawer extends LitElement {\n /**\n * Sets the side position of the popover relative to the provided anchor element.\n * For drawer the anchor defaults to the document body.\n */\n @property({ type: String, reflect: true }) position: 'left' | 'right' | 'bottom' | 'top' = 'left';\n\n /**\n * Sets the max size of the drawer.\n */\n @property({ type: String, reflect: true }) size?: Size;\n\n /**\n * Determines if a close button should render within drawer. Non-closable\n * drawers suit drawers that require user confirmation steps.\n */\n @property({ type: Boolean }) closable: boolean;\n\n /**\n * Determines if a drawer 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 * Create a inline layout effect while retaining the a11y characteristics and top layer behavior (light dismiss, focus trap, non interactive background)\n * https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n @property({ type: Boolean, reflect: true }) inline: boolean;\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<Drawer>(this);\n\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\n\n render() {\n return html`\n <div internal-host>\n <div class=\"header\">\n <nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" .hidden=${!this.closable} @click=${this.hidePopover} icon-name=\"cancel\" .ariaLabel=${this.i18n.close} container=\"flat\"></nve-icon-button>\n <slot name=\"header\"></slot>\n </div>\n <div class=\"content\">\n <slot></slot>\n </div>\n <div>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n `;\n }\n\n #inlineElement?: HTMLElement;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener('toggle', this.#onToggle);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.removeEventListener('toggle', this.#onToggle);\n this.#inlineElement?.remove();\n this.#inlineElement = undefined;\n }\n\n #onToggle = (toggleEvent: ToggleEvent) => {\n if (this.inline) {\n if (this.#inlineElement && toggleEvent.newState === 'closed') {\n this.#inlineElement.remove();\n } else {\n this.#inlineElement = createGhostElement(this);\n this.after(this.#inlineElement);\n }\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;AA4CO,IAAM,IAAN,cAAqB,EAAW;;EA6GxB,aAxG8E,KAAA,WAAA,QAsBhC,KAAA,SAAA,WAAW,UAAU,MAqBxC,KAAA,KAAA,IAAI,EAAqB,IAAI,GAKlC,KAAA,OAAA,KAAK,GAAgB,MAYhB,KAAA,8BAAA,IAAI,EAAoC,IAAI,GA4CvE,KAAA,MAAA,MAA6B;GACxC,AAAI,KAAK,WACH,KAAK,MAAkB,EAAY,aAAa,WAClD,KAAK,GAAe,OAAO,KAE3B,KAAK,KAAiB,EAAmB,IAAI,GAC7C,KAAK,MAAM,KAAK,EAAc;EAGpC;;CAtEA;CAQA,IAAI,cAA2B;EAC7B,OAAO,KAAK,QAAQ,SAAS;CAC/B;CAGA,IAAI,qBAAqB;EACvB,OAAO,KAAK,YAAY;CAC1B;;EAIgB,KAAA,SAAA,EAAU,CAAC,GAAe,CAAM,CAAC;;;EAEtB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAEA,SAAS;EACP,OAAO,CAAI,2HAG2E,CAAC,KAAK,SAAS,YAAU,KAAK,YAAY,mCAAiC,KAAK,KAAK,MAAM;CAWnL;CAEA;CAEA,oBAA0B;EAExB,AADA,MAAM,kBAAkB,GACxB,KAAK,iBAAiB,UAAU,KAAK,EAAS;CAChD;CAEA,uBAA6B;EAI3B,AAHA,MAAM,qBAAqB,GAC3B,KAAK,oBAAoB,UAAU,KAAK,EAAS,GACjD,KAAK,IAAgB,OAAO,GAC5B,KAAK,KAAiB,KAAA;CACxB;CAEA;AAUF;AAlHG,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GAKxC,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAMxC,EAAA,CAAA,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,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;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAMzC,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,EAAQ,GACR,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.139.0/helpers/esm/decorate.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
4
  import r from "./dropdown-footer.js";
5
5
  import { LitElement as i, html as a } from "lit";
6
6
  //#region src/dropdown/dropdown-footer.ts
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-dropdown-footer",
14
- version: "2.7.3",
14
+ version: "2.8.0",
15
15
  parents: ["nve-dropdown"]
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-footer2.js","names":[],"sources":["../../src/dropdown/dropdown-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 './dropdown-footer.css?inline';\n\n/**\n * @element nve-dropdown-footer\n * @description Provides a fixed area at the bottom of a dropdown menu for extra actions or supplementary controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown/\n * @since 0.36.0\n * @entrypoint \\@nvidia-elements/core/dropdown\n * @slot - default slot for the dropdown footer\n * @cssprop --border-top\n * @cssprop --padding\n * @cssprop --gap\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class DropdownFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropdown-footer',\n version: '0.0.0',\n parents: ['nve-dropdown']\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,IAAA,IAAA,cAA6B,EAAW;;gBAC7B,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,cAAc;EAC1B;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,OAAO;CACd;AACF;OAtBC,EAAM,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"dropdown-footer2.js","names":[],"sources":["../../src/dropdown/dropdown-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 './dropdown-footer.css?inline';\n\n/**\n * @element nve-dropdown-footer\n * @description Provides a fixed area at the bottom of a dropdown menu for extra actions or supplementary controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown/\n * @since 0.36.0\n * @entrypoint \\@nvidia-elements/core/dropdown\n * @slot - default slot for the dropdown footer\n * @cssprop --border-top\n * @cssprop --padding\n * @cssprop --gap\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class DropdownFooter extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropdown-footer',\n version: '0.0.0',\n parents: ['nve-dropdown']\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,cAA6B,EAAW;;EAC7B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,cAAc;EAC1B;;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.139.0/helpers/esm/decorate.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
4
  import r from "./dropdown-header.js";
5
5
  import { LitElement as i, html as a } from "lit";
6
6
  //#region src/dropdown/dropdown-header.ts
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-dropdown-header",
14
- version: "2.7.3",
14
+ version: "2.8.0",
15
15
  parents: ["nve-dropdown"]
16
16
  };
17
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-header2.js","names":[],"sources":["../../src/dropdown/dropdown-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 './dropdown-header.css?inline';\n\n/**\n * @element nve-dropdown-header\n * @description Displays a title or contextual label at the top of a dropdown menu to categorize its contents.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown/\n * @since 0.36.0\n * @entrypoint \\@nvidia-elements/core/dropdown\n * @slot - default slot for the dropdown header\n * @cssprop --border-bottom\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class DropdownHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropdown-header',\n version: '0.0.0',\n parents: ['nve-dropdown']\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,IAAA,IAAA,cAA6B,EAAW;;gBAC7B,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,cAAc;EAC1B;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,KAAK,OAAO;CACd;AACF;OAtBC,EAAM,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"dropdown-header2.js","names":[],"sources":["../../src/dropdown/dropdown-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 './dropdown-header.css?inline';\n\n/**\n * @element nve-dropdown-header\n * @description Displays a title or contextual label at the top of a dropdown menu to categorize its contents.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown/\n * @since 0.36.0\n * @entrypoint \\@nvidia-elements/core/dropdown\n * @slot - default slot for the dropdown header\n * @cssprop --border-bottom\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class DropdownHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropdown-header',\n version: '0.0.0',\n parents: ['nve-dropdown']\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,cAA6B,EAAW;;EAC7B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,cAAc;EAC1B;;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"}
@@ -4,7 +4,7 @@ import { TypeNativePopoverController as n } from "../internal/controllers/type-n
4
4
  import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
5
5
  import { useStyles as i } from "../internal/styles/index.js";
6
6
  import { popoverStyles as a } from "../internal/styles/popover2.js";
7
- import o from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
7
+ import o from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
8
8
  import { IconButton as s } from "../icon-button/icon-button2.js";
9
9
  import c from "./dropdown.js";
10
10
  import { LitElement as l, html as u } from "lit";
@@ -21,7 +21,7 @@ var p = class extends l {
21
21
  static {
22
22
  this.metadata = {
23
23
  tag: "nve-dropdown",
24
- version: "2.7.3"
24
+ version: "2.8.0"
25
25
  };
26
26
  }
27
27
  static {
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown2.js","names":["#i18nController"],"sources":["../../src/dropdown/dropdown.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 { query } from 'lit/decorators/query.js';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { PopoverAlign, PopoverPosition, PopoverType } from '@nvidia-elements/core/internal';\nimport {\n audit,\n excessiveInstanceLimit,\n I18nController,\n popoverStyles,\n scopedRegistry,\n TypeNativePopoverController,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport styles from './dropdown.css?inline';\n\n/**\n * @element nve-dropdown\n * @description Generic dropdown element for rendering a variety of different content such as interactive navigation or form controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dropdown\n * @event beforetoggle - Dispatched on a popover just before showing or hiding.\n * @event toggle - Dispatched on a popover element just after showing or hiding.\n * @event open - Dispatched when the dropdown opens.\n * @event close - Dispatched when the dropdown closes.\n * @slot - default slot for dropdown content\n * @cssprop --border\n * @cssprop --border-radius\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --width\n * @cssprop --min-width\n * @cssprop --gap\n * @cssprop --arrow-transform - Transform applied to the popover arrow\n * @cssprop --animation-duration - Duration of dropdown open/close animations\n * @csspart icon-button - The close icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit({ excessiveInstanceLimit })\n@scopedRegistry()\nexport class Dropdown extends LitElement {\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-dropdown',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\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;\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 * Sets the side position of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) position: PopoverPosition = 'bottom';\n\n /**\n * Sets the alignment of the popover relative to the provided anchor element.\n * If an arrow exists the alginment will be relative to the arrow against the anchor.\n */\n @property({ type: String, reflect: true }) alignment: PopoverAlign = 'start';\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 /**\n * Determines if a close button should render within dropdown. Non-closable\n * dropdowns suit menu or selection patterns.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * Determines if an arrow renders.\n */\n @property({ type: Boolean }) arrow = false;\n\n /** @private */\n @property({ type: Boolean, reflect: true }) modal = true;\n\n /** @private */\n @property({ type: String, attribute: 'popover-type' }) popoverType: PopoverType = 'auto';\n\n /** @private */\n @query('.arrow') popoverArrow: HTMLElement;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n protected typeNativePopoverController = new TypeNativePopoverController<Dropdown>(this);\n\n /** @private */\n get popoverDismissible() {\n return this.modal;\n }\n\n /**\n * Enables internal string values to update for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n render() {\n return html`\n <div internal-host>\n <slot name=\"header\"></slot>\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" @click=${this.hidePopover} icon-name=\"cancel\" container=\"flat\" size=\"sm\" .ariaLabel=${this.i18n.close}></nve-icon-button>` : ''}\n <slot></slot>\n <slot name=\"footer\"></slot>\n ${this.arrow ? html`<div class=\"arrow\"></div>` : ''}\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA8CO,IAAA,IAAA,cAAuB,EAAW;;+BA4BgC,2BAMF,yBAY7B,iBAKH,iBAGe,uBAG8B,kBAK1C,IAAI,EAAqB,IAAI,sCAE7B,IAAI,EAAsC,IAAI,eAUnD,KAAKA,GAAgB;;;gBAzExC,EAAU,CAAC,GAAe,CAAM,CAAC;;;kBAEtB;GACzB,KAAK;GACL,SAAS;EACX;;;4BAE4B,GACzB,EAAW,SAAS,MAAM,EAC7B;;CAoDA;CAKA,IAAI,qBAAqB;EACvB,OAAO,KAAK;CACd;CAOA,SAAS;EACP,OAAO,CAAI,iDAGP,KAAK,WAAW,CAAI,mFAAkF,KAAK,YAAY,8DAA4D,KAAK,KAAK,MAAM,wBAAuB,GAAG,0CAG7N,KAAK,QAAQ,CAAI,8BAA8B,GAAG;CAGxD;AACF;GAvEG,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAOzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,MAKzB,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAMxC,EAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAMxC,EAAS;CAAE,MAAM;CAAS,SAAS;CAAM,WAAW;AAAmB,CAAC,CAAA,GAAA,EAAA,WAAA,mBAAA,KAAA,CAAA,MAMxE,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,MAK1B,EAAS,EAAE,MAAM,QAAQ,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAG1B,EAAS;CAAE,MAAM;CAAS,SAAS;AAAK,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAGzC,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAe,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,MAGpD,EAAM,QAAQ,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,MAcd,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,UA5E3B,EAAM,EAAE,wBAAA,GAAuB,CAAC,GAChC,EAAe,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"dropdown2.js","names":[],"sources":["../../src/dropdown/dropdown.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 { query } from 'lit/decorators/query.js';\nimport { IconButton } from '@nvidia-elements/core/icon-button';\nimport type { PopoverAlign, PopoverPosition, PopoverType } from '@nvidia-elements/core/internal';\nimport {\n audit,\n excessiveInstanceLimit,\n I18nController,\n popoverStyles,\n scopedRegistry,\n TypeNativePopoverController,\n useStyles\n} from '@nvidia-elements/core/internal';\nimport styles from './dropdown.css?inline';\n\n/**\n * @element nve-dropdown\n * @description Generic dropdown element for rendering a variety of different content such as interactive navigation or form controls.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dropdown\n * @event beforetoggle - Dispatched on a popover just before showing or hiding.\n * @event toggle - Dispatched on a popover element just after showing or hiding.\n * @event open - Dispatched when the dropdown opens.\n * @event close - Dispatched when the dropdown closes.\n * @slot - default slot for dropdown content\n * @cssprop --border\n * @cssprop --border-radius\n * @cssprop --background\n * @cssprop --color\n * @cssprop --padding\n * @cssprop --box-shadow\n * @cssprop --width\n * @cssprop --min-width\n * @cssprop --gap\n * @cssprop --arrow-transform - Transform applied to the popover arrow\n * @cssprop --animation-duration - Duration of dropdown open/close animations\n * @csspart icon-button - The close icon button element\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit({ excessiveInstanceLimit })\n@scopedRegistry()\nexport class Dropdown extends LitElement {\n static styles = useStyles([popoverStyles, styles]);\n\n static readonly metadata = {\n tag: 'nve-dropdown',\n version: '0.0.0'\n };\n\n static elementDefinitions = {\n [IconButton.metadata.tag]: IconButton\n };\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;\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 * Sets the side position of the popover relative to the provided anchor element.\n */\n @property({ type: String, reflect: true }) position: PopoverPosition = 'bottom';\n\n /**\n * Sets the alignment of the popover relative to the provided anchor element.\n * If an arrow exists the alginment will be relative to the arrow against the anchor.\n */\n @property({ type: String, reflect: true }) alignment: PopoverAlign = 'start';\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 /**\n * Determines if a close button should render within dropdown. Non-closable\n * dropdowns suit menu or selection patterns.\n */\n @property({ type: Boolean }) closable = false;\n\n /**\n * Determines if an arrow renders.\n */\n @property({ type: Boolean }) arrow = false;\n\n /** @private */\n @property({ type: Boolean, reflect: true }) modal = true;\n\n /** @private */\n @property({ type: String, attribute: 'popover-type' }) popoverType: PopoverType = 'auto';\n\n /** @private */\n @query('.arrow') popoverArrow: HTMLElement;\n\n #i18nController: I18nController<this> = new I18nController<this>(this);\n\n protected typeNativePopoverController = new TypeNativePopoverController<Dropdown>(this);\n\n /** @private */\n get popoverDismissible() {\n return this.modal;\n }\n\n /**\n * Enables internal string values to update for internationalization.\n */\n @property({ type: Object }) i18n = this.#i18nController.i18n;\n\n render() {\n return html`\n <div internal-host>\n <slot name=\"header\"></slot>\n ${this.closable ? html`<nve-icon-button part=\"icon-button\" exportparts=\"icon:icon-button-icon\" @click=${this.hidePopover} icon-name=\"cancel\" container=\"flat\" size=\"sm\" .ariaLabel=${this.i18n.close}></nve-icon-button>` : ''}\n <slot></slot>\n <slot name=\"footer\"></slot>\n ${this.arrow ? html`<div class=\"arrow\"></div>` : ''}\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA8CO,IAAM,IAAN,cAAuB,EAAW;;EA0EJ,aA9CoC,KAAA,WAAA,UAMF,KAAA,YAAA,SAY7B,KAAA,WAAA,IAKH,KAAA,QAAA,IAGe,KAAA,QAAA,IAG8B,KAAA,cAAA,QAK1C,KAAA,KAAA,IAAI,EAAqB,IAAI,GAE7B,KAAA,8BAAA,IAAI,EAAsC,IAAI,GAUnD,KAAA,OAAA,KAAK,GAAgB;;;EAzExC,KAAA,SAAA,EAAU,CAAC,GAAe,CAAM,CAAC;;;EAEtB,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;;EAE4B,KAAA,qBAAA,GACz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d,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GA5E3B,IAAA,EAAA,CAAA,EAAM,EAAE,wBAAA,GAAuB,CAAC,GAChC,EAAe,CAAA,GAAA,CAAA"}
@@ -2,7 +2,7 @@ import { audit as e } from "../internal/controllers/audit.controller.js";
2
2
  import { isSimpleFocusable as t } from "../internal/utils/focus.js";
3
3
  import { appendRootNodeStyle as n, clickOutsideElementBounds as r, getFlattenedFocusableItems as i } from "../internal/utils/dom.js";
4
4
  import { useStyles as a } from "../internal/styles/index.js";
5
- import o from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
5
+ import o from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
6
6
  import s from "./dropdown-group.global.js";
7
7
  import { LitElement as c, html as l } from "lit";
8
8
  import { queryAssignedElements as u } from "lit/decorators/query-assigned-elements.js";
@@ -14,7 +14,7 @@ var d = class extends c {
14
14
  static {
15
15
  this.metadata = {
16
16
  tag: "nve-dropdown-group",
17
- version: "2.7.3",
17
+ version: "2.8.0",
18
18
  children: ["nve-dropdown"]
19
19
  };
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-group.js","names":["#syncDropdowns","#pointerup","#_pointerup","#keydown","#onOpen","#onClose"],"sources":["../../src/dropdown-group/dropdown-group.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 { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';\nimport {\n clickOutsideElementBounds,\n appendRootNodeStyle,\n getFlattenedFocusableItems,\n isSimpleFocusable,\n useStyles,\n audit\n} from '@nvidia-elements/core/internal';\nimport type { Dropdown } from '@nvidia-elements/core/dropdown';\nimport globalStyles from './dropdown-group.global.css?inline';\n\n/**\n * @element nve-dropdown-group\n * @description A Dropdown Group streamlines the management of linked dropdowns and supports nested dropdowns for a more organized and intuitive user experience\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown-group/\n * @since 1.30.1\n * @entrypoint \\@nvidia-elements/core/dropdown-group\n * @slot - default slot for dropdown content\n * @event open - Dispatched when a dropdown in the group opens\n * @event close - Dispatched when a dropdown in the group closes\n * @cssprop --arrow-transform - Transform applied to the popover arrow\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class DropdownGroup extends LitElement {\n static styles = useStyles([]);\n\n static readonly metadata = {\n tag: 'nve-dropdown-group',\n version: '0.0.0',\n children: ['nve-dropdown']\n };\n\n @queryAssignedElements() protected dropdowns!: Dropdown[];\n\n render() {\n return html`\n <div internal-host>\n <slot @slotchange=${this.#syncDropdowns}></slot>\n </div>\n `;\n }\n\n #_pointerup = (e: PointerEvent) => this.#pointerup(e);\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n globalThis.document?.addEventListener('pointerup', this.#_pointerup);\n this.addEventListener('keydown', this.#keydown);\n this.addEventListener('open', this.#onOpen as EventListener);\n this.addEventListener('close', this.#onClose as EventListener);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n globalThis.document?.removeEventListener('pointerup', this.#_pointerup);\n this.removeEventListener('keydown', this.#keydown);\n this.removeEventListener('open', this.#onOpen as EventListener);\n this.removeEventListener('close', this.#onClose as EventListener);\n }\n\n #syncDropdowns() {\n this.dropdowns.forEach(dropdown => {\n dropdown.popoverType = 'manual';\n });\n }\n\n #pointerup(event: PointerEvent) {\n const multipleDropdownsOpen = this.dropdowns.some(dropdown => dropdown.matches(':popover-open'));\n const pointerIsOutsideGroup = this.dropdowns.every(dropdown => clickOutsideElementBounds(event, dropdown));\n if (multipleDropdownsOpen && pointerIsOutsideGroup) {\n this.close();\n }\n }\n\n #keydown(event: KeyboardEvent) {\n const target = event.target as HTMLElement;\n if (event.code === 'Escape') {\n this.close();\n }\n if (event.code === 'ArrowRight') {\n const targetId = target.getAttribute('popovertarget');\n const dropdown = this.dropdowns.find(d => d.id === targetId);\n dropdown?.showPopover();\n }\n if (event.code === 'ArrowLeft' && isSimpleFocusable(event.target as HTMLElement)) {\n target.closest('nve-dropdown')?.hidePopover();\n }\n }\n\n #onOpen(event: CustomEvent) {\n const dropdown = event.target as HTMLElement;\n const isLocalDropdown = dropdown.localName === 'nve-dropdown' && this.dropdowns.find(d => d === dropdown);\n if (isLocalDropdown) {\n getFlattenedFocusableItems(dropdown)[0]?.focus();\n }\n }\n\n #onClose(event: CustomEvent) {\n const element = event.target as HTMLElement;\n const isLocalDropdown = element.localName === 'nve-dropdown' && this.dropdowns.find(d => d === element);\n if (isLocalDropdown) {\n // _activeTrigger is a popover controller internal API\n const dropdown = element as Dropdown & { _activeTrigger?: HTMLElement };\n dropdown._activeTrigger?.focus();\n }\n }\n\n /** Closes every descendant dropdown in the group. */\n close() {\n this.querySelectorAll('nve-dropdown').forEach(d => d.hidePopover());\n }\n}\n"],"mappings":";;;;;;;;;AA6BO,IAAA,IAAA,cAA4B,EAAW;;gBAC5B,EAAU,CAAC,CAAC;;;kBAED;GACzB,KAAK;GACL,SAAS;GACT,UAAU,CAAC,cAAc;EAC3B;;CAIA,SAAS;EACP,OAAO,CAAI,yCAEa,KAAKA,GAAe;CAG9C;CAEA,MAAe,MAAoB,KAAKC,GAAW,CAAC;CAEpD,oBAAoB;EAMlB,AALA,MAAM,kBAAkB,GACxB,EAAoB,MAAM,CAAY,GACtC,WAAW,UAAU,iBAAiB,aAAa,KAAKC,EAAW,GACnE,KAAK,iBAAiB,WAAW,KAAKC,EAAQ,GAC9C,KAAK,iBAAiB,QAAQ,KAAKC,EAAwB,GAC3D,KAAK,iBAAiB,SAAS,KAAKC,EAAyB;CAC/D;CAEA,uBAAuB;EAKrB,AAJA,MAAM,qBAAqB,GAC3B,WAAW,UAAU,oBAAoB,aAAa,KAAKH,EAAW,GACtE,KAAK,oBAAoB,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":"dropdown-group.js","names":[],"sources":["../../src/dropdown-group/dropdown-group.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 { queryAssignedElements } from 'lit/decorators/query-assigned-elements.js';\nimport {\n clickOutsideElementBounds,\n appendRootNodeStyle,\n getFlattenedFocusableItems,\n isSimpleFocusable,\n useStyles,\n audit\n} from '@nvidia-elements/core/internal';\nimport type { Dropdown } from '@nvidia-elements/core/dropdown';\nimport globalStyles from './dropdown-group.global.css?inline';\n\n/**\n * @element nve-dropdown-group\n * @description A Dropdown Group streamlines the management of linked dropdowns and supports nested dropdowns for a more organized and intuitive user experience\n * @documentation https://nvidia.github.io/elements/docs/elements/dropdown-group/\n * @since 1.30.1\n * @entrypoint \\@nvidia-elements/core/dropdown-group\n * @slot - default slot for dropdown content\n * @event open - Dispatched when a dropdown in the group opens\n * @event close - Dispatched when a dropdown in the group closes\n * @cssprop --arrow-transform - Transform applied to the popover arrow\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/menubar/\n */\n@audit()\nexport class DropdownGroup extends LitElement {\n static styles = useStyles([]);\n\n static readonly metadata = {\n tag: 'nve-dropdown-group',\n version: '0.0.0',\n children: ['nve-dropdown']\n };\n\n @queryAssignedElements() protected dropdowns!: Dropdown[];\n\n render() {\n return html`\n <div internal-host>\n <slot @slotchange=${this.#syncDropdowns}></slot>\n </div>\n `;\n }\n\n #_pointerup = (e: PointerEvent) => this.#pointerup(e);\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n globalThis.document?.addEventListener('pointerup', this.#_pointerup);\n this.addEventListener('keydown', this.#keydown);\n this.addEventListener('open', this.#onOpen as EventListener);\n this.addEventListener('close', this.#onClose as EventListener);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n globalThis.document?.removeEventListener('pointerup', this.#_pointerup);\n this.removeEventListener('keydown', this.#keydown);\n this.removeEventListener('open', this.#onOpen as EventListener);\n this.removeEventListener('close', this.#onClose as EventListener);\n }\n\n #syncDropdowns() {\n this.dropdowns.forEach(dropdown => {\n dropdown.popoverType = 'manual';\n });\n }\n\n #pointerup(event: PointerEvent) {\n const multipleDropdownsOpen = this.dropdowns.some(dropdown => dropdown.matches(':popover-open'));\n const pointerIsOutsideGroup = this.dropdowns.every(dropdown => clickOutsideElementBounds(event, dropdown));\n if (multipleDropdownsOpen && pointerIsOutsideGroup) {\n this.close();\n }\n }\n\n #keydown(event: KeyboardEvent) {\n const target = event.target as HTMLElement;\n if (event.code === 'Escape') {\n this.close();\n }\n if (event.code === 'ArrowRight') {\n const targetId = target.getAttribute('popovertarget');\n const dropdown = this.dropdowns.find(d => d.id === targetId);\n dropdown?.showPopover();\n }\n if (event.code === 'ArrowLeft' && isSimpleFocusable(event.target as HTMLElement)) {\n target.closest('nve-dropdown')?.hidePopover();\n }\n }\n\n #onOpen(event: CustomEvent) {\n const dropdown = event.target as HTMLElement;\n const isLocalDropdown = dropdown.localName === 'nve-dropdown' && this.dropdowns.find(d => d === dropdown);\n if (isLocalDropdown) {\n getFlattenedFocusableItems(dropdown)[0]?.focus();\n }\n }\n\n #onClose(event: CustomEvent) {\n const element = event.target as HTMLElement;\n const isLocalDropdown = element.localName === 'nve-dropdown' && this.dropdowns.find(d => d === element);\n if (isLocalDropdown) {\n // _activeTrigger is a popover controller internal API\n const dropdown = element as Dropdown & { _activeTrigger?: HTMLElement };\n dropdown._activeTrigger?.focus();\n }\n }\n\n /** Closes every descendant dropdown in the group. */\n close() {\n this.querySelectorAll('nve-dropdown').forEach(d => d.hidePopover());\n }\n}\n"],"mappings":";;;;;;;;;AA6BO,IAAM,IAAN,cAA4B,EAAW;;EAC5B,KAAA,SAAA,EAAU,CAAC,CAAC;;;EAED,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,UAAU,CAAC,cAAc;EAC3B;;CAIA,SAAS;EAC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AAK,MAAM,CAAQ,KAEtG,EAA2B,CAAQ,CAAC,CAAC,EAAE,EAAE,MAAM;CAEnD;CAEA,GAAS,GAAoB;EAC3B,IAAM,IAAU,EAAM;EAEtB,AADwB,EAAQ,cAAc,kBAAkB,KAAK,UAAU,MAAK,MAAK,MAAM,CAAO,KAIpG,EAAS,gBAAgB,MAAM;CAEnC;CAGA,QAAQ;EACN,KAAK,iBAAiB,cAAc,CAAC,CAAC,SAAQ,MAAK,EAAE,YAAY,CAAC;CACpE;AACF;AAhFG,EAAA,CAAA,EAAsB,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAVxB,IAAA,EAAA,CAAA,EAAM,CAAA,GAAA,CAAA"}
@@ -3,7 +3,7 @@ import { I18nController as t } from "../internal/controllers/i18n.controller.js"
3
3
  import { removeEmptyTextNode as n } from "../internal/utils/dom.js";
4
4
  import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
5
5
  import { useStyles as i } from "../internal/styles/index.js";
6
- import a from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
6
+ import a from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
7
7
  import { Icon as o } from "../icon/icon2.js";
8
8
  import s from "./dropzone.js";
9
9
  import { fileSizeValidator as c, fileTypeValidator as l, getFileTypeSpecifiers as u } from "./dropzone.util.js";
@@ -20,7 +20,7 @@ var g = class extends m(d) {
20
20
  static {
21
21
  this.metadata = {
22
22
  tag: "nve-dropzone",
23
- version: "2.7.3",
23
+ version: "2.8.0",
24
24
  validators: [l, c],
25
25
  valueSchema: {
26
26
  type: "array",
@@ -1 +1 @@
1
- {"version":3,"file":"dropzone2.js","names":["#i18nController","#preventDefaults","#toggleHighlighted","#addFiles","#handleClick","#handleDragEnter","#handleDragOver","#handleDragLeave","#handleDrop","#removeEmptyNodes","#formatFileTypeSpecifiers","#handleFileInputChange"],"sources":["../../src/dropzone/dropzone.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 { query } from 'lit/decorators/query.js';\nimport {\n formatFileSize,\n useStyles,\n removeEmptyTextNode,\n I18nController,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './dropzone.css?inline';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { fileTypeValidator, fileSizeValidator, getFileTypeSpecifiers } from './dropzone.util';\n\n/* eslint-disable jsdoc/no-types */\n// Explicit JSDoc type because the CEM analyzer loses the inherited generic specialization.\n\n/**\n * @element nve-dropzone\n * @description A dropzone form control that enables users to drag and drop files onto it.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropzone/\n * @since 1.29.0\n * @entrypoint \\@nvidia-elements/core/dropzone\n * @property {File[]} value - Files selected or dropped by the user. Assign files through the JavaScript property; the HTML `value` attribute is not supported.\n * @event change - Dispatched when the value has changed (files located in event.target)\n * @slot - Custom messaging that replaces the default upload instructions.\n * @cssprop --background\n * @cssprop --border-color\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --min-height\n * @cssprop --color\n * @slot icon - Custom icon that replaces the default upload icon.\n * @csspart icon - The upload icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n */\n@scopedRegistry()\nexport class Dropzone extends FormControlMixin<typeof LitElement, File[]>(LitElement) {\n /** Comma-separated file extensions or MIME types accepted by the dropzone. */\n @property()\n accept: string = `image/gif, image/jpeg, image/png, image/svg+xml`;\n\n /** File size limit in bytes. */\n @property({ attribute: 'max-file-size', type: Number })\n maxFileSize: number = 2 * 1024 ** 2;\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 @query('#dropzone-input')\n private fileInput: HTMLInputElement;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropzone',\n version: '0.0.0',\n validators: [fileTypeValidator, fileSizeValidator],\n valueSchema: {\n type: 'array' as const,\n items: {\n type: 'object' as const,\n properties: {\n name: { type: 'string' as const },\n size: { type: 'number' as const },\n type: { type: 'string' as const }\n }\n }\n }\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** @protected */\n formResetCallback() {\n this.value = [];\n this.requestUpdate();\n }\n\n constructor() {\n super();\n this.value = [];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('nve-control', '');\n globalThis.document.addEventListener('dragover', this.#preventDefaults);\n globalThis.document.addEventListener('drop', this.#preventDefaults);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n globalThis.document.removeEventListener('dragover', this.#preventDefaults);\n globalThis.document.removeEventListener('drop', this.#preventDefaults);\n }\n\n #preventDefaults(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n #handleClick() {\n this.fileInput.click();\n }\n\n #handleDragEnter(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragOver(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragLeave(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n }\n\n #handleDrop(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n\n const files = Array.from(event.dataTransfer!.files);\n this.#addFiles(files);\n }\n\n #handleFileInputChange(event: Event) {\n this.#preventDefaults(event);\n\n const files = Array.from(this.fileInput.files!);\n this.#addFiles(files);\n\n this.fileInput.value = '';\n }\n\n #addFiles(files: File[]) {\n this.value = [...(this.value ?? []), ...files];\n this.dispatchChangeEvent();\n }\n\n #formatFileTypeSpecifiers(acceptTypes: string) {\n const types = getFileTypeSpecifiers(acceptTypes);\n\n if (types.length === 1) {\n return types[0]!.toUpperCase();\n }\n\n const lastType = types.pop();\n return `${types.join(', ').toUpperCase()} or ${lastType!.toUpperCase()}`;\n }\n\n #toggleHighlighted(highlighted: boolean) {\n this.toggleAttribute('highlighted', highlighted);\n }\n\n #removeEmptyNodes(e: Event) {\n (e.target as HTMLSlotElement).assignedNodes().forEach((node: Node) => removeEmptyTextNode(node));\n }\n\n render() {\n return html`<div internal-host>\n <div class=\"container\"\n @click=${this.#handleClick} \n @dragenter=${this.#handleDragEnter}\n @dragover=${this.#handleDragOver}\n @dragleave=${this.#handleDragLeave}\n @drop=${this.#handleDrop}>\n <svg class=\"dropzone-border\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" fill=\"none\" rx=\"4\" ry=\"4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-dasharray=\"6,6\" stroke-dashoffset=\"0\" stroke-linecap=\"square\" />\n </svg>\n <slot name=\"icon\"><nve-icon part=\"icon\" class=\"icon\" name=\"upload\"></nve-icon></slot>\n <slot @slotchange=${this.#removeEmptyNodes}>\n <div class=\"dropzone-text-center\">\n <div class=\"dropzone-text-bold\">${this.i18n.dragAndDrop} ${this.i18n.files} ${this.i18n.or} <span class=\"text-emphasized\">${this.i18n.browseFiles}</span></div>\n <div class=\"text-muted\">${this.#formatFileTypeSpecifiers(this.accept)} &mdash; ${this.i18n.maxFileSize} ${formatFileSize(this.maxFileSize)}</div>\n </div>\n </slot>\n <input id=\"dropzone-input\" type=\"file\" accept=${this.accept} @change=${this.#handleFileInputChange} multiple hidden></input>\n </div>\n </div>`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCO,IAAA,IAAA,cAAuB,EAA4C,CAAU,CAAC,CAAC;CASpF;;gBAUgB,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;GACT,YAAY,CAAC,GAAmB,CAAiB;GACjD,aAAa;IACX,MAAM;IACN,OAAO;KACL,MAAM;KACN,YAAY;MACV,MA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A,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAEzB,EAAM,iBAAiB,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,UAjBzB,EAAe,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"dropzone2.js","names":[],"sources":["../../src/dropzone/dropzone.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 { query } from 'lit/decorators/query.js';\nimport {\n formatFileSize,\n useStyles,\n removeEmptyTextNode,\n I18nController,\n scopedRegistry\n} from '@nvidia-elements/core/internal';\nimport { Icon } from '@nvidia-elements/core/icon';\nimport styles from './dropzone.css?inline';\nimport { FormControlMixin } from '@nvidia-elements/forms/mixins';\nimport { fileTypeValidator, fileSizeValidator, getFileTypeSpecifiers } from './dropzone.util';\n\n/* eslint-disable jsdoc/no-types */\n// Explicit JSDoc type because the CEM analyzer loses the inherited generic specialization.\n\n/**\n * @element nve-dropzone\n * @description A dropzone form control that enables users to drag and drop files onto it.\n * @documentation https://nvidia.github.io/elements/docs/elements/dropzone/\n * @since 1.29.0\n * @entrypoint \\@nvidia-elements/core/dropzone\n * @property {File[]} value - Files selected or dropped by the user. Assign files through the JavaScript property; the HTML `value` attribute is not supported.\n * @event change - Dispatched when the value has changed (files located in event.target)\n * @slot - Custom messaging that replaces the default upload instructions.\n * @cssprop --background\n * @cssprop --border-color\n * @cssprop --border-radius\n * @cssprop --padding\n * @cssprop --min-height\n * @cssprop --color\n * @slot icon - Custom icon that replaces the default upload icon.\n * @csspart icon - The upload icon element\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n */\n@scopedRegistry()\nexport class Dropzone extends FormControlMixin<typeof LitElement, File[]>(LitElement) {\n /** Comma-separated file extensions or MIME types accepted by the dropzone. */\n @property()\n accept: string = `image/gif, image/jpeg, image/png, image/svg+xml`;\n\n /** File size limit in bytes. */\n @property({ attribute: 'max-file-size', type: Number })\n maxFileSize: number = 2 * 1024 ** 2;\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 @query('#dropzone-input')\n private fileInput: HTMLInputElement;\n\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dropzone',\n version: '0.0.0',\n validators: [fileTypeValidator, fileSizeValidator],\n valueSchema: {\n type: 'array' as const,\n items: {\n type: 'object' as const,\n properties: {\n name: { type: 'string' as const },\n size: { type: 'number' as const },\n type: { type: 'string' as const }\n }\n }\n }\n };\n\n static elementDefinitions = {\n [Icon.metadata.tag]: Icon\n };\n\n /** @protected */\n formResetCallback() {\n this.value = [];\n this.requestUpdate();\n }\n\n constructor() {\n super();\n this.value = [];\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n this.setAttribute('nve-control', '');\n globalThis.document.addEventListener('dragover', this.#preventDefaults);\n globalThis.document.addEventListener('drop', this.#preventDefaults);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n globalThis.document.removeEventListener('dragover', this.#preventDefaults);\n globalThis.document.removeEventListener('drop', this.#preventDefaults);\n }\n\n #preventDefaults(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n }\n\n #handleClick() {\n this.fileInput.click();\n }\n\n #handleDragEnter(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragOver(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(true);\n }\n\n #handleDragLeave(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n }\n\n #handleDrop(event: DragEvent) {\n this.#preventDefaults(event);\n this.#toggleHighlighted(false);\n\n const files = Array.from(event.dataTransfer!.files);\n this.#addFiles(files);\n }\n\n #handleFileInputChange(event: Event) {\n this.#preventDefaults(event);\n\n const files = Array.from(this.fileInput.files!);\n this.#addFiles(files);\n\n this.fileInput.value = '';\n }\n\n #addFiles(files: File[]) {\n this.value = [...(this.value ?? []), ...files];\n this.dispatchChangeEvent();\n }\n\n #formatFileTypeSpecifiers(acceptTypes: string) {\n const types = getFileTypeSpecifiers(acceptTypes);\n\n if (types.length === 1) {\n return types[0]!.toUpperCase();\n }\n\n const lastType = types.pop();\n return `${types.join(', ').toUpperCase()} or ${lastType!.toUpperCase()}`;\n }\n\n #toggleHighlighted(highlighted: boolean) {\n this.toggleAttribute('highlighted', highlighted);\n }\n\n #removeEmptyNodes(e: Event) {\n (e.target as HTMLSlotElement).assignedNodes().forEach((node: Node) => removeEmptyTextNode(node));\n }\n\n render() {\n return html`<div internal-host>\n <div class=\"container\"\n @click=${this.#handleClick} \n @dragenter=${this.#handleDragEnter}\n @dragover=${this.#handleDragOver}\n @dragleave=${this.#handleDragLeave}\n @drop=${this.#handleDrop}>\n <svg class=\"dropzone-border\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"100%\" height=\"100%\" fill=\"none\" rx=\"4\" ry=\"4\" stroke=\"currentColor\" stroke-width=\"2\" stroke-dasharray=\"6,6\" stroke-dashoffset=\"0\" stroke-linecap=\"square\" />\n </svg>\n <slot name=\"icon\"><nve-icon part=\"icon\" class=\"icon\" name=\"upload\"></nve-icon></slot>\n <slot @slotchange=${this.#removeEmptyNodes}>\n <div class=\"dropzone-text-center\">\n <div class=\"dropzone-text-bold\">${this.i18n.dragAndDrop} ${this.i18n.files} ${this.i18n.or} <span class=\"text-emphasized\">${this.i18n.browseFiles}</span></div>\n <div class=\"text-muted\">${this.#formatFileTypeSpecifiers(this.accept)} &mdash; ${this.i18n.maxFileSize} ${formatFileSize(this.maxFileSize)}</div>\n </div>\n </slot>\n <input id=\"dropzone-input\" type=\"file\" accept=${this.accept} @change=${this.#handleFileInputChange} multiple hidden></input>\n </div>\n </div>`;\n }\n}\n"],"mappings":";;;;;;;;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,YAAY,GAAG,EAAe,KAAK,WAAW,EAAE,oEAG/F,KAAK,OAAO,aAAW,KAAK,GAAuB;CAGzG;AACF;AAvJG,EAAA,CAAA,EAAS,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAIT,EAAA,CAAA,EAAS;CAAE,WAAW;CAAiB,MAAM;AAAO,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,GAQrD,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAEzB,EAAA,CAAA,EAAM,iBAAiB,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAjBzB,IAAA,EAAA,CAAA,EAAe,CAAA,GAAA,CAAA"}
@@ -11,7 +11,7 @@ var a = class extends n {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-file",
14
- version: "2.7.3"
14
+ version: "2.8.0"
15
15
  };
16
16
  }
17
17
  connectedCallback() {
@@ -1 +1 @@
1
- {"version":3,"file":"file2.js","names":[],"sources":["../../src/file/file.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { CSSResult } from 'lit';\nimport { appendRootNodeStyle, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport styles from './file.css?inline';\nimport globalStyles from './file.global.css?inline';\n\n/**\n * @element nve-file\n * @description A file picker is a control that enables users to choose a file value.\n * @documentation https://nvidia.github.io/elements/docs/elements/file/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/file\n * @cssprop --background\n * @cssprop --padding\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --font-weight\n * @cssprop --font-size\n * @cssprop --text-decoration\n * @cssprop --cursor\n * @cssprop --gap\n * @cssprop --height\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n */\nexport class File extends Control {\n static styles: CSSResult[] = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-file',\n version: '0.0.0'\n };\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n }\n}\n"],"mappings":";;;;;;AA2BA,IAAa,IAAb,cAA0B,EAAQ;;gBACH,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;kBAEvC;GACzB,KAAK;GACL,SAAS;EACX;;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,EAAoB,MAAM,CAAY;CACxC;AACF"}
1
+ {"version":3,"file":"file2.js","names":[],"sources":["../../src/file/file.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type { CSSResult } from 'lit';\nimport { appendRootNodeStyle, useStyles } from '@nvidia-elements/core/internal';\nimport { Control } from '@nvidia-elements/core/forms';\nimport styles from './file.css?inline';\nimport globalStyles from './file.global.css?inline';\n\n/**\n * @element nve-file\n * @description A file picker is a control that enables users to choose a file value.\n * @documentation https://nvidia.github.io/elements/docs/elements/file/\n * @since 0.3.0\n * @entrypoint \\@nvidia-elements/core/file\n * @cssprop --background\n * @cssprop --padding\n * @cssprop --border-radius\n * @cssprop --border\n * @cssprop --font-weight\n * @cssprop --font-size\n * @cssprop --text-decoration\n * @cssprop --cursor\n * @cssprop --gap\n * @cssprop --height\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n */\nexport class File extends Control {\n static styles: CSSResult[] = useStyles([...Control.styles, styles]);\n\n static readonly metadata = {\n tag: 'nve-file',\n version: '0.0.0'\n };\n\n connectedCallback() {\n super.connectedCallback();\n appendRootNodeStyle(this, globalStyles);\n }\n}\n"],"mappings":";;;;;;AA2BA,IAAa,IAAb,cAA0B,EAAQ;;EACH,KAAA,SAAA,EAAU,CAAC,GAAG,EAAQ,QAAQ,CAAM,CAAC;;;EAEvC,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAEA,oBAAoB;EAElB,AADA,MAAM,kBAAkB,GACxB,EAAoB,MAAM,CAAY;CACxC;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { LogService as e } from "../internal/services/log.service.js";
2
2
  import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
3
  import { useStyles as n } from "../internal/styles/index.js";
4
- import r from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
4
+ import r from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
5
5
  import i from "./format-bytes.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
@@ -95,7 +95,7 @@ var g = class extends a {
95
95
  static {
96
96
  this.metadata = {
97
97
  tag: "nve-format-bytes",
98
- version: "2.7.3"
98
+ version: "2.8.0"
99
99
  };
100
100
  }
101
101
  get #e() {
@@ -1 +1 @@
1
- {"version":3,"file":"format-bytes2.js","names":["#rawValue","#resolvedLocale","#parsedValue","#warnInvalidOption","#numberFormatOptions","#formattedBytes","#hasValidConfiguration","#resolveAutoUnit","#roundNumber","#formatNumber","#formatLabel","#onSlotChange"],"sources":["../../src/format-bytes/format-bytes.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 { LogService, typeSSR, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './format-bytes.css?inline';\n\nexport type FormatBytesDisplay = 'decimal' | 'binary';\nexport type FormatBytesUnit = 'b' | 'kb' | 'mb' | 'gb' | 'tb' | 'pb';\nexport type FormatBytesUnitDisplay = 'short' | 'long';\n\ninterface UnitLabels {\n short: string;\n singular: string;\n plural: string;\n}\n\nconst UNITS: readonly FormatBytesUnit[] = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];\nconst DISPLAYS: readonly FormatBytesDisplay[] = ['decimal', 'binary'];\nconst UNIT_DISPLAYS: readonly FormatBytesUnitDisplay[] = ['short', 'long'];\n\nconst DECIMAL_LABELS: Record<FormatBytesUnit, UnitLabels> = {\n b: { short: 'B', singular: 'byte', plural: 'bytes' },\n kb: { short: 'kB', singular: 'kilobyte', plural: 'kilobytes' },\n mb: { short: 'MB', singular: 'megabyte', plural: 'megabytes' },\n gb: { short: 'GB', singular: 'gigabyte', plural: 'gigabytes' },\n tb: { short: 'TB', singular: 'terabyte', plural: 'terabytes' },\n pb: { short: 'PB', singular: 'petabyte', plural: 'petabytes' }\n};\n\nconst BINARY_LABELS: Record<FormatBytesUnit, UnitLabels> = {\n b: { short: 'B', singular: 'byte', plural: 'bytes' },\n kb: { short: 'KiB', singular: 'kibibyte', plural: 'kibibytes' },\n mb: { short: 'MiB', singular: 'mebibyte', plural: 'mebibytes' },\n gb: { short: 'GiB', singular: 'gibibyte', plural: 'gibibytes' },\n tb: { short: 'TiB', singular: 'tebibyte', plural: 'tebibytes' },\n pb: { short: 'PiB', singular: 'pebibyte', plural: 'pebibytes' }\n};\n\nfunction isDisplay(value: unknown): value is FormatBytesDisplay {\n return DISPLAYS.some(display => display === value);\n}\n\nfunction isUnit(value: unknown): value is FormatBytesUnit {\n return UNITS.some(unit => unit === value);\n}\n\nfunction isUnitDisplay(value: unknown): value is FormatBytesUnitDisplay {\n return UNIT_DISPLAYS.some(unitDisplay => unitDisplay === value);\n}\n\n/**\n * @element nve-format-bytes\n * @description Formats a byte count as localized, human-readable decimal or binary units.\n * @documentation https://nvidia.github.io/elements/docs/elements/format-bytes/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/format-bytes\n * @slot - Numeric byte count to format (such as 1048576). Serves as fallback before hydration.\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data\n */\n@typeSSR()\nexport class FormatBytes extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-format-bytes',\n version: '0.0.0'\n };\n\n /**\n * Optional byte count for values supplied by JavaScript or bound data.\n * By default, the component formats the element's text content, which also serves as the SSR fallback.\n * When both are present, this property takes precedence.\n */\n @property({ type: Number }) value?: number;\n\n /**\n * Unit system: 'decimal' uses powers of 1000 and 'binary' uses powers of 1024.\n */\n @property({ type: String }) display: FormatBytesDisplay = 'decimal';\n\n /**\n * Optional unit magnitude. When omitted, the component selects a unit from the byte count.\n */\n @property({ type: String }) unit?: FormatBytesUnit;\n\n /**\n * Unit label length: 'short' renders labels such as 'MB'; 'long' renders labels such as 'megabytes'.\n */\n @property({ type: String, attribute: 'unit-display' }) unitDisplay: FormatBytesUnitDisplay = 'short';\n\n /**\n * Language tag (such as en-US or de-DE) used to format the number.\n * Defaults to document.documentElement.lang or the runtime default.\n */\n @property({ type: String }) locale?: string;\n\n /**\n * Pad fraction output to at least this many digits.\n */\n @property({ type: Number, attribute: 'minimum-fraction-digits' }) minimumFractionDigits?: number;\n\n /**\n * Round fraction output to at most this many digits. Defaults to two effective digits after the decimal point.\n */\n @property({ type: Number, attribute: 'maximum-fraction-digits' }) maximumFractionDigits?: number;\n\n get #rawValue(): string {\n const value = Number.isNaN(this.value) ? (this.getAttribute('value') ?? this.value) : this.value;\n return String(value ?? this.textContent?.trim() ?? '');\n }\n\n get #resolvedLocale(): string | undefined {\n return this.locale ?? (globalThis.document?.documentElement?.lang || undefined);\n }\n\n get #parsedValue(): number | null {\n const rawValue = this.#rawValue;\n if (!rawValue) return null;\n\n const numericValue = Number(rawValue);\n if (Number.isFinite(numericValue)) return numericValue;\n\n LogService.warn(`format-bytes: invalid numeric value \"${rawValue}\"`);\n return null;\n }\n\n #resolveAutoUnit(value: number, display: FormatBytesDisplay): FormatBytesUnit {\n const base = display === 'binary' ? 1024 : 1000;\n const absoluteValue = Math.abs(value);\n\n for (let index = UNITS.length - 1; index > 0; index--) {\n const unit = UNITS[index];\n if (unit && absoluteValue >= base ** index) return unit;\n }\n\n return 'b';\n }\n\n #formatLabel(unit: FormatBytesUnit, convertedValue: number): string {\n const labels = this.display === 'binary' ? BINARY_LABELS[unit] : DECIMAL_LABELS[unit];\n if (this.unitDisplay === 'short') return labels.short;\n return Math.abs(convertedValue) === 1 ? labels.singular : labels.plural;\n }\n\n #warnInvalidOption(name: string, value: unknown): void {\n LogService.warn(`format-bytes: invalid ${name} value \"${String(value)}\"`);\n }\n\n #hasValidConfiguration(): boolean {\n if (!isDisplay(this.display)) {\n this.#warnInvalidOption('display', this.display);\n return false;\n }\n if (!isUnitDisplay(this.unitDisplay)) {\n this.#warnInvalidOption('unit-display', this.unitDisplay);\n return false;\n }\n if (this.unit !== undefined && !isUnit(this.unit)) {\n this.#warnInvalidOption('unit', this.unit);\n return false;\n }\n return true;\n }\n\n get #numberFormatOptions(): Intl.NumberFormatOptions {\n const effectiveMaximumFractionDigits = this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 0, 2);\n return {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: effectiveMaximumFractionDigits\n };\n }\n\n #roundNumber(value: number): number {\n return Number(\n new Intl.NumberFormat('en-US-u-nu-latn', {\n ...this.#numberFormatOptions,\n useGrouping: false\n }).format(value)\n );\n }\n\n #formatNumber(value: number): string {\n return new Intl.NumberFormat(this.#resolvedLocale, this.#numberFormatOptions).format(value);\n }\n\n get #formattedBytes(): string {\n const rawValue = this.#rawValue;\n if (!rawValue) return '';\n\n const numericValue = this.#parsedValue;\n if (numericValue === null) return rawValue;\n if (!this.#hasValidConfiguration()) return rawValue;\n\n const resolvedUnit = this.unit ?? this.#resolveAutoUnit(numericValue, this.display);\n const unitIndex = UNITS.indexOf(resolvedUnit);\n const base = this.display === 'binary' ? 1024 : 1000;\n const convertedValue = numericValue / base ** unitIndex;\n\n try {\n const roundedValue = this.#roundNumber(convertedValue);\n return `${this.#formatNumber(roundedValue)} ${this.#formatLabel(resolvedUnit, roundedValue)}`;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n LogService.warn(`format-bytes: ${message}`);\n return rawValue;\n }\n }\n\n render() {\n return html`<data internal-host value=${this.#rawValue}>${this.#formattedBytes}<slot @slotchange=${this.#onSlotChange} hidden></slot></data>`;\n }\n\n #onSlotChange() {\n this.requestUpdate();\n }\n}\n"],"mappings":";;;;;;;;AAkBA,IAAM,IAAoC;CAAC;CAAK;CAAM;CAAM;CAAM;CAAM;AAAI,GACtE,IAA0C,CAAC,WAAW,QAAQ,GAC9D,IAAmD,CAAC,SAAS,MAAM,GAEnE,IAAsD;CAC1D,GAAG;EAAE,OAAO;EAAK,UAAU;EAAQ,QAAQ;CAAQ;CACnD,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;AAC/D,GAEM,IAAqD;CACzD,GAAG;EAAE,OAAO;EAAK,UAAU;EAAQ,QAAQ;CAAQ;CACnD,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;AAChE;AAEA,SAAS,EAAU,GAA6C;CAC9D,OAAO,EAAS,MAAK,MAAW,MAAY,CAAK;AACnD;AAEA,SAAS,EAAO,GAA0C;CACxD,OAAO,EAAM,MAAK,MAAQ,MAAS,CAAK;AAC1C;AAEA,S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AAKK,GAAgB,qBAAoB,KAAKM,GAAc;CACxH;CAEA,KAAgB;EACd,KAAK,cAAc;CACrB;AACF;GA9IG,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAKzB,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAe,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,MAMpD,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAKzB,EAAS;CAAE,MAAM;CAAQ,WAAW;AAA0B,CAAC,CAAA,GAAA,EAAA,WAAA,yBAAA,KAAA,CAAA,MAK/D,EAAS;CAAE,MAAM;CAAQ,WAAW;AAA0B,CAAC,CAAA,GAAA,EAAA,WAAA,yBAAA,KAAA,CAAA,UA7CjE,EAAQ,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"format-bytes2.js","names":[],"sources":["../../src/format-bytes/format-bytes.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 { LogService, typeSSR, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './format-bytes.css?inline';\n\nexport type FormatBytesDisplay = 'decimal' | 'binary';\nexport type FormatBytesUnit = 'b' | 'kb' | 'mb' | 'gb' | 'tb' | 'pb';\nexport type FormatBytesUnitDisplay = 'short' | 'long';\n\ninterface UnitLabels {\n short: string;\n singular: string;\n plural: string;\n}\n\nconst UNITS: readonly FormatBytesUnit[] = ['b', 'kb', 'mb', 'gb', 'tb', 'pb'];\nconst DISPLAYS: readonly FormatBytesDisplay[] = ['decimal', 'binary'];\nconst UNIT_DISPLAYS: readonly FormatBytesUnitDisplay[] = ['short', 'long'];\n\nconst DECIMAL_LABELS: Record<FormatBytesUnit, UnitLabels> = {\n b: { short: 'B', singular: 'byte', plural: 'bytes' },\n kb: { short: 'kB', singular: 'kilobyte', plural: 'kilobytes' },\n mb: { short: 'MB', singular: 'megabyte', plural: 'megabytes' },\n gb: { short: 'GB', singular: 'gigabyte', plural: 'gigabytes' },\n tb: { short: 'TB', singular: 'terabyte', plural: 'terabytes' },\n pb: { short: 'PB', singular: 'petabyte', plural: 'petabytes' }\n};\n\nconst BINARY_LABELS: Record<FormatBytesUnit, UnitLabels> = {\n b: { short: 'B', singular: 'byte', plural: 'bytes' },\n kb: { short: 'KiB', singular: 'kibibyte', plural: 'kibibytes' },\n mb: { short: 'MiB', singular: 'mebibyte', plural: 'mebibytes' },\n gb: { short: 'GiB', singular: 'gibibyte', plural: 'gibibytes' },\n tb: { short: 'TiB', singular: 'tebibyte', plural: 'tebibytes' },\n pb: { short: 'PiB', singular: 'pebibyte', plural: 'pebibytes' }\n};\n\nfunction isDisplay(value: unknown): value is FormatBytesDisplay {\n return DISPLAYS.some(display => display === value);\n}\n\nfunction isUnit(value: unknown): value is FormatBytesUnit {\n return UNITS.some(unit => unit === value);\n}\n\nfunction isUnitDisplay(value: unknown): value is FormatBytesUnitDisplay {\n return UNIT_DISPLAYS.some(unitDisplay => unitDisplay === value);\n}\n\n/**\n * @element nve-format-bytes\n * @description Formats a byte count as localized, human-readable decimal or binary units.\n * @documentation https://nvidia.github.io/elements/docs/elements/format-bytes/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/format-bytes\n * @slot - Numeric byte count to format (such as 1048576). Serves as fallback before hydration.\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data\n */\n@typeSSR()\nexport class FormatBytes extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-format-bytes',\n version: '0.0.0'\n };\n\n /**\n * Optional byte count for values supplied by JavaScript or bound data.\n * By default, the component formats the element's text content, which also serves as the SSR fallback.\n * When both are present, this property takes precedence.\n */\n @property({ type: Number }) value?: number;\n\n /**\n * Unit system: 'decimal' uses powers of 1000 and 'binary' uses powers of 1024.\n */\n @property({ type: String }) display: FormatBytesDisplay = 'decimal';\n\n /**\n * Optional unit magnitude. When omitted, the component selects a unit from the byte count.\n */\n @property({ type: String }) unit?: FormatBytesUnit;\n\n /**\n * Unit label length: 'short' renders labels such as 'MB'; 'long' renders labels such as 'megabytes'.\n */\n @property({ type: String, attribute: 'unit-display' }) unitDisplay: FormatBytesUnitDisplay = 'short';\n\n /**\n * Language tag (such as en-US or de-DE) used to format the number.\n * Defaults to document.documentElement.lang or the runtime default.\n */\n @property({ type: String }) locale?: string;\n\n /**\n * Pad fraction output to at least this many digits.\n */\n @property({ type: Number, attribute: 'minimum-fraction-digits' }) minimumFractionDigits?: number;\n\n /**\n * Round fraction output to at most this many digits. Defaults to two effective digits after the decimal point.\n */\n @property({ type: Number, attribute: 'maximum-fraction-digits' }) maximumFractionDigits?: number;\n\n get #rawValue(): string {\n const value = Number.isNaN(this.value) ? (this.getAttribute('value') ?? this.value) : this.value;\n return String(value ?? this.textContent?.trim() ?? '');\n }\n\n get #resolvedLocale(): string | undefined {\n return this.locale ?? (globalThis.document?.documentElement?.lang || undefined);\n }\n\n get #parsedValue(): number | null {\n const rawValue = this.#rawValue;\n if (!rawValue) return null;\n\n const numericValue = Number(rawValue);\n if (Number.isFinite(numericValue)) return numericValue;\n\n LogService.warn(`format-bytes: invalid numeric value \"${rawValue}\"`);\n return null;\n }\n\n #resolveAutoUnit(value: number, display: FormatBytesDisplay): FormatBytesUnit {\n const base = display === 'binary' ? 1024 : 1000;\n const absoluteValue = Math.abs(value);\n\n for (let index = UNITS.length - 1; index > 0; index--) {\n const unit = UNITS[index];\n if (unit && absoluteValue >= base ** index) return unit;\n }\n\n return 'b';\n }\n\n #formatLabel(unit: FormatBytesUnit, convertedValue: number): string {\n const labels = this.display === 'binary' ? BINARY_LABELS[unit] : DECIMAL_LABELS[unit];\n if (this.unitDisplay === 'short') return labels.short;\n return Math.abs(convertedValue) === 1 ? labels.singular : labels.plural;\n }\n\n #warnInvalidOption(name: string, value: unknown): void {\n LogService.warn(`format-bytes: invalid ${name} value \"${String(value)}\"`);\n }\n\n #hasValidConfiguration(): boolean {\n if (!isDisplay(this.display)) {\n this.#warnInvalidOption('display', this.display);\n return false;\n }\n if (!isUnitDisplay(this.unitDisplay)) {\n this.#warnInvalidOption('unit-display', this.unitDisplay);\n return false;\n }\n if (this.unit !== undefined && !isUnit(this.unit)) {\n this.#warnInvalidOption('unit', this.unit);\n return false;\n }\n return true;\n }\n\n get #numberFormatOptions(): Intl.NumberFormatOptions {\n const effectiveMaximumFractionDigits = this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 0, 2);\n return {\n minimumFractionDigits: this.minimumFractionDigits,\n maximumFractionDigits: effectiveMaximumFractionDigits\n };\n }\n\n #roundNumber(value: number): number {\n return Number(\n new Intl.NumberFormat('en-US-u-nu-latn', {\n ...this.#numberFormatOptions,\n useGrouping: false\n }).format(value)\n );\n }\n\n #formatNumber(value: number): string {\n return new Intl.NumberFormat(this.#resolvedLocale, this.#numberFormatOptions).format(value);\n }\n\n get #formattedBytes(): string {\n const rawValue = this.#rawValue;\n if (!rawValue) return '';\n\n const numericValue = this.#parsedValue;\n if (numericValue === null) return rawValue;\n if (!this.#hasValidConfiguration()) return rawValue;\n\n const resolvedUnit = this.unit ?? this.#resolveAutoUnit(numericValue, this.display);\n const unitIndex = UNITS.indexOf(resolvedUnit);\n const base = this.display === 'binary' ? 1024 : 1000;\n const convertedValue = numericValue / base ** unitIndex;\n\n try {\n const roundedValue = this.#roundNumber(convertedValue);\n return `${this.#formatNumber(roundedValue)} ${this.#formatLabel(resolvedUnit, roundedValue)}`;\n } catch (error) {\n const message = error instanceof Error ? error.message : String(error);\n LogService.warn(`format-bytes: ${message}`);\n return rawValue;\n }\n }\n\n render() {\n return html`<data internal-host value=${this.#rawValue}>${this.#formattedBytes}<slot @slotchange=${this.#onSlotChange} hidden></slot></data>`;\n }\n\n #onSlotChange() {\n this.requestUpdate();\n }\n}\n"],"mappings":";;;;;;;;AAkBA,IAAM,IAAoC;CAAC;CAAK;CAAM;CAAM;CAAM;CAAM;AAAI,GACtE,IAA0C,CAAC,WAAW,QAAQ,GAC9D,IAAmD,CAAC,SAAS,MAAM,GAEnE,IAAsD;CAC1D,GAAG;EAAE,OAAO;EAAK,UAAU;EAAQ,QAAQ;CAAQ;CACnD,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;CAC7D,IAAI;EAAE,OAAO;EAAM,UAAU;EAAY,QAAQ;CAAY;AAC/D,GAEM,IAAqD;CACzD,GAAG;EAAE,OAAO;EAAK,UAAU;EAAQ,QAAQ;CAAQ;CACnD,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;CAC9D,IAAI;EAAE,OAAO;EAAO,UAAU;EAAY,QAAQ;CAAY;AAChE;AAEA,SAAS,EAAU,GAA6C;CAC9D,OAAO,EAAS,MAAK,MAAW,MAAY,CAAK;AACnD;AAEA,SAAS,EAAO,GAA0C;CACxD,OAAO,EAAM,MAAK,MAAQ,MAAS,CAAK;AAC1C;AAEA,SAAS,EAAc,GAAiD;CACtE,OA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AAK,GAAgB,qBAAoB,KAAK,GAAc;CACxH;CAEA,KAAgB;EACd,KAAK,cAAc;CACrB;AACF;AA9IG,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAe,CAAC,CAAA,GAAA,EAAA,WAAA,eAAA,KAAA,CAAA,GAMpD,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAA0B,CAAC,CAAA,GAAA,EAAA,WAAA,yBAAA,KAAA,CAAA,GAK/D,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAA0B,CAAC,CAAA,GAAA,EAAA,WAAA,yBAAA,KAAA,CAAA,GA7CjE,IAAA,EAAA,CAAA,EAAQ,CAAA,GAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { LogService as e } from "../internal/services/log.service.js";
2
2
  import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
3
  import { useStyles as n } from "../internal/styles/index.js";
4
- import r from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
4
+ import r from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
5
5
  import i from "./format-datetime.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
@@ -13,7 +13,7 @@ var c = class extends a {
13
13
  static {
14
14
  this.metadata = {
15
15
  tag: "nve-format-datetime",
16
- version: "2.7.3"
16
+ version: "2.8.0"
17
17
  };
18
18
  }
19
19
  get #e() {
@@ -1 +1 @@
1
- {"version":3,"file":"format-datetime2.js","names":["#dateValue","#resolvedLocale","#formattedDate","#parseDate","#formatOptions","#hasPresetStyle","#presetFormatOptions","#granularFormatOptions","#onSlotChange"],"sources":["../../src/format-datetime/format-datetime.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 { useStyles, typeSSR, LogService } from '@nvidia-elements/core/internal';\nimport styles from './format-datetime.css?inline';\n\n/**\n * @element nve-format-datetime\n * @description Formats a date/time value as localized text using the Intl.DateTimeFormat API. Renders inside a semantic time element.\n * Granular options (weekday, year, month, day, hour, minute, second) mirror the Intl.DateTimeFormat API. 'numeric' omits zero-padding, '2-digit' zero-pads.\n * @documentation https://nvidia.github.io/elements/docs/elements/format-datetime/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/format-datetime\n * @slot - Date string to format (such as 2023-07-28T04:20:17.434Z). Serves as fallback before hydration.\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time\n */\n@typeSSR()\nexport class FormatDatetime extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-format-datetime',\n version: '0.0.0'\n };\n\n /**\n * Optional date string for values supplied by JavaScript or bound data.\n * By default, the component formats the element's text content, which also serves as the SSR fallback.\n * When both are present, this property takes precedence.\n */\n @property({ type: String }) date?: string;\n\n /**\n * Language tag (such as en-US, de-DE). Defaults to document.documentElement.lang or browser default.\n */\n @property({ type: String }) locale?: string;\n\n /**\n * Weekday representation: 'long' | 'short' | 'narrow'.\n */\n @property({ type: String }) weekday?: 'long' | 'short' | 'narrow';\n\n /**\n * Year representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) year?: 'numeric' | '2-digit';\n\n /**\n * Month representation: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow'.\n */\n @property({ type: String }) month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';\n\n /**\n * Day representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) day?: 'numeric' | '2-digit';\n\n /**\n * Hour representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) hour?: 'numeric' | '2-digit';\n\n /**\n * Minute representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) minute?: 'numeric' | '2-digit';\n\n /**\n * Second representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) second?: 'numeric' | '2-digit';\n\n /**\n * Preset date formatting style: 'full' | 'long' | 'medium' | 'short'.\n * Preset styles take precedence over granular date and time part options.\n */\n @property({ type: String, attribute: 'date-style' }) dateStyle?: 'full' | 'long' | 'medium' | 'short';\n\n /**\n * Preset time formatting style: 'full' | 'long' | 'medium' | 'short'.\n * Preset styles take precedence over granular date and time part options.\n */\n @property({ type: String, attribute: 'time-style' }) timeStyle?: 'full' | 'long' | 'medium' | 'short';\n\n /**\n * Time zone name display: 'long' | 'short'. Use it with granular options only; preset styles ignore it.\n */\n @property({ type: String, attribute: 'time-zone-name' }) timeZoneName?: 'long' | 'short';\n\n /**\n * IANA time zone identifier (such as 'America/New_York', 'UTC').\n */\n @property({ type: String, attribute: 'time-zone' }) timeZone?: string;\n\n get #dateValue(): string {\n return this.date ?? this.textContent?.trim() ?? '';\n }\n\n get #resolvedLocale(): string | undefined {\n return this.locale ?? (globalThis.document?.documentElement?.lang || undefined);\n }\n\n get #formattedDate(): string {\n const iso = this.#dateValue;\n if (!iso) return '';\n\n const date = this.#parseDate(iso);\n if (!date) return iso;\n\n try {\n return new Intl.DateTimeFormat(this.#resolvedLocale, this.#formatOptions).format(date);\n } catch (e) {\n LogService.warn(`format-datetime: ${(e as Error).message}`);\n return iso;\n }\n }\n\n get #formatOptions(): Intl.DateTimeFormatOptions {\n return this.#hasPresetStyle ? this.#presetFormatOptions : this.#granularFormatOptions;\n }\n\n get #hasPresetStyle(): boolean {\n return this.dateStyle !== undefined || this.timeStyle !== undefined;\n }\n\n get #presetFormatOptions(): Intl.DateTimeFormatOptions {\n const options: Intl.DateTimeFormatOptions = {};\n\n if (this.dateStyle) options.dateStyle = this.dateStyle;\n if (this.timeStyle) options.timeStyle = this.timeStyle;\n if (this.timeZone) options.timeZone = this.timeZone;\n\n return options;\n }\n\n get #granularFormatOptions(): Intl.DateTimeFormatOptions {\n const options: Intl.DateTimeFormatOptions = {};\n\n if (this.weekday) options.weekday = this.weekday;\n if (this.year) options.year = this.year;\n if (this.month) options.month = this.month;\n if (this.day) options.day = this.day;\n if (this.hour) options.hour = this.hour;\n if (this.minute) options.minute = this.minute;\n if (this.second) options.second = this.second;\n if (this.timeZoneName) options.timeZoneName = this.timeZoneName;\n if (this.timeZone) options.timeZone = this.timeZone;\n\n return options;\n }\n\n #parseDate(iso: string): Date | null {\n const date = new Date(iso);\n if (!isNaN(date.getTime())) return date;\n\n LogService.warn(`format-datetime: invalid date value \"${iso}\"`);\n return null;\n }\n\n render() {\n return html`<time internal-host datetime=${this.#dateValue}>${this.#formattedDate}<slot @slotchange=${this.#onSlotChange} hidden></slot></time>`;\n }\n\n #onSlotChange() {\n this.requestUpdate();\n }\n}\n"],"mappings":";;;;;;;;AAmBO,IAAA,IAAA,cAA6B,EAAW;;gBAC7B,EAAU,CAAC,CAAM,CAAC;;;kBAEP;GACzB,KAAK;GACL,SAAS;EACX;;CAuEA,IAAIA,KAAqB;EACvB,OAAO,KAAK,QAAQ,KAAK,aAAa,KAAK,KAAK;CAClD;CAEA,IAAIC,KAAsC;EACxC,OAAO,KAAK,WAAW,WAAW,UAAU,iBAAiB,QAAQ,KAAA;CACvE;CAEA,IAAIC,KAAyB;EAC3B,IAAM,IAAM,KAAKF;EACjB,IAAI,CAAC,GAAK,OAAO;EAEjB,IAAM,IAAO,KAAKG,GAAW,CAAG;EAChC,IAAI,CAAC,GAAM,OAAO;EAElB,I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,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,WAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,OAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAKzB,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,MAMzB,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAMlD,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,MAKlD,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAiB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,MAKtD,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,UA5EnD,EAAQ,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"format-datetime2.js","names":[],"sources":["../../src/format-datetime/format-datetime.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 { useStyles, typeSSR, LogService } from '@nvidia-elements/core/internal';\nimport styles from './format-datetime.css?inline';\n\n/**\n * @element nve-format-datetime\n * @description Formats a date/time value as localized text using the Intl.DateTimeFormat API. Renders inside a semantic time element.\n * Granular options (weekday, year, month, day, hour, minute, second) mirror the Intl.DateTimeFormat API. 'numeric' omits zero-padding, '2-digit' zero-pads.\n * @documentation https://nvidia.github.io/elements/docs/elements/format-datetime/\n * @since 0.0.0\n * @entrypoint \\@nvidia-elements/core/format-datetime\n * @slot - Date string to format (such as 2023-07-28T04:20:17.434Z). Serves as fallback before hydration.\n * @aria https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time\n */\n@typeSSR()\nexport class FormatDatetime extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-format-datetime',\n version: '0.0.0'\n };\n\n /**\n * Optional date string for values supplied by JavaScript or bound data.\n * By default, the component formats the element's text content, which also serves as the SSR fallback.\n * When both are present, this property takes precedence.\n */\n @property({ type: String }) date?: string;\n\n /**\n * Language tag (such as en-US, de-DE). Defaults to document.documentElement.lang or browser default.\n */\n @property({ type: String }) locale?: string;\n\n /**\n * Weekday representation: 'long' | 'short' | 'narrow'.\n */\n @property({ type: String }) weekday?: 'long' | 'short' | 'narrow';\n\n /**\n * Year representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) year?: 'numeric' | '2-digit';\n\n /**\n * Month representation: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow'.\n */\n @property({ type: String }) month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';\n\n /**\n * Day representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) day?: 'numeric' | '2-digit';\n\n /**\n * Hour representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) hour?: 'numeric' | '2-digit';\n\n /**\n * Minute representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) minute?: 'numeric' | '2-digit';\n\n /**\n * Second representation: 'numeric' | '2-digit'.\n */\n @property({ type: String }) second?: 'numeric' | '2-digit';\n\n /**\n * Preset date formatting style: 'full' | 'long' | 'medium' | 'short'.\n * Preset styles take precedence over granular date and time part options.\n */\n @property({ type: String, attribute: 'date-style' }) dateStyle?: 'full' | 'long' | 'medium' | 'short';\n\n /**\n * Preset time formatting style: 'full' | 'long' | 'medium' | 'short'.\n * Preset styles take precedence over granular date and time part options.\n */\n @property({ type: String, attribute: 'time-style' }) timeStyle?: 'full' | 'long' | 'medium' | 'short';\n\n /**\n * Time zone name display: 'long' | 'short'. Use it with granular options only; preset styles ignore it.\n */\n @property({ type: String, attribute: 'time-zone-name' }) timeZoneName?: 'long' | 'short';\n\n /**\n * IANA time zone identifier (such as 'America/New_York', 'UTC').\n */\n @property({ type: String, attribute: 'time-zone' }) timeZone?: string;\n\n get #dateValue(): string {\n return this.date ?? this.textContent?.trim() ?? '';\n }\n\n get #resolvedLocale(): string | undefined {\n return this.locale ?? (globalThis.document?.documentElement?.lang || undefined);\n }\n\n get #formattedDate(): string {\n const iso = this.#dateValue;\n if (!iso) return '';\n\n const date = this.#parseDate(iso);\n if (!date) return iso;\n\n try {\n return new Intl.DateTimeFormat(this.#resolvedLocale, this.#formatOptions).format(date);\n } catch (e) {\n LogService.warn(`format-datetime: ${(e as Error).message}`);\n return iso;\n }\n }\n\n get #formatOptions(): Intl.DateTimeFormatOptions {\n return this.#hasPresetStyle ? this.#presetFormatOptions : this.#granularFormatOptions;\n }\n\n get #hasPresetStyle(): boolean {\n return this.dateStyle !== undefined || this.timeStyle !== undefined;\n }\n\n get #presetFormatOptions(): Intl.DateTimeFormatOptions {\n const options: Intl.DateTimeFormatOptions = {};\n\n if (this.dateStyle) options.dateStyle = this.dateStyle;\n if (this.timeStyle) options.timeStyle = this.timeStyle;\n if (this.timeZone) options.timeZone = this.timeZone;\n\n return options;\n }\n\n get #granularFormatOptions(): Intl.DateTimeFormatOptions {\n const options: Intl.DateTimeFormatOptions = {};\n\n if (this.weekday) options.weekday = this.weekday;\n if (this.year) options.year = this.year;\n if (this.month) options.month = this.month;\n if (this.day) options.day = this.day;\n if (this.hour) options.hour = this.hour;\n if (this.minute) options.minute = this.minute;\n if (this.second) options.second = this.second;\n if (this.timeZoneName) options.timeZoneName = this.timeZoneName;\n if (this.timeZone) options.timeZone = this.timeZone;\n\n return options;\n }\n\n #parseDate(iso: string): Date | null {\n const date = new Date(iso);\n if (!isNaN(date.getTime())) return date;\n\n LogService.warn(`format-datetime: invalid date value \"${iso}\"`);\n return null;\n }\n\n render() {\n return html`<time internal-host datetime=${this.#dateValue}>${this.#formattedDate}<slot @slotchange=${this.#onSlotChange} hidden></slot></time>`;\n }\n\n #onSlotChange() {\n this.requestUpdate();\n }\n}\n"],"mappings":";;;;;;;;AAmBO,IAAM,IAAN,cAA6B,EAAW;;EAC7B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;EACX;;CAuEA,IAAI,KAAqB;EACvB,OAAO,KAAK,QAAQ,KAAK,aAAa,KAAK,KAAK;CAClD;CAEA,IAAI,KAAsC;EACxC,OAAO,KAAK,WAAW,WAAW,UAAU,iBAAiB,QAAQ,KAAA;CACvE;CAEA,IAAI,KAAyB;EAC3B,IAAM,IAAM,KAAK;EACjB,IAAI,CAAC,GAAK,OAAO;EAEjB,IAAM,IAAO,KAAK,GAAW,CAAG;EAChC,IAAI,CAAC,GAAM,OAAO;EAElB,IAAI;GACF,OAAO,IAAI,KAAK,eAAe,KAAK,IAAiB,KAAK,EAAc,CAAC,CAAC,OAAO,CAAI;EACvF,SAAS,GAAG;GAEV,OADA,EAAW,KAAK,oBAAqB,EAAY,SAAS,GACnD;EACT;CACF;CAEA,IAAI,KAA6C;EAC/C,OAAO,KAAK,KAAkB,KAAK,KAAuB,KAAK;CACjE;CAEA,IAAI,KAA2B;EAC7B,OAAO,KAAK,cAA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CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,SAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,OAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,QAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAKzB,EAAA,CAAA,EAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,EAAA,WAAA,UAAA,KAAA,CAAA,GAMzB,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAMlD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,EAAA,WAAA,aAAA,KAAA,CAAA,GAKlD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAiB,CAAC,CAAA,GAAA,EAAA,WAAA,gBAAA,KAAA,CAAA,GAKtD,EAAA,CAAA,EAAS;CAAE,MAAM;CAAQ,WAAW;AAAY,CAAC,CAAA,GAAA,EAAA,WAAA,YAAA,KAAA,CAAA,GA5EnD,IAAA,EAAA,CAAA,EAAQ,CAAA,GAAA,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { LogService as e } from "../internal/services/log.service.js";
2
2
  import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
3
  import { useStyles as n } from "../internal/styles/index.js";
4
- import r from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
4
+ import r from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
5
5
  import i from "./format-number.js";
6
6
  import { LitElement as a, html as o } from "lit";
7
7
  import { property as s } from "lit/decorators/property.js";
@@ -29,7 +29,7 @@ var c = [
29
29
  static {
30
30
  this.metadata = {
31
31
  tag: "nve-format-number",
32
- version: "2.7.3"
32
+ version: "2.8.0"
33
33
  };
34
34
  }
35
35
  get #e() {