@transferwise/components 46.18.0 → 46.19.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/index.esm.js +12 -24
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -24
- package/build/index.js.map +1 -1
- package/build/types/actionButton/ActionButton.d.ts +1 -1
- package/build/types/circularButton/CircularButton.d.ts +16 -20
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/circularButton/index.d.ts +2 -1
- package/build/types/circularButton/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/phoneNumberInput/PhoneNumberInput.d.ts +2 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +1 -1
- package/package.json +1 -1
- package/src/circularButton/{CircularButton.story.js → CircularButton.story.tsx} +2 -2
- package/src/circularButton/CircularButton.tsx +51 -0
- package/src/circularButton/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/phoneNumberInput/PhoneNumberInput.rtl.spec.tsx +22 -0
- package/src/phoneNumberInput/PhoneNumberInput.tsx +3 -1
- package/src/summary/Summary.tsx +7 -1
- package/src/typeahead/Typeahead.spec.js +9 -0
- package/src/typeahead/Typeahead.tsx +1 -1
- package/src/typeahead/typeaheadInput/TypeaheadInput.tsx +3 -3
- package/src/circularButton/CircularButton.js +0 -57
- package/src/circularButton/index.js +0 -1
- /package/src/circularButton/{CircularButton.spec.js → CircularButton.spec.tsx} +0 -0
- /package/src/circularButton/__snapshots__/{CircularButton.spec.js.snap → CircularButton.spec.tsx.snap} +0 -0
package/build/index.esm.js
CHANGED
|
@@ -2656,16 +2656,16 @@ const CircularButton = ({
|
|
|
2656
2656
|
children,
|
|
2657
2657
|
disabled,
|
|
2658
2658
|
icon,
|
|
2659
|
-
priority,
|
|
2660
|
-
type,
|
|
2659
|
+
priority = Priority.PRIMARY,
|
|
2660
|
+
type = ControlType.ACCENT,
|
|
2661
2661
|
...rest
|
|
2662
2662
|
}) => {
|
|
2663
2663
|
const classes = classNames('btn np-btn', typeClassMap$1[type], priorityClassMap[priority]);
|
|
2664
|
-
const iconElement = icon.props.size !== 24 ? /*#__PURE__*/cloneElement(icon, {
|
|
2664
|
+
const iconElement = Number(icon.props.size) !== 24 ? /*#__PURE__*/cloneElement(icon, {
|
|
2665
2665
|
size: 24
|
|
2666
2666
|
}) : icon;
|
|
2667
2667
|
return /*#__PURE__*/jsxs("label", {
|
|
2668
|
-
className: classNames('np-circular-btn', priority, type, disabled
|
|
2668
|
+
className: classNames('np-circular-btn', priority, type, disabled && 'disabled', className),
|
|
2669
2669
|
children: [/*#__PURE__*/jsx("input", {
|
|
2670
2670
|
type: "button",
|
|
2671
2671
|
"aria-label": children,
|
|
@@ -2680,22 +2680,6 @@ const CircularButton = ({
|
|
|
2680
2680
|
})]
|
|
2681
2681
|
});
|
|
2682
2682
|
};
|
|
2683
|
-
CircularButton.propTypes = {
|
|
2684
|
-
className: PropTypes.string,
|
|
2685
|
-
children: PropTypes.string.isRequired,
|
|
2686
|
-
disabled: PropTypes.bool,
|
|
2687
|
-
icon: PropTypes.element.isRequired,
|
|
2688
|
-
onClick: PropTypes.func,
|
|
2689
|
-
priority: PropTypes.oneOf(['primary', 'secondary']),
|
|
2690
|
-
type: PropTypes.oneOf(['accent', 'positive', 'negative'])
|
|
2691
|
-
};
|
|
2692
|
-
CircularButton.defaultProps = {
|
|
2693
|
-
className: undefined,
|
|
2694
|
-
disabled: false,
|
|
2695
|
-
priority: Priority.PRIMARY,
|
|
2696
|
-
type: ControlType.ACCENT
|
|
2697
|
-
};
|
|
2698
|
-
var CircularButton$1 = CircularButton;
|
|
2699
2683
|
|
|
2700
2684
|
function getDayNames(locale, format = 'short') {
|
|
2701
2685
|
const days = [];
|
|
@@ -9402,6 +9386,7 @@ const defaultSelectProps = {};
|
|
|
9402
9386
|
const defaultDisabledCountries = [];
|
|
9403
9387
|
const PhoneNumberInput = ({
|
|
9404
9388
|
id,
|
|
9389
|
+
'aria-labelledby': ariaLabelledBy,
|
|
9405
9390
|
required,
|
|
9406
9391
|
disabled,
|
|
9407
9392
|
initialValue,
|
|
@@ -9464,6 +9449,7 @@ const PhoneNumberInput = ({
|
|
|
9464
9449
|
setBroadcastedValue(internalValue);
|
|
9465
9450
|
}, [onChange, broadcastedValue, internalValue]);
|
|
9466
9451
|
return /*#__PURE__*/jsxs("div", {
|
|
9452
|
+
"aria-labelledby": ariaLabelledBy,
|
|
9467
9453
|
className: "tw-telephone",
|
|
9468
9454
|
children: [/*#__PURE__*/jsx("div", {
|
|
9469
9455
|
className: "tw-telephone__country-select",
|
|
@@ -11090,6 +11076,8 @@ const Summary = ({
|
|
|
11090
11076
|
className: "np-summary__title d-flex",
|
|
11091
11077
|
children: [/*#__PURE__*/jsx(Body, {
|
|
11092
11078
|
as: "span",
|
|
11079
|
+
role: "heading",
|
|
11080
|
+
"aria-level": 4,
|
|
11093
11081
|
type: Typography.BODY_LARGE_BOLD,
|
|
11094
11082
|
className: "text-primary m-b-1",
|
|
11095
11083
|
children: title
|
|
@@ -11953,7 +11941,7 @@ class TypeaheadInput extends Component {
|
|
|
11953
11941
|
autoFocus,
|
|
11954
11942
|
multiple,
|
|
11955
11943
|
name,
|
|
11956
|
-
|
|
11944
|
+
dropdownOpen,
|
|
11957
11945
|
placeholder,
|
|
11958
11946
|
selected,
|
|
11959
11947
|
value,
|
|
@@ -11975,7 +11963,7 @@ class TypeaheadInput extends Component {
|
|
|
11975
11963
|
autoFocus: autoFocus,
|
|
11976
11964
|
placeholder: hasPlaceholder ? placeholder : '',
|
|
11977
11965
|
"aria-autocomplete": "list",
|
|
11978
|
-
"aria-expanded":
|
|
11966
|
+
"aria-expanded": dropdownOpen,
|
|
11979
11967
|
"aria-haspopup": "listbox",
|
|
11980
11968
|
"aria-controls": `menu-${typeaheadId}`,
|
|
11981
11969
|
autoComplete: autoComplete,
|
|
@@ -12477,7 +12465,7 @@ class Typeahead extends Component {
|
|
|
12477
12465
|
}), /*#__PURE__*/jsx(TypeaheadInput, {
|
|
12478
12466
|
autoFocus,
|
|
12479
12467
|
multiple,
|
|
12480
|
-
|
|
12468
|
+
dropdownOpen,
|
|
12481
12469
|
placeholder,
|
|
12482
12470
|
selected,
|
|
12483
12471
|
maxHeight,
|
|
@@ -15129,5 +15117,5 @@ const translations = {
|
|
|
15129
15117
|
'zh-HK': zhHK
|
|
15130
15118
|
};
|
|
15131
15119
|
|
|
15132
|
-
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
|
|
15120
|
+
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$2 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$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
15133
15121
|
//# sourceMappingURL=index.esm.js.map
|