@transferwise/components 0.0.0-experimental-ef26b66 → 0.0.0-experimental-d576f44
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.js +22 -42
- package/build/index.js.map +1 -1
- package/build/index.mjs +22 -42
- package/build/index.mjs.map +1 -1
- package/build/types/flowNavigation/backButton/BackButton.d.ts +5 -17
- package/build/types/flowNavigation/backButton/BackButton.d.ts.map +1 -1
- package/build/types/flowNavigation/backButton/index.d.ts +2 -2
- package/build/types/flowNavigation/backButton/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/info/Info.d.ts +2 -2
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/info/index.d.ts +1 -1
- package/build/types/info/index.d.ts.map +1 -1
- package/build/types/overlayHeader/OverlayHeader.d.ts +9 -18
- package/build/types/overlayHeader/OverlayHeader.d.ts.map +1 -1
- package/build/types/overlayHeader/index.d.ts +2 -1
- package/build/types/overlayHeader/index.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/alert/Alert.story.tsx +5 -6
- package/src/chips/Chips.story.tsx +3 -5
- package/src/common/card/Card.story.tsx +0 -1
- package/src/dateInput/DateInput.story.tsx +16 -21
- package/src/dateLookup/DateLookup.tests.story.tsx +2 -4
- package/src/flowNavigation/backButton/BackButton.tsx +29 -0
- package/src/flowNavigation/backButton/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/info/Info.story.tsx +9 -15
- package/src/info/Info.tsx +2 -2
- package/src/info/index.ts +1 -1
- package/src/moneyInput/MoneyInput.story.tsx +4 -1
- package/src/overlayHeader/{OverlayHeader.spec.js → OverlayHeader.spec.tsx} +1 -1
- package/src/overlayHeader/{OverlayHeader.story.js → OverlayHeader.story.tsx} +10 -2
- package/src/overlayHeader/{OverlayHeader.js → OverlayHeader.tsx} +12 -19
- package/src/overlayHeader/index.ts +2 -0
- package/src/phoneNumberInput/PhoneNumberInput.story.tsx +0 -1
- package/src/uploadInput/UploadInput.story.tsx +21 -23
- package/src/flowNavigation/backButton/BackButton.js +0 -32
- package/src/flowNavigation/backButton/BackButton.spec.js +0 -16
- package/src/flowNavigation/backButton/__snapshots__/BackButton.spec.js.snap +0 -37
- package/src/flowNavigation/backButton/index.js +0 -3
- package/src/overlayHeader/index.js +0 -1
- /package/src/overlayHeader/__snapshots__/{OverlayHeader.spec.js.snap → OverlayHeader.spec.tsx.snap} +0 -0
package/build/index.mjs
CHANGED
|
@@ -16,8 +16,8 @@ import mergeProps from 'merge-props';
|
|
|
16
16
|
import { useFloating, useDismiss, useRole, useInteractions, FloatingPortal, FloatingFocusManager, offset, flip, shift, size, autoUpdate } from '@floating-ui/react';
|
|
17
17
|
import { usePreventScroll } from '@react-aria/overlays';
|
|
18
18
|
import { usePopper } from 'react-popper';
|
|
19
|
-
import PropTypes from 'prop-types';
|
|
20
19
|
import { Flag, Illustration } from '@wise/art';
|
|
20
|
+
import PropTypes from 'prop-types';
|
|
21
21
|
import clamp$2 from 'lodash.clamp';
|
|
22
22
|
import debounce from 'lodash.debounce';
|
|
23
23
|
import { Spring, animated } from '@react-spring/web';
|
|
@@ -5301,33 +5301,25 @@ const AnimatedLabel = ({
|
|
|
5301
5301
|
});
|
|
5302
5302
|
};
|
|
5303
5303
|
|
|
5304
|
-
|
|
5304
|
+
function BackButton({
|
|
5305
5305
|
className,
|
|
5306
5306
|
onClick,
|
|
5307
5307
|
'aria-label': ariaLabel
|
|
5308
|
-
})
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5308
|
+
}) {
|
|
5309
|
+
return /*#__PURE__*/jsx(Avatar, {
|
|
5310
|
+
type: AvatarType.ICON,
|
|
5311
|
+
size: 40,
|
|
5312
|
+
children: /*#__PURE__*/jsx("button", {
|
|
5313
|
+
type: "button",
|
|
5314
|
+
"aria-label": ariaLabel,
|
|
5315
|
+
className: classNames('np-back-button', 'btn-unstyled', className),
|
|
5316
|
+
onClick: onClick,
|
|
5317
|
+
children: /*#__PURE__*/jsx(ArrowLeft, {
|
|
5318
|
+
size: 24
|
|
5319
|
+
})
|
|
5318
5320
|
})
|
|
5319
|
-
})
|
|
5320
|
-
}
|
|
5321
|
-
BackButton.propTypes = {
|
|
5322
|
-
'aria-label': PropTypes.string.isRequired,
|
|
5323
|
-
className: PropTypes.string,
|
|
5324
|
-
label: PropTypes.element,
|
|
5325
|
-
onClick: PropTypes.func
|
|
5326
|
-
};
|
|
5327
|
-
BackButton.defaultProps = {
|
|
5328
|
-
className: undefined,
|
|
5329
|
-
label: undefined
|
|
5330
|
-
};
|
|
5321
|
+
});
|
|
5322
|
+
}
|
|
5331
5323
|
|
|
5332
5324
|
const FlowNavigation = ({
|
|
5333
5325
|
activeStep = 0,
|
|
@@ -7734,11 +7726,12 @@ const Nudge = ({
|
|
|
7734
7726
|
});
|
|
7735
7727
|
};
|
|
7736
7728
|
|
|
7737
|
-
const
|
|
7729
|
+
const defaultLogo = /*#__PURE__*/jsx(Logo, {});
|
|
7730
|
+
function OverlayHeader({
|
|
7738
7731
|
avatar,
|
|
7739
7732
|
onClose,
|
|
7740
|
-
logo
|
|
7741
|
-
})
|
|
7733
|
+
logo = defaultLogo
|
|
7734
|
+
}) {
|
|
7742
7735
|
const closeButton = onClose && /*#__PURE__*/jsx(CloseButton, {
|
|
7743
7736
|
size: Size.LARGE,
|
|
7744
7737
|
onClick: onClose
|
|
@@ -7756,20 +7749,7 @@ const OverlayHeader = ({
|
|
|
7756
7749
|
})
|
|
7757
7750
|
})
|
|
7758
7751
|
});
|
|
7759
|
-
}
|
|
7760
|
-
OverlayHeader.defaultProps = {
|
|
7761
|
-
avatar: null,
|
|
7762
|
-
logo: /*#__PURE__*/jsx(Logo, {}),
|
|
7763
|
-
onClose: null
|
|
7764
|
-
};
|
|
7765
|
-
OverlayHeader.propTypes = {
|
|
7766
|
-
/** An Avatar */
|
|
7767
|
-
avatar: PropTypes.element,
|
|
7768
|
-
logo: PropTypes.node,
|
|
7769
|
-
/** Function called when the close is clicked */
|
|
7770
|
-
onClose: PropTypes.func
|
|
7771
|
-
};
|
|
7772
|
-
var OverlayHeader$1 = OverlayHeader;
|
|
7752
|
+
}
|
|
7773
7753
|
|
|
7774
7754
|
var messages$3 = defineMessages({
|
|
7775
7755
|
selectInputPlaceholder: {
|
|
@@ -14589,5 +14569,5 @@ const translations = {
|
|
|
14589
14569
|
'zh-HK': zhHK
|
|
14590
14570
|
};
|
|
14591
14571
|
|
|
14592
|
-
export { Accordion, ActionButton, ActionOption, Alert, AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card$1 as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card, Carousel, Checkbox, CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer, DropFade, Emphasis, Field, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, Label, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader
|
|
14572
|
+
export { Accordion, ActionButton, ActionOption, Alert, AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card$1 as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card, Carousel, Checkbox, CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput, DateLookup$1 as DateLookup, DateMode, Decision, DecisionPresentation, DecisionType, DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer, DropFade, Emphasis, Field, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList, Label, LanguageProvider, Layout, Link, ListItem$1 as ListItem, Loader, Logo, LogoType, Markdown, MarkdownNodeType, Modal, Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader, PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCardGroup$1 as PromoCardGroup, 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$1 as Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
14593
14573
|
//# sourceMappingURL=index.mjs.map
|