@transferwise/components 0.0.0-experimental-7627eab → 0.0.0-experimental-6aefd21
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/index.esm.js +21 -6
- package/build/index.esm.js.map +1 -1
- package/build/index.js +22 -8
- package/build/index.js.map +1 -1
- package/build/types/emphasis/Emphasis.d.ts +1 -1
- package/build/types/emphasis/Emphasis.d.ts.map +1 -1
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +1 -1
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts.map +1 -1
- package/build/types/emphasis/index.d.ts +0 -1
- package/build/types/emphasis/index.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -5
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts +3 -3
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/loader/index.d.ts +2 -2
- package/build/types/loader/index.d.ts.map +1 -1
- package/build/types/money/Money.d.ts +11 -8
- package/build/types/money/Money.d.ts.map +1 -1
- package/build/types/money/index.d.ts +1 -2
- package/build/types/money/index.d.ts.map +1 -1
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts +10 -7
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
- package/build/types/navigationOptionsList/index.d.ts +1 -2
- package/build/types/navigationOptionsList/index.d.ts.map +1 -1
- package/build/types/slidingPanel/SlidingPanel.d.ts.map +1 -1
- package/package.json +1 -2
- package/src/avatar/{Avatar.spec.tsx → Avatar.spec.js} +13 -6
- package/src/emphasis/{Emphasis.spec.tsx → Emphasis.spec.js} +1 -2
- package/src/emphasis/Emphasis.tsx +1 -1
- package/src/emphasis/{EmphasisHtmlTransformer.spec.tsx → EmphasisHtmlTransformer.spec.js} +12 -0
- package/src/emphasis/EmphasisHtmlTransformer.ts +1 -1
- package/src/emphasis/index.ts +0 -1
- package/src/index.ts +0 -5
- package/src/inputs/SelectInput.tsx +5 -3
- package/src/loader/Loader.tsx +3 -3
- package/src/loader/index.js +3 -0
- package/src/money/{Money.tsx → Money.js} +7 -6
- package/src/money/{Money.spec.tsx → Money.spec.js} +1 -1
- package/src/money/index.js +1 -0
- package/src/navigationOptionsList/NavigationOptionsList.js +20 -0
- package/src/navigationOptionsList/index.js +1 -0
- package/src/slidingPanel/SlidingPanel.tsx +9 -3
- package/src/loader/index.ts +0 -2
- package/src/money/index.ts +0 -2
- package/src/navigationOptionsList/NavigationOptionsList.tsx +0 -20
- package/src/navigationOptionsList/index.ts +0 -2
- /package/src/loader/{Loader.spec.tsx → Loader.spec.js} +0 -0
- /package/src/navigationOptionsList/{NavigationOptionsList.spec.tsx → NavigationOptionsList.spec.js} +0 -0
- /package/src/navigationOptionsList/{NavigationOptionsList.story.tsx → NavigationOptionsList.story.js} +0 -0
package/build/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import React__default, { forwardRef, cloneElement, useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, createContext, useContext, createElement, Component, PureComponent, createRef, isValidElement, Children, Fragment as Fragment$1 } from 'react';
|
|
4
|
+
import React__default, { forwardRef, cloneElement, useState, useRef, useMemo, useEffect, useCallback, useLayoutEffect, createContext, useContext, useImperativeHandle, createElement, Component, PureComponent, createRef, isValidElement, Children, Fragment as Fragment$1 } from 'react';
|
|
5
5
|
import { useId } from '@radix-ui/react-id';
|
|
6
6
|
import { ChevronUp, CrossCircleFill, Cross, NavigateAway, Check, Info as Info$1, Alert as Alert$2, ClockBorderless, CheckCircle, InfoCircle, Warning, CrossCircle, Clock, Briefcase, Person, ArrowLeft, QuestionMarkCircle, AlertCircle, Search, ChevronDown, CheckCircleFill, ArrowRight, Download, ClockFill, Upload as Upload$2, Document, Plus, PlusCircle, AlertCircleFill } from '@transferwise/icons';
|
|
7
7
|
import { defineMessages, useIntl, injectIntl, IntlProvider } from 'react-intl';
|
|
@@ -10,7 +10,6 @@ import { useTheme, ThemeProvider } from '@wise/components-theming';
|
|
|
10
10
|
import { formatDate, formatNumber, formatMoney, formatAmount } from '@transferwise/formatting';
|
|
11
11
|
import { Transition, Listbox } from '@headlessui/react';
|
|
12
12
|
import mergeProps from 'merge-props';
|
|
13
|
-
import mergeRefs from 'react-merge-refs';
|
|
14
13
|
import { useSyncExternalStore } from 'use-sync-external-store/shim';
|
|
15
14
|
import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager, offset, flip, shift, size, autoUpdate } from '@floating-ui/react';
|
|
16
15
|
import { FocusScope } from '@react-aria/focus';
|
|
@@ -1762,6 +1761,9 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
|
|
|
1762
1761
|
...rest
|
|
1763
1762
|
}, reference) => {
|
|
1764
1763
|
const localReference = useRef(null);
|
|
1764
|
+
useImperativeHandle(reference, () =>
|
|
1765
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1766
|
+
localReference.current, []);
|
|
1765
1767
|
return /*#__PURE__*/createElement(CSSTransition, {
|
|
1766
1768
|
...rest,
|
|
1767
1769
|
key: `sliding-panel--open-${position}`,
|
|
@@ -1777,7 +1779,7 @@ const SlidingPanel = /*#__PURE__*/forwardRef(({
|
|
|
1777
1779
|
appear: true,
|
|
1778
1780
|
unmountOnExit: true
|
|
1779
1781
|
}, /*#__PURE__*/jsx("div", {
|
|
1780
|
-
ref:
|
|
1782
|
+
ref: localReference,
|
|
1781
1783
|
className: classNames('sliding-panel', `sliding-panel--open-${position}`, showSlidingPanelBorder && `sliding-panel--border-${position}`, slidingPanelPositionFixed && 'sliding-panel--fixed', className),
|
|
1782
1784
|
children: children
|
|
1783
1785
|
}));
|
|
@@ -6569,7 +6571,10 @@ function SelectInput({
|
|
|
6569
6571
|
}) => /*#__PURE__*/jsx(SelectInputTriggerButtonPropsContext.Provider, {
|
|
6570
6572
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
6571
6573
|
value: {
|
|
6572
|
-
ref:
|
|
6574
|
+
ref: node => {
|
|
6575
|
+
ref(node);
|
|
6576
|
+
triggerRef.current = node;
|
|
6577
|
+
},
|
|
6573
6578
|
id,
|
|
6574
6579
|
...mergeProps({
|
|
6575
6580
|
onClick: () => {
|
|
@@ -7410,6 +7415,7 @@ const getSupportedSize = size => {
|
|
|
7410
7415
|
return Size.MEDIUM;
|
|
7411
7416
|
}
|
|
7412
7417
|
};
|
|
7418
|
+
var Loader$1 = Loader;
|
|
7413
7419
|
|
|
7414
7420
|
const Money = ({
|
|
7415
7421
|
amount,
|
|
@@ -7422,6 +7428,11 @@ const Money = ({
|
|
|
7422
7428
|
children: formatMoney(amount, currency, locale)
|
|
7423
7429
|
});
|
|
7424
7430
|
};
|
|
7431
|
+
Money.propTypes = {
|
|
7432
|
+
amount: PropTypes.number.isRequired,
|
|
7433
|
+
currency: PropTypes.string.isRequired
|
|
7434
|
+
};
|
|
7435
|
+
var Money$1 = Money;
|
|
7425
7436
|
|
|
7426
7437
|
var messages$4 = defineMessages({
|
|
7427
7438
|
selectPlaceholder: {
|
|
@@ -7839,9 +7850,13 @@ const NavigationOptionList = ({
|
|
|
7839
7850
|
children: Children.map(children, child => /*#__PURE__*/jsx("li", {
|
|
7840
7851
|
className: "np-navigation-options-list__item",
|
|
7841
7852
|
children: child
|
|
7842
|
-
}, child
|
|
7853
|
+
}, child.key))
|
|
7843
7854
|
});
|
|
7844
7855
|
};
|
|
7856
|
+
NavigationOptionList.propTypes = {
|
|
7857
|
+
children: PropTypes.node.isRequired
|
|
7858
|
+
};
|
|
7859
|
+
var NavigationOptionList$1 = NavigationOptionList;
|
|
7845
7860
|
|
|
7846
7861
|
const STORAGE_NAME = 'dismissedNudges';
|
|
7847
7862
|
const getLocalStorage = () => {
|
|
@@ -15079,5 +15094,5 @@ const translations = {
|
|
|
15079
15094
|
'zh-HK': zhHK
|
|
15080
15095
|
};
|
|
15081
15096
|
|
|
15082
|
-
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, Logo$1 as Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio, RadioGroup, RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
15097
|
+
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money$1 as Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList$1 as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio, RadioGroup, RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
15083
15098
|
//# sourceMappingURL=index.esm.js.map
|