@toptal/picasso 25.3.1 → 25.3.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/picasso",
|
|
3
|
-
"version": "25.3.
|
|
3
|
+
"version": "25.3.2",
|
|
4
4
|
"description": "Toptal UI components library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@material-ui/core": "4.11.0",
|
|
27
|
-
"notistack": "1.0.
|
|
27
|
+
"notistack": "1.0.6",
|
|
28
28
|
"react": ">=16.12.0 < 19.0.0",
|
|
29
29
|
"react-dom": ">=16.12.0 < 19.0.0",
|
|
30
30
|
"react-helmet": "6.1.0",
|
|
31
31
|
"typescript": "4.6.x"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@toptal/picasso-provider": "^1.1.
|
|
35
|
-
"@toptal/picasso-shared": "^8.2.
|
|
34
|
+
"@toptal/picasso-provider": "^1.1.4",
|
|
35
|
+
"@toptal/picasso-shared": "^8.2.2",
|
|
36
36
|
"ap-style-title-case": "^1.1.2",
|
|
37
37
|
"classnames": "^2.3.1",
|
|
38
38
|
"d3": "^6.7.0",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createStyles } from '@material-ui/core/styles';
|
|
2
2
|
export default () => createStyles({
|
|
3
3
|
formNotification: {
|
|
4
|
-
width: '20em'
|
|
4
|
+
width: '20em',
|
|
5
|
+
maxWidth: '100%'
|
|
5
6
|
},
|
|
6
7
|
generalNotification: {
|
|
7
|
-
width: '27.5em'
|
|
8
|
+
width: '27.5em',
|
|
9
|
+
maxWidth: '100%'
|
|
8
10
|
}
|
|
9
11
|
});
|
|
10
12
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/utils/Notifications/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/utils/Notifications/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,MAAM;KACjB;IACD,mBAAmB,EAAE;QACnB,KAAK,EAAE,QAAQ;QACf,QAAQ,EAAE,MAAM;KACjB;CACF,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { formatAmount } from './format-amount';
|
|
2
|
-
describe('formatAmount', () => {
|
|
3
|
-
describe('when `locale` is defined', () => {
|
|
4
|
-
it('formats `en-US` locale by default', () => {
|
|
5
|
-
expect(formatAmount({ amount: 1500 })).toBe('$1,500.00');
|
|
6
|
-
});
|
|
7
|
-
});
|
|
8
|
-
describe('when `locale` is `fr-FR`', () => {
|
|
9
|
-
it('formats `fr-FR` locale', () => {
|
|
10
|
-
expect(formatAmount({ amount: 1500, locale: 'fr-FR' })).toBe('$1,500.00');
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
describe('when `EUR` currency provided', () => {
|
|
14
|
-
it('formats EUR currency', () => {
|
|
15
|
-
expect(formatAmount({ amount: 1750, currency: 'EUR' })).toBe('€1,750.00');
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
describe('when no currency provided', () => {
|
|
19
|
-
it('formats USD currency by default', () => {
|
|
20
|
-
expect(formatAmount({ amount: 1500 })).toBe('$1,500.00');
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
describe('when `amount` has 4 digits of decimals', () => {
|
|
24
|
-
it('formats two digit of decimals USD amount', () => {
|
|
25
|
-
expect(formatAmount({ amount: 24.2587 })).toBe('$24.26');
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
describe('when `amount` is negative', () => {
|
|
29
|
-
it('formats negative USD amount', () => {
|
|
30
|
-
expect(formatAmount({ amount: -14.25 })).toBe('-$14.25');
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe('when `amount` is zero', () => {
|
|
34
|
-
it('formats zero USD amount', () => {
|
|
35
|
-
expect(formatAmount({ amount: 0 })).toBe('$0.00');
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
describe('when `amount` is string', () => {
|
|
39
|
-
it('formats amount as a number', () => {
|
|
40
|
-
expect(formatAmount({ amount: '15' })).toBe('$15.00');
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=format-amount.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"format-amount.test.js","sourceRoot":"","sources":["../../../src/utils/Formatters/format-amount.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;QACxC,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,MAAM,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC1D,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;QACx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