@nvidia-elements/core 2.18.0 → 2.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/accordion/accordion2.js +4 -4
  3. package/dist/alert/alert-group2.js +1 -1
  4. package/dist/alert/alert2.js +1 -1
  5. package/dist/avatar/avatar-group2.js +1 -1
  6. package/dist/avatar/avatar2.js +1 -1
  7. package/dist/badge/badge2.js +1 -1
  8. package/dist/breadcrumb/breadcrumb2.js +1 -1
  9. package/dist/bundles/index.d.ts +3 -3
  10. package/dist/bundles/index.js +9 -9
  11. package/dist/button/button2.js +1 -1
  12. package/dist/button-group/button-group.d.ts +1 -1
  13. package/dist/button-group/button-group2.js +4 -2
  14. package/dist/button-group/button-group2.js.map +1 -1
  15. package/dist/card/card2.js +7 -9
  16. package/dist/card/card2.js.map +1 -1
  17. package/dist/chat-message/chat-message2.js +1 -1
  18. package/dist/checkbox/checkbox-group2.js +1 -1
  19. package/dist/checkbox/checkbox2.js +1 -1
  20. package/dist/color/color2.js +1 -1
  21. package/dist/combobox/combobox2.js +1 -1
  22. package/dist/copy-button/copy-button2.js +1 -1
  23. package/dist/custom-elements-jsx.d.ts +5 -5
  24. package/dist/custom-elements-vue.d.ts +5 -5
  25. package/dist/custom-elements.json +28 -50
  26. package/dist/data.html.json +3 -3
  27. package/dist/date/date2.js +1 -1
  28. package/dist/datetime/datetime2.js +1 -1
  29. package/dist/dialog/dialog-footer2.js +8 -11
  30. package/dist/dialog/dialog-footer2.js.map +1 -1
  31. package/dist/dialog/dialog-header2.js +8 -11
  32. package/dist/dialog/dialog-header2.js.map +1 -1
  33. package/dist/dialog/dialog2.js +1 -1
  34. package/dist/divider/divider2.js +1 -1
  35. package/dist/dot/dot2.js +1 -1
  36. package/dist/drag-handle/drag-handle2.js +1 -1
  37. package/dist/drawer/drawer-content2.js +8 -11
  38. package/dist/drawer/drawer-content2.js.map +1 -1
  39. package/dist/drawer/drawer-footer2.js +8 -11
  40. package/dist/drawer/drawer-footer2.js.map +1 -1
  41. package/dist/drawer/drawer-header2.js +8 -11
  42. package/dist/drawer/drawer-header2.js.map +1 -1
  43. package/dist/drawer/drawer2.js +1 -1
  44. package/dist/dropdown/dropdown-footer2.js +8 -11
  45. package/dist/dropdown/dropdown-footer2.js.map +1 -1
  46. package/dist/dropdown/dropdown-header2.js +8 -11
  47. package/dist/dropdown/dropdown-header2.js.map +1 -1
  48. package/dist/dropdown/dropdown2.js +1 -1
  49. package/dist/dropdown-group/dropdown-group.js +1 -1
  50. package/dist/dropzone/dropzone2.js +1 -1
  51. package/dist/file/file2.js +1 -1
  52. package/dist/format-bytes/format-bytes2.js +49 -54
  53. package/dist/format-bytes/format-bytes2.js.map +1 -1
  54. package/dist/format-datetime/format-datetime2.js +26 -27
  55. package/dist/format-datetime/format-datetime2.js.map +1 -1
  56. package/dist/format-number/format-number.d.ts +2 -2
  57. package/dist/format-number/format-number2.js +37 -38
  58. package/dist/format-number/format-number2.js.map +1 -1
  59. package/dist/format-relative-time/format-relative-time2.js +27 -28
  60. package/dist/format-relative-time/format-relative-time2.js.map +1 -1
  61. package/dist/format-truncate/format-truncate2.js +1 -1
  62. package/dist/forms/control/control2.js +1 -1
  63. package/dist/forms/control-group/control-group2.js +1 -1
  64. package/dist/forms/control-message/control-message2.js +1 -1
  65. package/dist/gauge/gauge2.js +1 -1
  66. package/dist/grid/cell/cell2.js +1 -1
  67. package/dist/grid/column/column2.js +1 -1
  68. package/dist/grid/footer/footer2.js +1 -1
  69. package/dist/grid/grid2.js +1 -1
  70. package/dist/grid/header/header2.js +7 -7
  71. package/dist/grid/placeholder/placeholder2.js +1 -1
  72. package/dist/grid/row/row2.js +1 -1
  73. package/dist/icon/icon2.js +2 -2
  74. package/dist/icon-button/icon-button2.js +1 -1
  75. package/dist/iframe/iframe2.js +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/input/input-group2.js +1 -1
  78. package/dist/input/input2.js +1 -1
  79. package/dist/internal/controllers/audit.controller.d.ts +0 -2
  80. package/dist/internal/controllers/audit.controller.js +42 -52
  81. package/dist/internal/controllers/audit.controller.js.map +1 -1
  82. package/dist/internal/controllers/keynav-grid.controller.js +11 -11
  83. package/dist/internal/controllers/type-native-popover.controller.js +16 -11
  84. package/dist/internal/controllers/type-native-popover.controller.js.map +1 -1
  85. package/dist/internal/index.js +28 -28
  86. package/dist/internal/services/global.service.js +1 -1
  87. package/dist/internal/utils/audit-logs.d.ts +1 -1
  88. package/dist/internal/utils/audit-logs.js +3 -3
  89. package/dist/internal/utils/audit-logs.js.map +1 -1
  90. package/dist/internal/utils/audit.d.ts +0 -8
  91. package/dist/internal/utils/audit.js +1 -5
  92. package/dist/internal/utils/audit.js.map +1 -1
  93. package/dist/logo/logo2.js +1 -1
  94. package/dist/menu/menu-group2.js +1 -1
  95. package/dist/menu/menu-item2.js +1 -1
  96. package/dist/menu/menu2.js +1 -1
  97. package/dist/month/month2.js +1 -1
  98. package/dist/notification/notification-group2.js +1 -1
  99. package/dist/notification/notification2.js +1 -1
  100. package/dist/page/page-panel/page-panel-content2.js +1 -1
  101. package/dist/page/page-panel/page-panel-footer2.js +1 -1
  102. package/dist/page/page-panel/page-panel-header2.js +1 -1
  103. package/dist/page/page-panel/page-panel2.js +19 -20
  104. package/dist/page/page-panel/page-panel2.js.map +1 -1
  105. package/dist/page/page2.js +2 -2
  106. package/dist/page/page2.js.map +1 -1
  107. package/dist/page-header/page-header2.js +1 -1
  108. package/dist/page-loader/page-loader2.js +1 -1
  109. package/dist/pagination/pagination2.js +1 -1
  110. package/dist/panel/panel2.js +4 -4
  111. package/dist/password/password2.js +1 -1
  112. package/dist/preferences-input/preferences-input2.js +1 -1
  113. package/dist/progress-bar/progress-bar2.js +1 -1
  114. package/dist/progress-dot/progress-dot2.js +1 -1
  115. package/dist/progress-ring/progress-ring2.js +1 -1
  116. package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
  117. package/dist/pulse/pulse2.js +1 -1
  118. package/dist/radio/radio-group2.js +1 -1
  119. package/dist/radio/radio2.js +1 -1
  120. package/dist/range/range2.js +1 -1
  121. package/dist/resize-handle/resize-handle2.js +1 -1
  122. package/dist/search/search2.js +1 -1
  123. package/dist/select/select2.js +1 -1
  124. package/dist/skeleton/skeleton2.js +1 -1
  125. package/dist/sort-button/sort-button2.js +1 -1
  126. package/dist/sparkline/sparkline2.js +1 -1
  127. package/dist/star-rating/star-rating2.js +1 -1
  128. package/dist/steps/steps2.js +2 -2
  129. package/dist/switch/switch-group2.js +1 -1
  130. package/dist/switch/switch2.js +1 -1
  131. package/dist/tabs/tabs-group2.js +1 -1
  132. package/dist/tabs/tabs-item-group2.js +1 -1
  133. package/dist/tabs/tabs2.js +2 -2
  134. package/dist/tag/tag2.js +1 -1
  135. package/dist/textarea/textarea2.js +1 -1
  136. package/dist/time/time2.js +1 -1
  137. package/dist/toast/toast2.js +1 -1
  138. package/dist/toggletip/toggletip-footer2.js +8 -11
  139. package/dist/toggletip/toggletip-footer2.js.map +1 -1
  140. package/dist/toggletip/toggletip-header2.js +8 -11
  141. package/dist/toggletip/toggletip-header2.js.map +1 -1
  142. package/dist/toggletip/toggletip2.js +1 -1
  143. package/dist/toolbar/toolbar2.js +1 -1
  144. package/dist/tooltip/tooltip2.js +1 -1
  145. package/dist/tree/tree-node2.js +1 -1
  146. package/dist/tree/tree.examples.js.map +1 -1
  147. package/dist/tree/tree2.js +1 -1
  148. package/dist/week/week2.js +1 -1
  149. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-header2.js","names":[],"sources":["../../src/dialog/dialog-header.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dialog-header.css?inline';\n\n/**\n * @element nve-dialog-header\n * @description Displays the title and contextual information at the top of a dialog to orient users to the dialog's purpose.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @slot - default slot for the dialog header\n * @cssprop --border-bottom\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DialogHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog-header',\n version: '0.0.0',\n parents: ['nve-dialog']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.slot = 'header';\n }\n}\n"],"mappings":";;;;;;AAmBO,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
+ {"version":3,"file":"dialog-header2.js","names":[],"sources":["../../src/dialog/dialog-header.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { useStyles } from '@nvidia-elements/core/internal';\nimport styles from './dialog-header.css?inline';\n\n/**\n * @element nve-dialog-header\n * @description Displays the title and contextual information at the top of a dialog to orient users to the dialog's purpose.\n * @documentation https://nvidia.github.io/elements/docs/elements/dialog/\n * @since 0.6.0\n * @entrypoint \\@nvidia-elements/core/dialog\n * @slot - default slot for the dialog header\n * @cssprop --border-bottom\n * @cssprop --padding\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\nexport class DialogHeader extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-dialog-header',\n version: '0.0.0',\n parents: ['nve-dialog']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.slot = 'header';\n }\n}\n"],"mappings":";;;;AAkBA,IAAa,IAAb,cAAkC,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"}
@@ -30,7 +30,7 @@ var h = class extends f {
30
30
  static {
31
31
  this.metadata = {
32
32
  tag: "nve-dialog",
33
- version: "2.18.0"
33
+ version: "2.18.2"
34
34
  };
35
35
  }
36
36
  static {
@@ -15,7 +15,7 @@ var s = class extends i {
15
15
  static {
16
16
  this.metadata = {
17
17
  tag: "nve-divider",
18
- version: "2.18.0"
18
+ version: "2.18.2"
19
19
  };
20
20
  }
21
21
  render() {
package/dist/dot/dot2.js CHANGED
@@ -16,7 +16,7 @@ var l = class extends o {
16
16
  static {
17
17
  this.metadata = {
18
18
  tag: "nve-dot",
19
- version: "2.18.0"
19
+ version: "2.18.2"
20
20
  };
21
21
  }
22
22
  render() {
@@ -13,7 +13,7 @@ var c = class extends s(a) {
13
13
  static {
14
14
  this.metadata = {
15
15
  tag: "nve-drag-handle",
16
- version: "2.18.0"
16
+ version: "2.18.2"
17
17
  };
18
18
  }
19
19
  static {
@@ -1,26 +1,23 @@
1
- import { audit as e } from "../internal/controllers/audit.controller.js";
2
- import { useStyles as t } from "../internal/styles/index.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
- import r from "./drawer-content.js";
5
- import { LitElement as i, html as a } from "lit";
1
+ import { useStyles as e } from "../internal/styles/index.js";
2
+ import t from "./drawer-content.js";
3
+ import { LitElement as n, html as r } from "lit";
6
4
  //#region src/drawer/drawer-content.ts
7
- var o = class extends i {
5
+ var i = class extends n {
8
6
  static {
9
- this.styles = t([r]);
7
+ this.styles = e([t]);
10
8
  }
11
9
  static {
12
10
  this.metadata = {
13
11
  tag: "nve-drawer-content",
14
- version: "2.18.0",
12
+ version: "2.18.2",
15
13
  parents: ["nve-drawer"]
16
14
  };
17
15
  }
18
16
  render() {
19
- return a`<div internal-host><slot></slot></div>`;
17
+ return r`<div internal-host><slot></slot></div>`;
20
18
  }
21
19
  };
22
- o = n([e()], o);
23
20
  //#endregion
24
- export { o as DrawerContent };
21
+ export { i as DrawerContent };
25
22
 
26
23
  //# sourceMappingURL=drawer-content2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-content2.js","names":[],"sources":["../../src/drawer/drawer-content.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { audit, useStyles } from '@nvidia-elements/core/internal';\nimport styles from './drawer-content.css?inline';\n\n/**\n * @element nve-drawer-content\n * @description Contains the scrollable main body content within a drawer panel.\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer content\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\n@audit()\nexport class DrawerContent extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-content',\n version: '0.0.0',\n parents: ['nve-drawer']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;AAmBO,IAAM,IAAN,cAA4B,EAAW;;EAC5B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,YAAY;EACxB;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;AACF;AAjBC,IAAA,EAAA,CAAA,EAAM,CAAA,GAAA,CAAA"}
1
+ {"version":3,"file":"drawer-content2.js","names":[],"sources":["../../src/drawer/drawer-content.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html, LitElement } from 'lit';\nimport { useStyles } from '@nvidia-elements/core/internal';\nimport styles from './drawer-content.css?inline';\n\n/**\n * @element nve-drawer-content\n * @description Contains the scrollable main body content within a drawer panel.\n * @since 0.16.0\n * @entrypoint \\@nvidia-elements/core/drawer\n * @slot - default slot for the drawer content\n * @cssprop --padding\n * @cssprop --gap\n * @cssprop --width\n * @aria https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/\n */\nexport class DrawerContent extends LitElement {\n static styles = useStyles([styles]);\n\n static readonly metadata = {\n tag: 'nve-drawer-content',\n version: '0.0.0',\n parents: ['nve-drawer']\n };\n\n render() {\n return html`\n <div internal-host>\n <slot></slot>\n </div>\n `;\n }\n}\n"],"mappings":";;;;AAkBA,IAAa,IAAb,cAAmC,EAAW;;EAC5B,KAAA,SAAA,EAAU,CAAC,CAAM,CAAC;;;EAEP,KAAA,WAAA;GACzB,KAAK;GACL,SAAS;GACT,SAAS,CAAC,YAAY;EACxB;;CAEA,SAAS;EACP,OAAO,CAAI;CAKb;AACF"}
@@ -1,29 +1,26 @@
1
- import { audit as e } from "../internal/controllers/audit.controller.js";
2
- import { useStyles as t } from "../internal/styles/index.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
- import r from "./drawer-footer.js";
5
- import { LitElement as i, html as a } from "lit";
1
+ import { useStyles as e } from "../internal/styles/index.js";
2
+ import t from "./drawer-footer.js";
3
+ import { LitElement as n, html as r } from "lit";
6
4
  //#region src/drawer/drawer-footer.ts
7
- var o = class extends i {
5
+ var i = class extends n {
8
6
  static {
9
- this.styles = t([r]);
7
+ this.styles = e([t]);
10
8
  }
11
9
  static {
12
10
  this.metadata = {
13
11
  tag: "nve-drawer-footer",
14
- version: "2.18.0",
12
+ version: "2.18.2",
15
13
  parents: ["nve-drawer"]
16
14
  };
17
15
  }
18
16
  render() {
19
- return a`<div internal-host><slot></slot></div>`;
17
+ return r`<div internal-host><slot></slot></div>`;
20
18
  }
21
19
  connectedCallback() {
22
20
  super.connectedCallback(), this.slot = "footer";
23
21
  }
24
22
  };
25
- o = n([e()], o);
26
23
  //#endregion
27
- export { o as DrawerFooter };
24
+ export { i as DrawerFooter };
28
25
 
29
26
  //# sourceMappingURL=drawer-footer2.js.map
@@ -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,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
+ {"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 { 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 */\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":";;;;AAoBA,IAAa,IAAb,cAAkC,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"}
@@ -1,29 +1,26 @@
1
- import { audit as e } from "../internal/controllers/audit.controller.js";
2
- import { useStyles as t } from "../internal/styles/index.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
- import r from "./drawer-header.js";
5
- import { LitElement as i, html as a } from "lit";
1
+ import { useStyles as e } from "../internal/styles/index.js";
2
+ import t from "./drawer-header.js";
3
+ import { LitElement as n, html as r } from "lit";
6
4
  //#region src/drawer/drawer-header.ts
7
- var o = class extends i {
5
+ var i = class extends n {
8
6
  static {
9
- this.styles = t([r]);
7
+ this.styles = e([t]);
10
8
  }
11
9
  static {
12
10
  this.metadata = {
13
11
  tag: "nve-drawer-header",
14
- version: "2.18.0",
12
+ version: "2.18.2",
15
13
  parents: ["nve-drawer"]
16
14
  };
17
15
  }
18
16
  render() {
19
- return a`<div internal-host><slot></slot></div>`;
17
+ return r`<div internal-host><slot></slot></div>`;
20
18
  }
21
19
  connectedCallback() {
22
20
  super.connectedCallback(), this.slot = "header";
23
21
  }
24
22
  };
25
- o = n([e()], o);
26
23
  //#endregion
27
- export { o as DrawerHeader };
24
+ export { i as DrawerHeader };
28
25
 
29
26
  //# sourceMappingURL=drawer-header2.js.map
@@ -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,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
+ {"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 { 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 */\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":";;;;AAmBA,IAAa,IAAb,cAAkC,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"}
@@ -30,7 +30,7 @@ var p = class extends u {
30
30
  static {
31
31
  this.metadata = {
32
32
  tag: "nve-drawer",
33
- version: "2.18.0"
33
+ version: "2.18.2"
34
34
  };
35
35
  }
36
36
  static {
@@ -1,29 +1,26 @@
1
- import { audit as e } from "../internal/controllers/audit.controller.js";
2
- import { useStyles as t } from "../internal/styles/index.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
- import r from "./dropdown-footer.js";
5
- import { LitElement as i, html as a } from "lit";
1
+ import { useStyles as e } from "../internal/styles/index.js";
2
+ import t from "./dropdown-footer.js";
3
+ import { LitElement as n, html as r } from "lit";
6
4
  //#region src/dropdown/dropdown-footer.ts
7
- var o = class extends i {
5
+ var i = class extends n {
8
6
  static {
9
- this.styles = t([r]);
7
+ this.styles = e([t]);
10
8
  }
11
9
  static {
12
10
  this.metadata = {
13
11
  tag: "nve-dropdown-footer",
14
- version: "2.18.0",
12
+ version: "2.18.2",
15
13
  parents: ["nve-dropdown"]
16
14
  };
17
15
  }
18
16
  render() {
19
- return a`<div internal-host><slot></slot></div>`;
17
+ return r`<div internal-host><slot></slot></div>`;
20
18
  }
21
19
  connectedCallback() {
22
20
  super.connectedCallback(), this.slot = "footer";
23
21
  }
24
22
  };
25
- o = n([e()], o);
26
23
  //#endregion
27
- export { o as DropdownFooter };
24
+ export { i as DropdownFooter };
28
25
 
29
26
  //# sourceMappingURL=dropdown-footer2.js.map
@@ -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,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
+ {"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 { 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 */\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":";;;;AAmBA,IAAa,IAAb,cAAoC,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"}
@@ -1,29 +1,26 @@
1
- import { audit as e } from "../internal/controllers/audit.controller.js";
2
- import { useStyles as t } from "../internal/styles/index.js";
3
- import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
- import r from "./dropdown-header.js";
5
- import { LitElement as i, html as a } from "lit";
1
+ import { useStyles as e } from "../internal/styles/index.js";
2
+ import t from "./dropdown-header.js";
3
+ import { LitElement as n, html as r } from "lit";
6
4
  //#region src/dropdown/dropdown-header.ts
7
- var o = class extends i {
5
+ var i = class extends n {
8
6
  static {
9
- this.styles = t([r]);
7
+ this.styles = e([t]);
10
8
  }
11
9
  static {
12
10
  this.metadata = {
13
11
  tag: "nve-dropdown-header",
14
- version: "2.18.0",
12
+ version: "2.18.2",
15
13
  parents: ["nve-dropdown"]
16
14
  };
17
15
  }
18
16
  render() {
19
- return a`<div internal-host><slot></slot></div>`;
17
+ return r`<div internal-host><slot></slot></div>`;
20
18
  }
21
19
  connectedCallback() {
22
20
  super.connectedCallback(), this.slot = "header";
23
21
  }
24
22
  };
25
- o = n([e()], o);
26
23
  //#endregion
27
- export { o as DropdownHeader };
24
+ export { i as DropdownHeader };
28
25
 
29
26
  //# sourceMappingURL=dropdown-header2.js.map
@@ -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,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
+ {"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 { 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 */\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":";;;;AAkBA,IAAa,IAAb,cAAoC,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"}
@@ -21,7 +21,7 @@ var p = class extends l {
21
21
  static {
22
22
  this.metadata = {
23
23
  tag: "nve-dropdown",
24
- version: "2.18.0"
24
+ version: "2.18.2"
25
25
  };
26
26
  }
27
27
  static {
@@ -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.18.0",
17
+ version: "2.18.2",
18
18
  children: ["nve-dropdown"]
19
19
  };
20
20
  }
@@ -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.18.0",
23
+ version: "2.18.2",
24
24
  validators: [l, c],
25
25
  valueSchema: {
26
26
  type: "array",
@@ -11,7 +11,7 @@ var a = class extends n {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-file",
14
- version: "2.18.0"
14
+ version: "2.18.2"
15
15
  };
16
16
  }
17
17
  connectedCallback() {
@@ -1,19 +1,18 @@
1
- import { LogService as e } from "../internal/services/log.service.js";
2
- import { typeSSR as t } from "../internal/controllers/type-ssr.controller.js";
3
- import { useStyles as n } from "../internal/styles/index.js";
4
- import r from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
5
- import i from "./format-bytes.js";
6
- import { LitElement as a, html as o } from "lit";
7
- import { property as s } from "lit/decorators/property.js";
1
+ import { typeSSR as e } from "../internal/controllers/type-ssr.controller.js";
2
+ import { useStyles as t } from "../internal/styles/index.js";
3
+ import n from "../_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/decorate.js";
4
+ import r from "./format-bytes.js";
5
+ import { LitElement as i, html as a } from "lit";
6
+ import { property as o } from "lit/decorators/property.js";
8
7
  //#region src/format-bytes/format-bytes.ts
9
- var c = [
8
+ var s = [
10
9
  "b",
11
10
  "kb",
12
11
  "mb",
13
12
  "gb",
14
13
  "tb",
15
14
  "pb"
16
- ], l = ["decimal", "binary"], u = ["short", "long"], d = {
15
+ ], c = ["decimal", "binary"], l = ["short", "long"], u = {
17
16
  b: {
18
17
  short: "B",
19
18
  singular: "byte",
@@ -44,7 +43,7 @@ var c = [
44
43
  singular: "petabyte",
45
44
  plural: "petabytes"
46
45
  }
47
- }, f = {
46
+ }, d = {
48
47
  b: {
49
48
  short: "B",
50
49
  singular: "byte",
@@ -76,26 +75,26 @@ var c = [
76
75
  plural: "pebibytes"
77
76
  }
78
77
  };
78
+ function f(e) {
79
+ return c.some((t) => t === e);
80
+ }
79
81
  function p(e) {
80
- return l.some((t) => t === e);
82
+ return s.some((t) => t === e);
81
83
  }
82
84
  function m(e) {
83
- return c.some((t) => t === e);
84
- }
85
- function h(e) {
86
- return u.some((t) => t === e);
85
+ return l.some((t) => t === e);
87
86
  }
88
- var g = class extends a {
87
+ var h = class extends i {
89
88
  constructor(...e) {
90
89
  super(...e), this.display = "decimal", this.unitDisplay = "short";
91
90
  }
92
91
  static {
93
- this.styles = n([i]);
92
+ this.styles = t([r]);
94
93
  }
95
94
  static {
96
95
  this.metadata = {
97
96
  tag: "nve-format-bytes",
98
- version: "2.18.0"
97
+ version: "2.18.2"
99
98
  };
100
99
  }
101
100
  get #e() {
@@ -106,77 +105,73 @@ var g = class extends a {
106
105
  return this.locale ?? (globalThis.document?.documentElement?.lang || void 0);
107
106
  }
108
107
  get #n() {
109
- let t = this.#e;
110
- if (!t) return null;
111
- let n = Number(t);
112
- return Number.isFinite(n) ? n : (e.warn(`format-bytes: invalid numeric value "${t}"`), null);
108
+ let e = this.#e;
109
+ if (!e) return null;
110
+ let t = Number(e);
111
+ return Number.isFinite(t) ? t : null;
113
112
  }
114
113
  #r(e, t) {
115
114
  let n = t === "binary" ? 1024 : 1e3, r = Math.abs(e);
116
- for (let e = c.length - 1; e > 0; e--) {
117
- let t = c[e];
115
+ for (let e = s.length - 1; e > 0; e--) {
116
+ let t = s[e];
118
117
  if (t && r >= n ** e) return t;
119
118
  }
120
119
  return "b";
121
120
  }
122
121
  #i(e, t) {
123
- let n = this.display === "binary" ? f[e] : d[e];
122
+ let n = this.display === "binary" ? d[e] : u[e];
124
123
  return this.unitDisplay === "short" ? n.short : Math.abs(t) === 1 ? n.singular : n.plural;
125
124
  }
126
- #a(t, n) {
127
- e.warn(`format-bytes: invalid ${t} value "${String(n)}"`);
128
- }
129
- #o() {
130
- return p(this.display) ? h(this.unitDisplay) ? this.unit !== void 0 && !m(this.unit) ? (this.#a("unit", this.unit), !1) : !0 : (this.#a("unit-display", this.unitDisplay), !1) : (this.#a("display", this.display), !1);
125
+ #a() {
126
+ return f(this.display) && m(this.unitDisplay) && (this.unit === void 0 || p(this.unit));
131
127
  }
132
- get #s() {
128
+ get #o() {
133
129
  let e = this.maximumFractionDigits ?? Math.max(this.minimumFractionDigits ?? 0, 2);
134
130
  return {
135
131
  minimumFractionDigits: this.minimumFractionDigits,
136
132
  maximumFractionDigits: e
137
133
  };
138
134
  }
139
- #c(e) {
135
+ #s(e) {
140
136
  return Number(new Intl.NumberFormat("en-US-u-nu-latn", {
141
- ...this.#s,
137
+ ...this.#o,
142
138
  useGrouping: !1
143
139
  }).format(e));
144
140
  }
145
- #l(e) {
146
- return new Intl.NumberFormat(this.#t, this.#s).format(e);
147
- }
148
- get #u() {
149
- let t = this.#e;
150
- if (!t) return "";
151
- let n = this.#n;
152
- if (n === null || !this.#o()) return t;
153
- let r = this.unit ?? this.#r(n, this.display), i = c.indexOf(r), a = n / (this.display === "binary" ? 1024 : 1e3) ** i;
141
+ #c(e) {
142
+ return new Intl.NumberFormat(this.#t, this.#o).format(e);
143
+ }
144
+ get #l() {
145
+ let e = this.#e;
146
+ if (!e) return "";
147
+ let t = this.#n;
148
+ if (t === null || !this.#a()) return e;
149
+ let n = this.unit ?? this.#r(t, this.display), r = s.indexOf(n), i = t / (this.display === "binary" ? 1024 : 1e3) ** r;
154
150
  try {
155
- let e = this.#c(a);
156
- return `${this.#l(e)} ${this.#i(r, e)}`;
157
- } catch (n) {
158
- let r = n instanceof Error ? n.message : String(n);
159
- return e.warn(`format-bytes: ${r}`), t;
151
+ let e = this.#s(i);
152
+ return `${this.#c(e)} ${this.#i(n, e)}`;
153
+ } catch {
154
+ return e;
160
155
  }
161
156
  }
162
157
  render() {
163
- return o`<data internal-host value="${this.#e}">${this.#u}<slot @slotchange="${this.#d}" hidden></slot></data>`;
158
+ return a`<data internal-host value="${this.#e}">${this.#l}<slot @slotchange="${this.#u}" hidden></slot></data>`;
164
159
  }
165
- #d() {
160
+ #u() {
166
161
  this.requestUpdate();
167
162
  }
168
163
  };
169
- r([s({ type: Number })], g.prototype, "value", void 0), r([s({ type: String })], g.prototype, "display", void 0), r([s({ type: String })], g.prototype, "unit", void 0), r([s({
164
+ n([o({ type: Number })], h.prototype, "value", void 0), n([o({ type: String })], h.prototype, "display", void 0), n([o({ type: String })], h.prototype, "unit", void 0), n([o({
170
165
  type: String,
171
166
  attribute: "unit-display"
172
- })], g.prototype, "unitDisplay", void 0), r([s({ type: String })], g.prototype, "locale", void 0), r([s({
167
+ })], h.prototype, "unitDisplay", void 0), n([o({ type: String })], h.prototype, "locale", void 0), n([o({
173
168
  type: Number,
174
169
  attribute: "minimum-fraction-digits"
175
- })], g.prototype, "minimumFractionDigits", void 0), r([s({
170
+ })], h.prototype, "minimumFractionDigits", void 0), n([o({
176
171
  type: Number,
177
172
  attribute: "maximum-fraction-digits"
178
- })], g.prototype, "maximumFractionDigits", void 0), g = r([t()], g);
173
+ })], h.prototype, "maximumFractionDigits", void 0), h = n([e()], h);
179
174
  //#endregion
180
- export { g as FormatBytes };
175
+ export { h as FormatBytes };
181
176
 
182
177
  //# sourceMappingURL=format-bytes2.js.map
@@ -1 +1 @@
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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(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 { 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 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 #hasValidConfiguration(): boolean {\n return isDisplay(this.display) && isUnitDisplay(this.unitDisplay) && (this.unit === undefined || isUnit(this.unit));\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 {\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,E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