@megha-ui/react 1.2.136 → 1.2.137

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.
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.formatValue = void 0;
4
4
  const regexUtils_1 = require("../components/grid/utils/regexUtils");
5
5
  // Function to format numbers
6
- const formatNumber = (value, locale = "sv-SE") => {
7
- const formatter = new Intl.NumberFormat(locale);
6
+ const formatNumber = (value, locale = "sv-SE", options) => {
7
+ const formatter = new Intl.NumberFormat(locale, options);
8
8
  return formatter.format(value);
9
9
  };
10
10
  // ISO-like string including local time (no timezone)
@@ -162,7 +162,7 @@ const formatCurrency = (value, locale = "sv-SE", currency = "SEK", options) => {
162
162
  const formatValue = (value, type = "number", locale = "sv-SE", options) => {
163
163
  if (type === "number") {
164
164
  const num = parseFloat(value.toString());
165
- return formatNumber(num, locale);
165
+ return formatNumber(num, locale, { useGrouping: false });
166
166
  }
167
167
  else if (type === "date") {
168
168
  let date = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.136",
3
+ "version": "1.2.137",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",