@cloud-ru/uikit-product-localization 0.13.12 → 0.13.14
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.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/components/CurrencyFormatter/CurrencyFormatter.d.ts +5 -0
- package/dist/cjs/components/CurrencyFormatter/CurrencyFormatter.js +12 -0
- package/dist/cjs/components/CurrencyFormatter/index.d.ts +1 -0
- package/dist/cjs/components/CurrencyFormatter/index.js +17 -0
- package/dist/cjs/components/DateFormatter/DateFormatter.d.ts +6 -0
- package/dist/cjs/components/DateFormatter/DateFormatter.js +22 -0
- package/dist/cjs/components/DateFormatter/index.d.ts +1 -0
- package/dist/cjs/components/DateFormatter/index.js +17 -0
- package/dist/cjs/components/NumberFormatter/NumberFormatter.d.ts +5 -0
- package/dist/cjs/components/NumberFormatter/NumberFormatter.js +9 -0
- package/dist/cjs/components/NumberFormatter/index.d.ts +1 -0
- package/dist/cjs/components/NumberFormatter/index.js +17 -0
- package/dist/cjs/components/index.d.ts +3 -0
- package/dist/cjs/components/index.js +19 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/esm/components/CurrencyFormatter/CurrencyFormatter.d.ts +5 -0
- package/dist/esm/components/CurrencyFormatter/CurrencyFormatter.js +9 -0
- package/dist/esm/components/CurrencyFormatter/index.d.ts +1 -0
- package/dist/esm/components/CurrencyFormatter/index.js +1 -0
- package/dist/esm/components/DateFormatter/DateFormatter.d.ts +6 -0
- package/dist/esm/components/DateFormatter/DateFormatter.js +19 -0
- package/dist/esm/components/DateFormatter/index.d.ts +1 -0
- package/dist/esm/components/DateFormatter/index.js +1 -0
- package/dist/esm/components/NumberFormatter/NumberFormatter.d.ts +5 -0
- package/dist/esm/components/NumberFormatter/NumberFormatter.js +6 -0
- package/dist/esm/components/NumberFormatter/index.d.ts +1 -0
- package/dist/esm/components/NumberFormatter/index.js +1 -0
- package/dist/esm/components/index.d.ts +3 -0
- package/dist/esm/components/index.js +3 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.13.14 (2025-11-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **PD-3377:** removed contributors ([121640f](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/121640f7b88b20a728a6ad2c39de8841532bb308))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 0.13.13 (2025-11-12)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **PD-3377:** contributors update to publish all packages ([719fd3e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/719fd3e1249e247443b125c47ea408d92c8395c3))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## 0.13.12 (2025-11-12)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @cloud-ru/uikit-product-localization
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CurrencyFormatter = CurrencyFormatter;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const uikit_product_locale_1 = require("@cloud-ru/uikit-product-locale");
|
|
6
|
+
function CurrencyFormatter({ value }) {
|
|
7
|
+
const { lang } = (0, uikit_product_locale_1.useLocale)();
|
|
8
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: new Intl.NumberFormat(lang, {
|
|
9
|
+
style: 'currency',
|
|
10
|
+
currency: 'RUB',
|
|
11
|
+
}).format(value) }));
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CurrencyFormatter';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CurrencyFormatter"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DateFormatter = DateFormatter;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const uikit_product_locale_1 = require("@cloud-ru/uikit-product-locale");
|
|
6
|
+
function DateFormatter({ value, showTime = true }) {
|
|
7
|
+
const { lang } = (0, uikit_product_locale_1.useLocale)();
|
|
8
|
+
if (!showTime) {
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: new Intl.DateTimeFormat(lang, {
|
|
10
|
+
year: 'numeric',
|
|
11
|
+
month: 'short',
|
|
12
|
+
day: 'numeric',
|
|
13
|
+
}).format(value) }));
|
|
14
|
+
}
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: new Intl.DateTimeFormat(lang, {
|
|
16
|
+
year: 'numeric',
|
|
17
|
+
month: 'short',
|
|
18
|
+
day: 'numeric',
|
|
19
|
+
hour: 'numeric',
|
|
20
|
+
minute: 'numeric',
|
|
21
|
+
}).format(value) }));
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateFormatter';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DateFormatter"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NumberFormatter = NumberFormatter;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const uikit_product_locale_1 = require("@cloud-ru/uikit-product-locale");
|
|
6
|
+
function NumberFormatter({ value }) {
|
|
7
|
+
const { lang } = (0, uikit_product_locale_1.useLocale)();
|
|
8
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: new Intl.NumberFormat(lang).format(value) });
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberFormatter';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./NumberFormatter"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./DateFormatter"), exports);
|
|
18
|
+
__exportStar(require("./NumberFormatter"), exports);
|
|
19
|
+
__exportStar(require("./CurrencyFormatter"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./components"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLocale } from '@cloud-ru/uikit-product-locale';
|
|
3
|
+
export function CurrencyFormatter({ value }) {
|
|
4
|
+
const { lang } = useLocale();
|
|
5
|
+
return (_jsx(_Fragment, { children: new Intl.NumberFormat(lang, {
|
|
6
|
+
style: 'currency',
|
|
7
|
+
currency: 'RUB',
|
|
8
|
+
}).format(value) }));
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CurrencyFormatter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CurrencyFormatter';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLocale } from '@cloud-ru/uikit-product-locale';
|
|
3
|
+
export function DateFormatter({ value, showTime = true }) {
|
|
4
|
+
const { lang } = useLocale();
|
|
5
|
+
if (!showTime) {
|
|
6
|
+
return (_jsx(_Fragment, { children: new Intl.DateTimeFormat(lang, {
|
|
7
|
+
year: 'numeric',
|
|
8
|
+
month: 'short',
|
|
9
|
+
day: 'numeric',
|
|
10
|
+
}).format(value) }));
|
|
11
|
+
}
|
|
12
|
+
return (_jsx(_Fragment, { children: new Intl.DateTimeFormat(lang, {
|
|
13
|
+
year: 'numeric',
|
|
14
|
+
month: 'short',
|
|
15
|
+
day: 'numeric',
|
|
16
|
+
hour: 'numeric',
|
|
17
|
+
minute: 'numeric',
|
|
18
|
+
}).format(value) }));
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateFormatter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DateFormatter';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useLocale } from '@cloud-ru/uikit-product-locale';
|
|
3
|
+
export function NumberFormatter({ value }) {
|
|
4
|
+
const { lang } = useLocale();
|
|
5
|
+
return _jsx(_Fragment, { children: new Intl.NumberFormat(lang).format(value) });
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberFormatter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NumberFormatter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-localization",
|
|
3
3
|
"title": "React Localization",
|
|
4
|
-
"version": "0.13.
|
|
4
|
+
"version": "0.13.14",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@cloud-ru/uikit-product-locale": "*"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "ce69097516055b330a0b05da5e29ac5b66e56284"
|
|
42
42
|
}
|