@transferwise/components 0.0.0-experimental-02e6e73 → 0.0.0-experimental-150c7ca
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.
|
@@ -3,33 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var reactIntl = require('react-intl');
|
|
6
|
-
require('../common/theme.js');
|
|
7
|
-
require('../common/direction.js');
|
|
8
|
-
require('@transferwise/neptune-tokens');
|
|
9
|
-
require('../common/PropsValues/control.js');
|
|
10
|
-
require('../common/PropsValues/size.js');
|
|
11
|
-
require('../common/PropsValues/typography.js');
|
|
12
|
-
require('../common/PropsValues/width.js');
|
|
13
|
-
require('../common/PropsValues/type.js');
|
|
14
|
-
require('../common/PropsValues/dateMode.js');
|
|
15
|
-
require('../common/PropsValues/monthFormat.js');
|
|
16
|
-
require('../common/PropsValues/position.js');
|
|
17
|
-
require('../common/PropsValues/layouts.js');
|
|
18
|
-
require('../common/PropsValues/status.js');
|
|
19
|
-
require('../common/PropsValues/sentiment.js');
|
|
20
|
-
require('../common/PropsValues/profileType.js');
|
|
21
|
-
require('../common/PropsValues/variant.js');
|
|
22
|
-
require('../common/PropsValues/scroll.js');
|
|
23
|
-
require('../common/PropsValues/markdownNodeType.js');
|
|
24
|
-
require('../common/fileType.js');
|
|
25
6
|
var index = require('../common/Locale/index.js');
|
|
26
|
-
require('@transferwise/icons');
|
|
27
|
-
require('clsx');
|
|
28
|
-
require('react');
|
|
29
|
-
require('../common/CloseButton/CloseButton.messages.js');
|
|
30
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
31
7
|
var en = require('../i18n/en.json.js');
|
|
32
8
|
var DirectionProvider = require('./Direction/DirectionProvider.js');
|
|
9
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
33
10
|
|
|
34
11
|
function Provider({
|
|
35
12
|
i18n,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sources":["../../src/Provider/Provider.tsx"],"sourcesContent":["import { IntlProvider, ResolvedIntlConfig } from 'react-intl';\n\nimport { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common';\nimport en from '../i18n/en.json';\n\nimport { DirectionProvider } from './Direction';\n\nexport interface ProviderProps {\n i18n: Pick<ResolvedIntlConfig, 'locale' | 'messages'> &\n Partial<Pick<ResolvedIntlConfig, 'defaultRichTextElements'>>;\n children?: React.ReactNode;\n}\n\nexport default function Provider({ i18n, children }: ProviderProps) {\n const { locale, messages, defaultRichTextElements } = i18n;\n const adjustedLocale = adjustLocale(locale);\n let intlConfig;\n\n if (adjustedLocale === null) {\n // eslint-disable-next-line no-console\n console.warn(\n `Unsupported locale value was provided: '${locale}', defaulting to '${DEFAULT_LOCALE}'`,\n );\n\n intlConfig = { locale: DEFAULT_LOCALE, messages: { ...en, ...messages } };\n } else {\n intlConfig = { locale: adjustedLocale, messages };\n }\n\n return (\n <DirectionProvider direction={getDirectionFromLocale(locale)}>\n <IntlProvider\n defaultLocale={DEFAULT_LOCALE}\n locale={intlConfig.locale}\n messages={intlConfig.messages}\n defaultRichTextElements={defaultRichTextElements}\n >\n {children}\n </IntlProvider>\n </DirectionProvider>\n );\n}\n"],"names":["Provider","i18n","children","locale","messages","defaultRichTextElements","adjustedLocale","adjustLocale","intlConfig","console","warn","DEFAULT_LOCALE","en","_jsx","DirectionProvider","direction","getDirectionFromLocale","IntlProvider","defaultLocale"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Provider.js","sources":["../../src/Provider/Provider.tsx"],"sourcesContent":["import { IntlProvider, ResolvedIntlConfig } from 'react-intl';\n\nimport { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common/Locale';\nimport en from '../i18n/en.json';\n\nimport { DirectionProvider } from './Direction';\n\nexport interface ProviderProps {\n i18n: Pick<ResolvedIntlConfig, 'locale' | 'messages'> &\n Partial<Pick<ResolvedIntlConfig, 'defaultRichTextElements'>>;\n children?: React.ReactNode;\n}\n\nexport default function Provider({ i18n, children }: ProviderProps) {\n const { locale, messages, defaultRichTextElements } = i18n;\n const adjustedLocale = adjustLocale(locale);\n let intlConfig;\n\n if (adjustedLocale === null) {\n // eslint-disable-next-line no-console\n console.warn(\n `Unsupported locale value was provided: '${locale}', defaulting to '${DEFAULT_LOCALE}'`,\n );\n\n intlConfig = { locale: DEFAULT_LOCALE, messages: { ...en, ...messages } };\n } else {\n intlConfig = { locale: adjustedLocale, messages };\n }\n\n return (\n <DirectionProvider direction={getDirectionFromLocale(locale)}>\n <IntlProvider\n defaultLocale={DEFAULT_LOCALE}\n locale={intlConfig.locale}\n messages={intlConfig.messages}\n defaultRichTextElements={defaultRichTextElements}\n >\n {children}\n </IntlProvider>\n </DirectionProvider>\n );\n}\n"],"names":["Provider","i18n","children","locale","messages","defaultRichTextElements","adjustedLocale","adjustLocale","intlConfig","console","warn","DEFAULT_LOCALE","en","_jsx","DirectionProvider","direction","getDirectionFromLocale","IntlProvider","defaultLocale"],"mappings":";;;;;;;;;;AAac,SAAUA,QAAQA,CAAC;EAAEC,IAAI;AAAEC,EAAAA;AAAQ,CAAiB,EAAA;EAChE,MAAM;IAAEC,MAAM;IAAEC,QAAQ;AAAEC,IAAAA;AAAuB,GAAE,GAAGJ,IAAI;AAC1D,EAAA,MAAMK,cAAc,GAAGC,kBAAY,CAACJ,MAAM,CAAC;AAC3C,EAAA,IAAIK,UAAU;EAEd,IAAIF,cAAc,KAAK,IAAI,EAAE;AAC3B;IACAG,OAAO,CAACC,IAAI,CACV,CAAA,wCAAA,EAA2CP,MAAM,CAAA,kBAAA,EAAqBQ,oBAAc,GAAG,CACxF;AAEDH,IAAAA,UAAU,GAAG;AAAEL,MAAAA,MAAM,EAAEQ,oBAAc;AAAEP,MAAAA,QAAQ,EAAE;AAAE,QAAA,GAAGQ,UAAE;QAAE,GAAGR;AAAQ;KAAI;AAC3E,EAAA,CAAC,MAAM;AACLI,IAAAA,UAAU,GAAG;AAAEL,MAAAA,MAAM,EAAEG,cAAc;AAAEF,MAAAA;KAAU;AACnD,EAAA;EAEA,oBACES,cAAA,CAACC,mCAAiB,EAAA;AAACC,IAAAA,SAAS,EAAEC,4BAAsB,CAACb,MAAM,CAAE;IAAAD,QAAA,eAC3DW,cAAA,CAACI,sBAAY,EAAA;AACXC,MAAAA,aAAa,EAAEP,oBAAe;MAC9BR,MAAM,EAAEK,UAAU,CAACL,MAAO;MAC1BC,QAAQ,EAAEI,UAAU,CAACJ,QAAS;AAC9BC,MAAAA,uBAAuB,EAAEA,uBAAwB;AAAAH,MAAAA,QAAA,EAEhDA;KACW;AAChB,GAAmB,CAAC;AAExB;;"}
|
|
@@ -1,31 +1,8 @@
|
|
|
1
1
|
import { IntlProvider } from 'react-intl';
|
|
2
|
-
import '../common/theme.mjs';
|
|
3
|
-
import '../common/direction.mjs';
|
|
4
|
-
import '@transferwise/neptune-tokens';
|
|
5
|
-
import '../common/PropsValues/control.mjs';
|
|
6
|
-
import '../common/PropsValues/size.mjs';
|
|
7
|
-
import '../common/PropsValues/typography.mjs';
|
|
8
|
-
import '../common/PropsValues/width.mjs';
|
|
9
|
-
import '../common/PropsValues/type.mjs';
|
|
10
|
-
import '../common/PropsValues/dateMode.mjs';
|
|
11
|
-
import '../common/PropsValues/monthFormat.mjs';
|
|
12
|
-
import '../common/PropsValues/position.mjs';
|
|
13
|
-
import '../common/PropsValues/layouts.mjs';
|
|
14
|
-
import '../common/PropsValues/status.mjs';
|
|
15
|
-
import '../common/PropsValues/sentiment.mjs';
|
|
16
|
-
import '../common/PropsValues/profileType.mjs';
|
|
17
|
-
import '../common/PropsValues/variant.mjs';
|
|
18
|
-
import '../common/PropsValues/scroll.mjs';
|
|
19
|
-
import '../common/PropsValues/markdownNodeType.mjs';
|
|
20
|
-
import '../common/fileType.mjs';
|
|
21
2
|
import { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common/Locale/index.mjs';
|
|
22
|
-
import '@transferwise/icons';
|
|
23
|
-
import 'clsx';
|
|
24
|
-
import 'react';
|
|
25
|
-
import '../common/CloseButton/CloseButton.messages.mjs';
|
|
26
|
-
import { jsx } from 'react/jsx-runtime';
|
|
27
3
|
import en from '../i18n/en.json.mjs';
|
|
28
4
|
import { DirectionProvider } from './Direction/DirectionProvider.mjs';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
29
6
|
|
|
30
7
|
function Provider({
|
|
31
8
|
i18n,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.mjs","sources":["../../src/Provider/Provider.tsx"],"sourcesContent":["import { IntlProvider, ResolvedIntlConfig } from 'react-intl';\n\nimport { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common';\nimport en from '../i18n/en.json';\n\nimport { DirectionProvider } from './Direction';\n\nexport interface ProviderProps {\n i18n: Pick<ResolvedIntlConfig, 'locale' | 'messages'> &\n Partial<Pick<ResolvedIntlConfig, 'defaultRichTextElements'>>;\n children?: React.ReactNode;\n}\n\nexport default function Provider({ i18n, children }: ProviderProps) {\n const { locale, messages, defaultRichTextElements } = i18n;\n const adjustedLocale = adjustLocale(locale);\n let intlConfig;\n\n if (adjustedLocale === null) {\n // eslint-disable-next-line no-console\n console.warn(\n `Unsupported locale value was provided: '${locale}', defaulting to '${DEFAULT_LOCALE}'`,\n );\n\n intlConfig = { locale: DEFAULT_LOCALE, messages: { ...en, ...messages } };\n } else {\n intlConfig = { locale: adjustedLocale, messages };\n }\n\n return (\n <DirectionProvider direction={getDirectionFromLocale(locale)}>\n <IntlProvider\n defaultLocale={DEFAULT_LOCALE}\n locale={intlConfig.locale}\n messages={intlConfig.messages}\n defaultRichTextElements={defaultRichTextElements}\n >\n {children}\n </IntlProvider>\n </DirectionProvider>\n );\n}\n"],"names":["Provider","i18n","children","locale","messages","defaultRichTextElements","adjustedLocale","adjustLocale","intlConfig","console","warn","DEFAULT_LOCALE","en","_jsx","DirectionProvider","direction","getDirectionFromLocale","IntlProvider","defaultLocale"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Provider.mjs","sources":["../../src/Provider/Provider.tsx"],"sourcesContent":["import { IntlProvider, ResolvedIntlConfig } from 'react-intl';\n\nimport { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common/Locale';\nimport en from '../i18n/en.json';\n\nimport { DirectionProvider } from './Direction';\n\nexport interface ProviderProps {\n i18n: Pick<ResolvedIntlConfig, 'locale' | 'messages'> &\n Partial<Pick<ResolvedIntlConfig, 'defaultRichTextElements'>>;\n children?: React.ReactNode;\n}\n\nexport default function Provider({ i18n, children }: ProviderProps) {\n const { locale, messages, defaultRichTextElements } = i18n;\n const adjustedLocale = adjustLocale(locale);\n let intlConfig;\n\n if (adjustedLocale === null) {\n // eslint-disable-next-line no-console\n console.warn(\n `Unsupported locale value was provided: '${locale}', defaulting to '${DEFAULT_LOCALE}'`,\n );\n\n intlConfig = { locale: DEFAULT_LOCALE, messages: { ...en, ...messages } };\n } else {\n intlConfig = { locale: adjustedLocale, messages };\n }\n\n return (\n <DirectionProvider direction={getDirectionFromLocale(locale)}>\n <IntlProvider\n defaultLocale={DEFAULT_LOCALE}\n locale={intlConfig.locale}\n messages={intlConfig.messages}\n defaultRichTextElements={defaultRichTextElements}\n >\n {children}\n </IntlProvider>\n </DirectionProvider>\n );\n}\n"],"names":["Provider","i18n","children","locale","messages","defaultRichTextElements","adjustedLocale","adjustLocale","intlConfig","console","warn","DEFAULT_LOCALE","en","_jsx","DirectionProvider","direction","getDirectionFromLocale","IntlProvider","defaultLocale"],"mappings":";;;;;;AAac,SAAUA,QAAQA,CAAC;EAAEC,IAAI;AAAEC,EAAAA;AAAQ,CAAiB,EAAA;EAChE,MAAM;IAAEC,MAAM;IAAEC,QAAQ;AAAEC,IAAAA;AAAuB,GAAE,GAAGJ,IAAI;AAC1D,EAAA,MAAMK,cAAc,GAAGC,YAAY,CAACJ,MAAM,CAAC;AAC3C,EAAA,IAAIK,UAAU;EAEd,IAAIF,cAAc,KAAK,IAAI,EAAE;AAC3B;IACAG,OAAO,CAACC,IAAI,CACV,CAAA,wCAAA,EAA2CP,MAAM,CAAA,kBAAA,EAAqBQ,cAAc,GAAG,CACxF;AAEDH,IAAAA,UAAU,GAAG;AAAEL,MAAAA,MAAM,EAAEQ,cAAc;AAAEP,MAAAA,QAAQ,EAAE;AAAE,QAAA,GAAGQ,EAAE;QAAE,GAAGR;AAAQ;KAAI;AAC3E,EAAA,CAAC,MAAM;AACLI,IAAAA,UAAU,GAAG;AAAEL,MAAAA,MAAM,EAAEG,cAAc;AAAEF,MAAAA;KAAU;AACnD,EAAA;EAEA,oBACES,GAAA,CAACC,iBAAiB,EAAA;AAACC,IAAAA,SAAS,EAAEC,sBAAsB,CAACb,MAAM,CAAE;IAAAD,QAAA,eAC3DW,GAAA,CAACI,YAAY,EAAA;AACXC,MAAAA,aAAa,EAAEP,cAAe;MAC9BR,MAAM,EAAEK,UAAU,CAACL,MAAO;MAC1BC,QAAQ,EAAEI,UAAU,CAACJ,QAAS;AAC9BC,MAAAA,uBAAuB,EAAEA,uBAAwB;AAAAH,MAAAA,QAAA,EAEhDA;KACW;AAChB,GAAmB,CAAC;AAExB;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IntlProvider, ResolvedIntlConfig } from 'react-intl';
|
|
2
2
|
|
|
3
|
-
import { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common';
|
|
3
|
+
import { adjustLocale, DEFAULT_LOCALE, getDirectionFromLocale } from '../common/Locale';
|
|
4
4
|
import en from '../i18n/en.json';
|
|
5
5
|
|
|
6
6
|
import { DirectionProvider } from './Direction';
|