@nvidia-elements/core 2.18.1 → 2.18.3

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 (320) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/accordion/accordion2.js +4 -4
  3. package/dist/accordion/define.js +3 -3
  4. package/dist/accordion/define.js.map +1 -1
  5. package/dist/alert/alert-group2.js +1 -1
  6. package/dist/alert/alert2.js +1 -1
  7. package/dist/alert/define.js +4 -4
  8. package/dist/alert/define.js.map +1 -1
  9. package/dist/avatar/avatar-group2.js +1 -1
  10. package/dist/avatar/avatar2.js +1 -1
  11. package/dist/avatar/define.js +4 -4
  12. package/dist/avatar/define.js.map +1 -1
  13. package/dist/badge/badge2.js +1 -1
  14. package/dist/badge/define.js +3 -3
  15. package/dist/badge/define.js.map +1 -1
  16. package/dist/breadcrumb/breadcrumb2.js +1 -1
  17. package/dist/breadcrumb/define.js +3 -3
  18. package/dist/breadcrumb/define.js.map +1 -1
  19. package/dist/bundles/index.d.ts +16 -16
  20. package/dist/bundles/index.js +9 -9
  21. package/dist/button/button2.js +1 -1
  22. package/dist/button/define.js +3 -3
  23. package/dist/button/define.js.map +1 -1
  24. package/dist/button-group/button-group.d.ts +1 -1
  25. package/dist/button-group/button-group2.js +4 -2
  26. package/dist/button-group/button-group2.js.map +1 -1
  27. package/dist/button-group/define.js +3 -3
  28. package/dist/button-group/define.js.map +1 -1
  29. package/dist/card/card2.js +7 -9
  30. package/dist/card/card2.js.map +1 -1
  31. package/dist/card/define.js +3 -3
  32. package/dist/card/define.js.map +1 -1
  33. package/dist/chat-message/chat-message2.js +1 -1
  34. package/dist/chat-message/define.js +3 -3
  35. package/dist/chat-message/define.js.map +1 -1
  36. package/dist/checkbox/checkbox-group2.js +1 -1
  37. package/dist/checkbox/checkbox2.js +1 -1
  38. package/dist/checkbox/define.js +7 -7
  39. package/dist/checkbox/define.js.map +1 -1
  40. package/dist/color/color2.js +1 -1
  41. package/dist/color/define.js +6 -6
  42. package/dist/color/define.js.map +1 -1
  43. package/dist/combobox/combobox2.js +1 -1
  44. package/dist/combobox/define.js +6 -6
  45. package/dist/combobox/define.js.map +1 -1
  46. package/dist/copy-button/copy-button2.js +1 -1
  47. package/dist/copy-button/define.js +3 -3
  48. package/dist/copy-button/define.js.map +1 -1
  49. package/dist/custom-elements-jsx.d.ts +5 -5
  50. package/dist/custom-elements-vue.d.ts +5 -5
  51. package/dist/custom-elements.json +28 -366
  52. package/dist/data.html.json +3 -3
  53. package/dist/data.snippets.json +27 -27
  54. package/dist/date/date2.js +1 -1
  55. package/dist/date/define.js +6 -6
  56. package/dist/date/define.js.map +1 -1
  57. package/dist/datetime/datetime2.js +1 -1
  58. package/dist/datetime/define.js +6 -6
  59. package/dist/datetime/define.js.map +1 -1
  60. package/dist/dialog/define.js +5 -5
  61. package/dist/dialog/define.js.map +1 -1
  62. package/dist/dialog/dialog-footer2.js +8 -11
  63. package/dist/dialog/dialog-footer2.js.map +1 -1
  64. package/dist/dialog/dialog-header2.js +8 -11
  65. package/dist/dialog/dialog-header2.js.map +1 -1
  66. package/dist/dialog/dialog2.js +1 -1
  67. package/dist/divider/define.js +3 -3
  68. package/dist/divider/define.js.map +1 -1
  69. package/dist/divider/divider2.js +1 -1
  70. package/dist/dot/define.js +3 -3
  71. package/dist/dot/define.js.map +1 -1
  72. package/dist/dot/dot2.js +1 -1
  73. package/dist/drag-handle/define.js +3 -3
  74. package/dist/drag-handle/define.js.map +1 -1
  75. package/dist/drag-handle/drag-handle2.js +1 -1
  76. package/dist/drawer/define.js +6 -6
  77. package/dist/drawer/define.js.map +1 -1
  78. package/dist/drawer/drawer-content2.js +8 -11
  79. package/dist/drawer/drawer-content2.js.map +1 -1
  80. package/dist/drawer/drawer-footer2.js +8 -11
  81. package/dist/drawer/drawer-footer2.js.map +1 -1
  82. package/dist/drawer/drawer-header2.js +8 -11
  83. package/dist/drawer/drawer-header2.js.map +1 -1
  84. package/dist/drawer/drawer2.js +1 -1
  85. package/dist/dropdown/define.js +5 -5
  86. package/dist/dropdown/define.js.map +1 -1
  87. package/dist/dropdown/dropdown-footer2.js +8 -11
  88. package/dist/dropdown/dropdown-footer2.js.map +1 -1
  89. package/dist/dropdown/dropdown-header2.js +8 -11
  90. package/dist/dropdown/dropdown-header2.js.map +1 -1
  91. package/dist/dropdown/dropdown2.js +1 -1
  92. package/dist/dropdown-group/define.js +3 -3
  93. package/dist/dropdown-group/define.js.map +1 -1
  94. package/dist/dropdown-group/dropdown-group.js +1 -1
  95. package/dist/dropzone/define.js +3 -3
  96. package/dist/dropzone/define.js.map +1 -1
  97. package/dist/dropzone/dropzone2.js +1 -1
  98. package/dist/file/define.js +6 -6
  99. package/dist/file/define.js.map +1 -1
  100. package/dist/file/file2.js +1 -1
  101. package/dist/format-bytes/define.js +3 -3
  102. package/dist/format-bytes/define.js.map +1 -1
  103. package/dist/format-bytes/format-bytes2.js +49 -54
  104. package/dist/format-bytes/format-bytes2.js.map +1 -1
  105. package/dist/format-datetime/define.js +3 -3
  106. package/dist/format-datetime/define.js.map +1 -1
  107. package/dist/format-datetime/format-datetime2.js +26 -27
  108. package/dist/format-datetime/format-datetime2.js.map +1 -1
  109. package/dist/format-number/define.js +3 -3
  110. package/dist/format-number/define.js.map +1 -1
  111. package/dist/format-number/format-number.d.ts +2 -2
  112. package/dist/format-number/format-number2.js +37 -38
  113. package/dist/format-number/format-number2.js.map +1 -1
  114. package/dist/format-relative-time/define.js +3 -3
  115. package/dist/format-relative-time/define.js.map +1 -1
  116. package/dist/format-relative-time/format-relative-time2.js +27 -28
  117. package/dist/format-relative-time/format-relative-time2.js.map +1 -1
  118. package/dist/format-truncate/define.js +3 -3
  119. package/dist/format-truncate/define.js.map +1 -1
  120. package/dist/format-truncate/format-truncate2.js +1 -1
  121. package/dist/forms/control/control2.js +1 -1
  122. package/dist/forms/control-group/control-group2.js +1 -1
  123. package/dist/forms/control-message/control-message2.js +1 -1
  124. package/dist/forms/define.js +5 -5
  125. package/dist/forms/define.js.map +1 -1
  126. package/dist/gauge/define.js +3 -3
  127. package/dist/gauge/define.js.map +1 -1
  128. package/dist/gauge/gauge2.js +1 -1
  129. package/dist/grid/cell/cell2.js +1 -1
  130. package/dist/grid/column/column2.js +1 -1
  131. package/dist/grid/define.js +9 -9
  132. package/dist/grid/define.js.map +1 -1
  133. package/dist/grid/footer/footer2.js +1 -1
  134. package/dist/grid/grid2.js +1 -1
  135. package/dist/grid/header/header2.js +19 -19
  136. package/dist/grid/header/header2.js.map +1 -1
  137. package/dist/grid/placeholder/placeholder2.js +1 -1
  138. package/dist/grid/row/row2.js +1 -1
  139. package/dist/icon/define.js +6 -6
  140. package/dist/icon/define.js.map +1 -1
  141. package/dist/icon/icon2.js +31 -31
  142. package/dist/icon-button/define.js +3 -3
  143. package/dist/icon-button/define.js.map +1 -1
  144. package/dist/icon-button/icon-button2.js +1 -1
  145. package/dist/iframe/define.js +3 -3
  146. package/dist/iframe/define.js.map +1 -1
  147. package/dist/iframe/iframe2.js +1 -1
  148. package/dist/index.js +1 -1
  149. package/dist/input/define.js +7 -7
  150. package/dist/input/define.js.map +1 -1
  151. package/dist/input/input-group2.js +1 -1
  152. package/dist/input/input2.js +1 -1
  153. package/dist/internal/controllers/audit.controller.d.ts +0 -2
  154. package/dist/internal/controllers/audit.controller.js +42 -52
  155. package/dist/internal/controllers/audit.controller.js.map +1 -1
  156. package/dist/internal/controllers/keynav-grid.controller.js +28 -28
  157. package/dist/internal/controllers/keynav-grid.controller.js.map +1 -1
  158. package/dist/internal/controllers/type-native-popover.utils.js +3 -3
  159. package/dist/internal/controllers/type-ssr.controller.js +4 -4
  160. package/dist/internal/controllers/type-ssr.controller.js.map +1 -1
  161. package/dist/internal/decorators/scoped-registry.js +3 -5
  162. package/dist/internal/decorators/scoped-registry.js.map +1 -1
  163. package/dist/internal/index.d.ts +0 -1
  164. package/dist/internal/index.js +36 -37
  165. package/dist/internal/services/i18n.service.d.ts +2 -1
  166. package/dist/internal/services/i18n.service.js +1 -1
  167. package/dist/internal/services/i18n.service.js.map +1 -1
  168. package/dist/internal/services/log.service.js +1 -1
  169. package/dist/internal/services/log.service.js.map +1 -1
  170. package/dist/internal/types/index.d.ts +0 -37
  171. package/dist/internal/types/index.js.map +1 -1
  172. package/dist/internal/utils/audit-logs.d.ts +1 -3
  173. package/dist/internal/utils/audit-logs.js +3 -9
  174. package/dist/internal/utils/audit-logs.js.map +1 -1
  175. package/dist/internal/utils/audit.d.ts +0 -8
  176. package/dist/internal/utils/audit.js +1 -5
  177. package/dist/internal/utils/audit.js.map +1 -1
  178. package/dist/internal/utils/dom.d.ts +0 -7
  179. package/dist/internal/utils/dom.js +55 -66
  180. package/dist/internal/utils/dom.js.map +1 -1
  181. package/dist/internal/utils/objects.d.ts +0 -2
  182. package/dist/internal/utils/objects.js +3 -22
  183. package/dist/internal/utils/objects.js.map +1 -1
  184. package/dist/logo/define.js +3 -3
  185. package/dist/logo/define.js.map +1 -1
  186. package/dist/logo/logo2.js +1 -1
  187. package/dist/menu/define.js +5 -5
  188. package/dist/menu/define.js.map +1 -1
  189. package/dist/menu/menu-group2.js +1 -1
  190. package/dist/menu/menu-item2.js +1 -1
  191. package/dist/menu/menu2.js +1 -1
  192. package/dist/month/define.js +6 -6
  193. package/dist/month/define.js.map +1 -1
  194. package/dist/month/month2.js +1 -1
  195. package/dist/notification/define.js +4 -4
  196. package/dist/notification/define.js.map +1 -1
  197. package/dist/notification/notification-group2.js +1 -1
  198. package/dist/notification/notification2.js +1 -1
  199. package/dist/page/define.js +8 -8
  200. package/dist/page/define.js.map +1 -1
  201. package/dist/page/page-panel/page-panel-content2.js +1 -1
  202. package/dist/page/page-panel/page-panel-footer2.js +1 -1
  203. package/dist/page/page-panel/page-panel-header2.js +1 -1
  204. package/dist/page/page-panel/page-panel2.js +19 -20
  205. package/dist/page/page-panel/page-panel2.js.map +1 -1
  206. package/dist/page/page2.js +2 -2
  207. package/dist/page/page2.js.map +1 -1
  208. package/dist/page-header/define.js +3 -3
  209. package/dist/page-header/define.js.map +1 -1
  210. package/dist/page-header/page-header2.js +1 -1
  211. package/dist/page-loader/define.js +3 -3
  212. package/dist/page-loader/define.js.map +1 -1
  213. package/dist/page-loader/page-loader2.js +1 -1
  214. package/dist/pagination/define.js +3 -3
  215. package/dist/pagination/define.js.map +1 -1
  216. package/dist/pagination/pagination2.js +17 -17
  217. package/dist/panel/define.js +3 -3
  218. package/dist/panel/define.js.map +1 -1
  219. package/dist/panel/panel2.js +4 -4
  220. package/dist/password/define.js +6 -6
  221. package/dist/password/define.js.map +1 -1
  222. package/dist/password/password2.js +1 -1
  223. package/dist/preferences-input/define.js +3 -3
  224. package/dist/preferences-input/define.js.map +1 -1
  225. package/dist/preferences-input/preferences-input2.js +1 -1
  226. package/dist/progress-bar/define.js +3 -3
  227. package/dist/progress-bar/define.js.map +1 -1
  228. package/dist/progress-bar/progress-bar2.js +1 -1
  229. package/dist/progress-dot/define.js +3 -3
  230. package/dist/progress-dot/define.js.map +1 -1
  231. package/dist/progress-dot/progress-dot2.js +1 -1
  232. package/dist/progress-ring/define.js +3 -3
  233. package/dist/progress-ring/define.js.map +1 -1
  234. package/dist/progress-ring/progress-ring2.js +1 -1
  235. package/dist/progressive-filter-chip/define.js +3 -3
  236. package/dist/progressive-filter-chip/define.js.map +1 -1
  237. package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
  238. package/dist/pulse/define.js +3 -3
  239. package/dist/pulse/define.js.map +1 -1
  240. package/dist/pulse/pulse2.js +1 -1
  241. package/dist/radio/define.js +7 -7
  242. package/dist/radio/define.js.map +1 -1
  243. package/dist/radio/radio-group2.js +1 -1
  244. package/dist/radio/radio2.js +1 -1
  245. package/dist/range/define.js +6 -6
  246. package/dist/range/define.js.map +1 -1
  247. package/dist/range/range2.js +1 -1
  248. package/dist/resize-handle/define.js +3 -3
  249. package/dist/resize-handle/define.js.map +1 -1
  250. package/dist/resize-handle/resize-handle2.js +1 -1
  251. package/dist/search/define.js +6 -6
  252. package/dist/search/define.js.map +1 -1
  253. package/dist/search/search2.js +1 -1
  254. package/dist/select/define.js +6 -6
  255. package/dist/select/define.js.map +1 -1
  256. package/dist/select/select2.js +1 -1
  257. package/dist/skeleton/define.js +3 -3
  258. package/dist/skeleton/define.js.map +1 -1
  259. package/dist/skeleton/skeleton2.js +1 -1
  260. package/dist/sort-button/define.js +3 -3
  261. package/dist/sort-button/define.js.map +1 -1
  262. package/dist/sort-button/sort-button2.js +1 -1
  263. package/dist/sparkline/define.js +3 -3
  264. package/dist/sparkline/define.js.map +1 -1
  265. package/dist/sparkline/sparkline2.js +1 -1
  266. package/dist/star-rating/define.js +6 -6
  267. package/dist/star-rating/define.js.map +1 -1
  268. package/dist/star-rating/star-rating2.js +1 -1
  269. package/dist/steps/define.js +3 -3
  270. package/dist/steps/define.js.map +1 -1
  271. package/dist/steps/steps2.js +2 -2
  272. package/dist/switch/define.js +7 -7
  273. package/dist/switch/define.js.map +1 -1
  274. package/dist/switch/switch-group2.js +1 -1
  275. package/dist/switch/switch2.js +1 -1
  276. package/dist/tabs/define.js +5 -5
  277. package/dist/tabs/define.js.map +1 -1
  278. package/dist/tabs/tabs-group2.js +1 -1
  279. package/dist/tabs/tabs-item-group2.js +1 -1
  280. package/dist/tabs/tabs2.js +2 -2
  281. package/dist/tag/define.js +3 -3
  282. package/dist/tag/define.js.map +1 -1
  283. package/dist/tag/tag2.js +1 -1
  284. package/dist/textarea/define.js +6 -6
  285. package/dist/textarea/define.js.map +1 -1
  286. package/dist/textarea/textarea2.js +1 -1
  287. package/dist/time/define.js +6 -6
  288. package/dist/time/define.js.map +1 -1
  289. package/dist/time/time2.js +1 -1
  290. package/dist/toast/define.js +3 -3
  291. package/dist/toast/define.js.map +1 -1
  292. package/dist/toast/toast2.js +1 -1
  293. package/dist/toggletip/define.js +5 -5
  294. package/dist/toggletip/define.js.map +1 -1
  295. package/dist/toggletip/toggletip-footer2.js +8 -11
  296. package/dist/toggletip/toggletip-footer2.js.map +1 -1
  297. package/dist/toggletip/toggletip-header2.js +8 -11
  298. package/dist/toggletip/toggletip-header2.js.map +1 -1
  299. package/dist/toggletip/toggletip2.js +1 -1
  300. package/dist/toolbar/define.js +3 -3
  301. package/dist/toolbar/define.js.map +1 -1
  302. package/dist/toolbar/toolbar2.js +1 -1
  303. package/dist/tooltip/define.js +3 -3
  304. package/dist/tooltip/define.js.map +1 -1
  305. package/dist/tooltip/tooltip2.js +1 -1
  306. package/dist/tree/define.js +4 -4
  307. package/dist/tree/define.js.map +1 -1
  308. package/dist/tree/tree-node2.js +1 -1
  309. package/dist/tree/tree.examples.js.map +1 -1
  310. package/dist/tree/tree2.js +1 -1
  311. package/dist/week/define.js +6 -6
  312. package/dist/week/define.js.map +1 -1
  313. package/dist/week/week2.js +1 -1
  314. package/package.json +9 -2
  315. package/dist/internal/services/global.service.d.ts +0 -27
  316. package/dist/internal/services/global.service.js +0 -34
  317. package/dist/internal/services/global.service.js.map +0 -1
  318. package/dist/internal/services/global.utils.d.ts +0 -12
  319. package/dist/internal/services/global.utils.js +0 -15
  320. package/dist/internal/services/global.utils.js.map +0 -1
@@ -1,7 +1,7 @@
1
- import { define as e } from "../internal/utils/dom.js";
2
- import { DropdownGroup as t } from "./dropdown-group.js";
1
+ import { DropdownGroup as e } from "./dropdown-group.js";
2
+ import { define as t } from "@nvidia-elements/foundations/internal/define";
3
3
  //#region src/dropdown-group/define.ts
4
- e(t);
4
+ t(e);
5
5
  //#endregion
6
6
 
7
7
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":[],"sources":["../../src/dropdown-group/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { DropdownGroup } from '@nvidia-elements/core/dropdown-group';\n\ndefine(DropdownGroup);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-dropdown-group': DropdownGroup;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAa"}
1
+ {"version":3,"file":"define.js","names":[],"sources":["../../src/dropdown-group/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/foundations/internal/define';\nimport { DropdownGroup } from '@nvidia-elements/core/dropdown-group';\n\ndefine(DropdownGroup);\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-dropdown-group': DropdownGroup;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAa"}
@@ -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.1",
17
+ version: "2.18.3",
18
18
  children: ["nve-dropdown"]
19
19
  };
20
20
  }
@@ -1,7 +1,7 @@
1
- import { define as e } from "../internal/utils/dom.js";
2
- import { Dropzone as t } from "./dropzone2.js";
1
+ import { Dropzone as e } from "./dropzone2.js";
2
+ import { define as t } from "@nvidia-elements/foundations/internal/define";
3
3
  //#region src/dropzone/define.ts
4
- e(t);
4
+ t(e);
5
5
  //#endregion
6
6
 
7
7
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":[],"sources":["../../src/dropzone/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { Dropzone } from '@nvidia-elements/core/dropzone';\n\ndefine(Dropzone);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-dropzone': Dropzone;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAQ"}
1
+ {"version":3,"file":"define.js","names":[],"sources":["../../src/dropzone/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/foundations/internal/define';\nimport { Dropzone } from '@nvidia-elements/core/dropzone';\n\ndefine(Dropzone);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-dropzone': Dropzone;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAQ"}
@@ -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.1",
23
+ version: "2.18.3",
24
24
  validators: [l, c],
25
25
  valueSchema: {
26
26
  type: "array",
@@ -1,9 +1,9 @@
1
- import { define as e } from "../internal/utils/dom.js";
2
- import { ControlMessage as t } from "../forms/control-message/control-message2.js";
3
- import { Control as n } from "../forms/control/control2.js";
4
- import { ControlGroup as r } from "../forms/control-group/control-group2.js";
5
- import { File as i } from "./file2.js";
6
- e(i), e(n), e(r), e(t);
1
+ import { ControlMessage as e } from "../forms/control-message/control-message2.js";
2
+ import { Control as t } from "../forms/control/control2.js";
3
+ import { ControlGroup as n } from "../forms/control-group/control-group2.js";
4
+ import { File as r } from "./file2.js";
5
+ import { define as i } from "@nvidia-elements/foundations/internal/define";
6
+ i(r), i(t), i(n), i(e);
7
7
  //#endregion
8
8
 
9
9
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":[],"sources":["../../src/file/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { File } from '@nvidia-elements/core/file';\nimport { Control, ControlGroup, ControlMessage } from '@nvidia-elements/core/forms';\n\ndefine(File);\ndefine(Control);\ndefine(ControlGroup);\ndefine(ControlMessage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-file': File;\n }\n}\n"],"mappings":";;;;;AAOA,EAAO,CAAI,GACX,EAAO,CAAO,GACd,EAAO,CAAY,GACnB,EAAO,CAAc"}
1
+ {"version":3,"file":"define.js","names":[],"sources":["../../src/file/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/foundations/internal/define';\nimport { File } from '@nvidia-elements/core/file';\nimport { Control, ControlGroup, ControlMessage } from '@nvidia-elements/core/forms';\n\ndefine(File);\ndefine(Control);\ndefine(ControlGroup);\ndefine(ControlMessage);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-file': File;\n }\n}\n"],"mappings":";;;;;AAOA,EAAO,CAAI,GACX,EAAO,CAAO,GACd,EAAO,CAAY,GACnB,EAAO,CAAc"}
@@ -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.1"
14
+ version: "2.18.3"
15
15
  };
16
16
  }
17
17
  connectedCallback() {
@@ -1,7 +1,7 @@
1
- import { define as e } from "../internal/utils/dom.js";
2
- import { FormatBytes as t } from "./format-bytes2.js";
1
+ import { FormatBytes as e } from "./format-bytes2.js";
2
+ import { define as t } from "@nvidia-elements/foundations/internal/define";
3
3
  //#region src/format-bytes/define.ts
4
- e(t);
4
+ t(e);
5
5
  //#endregion
6
6
 
7
7
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":[],"sources":["../../src/format-bytes/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { FormatBytes } from '@nvidia-elements/core/format-bytes';\n\ndefine(FormatBytes);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-format-bytes': FormatBytes;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAW"}
1
+ {"version":3,"file":"define.js","names":[],"sources":["../../src/format-bytes/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/foundations/internal/define';\nimport { FormatBytes } from '@nvidia-elements/core/format-bytes';\n\ndefine(FormatBytes);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-format-bytes': FormatBytes;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAW"}
@@ -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.1"
97
+ version: "2.18.3"
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,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,GA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K,iBAAiB,GAAS,GACnC;EACT;CACF;CAEA,SAAS;EACP,OAAO,CAAI,8BAA6B,KAAK,GAAU,IAAG,KAAK,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
+ {"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 { 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></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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
- import { define as e } from "../internal/utils/dom.js";
2
- import { FormatDatetime as t } from "./format-datetime2.js";
1
+ import { FormatDatetime as e } from "./format-datetime2.js";
2
+ import { define as t } from "@nvidia-elements/foundations/internal/define";
3
3
  //#region src/format-datetime/define.ts
4
- e(t);
4
+ t(e);
5
5
  //#endregion
6
6
 
7
7
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":[],"sources":["../../src/format-datetime/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { FormatDatetime } from '@nvidia-elements/core/format-datetime';\n\ndefine(FormatDatetime);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-format-datetime': FormatDatetime;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAc"}
1
+ {"version":3,"file":"define.js","names":[],"sources":["../../src/format-datetime/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/foundations/internal/define';\nimport { FormatDatetime } from '@nvidia-elements/core/format-datetime';\n\ndefine(FormatDatetime);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-format-datetime': FormatDatetime;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAc"}
@@ -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-datetime.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-datetime.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-datetime/format-datetime.ts
9
- var c = class extends a {
8
+ var s = class extends i {
10
9
  static {
11
- this.styles = n([i]);
10
+ this.styles = t([r]);
12
11
  }
13
12
  static {
14
13
  this.metadata = {
15
14
  tag: "nve-format-datetime",
16
- version: "2.18.1"
15
+ version: "2.18.3"
17
16
  };
18
17
  }
19
18
  get #e() {
@@ -23,14 +22,14 @@ var c = class extends a {
23
22
  return this.locale ?? (globalThis.document?.documentElement?.lang || void 0);
24
23
  }
25
24
  get #n() {
26
- let t = this.#e;
27
- if (!t) return "";
28
- let n = this.#s(t);
29
- if (!n) return t;
25
+ let e = this.#e;
26
+ if (!e) return "";
27
+ let t = this.#s(e);
28
+ if (!t) return e;
30
29
  try {
31
- return new Intl.DateTimeFormat(this.#t, this.#r).format(n);
32
- } catch (n) {
33
- return e.warn(`format-datetime: ${n.message}`), t;
30
+ return new Intl.DateTimeFormat(this.#t, this.#r).format(t);
31
+ } catch {
32
+ return e;
34
33
  }
35
34
  }
36
35
  get #r() {
@@ -47,31 +46,31 @@ var c = class extends a {
47
46
  let e = {};
48
47
  return this.weekday && (e.weekday = this.weekday), this.year && (e.year = this.year), this.month && (e.month = this.month), this.day && (e.day = this.day), this.hour && (e.hour = this.hour), this.minute && (e.minute = this.minute), this.second && (e.second = this.second), this.timeZoneName && (e.timeZoneName = this.timeZoneName), this.timeZone && (e.timeZone = this.timeZone), e;
49
48
  }
50
- #s(t) {
51
- let n = new Date(t);
52
- return isNaN(n.getTime()) ? (e.warn(`format-datetime: invalid date value "${t}"`), null) : n;
49
+ #s(e) {
50
+ let t = new Date(e);
51
+ return isNaN(t.getTime()) ? null : t;
53
52
  }
54
53
  render() {
55
- return o`<time internal-host datetime="${this.#e}">${this.#n}<slot @slotchange="${this.#c}" hidden></slot></time>`;
54
+ return a`<time internal-host datetime="${this.#e}">${this.#n}<slot @slotchange="${this.#c}" hidden></slot></time>`;
56
55
  }
57
56
  #c() {
58
57
  this.requestUpdate();
59
58
  }
60
59
  };
61
- r([s({ type: String })], c.prototype, "date", void 0), r([s({ type: String })], c.prototype, "locale", void 0), r([s({ type: String })], c.prototype, "weekday", void 0), r([s({ type: String })], c.prototype, "year", void 0), r([s({ type: String })], c.prototype, "month", void 0), r([s({ type: String })], c.prototype, "day", void 0), r([s({ type: String })], c.prototype, "hour", void 0), r([s({ type: String })], c.prototype, "minute", void 0), r([s({ type: String })], c.prototype, "second", void 0), r([s({
60
+ n([o({ type: String })], s.prototype, "date", void 0), n([o({ type: String })], s.prototype, "locale", void 0), n([o({ type: String })], s.prototype, "weekday", void 0), n([o({ type: String })], s.prototype, "year", void 0), n([o({ type: String })], s.prototype, "month", void 0), n([o({ type: String })], s.prototype, "day", void 0), n([o({ type: String })], s.prototype, "hour", void 0), n([o({ type: String })], s.prototype, "minute", void 0), n([o({ type: String })], s.prototype, "second", void 0), n([o({
62
61
  type: String,
63
62
  attribute: "date-style"
64
- })], c.prototype, "dateStyle", void 0), r([s({
63
+ })], s.prototype, "dateStyle", void 0), n([o({
65
64
  type: String,
66
65
  attribute: "time-style"
67
- })], c.prototype, "timeStyle", void 0), r([s({
66
+ })], s.prototype, "timeStyle", void 0), n([o({
68
67
  type: String,
69
68
  attribute: "time-zone-name"
70
- })], c.prototype, "timeZoneName", void 0), r([s({
69
+ })], s.prototype, "timeZoneName", void 0), n([o({
71
70
  type: String,
72
71
  attribute: "time-zone"
73
- })], c.prototype, "timeZone", void 0), c = r([t()], c);
72
+ })], s.prototype, "timeZone", void 0), s = n([e()], s);
74
73
  //#endregion
75
- export { c as FormatDatetime };
74
+ export { s as FormatDatetime };
76
75
 
77
76
  //# sourceMappingURL=format-datetime2.js.map
@@ -1 +1 @@
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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,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
+ {"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 } 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 {\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 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,eA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ber as e } from "./format-number2.js";
2
+ import { define as t } from "@nvidia-elements/foundations/internal/define";
3
3
  //#region src/format-number/define.ts
4
- e(t);
4
+ t(e);
5
5
  //#endregion
6
6
 
7
7
  //# sourceMappingURL=define.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"define.js","names":[],"sources":["../../src/format-number/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/core/internal';\nimport { FormatNumber } from '@nvidia-elements/core/format-number';\n\ndefine(FormatNumber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-format-number': FormatNumber;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAY"}
1
+ {"version":3,"file":"define.js","names":[],"sources":["../../src/format-number/define.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { define } from '@nvidia-elements/foundations/internal/define';\nimport { FormatNumber } from '@nvidia-elements/core/format-number';\n\ndefine(FormatNumber);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nve-format-number': FormatNumber;\n }\n}\n"],"mappings":";;;AAMA,EAAO,CAAY"}
@@ -74,11 +74,11 @@ export declare class FormatNumber extends LitElement {
74
74
  */
75
75
  useGrouping?: 'auto' | 'always' | 'min2' | 'true' | 'false' | boolean;
76
76
  /**
77
- * Pad fraction output to at least this many digits (0-20).
77
+ * Pad fraction output to at least this many digits (0-100).
78
78
  */
79
79
  minimumFractionDigits?: number;
80
80
  /**
81
- * Round fraction output to at most this many digits (0-20).
81
+ * Round fraction output to at most this many digits (0-100).
82
82
  */
83
83
  maximumFractionDigits?: number;
84
84
  /**