@toptal/picasso 28.0.0 → 28.1.1
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/ButtonAction/styles.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Theme } from '@material-ui/core/styles';
|
|
2
|
-
declare const _default: ({ palette, typography }: Theme) => import("@material-ui/styles").StyleRules<{}, "content" | "small" | "icon" | "active" | "disabled" | "root" | "focused" | "hovered" | "iconLeft" | "iconRight" | "loading"
|
|
2
|
+
declare const _default: ({ palette, typography }: Theme) => import("@material-ui/styles").StyleRules<{}, "content" | "small" | "icon" | "active" | "disabled" | "root" | "focused" | "hovered" | "iconLeft" | "iconRight" | "loading">;
|
|
3
3
|
export default _default;
|
package/ButtonAction/styles.js
CHANGED
|
@@ -21,7 +21,7 @@ export default ({ palette, typography }) => createStyles({
|
|
|
21
21
|
},
|
|
22
22
|
},
|
|
23
23
|
content: {
|
|
24
|
-
fontWeight:
|
|
24
|
+
fontWeight: typography.fontWeights.semibold,
|
|
25
25
|
color: palette.blue.main,
|
|
26
26
|
},
|
|
27
27
|
small: {
|
|
@@ -36,11 +36,6 @@ export default ({ palette, typography }) => createStyles({
|
|
|
36
36
|
marginRight: 0,
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
-
iconless: {
|
|
40
|
-
'&:not($loading) $content': {
|
|
41
|
-
fontWeight: typography.fontWeights.semibold,
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
39
|
icon: {
|
|
45
40
|
width: '1rem',
|
|
46
41
|
height: '1rem',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/ButtonAction/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAE9D,eAAe,CAAC,EAAE,OAAO,EAAE,UAAU,EAAS,EAAE,EAAE,CAChD,YAAY,CAAC;IACX,IAAI,E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UAAU;YACpB,UAAU,EAAE,UAAU;SACvB;QACD,aAAa,EAAE;YACb,UAAU,EAAE,CAAC;SACd;QACD,cAAc,EAAE;YACd,WAAW,EAAE,CAAC;SACf;KACF;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI;KACzB;IACD,QAAQ,EAAE;QACR,WAAW,EAAE,QAAQ;KACtB;IACD,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE,EAAE;IACV,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;CACZ,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -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"}
|