@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.
Files changed (34) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/cjs/components/CurrencyFormatter/CurrencyFormatter.d.ts +5 -0
  3. package/dist/cjs/components/CurrencyFormatter/CurrencyFormatter.js +12 -0
  4. package/dist/cjs/components/CurrencyFormatter/index.d.ts +1 -0
  5. package/dist/cjs/components/CurrencyFormatter/index.js +17 -0
  6. package/dist/cjs/components/DateFormatter/DateFormatter.d.ts +6 -0
  7. package/dist/cjs/components/DateFormatter/DateFormatter.js +22 -0
  8. package/dist/cjs/components/DateFormatter/index.d.ts +1 -0
  9. package/dist/cjs/components/DateFormatter/index.js +17 -0
  10. package/dist/cjs/components/NumberFormatter/NumberFormatter.d.ts +5 -0
  11. package/dist/cjs/components/NumberFormatter/NumberFormatter.js +9 -0
  12. package/dist/cjs/components/NumberFormatter/index.d.ts +1 -0
  13. package/dist/cjs/components/NumberFormatter/index.js +17 -0
  14. package/dist/cjs/components/index.d.ts +3 -0
  15. package/dist/cjs/components/index.js +19 -0
  16. package/dist/cjs/index.d.ts +1 -0
  17. package/dist/cjs/index.js +17 -0
  18. package/dist/esm/components/CurrencyFormatter/CurrencyFormatter.d.ts +5 -0
  19. package/dist/esm/components/CurrencyFormatter/CurrencyFormatter.js +9 -0
  20. package/dist/esm/components/CurrencyFormatter/index.d.ts +1 -0
  21. package/dist/esm/components/CurrencyFormatter/index.js +1 -0
  22. package/dist/esm/components/DateFormatter/DateFormatter.d.ts +6 -0
  23. package/dist/esm/components/DateFormatter/DateFormatter.js +19 -0
  24. package/dist/esm/components/DateFormatter/index.d.ts +1 -0
  25. package/dist/esm/components/DateFormatter/index.js +1 -0
  26. package/dist/esm/components/NumberFormatter/NumberFormatter.d.ts +5 -0
  27. package/dist/esm/components/NumberFormatter/NumberFormatter.js +6 -0
  28. package/dist/esm/components/NumberFormatter/index.d.ts +1 -0
  29. package/dist/esm/components/NumberFormatter/index.js +1 -0
  30. package/dist/esm/components/index.d.ts +3 -0
  31. package/dist/esm/components/index.js +3 -0
  32. package/dist/esm/index.d.ts +1 -0
  33. package/dist/esm/index.js +1 -0
  34. 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,5 @@
1
+ type CurrencyFormatterProps = {
2
+ value: number;
3
+ };
4
+ export declare function CurrencyFormatter({ value }: CurrencyFormatterProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -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,6 @@
1
+ type DateFormatterProps = {
2
+ value: Date;
3
+ showTime?: boolean;
4
+ };
5
+ export declare function DateFormatter({ value, showTime }: DateFormatterProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -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,5 @@
1
+ type NumberFormatterProps = {
2
+ value: number;
3
+ };
4
+ export declare function NumberFormatter({ value }: NumberFormatterProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -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,3 @@
1
+ export * from './DateFormatter';
2
+ export * from './NumberFormatter';
3
+ export * from './CurrencyFormatter';
@@ -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,5 @@
1
+ type CurrencyFormatterProps = {
2
+ value: number;
3
+ };
4
+ export declare function CurrencyFormatter({ value }: CurrencyFormatterProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -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,6 @@
1
+ type DateFormatterProps = {
2
+ value: Date;
3
+ showTime?: boolean;
4
+ };
5
+ export declare function DateFormatter({ value, showTime }: DateFormatterProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -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,5 @@
1
+ type NumberFormatterProps = {
2
+ value: number;
3
+ };
4
+ export declare function NumberFormatter({ value }: NumberFormatterProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -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,3 @@
1
+ export * from './DateFormatter';
2
+ export * from './NumberFormatter';
3
+ export * from './CurrencyFormatter';
@@ -0,0 +1,3 @@
1
+ export * from './DateFormatter';
2
+ export * from './NumberFormatter';
3
+ export * from './CurrencyFormatter';
@@ -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.12",
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": "e8bd79bc92b26a8f52611972eec98a867536ccd3"
41
+ "gitHead": "ce69097516055b330a0b05da5e29ac5b66e56284"
42
42
  }