@transferwise/components 43.12.8 → 43.13.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/build/es/no-polyfill/display/Display.js +1 -1
- package/build/es/no-polyfill/display/Display.story.js +1 -1
- package/build/es/polyfill/display/Display.js +1 -1
- package/build/es/polyfill/display/Display.story.js +1 -1
- package/build/types/display/Display.d.ts +2 -1
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";function Display(a){var b=a.
|
|
1
|
+
import classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";function Display(a){var b=a.as,c=void 0===b?"h1":b,d=a.type,e=void 0===d?Typography.DISPLAY_LARGE:d,f=a.children,g=a.className;return/*#__PURE__*/_jsx(c,{className:classNames("np-text-".concat(e),"text-primary",g),children:f})}export default Display;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* eslint-disable jsx-a11y/accessible-emoji */import{Typography}from"../common";import Money from"../money/Money";import Title from"../title/Title";import Display from"./Display";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{title:"Typography/Display"};export var Basic=function(){var a
|
|
1
|
+
/* eslint-disable jsx-a11y/accessible-emoji */import{Typography}from"../common";import Money from"../money/Money";import Title from"../title/Title";import Display from"./Display";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{title:"Typography/Display"};export var Basic=function(){var a="\xC4\xD6\xDC\u1E9EABCDEFGHIJKLMNOPQRSTUVWXYZ",b="\u0410\u0411\u0412\u0413\u0490\u0414\u0415\u0404\u0416\u0417\u0418\u0406\u0407\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042C\u042E\u042F",c="\u3041\u3042\u3043\u3044\u3045\u3046\u3047\u3048\u3049\u304A\u304B\u304C\u304D\u304E\u304F\u3050\u3051\u3052\u3053\u3054\u3055\u3056\u3057\u3058\u3059\u305A\u305B\u305C\u305D\u305E\u305F\u3060\u3061\u3062\u3063\u3064\u3065\u3066\u3067";return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("html",{lang:"ja",children:[/*#__PURE__*/_jsx("h1",{children:"Default case, example being \uD83C\uDDEF\uD83C\uDDF5"}),/*#__PURE__*/_jsx("h4",{children:"This is close to the right formatting but to get it perfect, change locale on the right to ja-JP"}),"Extra Large",/*#__PURE__*/_jsx(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:c}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsx(Display,{as:"h2",type:Typography.DISPLAY_LARGE,children:c}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsx(Display,{as:"h3",type:Typography.DISPLAY_MEDIUM,children:c}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsx(Display,{as:"h4",type:Typography.DISPLAY_SMALL,children:c})]}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsxs("html",{lang:"en",children:[/*#__PURE__*/_jsx("h1",{children:"First fallback is \uD83C\uDDEC\uD83C\uDDE7"}),"Extra Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_LARGE,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_MEDIUM,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_SMALL,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]})]}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsxs("html",{lang:"de",children:[/*#__PURE__*/_jsx("h1",{children:"Next fallback is many languages including \uD83C\uDDE9\uD83C\uDDEA (only change is line-height being increased)"}),"Extra Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:[a,/*#__PURE__*/_jsx("br",{}),a]}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_LARGE,children:[a,/*#__PURE__*/_jsx("br",{}),a]}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_MEDIUM,children:[a,/*#__PURE__*/_jsx("br",{}),a]}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_SMALL,children:[a,/*#__PURE__*/_jsx("br",{}),a]})]}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsxs("html",{lang:"uk",children:[/*#__PURE__*/_jsx("h1",{children:"Final fallback are Greek and Cyrillic lanugages like \uD83C\uDDFA\uD83C\uDDE6"}),"Extra Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:[b,/*#__PURE__*/_jsx("br",{}),b]}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_LARGE,children:[b,/*#__PURE__*/_jsx("br",{}),b]}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_MEDIUM,children:[b,/*#__PURE__*/_jsx("br",{}),b]}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_SMALL,children:[b,/*#__PURE__*/_jsx("br",{}),b]})]})]})};export var Numbers=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Display Number"}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1050.6,currency:"UAH"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:10.17,currency:"JPY"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:.01,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"GBP"})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";function Display(a){var b=a.
|
|
1
|
+
import classNames from"classnames";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";function Display(a){var b=a.as,c=void 0===b?"h1":b,d=a.type,e=void 0===d?Typography.DISPLAY_LARGE:d,f=a.children,g=a.className;return/*#__PURE__*/_jsx(c,{className:classNames("np-text-".concat(e),"text-primary",g),children:f})}export default Display;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/* eslint-disable jsx-a11y/accessible-emoji */import{Typography}from"../common";import Money from"../money/Money";import Title from"../title/Title";import Display from"./Display";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{title:"Typography/Display"};export var Basic=function(){var a
|
|
1
|
+
/* eslint-disable jsx-a11y/accessible-emoji */import{Typography}from"../common";import Money from"../money/Money";import Title from"../title/Title";import Display from"./Display";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{title:"Typography/Display"};export var Basic=function(){var a="\xC4\xD6\xDC\u1E9EABCDEFGHIJKLMNOPQRSTUVWXYZ",b="\u0410\u0411\u0412\u0413\u0490\u0414\u0415\u0404\u0416\u0417\u0418\u0406\u0407\u0419\u041A\u041B\u041C\u041D\u041E\u041F\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042C\u042E\u042F",c="\u3041\u3042\u3043\u3044\u3045\u3046\u3047\u3048\u3049\u304A\u304B\u304C\u304D\u304E\u304F\u3050\u3051\u3052\u3053\u3054\u3055\u3056\u3057\u3058\u3059\u305A\u305B\u305C\u305D\u305E\u305F\u3060\u3061\u3062\u3063\u3064\u3065\u3066\u3067";return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs("html",{lang:"ja",children:[/*#__PURE__*/_jsx("h1",{children:"Default case, example being \uD83C\uDDEF\uD83C\uDDF5"}),/*#__PURE__*/_jsx("h4",{children:"This is close to the right formatting but to get it perfect, change locale on the right to ja-JP"}),"Extra Large",/*#__PURE__*/_jsx(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:c}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsx(Display,{as:"h2",type:Typography.DISPLAY_LARGE,children:c}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsx(Display,{as:"h3",type:Typography.DISPLAY_MEDIUM,children:c}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsx(Display,{as:"h4",type:Typography.DISPLAY_SMALL,children:c})]}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsxs("html",{lang:"en",children:[/*#__PURE__*/_jsx("h1",{children:"First fallback is \uD83C\uDDEC\uD83C\uDDE7"}),"Extra Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_LARGE,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_MEDIUM,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_SMALL,children:["ABCDEFGHIJKLMNOPQRSTUVWXYZ",/*#__PURE__*/_jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"]})]}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsxs("html",{lang:"de",children:[/*#__PURE__*/_jsx("h1",{children:"Next fallback is many languages including \uD83C\uDDE9\uD83C\uDDEA (only change is line-height being increased)"}),"Extra Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:[a,/*#__PURE__*/_jsx("br",{}),a]}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_LARGE,children:[a,/*#__PURE__*/_jsx("br",{}),a]}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_MEDIUM,children:[a,/*#__PURE__*/_jsx("br",{}),a]}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_SMALL,children:[a,/*#__PURE__*/_jsx("br",{}),a]})]}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsxs("html",{lang:"uk",children:[/*#__PURE__*/_jsx("h1",{children:"Final fallback are Greek and Cyrillic lanugages like \uD83C\uDDFA\uD83C\uDDE6"}),"Extra Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_EXTRA_LARGE,children:[b,/*#__PURE__*/_jsx("br",{}),b]}),/*#__PURE__*/_jsx("hr",{}),"Large",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_LARGE,children:[b,/*#__PURE__*/_jsx("br",{}),b]}),/*#__PURE__*/_jsx("hr",{}),"Medium",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_MEDIUM,children:[b,/*#__PURE__*/_jsx("br",{}),b]}),/*#__PURE__*/_jsx("hr",{}),"Small",/*#__PURE__*/_jsxs(Display,{type:Typography.DISPLAY_SMALL,children:[b,/*#__PURE__*/_jsx("br",{}),b]})]})]})};export var Numbers=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SCREEN,children:"Display Number"}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1050.6,currency:"UAH"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:10.17,currency:"JPY"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:.01,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"EUR"})}),/*#__PURE__*/_jsx("hr",{}),/*#__PURE__*/_jsx("div",{className:"np-text-display-number",children:/*#__PURE__*/_jsx(Money,{amount:1e6,currency:"GBP"})})]})};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { DisplayTypes } from '../common';
|
|
3
3
|
type Props = PropsWithChildren<{
|
|
4
|
+
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
5
|
id?: string;
|
|
5
6
|
type?: DisplayTypes;
|
|
6
7
|
className?: string;
|
|
7
8
|
}>;
|
|
8
|
-
declare function Display({ type, children, className }: Props): JSX.Element;
|
|
9
|
+
declare function Display({ as: Heading, type, children, className, }: Props): JSX.Element;
|
|
9
10
|
export default Display;
|