@toptal/picasso 27.4.0 → 28.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.
package/PageHelmet/PageHelmet.js
CHANGED
|
@@ -10,7 +10,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
import React from 'react';
|
|
13
|
-
|
|
13
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
14
|
+
import { Helmet } from 'react-helmet-async';
|
|
14
15
|
export const PageHelmet = (props) => {
|
|
15
16
|
const { children } = props, rest = __rest(props, ["children"]);
|
|
16
17
|
return React.createElement(Helmet, Object.assign({}, rest), children);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHelmet.js","sourceRoot":"","sources":["../../src/PageHelmet/PageHelmet.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,MAAM,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"PageHelmet.js","sourceRoot":"","sources":["../../src/PageHelmet/PageHelmet.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AACxC,6DAA6D;AAC7D,OAAO,EAAE,MAAM,EAAe,MAAM,oBAAoB,CAAA;AAOxD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAY,EAAE,EAAE;IACzC,MAAM,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA7B,YAAqB,CAAQ,CAAA;IAEnC,OAAO,oBAAC,MAAM,oBAAK,IAAI,GAAG,QAAQ,CAAU,CAAA;AAC9C,CAAC,CAAA;AAED,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,eAAe,UAAU,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "28.1.0",
|
|
4
4
|
"description": "Toptal UI components library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -24,15 +24,14 @@
|
|
|
24
24
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@material-ui/core": "4.12.4",
|
|
27
|
-
"@toptal/picasso-provider": "^
|
|
27
|
+
"@toptal/picasso-provider": "^2.0.0",
|
|
28
28
|
"notistack": "1.0.10",
|
|
29
29
|
"react": ">=16.12.0 < 19.0.0",
|
|
30
30
|
"react-dom": ">=16.12.0 < 19.0.0",
|
|
31
|
-
"react-helmet": "6.1.0",
|
|
32
31
|
"typescript": "~4.7.0"
|
|
33
32
|
},
|
|
34
33
|
"dependencies": {
|
|
35
|
-
"@toptal/picasso-shared": "
|
|
34
|
+
"@toptal/picasso-shared": "11.0.0",
|
|
36
35
|
"ap-style-title-case": "^1.1.2",
|
|
37
36
|
"classnames": "^2.3.1",
|
|
38
37
|
"d3": "^6.7.0",
|
|
@@ -60,11 +59,10 @@
|
|
|
60
59
|
"@testing-library/jest-dom": "^5.16.5",
|
|
61
60
|
"@testing-library/react": "^13.3.0",
|
|
62
61
|
"@testing-library/react-hooks": "^8.0.1",
|
|
63
|
-
"@toptal/picasso-provider": "
|
|
62
|
+
"@toptal/picasso-provider": "2.0.0",
|
|
64
63
|
"@types/classnames": "^2.3.1",
|
|
65
64
|
"@types/d3": "^6.7.4",
|
|
66
65
|
"@types/quill": "^1.3.10",
|
|
67
|
-
"@types/react-helmet": "6.1.0",
|
|
68
66
|
"@types/react-input-mask": "^3.0.0",
|
|
69
67
|
"@types/react-router-dom": "^5.1.3",
|
|
70
68
|
"@types/styled-components": "^5.1.25",
|
|
@@ -7,5 +7,11 @@ export interface FormatAmount {
|
|
|
7
7
|
currency?: string;
|
|
8
8
|
/** Locale identifiers are case-insensitive ASCII. However, it's conventional to use title case (first letter capitalized, successive letters lower case) for script code, upper case for region codes, and lower case for everything else. */
|
|
9
9
|
locale?: string;
|
|
10
|
+
options?: {
|
|
11
|
+
/** The minimum number of fraction digits to display **/
|
|
12
|
+
minimumFractionDigits?: number;
|
|
13
|
+
/** The maximum number of fraction digits to display **/
|
|
14
|
+
maximumFractionDigits?: number;
|
|
15
|
+
};
|
|
10
16
|
}
|
|
11
|
-
export declare const formatAmount: ({ amount, currency, locale, }: FormatAmount) => string;
|
|
17
|
+
export declare const formatAmount: ({ amount, currency, locale, options, }: FormatAmount) => string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export const DEFAULT_CURRENCY = 'USD';
|
|
2
2
|
export const DEFAULT_LOCALE = 'en-US';
|
|
3
|
-
export const formatAmount = ({ amount, currency = DEFAULT_CURRENCY, locale = DEFAULT_LOCALE, }) => {
|
|
3
|
+
export const formatAmount = ({ amount, currency = DEFAULT_CURRENCY, locale = DEFAULT_LOCALE, options, }) => {
|
|
4
4
|
const transformedAmount = typeof amount === 'string' ? Number(amount) : amount;
|
|
5
5
|
return Intl.NumberFormat(locale, {
|
|
6
6
|
style: 'currency',
|
|
7
|
+
minimumFractionDigits: options === null || options === void 0 ? void 0 : options.minimumFractionDigits,
|
|
8
|
+
maximumFractionDigits: options === null || options === void 0 ? void 0 : options.maximumFractionDigits,
|
|
7
9
|
currency,
|
|
8
10
|
}).format(transformedAmount);
|
|
9
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-amount.js","sourceRoot":"","sources":["../../../src/utils/Formatters/format-amount.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"format-amount.js","sourceRoot":"","sources":["../../../src/utils/Formatters/format-amount.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAA;AACrC,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAA;AAkBrC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,MAAM,EACN,QAAQ,GAAG,gBAAgB,EAC3B,MAAM,GAAG,cAAc,EACvB,OAAO,GACM,EAAE,EAAE;IACjB,MAAM,iBAAiB,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;IAE9E,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE;QAC/B,KAAK,EAAE,UAAU;QACjB,qBAAqB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB;QACrD,qBAAqB,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,qBAAqB;QACrD,QAAQ;KACT,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAA;AAC9B,CAAC,CAAA"}
|