@transferwise/components 0.0.0-experimental-5e2f01a → 0.0.0-experimental-d8ad171
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/es/no-polyfill/accordion/Accordion.js +1 -1
- package/build/es/no-polyfill/accordion/Accordion.story.js +1 -1
- package/build/es/no-polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
- package/build/es/no-polyfill/actionButton/ActionButton.js +1 -1
- package/build/es/no-polyfill/actionButton/ActionButton.spec.js +1 -1
- package/build/es/no-polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/no-polyfill/actionOption/ActionOption.js +1 -1
- package/build/es/no-polyfill/actionOption/ActionOption.story.js +1 -1
- package/build/es/no-polyfill/alert/Alert.js +1 -1
- package/build/es/no-polyfill/alert/Alert.story.js +1 -1
- package/build/es/no-polyfill/alert/inlineMarkdown/InlineMarkdown.js +1 -1
- package/build/es/no-polyfill/alert/withArrow/alertArrowPositions.js +1 -1
- package/build/es/no-polyfill/alert/withArrow/withArrow.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/no-polyfill/avatar/avatarTypes.js +1 -1
- package/build/es/no-polyfill/avatar/colors/colors.js +2 -2
- package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.story.js +1 -1
- package/build/es/no-polyfill/badge/Badge.js +1 -1
- package/build/es/no-polyfill/body/Body.js +2 -2
- package/build/es/no-polyfill/body/Body.spec.js +1 -1
- package/build/es/no-polyfill/body/Body.story.js +1 -1
- package/build/es/no-polyfill/button/Button.js +5 -5
- package/build/es/no-polyfill/button/Button.story.js +1 -1
- package/build/es/no-polyfill/button/classMap.js +1 -1
- package/build/es/no-polyfill/button/legacyUtils/legacyUtils.js +2 -2
- package/build/es/no-polyfill/card/Card.js +1 -1
- package/build/es/no-polyfill/checkbox/Checkbox.js +1 -1
- package/build/es/no-polyfill/checkbox/Checkbox.story.js +1 -1
- package/build/es/no-polyfill/checkboxButton/CheckboxButton.js +1 -1
- package/build/es/no-polyfill/checkboxButton/CheckboxButton.spec.js +1 -1
- package/build/es/no-polyfill/checkboxButton/CheckboxButton.story.js +1 -1
- package/build/es/no-polyfill/checkboxOption/CheckboxOption.js +1 -1
- package/build/es/no-polyfill/checkboxOption/CheckboxOption.spec.js +1 -1
- package/build/es/no-polyfill/checkboxOption/CheckboxOption.story.js +1 -1
- package/build/es/no-polyfill/chevron/Chevron.js +1 -1
- package/build/es/no-polyfill/chevron/Chevron.story.js +1 -1
- package/build/es/no-polyfill/chips/Chip.js +1 -1
- package/build/es/no-polyfill/chips/Chips.js +1 -1
- package/build/es/no-polyfill/chips/Chips.spec.js +1 -1
- package/build/es/no-polyfill/chips/Chips.story.js +1 -1
- package/build/es/no-polyfill/circularButton/CircularButton.js +1 -1
- package/build/es/no-polyfill/common/DOMOperations/DOMOperations.js +3 -3
- package/build/es/no-polyfill/common/Option/Option.js +1 -1
- package/build/es/no-polyfill/common/RadioButton/RadioButton.js +1 -1
- package/build/es/no-polyfill/common/bottomSheet/BottomSheet.js +4 -4
- package/build/es/no-polyfill/common/bottomSheet/BottomSheet.spec.js +1 -1
- package/build/es/no-polyfill/common/bottomSheet/BottomSheet.story.js +2 -2
- package/build/es/no-polyfill/common/closeButton/CloseButton.js +1 -1
- package/build/es/no-polyfill/common/dateUtils/getDayNames/getDayNames.js +2 -2
- package/build/es/no-polyfill/common/dateUtils/getMonthNames/getMonthNames.js +1 -1
- package/build/es/no-polyfill/common/dateUtils/isDateValid/isDateValid.js +1 -1
- package/build/es/no-polyfill/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +1 -1
- package/build/es/no-polyfill/common/deviceDetection/deviceDetection.js +1 -1
- package/build/es/no-polyfill/common/direction.js +1 -1
- package/build/es/no-polyfill/common/domHelpers/index.js +1 -1
- package/build/es/no-polyfill/common/fakeEvents.js +1 -1
- package/build/es/no-polyfill/common/fileType.js +1 -1
- package/build/es/no-polyfill/common/flowHeader/FlowHeader.js +1 -1
- package/build/es/no-polyfill/common/focusBoundary/FocusBoundary.js +1 -1
- package/build/es/no-polyfill/common/focusBoundary/FocusBoundary.spec.js +1 -1
- package/build/es/no-polyfill/common/focusBoundary/utils/getFocusableElements.js +2 -2
- package/build/es/no-polyfill/common/focusBoundary/utils/resetFocus.js +1 -1
- package/build/es/no-polyfill/common/historyNavigator/historyNavigator.js +1 -1
- package/build/es/no-polyfill/common/hooks/useClientWidth/useClientWidth.js +3 -3
- package/build/es/no-polyfill/common/hooks/useConditionalListener/useConditionalListener.js +1 -1
- package/build/es/no-polyfill/common/hooks/useDirection/useDirection.js +1 -1
- package/build/es/no-polyfill/common/hooks/useHasIntersected/useHasIntersected.js +2 -2
- package/build/es/no-polyfill/common/hooks/useLayout/useLayout.js +1 -1
- package/build/es/no-polyfill/common/key.js +1 -1
- package/build/es/no-polyfill/common/locale/index.js +7 -7
- package/build/es/no-polyfill/common/panel/Panel.js +6 -6
- package/build/es/no-polyfill/common/propsValues/breakpoint.js +1 -1
- package/build/es/no-polyfill/common/propsValues/control.js +1 -1
- package/build/es/no-polyfill/common/propsValues/dateMode.js +1 -1
- package/build/es/no-polyfill/common/propsValues/layouts.js +1 -1
- package/build/es/no-polyfill/common/propsValues/markdownNodeType.js +1 -1
- package/build/es/no-polyfill/common/propsValues/monthFormat.js +1 -1
- package/build/es/no-polyfill/common/propsValues/position.js +1 -1
- package/build/es/no-polyfill/common/propsValues/profileType.js +1 -1
- package/build/es/no-polyfill/common/propsValues/scroll.js +1 -1
- package/build/es/no-polyfill/common/propsValues/sentiment.js +1 -1
- package/build/es/no-polyfill/common/propsValues/size.js +1 -1
- package/build/es/no-polyfill/common/propsValues/status.js +1 -1
- package/build/es/no-polyfill/common/propsValues/type.js +1 -1
- package/build/es/no-polyfill/common/propsValues/typography.js +1 -1
- package/build/es/no-polyfill/common/propsValues/variant.js +1 -1
- package/build/es/no-polyfill/common/propsValues/width.js +1 -1
- package/build/es/no-polyfill/common/requirements.js +2 -2
- package/build/es/no-polyfill/common/responsivePanel/ResponsivePanel.js +1 -1
- package/build/es/no-polyfill/common/textFormat/formatWithPattern/formatWithPattern.js +2 -2
- package/build/es/no-polyfill/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +1 -1
- package/build/es/no-polyfill/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +1 -1
- package/build/es/no-polyfill/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +1 -1
- package/build/es/no-polyfill/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +1 -1
- package/build/es/no-polyfill/common/textFormat/unformatWithPattern/unformatWithPattern.js +1 -1
- package/build/es/no-polyfill/common/theme.js +1 -1
- package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.js +1 -1
- package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
- package/build/es/no-polyfill/dateInput/DateInput.js +4 -10
- package/build/es/no-polyfill/dateInput/DateInput.story.js +1 -1
- package/build/es/no-polyfill/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +1 -1
- package/build/es/no-polyfill/dateInput/utils/explodeDate/explodeDate.js +1 -1
- package/build/es/no-polyfill/dateLookup/DateLookup.js +3 -4
- package/build/es/no-polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
- package/build/es/no-polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/es/no-polyfill/dateLookup/dayCalendar/DayCalendar.js +1 -1
- package/build/es/no-polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -5
- package/build/es/no-polyfill/dateLookup/monthCalendar/MonthCalendar.js +1 -1
- package/build/es/no-polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
- package/build/es/no-polyfill/dateLookup/tableLink/TableLink.js +1 -1
- package/build/es/no-polyfill/dateLookup/yearCalendar/YearCalendar.js +1 -1
- package/build/es/no-polyfill/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -1
- package/build/es/no-polyfill/decision/Decision.js +5 -5
- package/build/es/no-polyfill/decision/decisionEnums.js +2 -2
- package/build/es/no-polyfill/definitionList/DefinitionList.js +1 -1
- package/build/es/no-polyfill/dimmer/Dimmer.js +3 -3
- package/build/es/no-polyfill/dimmer/Dimmer.story.js +2 -2
- package/build/es/no-polyfill/dimmer/dimmerManager/DimmerManager.js +3 -3
- package/build/es/no-polyfill/display/Display.js +1 -1
- package/build/es/no-polyfill/display/Display.story.js +2 -2
- package/build/es/no-polyfill/drawer/Drawer.js +1 -1
- package/build/es/no-polyfill/dropFade/DropFade.js +3 -3
- package/build/es/no-polyfill/dropFade/DropFade.story.js +1 -1
- package/build/es/no-polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
- package/build/es/no-polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +1 -1
- package/build/es/no-polyfill/dynamicFieldDefinitionList/utils/createDefinitions.js +2 -2
- package/build/es/no-polyfill/dynamicFieldDefinitionList/utils/text-format.js +1 -1
- package/build/es/no-polyfill/emphasis/Emphasis.js +2 -2
- package/build/es/no-polyfill/emphasis/EmphasisHtmlTransformer.js +2 -2
- package/build/es/no-polyfill/flowNavigation/FlowNavigation.js +2 -2
- package/build/es/no-polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -1
- package/build/es/no-polyfill/flowNavigation/backButton/BackButton.js +1 -1
- package/build/es/no-polyfill/header/Header.js +2 -2
- package/build/es/no-polyfill/header/Header.spec.js +1 -1
- package/build/es/no-polyfill/header/Header.story.js +2 -1
- package/build/es/no-polyfill/i18n/index.js +1 -1
- package/build/es/no-polyfill/image/Image.js +2 -2
- package/build/es/no-polyfill/info/Info.js +1 -1
- package/build/es/no-polyfill/info/Info.story.js +1 -1
- package/build/es/no-polyfill/info/infoPresentations.js +1 -1
- package/build/es/no-polyfill/inlineAlert/InlineAlert.js +1 -1
- package/build/es/no-polyfill/inputWithDisplayFormat/InputWithDisplayFormat.js +1 -1
- package/build/es/no-polyfill/inputs/Input.js +1 -1
- package/build/es/no-polyfill/inputs/TextArea.js +1 -1
- package/build/es/no-polyfill/inputs/_common.js +2 -2
- package/build/es/no-polyfill/instructionsList/InstructionsList.js +3 -3
- package/build/es/no-polyfill/link/Link.js +2 -2
- package/build/es/no-polyfill/link/Link.spec.js +1 -1
- package/build/es/no-polyfill/link/Link.story.js +1 -1
- package/build/es/no-polyfill/listItem/ListItem.js +1 -1
- package/build/es/no-polyfill/listItem/ListItem.spec.js +1 -1
- package/build/es/no-polyfill/listItem/ListItem.story.js +1 -1
- package/build/es/no-polyfill/loader/Loader.js +2 -2
- package/build/es/no-polyfill/loader/Loader.story.js +1 -1
- package/build/es/no-polyfill/logo/Logo.js +1 -1
- package/build/es/no-polyfill/logo/Logo.story.js +1 -1
- package/build/es/no-polyfill/logo/logoTypes.js +1 -1
- package/build/es/no-polyfill/markdown/Markdown.js +1 -1
- package/build/es/no-polyfill/modal/Modal.js +1 -1
- package/build/es/no-polyfill/modal/Modal.story.js +2 -2
- package/build/es/no-polyfill/money/Money.js +1 -1
- package/build/es/no-polyfill/money/Money.story.js +1 -1
- package/build/es/no-polyfill/moneyInput/MoneyInput.js +1 -1
- package/build/es/no-polyfill/moneyInput/MoneyInput.story.js +1 -1
- package/build/es/no-polyfill/moneyInput/currencyFormatting.js +2 -2
- package/build/es/no-polyfill/navigationOption/NavigationOption.js +1 -1
- package/build/es/no-polyfill/navigationOptionsList/NavigationOptionsList.js +1 -1
- package/build/es/no-polyfill/nudge/Nudge.js +1 -1
- package/build/es/no-polyfill/overlayHeader/OverlayHeader.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/data/countries.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/cleanNumber/cleanNumber.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +2 -2
- package/build/es/no-polyfill/phoneNumberInput/utils/explodeNumberModel/index.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/filterOptionsForQuery/index.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/findCountryByCode/index.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/isStringNumeric/isStringNumeric.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/longestMatchingPrefix/index.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/setDefaultPrefix/index.js +3 -3
- package/build/es/no-polyfill/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +2 -2
- package/build/es/no-polyfill/popover/Popover.js +2 -2
- package/build/es/no-polyfill/processIndicator/ProcessIndicator.js +4 -4
- package/build/es/no-polyfill/progress/Progress.js +1 -1
- package/build/es/no-polyfill/progress/Progress.story.js +1 -1
- package/build/es/no-polyfill/progressBar/ProgressBar.js +1 -1
- package/build/es/no-polyfill/progressBar/ProgressBar.story.js +1 -1
- package/build/es/no-polyfill/provider/Provider.js +1 -1
- package/build/es/no-polyfill/provider/Provider.spec.js +1 -1
- package/build/es/no-polyfill/provider/Provider.story.js +1 -1
- package/build/es/no-polyfill/provider/direction/DirectionProvider.js +1 -1
- package/build/es/no-polyfill/provider/direction/DirectionProvider.spec.js +1 -1
- package/build/es/no-polyfill/provider/language/LanguageProvider.js +1 -1
- package/build/es/no-polyfill/provider/language/LanguageProvider.spec.js +1 -1
- package/build/es/no-polyfill/radio/Radio.js +1 -1
- package/build/es/no-polyfill/radioGroup/RadioGroup.js +2 -2
- package/build/es/no-polyfill/radioOption/RadioOption.js +1 -1
- package/build/es/no-polyfill/section/Section.js +1 -1
- package/build/es/no-polyfill/section/Section.spec.js +1 -1
- package/build/es/no-polyfill/section/Section.story.js +1 -1
- package/build/es/no-polyfill/select/Select.js +8 -9
- package/build/es/no-polyfill/select/option/Option.js +1 -1
- package/build/es/no-polyfill/select/searchBox/SearchBox.js +1 -1
- package/build/es/no-polyfill/sizeSwapper/SizeSwapper.js +3 -3
- package/build/es/no-polyfill/slidingPanel/SlidingPanel.js +2 -2
- package/build/es/no-polyfill/snackbar/Snackbar.js +1 -1
- package/build/es/no-polyfill/snackbar/SnackbarContext.js +1 -1
- package/build/es/no-polyfill/snackbar/SnackbarProvider.js +1 -1
- package/build/es/no-polyfill/snackbar/useSnackbar.js +1 -1
- package/build/es/no-polyfill/statusIcon/StatusIcon.js +1 -1
- package/build/es/no-polyfill/statusIcon/StatusIcon.story.js +1 -1
- package/build/es/no-polyfill/stepper/Stepper.js +1 -1
- package/build/es/no-polyfill/stepper/deviceDetection.js +2 -2
- package/build/es/no-polyfill/sticky/Sticky.js +1 -1
- package/build/es/no-polyfill/summary/Summary.js +1 -1
- package/build/es/no-polyfill/switch/Switch.js +1 -1
- package/build/es/no-polyfill/switch/Switch.story.js +1 -1
- package/build/es/no-polyfill/switchOption/SwitchOption.js +1 -1
- package/build/es/no-polyfill/switchOption/SwitchOption.story.js +1 -1
- package/build/es/no-polyfill/tabs/Tab.js +1 -1
- package/build/es/no-polyfill/tabs/TabList.js +1 -1
- package/build/es/no-polyfill/tabs/TabPanel.js +1 -1
- package/build/es/no-polyfill/tabs/Tabs.js +1 -5
- package/build/es/no-polyfill/tabs/utils.js +2 -2
- package/build/es/no-polyfill/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +1 -1
- package/build/es/no-polyfill/tile/Tile.js +1 -1
- package/build/es/no-polyfill/title/Title.js +1 -1
- package/build/es/no-polyfill/title/Title.spec.js +1 -1
- package/build/es/no-polyfill/title/Title.story.js +1 -1
- package/build/es/no-polyfill/tooltip/Tooltip.js +7 -7
- package/build/es/no-polyfill/tooltip/Tooltip.spec.js +1 -1
- package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/es/no-polyfill/typeahead/Typeahead.js +1 -1
- package/build/es/no-polyfill/typeahead/typeaheadInput/TypeaheadInput.js +1 -1
- package/build/es/no-polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
- package/build/es/no-polyfill/typeahead/util/highlight.js +1 -1
- package/build/es/no-polyfill/upload/Upload.js +2 -6
- package/build/es/no-polyfill/upload/steps/completeStep/completeStep.js +1 -1
- package/build/es/no-polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -1
- package/build/es/no-polyfill/upload/steps/processingStep/processingStep.js +1 -1
- package/build/es/no-polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
- package/build/es/no-polyfill/upload/uploadSteps.js +1 -1
- package/build/es/no-polyfill/upload/utils/asyncFileRead/asyncFileRead.js +1 -1
- package/build/es/no-polyfill/upload/utils/getFileType/getFileType.js +1 -1
- package/build/es/no-polyfill/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.js +1 -1
- package/build/es/no-polyfill/upload/utils/isSizeValid/isSizeValid.js +1 -1
- package/build/es/no-polyfill/upload/utils/isTypeValid/isTypeValid.js +1 -1
- package/build/es/no-polyfill/upload/utils/postData/postData.js +1 -1
- package/build/es/no-polyfill/upload/utils/requestMedia/requestMedia.js +1 -1
- package/build/es/no-polyfill/uploadInput/UploadInput.js +7 -7
- package/build/es/no-polyfill/uploadInput/UploadInput.spec.js +1 -1
- package/build/es/no-polyfill/uploadInput/UploadInput.story.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadButton/UploadButton.spec.js +3 -3
- package/build/es/no-polyfill/uploadInput/uploadButton/defaults.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadButton/getAllowedFileTypes.js +3 -3
- package/build/es/no-polyfill/uploadInput/uploadButton/getAllowedFileTypes.spec.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
- package/build/es/no-polyfill/uploadInput/uploadItem/UploadItem.spec.js +1 -1
- package/build/es/no-polyfill/uploadInput/uploadItem/UploadItemBody.js +1 -1
- package/build/es/no-polyfill/utilities/deprecatedProperty/deprecatedProperty.js +1 -1
- package/build/es/no-polyfill/utilities/logActionRequired.js +1 -1
- package/build/es/no-polyfill/withDisplayFormat/WithDisplayFormat.js +3 -4
- package/build/es/no-polyfill/withNextPortal/withNextPortal.js +1 -1
- package/build/es/polyfill/accordion/Accordion.js +1 -1
- package/build/es/polyfill/accordion/Accordion.story.js +1 -1
- package/build/es/polyfill/accordion/AccordionItem/AccordionItem.js +1 -1
- package/build/es/polyfill/actionButton/ActionButton.js +1 -1
- package/build/es/polyfill/actionButton/ActionButton.spec.js +1 -1
- package/build/es/polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/polyfill/actionOption/ActionOption.js +1 -1
- package/build/es/polyfill/actionOption/ActionOption.story.js +1 -1
- package/build/es/polyfill/alert/Alert.js +1 -1
- package/build/es/polyfill/alert/Alert.story.js +1 -1
- package/build/es/polyfill/alert/inlineMarkdown/InlineMarkdown.js +1 -1
- package/build/es/polyfill/alert/withArrow/alertArrowPositions.js +1 -1
- package/build/es/polyfill/alert/withArrow/withArrow.js +1 -1
- package/build/es/polyfill/avatar/Avatar.js +1 -1
- package/build/es/polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/polyfill/avatar/avatarTypes.js +1 -1
- package/build/es/polyfill/avatar/colors/colors.js +2 -2
- package/build/es/polyfill/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/es/polyfill/avatarWrapper/AvatarWrapper.story.js +1 -1
- package/build/es/polyfill/badge/Badge.js +1 -1
- package/build/es/polyfill/body/Body.js +2 -2
- package/build/es/polyfill/body/Body.spec.js +1 -1
- package/build/es/polyfill/body/Body.story.js +1 -1
- package/build/es/polyfill/button/Button.js +5 -5
- package/build/es/polyfill/button/Button.story.js +1 -1
- package/build/es/polyfill/button/classMap.js +1 -1
- package/build/es/polyfill/button/legacyUtils/legacyUtils.js +2 -2
- package/build/es/polyfill/card/Card.js +1 -1
- package/build/es/polyfill/checkbox/Checkbox.js +1 -1
- package/build/es/polyfill/checkbox/Checkbox.story.js +1 -1
- package/build/es/polyfill/checkboxButton/CheckboxButton.js +1 -1
- package/build/es/polyfill/checkboxButton/CheckboxButton.spec.js +1 -1
- package/build/es/polyfill/checkboxButton/CheckboxButton.story.js +1 -1
- package/build/es/polyfill/checkboxOption/CheckboxOption.js +1 -1
- package/build/es/polyfill/checkboxOption/CheckboxOption.spec.js +1 -1
- package/build/es/polyfill/checkboxOption/CheckboxOption.story.js +1 -1
- package/build/es/polyfill/chevron/Chevron.js +1 -1
- package/build/es/polyfill/chevron/Chevron.story.js +1 -1
- package/build/es/polyfill/chips/Chip.js +1 -1
- package/build/es/polyfill/chips/Chips.js +1 -1
- package/build/es/polyfill/chips/Chips.spec.js +1 -1
- package/build/es/polyfill/chips/Chips.story.js +1 -1
- package/build/es/polyfill/circularButton/CircularButton.js +1 -1
- package/build/es/polyfill/common/DOMOperations/DOMOperations.js +3 -3
- package/build/es/polyfill/common/Option/Option.js +1 -1
- package/build/es/polyfill/common/RadioButton/RadioButton.js +1 -1
- package/build/es/polyfill/common/bottomSheet/BottomSheet.js +4 -4
- package/build/es/polyfill/common/bottomSheet/BottomSheet.spec.js +1 -1
- package/build/es/polyfill/common/bottomSheet/BottomSheet.story.js +2 -2
- package/build/es/polyfill/common/closeButton/CloseButton.js +1 -1
- package/build/es/polyfill/common/dateUtils/getDayNames/getDayNames.js +2 -2
- package/build/es/polyfill/common/dateUtils/getMonthNames/getMonthNames.js +1 -1
- package/build/es/polyfill/common/dateUtils/isDateValid/isDateValid.js +1 -1
- package/build/es/polyfill/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.js +1 -1
- package/build/es/polyfill/common/deviceDetection/deviceDetection.js +1 -1
- package/build/es/polyfill/common/direction.js +1 -1
- package/build/es/polyfill/common/domHelpers/index.js +1 -1
- package/build/es/polyfill/common/fakeEvents.js +1 -1
- package/build/es/polyfill/common/fileType.js +1 -1
- package/build/es/polyfill/common/flowHeader/FlowHeader.js +1 -1
- package/build/es/polyfill/common/focusBoundary/FocusBoundary.js +1 -1
- package/build/es/polyfill/common/focusBoundary/FocusBoundary.spec.js +1 -1
- package/build/es/polyfill/common/focusBoundary/utils/getFocusableElements.js +2 -2
- package/build/es/polyfill/common/focusBoundary/utils/resetFocus.js +1 -1
- package/build/es/polyfill/common/historyNavigator/historyNavigator.js +1 -1
- package/build/es/polyfill/common/hooks/useClientWidth/useClientWidth.js +3 -3
- package/build/es/polyfill/common/hooks/useConditionalListener/useConditionalListener.js +1 -1
- package/build/es/polyfill/common/hooks/useDirection/useDirection.js +1 -1
- package/build/es/polyfill/common/hooks/useHasIntersected/useHasIntersected.js +2 -2
- package/build/es/polyfill/common/hooks/useLayout/useLayout.js +1 -1
- package/build/es/polyfill/common/key.js +1 -1
- package/build/es/polyfill/common/locale/index.js +8 -8
- package/build/es/polyfill/common/panel/Panel.js +6 -6
- package/build/es/polyfill/common/propsValues/breakpoint.js +1 -1
- package/build/es/polyfill/common/propsValues/control.js +1 -1
- package/build/es/polyfill/common/propsValues/dateMode.js +1 -1
- package/build/es/polyfill/common/propsValues/layouts.js +1 -1
- package/build/es/polyfill/common/propsValues/markdownNodeType.js +1 -1
- package/build/es/polyfill/common/propsValues/monthFormat.js +1 -1
- package/build/es/polyfill/common/propsValues/position.js +1 -1
- package/build/es/polyfill/common/propsValues/profileType.js +1 -1
- package/build/es/polyfill/common/propsValues/scroll.js +1 -1
- package/build/es/polyfill/common/propsValues/sentiment.js +1 -1
- package/build/es/polyfill/common/propsValues/size.js +1 -1
- package/build/es/polyfill/common/propsValues/status.js +1 -1
- package/build/es/polyfill/common/propsValues/type.js +1 -1
- package/build/es/polyfill/common/propsValues/typography.js +1 -1
- package/build/es/polyfill/common/propsValues/variant.js +1 -1
- package/build/es/polyfill/common/propsValues/width.js +1 -1
- package/build/es/polyfill/common/requirements.js +2 -2
- package/build/es/polyfill/common/responsivePanel/ResponsivePanel.js +1 -1
- package/build/es/polyfill/common/textFormat/formatWithPattern/formatWithPattern.js +2 -2
- package/build/es/polyfill/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +1 -1
- package/build/es/polyfill/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +1 -1
- package/build/es/polyfill/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +1 -1
- package/build/es/polyfill/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +1 -1
- package/build/es/polyfill/common/textFormat/unformatWithPattern/unformatWithPattern.js +1 -1
- package/build/es/polyfill/common/theme.js +1 -1
- package/build/es/polyfill/criticalBanner/CriticalCommsBanner.js +1 -1
- package/build/es/polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
- package/build/es/polyfill/dateInput/DateInput.js +4 -10
- package/build/es/polyfill/dateInput/DateInput.story.js +1 -1
- package/build/es/polyfill/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js +1 -1
- package/build/es/polyfill/dateInput/utils/explodeDate/explodeDate.js +1 -1
- package/build/es/polyfill/dateLookup/DateLookup.js +3 -4
- package/build/es/polyfill/dateLookup/dateHeader/DateHeader.js +1 -1
- package/build/es/polyfill/dateLookup/dateTrigger/DateTrigger.js +1 -1
- package/build/es/polyfill/dateLookup/dayCalendar/DayCalendar.js +1 -1
- package/build/es/polyfill/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -5
- package/build/es/polyfill/dateLookup/monthCalendar/MonthCalendar.js +1 -1
- package/build/es/polyfill/dateLookup/monthCalendar/table/MonthCalendarTable.js +1 -1
- package/build/es/polyfill/dateLookup/tableLink/TableLink.js +1 -1
- package/build/es/polyfill/dateLookup/yearCalendar/YearCalendar.js +1 -1
- package/build/es/polyfill/dateLookup/yearCalendar/table/YearCalendarTable.js +1 -1
- package/build/es/polyfill/decision/Decision.js +5 -5
- package/build/es/polyfill/decision/decisionEnums.js +2 -2
- package/build/es/polyfill/definitionList/DefinitionList.js +1 -1
- package/build/es/polyfill/dimmer/Dimmer.js +3 -3
- package/build/es/polyfill/dimmer/Dimmer.story.js +2 -2
- package/build/es/polyfill/dimmer/dimmerManager/DimmerManager.js +3 -3
- package/build/es/polyfill/display/Display.js +1 -1
- package/build/es/polyfill/display/Display.story.js +2 -2
- package/build/es/polyfill/drawer/Drawer.js +1 -1
- package/build/es/polyfill/dropFade/DropFade.js +3 -3
- package/build/es/polyfill/dropFade/DropFade.story.js +1 -1
- package/build/es/polyfill/dynamicFieldDefinitionList/DynamicFieldDefinitionList.js +1 -1
- package/build/es/polyfill/dynamicFieldDefinitionList/FormattedValue/FormattedValue.js +2 -2
- package/build/es/polyfill/dynamicFieldDefinitionList/utils/createDefinitions.js +2 -2
- package/build/es/polyfill/dynamicFieldDefinitionList/utils/text-format.js +1 -1
- package/build/es/polyfill/emphasis/Emphasis.js +2 -2
- package/build/es/polyfill/emphasis/EmphasisHtmlTransformer.js +2 -2
- package/build/es/polyfill/flowNavigation/FlowNavigation.js +2 -2
- package/build/es/polyfill/flowNavigation/animatedLabel/AnimatedLabel.js +1 -1
- package/build/es/polyfill/flowNavigation/backButton/BackButton.js +1 -1
- package/build/es/polyfill/header/Header.js +2 -2
- package/build/es/polyfill/header/Header.spec.js +1 -1
- package/build/es/polyfill/header/Header.story.js +2 -1
- package/build/es/polyfill/i18n/index.js +1 -1
- package/build/es/polyfill/image/Image.js +2 -2
- package/build/es/polyfill/info/Info.js +1 -1
- package/build/es/polyfill/info/Info.story.js +1 -1
- package/build/es/polyfill/info/infoPresentations.js +1 -1
- package/build/es/polyfill/inlineAlert/InlineAlert.js +1 -1
- package/build/es/polyfill/inputWithDisplayFormat/InputWithDisplayFormat.js +1 -1
- package/build/es/polyfill/inputs/Input.js +1 -1
- package/build/es/polyfill/inputs/TextArea.js +1 -1
- package/build/es/polyfill/inputs/_common.js +2 -2
- package/build/es/polyfill/instructionsList/InstructionsList.js +3 -3
- package/build/es/polyfill/link/Link.js +2 -2
- package/build/es/polyfill/link/Link.spec.js +1 -1
- package/build/es/polyfill/link/Link.story.js +1 -1
- package/build/es/polyfill/listItem/ListItem.js +1 -1
- package/build/es/polyfill/listItem/ListItem.spec.js +1 -1
- package/build/es/polyfill/listItem/ListItem.story.js +1 -1
- package/build/es/polyfill/loader/Loader.js +2 -2
- package/build/es/polyfill/loader/Loader.story.js +1 -1
- package/build/es/polyfill/logo/Logo.js +1 -1
- package/build/es/polyfill/logo/Logo.story.js +1 -1
- package/build/es/polyfill/logo/logoTypes.js +1 -1
- package/build/es/polyfill/markdown/Markdown.js +1 -1
- package/build/es/polyfill/modal/Modal.js +1 -1
- package/build/es/polyfill/modal/Modal.story.js +2 -2
- package/build/es/polyfill/money/Money.js +1 -1
- package/build/es/polyfill/money/Money.story.js +1 -1
- package/build/es/polyfill/moneyInput/MoneyInput.js +1 -1
- package/build/es/polyfill/moneyInput/MoneyInput.story.js +1 -1
- package/build/es/polyfill/moneyInput/currencyFormatting.js +3 -3
- package/build/es/polyfill/navigationOption/NavigationOption.js +1 -1
- package/build/es/polyfill/navigationOptionsList/NavigationOptionsList.js +1 -1
- package/build/es/polyfill/nudge/Nudge.js +1 -1
- package/build/es/polyfill/overlayHeader/OverlayHeader.js +1 -1
- package/build/es/polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/polyfill/phoneNumberInput/data/countries.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/cleanNumber/cleanNumber.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +3 -3
- package/build/es/polyfill/phoneNumberInput/utils/explodeNumberModel/index.js +2 -2
- package/build/es/polyfill/phoneNumberInput/utils/filterOptionsForQuery/index.js +2 -2
- package/build/es/polyfill/phoneNumberInput/utils/findCountryByCode/index.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/isOptionAndFitsQuery/isOptionAndFitsQuery.js +2 -2
- package/build/es/polyfill/phoneNumberInput/utils/isStringNumeric/isStringNumeric.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.js +2 -2
- package/build/es/polyfill/phoneNumberInput/utils/longestMatchingPrefix/index.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/setDefaultPrefix/index.js +3 -3
- package/build/es/polyfill/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js +2 -2
- package/build/es/polyfill/popover/Popover.js +2 -2
- package/build/es/polyfill/processIndicator/ProcessIndicator.js +4 -4
- package/build/es/polyfill/progress/Progress.js +1 -1
- package/build/es/polyfill/progress/Progress.story.js +1 -1
- package/build/es/polyfill/progressBar/ProgressBar.js +1 -1
- package/build/es/polyfill/progressBar/ProgressBar.story.js +1 -1
- package/build/es/polyfill/provider/Provider.js +1 -1
- package/build/es/polyfill/provider/Provider.spec.js +1 -1
- package/build/es/polyfill/provider/Provider.story.js +1 -1
- package/build/es/polyfill/provider/direction/DirectionProvider.js +1 -1
- package/build/es/polyfill/provider/direction/DirectionProvider.spec.js +1 -1
- package/build/es/polyfill/provider/language/LanguageProvider.js +1 -1
- package/build/es/polyfill/provider/language/LanguageProvider.spec.js +1 -1
- package/build/es/polyfill/radio/Radio.js +1 -1
- package/build/es/polyfill/radioGroup/RadioGroup.js +2 -2
- package/build/es/polyfill/radioOption/RadioOption.js +1 -1
- package/build/es/polyfill/section/Section.js +1 -1
- package/build/es/polyfill/section/Section.spec.js +1 -1
- package/build/es/polyfill/section/Section.story.js +1 -1
- package/build/es/polyfill/select/Select.js +8 -9
- package/build/es/polyfill/select/option/Option.js +2 -2
- package/build/es/polyfill/select/searchBox/SearchBox.js +1 -1
- package/build/es/polyfill/sizeSwapper/SizeSwapper.js +3 -3
- package/build/es/polyfill/slidingPanel/SlidingPanel.js +2 -2
- package/build/es/polyfill/snackbar/Snackbar.js +1 -1
- package/build/es/polyfill/snackbar/SnackbarContext.js +1 -1
- package/build/es/polyfill/snackbar/SnackbarProvider.js +1 -1
- package/build/es/polyfill/snackbar/useSnackbar.js +1 -1
- package/build/es/polyfill/statusIcon/StatusIcon.js +1 -1
- package/build/es/polyfill/statusIcon/StatusIcon.story.js +1 -1
- package/build/es/polyfill/stepper/Stepper.js +1 -1
- package/build/es/polyfill/stepper/deviceDetection.js +2 -2
- package/build/es/polyfill/sticky/Sticky.js +1 -1
- package/build/es/polyfill/summary/Summary.js +1 -1
- package/build/es/polyfill/switch/Switch.js +1 -1
- package/build/es/polyfill/switch/Switch.story.js +1 -1
- package/build/es/polyfill/switchOption/SwitchOption.js +1 -1
- package/build/es/polyfill/switchOption/SwitchOption.story.js +1 -1
- package/build/es/polyfill/tabs/Tab.js +1 -1
- package/build/es/polyfill/tabs/TabList.js +1 -1
- package/build/es/polyfill/tabs/TabPanel.js +1 -1
- package/build/es/polyfill/tabs/Tabs.js +1 -5
- package/build/es/polyfill/tabs/utils.js +2 -2
- package/build/es/polyfill/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +1 -1
- package/build/es/polyfill/tile/Tile.js +1 -1
- package/build/es/polyfill/title/Title.js +1 -1
- package/build/es/polyfill/title/Title.spec.js +1 -1
- package/build/es/polyfill/title/Title.story.js +1 -1
- package/build/es/polyfill/tooltip/Tooltip.js +7 -7
- package/build/es/polyfill/tooltip/Tooltip.spec.js +1 -1
- package/build/es/polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/es/polyfill/typeahead/Typeahead.js +1 -1
- package/build/es/polyfill/typeahead/typeaheadInput/TypeaheadInput.js +1 -1
- package/build/es/polyfill/typeahead/typeaheadOption/TypeaheadOption.js +1 -1
- package/build/es/polyfill/typeahead/util/highlight.js +1 -1
- package/build/es/polyfill/upload/Upload.js +2 -6
- package/build/es/polyfill/upload/steps/completeStep/completeStep.js +1 -1
- package/build/es/polyfill/upload/steps/mediaUploadStep/mediaUploadStep.js +1 -1
- package/build/es/polyfill/upload/steps/processingStep/processingStep.js +1 -1
- package/build/es/polyfill/upload/steps/uploadImageStep/uploadImageStep.js +1 -1
- package/build/es/polyfill/upload/uploadSteps.js +1 -1
- package/build/es/polyfill/upload/utils/asyncFileRead/asyncFileRead.js +1 -1
- package/build/es/polyfill/upload/utils/getFileType/getFileType.js +1 -1
- package/build/es/polyfill/upload/utils/getSupportedSpotMimeTypes/getSupportedSpotMimeTypes.js +2 -2
- package/build/es/polyfill/upload/utils/isSizeValid/isSizeValid.js +1 -1
- package/build/es/polyfill/upload/utils/isTypeValid/isTypeValid.js +1 -1
- package/build/es/polyfill/upload/utils/postData/postData.js +1 -1
- package/build/es/polyfill/upload/utils/requestMedia/requestMedia.js +1 -1
- package/build/es/polyfill/uploadInput/UploadInput.js +7 -7
- package/build/es/polyfill/uploadInput/UploadInput.spec.js +1 -1
- package/build/es/polyfill/uploadInput/UploadInput.story.js +1 -1
- package/build/es/polyfill/uploadInput/uploadButton/UploadButton.js +1 -1
- package/build/es/polyfill/uploadInput/uploadButton/UploadButton.spec.js +3 -3
- package/build/es/polyfill/uploadInput/uploadButton/defaults.js +1 -1
- package/build/es/polyfill/uploadInput/uploadButton/getAllowedFileTypes.js +3 -3
- package/build/es/polyfill/uploadInput/uploadButton/getAllowedFileTypes.spec.js +1 -1
- package/build/es/polyfill/uploadInput/uploadItem/UploadItem.js +2 -2
- package/build/es/polyfill/uploadInput/uploadItem/UploadItem.spec.js +1 -1
- package/build/es/polyfill/uploadInput/uploadItem/UploadItemBody.js +1 -1
- package/build/es/polyfill/utilities/deprecatedProperty/deprecatedProperty.js +1 -1
- package/build/es/polyfill/utilities/logActionRequired.js +1 -1
- package/build/es/polyfill/withDisplayFormat/WithDisplayFormat.js +3 -4
- package/build/es/polyfill/withNextPortal/withNextPortal.js +1 -1
- package/build/main.css +1 -4236
- package/build/styles/accordion/Accordion.css +1 -59
- package/build/styles/actionButton/ActionButton.css +1 -41
- package/build/styles/avatar/Avatar.css +1 -240
- package/build/styles/badge/Badge.css +1 -66
- package/build/styles/button/Button.css +1 -17
- package/build/styles/card/Card.css +1 -88
- package/build/styles/checkboxButton/CheckboxButton.css +1 -21
- package/build/styles/chips/Chip.css +1 -169
- package/build/styles/circularButton/CircularButton.css +1 -175
- package/build/styles/common/Option/Option.css +1 -74
- package/build/styles/common/RadioButton/RadioButton.css +1 -3
- package/build/styles/common/bottomSheet/BottomSheet.css +1 -44
- package/build/styles/common/closeButton/CloseButton.css +1 -44
- package/build/styles/common/panel/Panel.css +1 -67
- package/build/styles/criticalBanner/CriticalCommsBanner.css +1 -73
- package/build/styles/dateInput/DateInput.css +1 -3
- package/build/styles/dateLookup/DateLookup.css +1 -80
- package/build/styles/dateLookup/dateTrigger/DateTrigger.css +1 -53
- package/build/styles/decision/Decision.css +1 -69
- package/build/styles/definitionList/DefinitionList.css +1 -48
- package/build/styles/dimmer/Dimmer.css +1 -68
- package/build/styles/drawer/Drawer.css +1 -77
- package/build/styles/dropFade/DropFade.css +1 -19
- package/build/styles/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +1 -4
- package/build/styles/emphasis/Emphasis.css +1 -25
- package/build/styles/flowNavigation/FlowNavigation.css +1 -85
- package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -26
- package/build/styles/flowNavigation/backButton/BackButton.css +1 -28
- package/build/styles/header/Header.css +1 -20
- package/build/styles/image/Image.css +1 -12
- package/build/styles/info/Info.css +1 -37
- package/build/styles/inputs/Input.css +1 -53
- package/build/styles/inputs/TextArea.css +1 -59
- package/build/styles/instructionsList/InstructionsList.css +1 -30
- package/build/styles/link/Link.css +1 -12
- package/build/styles/listItem/ListItem.css +1 -6
- package/build/styles/loader/Loader.css +1 -294
- package/build/styles/logo/Logo.css +1 -10
- package/build/styles/main.css +1 -4236
- package/build/styles/modal/Modal.css +1 -133
- package/build/styles/moneyInput/MoneyInput.css +1 -128
- package/build/styles/navigationOption/NavigationOption.css +1 -61
- package/build/styles/navigationOptionsList/NavigationOptionsList.css +1 -12
- package/build/styles/nudge/Nudge.css +1 -138
- package/build/styles/overlayHeader/OverlayHeader.css +1 -31
- package/build/styles/phoneNumberInput/PhoneNumberInput.css +1 -17
- package/build/styles/popover/Popover.css +1 -40
- package/build/styles/progress/Progress.css +1 -35
- package/build/styles/progressBar/ProgressBar.css +1 -9
- package/build/styles/section/Section.css +1 -8
- package/build/styles/select/Select.css +1 -322
- package/build/styles/slidingPanel/SlidingPanel.css +1 -96
- package/build/styles/snackbar/Snackbar.css +1 -85
- package/build/styles/statusIcon/StatusIcon.css +1 -50
- package/build/styles/stepper/Stepper.css +1 -139
- package/build/styles/summary/Summary.css +1 -86
- package/build/styles/switch/Switch.css +1 -64
- package/build/styles/tabs/Tabs.css +1 -104
- package/build/styles/tile/Tile.css +1 -58
- package/build/styles/tooltip/Tooltip.css +1 -37
- package/build/styles/typeahead/Typeahead.css +1 -167
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +1 -6
- package/build/styles/upload/Upload.css +1 -15
- package/build/styles/uploadInput/UploadInput.css +1 -53
- package/build/styles/uploadInput/uploadButton/UploadButton.css +1 -44
- package/build/styles/uploadInput/uploadItem/UploadItem.css +1 -60
- package/build/types/actionButton/ActionButton.d.ts +3 -0
- package/build/types/actionButton/ActionButton.story.d.ts +1 -0
- package/build/types/button/Button.story.d.ts +24 -24
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import classnames from"classnames";import{useEffect,useState}from"react";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classnames from"classnames";import{useEffect,useState}from"react";import{jsxs as _jsxs}from"react/jsx-runtime";var Progress=function(a){var b=a.className,c=a.id,d=a.progress,e=useState(0),f=_slicedToArray(e,2),g=f[0],h=f[1];return useEffect(function(){h(d.value)}),/*#__PURE__*/_jsxs("progress",_objectSpread(_objectSpread({id:c,className:classnames("np-progress d-block",b)},d),{},{value:g,children:[g,"%"]}))};export default Progress;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Progress from"./Progress";export default{component:Progress,title:"Other/Progress"};export
|
|
1
|
+
import Progress from"./Progress";export default{component:Progress,title:"Other/Progress"};export var Basic={args:{progress:{value:50,max:100}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Body from"../body";import{Typography}from"../common";import Progress from"../progress";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import Body from"../body";import{Typography}from"../common";import Progress from"../progress";import Title from"../title/Title";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var ProgressBar=function(a){var b=a.className,c=a.description,d=a.id,e=a.title,f=a.progress,g=a.textEnd,h=useTheme(),i=h.isModern;return/*#__PURE__*/_jsxs("div",{className:classNames("np-progress-bar",b),children:[/*#__PURE__*/_jsxs("label",{className:"np-progress-bar__title m-b-1",htmlFor:d,children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_BODY,className:i?"m-b-1 text-primary":"text-primary",children:e}),c&&/*#__PURE__*/_jsx(Body,{children:c})]}),/*#__PURE__*/_jsx(Progress,{id:d,progress:f}),/*#__PURE__*/_jsx(Body,{as:"p",type:Typography.BODY_DEFAULT_BOLD,className:"d-flex justify-content-end text-primary m-b-0",children:g})]})};export default ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import ProgressBar from"./ProgressBar";export default{component:ProgressBar,title:"Content/ProgressBar",tags:["autodocs"]};export
|
|
1
|
+
import ProgressBar from"./ProgressBar";export default{component:ProgressBar,title:"Content/ProgressBar",tags:["autodocs"]};export var Basic={args:{description:"You have 3 days to reach your goal.",id:"progress-bar-id",title:"Send 5,550 GBP",progress:{value:50,max:100},textEnd:"200 GBP to go"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import{IntlProvider}from"react-intl";import{adjustLocale,DEFAULT_LOCALE,getDirectionFromLocale}from"../common";import en from"../i18n/en.json";import{DirectionProvider}from"./direction";import{LanguageProvider}from"./language";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.array.concat.js";import PropTypes from"prop-types";import{IntlProvider}from"react-intl";import{adjustLocale,DEFAULT_LOCALE,getDirectionFromLocale}from"../common";import en from"../i18n/en.json";import{DirectionProvider}from"./direction";import{LanguageProvider}from"./language";import{jsx as _jsx}from"react/jsx-runtime";var Provider=function(a){var b,c=a.i18n,d=a.children,e=c.locale,f=c.messages,g=c.defaultRichTextElements,h=adjustLocale(e);return null===h?(console.warn("Unsupported locale value was provided: '".concat(e,"', defaulting to '").concat(DEFAULT_LOCALE,"'")),b={locale:DEFAULT_LOCALE,messages:_objectSpread(_objectSpread({},en),f)}):b={locale:h,messages:f},/*#__PURE__*/_jsx(DirectionProvider,{direction:getDirectionFromLocale(e),children:/*#__PURE__*/_jsx(LanguageProvider,{locale:e,children:/*#__PURE__*/_jsx(IntlProvider,{defaultLocale:DEFAULT_LOCALE,locale:b.locale,messages:b.messages,defaultRichTextElements:g,children:d})})})};Provider.propTypes={i18n:PropTypes.shape({locale:PropTypes.string.isRequired,messages:PropTypes.shape({}).isRequired,defaultRichTextElements:PropTypes.shape({})}).isRequired,children:PropTypes.node},Provider.defaultProps={children:void 0};export default Provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{render,waitFor,screen}from"@testing-library/react";import{FormattedMessage,useIntl}from"react-intl";import closeButtonMessages from"../common/closeButton/CloseButton.messages";import Provider from".";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";describe("Provider",()
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import _regeneratorRuntime from"@babel/runtime/regenerator";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.promise.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import{render,waitFor,screen}from"@testing-library/react";import{FormattedMessage,useIntl}from"react-intl";import closeButtonMessages from"../common/closeButton/CloseButton.messages";import Provider from".";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";describe("Provider",function(){beforeAll(function(){jest.spyOn(console,"error").mockImplementation(function(){return jest.fn()}),jest.spyOn(console,"error").mockImplementation(function(){return jest.fn()}),jest.spyOn(console,"warn").mockImplementation(function(){return jest.fn()})}),afterAll(function(){jest.restoreAllMocks()}),it("does not add any elements in the DOM",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(){var b,c,d,e;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return b="en",a.next=3,import("../i18n/".concat(b,".json"));case 3:c=a.sent,d=render(/*#__PURE__*/_jsx(Provider,{i18n:{locale:b,messages:c}})),e=d.container,expect(e).toBeEmptyDOMElement();case 6:case"end":return a.stop();}},a)}))),it.each([["zh-HK","zh-HK"],["ru","ru"],["en-GB","en-GB"],["en-US","en-US"],["en_US","en-US"],["en_GB","en-GB"],["ja","ja"],["ja-JP","ja-JP"],["","en-GB"],[" ","en-GB"],[null,"en-GB"],[void 0,"en-GB"]])("check locale value \"%s\"",function(a,b){var c=render(/*#__PURE__*/_jsx(Provider,{i18n:{locale:a,messages:{}},children:/*#__PURE__*/_jsx(function TestComponent(){var a=useIntl();return/*#__PURE__*/_jsxs(_Fragment,{children:["locale: ",a.locale]})},{})})),d=c.container;expect(d).toHaveTextContent("locale: ".concat(b))}),it.each([["ru","\u0417\u0430\u043A\u0440\u044B\u0442\u044C"],["en","Close"]])("switching locale (%s)",/*#__PURE__*/function(){var a=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function c(a,b){var d;return _regeneratorRuntime.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return expect(document.body).toBeEmptyDOMElement(),c.next=3,import("../i18n/".concat(a,".json"));case 3:return d=c.sent,render(/*#__PURE__*/_jsx(Provider,{i18n:{locale:a,messages:d},children:/*#__PURE__*/_jsx(FormattedMessage,_objectSpread({},closeButtonMessages.ariaLabel))})),c.next=7,waitFor(function(){expect(screen.getByText(b)).toBeInTheDocument()});case 7:case"end":return c.stop();}},c)}));return function(){return a.apply(this,arguments)}}()),it("does not override passed in messages if parsing locale fails",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function a(){var b,c,d,e;return _regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return expect(document.body).toBeEmptyDOMElement(),b="some.message.that.was.passed.in",c="Boop",d="en-GB",e=_defineProperty({},b,c),Object.defineProperty(Intl,"Locale",{value:void 0}),render(/*#__PURE__*/_jsxs(Provider,{i18n:{locale:d,messages:e},children:[/*#__PURE__*/_jsx("span",{children:/*#__PURE__*/_jsx(FormattedMessage,{id:b})}),/*#__PURE__*/_jsx("span",{children:/*#__PURE__*/_jsx(FormattedMessage,_objectSpread({},closeButtonMessages.ariaLabel))})]})),a.t0=expect,a.next=10,screen.findByText(c);case 10:a.t1=a.sent,(0,a.t0)(a.t1).toBeInTheDocument(),expect(screen.getByText("Close")).toBeInTheDocument();case 13:case"end":return a.stop();}},a)})))});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FormattedMessage}from"react-intl";import{Provider}from"..";import closeButtonMessages from"../common/closeButton/CloseButton.messages";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Provider,title:"Other/Provider"};export
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{FormattedMessage}from"react-intl";import{Provider}from"..";import closeButtonMessages from"../common/closeButton/CloseButton.messages";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Provider,title:"Other/Provider"};export var Basic={render:function render(){return/*#__PURE__*/_jsxs(_Fragment,{children:["Translated message: ",/*#__PURE__*/_jsx(FormattedMessage,_objectSpread({},closeButtonMessages.ariaLabel))]})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext}from"react";import{Direction}from"../../common/direction";import{jsx as _jsx}from"react/jsx-runtime";export
|
|
1
|
+
import{createContext}from"react";import{Direction}from"../../common/direction";import{jsx as _jsx}from"react/jsx-runtime";export var DirectionContext=/*#__PURE__*/createContext(Direction.LTR);export var DirectionProvider=function(a){var b=a.direction,c=a.children;return/*#__PURE__*/_jsx(DirectionContext.Provider,{value:b,children:c})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Direction}from"../../common";import{useDirection}from"../../common/hooks";import{render}from"../../test-utils";import{DirectionProvider}from".";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsx as _jsx}from"react/jsx-runtime";describe("DirectionProvider",()
|
|
1
|
+
import{Direction}from"../../common";import{useDirection}from"../../common/hooks";import{render}from"../../test-utils";import{DirectionProvider}from".";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsx as _jsx}from"react/jsx-runtime";describe("DirectionProvider",function(){beforeEach(function(){document.documentElement.removeAttribute("dir")}),it.each([[Direction.LTR,!1],[Direction.RTL,!0]])("store direction %s in React Context",function(a,b){var c=null;render(/*#__PURE__*/_jsx(DirectionProvider,{direction:a,children:/*#__PURE__*/_jsx(function TestComponent(){return c=useDirection(),/*#__PURE__*/_jsx(_Fragment,{})},{})})),expect(c).not.toBeNull(),expect(c).toHaveProperty("direction",a),expect(c).toHaveProperty("isRTL",b)})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext}from"react";import{DEFAULT_LOCALE}from"../../common/locale";import{jsx as _jsx}from"react/jsx-runtime";export
|
|
1
|
+
import{createContext}from"react";import{DEFAULT_LOCALE}from"../../common/locale";import{jsx as _jsx}from"react/jsx-runtime";export var LanguageContext=/*#__PURE__*/createContext(DEFAULT_LOCALE);export var LanguageProvider=function(a){var b=a.locale,c=a.children;return/*#__PURE__*/_jsx(LanguageContext.Provider,{value:b,children:c})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{render}from"../../test-utils";import{LanguageProvider}from".";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{jsx as _jsx}from"react/jsx-runtime";describe("LanguageProvider",()
|
|
1
|
+
import{render}from"../../test-utils";import{LanguageProvider}from".";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{jsx as _jsx}from"react/jsx-runtime";describe("LanguageProvider",function(){beforeEach(function(){document.documentElement.removeAttribute("lang")}),it.each([["en"],["ru"],["ja"]])("store language %s in React Context",function(a){var b=render(/*#__PURE__*/_jsx(LanguageProvider,{locale:a,children:/*#__PURE__*/_jsx(function TestComponent(){return/*#__PURE__*/_jsxs(_Fragment,{children:["locale: ",a]})},{})})),c=b.container;expect(c).toHaveTextContent("locale: ".concat(a))})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body/Body";import{Typography}from"../common";import RadioButton from"../common/RadioButton";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","id","disabled","className","avatar","secondary"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body/Body";import{Typography}from"../common";import RadioButton from"../common/RadioButton";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Radio=function(a){var b=a.label,c=a.id,d=a.disabled,e=a.className,f=a.avatar,g=a.secondary,h=_objectWithoutProperties(a,_excluded),i=useTheme(),j=i.isModern;return/*#__PURE__*/_jsx("div",{className:classNames("radio np-radio",{"radio-lg":g,disabled:j&&d},e),children:/*#__PURE__*/_jsxs("label",{className:classNames({disabled:d}),htmlFor:c,children:[/*#__PURE__*/_jsx("span",{className:classNames(j?"m-r-2":"p-r-2","np-radio-button"),children:/*#__PURE__*/_jsx(RadioButton,_objectSpread({id:c,disabled:d},h))}),/*#__PURE__*/_jsxs(Body,{as:"span",type:g?Typography.BODY_LARGE_BOLD:Typography.BODY_LARGE,className:"np-radio__text",children:[b,g&&/*#__PURE__*/_jsx(Body,{as:"span",className:classNames({secondary:!j}),children:g})]}),f&&/*#__PURE__*/_jsx("span",{className:"np-radio__avatar m-l-auto",children:f})]})})};Radio.propTypes={avatar:PropTypes.element,checked:PropTypes.bool,disabled:PropTypes.bool,id:PropTypes.string,label:PropTypes.string.isRequired,name:PropTypes.string.isRequired,onChange:PropTypes.func.isRequired,secondary:PropTypes.string,value:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),className:PropTypes.string},Radio.defaultProps={avatar:void 0,checked:!1,disabled:!1,id:null,secondary:null,value:"",className:void 0};export default Radio;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import{Component}from"react";import Radio from"../radio";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";
|
|
2
|
-
,{id:
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.reflect.construct.js";import"core-js/modules/es.function.name.js";import"core-js/modules/es.array.map.js";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import PropTypes from"prop-types";import{Component}from"react";import Radio from"../radio";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";var RadioGroup=/*#__PURE__*/function(a){function b(a){var d;return _classCallCheck(this,b),d=c.call(this,a),_defineProperty(_assertThisInitialized(d),"handleOnChange",function(a){var b=d.props.onChange;d.setState({selectedValue:a},b&&b(a))}),d.state={selectedValue:a.selectedValue},d}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"render",value:function render(){var a=this,b=this.props,c=b.radios,d=b.name,e=this.state.selectedValue;return c&&1<c.length?/*#__PURE__*/_jsx(_Fragment,{children:c.map(function(b,c){var f=b.id,g=b.avatar,h=b.value,i=b.label,j=b.disabled,k=b.secondary,l=b.readOnly;return/*#__PURE__*/_jsx(Radio// eslint-disable-next-line react/no-array-index-key
|
|
2
|
+
,{id:f,value:h,label:i,name:d,disabled:j,checked:e===h,secondary:k,readOnly:l,avatar:g,onChange:function onChange(b){return a.handleOnChange(b)}},c)})}):null}}]),b}(Component);RadioGroup.propTypes={radios:PropTypes.arrayOf(PropTypes.shape({id:PropTypes.string,avatar:PropTypes.element,value:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),secondary:PropTypes.string,label:PropTypes.string.isRequired,disabled:PropTypes.bool,readOnly:PropTypes.bool})).isRequired,onChange:PropTypes.func.isRequired,selectedValue:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),name:PropTypes.string.isRequired},RadioGroup.defaultProps={selectedValue:null};export default RadioGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import Option from"../common/Option";import RadioButton from"../common/RadioButton";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.function.name.js";import PropTypes from"prop-types";import Option from"../common/Option";import RadioButton from"../common/RadioButton";import{jsx as _jsx}from"react/jsx-runtime";var RadioOption=function(a){var b=a["aria-label"],c=a.media,d=a.title,e=a.content,f=a.id,g=a.name,h=a.checked,i=a.onChange,j=a.complex,k=a.disabled,l=a.value,m=a.showMediaCircle,n=a.showMediaAtAllSizes,o=a.isContainerAligned;return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},{"aria-label":b,media:c,title:d,content:e,name:g,complex:j,disabled:k,showMediaCircle:m,showMediaAtAllSizes:n,isContainerAligned:o}),{},{button:/*#__PURE__*/_jsx(RadioButton,{id:f,name:g,checked:h,disabled:k,value:l,onChange:i})}))};RadioOption.propTypes={"aria-label":PropTypes.string,media:PropTypes.node,id:PropTypes.string.isRequired,name:PropTypes.string.isRequired,title:PropTypes.node.isRequired,content:PropTypes.node,checked:PropTypes.bool,onChange:PropTypes.func.isRequired,complex:PropTypes.bool,disabled:PropTypes.bool,value:PropTypes.string,showMediaCircle:PropTypes.bool,showMediaAtAllSizes:PropTypes.bool,isContainerAligned:PropTypes.bool},RadioOption.defaultProps={"aria-label":void 0,media:null,content:null,checked:!1,complex:!1,disabled:!1,showMediaCircle:!0,showMediaAtAllSizes:!1,isContainerAligned:!1,value:""};export default RadioOption;
|
|
@@ -2,4 +2,4 @@ import classNames from"classnames";import{jsx as _jsx}from"react/jsx-runtime";/*
|
|
|
2
2
|
*
|
|
3
3
|
* Neptune Web: https://transferwise.github.io/neptune-web/components/content/Section
|
|
4
4
|
*
|
|
5
|
-
*/
|
|
5
|
+
*/var Section=function(a){var b=a.children,c=a.className,d=a.withHorizontalPadding;return/*#__PURE__*/_jsx("div",{className:classNames("np-section",c,{"np-section--with-horizontal-padding":void 0!==d&&d}),children:b})};export default Section;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{render,screen}from"../test-utils";import Section from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Section",()
|
|
1
|
+
import{render,screen}from"../test-utils";import Section from".";import{jsx as _jsx}from"react/jsx-runtime";describe("Section",function(){it("can render children",function(){render(/*#__PURE__*/_jsx(Section,{children:"Children here"})),expect(screen.getByText("Children here")).toBeInTheDocument()})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{useState}from"react";import Accordion from"../accordion";import Card from"../card";import Header from"../header";import NavigationOption from"../navigationOption";import Section from"./Section";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Section,title:"Content/Section"};export
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{useState}from"react";import Accordion from"../accordion";import Card from"../card";import Header from"../header";import NavigationOption from"../navigationOption";import Section from"./Section";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Section,title:"Content/Section"};export var Basic=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Section,{children:"Section 1 content"}),/*#__PURE__*/_jsx(Section,{children:"Section 2 content"})]})};export var WithHeader=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section 1 title"}),"Section 1 content"]}),/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section 2 title"}),"Section 2 content"]})]})};export var withAccordion=function(){var a=[{id:"Item 1",title:"If you have a deadline, set up your transfer early",content:"Most large transfers take around 2\u20134 working days from start to finish. So set up your transfer early if you have a deadline coming up.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24})},{id:"Item 2",title:"Have documents on hand to speed things up",content:"When you set up your transfer, we might ask for documents that show where your money comes from. Documents you might need (opens in a new tab)",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24})},{id:"Item 3",title:"Lorem ipsum",content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed scelerisque velit nec ex rutrum efficitur sit amet at enim. Nam a neque magna. Nullam est urna, dignissim nec erat id, euismod aliquet nulla.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24})}];return/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section with accordion"}),/*#__PURE__*/_jsx(Accordion,{items:a,indexOpen:0})]})};export var WithCards=function(){var a=useState(null),b=_slicedToArray(a,2),c=b[0],d=b[1],e=function(a){return c===a?d(null):void d(a)};return/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section with cards"}),/*#__PURE__*/_jsx(Card,{title:"What's in the box?!",details:"Click me to reveal.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24}),isExpanded:0===c,onClick:function onClick(){return e(0)},children:/*#__PURE__*/_jsx("div",{children:"Hello there!"})}),/*#__PURE__*/_jsx(Card,{title:"What's in the box?!",details:"Click me to reveal.",icon:/*#__PURE__*/_jsx(FastFlagIcon,{size:24}),isExpanded:1===c,onClick:function onClick(){return e(1)},children:/*#__PURE__*/_jsx("div",{children:"Hello there!"})})]})};export var WithNavigationOptions=function(){return/*#__PURE__*/_jsxs(Section,{children:[/*#__PURE__*/_jsx(Header,{title:"Section with options"}),/*#__PURE__*/_jsx(NavigationOption,{title:"Option 1",onClick:function onClick(){return alert("Option 1")}}),/*#__PURE__*/_jsx(NavigationOption,{title:"Option 2",onClick:function onClick(){return alert("Option 2")}})]})};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{useState,useEffect,useRef,useMemo}from"react";import{useIntl}from"react-intl";import Button from"../button";import Chevron from"../chevron";import{Position,getSimpleRandomId}from"../common";import BottomSheet from"../common/bottomSheet";import{stopPropagation}from"../common/domHelpers";import{useLayout}from"../common/hooks";import KeyCodes from"../common/keyCodes";import Panel from"../common/panel";import Drawer from"../drawer";import messages from"./Select.messages";import Option from"./option";import SearchBox from"./searchBox";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.string.replace.js";import"core-js/modules/es.array.concat.js";import"core-js/modules/es.string.search.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.array.reduce.js";import"core-js/modules/es.number.is-nan.js";import"core-js/modules/es.number.constructor.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.array.slice.js";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{useState,useEffect,useRef,useMemo}from"react";import{useIntl}from"react-intl";import Button from"../button";import Chevron from"../chevron";import{Position,getSimpleRandomId}from"../common";import BottomSheet from"../common/bottomSheet";import{stopPropagation}from"../common/domHelpers";import{useLayout}from"../common/hooks";import KeyCodes from"../common/keyCodes";import Panel from"../common/panel";import Drawer from"../drawer";import messages from"./Select.messages";import Option from"./option";import SearchBox from"./searchBox";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var DEFAULT_SEARCH_VALUE="",DEFAULT_OPTIONS_PAGE_SIZE=1e3,includesString=function(a,b){return a.toLowerCase().includes(b.toLowerCase())};function defaultFilterFunction(a,b){if(isPlaceholderOption(a))return!0;var c=a.label,d=a.note,e=a.secondary,f=a.currency,g=a.searchStrings;return!!c&&includesString(c,b)||!!d&&includesString(d,b)||!!e&&includesString(e,b)||!!f&&includesString(f,b)||!!g&&g.some(function(a){return includesString(a,b)})}function isActionableOption(a){return!a.header&&!a.separator&&!a.disabled}function isHeaderOption(a){return null!=a&&"header"in a}function isSeparatorOption(a){return null!=a&&"separator"in a}function clamp(a,b,c){return Math.max(Math.min(b,c),a)}/**
|
|
2
2
|
* No option or placeholder option is selected
|
|
3
|
-
*/
|
|
4
|
-
function i(){return/*#__PURE__*/_jsx("li",{className:
|
|
5
|
-
function j(a){
|
|
6
|
-
className:classNames(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
,
|
|
10
|
-
,{className:classNames(K("tw-icon"),K("tw-chevron-up-icon"),K("tw-chevron"),K("bottom"),K("np-select-chevron"))})]}),fa?Y?/*#__PURE__*/_jsx(Drawer,{open:s,headerTitle:D||I(messages.searchPlaceholder),onClose:ha,children:f()}):/*#__PURE__*/_jsx(BottomSheet,{open:s,onClose:ha,children:f({className:J?"":"p-a-1"})}):/*#__PURE__*/_jsx(Panel,{open:s,flip:!1,altAxis:!0,anchorRef:V,anchorWidth:Z,position:F?Position.TOP:Position.BOTTOM,onClose:ha,children:f({className:"p-a-1"})})]})}Select.propTypes={placeholder:PropTypes.string,id:PropTypes.string,required:PropTypes.bool,disabled:PropTypes.bool,inverse:PropTypes.bool,dropdownRight:PropTypes.oneOf(["xs","sm","md","lg","xl"]),dropdownWidth:PropTypes.oneOf(["sm","md","lg"]),size:PropTypes.oneOf(["sm","md","lg"]),block:PropTypes.bool,selected:PropTypes.shape({value:PropTypes.any.isRequired,label:PropTypes.node,icon:PropTypes.node,currency:PropTypes.string,note:PropTypes.node,secondary:PropTypes.node}),/**
|
|
3
|
+
*/var DEFAULT_SELECTED_OPTION=null;function isPlaceholderOption(a){return a===DEFAULT_SELECTED_OPTION||"placeholder"in a}function isSearchableOption(a){return!isHeaderOption(a)&&!isSeparatorOption(a)&&!isPlaceholderOption(a)}var getUniqueIdForOption=function(){var a,b,c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",d=1<arguments.length?arguments[1]:void 0;if(null!=d){var e=d.value||(null!==(a=null===(b=d.label)||void 0===b?void 0:b.replace(/\s/g,""))&&void 0!==a?a:"");return"option-".concat(c,"-").concat(e)}};export default function Select(a){function b(){null!=W&&0<ka.length&&e(ka[W])}function c(a){var b,c=ka.reduce(function(a,b,c){return null==a?k(v,b)?c:null:a},null),d=null!==(b=Z.current)&&void 0!==b?b:-1,e=d;-1===d&&(null==c?X(0):e=c);var f=e+a,g=clamp(0,ka.length-1,f);X(g)}function d(a){return function(b){stopPropagation(b),e(a)}}function e(a){x(isPlaceholderOption(a)?DEFAULT_SELECTED_OPTION:a),sa()}function f(){var a,b=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},c=b.className,d=classNames(M("np-dropdown-menu"),(a={},_defineProperty(a,M("np-dropdown-menu-desktop"),!qa),_defineProperty(a,M("np-dropdown-menu-".concat(r)),!qa&&!ha),a),M(c));return/*#__PURE__*/_jsxs("ul",_objectSpread(_objectSpread({ref:fa,id:na,role:"listbox",tabIndex:"-1",className:d},G),{},{children:[!o&&!ga&&!!m&&/*#__PURE__*/_jsx(h,{}),ga&&/*#__PURE__*/_jsx(SearchBox,{ref:ca,id:oa,classNames:E,value:C||S,placeholder:D||J(messages.searchPlaceholder),focusedOptionId:getUniqueIdForOption(n,la),onChange:ra,onClick:stopPropagation}),ja.slice(0,aa).map(ta),aa<ja.length&&/*#__PURE__*/_jsx(g,{})]}))}function g(){function a(a){stopPropagation(a),ba(aa+DEFAULT_OPTIONS_PAGE_SIZE)}return/*#__PURE__*/ (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */_jsx("li",{className:classNames(M("clickable"),M("border-bottom"),M("show-more")),onClick:a,onKeyPress:a,children:/*#__PURE__*/_jsx("a",{children:"..."})}))}function h(){var a={placeholder:m};return/*#__PURE__*/ (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */_jsx("li",{className:classNames(M("clickable"),M("border-bottom")),onClick:d(a),onKeyPress:d(a),children:/*#__PURE__*/_jsx("a",{children:m})}))}// eslint-disable-next-line react/prop-types
|
|
4
|
+
function i(){return/*#__PURE__*/_jsx("li",{className:M("np-separator"),"aria-hidden":!0})}// eslint-disable-next-line react/prop-types
|
|
5
|
+
function j(a){var b=a.children;return/*#__PURE__*/_jsx("li",{// eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
|
|
6
|
+
className:classNames(M("np-dropdown-header"),M("np-text-title-group")),onClick:stopPropagation,onKeyPress:stopPropagation,children:b})}function k(a,b){return(null===a||void 0===a?void 0:a.value)===(null===b||void 0===b?void 0:b.value)}function l(a){return ja.reduce(function(b,c,d){return d<a&&isActionableOption(c)?b+1:b},0)}var m=a.placeholder,n=a.id,o=a.required,p=a.disabled,q=a.inverse,r=a.dropdownWidth,t=a.size,u=a.block,v=a.selected,w=a.search,x=a.onChange,y=a.onFocus,z=a.onBlur,A=a.options,B=a.onSearchChange,C=a.searchValue,D=a.searchPlaceholder,E=a.classNames,F=a.dropdownUp,G=a.dropdownProps,H=a.buttonProps,I=useIntl(),J=I.formatMessage,K=useTheme(),L=K.isModern,M=function(a){return E[a]||a},s=useState(!1),N=_slicedToArray(s,2),O=N[0],P=N[1],Q=useState(DEFAULT_SEARCH_VALUE),R=_slicedToArray(Q,2),S=R[0],T=R[1],U=useState(null),V=_slicedToArray(U,2),W=V[0],X=V[1],Y=useRef(),Z=useRef(),$=useState(DEFAULT_OPTIONS_PAGE_SIZE),_=_slicedToArray($,2),aa=_[0],ba=_[1],ca=useRef(null),da=useRef(null),ea=useRef(null),fa=useRef(null),ga=!!B||!!w,ha=null==r,ia=useMemo(function(){return getSimpleRandomId("np-select-")},[]),ja=useMemo(function(){return w&&S?A.filter(isSearchableOption).filter(function(a){return"function"==typeof w?w(a,S):defaultFilterFunction(a,S)}):A},[A,w,S]),ka=useMemo(function(){return ja.filter(isActionableOption)},[ja]),la=ka[W],ma=n||ia,na="".concat(ma,"-listbox"),oa="".concat(ma,"-searchbox"),pa=useLayout(),qa=pa.isMobile;useEffect(function(){var a;if(0<=W)return requestAnimationFrame(function(){if(!a)if(ga){var b,c;null===(b=Y.current)||void 0===b||null===(c=b.scrollIntoView)||void 0===c?void 0:c.call(b,{block:"center"})}else{var d;null===(d=Y.current)||void 0===d?void 0:d.focus()}}),function(){a=!0}},[W,ga]);var ra=function(a){ba(DEFAULT_OPTIONS_PAGE_SIZE),T(a.target.value),B&&B(a.target.value)};useEffect(function(){O?((!qa||S)&&(ga&&!!ca.current&&ca.current.focus(),!ga&&fa.current&&(null==Z.current||Number.isNaN(Z.current))&&fa.current.focus()),Z.current=W):Z.current=null},[O,S,ga,qa,W]);var sa=function(){P(!1),X(null),ea.current&&ea.current.focus()},ta=function(a,b){var c,e=a;if(isSeparatorOption(e)&&null!==e&&void 0!==e&&e.separator)return/*#__PURE__*/_jsx(i,{},b);var f=a;if(isHeaderOption(f)&&f.header)return/*#__PURE__*/_jsx(j,{children:f.header},b);var g=k(v,a),h=a,m=!h.disabled&&W===l(b),o=classNames(M("np-dropdown-item"),h.disabled?[M("disabled")]:M("clickable"),(c={},_defineProperty(c,M("active"),g),_defineProperty(c,M("np-dropdown-item--focused"),m),c)),p=h.disabled?stopPropagation:d(h);return/*#__PURE__*/ (/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */_jsx("li",{ref:m?Y:void 0,id:getUniqueIdForOption(n,a),"aria-selected":g,"aria-disabled":a.disabled,role:"option",tabIndex:"-1",className:o,onClick:p,onKeyPress:p,children:/*#__PURE__*/_jsx("a",{disabled:h.disabled,children:/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},h),{},{classNames:E}))})},b))},ua=!!A.length;return O&&(C||S)&&(ua&&null==W&&X(0),!ua&&null!=W&&X(null)),/*#__PURE__*/_jsxs("div",{// eslint-disable-line jsx-a11y/no-static-element-interactions
|
|
7
|
+
ref:da,className:classNames(M("np-select"),u?M("btn-block"):null,M("btn-group")),onKeyDown:function handleKeyDown(a){switch(a.keyCode){case KeyCodes.UP:case KeyCodes.DOWN:O?c(a.keyCode===KeyCodes.UP?-1:1):P(!0),stopPropagation(a);break;case KeyCodes.SPACE:a.target!==ca.current&&(O?b():P(!0),stopPropagation(a));break;case KeyCodes.ENTER:O?b():P(!0),stopPropagation(a);break;case KeyCodes.ESCAPE:sa(),stopPropagation(a);break;case KeyCodes.TAB:O&&b();break;default:}},onTouchMove:function handleTouchStart(a){a.currentTarget===a.target&&O&&sa()},onFocus:function handleOnFocus(a){y&&y(a)},onBlur:function handleOnBlur(a){var b=a.nativeEvent;if(b){var c=b.relatedTarget,d=a.currentTarget;if(d&&c&&d.contains(c))return}z&&z(a)},children:[/*#__PURE__*/_jsxs(Button,_objectSpread(_objectSpread({ref:ea,id:ma,block:u,size:t,htmlType:"button",className:classNames(M("np-dropdown-toggle"),M("np-text-body-large"),q?M("np-dropdown-toggle-navy"):null)// reset Button's styles
|
|
8
|
+
,type:null,priority:null,disabled:p,role:"combobox","aria-controls":na,"aria-expanded":O,"aria-autocomplete":"none",onClick:function handleOnClick(){P(!0)}},H),{},{children:[v?/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},v),{},{classNames:E,selected:!0})):/*#__PURE__*/_jsx("span",{className:M("form-control-placeholder"),children:m}),/*#__PURE__*/_jsx(Chevron// disabled={disabled}
|
|
9
|
+
,{className:classNames(M("tw-icon"),M("tw-chevron-up-icon"),M("tw-chevron"),M("bottom"),M("np-select-chevron"))})]})),qa?ga?/*#__PURE__*/_jsx(Drawer,{open:O,headerTitle:D||J(messages.searchPlaceholder),onClose:sa,children:f()}):/*#__PURE__*/_jsx(BottomSheet,{open:O,onClose:sa,children:f({className:L?"":"p-a-1"})}):/*#__PURE__*/_jsx(Panel,{open:O,flip:!1,altAxis:!0,anchorRef:da,anchorWidth:ha,position:F?Position.TOP:Position.BOTTOM,onClose:sa,children:f({className:"p-a-1"})})]})}Select.propTypes={placeholder:PropTypes.string,id:PropTypes.string,required:PropTypes.bool,disabled:PropTypes.bool,inverse:PropTypes.bool,dropdownRight:PropTypes.oneOf(["xs","sm","md","lg","xl"]),dropdownWidth:PropTypes.oneOf(["sm","md","lg"]),size:PropTypes.oneOf(["sm","md","lg"]),block:PropTypes.bool,selected:PropTypes.shape({value:PropTypes.any.isRequired,label:PropTypes.node,icon:PropTypes.node,currency:PropTypes.string,note:PropTypes.node,secondary:PropTypes.node}),/**
|
|
11
10
|
* Search toggle
|
|
12
11
|
* if `true` default search functionality being enabled (not case sensitive search in option labels & currency props)
|
|
13
12
|
* if `function` you can define your own search function to implement custom search experience. This search function used while filtering the options array. The custom search function takes two parameters. First is the option the second is the keyword.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import{useTheme}from"@wise/components-theming";import{cloneElement}from"react";import Body from"../../body";import{Typography}from"../../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";function Option(a){
|
|
1
|
+
import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.map.js";// Option.tsx NEW
|
|
2
|
+
import{useTheme}from"@wise/components-theming";import{cloneElement}from"react";import Body from"../../body";import{Typography}from"../../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";function Option(a){var b=a.label,c=a.currency,d=void 0===c?"":c,e=a.note,f=void 0===e?"":e,g=a.secondary,h=void 0===g?"":g,i=a.icon,j=a.classNames,k=void 0===j?{}:j,l=a.selected,m=void 0!==l&&l,n=useTheme(),o=n.isModern,p=d?function style(a){return a.map(function(a){return k[a]||a}).join(" ")}(["currency-flag","currency-flag-".concat(d.toLowerCase())]):void 0,q=i?/*#__PURE__*/cloneElement(i,{size:24,className:"tw-icon"}):d&&/*#__PURE__*/_jsx("i",{className:p}),r=/*#__PURE__*/_jsxs(Body,{as:"span",type:Typography.BODY_LARGE,className:m?"text-ellipsis":void 0,children:[b,f&&/*#__PURE__*/_jsx(Body,{as:"span",className:o?"m-l-1":"m-l-1 body-2",children:f})]}),s=h&&/*#__PURE__*/_jsx(Body,{className:function secondaryElementClassNames(){var a;return m&&(a="text-ellipsis"),o?a:"".concat(a?a+" ":"","body-2")}(),children:h});return q?/*#__PURE__*/_jsxs("div",{className:"d-flex np-option-content",children:[/*#__PURE__*/_jsx("div",{className:"d-flex flex-column".concat(m?" justify-content-center":""),children:q}),/*#__PURE__*/_jsxs("div",{className:"d-flex flex-column justify-content-center",children:[r,s]})]}):/*#__PURE__*/_jsxs(_Fragment,{children:[q,r,s]})}export default Option;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Search as SearchIcon}from"@transferwise/icons";import classnames from"classnames";import{forwardRef}from"react";import{Input}from"../../inputs/Input";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import"core-js/modules/es.array.concat.js";import{Search as SearchIcon}from"@transferwise/icons";import classnames from"classnames";import{forwardRef}from"react";import{Input}from"../../inputs/Input";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var SearchBox=/*#__PURE__*/forwardRef(function(a,b){var c=a.id,d=a.classNames,e=void 0===d?{}:d,f=a.focusedOptionId,g=a.onChange,h=a.onClick,i=a.placeholder,j=void 0===i?void 0:i,k=a.value,l=void 0===k?"":k,m=function(a){return e[a]||a};return/*#__PURE__*/_jsx("li",{className:m("border-bottom"),children:/*#__PURE__*/_jsx("a",{className:"".concat(m("np-select-filter-link")," ").concat(m("p-a-0")),children:/*#__PURE__*/_jsxs("div",{className:m("input-group"),children:[/*#__PURE__*/_jsx("span",{className:classnames("input-group-addon","input-group-addon--search"),children:/*#__PURE__*/_jsx(SearchIcon,{className:classnames(m("tw-icon"),m("tw-icon-search")),size:24})}),/*#__PURE__*/_jsx(Input,{ref:b,id:c,className:classnames(m("np-select-filter")),placeholder:j,value:l,spellCheck:"false","aria-activedescendant":f,onChange:g,onClick:h})]})})})});export default SearchBox;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useRef}from"react";import{Breakpoint}from"../common";import{useClientWidth}from"../common/hooks";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.object.values.js";import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useRef}from"react";import{Breakpoint}from"../common";import{useClientWidth}from"../common/hooks";import{jsx as _jsx}from"react/jsx-runtime";var Layout={COLUMN:"COLUMN"},SizeSwapper=/*#__PURE__*/forwardRef(function(a,b){var c=a.items,d=a.inline,e=useRef(null),f=useClientWidth({ref:b||e}),g=_slicedToArray(f,1),h=g[0];if(!c||0===c.length)return null;// If all breakpoints are specified and clientWidth never > breakpoint itemsToRender can be undefined.
|
|
2
2
|
// Do not use deconstruct here to get items and layout.
|
|
3
|
-
|
|
3
|
+
var i=[];// Always return parent container even if there are no items to display to
|
|
4
4
|
// keep the ref on DOM and let clientWidth be calculated properly.
|
|
5
|
-
return
|
|
5
|
+
return h?i=c.filter(function(a){var b=a.breakpoint,c=void 0===b?0:b;return h>=c}).pop():i.items=c.map(function(a){var b=a.items;return Object.values(b)}),/*#__PURE__*/_jsx("div",{ref:e,className:classNames("np-size-swapper",{"d-flex":!d,"d-inline-flex":d,"flex-column":i&&i.layout===Layout.COLUMN,"flex-wrap":i&&i.wrap}),style:{visibility:h?"visible":"hidden"},children:i&&i.items})});SizeSwapper.Breakpoint=Breakpoint,SizeSwapper.Layout=Layout,SizeSwapper.propTypes={inline:PropTypes.bool,/** List of items that will appear at the specified breakpoint and presented in row or columns depending on layout */items:PropTypes.arrayOf(PropTypes.shape({items:PropTypes.arrayOf(PropTypes.element),breakpoint:PropTypes.number,layout:PropTypes.oneOf([SizeSwapper.Layout.COLUMN]),wrap:PropTypes.bool})).isRequired},SizeSwapper.defaultProps={inline:!1};export default SizeSwapper;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useRef}from"react";import mergeRefs from"react-merge-refs";import CSSTransition from"react-transition-group/CSSTransition";import{jsx as _jsx}from"react/jsx-runtime";export
|
|
2
|
-
,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:classNames(
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["children","className","open","position","showSlidingPanelBorder","slidingPanelPositionFixed"];import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useRef}from"react";import mergeRefs from"react-merge-refs";import CSSTransition from"react-transition-group/CSSTransition";import{jsx as _jsx}from"react/jsx-runtime";export var EXIT_ANIMATION=350;var SlidingPanel=/*#__PURE__*/forwardRef(function(a,b){var c=a.children,d=a.className,e=a.open,f=a.position,g=a.showSlidingPanelBorder,h=a.slidingPanelPositionFixed,i=_objectWithoutProperties(a,_excluded),j=useRef(null);return/*#__PURE__*/_jsx(CSSTransition,_objectSpread(_objectSpread({},i),{},{nodeRef:j,in:e// Wait for animation to finish before unmount.
|
|
2
|
+
,timeout:{enter:0,exit:EXIT_ANIMATION},classNames:classNames("sliding-panel--open-".concat(f),g&&"sliding-panel--border-".concat(f),{"sliding-panel--fixed":h},"sliding-panel"),appear:!0,unmountOnExit:!0,children:/*#__PURE__*/_jsx("div",{ref:mergeRefs([b,j]),className:classNames("sliding-panel","sliding-panel--open-".concat(f),d),children:c})}))});SlidingPanel.propTypes={children:PropTypes.node,className:PropTypes.string,open:PropTypes.bool,position:PropTypes.oneOf(["top","bottom","left","right"]),showSlidingPanelBorder:PropTypes.bool,slidingPanelPositionFixed:PropTypes.bool},SlidingPanel.defaultProps={children:null,className:void 0,open:!1,position:"left",showSlidingPanelBorder:!1,slidingPanelPositionFixed:!1};export default SlidingPanel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import{Component,createRef}from"react";import CSSTransition from"react-transition-group/CSSTransition";import ActionButton from"../actionButton";import Body from"../body";import{Theme}from"../common";import{DirectionContext}from"../provider/direction";import withNextPortal from"../withNextPortal/withNextPortal";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.reflect.construct.js";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import PropTypes from"prop-types";import{Component,createRef}from"react";import CSSTransition from"react-transition-group/CSSTransition";import ActionButton from"../actionButton";import Body from"../body";import{Theme}from"../common";import{DirectionContext}from"../provider/direction";import withNextPortal from"../withNextPortal/withNextPortal";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export var CSS_TRANSITION_DURATION=400;export var Snackbar=/*#__PURE__*/function(a){/** @type {RefObject<HTMLSpanElement>} */function b(){var a;return _classCallCheck(this,b),a=c.call(this),_defineProperty(_assertThisInitialized(a),"bodyRef",/*#__PURE__*/createRef()),_defineProperty(_assertThisInitialized(a),"setLeaveTimeout",function(){var b=a.props.timeout;a.timeout=setTimeout(function(){a.setState({visible:!1})},b)}),a.state={visible:!1,text:""},a}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"componentWillUnmount",value:function componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.transitionTimeout)}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(a,b){return!!a.text&&(a.timestamp!==this.props.timestamp||b.visible!==this.state.visible||b.text!==this.state.text)}},{key:"componentDidUpdate",value:function componentDidUpdate(a){var b=this,c=this.props,d=c.action,e=c.text,f=c.theme,g=c.timestamp;a.text?a.timestamp!==g&&(clearTimeout(this.timeout),this.state.visible?this.setState({visible:!1},function(){b.transitionTimeout=setTimeout(function(){b.setState({visible:!0,action:d,text:e,theme:f}),b.setLeaveTimeout()},CSS_TRANSITION_DURATION)}):(this.setState({visible:!0,action:d,text:e,theme:f}),this.setLeaveTimeout())):this.setState({visible:!0,action:d,text:e,theme:f},function(){b.setLeaveTimeout()})}},{key:"render",value:function render(){var a=this.state,b=a.action,c=a.text,d=a.theme,e=a.visible,f=this.props.timeout;return/*#__PURE__*/_jsx("div",{className:"snackbar",children:/*#__PURE__*/_jsx(CSSTransition,{nodeRef:this.bodyRef,in:e,classNames:"snackbar__text-container",timeout:{appear:0,enter:f,exit:CSS_TRANSITION_DURATION},unmountOnExit:!0,children:/*#__PURE__*/_jsxs(Body,{ref:this.bodyRef,as:"span",className:"snackbar__text snackbar__text--".concat(d),children:[c,b?/*#__PURE__*/_jsx(ActionButton,{className:"snackbar__text__action",onClick:b.onClick,children:b.label}):null]})})})}}]),b}(Component);Snackbar.contextType=DirectionContext,Snackbar.propTypes={action:PropTypes.shape({label:PropTypes.string.isRequired,onClick:PropTypes.func.isRequired}),text:PropTypes.node.isRequired,theme:PropTypes.oneOf(["light","dark"]),timeout:PropTypes.number.isRequired,timestamp:PropTypes.number.isRequired},Snackbar.defaultProps={action:null,theme:Theme.LIGHT};export default withNextPortal(Snackbar);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext}from"react";export
|
|
1
|
+
import{createContext}from"react";export var SnackbarContext=/*#__PURE__*/createContext();export var SnackbarConsumer=SnackbarContext.Consumer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import{Component}from"react";import SnackbarPortal from"./Snackbar";import{SnackbarContext}from"./SnackbarContext";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.reflect.construct.js";function _createSuper(a){var b=_isNativeReflectConstruct();return function(){var c,d=_getPrototypeOf(a);if(b){var e=_getPrototypeOf(this).constructor;c=Reflect.construct(d,arguments,e)}else c=d.apply(this,arguments);return _possibleConstructorReturn(this,c)}}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(a){return!1}}import PropTypes from"prop-types";import{Component}from"react";import SnackbarPortal from"./Snackbar";import{SnackbarContext}from"./SnackbarContext";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var SnackbarProvider=/*#__PURE__*/function(a){function b(){var a;return _classCallCheck(this,b),a=c.call(this),_defineProperty(_assertThisInitialized(a),"create",function(b){var c=b.action,d=b.text,e=b.theme;a.setState({action:c,text:d,theme:e,timestamp:Date.now()})}),a.state={text:"",timestamp:0},a}_inherits(b,a);var c=_createSuper(b);return _createClass(b,[{key:"render",value:function render(){var a=this.state,b=a.action,c=a.text,d=a.theme,e=a.timestamp;return/*#__PURE__*/_jsxs(SnackbarContext.Provider,{value:{createSnackbar:this.create},children:[/*#__PURE__*/_jsx(SnackbarPortal,{action:b,text:c,timestamp:e,timeout:this.props.timeout,theme:d}),this.props.children]})}}]),b}(Component);SnackbarProvider.propTypes={children:PropTypes.node.isRequired,timeout:PropTypes.number},SnackbarProvider.defaultProps={timeout:4500};export default SnackbarProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext}from"react";import{SnackbarContext}from"./SnackbarContext";function useSnackbar(){
|
|
1
|
+
import{useContext}from"react";import{SnackbarContext}from"./SnackbarContext";function useSnackbar(){var a=useContext(SnackbarContext),b=a.createSnackbar;return b}export default useSnackbar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Info,Alert,Cross,Check,ClockBorderless}from"@transferwise/icons";import classNames from"classnames";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.array.includes.js";import"core-js/modules/es.string.includes.js";import{Info,Alert,Cross,Check,ClockBorderless}from"@transferwise/icons";import classNames from"classnames";import{Sentiment}from"../common";import{jsx as _jsx}from"react/jsx-runtime";var StatusIcon=function(a){var b,c=a.sentiment,d=void 0===c?Sentiment.NEUTRAL:c,e=a.size,f=(b={},_defineProperty(b,Sentiment.POSITIVE,Check),_defineProperty(b,Sentiment.NEUTRAL,Info),_defineProperty(b,Sentiment.WARNING,Alert),_defineProperty(b,Sentiment.NEGATIVE,Cross),_defineProperty(b,Sentiment.PENDING,ClockBorderless),_defineProperty(b,Sentiment.INFO,Info),_defineProperty(b,Sentiment.ERROR,Cross),_defineProperty(b,Sentiment.SUCCESS,Check),b),g=[Sentiment.WARNING,Sentiment.PENDING].includes(d)?"dark":"light",h=f[d];return/*#__PURE__*/_jsx("span",{"data-testid":"status-icon",className:classNames("status-circle","status-circle-"+e,d),children:/*#__PURE__*/_jsx(h,{className:classNames("status-icon",g)})})};export default StatusIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Size,Sentiment}from"../common";import StatusIcon from"./StatusIcon";import{jsx as _jsx}from"react/jsx-runtime";export default{component:StatusIcon,title:"Other/StatusIcon"};export
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";import"core-js/modules/es.array.map.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import{Size,Sentiment}from"../common";import StatusIcon from"./StatusIcon";import{jsx as _jsx}from"react/jsx-runtime";export default{component:StatusIcon,title:"Other/StatusIcon"};export var Basic={render:function render(a){return/*#__PURE__*/_jsx("span",{style:{display:"flex"},children:/*#__PURE__*/_jsx(StatusIcon,_objectSpread({},a))})}};export var Variants={render:function render(){return/*#__PURE__*/_jsx("span",{style:{display:"flex",justifyContent:"space-between",maxWidth:"400px"},children:[Sentiment.POSITIVE,Sentiment.NEGATIVE,Sentiment.NEUTRAL,Sentiment.WARNING,Sentiment.PENDING].map(function(a){return/*#__PURE__*/_jsx("span",{style:{display:"flex",justifyContent:"space-between",flexDirection:"column",minHeight:"150px",alignItems:"center"},children:[Size.SMALL,Size.MEDIUM,Size.LARGE].map(function(b){return/*#__PURE__*/_jsx(StatusIcon,{size:b,sentiment:a},b)})},a)})})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body/Body";import{Position}from"../common";import{useDirection}from"../common/hooks";import Tooltip from"../tooltip";import{isTouchDevice}from"./deviceDetection";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function clamp(a,b,c){return Math.max(Math.min(b,c),a)}/* eslint-disable react/no-array-index-key */
|
|
1
|
+
import"core-js/modules/es.array.map.js";import classNames from"classnames";import PropTypes from"prop-types";import Body from"../body/Body";import{Position}from"../common";import{useDirection}from"../common/hooks";import Tooltip from"../tooltip";import{isTouchDevice}from"./deviceDetection";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";function clamp(a,b,c){return Math.max(Math.min(b,c),a)}/* eslint-disable react/no-array-index-key */var Stepper=function(a){var b=a.steps,c=a.activeStep,d=a.className,e=useDirection(),f=e.isRTL;if(0===b.length)return null;var g=clamp(0,b.length-1,c),h=1/(b.length-1),i=g/(b.length-1),j=Math.max(i-h,0),k=Math.min(g,1)*h;return/*#__PURE__*/_jsxs("div",{className:classNames("tw-stepper",d),children:[/*#__PURE__*/_jsxs("div",{className:"progress",children:[/*#__PURE__*/_jsx("div",{className:"progress-bar-filler",style:{width:"".concat(100*j,"%")}}),/*#__PURE__*/_jsx("div",{className:"progress-bar-ending",style:{width:"".concat(100*k,"%")}})]}),/*#__PURE__*/_jsx("ul",{className:"tw-stepper-steps p-t-1 m-b-0",children:b.map(function renderStep(a,b){var c=b===g,d=a.onClick&&!c,e=d?/*#__PURE__*/_jsx("button",{type:"button",className:"btn-unstyled tw-stepper__step-label",onClick:function onClick(){return d&&a.onClick()},children:/*#__PURE__*/_jsx("small",{children:a.label})}):/*#__PURE__*/_jsx(Body,{as:"span",className:"tw-stepper__step-label small",children:a.label});return/*#__PURE__*/_jsx("li",{className:classNames("hidden-xs","tw-stepper__step",c&&"tw-stepper__step--active",d&&"tw-stepper__step--clickable",a.hoverLabel&&"tw-stepper__step--has-tooltip"),style:f?{right:"".concat(100*(b*h),"%")}:{left:"".concat(100*(b*h),"%")},children:a.hoverLabel&&!isTouchDevice()?/*#__PURE__*/_jsx(Tooltip,{position:Position.BOTTOM,label:a.hoverLabel,children:e}):e},b)})})]})};/* eslint-enable react/no-array-index-key */Stepper.propTypes={steps:PropTypes.arrayOf(PropTypes.shape({label:PropTypes.node.isRequired,onClick:PropTypes.func,hoverLabel:PropTypes.node})).isRequired,activeStep:PropTypes.number,className:PropTypes.string},Stepper.defaultProps={activeStep:0,className:void 0};export default Stepper;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function supportsTouchEvents(){
|
|
2
|
-
return!!(a||b||c)}function userAgentSuggestsTouchDevice(){
|
|
1
|
+
import"core-js/modules/es.array.join.js";import"core-js/modules/es.array.map.js";import"core-js/modules/es.regexp.constructor.js";import"core-js/modules/es.regexp.exec.js";import"core-js/modules/es.regexp.to-string.js";import"core-js/modules/es.string.match.js";function supportsTouchEvents(){var a="undefined"!=typeof window&&window.ontouchstart!==void 0,b="undefined"!=typeof navigator&&navigator.maxTouchPoints,c="undefined"!=typeof window&&window.DocumentTouch&&document instanceof window.DocumentTouch;// eslint-disable-next-line compat/compat
|
|
2
|
+
return!!(a||b||c)}function userAgentSuggestsTouchDevice(){var a=["android","iemobile","iphone","ipad","ipod","blackberry","bada"].map(function(a){return"(".concat(a,")")}).join("|"),b=new RegExp(a,"ig");return"undefined"!=typeof navigator&&!!navigator.userAgent.match(b)}// Important: this is not fool-proof! It gives false positives and negatives, and will be outdated.
|
|
3
3
|
// Only use this for small vanity changes where it still works either way.
|
|
4
4
|
export function isTouchDevice(){return supportsTouchEvents()||userAgentSuggestsTouchDevice()}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import SlidingPanel from"../slidingPanel";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import PropTypes from"prop-types";import SlidingPanel from"../slidingPanel";import{jsx as _jsx}from"react/jsx-runtime";var Sticky=function(a){var b=a.open,c=a.position,d=a.children;return/*#__PURE__*/_jsx(SlidingPanel,{open:b,position:c,slidingPanelPositionFixed:!0,showSlidingPanelBorder:!0,children:d})};Sticky.propTypes={open:PropTypes.bool,position:PropTypes.oneOf(["top","bottom"]),children:PropTypes.node},Sticky.defaultProps={open:!0,position:"bottom",children:null};export default Sticky;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CheckCircleFill as CheckCircleIcon,ClockFill as PendingCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{cloneElement}from"react";import{useIntl}from"react-intl";import requiredIf from"react-required-if";import Body from"../body";import{Status,Size,Typography,Sentiment}from"../common";import Info from"../info";import Link from"../link/Link";import StatusIcon from"../statusIcon";import{deprecated}from"../utilities";import messages from"./Summary.messages";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";var _statusLabels,_statusMapping;import"core-js/modules/es.symbol.js";import"core-js/modules/es.symbol.description.js";import{CheckCircleFill as CheckCircleIcon,ClockFill as PendingCircleIcon}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classNames from"classnames";import PropTypes from"prop-types";import{cloneElement}from"react";import{useIntl}from"react-intl";import requiredIf from"react-required-if";import Body from"../body";import{Status,Size,Typography,Sentiment}from"../common";import Info from"../info";import Link from"../link/Link";import StatusIcon from"../statusIcon";import{deprecated}from"../utilities";import messages from"./Summary.messages";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var BadgeIcons={done:CheckCircleIcon,pending:PendingCircleIcon},statusLabels=(_statusLabels={},_defineProperty(_statusLabels,Status.NOT_DONE,"statusNotDone"),_defineProperty(_statusLabels,Status.DONE,"statusDone"),_defineProperty(_statusLabels,Status.PENDING,"statusPending"),_statusLabels),statusMapping=(_statusMapping={},_defineProperty(_statusMapping,Status.DONE,Sentiment.POSITIVE),_defineProperty(_statusMapping,Status.PENDING,Sentiment.PENDING),_statusMapping),expiryDate=new Date("03-01-2021"),Summary=function(a){var b=a.action,c=a.as,d=a.className,e=a.content,f=a.description,g=void 0===f?e:f,h=a.help,i=a.icon,j=a.illustration,k=a.info,l=void 0===k?h:k,m=a.status,n=a.title,o=useTheme(),p=o.isModern,q=useIntl(),r=j;if(i){var s,t=null===i||void 0===i||null===(s=i.props)||void 0===s?void 0:s.size;r=24===t?i:/*#__PURE__*/cloneElement(i,{size:24})}var u=m&&BadgeIcons[m];return/*#__PURE__*/_jsxs(c,{className:classNames("np-summary d-flex align-items-start",d),"aria-label":m&&q.formatMessage(messages[statusLabels[m]]),children:[/*#__PURE__*/_jsxs("div",{className:"np-summary__icon",children:[r,u&&(p?/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(StatusIcon,{size:Size.SMALL,sentiment:statusMapping[m]})}):/*#__PURE__*/_jsx(u,{size:16,className:"np-summary-icon__".concat(m)}))]}),/*#__PURE__*/_jsxs("div",{className:"np-summary__body m-l-2",children:[/*#__PURE__*/_jsxs("div",{className:"np-summary__title d-flex",children:[/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_LARGE_BOLD,className:"text-primary m-b-1",children:n}),l&&/*#__PURE__*/_jsx(Info,{"aria-label":l["aria-label"],className:"m-l-1 hidden-xs",content:l.content,presentation:l.presentation,size:p?Size.LARGE:Size.SMALL,title:l.title,onClick:l.onClick})]}),g&&/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_DEFAULT,className:"d-block np-summary__description",children:g}),b&&/*#__PURE__*/_jsx(Link,{href:b.href,target:b.target,className:"np-summary__action","aria-label":b["aria-label"],onClick:b.onClick,children:b.text})]}),l&&/*#__PURE__*/_jsx(Info,{"aria-label":l["aria-label"],className:"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl",content:l.content,presentation:l.presentation,size:p?Size.LARGE:Size.SMALL,title:l.title,onClick:l.onClick})]})};Summary.propTypes={/** Action displayed at the bottom of the Summary */action:PropTypes.shape({text:PropTypes.node.isRequired,href:PropTypes.string.isRequired,"aria-label":PropTypes.string,target:PropTypes.string,onClick:PropTypes.func}),/** Decides which html element should wrap the Summary */as:PropTypes.string,/** Extra classes applied to Summary */className:PropTypes.string,/** @deprecated please use description instead */content:deprecated(PropTypes.node,{component:"Summary",newProp:"description",expiryDate:expiryDate}),/** Summary description */description:PropTypes.node,/** @deprecated please use info instead */help:deprecated(PropTypes.shape({content:PropTypes.node.isRequired,title:PropTypes.node}),{component:"Summary",newProp:"info",expiryDate:expiryDate}),/** Infos displayed on help Icon click inside Popover or Modal */info:PropTypes.shape({"aria-label":PropTypes.string.isRequired,content:PropTypes.node.isRequired,onClick:PropTypes.func,presentation:PropTypes.oneOf(["POPOVER","MODAL"]),title:PropTypes.node}),/** @deprecated please use icon instead */illustration:deprecated(PropTypes.node,{component:"Summary",newProp:"icon",expiryDate:expiryDate}),/** Main Summary Icon */icon:requiredIf(PropTypes.node,function(a){var b=a.illustration;return!b}),/** Decides the badge applied to Icon */status:PropTypes.oneOf(["notDone","done","pending"]),/** Summary title */title:PropTypes.node.isRequired},Summary.defaultProps={action:null,as:"div",className:null,content:null,help:null,illustration:null,status:null};export default Summary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CheckCircleFill,CrossCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classnames from"classnames";import KeyCodes from"../common/keyCodes";import{logActionRequiredIf}from"../utilities";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import{CheckCircleFill,CrossCircleFill}from"@transferwise/icons";import{useTheme}from"@wise/components-theming";import classnames from"classnames";import KeyCodes from"../common/keyCodes";import{logActionRequiredIf}from"../utilities";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Switch=function(a){var b=useTheme(),c=b.isModern,d=a.checked,e=a.className,f=a.id,g=a.onClick,h=a.disabled,i=a["aria-label"],j=i?void 0:a["aria-labelledby"];return logActionRequiredIf("Switch now expects either `aria-label` or `aria-labelledby`, and will soon make these props required. Please update your usage to provide one or the other.",!i&&!j),/*#__PURE__*/_jsxs("span",{className:classnames("np-switch",{"np-switch--unchecked":!d,"np-switch--checked":d,disabled:h},e),tabIndex:0,role:"switch","aria-checked":d,"aria-label":i,"aria-labelledby":j,id:f,"aria-disabled":h,onClick:h?void 0:g,onKeyDown:h?void 0:function handleKeyDown(a){("32"===a.code||a.keyCode===KeyCodes.SPACE)&&(a.preventDefault(),g())},children:[function returnIcon(){return c?/*#__PURE__*/_jsx("span",{className:"np-switch--thumb"}):d?/*#__PURE__*/_jsx("span",{className:"np-switch--thumb",children:/*#__PURE__*/_jsx(CheckCircleFill,{size:24})}):/*#__PURE__*/_jsx("span",{className:"np-switch--thumb",children:/*#__PURE__*/_jsx(CrossCircleFill,{size:24})})}(),/*#__PURE__*/_jsx("input",{type:"checkbox",checked:d,readOnly:!0})]})};export default Switch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState}from"react";import Switch from"./Switch";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Switch,title:"Actions/Switch"};export
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useState}from"react";import Switch from"./Switch";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:Switch,title:"Actions/Switch"};export var Basic=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1],e=useState(!1),f=_slicedToArray(e,2),g=f[0],h=f[1];return/*#__PURE__*/_jsxs("div",{className:"d-flex flex-column",children:[/*#__PURE__*/_jsx("label",{id:"labelID",htmlFor:"switchId",children:"A switch with a label"}),/*#__PURE__*/_jsx(Switch,{checked:c,className:"a-class-name","aria-labelledby":"labelID",id:"switchId",onClick:function onClick(){return d(!c)}}),/*#__PURE__*/_jsx(Switch,{checked:g,className:"a-class-name m-t-4","aria-label":"I'm a switch without label",onClick:function onClick(){return h(!g)}})]})};export var Disabled=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1];return/*#__PURE__*/_jsxs("div",{className:"d-flex flex-column",children:[/*#__PURE__*/_jsx(Switch,{checked:c,disabled:!0,className:"a-class-name","aria-labelledby":"labelID",id:"switchId",onClick:function onClick(){return d(!c)}}),/*#__PURE__*/_jsx(Switch,{checked:!c,disabled:!0,className:"a-class-name","aria-labelledby":"labelID",id:"switchId",onClick:function onClick(){return d(!c)}})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Option from"../common/Option";import Switch from"../switch";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import"core-js/modules/es.object.keys.js";import"core-js/modules/es.symbol.js";import"core-js/modules/es.array.filter.js";import"core-js/modules/es.object.to-string.js";import"core-js/modules/es.object.get-own-property-descriptor.js";import"core-js/modules/web.dom-collections.for-each.js";import"core-js/modules/es.object.get-own-property-descriptors.js";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import Option from"../common/Option";import Switch from"../switch";import{jsx as _jsx}from"react/jsx-runtime";var stopPropagation=function(a){a&&(a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation())},SwitchOption=function(a){var b=a.checked,c=a.complex,d=a.content,e=a.disabled,f=a.id,g=a.media,h=a.onChange,i=a.title,j=a.showMediaCircle,k=a.showMediaAtAllSizes,l=a.isContainerAligned,m=a["aria-label"],n=function(a){stopPropagation(a);e||h(!b)};return/*#__PURE__*/_jsx(Option,_objectSpread(_objectSpread({},{media:g,title:i,content:d,complex:c,disabled:e,showMediaCircle:j,showMediaAtAllSizes:k,isContainerAligned:l}),{},{button:/*#__PURE__*/_jsx(Switch,{id:f,checked:b,disabled:e,"aria-label":m,onClick:n}),onClick:n}))};export default SwitchOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{useState}from"react";import{Nudge}from"..";import SwitchOption from"./SwitchOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:SwitchOption,title:"Option/SwitchOption"};
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{action}from"@storybook/addon-actions";import{text,boolean}from"@storybook/addon-knobs";import{FastFlag as FastFlagIcon}from"@transferwise/icons";import{useState}from"react";import{Nudge}from"..";import SwitchOption from"./SwitchOption";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";export default{component:SwitchOption,title:"Option/SwitchOption"};var Template=function(){var a=useState(!1),b=_slicedToArray(a,2),c=b[0],d=b[1],e=text("title","Switch option"),f=text("content","Normally, the button and icon are vertically centered."),g=boolean("disabled",!1),h=boolean("showMediaAtAllSizes",!1),i=boolean("isContainerAligned",!1);return/*#__PURE__*/_jsx(SwitchOption,{media:/*#__PURE__*/_jsx(FastFlagIcon,{}),title:e,content:f,id:"id",checked:c,complex:!1,disabled:g,showMediaAtAllSizes:h,isContainerAligned:i,"aria-label":e,onChange:d})};export var Basic=function(){return/*#__PURE__*/_jsx(Template,{})};export var Multiple=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{})]})};export var WithContainerContent=function(){return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("h2",{className:"m-b-2",children:"Choose how to pay"}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx(Template,{}),/*#__PURE__*/_jsx("div",{children:/*#__PURE__*/_jsx(Nudge,{className:"m-t-2",mediaName:"globe",title:"Text that is no longer than two lines.",link:"Link",href:"#",onClick:action("action clicked"),onDismiss:action("dismissed")})})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useEffect,useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef,useEffect,useRef}from"react";import{jsx as _jsx}from"react/jsx-runtime";var Tab=/*#__PURE__*/forwardRef(function(a,b){var c=a.children,d=a.id,e=a.disabled,f=a.panelId,g=a.selected,h=a.onKeyDown,i=a.onClick,j=a.style,k=a.focusTab,l=useRef(!0),m=function(){return l.current?void(l.current=!1):void(g&&k&&k())};return useEffect(function(){m()},[g]),/*#__PURE__*/_jsx("li",{ref:b,className:classNames("tabs__tab",g?"np-text-body-large-bold":"np-text-body-large",{"tabs__tab--selected":g,clickable:!e,disabled:e}),role:"tab",id:d,"aria-selected":g?"true":"false","aria-disabled":e?"true":"false","aria-controls":e?null:f,tabIndex:"0",style:j,onKeyDown:e?null:h,onClick:i,children:/*#__PURE__*/_jsx("span",{className:"tabs__tab__content",children:c})})});Tab.defaultProps={disabled:!1,selected:!1,onClick:null,style:null,focusTab:null},Tab.propTypes={children:PropTypes.node.isRequired,disabled:PropTypes.bool,selected:PropTypes.bool,id:PropTypes.string.isRequired,panelId:PropTypes.string.isRequired,onKeyDown:PropTypes.func.isRequired,onClick:PropTypes.func,style:PropTypes.shape({width:PropTypes.string}),focusTab:PropTypes.func};export default Tab;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";var TabList=function(a){var b=a.children;return/*#__PURE__*/_jsx("ul",{className:"tabs__tab-list",role:"tablist",children:b})};TabList.propTypes={children:PropTypes.oneOfType([PropTypes.object,PropTypes.array]).isRequired};export default TabList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";var TabPanel=function(a){var b=a.children,c=a.id,d=a.tabId,e=a.style;return/*#__PURE__*/_jsx("div",{className:"tabs__panel",role:"tabpanel",id:c,"aria-labelledby":d,style:e,children:b})};TabPanel.propTypes={children:PropTypes.node.isRequired,id:PropTypes.string.isRequired,tabId:PropTypes.string.isRequired,style:PropTypes.shape({width:PropTypes.string.isRequired}).isRequired};export default TabPanel;
|