@nvidia-elements/core 0.0.12 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/CHANGELOG.md +19 -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/bundle.d.ts +1 -0
  10. package/dist/bundles/index.d.ts +86 -0
  11. package/dist/bundles/index.js +3 -3
  12. package/dist/button/button2.js +1 -1
  13. package/dist/button-group/button-group2.js +1 -1
  14. package/dist/card/card2.js +4 -4
  15. package/dist/chat-message/chat-message2.js +1 -1
  16. package/dist/checkbox/checkbox-group2.js +1 -1
  17. package/dist/checkbox/checkbox2.js +1 -1
  18. package/dist/color/color2.js +1 -1
  19. package/dist/combobox/combobox2.js +1 -1
  20. package/dist/copy-button/copy-button2.js +1 -1
  21. package/dist/custom-elements-jsx.d.ts +50 -0
  22. package/dist/custom-elements-vue.d.ts +50 -0
  23. package/dist/custom-elements.json +788 -2
  24. package/dist/data.html.json +119 -1
  25. package/dist/data.snippets.json +2 -2
  26. package/dist/date/date2.js +1 -1
  27. package/dist/datetime/datetime2.js +1 -1
  28. package/dist/dialog/dialog-footer2.js +1 -1
  29. package/dist/dialog/dialog-header2.js +1 -1
  30. package/dist/dialog/dialog2.js +1 -1
  31. package/dist/divider/divider2.js +1 -1
  32. package/dist/dot/dot2.js +1 -1
  33. package/dist/drawer/drawer-content2.js +1 -1
  34. package/dist/drawer/drawer-footer2.js +1 -1
  35. package/dist/drawer/drawer-header2.js +1 -1
  36. package/dist/drawer/drawer2.js +1 -1
  37. package/dist/dropdown/dropdown-footer2.js +1 -1
  38. package/dist/dropdown/dropdown-header2.js +1 -1
  39. package/dist/dropdown/dropdown2.js +1 -1
  40. package/dist/dropdown-group/dropdown-group.js +1 -1
  41. package/dist/dropzone/dropzone2.js +1 -1
  42. package/dist/file/file2.js +1 -1
  43. package/dist/format-datetime/format-datetime2.js +1 -1
  44. package/dist/format-number/define.d.ts +6 -0
  45. package/dist/format-number/define.js +7 -0
  46. package/dist/format-number/define.js.map +1 -0
  47. package/dist/format-number/format-number.d.ts +87 -0
  48. package/dist/format-number/format-number.examples.js +6 -0
  49. package/dist/format-number/format-number.examples.js.map +1 -0
  50. package/dist/format-number/format-number.examples.json +87 -0
  51. package/dist/format-number/format-number.js +6 -0
  52. package/dist/format-number/format-number.js.map +1 -0
  53. package/dist/format-number/format-number2.js +111 -0
  54. package/dist/format-number/format-number2.js.map +1 -0
  55. package/dist/format-number/index.d.ts +1 -0
  56. package/dist/format-number/index.js +2 -0
  57. package/dist/format-relative-time/format-relative-time2.js +1 -1
  58. package/dist/forms/control/control2.js +1 -1
  59. package/dist/forms/control-group/control-group2.js +1 -1
  60. package/dist/forms/control-message/control-message2.js +1 -1
  61. package/dist/grid/cell/cell2.js +1 -1
  62. package/dist/grid/column/column2.js +1 -1
  63. package/dist/grid/footer/footer2.js +1 -1
  64. package/dist/grid/grid2.js +1 -1
  65. package/dist/grid/header/header2.js +1 -1
  66. package/dist/grid/placeholder/placeholder2.js +1 -1
  67. package/dist/grid/row/row2.js +1 -1
  68. package/dist/icon/icon2.js +2 -2
  69. package/dist/icon-button/icon-button2.js +1 -1
  70. package/dist/index.js +1 -1
  71. package/dist/input/input-group2.js +1 -1
  72. package/dist/input/input2.js +1 -1
  73. package/dist/internal/services/global.service.js +1 -1
  74. package/dist/logo/logo.examples.js.map +1 -1
  75. package/dist/logo/logo.examples.json +4 -4
  76. package/dist/logo/logo2.js +1 -1
  77. package/dist/menu/menu-item2.js +1 -1
  78. package/dist/menu/menu.examples.js.map +1 -1
  79. package/dist/menu/menu.examples.json +3 -3
  80. package/dist/menu/menu2.js +1 -1
  81. package/dist/month/month2.js +1 -1
  82. package/dist/notification/notification-group2.js +1 -1
  83. package/dist/notification/notification2.js +1 -1
  84. package/dist/page/page-panel/page-panel-content2.js +1 -1
  85. package/dist/page/page-panel/page-panel-footer2.js +1 -1
  86. package/dist/page/page-panel/page-panel-header2.js +1 -1
  87. package/dist/page/page-panel/page-panel2.js +1 -1
  88. package/dist/page/page2.js +1 -1
  89. package/dist/page-header/page-header2.js +1 -1
  90. package/dist/page-loader/page-loader2.js +1 -1
  91. package/dist/pagination/pagination2.js +1 -1
  92. package/dist/panel/panel2.js +4 -4
  93. package/dist/password/password2.js +1 -1
  94. package/dist/preferences-input/preferences-input.examples.js.map +1 -1
  95. package/dist/preferences-input/preferences-input.examples.json +1 -1
  96. package/dist/preferences-input/preferences-input2.js +1 -1
  97. package/dist/progress-bar/progress-bar2.js +1 -1
  98. package/dist/progress-ring/progress-ring2.js +1 -1
  99. package/dist/progressive-filter-chip/progressive-filter-chip2.js +1 -1
  100. package/dist/pulse/pulse2.js +1 -1
  101. package/dist/radio/radio-group2.js +1 -1
  102. package/dist/radio/radio2.js +1 -1
  103. package/dist/range/range2.js +1 -1
  104. package/dist/resize-handle/resize-handle2.js +1 -1
  105. package/dist/search/search2.js +1 -1
  106. package/dist/select/select2.js +1 -1
  107. package/dist/skeleton/skeleton2.js +1 -1
  108. package/dist/sort-button/sort-button2.js +1 -1
  109. package/dist/sparkline/sparkline2.js +1 -1
  110. package/dist/star-rating/star-rating2.js +1 -1
  111. package/dist/steps/steps2.js +2 -2
  112. package/dist/switch/switch-group2.js +1 -1
  113. package/dist/switch/switch2.js +1 -1
  114. package/dist/tabs/tabs-group2.js +1 -1
  115. package/dist/tabs/tabs2.js +2 -2
  116. package/dist/tag/tag2.js +1 -1
  117. package/dist/textarea/textarea2.js +1 -1
  118. package/dist/time/time2.js +1 -1
  119. package/dist/toast/toast2.js +1 -1
  120. package/dist/toggletip/toggletip-footer2.js +1 -1
  121. package/dist/toggletip/toggletip-header2.js +1 -1
  122. package/dist/toggletip/toggletip2.js +1 -1
  123. package/dist/toolbar/toolbar2.js +1 -1
  124. package/dist/tooltip/tooltip2.js +1 -1
  125. package/dist/tree/tree-node2.js +1 -1
  126. package/dist/tree/tree2.js +1 -1
  127. package/dist/week/week2.js +1 -1
  128. package/package.json +15 -3
@@ -1775,6 +1775,124 @@
1775
1775
  ],
1776
1776
  "references": []
1777
1777
  },
1778
+ {
1779
+ "name": "nve-format-number",
1780
+ "description": "A localized number formatter for currencies, percentages, units, and compact notation, backed by Intl.NumberFormat.\nProvide a `currency` attribute when `formatStyle` is `currency`, and a `unit` attribute when `formatStyle` is `unit`.\n---\n\n\n### **Slots:**\n - _default_ - Numeric string to format (such as 1234567 or 1234.56). Serves as fallback before hydration.",
1781
+ "attributes": [
1782
+ {
1783
+ "name": "number",
1784
+ "description": "Optional numeric string for values supplied by JavaScript or bound data.\nBy default, the component formats the element's text content, which also serves as the SSR fallback.\nWhen both are present, this property takes precedence.",
1785
+ "values": [{ "name": "default" }]
1786
+ },
1787
+ {
1788
+ "name": "locale",
1789
+ "description": "Language tag (such as en-US, de-DE). Defaults to document.documentElement.lang or browser default.",
1790
+ "values": [{ "name": "default" }]
1791
+ },
1792
+ {
1793
+ "name": "format-style",
1794
+ "description": "Formatting style: 'decimal' | 'currency' | 'percent' | 'unit'.",
1795
+ "values": [
1796
+ { "name": "decimal" },
1797
+ { "name": "currency" },
1798
+ { "name": "percent" },
1799
+ { "name": "unit" }
1800
+ ]
1801
+ },
1802
+ {
1803
+ "name": "currency",
1804
+ "description": "ISO 4217 currency code (such as USD or EUR). Required when formatStyle is currency.",
1805
+ "values": [{ "name": "default" }]
1806
+ },
1807
+ {
1808
+ "name": "currency-sign",
1809
+ "description": "Currency sign style: 'standard' | 'accounting'.",
1810
+ "values": [
1811
+ { "name": "standard" },
1812
+ { "name": "accounting" },
1813
+ { "name": "default" }
1814
+ ]
1815
+ },
1816
+ {
1817
+ "name": "currency-display",
1818
+ "description": "Currency display style: 'symbol' | 'code' | 'name' | 'narrowSymbol'.",
1819
+ "values": [
1820
+ { "name": "symbol" },
1821
+ { "name": "code" },
1822
+ { "name": "name" },
1823
+ { "name": "narrowSymbol" },
1824
+ { "name": "default" }
1825
+ ]
1826
+ },
1827
+ {
1828
+ "name": "unit",
1829
+ "description": "Unit identifier (such as kilometer or byte). Required when formatStyle is unit.",
1830
+ "values": [{ "name": "default" }]
1831
+ },
1832
+ {
1833
+ "name": "unit-display",
1834
+ "description": "Unit display style: 'short' | 'long' | 'narrow'.",
1835
+ "values": [
1836
+ { "name": "short" },
1837
+ { "name": "long" },
1838
+ { "name": "narrow" },
1839
+ { "name": "default" }
1840
+ ]
1841
+ },
1842
+ {
1843
+ "name": "notation",
1844
+ "description": "Number notation: 'standard' | 'scientific' | 'engineering' | 'compact'.",
1845
+ "values": [
1846
+ { "name": "standard" },
1847
+ { "name": "scientific" },
1848
+ { "name": "engineering" },
1849
+ { "name": "compact" },
1850
+ { "name": "default" }
1851
+ ]
1852
+ },
1853
+ {
1854
+ "name": "compact-display",
1855
+ "description": "Compact notation display: 'short' | 'long'. Only applies when notation is compact.",
1856
+ "values": [
1857
+ { "name": "short" },
1858
+ { "name": "long" },
1859
+ { "name": "default" }
1860
+ ]
1861
+ },
1862
+ {
1863
+ "name": "sign-display",
1864
+ "description": "Sign display: 'auto' | 'never' | 'always' | 'exceptZero'.",
1865
+ "values": [
1866
+ { "name": "auto" },
1867
+ { "name": "never" },
1868
+ { "name": "always" },
1869
+ { "name": "exceptZero" },
1870
+ { "name": "default" }
1871
+ ]
1872
+ },
1873
+ {
1874
+ "name": "use-grouping",
1875
+ "description": "Grouping separators: 'auto' | 'always' | 'min2' | 'true' | 'false'.",
1876
+ "values": [{ "name": "default" }]
1877
+ },
1878
+ {
1879
+ "name": "minimum-fraction-digits",
1880
+ "description": "Pad fraction output to at least this many digits (0-20).",
1881
+ "values": [{ "name": "default" }]
1882
+ },
1883
+ {
1884
+ "name": "maximum-fraction-digits",
1885
+ "description": "Round fraction output to at most this many digits (0-20).",
1886
+ "values": [{ "name": "default" }]
1887
+ },
1888
+ {
1889
+ "name": "minimum-integer-digits",
1890
+ "description": "Pad integer output to at least this many digits (1-21).",
1891
+ "values": [{ "name": "default" }]
1892
+ }
1893
+ ],
1894
+ "references": []
1895
+ },
1778
1896
  {
1779
1897
  "name": "nve-format-relative-time",
1780
1898
  "description": "Formats a date/time value as localized relative text using the Intl.RelativeTimeFormat API. Renders inside a semantic time element.\nOptions mirror the Intl.RelativeTimeFormat API. When unit is 'auto', the component selects the best unit based on the time difference.\n---\n\n\n### **Slots:**\n - _default_ - Date string to format (such as 2023-07-28T04:20:17.434Z). Serves as fallback before hydration.",
@@ -3023,7 +3141,7 @@
3023
3141
  },
3024
3142
  {
3025
3143
  "name": "markdown",
3026
- "url": "## nve-logo\n\nA visual indicator for a brand or application.\n\n### Example\n\n```html\n<nve-logo aria-label=\"NVIDIA\"></nve-logo>\n```\n\n### Import\n\n```javascript\nimport '@nvidia-elements/core/logo/define.js';\n```\n\n### Slots\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| (default) | `string` | default slot for content |\n\n### Properties / Attributes\n\n| property (attribute) | value | description |\n| -------------------- | ----- | ----------- |\n| color | `'red-cardinal' \\| 'gray-slate' \\| 'gray-denim' \\| 'blue-indigo' \\| 'blue-cobalt' \\| 'blue-sky' \\| 'teal-cyan' \\| 'green-mint' \\| 'teal-seafoam' \\| 'green-grass' \\| 'yellow-amber' \\| 'orange-pumpkin' \\| 'red-tomato' \\| 'pink-magenta' \\| 'purple-plum' \\| 'purple-violet' \\| 'purple-lavender' \\| 'pink-rose' \\| 'green-jade' \\| 'lime-pear' \\| 'yellow-nova' \\| 'brand-green'` | Defines a base color from the theme color palette |\n| size | `'sm' \\| 'md' \\| 'lg' \\| \"default\"` | Controls the visual scale of an element to match its importance and available space. - `sm` Compact size for dense layouts or secondary elements with less visual prominence. - `md` Standard size that works well in most contexts and provides balanced visibility. - `lg` Larger size for emphasizing important elements or improving touch targets in spacious layouts. |\n\n### CSS Properties\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| --background | `string` | [MDN](https://mdn.dev/CSS/background) |\n| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |\n| --color | `string` | [MDN](https://mdn.dev/CSS/color) |\n| --height | `string` | [MDN](https://mdn.dev/CSS/height) |\n| --width | `string` | [MDN](https://mdn.dev/CSS/width) |\n| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |\n| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |\n| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |"
3144
+ "url": "## nve-logo\n\nA visual indicator for a brand or application.\n\n### Example\n\n```html\n<nve-logo aria-label=\"NVIDIA\">NV</nve-logo>\n```\n\n### Import\n\n```javascript\nimport '@nvidia-elements/core/logo/define.js';\n```\n\n### Slots\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| (default) | `string` | default slot for content |\n\n### Properties / Attributes\n\n| property (attribute) | value | description |\n| -------------------- | ----- | ----------- |\n| color | `'red-cardinal' \\| 'gray-slate' \\| 'gray-denim' \\| 'blue-indigo' \\| 'blue-cobalt' \\| 'blue-sky' \\| 'teal-cyan' \\| 'green-mint' \\| 'teal-seafoam' \\| 'green-grass' \\| 'yellow-amber' \\| 'orange-pumpkin' \\| 'red-tomato' \\| 'pink-magenta' \\| 'purple-plum' \\| 'purple-violet' \\| 'purple-lavender' \\| 'pink-rose' \\| 'green-jade' \\| 'lime-pear' \\| 'yellow-nova' \\| 'brand-green'` | Defines a base color from the theme color palette |\n| size | `'sm' \\| 'md' \\| 'lg' \\| \"default\"` | Controls the visual scale of an element to match its importance and available space. - `sm` Compact size for dense layouts or secondary elements with less visual prominence. - `md` Standard size that works well in most contexts and provides balanced visibility. - `lg` Larger size for emphasizing important elements or improving touch targets in spacious layouts. |\n\n### CSS Properties\n\n| name | value | description |\n| ---- | ----- | ----------- |\n| --background | `string` | [MDN](https://mdn.dev/CSS/background) |\n| --gap | `string` | [MDN](https://mdn.dev/CSS/gap) |\n| --color | `string` | [MDN](https://mdn.dev/CSS/color) |\n| --height | `string` | [MDN](https://mdn.dev/CSS/height) |\n| --width | `string` | [MDN](https://mdn.dev/CSS/width) |\n| --font-size | `string` | [MDN](https://mdn.dev/CSS/font-size) |\n| --border-radius | `string` | [MDN](https://mdn.dev/CSS/border-radius) |\n| --font-weight | `string` | [MDN](https://mdn.dev/CSS/font-weight) |"
3027
3145
  }
3028
3146
  ]
3029
3147
  },
@@ -78,7 +78,7 @@
78
78
  ],
79
79
  "type": "pattern",
80
80
  "description": "Basic page-header layout.",
81
- "body": "<nve-page-header slot=\"header\">\n <nve-logo slot=\"prefix\" size=\"sm\"></nve-logo>\n <h2 slot=\"prefix\">${1:NVIDIA}</h2>\n</nve-page-header>\n"
81
+ "body": "<nve-page-header slot=\"header\">\n <nve-logo slot=\"prefix\" size=\"sm\">NV</nve-logo>\n <h2 slot=\"prefix\">${1:NVIDIA}</h2>\n</nve-page-header>\n"
82
82
  },
83
83
  "Page Header with Links": {
84
84
  "srcFile": "page-header.snippets.html",
@@ -87,7 +87,7 @@
87
87
  ],
88
88
  "type": "pattern",
89
89
  "description": "Basic page-header layout with links.",
90
- "body": "<nve-page-header slot=\"header\">\n <nve-logo slot=\"prefix\" size=\"sm\"></nve-logo>\n <h2 slot=\"prefix\">${1:NVIDIA}</h2>\n <nve-button selected container=\"flat\"><a href=\"#\">${2:Link 1}</a></nve-button>\n <nve-button container=\"flat\"><a href=\"#\">${3:Link 2}</a></nve-button>\n</nve-page-header>\n"
90
+ "body": "<nve-page-header slot=\"header\">\n <nve-logo slot=\"prefix\" size=\"sm\">NV</nve-logo>\n <h2 slot=\"prefix\">${1:NVIDIA}</h2>\n <nve-button selected container=\"flat\"><a href=\"#\">${2:Link 1}</a></nve-button>\n <nve-button container=\"flat\"><a href=\"#\">${3:Link 2}</a></nve-button>\n</nve-page-header>\n"
91
91
  },
92
92
  "Page": {
93
93
  "srcFile": "page.snippets.html",
@@ -19,7 +19,7 @@ var l = class extends r {
19
19
  static {
20
20
  this.metadata = {
21
21
  tag: "nve-date",
22
- version: "0.0.12"
22
+ version: "0.1.0"
23
23
  };
24
24
  }
25
25
  static {
@@ -19,7 +19,7 @@ var l = class extends r {
19
19
  static {
20
20
  this.metadata = {
21
21
  tag: "nve-datetime",
22
- version: "0.0.12"
22
+ version: "0.1.0"
23
23
  };
24
24
  }
25
25
  static {
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-dialog-footer",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-dialog"]
16
16
  };
17
17
  }
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-dialog-header",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-dialog"]
16
16
  };
17
17
  }
@@ -30,7 +30,7 @@ var h = class extends f {
30
30
  static {
31
31
  this.metadata = {
32
32
  tag: "nve-dialog",
33
- version: "0.0.12"
33
+ version: "0.1.0"
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: "0.0.12"
18
+ version: "0.1.0"
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: "0.0.12"
19
+ version: "0.1.0"
20
20
  };
21
21
  }
22
22
  render() {
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-drawer-content",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-drawer"]
16
16
  };
17
17
  }
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-drawer-footer",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-drawer"]
16
16
  };
17
17
  }
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-drawer-header",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-drawer"]
16
16
  };
17
17
  }
@@ -28,7 +28,7 @@ var p = class extends u {
28
28
  static {
29
29
  this.metadata = {
30
30
  tag: "nve-drawer",
31
- version: "0.0.12"
31
+ version: "0.1.0"
32
32
  };
33
33
  }
34
34
  static {
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-dropdown-footer",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-dropdown"]
16
16
  };
17
17
  }
@@ -11,7 +11,7 @@ var o = class extends i {
11
11
  static {
12
12
  this.metadata = {
13
13
  tag: "nve-dropdown-header",
14
- version: "0.0.12",
14
+ version: "0.1.0",
15
15
  parents: ["nve-dropdown"]
16
16
  };
17
17
  }
@@ -21,7 +21,7 @@ var p = class extends l {
21
21
  static {
22
22
  this.metadata = {
23
23
  tag: "nve-dropdown",
24
- version: "0.0.12"
24
+ version: "0.1.0"
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: "0.0.12",
17
+ version: "0.1.0",
18
18
  children: ["nve-dropdown"]
19
19
  };
20
20
  }
@@ -20,7 +20,7 @@ var g = class extends h(d) {
20
20
  static {
21
21
  this.metadata = {
22
22
  tag: "nve-dropzone",
23
- version: "0.0.12",
23
+ version: "0.1.0",
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: "0.0.12"
14
+ version: "0.1.0"
15
15
  };
16
16
  }
17
17
  connectedCallback() {
@@ -13,7 +13,7 @@ var c = class extends a {
13
13
  static {
14
14
  this.metadata = {
15
15
  tag: "nve-format-datetime",
16
- version: "0.0.12"
16
+ version: "0.1.0"
17
17
  };
18
18
  }
19
19
  get #e() {
@@ -0,0 +1,6 @@
1
+ import { FormatNumber } from '.';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'nve-format-number': FormatNumber;
5
+ }
6
+ }
@@ -0,0 +1,7 @@
1
+ import { define as e } from "../internal/utils/dom.js";
2
+ import { FormatNumber as t } from "./format-number2.js";
3
+ //#region src/format-number/define.ts
4
+ e(t);
5
+ //#endregion
6
+
7
+ //# sourceMappingURL=define.js.map
@@ -0,0 +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,EAAa"}
@@ -0,0 +1,87 @@
1
+ import { LitElement } from 'lit';
2
+ export type FormatNumberStyle = 'decimal' | 'currency' | 'percent' | 'unit';
3
+ export type CurrencyDisplayOption = 'symbol' | 'code' | 'name' | 'narrowSymbol';
4
+ export type CurrencySignOption = 'standard' | 'accounting';
5
+ export type NotationOption = 'standard' | 'scientific' | 'engineering' | 'compact';
6
+ export type CompactDisplayOption = 'short' | 'long';
7
+ export type UnitDisplayOption = 'short' | 'long' | 'narrow';
8
+ export type SignDisplayOption = 'auto' | 'never' | 'always' | 'exceptZero';
9
+ /**
10
+ * @element nve-format-number
11
+ * @description A localized number formatter for currencies, percentages, units, and compact notation, backed by Intl.NumberFormat.
12
+ * Provide a `currency` attribute when `formatStyle` is `currency`, and a `unit` attribute when `formatStyle` is `unit`.
13
+ * @since 0.0.0
14
+ * @entrypoint \@nvidia-elements/core/format-number
15
+ * @slot - Numeric string to format (such as 1234567 or 1234.56). Serves as fallback before hydration.
16
+ */
17
+ export declare class FormatNumber extends LitElement {
18
+ #private;
19
+ static styles: import('lit').CSSResult[];
20
+ static readonly metadata: {
21
+ tag: string;
22
+ version: string;
23
+ };
24
+ /**
25
+ * Optional numeric string for values supplied by JavaScript or bound data.
26
+ * By default, the component formats the element's text content, which also serves as the SSR fallback.
27
+ * When both are present, this property takes precedence.
28
+ */
29
+ number?: string;
30
+ /**
31
+ * Language tag (such as en-US, de-DE). Defaults to document.documentElement.lang or browser default.
32
+ */
33
+ locale?: string;
34
+ /**
35
+ * Formatting style: 'decimal' | 'currency' | 'percent' | 'unit'.
36
+ */
37
+ formatStyle: FormatNumberStyle;
38
+ /**
39
+ * ISO 4217 currency code (such as USD or EUR). Required when formatStyle is currency.
40
+ */
41
+ currency?: string;
42
+ /**
43
+ * Currency sign style: 'standard' | 'accounting'.
44
+ */
45
+ currencySign?: CurrencySignOption;
46
+ /**
47
+ * Currency display style: 'symbol' | 'code' | 'name' | 'narrowSymbol'.
48
+ */
49
+ currencyDisplay?: CurrencyDisplayOption;
50
+ /**
51
+ * Unit identifier (such as kilometer or byte). Required when formatStyle is unit.
52
+ */
53
+ unit?: string;
54
+ /**
55
+ * Unit display style: 'short' | 'long' | 'narrow'.
56
+ */
57
+ unitDisplay?: UnitDisplayOption;
58
+ /**
59
+ * Number notation: 'standard' | 'scientific' | 'engineering' | 'compact'.
60
+ */
61
+ notation?: NotationOption;
62
+ /**
63
+ * Compact notation display: 'short' | 'long'. Only applies when notation is compact.
64
+ */
65
+ compactDisplay?: CompactDisplayOption;
66
+ /**
67
+ * Sign display: 'auto' | 'never' | 'always' | 'exceptZero'.
68
+ */
69
+ signDisplay?: SignDisplayOption;
70
+ /**
71
+ * Grouping separators: 'auto' | 'always' | 'min2' | 'true' | 'false'.
72
+ */
73
+ useGrouping?: string;
74
+ /**
75
+ * Pad fraction output to at least this many digits (0-20).
76
+ */
77
+ minimumFractionDigits?: number;
78
+ /**
79
+ * Round fraction output to at most this many digits (0-20).
80
+ */
81
+ maximumFractionDigits?: number;
82
+ /**
83
+ * Pad integer output to at least this many digits (1-21).
84
+ */
85
+ minimumIntegerDigits?: number;
86
+ render(): import('lit-html').TemplateResult<1>;
87
+ }
@@ -0,0 +1,6 @@
1
+ //#region src/format-number/format-number.examples.ts
2
+ var e = "";
3
+ //#endregion
4
+ export { e as default };
5
+
6
+ //# sourceMappingURL=format-number.examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-number.examples.js","names":[],"sources":["../../src/format-number/format-number.examples.ts"],"sourcesContent":["// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { html } from 'lit';\nimport '@nvidia-elements/core/format-number/define.js';\n\nexport default {\n title: 'Elements/FormatNumber',\n component: 'nve-format-number'\n};\n\n/**\n * @summary Basic decimal formatting with localized grouping separators. Use for inline counts and metrics.\n */\nexport const Default = {\n render: () => html`\n <nve-format-number>1234567.89</nve-format-number>\n `\n};\n\n/**\n * @summary Currency formatting for monetary values with locale-aware symbols and separators. Use for prices, budgets, and financial totals.\n */\nexport const Currency = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number format-style=\"currency\" currency=\"USD\">1234.56</nve-format-number>\n <nve-format-number format-style=\"currency\" currency=\"EUR\" currency-display=\"code\">1234.56</nve-format-number>\n <nve-format-number format-style=\"currency\" currency=\"JPY\" currency-display=\"name\">1234</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Percent formatting for ratios and completion values. Source values should already represent a fraction (such as 0.85 for 85 percent).\n */\nexport const Percent = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number format-style=\"percent\">0.85</nve-format-number>\n <nve-format-number format-style=\"percent\">0.126</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Unit formatting for measurements and quantities. Use for distances, storage sizes, or other numeric labels that need a localized unit suffix.\n */\nexport const Unit = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number format-style=\"unit\" unit=\"kilometer\">1234.56</nve-format-number>\n <nve-format-number format-style=\"unit\" unit=\"byte\" unit-display=\"long\">2048</nve-format-number>\n <nve-format-number format-style=\"unit\" unit=\"celsius\" unit-display=\"narrow\">22</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Notation presets for scientific, engineering, and compact display. Use compact notation in dashboards or cards where space matters.\n */\nexport const Notation = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number notation=\"compact\" compact-display=\"short\">1234567</nve-format-number>\n <nve-format-number notation=\"compact\" compact-display=\"long\">1234567</nve-format-number>\n <nve-format-number notation=\"scientific\">1234567</nve-format-number>\n <nve-format-number notation=\"engineering\">1234567</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Sign display options for controlling positive and negative indicators. Use 'always' for delta values or 'exceptZero' for change indicators.\n */\nexport const SignDisplay = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number sign-display=\"always\">42</nve-format-number>\n <nve-format-number sign-display=\"always\">-42</nve-format-number>\n <nve-format-number sign-display=\"exceptZero\">0</nve-format-number>\n <nve-format-number sign-display=\"never\">-42</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Fraction digit control for tuning decimal precision. Use to enforce fixed decimal places in financial or scientific contexts.\n */\nexport const FractionDigits = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number minimum-fraction-digits=\"4\">1.5</nve-format-number>\n <nve-format-number maximum-fraction-digits=\"0\">1.567</nve-format-number>\n <nve-format-number minimum-fraction-digits=\"2\" maximum-fraction-digits=\"2\">3</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Explicit locale settings for internationalized number output. Use when the target audience locale differs from the document language or browser default.\n */\nexport const Locale = {\n render: () => html`\n<div nve-layout=\"column gap:sm\">\n <nve-format-number locale=\"de-DE\" format-style=\"currency\" currency=\"EUR\">1234.56</nve-format-number>\n <nve-format-number locale=\"ja-JP\" format-style=\"currency\" currency=\"JPY\">1234</nve-format-number>\n <nve-format-number locale=\"fr-FR\">1234567.89</nve-format-number>\n</div>\n `\n};\n\n/**\n * @summary Number attribute input for values supplied by JavaScript or bound data. By default, the component formats text content, which also serves as the SSR fallback, and `number` wins when both are present.\n */\nexport const NumberAttribute = {\n render: () => html`\n <nve-format-number number=\"1234.56\" format-style=\"currency\" currency=\"USD\"></nve-format-number>\n `\n};"],"mappings":";AAGA,IAAA,IAAS"}
@@ -0,0 +1,87 @@
1
+ {
2
+ "element": "nve-format-number",
3
+ "entrypoint": "@nvidia-elements/core/format-number/format-number.examples.json",
4
+ "items": [
5
+ {
6
+ "id": "format-number",
7
+ "name": "Default",
8
+ "template": "<nve-format-number>1234567.89</nve-format-number>\n",
9
+ "summary": "Basic decimal formatting with localized grouping separators. Use for inline counts and metrics.",
10
+ "description": "",
11
+ "composition": false,
12
+ "tags": []
13
+ },
14
+ {
15
+ "id": "format-number-currency",
16
+ "name": "Currency",
17
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number format-style=\"currency\" currency=\"USD\">1234.56</nve-format-number>\n <nve-format-number format-style=\"currency\" currency=\"EUR\" currency-display=\"code\">1234.56</nve-format-number>\n <nve-format-number format-style=\"currency\" currency=\"JPY\" currency-display=\"name\">1234</nve-format-number>\n</div>\n",
18
+ "summary": "Currency formatting for monetary values with locale-aware symbols and separators. Use for prices, budgets, and financial totals.",
19
+ "description": "",
20
+ "composition": false,
21
+ "tags": []
22
+ },
23
+ {
24
+ "id": "format-number-percent",
25
+ "name": "Percent",
26
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number format-style=\"percent\">0.85</nve-format-number>\n <nve-format-number format-style=\"percent\">0.126</nve-format-number>\n</div>\n",
27
+ "summary": "Percent formatting for ratios and completion values. Source values should already represent a fraction (such as 0.85 for 85 percent).",
28
+ "description": "",
29
+ "composition": false,
30
+ "tags": []
31
+ },
32
+ {
33
+ "id": "format-number-unit",
34
+ "name": "Unit",
35
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number format-style=\"unit\" unit=\"kilometer\">1234.56</nve-format-number>\n <nve-format-number format-style=\"unit\" unit=\"byte\" unit-display=\"long\">2048</nve-format-number>\n <nve-format-number format-style=\"unit\" unit=\"celsius\" unit-display=\"narrow\">22</nve-format-number>\n</div>\n",
36
+ "summary": "Unit formatting for measurements and quantities. Use for distances, storage sizes, or other numeric labels that need a localized unit suffix.",
37
+ "description": "",
38
+ "composition": false,
39
+ "tags": []
40
+ },
41
+ {
42
+ "id": "format-number-notation",
43
+ "name": "Notation",
44
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number notation=\"compact\" compact-display=\"short\">1234567</nve-format-number>\n <nve-format-number notation=\"compact\" compact-display=\"long\">1234567</nve-format-number>\n <nve-format-number notation=\"scientific\">1234567</nve-format-number>\n <nve-format-number notation=\"engineering\">1234567</nve-format-number>\n</div>\n",
45
+ "summary": "Notation presets for scientific, engineering, and compact display. Use compact notation in dashboards or cards where space matters.",
46
+ "description": "",
47
+ "composition": false,
48
+ "tags": []
49
+ },
50
+ {
51
+ "id": "format-number-sign-display",
52
+ "name": "SignDisplay",
53
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number sign-display=\"always\">42</nve-format-number>\n <nve-format-number sign-display=\"always\">-42</nve-format-number>\n <nve-format-number sign-display=\"exceptZero\">0</nve-format-number>\n <nve-format-number sign-display=\"never\">-42</nve-format-number>\n</div>\n",
54
+ "summary": "Sign display options for controlling positive and negative indicators. Use 'always' for delta values or 'exceptZero' for change indicators.",
55
+ "description": "",
56
+ "composition": false,
57
+ "tags": []
58
+ },
59
+ {
60
+ "id": "format-number-fraction-digits",
61
+ "name": "FractionDigits",
62
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number minimum-fraction-digits=\"4\">1.5</nve-format-number>\n <nve-format-number maximum-fraction-digits=\"0\">1.567</nve-format-number>\n <nve-format-number minimum-fraction-digits=\"2\" maximum-fraction-digits=\"2\">3</nve-format-number>\n</div>\n",
63
+ "summary": "Fraction digit control for tuning decimal precision. Use to enforce fixed decimal places in financial or scientific contexts.",
64
+ "description": "",
65
+ "composition": false,
66
+ "tags": []
67
+ },
68
+ {
69
+ "id": "format-number-locale",
70
+ "name": "Locale",
71
+ "template": "<div nve-layout=\"column gap:sm\">\n <nve-format-number locale=\"de-DE\" format-style=\"currency\" currency=\"EUR\">1234.56</nve-format-number>\n <nve-format-number locale=\"ja-JP\" format-style=\"currency\" currency=\"JPY\">1234</nve-format-number>\n <nve-format-number locale=\"fr-FR\">1234567.89</nve-format-number>\n</div>\n",
72
+ "summary": "Explicit locale settings for internationalized number output. Use when the target audience locale differs from the document language or browser default.",
73
+ "description": "",
74
+ "composition": false,
75
+ "tags": []
76
+ },
77
+ {
78
+ "id": "format-number-number-attribute",
79
+ "name": "NumberAttribute",
80
+ "template": "<nve-format-number number=\"1234.56\" format-style=\"currency\" currency=\"USD\"></nve-format-number>\n",
81
+ "summary": "Number attribute input for values supplied by JavaScript or bound data. By default, the component formats text content, which also serves as the SSR fallback, and `number` wins when both are present.",
82
+ "description": "",
83
+ "composition": false,
84
+ "tags": []
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,6 @@
1
+ //#region src/format-number/format-number.css?inline
2
+ var e = ":host{display:inline}[internal-host]{color:var(--nve-sys-text-color, inherit)}slot{display:none}";
3
+ //#endregion
4
+ export { e as default };
5
+
6
+ //# sourceMappingURL=format-number.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format-number.js","names":[],"sources":["../../src/format-number/format-number.css?inline"],"sourcesContent":["/* SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. */\n/* SPDX-License-Identifier: Apache-2.0 */\n\n:host {\n display: inline;\n}\n\n[internal-host] {\n color: var(--nve-sys-text-color, inherit);\n}\n\nslot {\n display: none;\n}\n"],"mappings":""}