@transferwise/components 0.0.0-experimental-0e3fbf6 → 0.0.0-experimental-44982e0
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 +8 -24
- package/build/index.esm.js.map +1 -1
- package/build/index.js +8 -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/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 +0 -7
- package/src/typeahead/Typeahead.spec.js +0 -9
- 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 = [];
|
|
@@ -11955,7 +11939,7 @@ class TypeaheadInput extends Component {
|
|
|
11955
11939
|
autoFocus,
|
|
11956
11940
|
multiple,
|
|
11957
11941
|
name,
|
|
11958
|
-
|
|
11942
|
+
optionsShown,
|
|
11959
11943
|
placeholder,
|
|
11960
11944
|
selected,
|
|
11961
11945
|
value,
|
|
@@ -11977,7 +11961,7 @@ class TypeaheadInput extends Component {
|
|
|
11977
11961
|
autoFocus: autoFocus,
|
|
11978
11962
|
placeholder: hasPlaceholder ? placeholder : '',
|
|
11979
11963
|
"aria-autocomplete": "list",
|
|
11980
|
-
"aria-expanded":
|
|
11964
|
+
"aria-expanded": optionsShown,
|
|
11981
11965
|
"aria-haspopup": "listbox",
|
|
11982
11966
|
"aria-controls": `menu-${typeaheadId}`,
|
|
11983
11967
|
autoComplete: autoComplete,
|
|
@@ -12479,7 +12463,7 @@ class Typeahead extends Component {
|
|
|
12479
12463
|
}), /*#__PURE__*/jsx(TypeaheadInput, {
|
|
12480
12464
|
autoFocus,
|
|
12481
12465
|
multiple,
|
|
12482
|
-
|
|
12466
|
+
optionsShown,
|
|
12483
12467
|
placeholder,
|
|
12484
12468
|
selected,
|
|
12485
12469
|
maxHeight,
|
|
@@ -15131,5 +15115,5 @@ const translations = {
|
|
|
15131
15115
|
'zh-HK': zhHK
|
|
15132
15116
|
};
|
|
15133
15117
|
|
|
15134
|
-
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
|
|
15118
|
+
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 };
|
|
15135
15119
|
//# sourceMappingURL=index.esm.js.map
|