@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{ChevronUp}from"@transferwise/icons";import classNames from"classnames";import PropTypes from"prop-types";import{Size,Position}from"../common";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";var _CONTAINER_SIZE;import{ChevronUp}from"@transferwise/icons";import classNames from"classnames";import PropTypes from"prop-types";import{Size,Position}from"../common";import{jsx as _jsx}from"react/jsx-runtime";var CONTAINER_SIZE=(_CONTAINER_SIZE={},_defineProperty(_CONTAINER_SIZE,Size.EXTRA_SMALL,10),_defineProperty(_CONTAINER_SIZE,Size.SMALL,16),_defineProperty(_CONTAINER_SIZE,Size.MEDIUM,24),_CONTAINER_SIZE),ExtraSmallChevron=function(a){var b=a.className;return/*#__PURE__*/_jsx("span",{className:classNames("tw-icon","tw-icon-chevron",b),role:"presentation","aria-hidden":!0,children:/*#__PURE__*/_jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",focusable:"false",children:/*#__PURE__*/_jsx("path",{fillRule:"evenodd",d:"M4.9995 2.0865L0.0635004 6.7645L1.2745 7.9125L4.9995 4.3835L8.7245 7.9135L9.9355 6.7645L4.9995 2.0865Z"})})})};ExtraSmallChevron.propTypes={className:PropTypes.string},ExtraSmallChevron.defaultProps={className:null};var Chevron=function(a){var b=a.orientation,c=a.size,d=a.disabled,e=a.className,f=classNames("tw-chevron",{"chevron-color":!d},"".concat([b]).toLowerCase(),e),g=CONTAINER_SIZE[c];return c===Size.EXTRA_SMALL?/*#__PURE__*/_jsx(ExtraSmallChevron,{className:f}):/*#__PURE__*/_jsx(ChevronUp,{className:f,size:g})};Chevron.propTypes={orientation:PropTypes.oneOf(["top","bottom","left","right"]),size:PropTypes.oneOf(["xs","sm","md"]),disabled:PropTypes.bool,className:PropTypes.string},Chevron.defaultProps={orientation:Position.BOTTOM,size:Size.SMALL,disabled:!1,className:null};export default Chevron;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import Chevron from"./Chevron";export default{component:Chevron,title:"Other/Chevron",argTypes:{orientation:{type:{name:"enum",value:["top","bottom","left","right"]}},size:{type:{name:"enum",value:["xs","sm","md"]}}},tags:["autodocs"]};export
|
|
1
|
+
import Chevron from"./Chevron";export default{component:Chevron,title:"Other/Chevron",argTypes:{orientation:{type:{name:"enum",value:["top","bottom","left","right"]}},size:{type:{name:"enum",value:["xs","sm","md"]}}},tags:["autodocs"]};export var Basic={args:{orientation:"top",size:"md"}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme}from"@wise/components-theming";import classNames from"classnames";import{useEffect,useRef}from"react";import Body from"../body/Body";import{Typography}from"../common";import{CloseButton}from"../common/closeButton/CloseButton";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";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{useEffect,useRef}from"react";import Body from"../body/Body";import{Typography}from"../common";import{CloseButton}from"../common/closeButton/CloseButton";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Chip=function(a){var b=a.label,c=a.value,d=a.onRemove,e=a.onClick,f=a.onKeyPress,g=a.className,h=void 0===g?void 0:g,i=a["aria-label"],j=a["aria-checked"],k=a.role,l=a.closeButton,m=e||f,n=m?"button":void 0,o=m?0:-1,p=useTheme(),q=p.isModern,r=useRef(null),s=useRef();return useEffect(function(){if(null!=r.current&&!1===s.current){var a;null===(a=r.current)||void 0===a?void 0:a.focus()}s.current=null!=r.current},[d]),/*#__PURE__*/_jsxs("div",_objectSpread(_objectSpread({role:null!==k&&void 0!==k?k:n,tabIndex:o,"aria-label":i,"aria-checked":j,className:classNames("np-chip","d-flex","align-items-center","justify-content-between",d?"np-chip--removable":"",h)},m&&{onClick:e,onKeyPress:f}),{},{children:[q?/*#__PURE__*/_jsx(Body,{"aria-hidden":!!d,type:Typography.BODY_DEFAULT_BOLD,children:b}):/*#__PURE__*/_jsx("span",{"aria-hidden":"false",className:"np-chip-label",children:b}),d?/*#__PURE__*/_jsx(CloseButton,{ref:r,className:q?"btn-unstyled":"btn-unstyled m-l-1","aria-label":l&&l["aria-label"],size:"sm",filled:q,onClick:d}):null]}),c)};export default Chip;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import{useIntl}from"react-intl";import Chip from"./Chip";import messages from"./Chips.messages";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";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{useIntl}from"react-intl";import Chip from"./Chip";import messages from"./Chips.messages";import{jsx as _jsx}from"react/jsx-runtime";var Chips=function(a){var b=a.chips,c=a.onChange,d=a.selected,e=a["aria-label"],f=a.className,g=a.multiple,h=useIntl(),i=function(a){return Array.isArray(d)?d.includes(a):d===a},j=function(a,b){c({isEnabled:!b,selectedValue:a})};return/*#__PURE__*/_jsx("div",{className:classNames("np-chips d-flex",f),"aria-label":e,role:g?void 0:"radiogroup",children:b.map(function(a){var b=i(a.value);return/*#__PURE__*/_jsx(Chip,_objectSpread({value:a.value,label:a.label,closeButton:{"aria-label":h.formatMessage(messages.ariaLabel,{choice:a.label})},className:classNames("text-xs-nowrap",{"np-chip--selected":b,"p-r-1":g&&b})},g&&b?{onRemove:function onRemove(){return j(a.value,b)},"aria-label":a.label}:{onClick:function onClick(){return j(a.value,b)},onKeyPress:function onKeyPress(){return j(a.value,b)},role:g?void 0:"radio","aria-checked":b}),a.value)})})};export default Chips;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"@testing-library/jest-dom";import{render,screen,fireEvent}from"../test-utils";import Chips from".";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";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"@testing-library/jest-dom";import{render,screen,fireEvent}from"../test-utils";import Chips from".";import{jsx as _jsx}from"react/jsx-runtime";var choiceProps={chips:[{value:"accounting",label:"Accounting"},{value:"payroll",label:"Payroll"},{value:"reporting",label:"Reporting"},{value:"payments",label:"Payments"}],selected:"payroll",onChange:jest.fn(),"aria-label":"Please select a category"},filterProps={chips:[{value:"accounting",label:"Accounting"},{value:"payroll",label:"Payroll"},{value:"reporting",label:"Reporting"},{value:"payments",label:"Payments"}],onChange:jest.fn(),"aria-label":"Filter by categories",selected:["payments"],multiple:!0};describe("Chips",function(){describe("Choice Chips",function(){it("renders as expected",function(){expect(render(/*#__PURE__*/_jsx(Chips,_objectSpread({},choiceProps))).container).toMatchSnapshot()}),it("will pass previous state, updated state, and selected value on select",function(){render(/*#__PURE__*/_jsx(Chips,_objectSpread({},choiceProps)));var a=screen.getByText("Accounting");fireEvent.click(a),expect(choiceProps.onChange).toHaveBeenCalledWith({selectedValue:"accounting",isEnabled:!0})})}),describe("Filter Chips",function(){it("renders as expected",function(){expect(render(/*#__PURE__*/_jsx(Chips,_objectSpread({},filterProps))).container).toMatchSnapshot()}),it("will pass previous state, updated state, and selected value on select",function(){render(/*#__PURE__*/_jsx(Chips,_objectSpread({},filterProps)));var a=screen.getByText("Accounting");fireEvent.click(a),expect(filterProps.onChange).toHaveBeenCalledWith({selectedValue:"accounting",isEnabled:!0})}),it("will pass previous state, updated state, and cleared value on clear",function(){render(/*#__PURE__*/_jsx(Chips,_objectSpread({},filterProps))),fireEvent.click(screen.getAllByRole("button")[3]),expect(filterProps.onChange).toHaveBeenCalledWith({selectedValue:"payments",isEnabled:!1})})})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState}from"react";import Chips from"./Chips";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";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{useState}from"react";import Chips from"./Chips";import{jsx as _jsx}from"react/jsx-runtime";var meta={title:"Actions/Chips",component:Chips,tags:["autodocs"]};export default meta;var FilterTemplate=function(a){var b=useState(a.selected?a.selected:[]),c=_slicedToArray(b,2),d=c[0],e=c[1];return/*#__PURE__*/_jsx(Chips,_objectSpread(_objectSpread({},a),{},{selected:d,multiple:!0,onChange:function onChange(a){var b=a.selectedValue,c=a.isEnabled;if(c)e([].concat(_toConsumableArray(d),[b]));else{var f=d.filter(function(a){return b!==a});e(f)}}}))},ChoiceTemplate=function(a){var b=useState(a.selected),c=_slicedToArray(b,2),d=c[0],e=c[1];return/*#__PURE__*/_jsx(Chips,_objectSpread(_objectSpread({},a),{},{selected:d,onChange:function onChange(a){var b=a.selectedValue;return e(b)}}))};export var FilterChips=FilterTemplate.bind({});FilterChips.args={chips:[{value:"accounting",label:"Accounting"},{value:"payroll",label:"Payroll"},{value:"reporting",label:"Reporting"},{value:"payments",label:"Payments"}]};export var PreSelectedFilterChips=FilterTemplate.bind({});PreSelectedFilterChips.args={chips:[{value:"accounting",label:"Accounting"},{value:"payroll",label:"Payroll"},{value:"reporting",label:"Reporting"},{value:"payments",label:"Payments"}],selected:["accounting","payments"]};export var ChoiceChips=ChoiceTemplate.bind({});ChoiceChips.args={chips:[{value:1,label:"100 GBP"},{value:2,label:"200 GBP"},{value:3,label:"300 GBP"},{value:4,label:"400 GBP+"}],selected:3};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import{cloneElement}from"react";import Body from"../body/Body";import{typeClassMap,priorityClassMap}from"../button/classMap";import{ControlType,Priority}from"../common";import{Typography}from"../common";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=["className","children","disabled","icon","priority","type"];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{cloneElement}from"react";import Body from"../body/Body";import{typeClassMap,priorityClassMap}from"../button/classMap";import{ControlType,Priority}from"../common";import{Typography}from"../common";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var CircularButton=function(a){var b=a.className,c=a.children,d=a.disabled,e=a.icon,f=a.priority,g=a.type,h=_objectWithoutProperties(a,_excluded),i=classNames("btn np-btn",typeClassMap[g],priorityClassMap[f]),j=24===e.props.size?e:/*#__PURE__*/cloneElement(e,{size:24});return/*#__PURE__*/_jsxs("label",{className:classNames("np-circular-btn",f,g,d?"disabled":"",b),children:[/*#__PURE__*/_jsx("input",_objectSpread({type:"button","aria-label":c,className:i,disabled:d},h)),j,/*#__PURE__*/_jsx(Body,{as:"span",className:"np-circular-btn__label",type:Typography.BODY_DEFAULT_BOLD,children:c})]})};CircularButton.propTypes={className:PropTypes.string,children:PropTypes.string.isRequired,disabled:PropTypes.bool,icon:PropTypes.element.isRequired,onClick:PropTypes.func.isRequired,priority:PropTypes.oneOf(["primary","secondary"]),type:PropTypes.oneOf(["accent","positive","negative"])},CircularButton.defaultProps={className:void 0,disabled:!1,priority:Priority.PRIMARY,type:ControlType.ACCENT};export default CircularButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Defined in `Dimmer.less`
|
|
3
|
-
*/
|
|
3
|
+
*/var NO_SCROLL_BODY_CLASS="no-scroll";/**
|
|
4
4
|
* Apply {@link NO_SCROLL_BODY_CLASS} that disables scroll on page (e.g use in Dimmer to disable scroll behind the component)
|
|
5
5
|
*
|
|
6
6
|
* For a proper disabling, the CSS class needs to be applied for `html` and `body` elements.
|
|
7
|
-
*/export
|
|
7
|
+
*/export var addNoScrollBodyClass=function(){document.documentElement.classList.add(NO_SCROLL_BODY_CLASS),document.body.classList.add(NO_SCROLL_BODY_CLASS)};/**
|
|
8
8
|
* Clean up after {@link addNoScrollBodyClass} function
|
|
9
|
-
*/export
|
|
9
|
+
*/export var removeNoScrollBodyClass=function(){document.documentElement.classList.remove(NO_SCROLL_BODY_CLASS),document.body.classList.remove(NO_SCROLL_BODY_CLASS)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import{forwardRef}from"react";import Body from"../../body";import{Typography}from"../propsValues/typography";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=["media","title","content","as","button","decision","disabled","complex","inverseMediaCircle","className","showMediaAtAllSizes","showMediaCircle","isContainerAligned"];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{forwardRef}from"react";import Body from"../../body";import{Typography}from"../propsValues/typography";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var Option=/*#__PURE__*/forwardRef(function(a,b){var c,d=a.media,e=void 0===d?"":d,f=a.title,g=a.content,h=a.as,i=a.button,j=a.decision,k=a.disabled,l=void 0!==k&&k,m=a.complex,n=a.inverseMediaCircle,o=a.className,p=a.showMediaAtAllSizes,q=a.showMediaCircle,r=a.isContainerAligned,s=_objectWithoutProperties(a,_excluded),t=null!==(c=h)&&void 0!==c?c:"label";return/*#__PURE__*/_jsx(t,_objectSpread(_objectSpread({},s),{},{ref:b,className:classNames("np-option",o,{"decision-complex":m,decision:!(void 0!==j)||j,disabled:l,"np-option__sm-media":p,"np-option__container-aligned":void 0!==r&&r}),disabled:l&&"button"===t,children:/*#__PURE__*/_jsxs("div",{className:"media",children:[e&&/*#__PURE__*/_jsx("div",{className:"media-left",children:!(void 0!==q)||q?/*#__PURE__*/_jsx("div",{className:classNames("circle circle-sm text-primary",{"circle-inverse":!(void 0!==n)||n}),children:e}):/*#__PURE__*/_jsx("div",{className:"np-option__no-media-circle",children:e})}),/*#__PURE__*/_jsxs("div",{className:"media-body",children:[/*#__PURE__*/_jsx(Body,{as:"span",type:Typography.BODY_LARGE_BOLD,className:"text-primary np-option__title d-block",children:f}),g&&/*#__PURE__*/_jsx(Body,{className:"d-block np-option__body",children:g})]}),/*#__PURE__*/_jsx("div",{className:"media-right",children:i})]})}))});export default Option;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import classNames from"classnames";import PropTypes from"prop-types";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var RadioButton=function(a){var b=a.id,c=a.value,d=a.name,e=a.checked,f=a.onChange,g=a.disabled,h=a.readOnly;return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("input",{type:"radio",className:"sr-only",id:b,value:c,name:d,checked:e,disabled:g||h,onChange:function onChange(){return e?null:f(c)}}),/*#__PURE__*/_jsx("span",{className:classNames("tw-radio-button",{checked:e,disabled:g||h}),children:/*#__PURE__*/_jsx("span",{className:"tw-radio-check"})})]})};RadioButton.propTypes={id:PropTypes.string,name:PropTypes.string.isRequired,checked:PropTypes.bool,onChange:PropTypes.func,disabled:PropTypes.bool,value:PropTypes.oneOfType([PropTypes.number,PropTypes.string]),readOnly:PropTypes.bool},RadioButton.defaultProps={checked:!1,onChange:function onChange(){},disabled:!1,id:null,value:"",readOnly:!1};export default RadioButton;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import classNames from"classnames";import{useRef,useState}from"react";import Dimmer from"../../dimmer";import SlidingPanel from"../../slidingPanel";import{CloseButton}from"../closeButton";import{isServerSide}from"../domHelpers";import{useConditionalListener}from"../hooks";import{Position}from"../propsValues/position";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
2
|
-
cancelAnimationFrame(
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import classNames from"classnames";import{useRef,useState}from"react";import Dimmer from"../../dimmer";import SlidingPanel from"../../slidingPanel";import{CloseButton}from"../closeButton";import{isServerSide}from"../domHelpers";import{useConditionalListener}from"../hooks";import{Position}from"../propsValues/position";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var INITIAL_Y_POSITION=0,CONTENT_SCROLL_THRESHOLD=1,MOVE_OFFSET_THRESHOLD=50,BottomSheet=function(a){function b(a){null!==g.current&&(g.current.style.transform="translateY(".concat(a,"px)"))}function c(b){m(!1),o.current=INITIAL_Y_POSITION,null!==g.current&&g.current.style.removeProperty("transform"),a.onClose&&a.onClose(b)}function d(a){// stop moving component
|
|
2
|
+
cancelAnimationFrame(n.current),m(!1),o.current>MOVE_OFFSET_THRESHOLD&&e()?c(a):b(INITIAL_Y_POSITION),o.current=INITIAL_Y_POSITION}function e(){var a;return(null===i||void 0===i||null===(a=i.current)||void 0===a?void 0:a.scrollTop)!==void 0&&i.current.scrollTop<=CONTENT_SCROLL_THRESHOLD}/**
|
|
3
3
|
* Calculates how hard user moves component,
|
|
4
4
|
* result value used to determine whether to hide component or re-position to default state
|
|
5
5
|
*
|
|
6
6
|
* @param afterMoveYCoordinate
|
|
7
|
-
*/function f(a){return a-
|
|
7
|
+
*/function f(a){return a-p.current}/**
|
|
8
8
|
* Set `max-height` for content part (in order to keep it scrollable for content overflow cases) of the component
|
|
9
9
|
* and ensures space for safe zone (32px) at the top.
|
|
10
|
-
*/
|
|
10
|
+
*/var g=useRef(null),h=useRef(null),i=useRef(null),j=useState(!1),k=_slicedToArray(j,2),l=k[0],m=k[1],n=useRef(0),o=useRef(0),p=useRef(0);useConditionalListener({attachListener:a.open&&!isServerSide(),callback:function callback(){if(null!==h.current){var a=h.current.classList;e()?a.remove("np-bottom-sheet--top-bar--shadow"):a.add("np-bottom-sheet--top-bar--shadow")}},eventType:"scroll",parent:isServerSide()?void 0:document});var q=function(a){return function(b){p.current=(a?b.touches[0]:b).clientY,m(!0)}},r=function(a){return function(c){if(l){var d=a?c.touches[0]:c,h=d.clientY,i=f(h);i>INITIAL_Y_POSITION&&e()&&(o.current=i,n.current=requestAnimationFrame(function(){n.current!==void 0&&null!==g.current&&b(i)}))}}};return/*#__PURE__*/_jsx(Dimmer,{open:a.open,fadeContentOnEnter:!0,fadeContentOnExit:!0,onClose:c,children:/*#__PURE__*/_jsxs(SlidingPanel,{ref:g,open:a.open,position:Position.BOTTOM,className:classNames("np-bottom-sheet",a.className),role:"dialog",onTouchStart:q(!0),onTouchMove:r(!0),onTouchEnd:d,onMouseDown:q(!1),onMouseMove:r(!1),onMouseUp:d,children:[/*#__PURE__*/_jsxs("div",{ref:h,className:"np-bottom-sheet--top-bar",children:[/*#__PURE__*/_jsx("div",{className:"np-bottom-sheet--handler"}),/*#__PURE__*/_jsx(CloseButton,{size:"sm",className:"sr-only np-bottom-sheet--close-btn",onClick:c})]}),/*#__PURE__*/_jsx("div",{ref:i,style:function(){var a=isServerSide()?0:window.innerHeight,b="".concat(100*(.01*a),"px");return{maxHeight:"calc(".concat(b," - ").concat("64px"," - ").concat("32px",")")}}(),className:"np-bottom-sheet--content",children:a.children})]})})};export default BottomSheet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{render}from"../../test-utils";import BottomSheet from"./BottomSheet";import{jsx as _jsx}from"react/jsx-runtime";describe("BottomSheet",()
|
|
1
|
+
import{render}from"../../test-utils";import BottomSheet from"./BottomSheet";import{jsx as _jsx}from"react/jsx-runtime";describe("BottomSheet",function(){it("renders content when open",function(){var a=render(/*#__PURE__*/_jsx(BottomSheet,{open:!0,onClose:jest.fn(),children:/*#__PURE__*/_jsx("b",{children:"Test Content"})})),b=a.baseElement;expect(b).toMatchSnapshot()}),it("does not renders when closed",function(){var a=render(/*#__PURE__*/_jsx(BottomSheet,{open:!1,onClose:jest.fn(),children:"content"})),b=a.container;expect(b).toBeEmptyDOMElement()})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{action}from"@storybook/addon-actions";import{FastFlag}from"@transferwise/icons";import{useState}from"react";import Body from"../../body/Body";import Button from"../../button";import NavigationOption from"../../navigationOption";import{lorem10,lorem500,storyConfig}from"../../test-utils";import Title from"../../title/Title";import{Typography}from"../propsValues/typography";import BottomSheet from"./BottomSheet";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:BottomSheet,title:"Dialogs/BottomSheet",args:{open:!0},render:a
|
|
2
|
-
|
|
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{action}from"@storybook/addon-actions";import{FastFlag}from"@transferwise/icons";import{useState}from"react";import Body from"../../body/Body";import Button from"../../button";import NavigationOption from"../../navigationOption";import{lorem10,lorem500,storyConfig}from"../../test-utils";import Title from"../../title/Title";import{Typography}from"../propsValues/typography";import BottomSheet from"./BottomSheet";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";export default{component:BottomSheet,title:"Dialogs/BottomSheet",args:{open:!0},render:function render(a){// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2
|
+
var b=useState(a.open),c=_slicedToArray(b,2),d=c[0],e=c[1];return/*#__PURE__*/_jsxs("div",{style:{height:"2000px"},children:[/*#__PURE__*/_jsx(Button,{onClick:function onClick(){return e(!0)},children:"Open BottomSheet"}),/*#__PURE__*/_jsx(BottomSheet,_objectSpread(_objectSpread({},a),{},{open:d,onClose:function onClose(){e(!1),action("BottomSheet closed")()}}))]})}};export var Basic={args:{children:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,children:"Money without borders"}),lorem10,/*#__PURE__*/_jsx("br",{}),/*#__PURE__*/_jsx("br",{}),/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24}),isContainerAligned:!0})]})},parameters:{chromatic:{delay:1e3}}};export var BasicMobile=storyConfig(Basic,{variants:["mobile"]});export var WithOverflowContent={args:{children:/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(Title,{type:Typography.TITLE_SECTION,children:"Money without borders"}),lorem10,/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24})}),/*#__PURE__*/_jsx(NavigationOption,{title:"Navigation option",content:"Button and icon are vertically centered.",media:/*#__PURE__*/_jsx(FastFlag,{size:24}),isContainerAligned:!0}),lorem500,/*#__PURE__*/_jsx(Body,{type:Typography.BODY_DEFAULT_BOLD,children:lorem10})]})},parameters:{chromatic:{delay:1e3}}};export var WithOverflowContentMobile=storyConfig(WithOverflowContent,{variants:["mobile"]});export var WithOverflowContentDark=storyConfig(WithOverflowContent,{variants:["dark"]});export var WithOverflowContentDarkMobile=storyConfig(WithOverflowContent,{variants:["dark","mobile"]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Cross,CrossCircleFill}from"@transferwise/icons";import classNames from"classnames";import{forwardRef}from"react";import{useIntl}from"react-intl";import{Size}from"../propsValues/size";import messages from"./CloseButton.messages";import{jsx as _jsx}from"react/jsx-runtime";export
|
|
1
|
+
import{Cross,CrossCircleFill}from"@transferwise/icons";import classNames from"classnames";import{forwardRef}from"react";import{useIntl}from"react-intl";import{Size}from"../propsValues/size";import messages from"./CloseButton.messages";import{jsx as _jsx}from"react/jsx-runtime";export var CloseButton=/*#__PURE__*/forwardRef(function(a,b){var c,d=a["aria-label"],e=a.size,f=void 0===e?Size.MEDIUM:e,g=a.filled,h=a.className,i=a.onClick,j=useIntl();null!==(c=d)&&void 0!==c?c:d=j.formatMessage(messages.ariaLabel);var k=void 0!==g&&g?CrossCircleFill:Cross;return/*#__PURE__*/_jsx("button",{ref:b,type:"button",className:classNames("np-close-button","close btn-link","text-no-decoration",{"np-close-button--large":f===Size.MEDIUM,"np-close-button--x-large":f===Size.LARGE},h),"aria-label":d,onClick:i,children:/*#__PURE__*/_jsx(k,{size:f===Size.SMALL?16:24})})});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{formatDate}from"@transferwise/formatting";export function getDayNames(a){
|
|
2
|
-
for(;7>c.length;)c.push(formatDate(d,a,{weekday:b})),d.setDate(d.getDate()+1);return c}
|
|
1
|
+
import{formatDate}from"@transferwise/formatting";export function getDayNames(a){// 2018 started with Monday
|
|
2
|
+
for(var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"short",c=[],d=new Date(2018,0,1);7>c.length;)c.push(formatDate(d,a,{weekday:b})),d.setDate(d.getDate()+1);return c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{formatDate}from"@transferwise/formatting";export
|
|
1
|
+
import{formatDate}from"@transferwise/formatting";export var getMonthNames=function(a){for(var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"long",c=[],d=new Date(2018,0,1),e={month:b};12>c.length;)c.push(formatDate(d,a,e)),d.setMonth(d.getMonth()+1);return c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var isDateValid=function(a){return validDateObject(a)||validDateString(a)};export var validDateString=function(a){return"string"==typeof a&&validDateObject(new Date(a))};var validDateObject=function(a){return a instanceof Date&&!isNaN(a)};// eslint-disable-line no-restricted-globals
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{validDateString}from"../isDateValid";export
|
|
1
|
+
import{validDateString}from"../isDateValid";export var isMonthAndYearFormat=function(a){return validDateString(a)&&3>a.split("-").length};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function isIosDevice(){
|
|
1
|
+
export function isIosDevice(){var a=["iphone","ipad","ipod"].map(function(a){return"(".concat(a,")")}).join("|"),b=new RegExp(a,"ig");return"undefined"!=typeof navigator&&!!navigator.userAgent.match(b)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Direction=/*#__PURE__*/function(a){return a.RTL="rtl",a.LTR="ltr",a.AUTO="auto",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function isServerSide(){return"undefined"==typeof window}export function isBrowser(){return!isServerSide()}export function stopPropagation(a){a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation()}export function getSimpleRandomId(a){
|
|
1
|
+
export function isServerSide(){return"undefined"==typeof window}export function isBrowser(){return!isServerSide()}export function stopPropagation(a){a.stopPropagation(),a.preventDefault(),a.nativeEvent&&a.nativeEvent.stopImmediatePropagation&&a.nativeEvent.stopImmediatePropagation()}export function getSimpleRandomId(a){var b=Math.ceil(999999*Math.random());return"".concat(a).concat(b)}export{addClickClassToDocumentOnIos,removeClickClassFromDocumentOnIos}from"./documentIosClick";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";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}export var fakeEvent=function(){return{nativeEvent:{stopImmediatePropagation:function stopImmediatePropagation(){}},stopPropagation:function stopPropagation(){},preventDefault:function preventDefault(){}}};export var fakeKeyDownEventForKey=function(a){return _objectSpread(_objectSpread({},fakeEvent()),{},{keyCode:a})};export var fakeKeyDownEvent=function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{};return _objectSpread(_objectSpread({},fakeEvent()),a)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var FileType=/*#__PURE__*/function(a){return a.PDF=".pdf,application/pdf",a.JPG=".jpg,.jpeg,image/jpeg",a.PNG=".png,image/png",a.CSV=".csv,text/csv",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef}from"react";import{Layout}from"../propsValues/layouts";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import classNames from"classnames";import PropTypes from"prop-types";import{forwardRef}from"react";import{Layout}from"../propsValues/layouts";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var FlowHeader=/*#__PURE__*/forwardRef(function(a,b){var c=a.bottomContent,d=a.className,e=a.layout,f=a.leftContent,g=a.rightContent,h=e===Layout.VERTICAL;return/*#__PURE__*/_jsxs("div",{ref:b,className:classNames("np-flow-header","d-flex","flex-wrap","align-items-center",d),children:[/*#__PURE__*/_jsx("div",{className:classNames("np-flow-header__left",{"flex__item--8":h}),children:f}),/*#__PURE__*/_jsx("div",{className:classNames("align-items-center","d-flex","np-flow-header__right","justify-content-end",{"flex__item--4 ":h,"order-2":!h}),children:g}),/*#__PURE__*/_jsx("div",{className:classNames("align-items-center","d-flex","justify-content-center",{"flex__item--12":h,"order-1 flex-grow-1":!h}),children:c})]})});FlowHeader.defaultProps={bottomContent:void 0,className:void 0,layout:Layout.HORIZONTAL,leftContent:void 0,rightContent:void 0},FlowHeader.propTypes={bottomContent:PropTypes.node,className:PropTypes.string,layout:PropTypes.oneOf(["HORIZONTAL","VERTICAL"]),leftContent:PropTypes.node,rightContent:PropTypes.node};export default FlowHeader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isKey,isUndefined}from"@transferwise/neptune-validation";import{useEffect,useRef,useState}from"react";import{useConditionalListener}from"../hooks";import{Key}from"../key";import{getFocusableElements,resetFocus}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{isKey,isUndefined}from"@transferwise/neptune-validation";import{useEffect,useRef,useState}from"react";import{useConditionalListener}from"../hooks";import{Key}from"../key";import{getFocusableElements,resetFocus}from"./utils";import{jsx as _jsx}from"react/jsx-runtime";var TAB=Key.TAB,FocusBoundary=function(a){var b=a.children,c=useRef(null),d=isUndefined(document)?void 0:document,e=useState({}),f=_slicedToArray(e,2),g=f[0],h=f[1];return useEffect(function(){null!==c&&void 0!==c&&c.current&&(c.current.focus({preventScroll:!0}),h(getFocusableElements(c.current)))},[]),useConditionalListener({eventType:"keydown",callback:function callback(a){isKey({keyType:TAB,event:a})&&resetFocus({event:a,focusableEls:g})},attachListener:!0,parent:d}),/*#__PURE__*/_jsx("div",{ref:c,tabIndex:-1,className:"np-focus-boundary outline-none",children:b})};export default FocusBoundary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{render,screen,userEvent}from"../../test-utils";import FocusBoundary from"./FocusBoundary";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";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{render,screen,userEvent}from"../../test-utils";import FocusBoundary from"./FocusBoundary";import{jsx as _jsx}from"react/jsx-runtime";import{Fragment as _Fragment}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var props={onClose:jest.fn()};describe("FocusBoundary",function(){beforeEach(function(){jest.clearAllMocks()}),it("renders component",function(){var a=render(/*#__PURE__*/_jsx(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/_jsx("a",{href:"test",children:"Test"})}))),b=a.container;expect(b).toMatchSnapshot()}),it("focus on container by default",function(){render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"not focusable"}),/*#__PURE__*/_jsx(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:/*#__PURE__*/_jsx("a",{href:"test",children:"Test"})}))]})),expect(c()).toHaveFocus()}),it("traps the focus when user presses tab",function(){render(/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"not focusable"}),/*#__PURE__*/_jsxs(FocusBoundary,_objectSpread(_objectSpread({},props),{},{children:[/*#__PURE__*/_jsx("a",{href:"test",children:"firstFocusable"}),/*#__PURE__*/_jsx("a",{href:"test",children:"lastFocusable"})]}))]})),userEvent.tab(),expect(a()).toHaveFocus(),userEvent.tab(),expect(b()).toHaveFocus(),userEvent.tab(),expect(a()).toHaveFocus(),userEvent.tab({shift:!0}),expect(b()).toHaveFocus(),userEvent.tab({shift:!0}),expect(a()).toHaveFocus()});var a=function(){return screen.getByText("firstFocusable")},b=function(){return screen.getByText("lastFocusable")},c=function(){return document.querySelector(".np-focus-boundary")}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";/**
|
|
2
2
|
* This function returns the first and the last focusable elements within a node.
|
|
3
3
|
*
|
|
4
4
|
* @param {Node} focusBoundaryContainer - the area that contains focused elements.
|
|
5
5
|
* @returns {object} focusableEls - which contains the first focusable element and the last focusable element. First and last can be the same element if area contains one or none focusable element.
|
|
6
|
-
*/export
|
|
6
|
+
*/export var getFocusableElements=function(a){var b={first:a,last:a};if(null!==a&&void 0!==a&&a.querySelectorAll){var c=_toConsumableArray(a.querySelectorAll("a, button, input, textarea, select, details,[tabindex]:not([tabindex=\"-1\"])")).filter(function(a){return!a.hasAttribute("disabled")});if(0<c.length){var d=_slicedToArray(c,1);b.first=d[0],b.last=c[c.length-1]}}return b};
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {object} focusableEls - contains the first last of first focusable elements within a node.
|
|
5
5
|
* @param {object} event - the triggered event
|
|
6
|
-
*/export
|
|
6
|
+
*/export var resetFocus=function(a){var b=a.focusableEls,c=b.first,d=b.last,e=a.event,f=document,g=f.activeElement;e.shiftKey&&g===c&&(d&&d.focus(),e.preventDefault()),e.shiftKey||g!==d||(c&&c.focus(),e.preventDefault())};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import _createClass from"@babel/runtime/helpers/createClass";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _defineProperty from"@babel/runtime/helpers/defineProperty";var HistoryNavigator=/*#__PURE__*/_createClass(function a(){var b=this,c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[],d=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;_classCallCheck(this,a),_defineProperty(this,"reset",function(){var a=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[""],c=1<arguments.length&&arguments[1]!==void 0?arguments[1]:20;b.history=a,b.currIndex=0<a.length-1?a.length-1:0,b.historyLimit=c}),_defineProperty(this,"add",function(a){!b.historyLimit||b.history.length<=b.historyLimit?(b.history.push(a),b.currIndex=b.history.length-1):b.currIndex=b.history.length-1}),_defineProperty(this,"redo",function(){var a=b.history.length;return b.currIndex=b.currIndex+1<a?b.currIndex+1:a-1,b.history[b.currIndex]}),_defineProperty(this,"undo",function(){return b.currIndex=0<b.currIndex-1?b.currIndex-1:0,b.history[b.currIndex]}),this.history=c&&0<c.length?c:[""],this.currIndex=this.history.length-1,this.historyLimit=d});export default HistoryNavigator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import throttle from"lodash.throttle";import{useLayoutEffect,useState,useEffect}from"react";
|
|
2
|
-
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import throttle from"lodash.throttle";import{useLayoutEffect,useState,useEffect}from"react";var THROTTLE_MS=100,useIsomorphicLayoutEffect="undefined"==typeof window?useEffect:useLayoutEffect;export var useClientWidth=function(a){var b=a.ref,c=a.throttleMs,d=void 0===c?THROTTLE_MS:c,e=useState(null),f=_slicedToArray(e,2),g=f[0],h=f[1];return useIsomorphicLayoutEffect(function(){// eslint-disable-next-line unicorn/consistent-function-scoping
|
|
2
|
+
var a=function(){b&&(b.innerWidth?h(b.innerWidth):b.current&&h(b.current.clientWidth))},c=throttle(a,d);// This assignment saves a reference to the function so it will be the same passed to both addEventListener removeEventListener.
|
|
3
3
|
// If throttle gets passed directly to both add and removeEventListenet the results will be that the event
|
|
4
4
|
// won't get removed even if the component is unmounted.
|
|
5
|
-
return window.addEventListener("resize",
|
|
5
|
+
return window.addEventListener("resize",c,!0),window.requestAnimationFrame(a),function(){return window.removeEventListener("resize",c,!0)}},[]),[g]};useClientWidth.THROTTLE_MS=100;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isUndefined}from"@transferwise/neptune-validation";import{useEffect}from"react";export
|
|
1
|
+
import{isUndefined}from"@transferwise/neptune-validation";import{useEffect}from"react";export var useConditionalListener=function(a){var b=a.attachListener,c=a.callback,d=a.eventType,e=a.parent;useEffect(function(){return b&&!isUndefined(e)&&e.addEventListener(d,c,!0),function(){isUndefined(e)||e.removeEventListener(d,c,!0)}},[b,c,d,e])};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useContext}from"react";import{DirectionContext}from"../../../provider/direction/DirectionProvider";export
|
|
1
|
+
import{useContext}from"react";import{DirectionContext}from"../../../provider/direction/DirectionProvider";export var useDirection=function(){var a=useContext(DirectionContext);return{direction:a,isRTL:"rtl"===a}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useEffect,useState}from"react";
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useEffect,useState}from"react";var ObserverParams={threshold:.1};/**
|
|
2
2
|
* useHasIntersected.
|
|
3
3
|
* Use this custom hook to detect when an element has became visible inside the viewport. This hook checks only if the intersection happend.
|
|
4
4
|
* Once the intersection has happened the hook will not return false even if the element gets out of the viewport.
|
|
@@ -8,4 +8,4 @@ import{useEffect,useState}from"react";const ObserverParams={threshold:.1};/**
|
|
|
8
8
|
* @param {strimng} [loading = 'eager'] - string that contains the type of loading.
|
|
9
9
|
* @param elRef.loading
|
|
10
10
|
* @usage `const [hasIntersected] = useHasIntersected({imageRef,loading});`
|
|
11
|
-
*/export
|
|
11
|
+
*/export var useHasIntersected=function(a){var b=a.elRef,c=a.loading,d=useState(!1),e=_slicedToArray(d,2),f=e[0],g=e[1],h=(b||{}).current,i=function(){return b&&h},j=function(a,b){a.forEach(function(a){a.isIntersecting&&(g(!0),b.unobserve(h))})};return useEffect(function(){var a,b=!1;return"undefined"!=typeof window&&window.IntersectionObserver&&i()?!b&&(a=new IntersectionObserver(j,ObserverParams),a.observe(h)):g(!0),function(){b=!0,a&&a.unobserve(h)}},[b]),"eager"===c?[!1]:[f]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useEffect,useState}from"react";import{Breakpoint}from"../../propsValues/breakpoint";import useClientWidth from"../useClientWidth";export
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import{useEffect,useState}from"react";import{Breakpoint}from"../../propsValues/breakpoint";import useClientWidth from"../useClientWidth";export var useLayout=function(){var a="undefined"==typeof window?void 0:window,b=useState(),c=_slicedToArray(b,2),d=c[0],e=c[1],f=useClientWidth({ref:a}),g=_slicedToArray(f,1),h=g[0];return useEffect(function(){return h?h<=Breakpoint.EXTRA_SMALL?void e(Breakpoint.EXTRA_SMALL):Breakpoint.EXTRA_SMALL<h&&h<=Breakpoint.SMALL?void e(Breakpoint.SMALL):Breakpoint.SMALL<h&&h<=Breakpoint.MEDIUM?void e(Breakpoint.MEDIUM):Breakpoint.MEDIUM<h&&h<=Breakpoint.LARGE?void e(Breakpoint.LARGE):void(Breakpoint.LARGE<h&&e(Breakpoint.EXTRA_LARGE)):void 0},[h]),{isMobile:!!d&&[Breakpoint.EXTRA_SMALL,Breakpoint.SMALL].includes(d),isExtraSmall:d===Breakpoint.EXTRA_SMALL,isSmall:d===Breakpoint.SMALL,isMedium:d===Breakpoint.MEDIUM,isLarge:d===Breakpoint.LARGE,isExtraLarge:d===Breakpoint.EXTRA_LARGE}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Key={ENTER:"Enter",ESCAPE:"Escape",SPACE:[" ","Spacebar"],TAB:"Tab",PERIOD:".",COMMA:","};
|
|
@@ -2,36 +2,36 @@ import{Direction}from"..";/**
|
|
|
2
2
|
* Default language
|
|
3
3
|
*
|
|
4
4
|
* @type {string}
|
|
5
|
-
*/export
|
|
5
|
+
*/export var DEFAULT_LANG="en";/**
|
|
6
6
|
* Default locale
|
|
7
7
|
*
|
|
8
8
|
* @type {string}
|
|
9
|
-
*/export
|
|
9
|
+
*/export var DEFAULT_LOCALE="en-GB";/**
|
|
10
10
|
* Array of languages that are written from the right to the left
|
|
11
11
|
*
|
|
12
12
|
* @type {string[]}
|
|
13
|
-
*/export
|
|
13
|
+
*/export var RTL_LANGUAGES=["ar","he"];export var SUPPORTED_LANGUAGES=["en","de","es","fr","hu","id","it","ja","pl","pt","ro","ru","th","tr","uk","zh"];/**
|
|
14
14
|
* Verifies and adjusts locale (replace `_` with `-`)
|
|
15
15
|
* Returns null if locale is unrecognized by {Intl.Locale}
|
|
16
16
|
*
|
|
17
17
|
* @param {string} locale (`es`, `es_ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
18
18
|
* @returns {string|null}
|
|
19
|
-
*/export function adjustLocale(a){if(!a||0===a.trim().length)return null;try{
|
|
19
|
+
*/export function adjustLocale(a){if(!a||0===a.trim().length)return null;try{var b=new Intl.Locale(a.trim().replace("_","-")),c=b.baseName;return c}catch(a){return console.error(a),null}}/**
|
|
20
20
|
* Provides corresponding lang (iso2) for provided locale
|
|
21
21
|
* if locale is invalid or language is unsupported returns null
|
|
22
22
|
*
|
|
23
23
|
* @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
24
24
|
* @returns {string|null}
|
|
25
|
-
*/export function getLangFromLocale(a){
|
|
25
|
+
*/export function getLangFromLocale(a){var b=adjustLocale(a);if(null===b)return null;try{var c=new Intl.Locale(b),d=c.language;return SUPPORTED_LANGUAGES.includes(d)?d:null}catch(a){return console.error(a),null}}/**
|
|
26
26
|
* Provides corresponding country code (iso2) for locales code with explicit region value (`es-ES`, `en-GB`, `ja-JP` etc.)
|
|
27
27
|
* if the value is invalid or missing region it returns null
|
|
28
28
|
*
|
|
29
29
|
* @param {string} locale
|
|
30
30
|
* @returns {string|null}
|
|
31
|
-
*/export function getCountryFromLocale(a){
|
|
31
|
+
*/export function getCountryFromLocale(a){var b=adjustLocale(a);if(null===b)return null;try{var c=new Intl.Locale(b),d=c.region;return null!==d&&void 0!==d?d:null}catch(a){return console.error(a),null}}/**
|
|
32
32
|
* Provides the layout direction for a given locale.
|
|
33
33
|
* If locale is invalid or language is unsupported returns Direction.LTR
|
|
34
34
|
*
|
|
35
35
|
* @param {string} locale (`es`, `es-ES`, `en-GB`, `en`, `ja`, `ja-JP` etc)
|
|
36
36
|
* @returns {Direction} The layout direction based on the locale
|
|
37
|
-
*/export function getDirectionFromLocale(a){try{
|
|
37
|
+
*/export function getDirectionFromLocale(a){try{var b=adjustLocale(a),c=new Intl.Locale(b),d=c.language;return RTL_LANGUAGES.includes(d)?Direction.RTL:Direction.LTR}catch(a){return console.error(a),Direction.LTR}}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import classnames from"classnames";import{useState,forwardRef,useEffect}from"react";import{usePopper}from"react-popper";import{Position}from"..";import Dimmer from"../../dimmer";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";
|
|
2
|
-
name:"preventOverflow",options:{altAxis:!0,tether:!1}}),
|
|
3
|
-
}}}),
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";import _defineProperty from"@babel/runtime/helpers/defineProperty";var _fallbackPlacements,_excluded=["arrow","flip","altAxis","children","open","onClose","position","anchorRef","anchorWidth"];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{useState,forwardRef,useEffect}from"react";import{usePopper}from"react-popper";import{Position}from"..";import Dimmer from"../../dimmer";import{jsx as _jsx}from"react/jsx-runtime";import{jsxs as _jsxs}from"react/jsx-runtime";var POPOVER_OFFSET=[0,16],fallbackPlacements=(_fallbackPlacements={},_defineProperty(_fallbackPlacements,Position.TOP,[Position.BOTTOM,Position.RIGHT,Position.LEFT]),_defineProperty(_fallbackPlacements,Position.BOTTOM,[Position.TOP,Position.RIGHT,Position.LEFT]),_defineProperty(_fallbackPlacements,Position.LEFT,[Position.RIGHT,Position.TOP,Position.BOTTOM]),_defineProperty(_fallbackPlacements,Position.RIGHT,[Position.LEFT,Position.TOP,Position.BOTTOM]),_fallbackPlacements),Panel=/*#__PURE__*/forwardRef(function(a,b){var c,d=a.arrow,e=void 0!==d&&d,f=a.flip,g=a.altAxis,h=a.children,i=a.open,j=void 0!==i&&i,k=a.onClose,l=a.position,m=void 0===l?Position.BOTTOM:l,n=a.anchorRef,o=a.anchorWidth,p=_objectWithoutProperties(a,_excluded),q=useState(null),r=_slicedToArray(q,2),s=r[0],t=r[1],u=useState(null),v=_slicedToArray(u,2),w=v[0],x=v[1],y=[];void 0!==g&&g&&y.push({// https://popper.js.org/docs/v2/modifiers/prevent-overflow
|
|
2
|
+
name:"preventOverflow",options:{altAxis:!0,tether:!1}}),e&&(y.push({name:"arrow",options:{element:s,options:{padding:8// 8px from the edges of the popper
|
|
3
|
+
}}}),y.push({name:"offset",options:{offset:POPOVER_OFFSET}})),(!(void 0!==f)||f)&&fallbackPlacements[m]&&y.push({name:"flip",options:{fallbackPlacements:fallbackPlacements[m]}});var z=usePopper(n.current,w,{placement:m,modifiers:y}),A=z.styles,B=z.attributes,C=z.forceUpdate;// If the trigger is not visible when the position is calculated, it will be incorrect. Because this can happen repeatedly (on resize for example),
|
|
4
4
|
// it is most simple just to always position before opening
|
|
5
|
-
useEffect(()
|
|
6
|
-
,style:{
|
|
7
|
-
,style:
|
|
5
|
+
useEffect(function(){j&&C&&C()},[j]);var D=_objectSpread({},void 0!==o&&o?{width:null===(c=n.current)||void 0===c?void 0:c.clientWidth}:void 0);return/*#__PURE__*/_jsx(Dimmer,{open:j,transparent:!0,fadeContentOnEnter:!0,fadeContentOnExit:!0,onClose:k,children:/*#__PURE__*/_jsx("div",_objectSpread(_objectSpread(_objectSpread({},p),{},{ref:x// eslint-disable-next-line react/forbid-dom-props
|
|
6
|
+
,style:_objectSpread({},A.popper)},B.popper),{},{className:classnames("np-panel",{"np-panel--open":j},p.className),children:/*#__PURE__*/_jsxs("div",{ref:b/* eslint-disable-next-line react/forbid-dom-props */,style:D,className:classnames("np-panel__content"),children:[h,e&&/*#__PURE__*/_jsx("div",{ref:t,className:classnames("np-panel__arrow")// eslint-disable-next-line react/forbid-dom-props
|
|
7
|
+
,style:A.arrow})]})}))})});// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
|
|
8
8
|
// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
|
|
9
9
|
// This mapping forces popover to try the four available positions before going back to the initial chosen one.
|
|
10
10
|
export default Panel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Breakpoint=/*#__PURE__*/function(a){return a[a.EXTRA_SMALL=480]="EXTRA_SMALL",a[a.SMALL=576]="SMALL",a[a.MEDIUM=768]="MEDIUM",a[a.LARGE=992]="LARGE",a[a.EXTRA_LARGE=1200]="EXTRA_LARGE",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var ControlType=/*#__PURE__*/function(a){return a.ACCENT="accent",a.POSITIVE="positive",a.NEGATIVE="negative",a}({});export var Priority=/*#__PURE__*/function(a){return a.PRIMARY="primary",a.SECONDARY="secondary",a.TERTIARY="tertiary",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var DateMode=/*#__PURE__*/function(a){return a.DAY_MONTH_YEAR="day-month-year",a.MONTH_YEAR="month-year",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Layout=/*#__PURE__*/function(a){return a.VERTICAL="VERTICAL",a.VERTICAL_TWO_COLUMN="VERTICAL_TWO_COLUMN",a.VERTICAL_ONE_COLUMN="VERTICAL_ONE_COLUMN",a.HORIZONTAL="HORIZONTAL",a.HORIZONTAL_JUSTIFIED="HORIZONTAL_JUSTIFIED",a.HORIZONTAL_LEFT_ALIGNED="HORIZONTAL_LEFT_ALIGNED",a.HORIZONTAL_RIGHT_ALIGNED="HORIZONTAL_RIGHT_ALIGNED",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var MarkdownNodeType=/*#__PURE__*/function(a){return a.BLOCK_QUOTE="block_quote",a.CODE_BLOCK="code_block",a.CODE="code",a.EMPH="emph",a.HEADING="heading",a.HTML_BLOCK="html_block",a.HTML_INLINE="html_inline",a.IMAGE="image",a.ITEM="item",a.LINEBREAK="linebreak",a.LINK="link",a.LIST="list",a.PARAGRAPH="paragraph",a.SOFTBREAK="softbreak",a.STRONG="strong",a.THEMATIC_BREAK="thematic_break",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var MonthFormat=/*#__PURE__*/function(a){return a.SHORT="short",a.LONG="long",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Position=/*#__PURE__*/function(a){return a.BOTTOM="bottom",a.BOTTOM_LEFT="bottom-left",a.BOTTOM_RIGHT="bottom-right",a.CENTER="center",a.LEFT="left",a.LEFT_TOP="left-top",a.RIGHT="right",a.RIGHT_TOP="right-top",a.TOP="top",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var ProfileType=/*#__PURE__*/function(a){return a.BUSINESS="BUSINESS",a.PERSONAL="PERSONAL",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Scroll=/*#__PURE__*/function(a){return a.CONTENT="content",a.VIEWPORT="viewport",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Sentiment=/*#__PURE__*/function(a){return a.NEGATIVE="negative",a.NEUTRAL="neutral",a.POSITIVE="positive",a.WARNING="warning",a.PENDING="pending",a.INFO="info",a.ERROR="error",a.SUCCESS="success",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Size=/*#__PURE__*/function(a){return a.EXTRA_SMALL="xs",a.SMALL="sm",a.MEDIUM="md",a.LARGE="lg",a.EXTRA_LARGE="xl",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Status=/*#__PURE__*/function(a){return a.PROCESSING="processing",a.FAILED="failed",a.SUCCEEDED="succeeded",a.HIDDEN="hidden",a.DONE="done",a.NOT_DONE="notDone",a.PENDING="pending",a}({});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @deprecated use `ControlType` and `Priority` enums instead
|
|
3
|
-
*/export
|
|
3
|
+
*/export var Type=/*#__PURE__*/function(a){return a.PRIMARY="primary",a.PAY="pay",a.SECONDARY="secondary",a.DANGER="danger",a.LINK="link",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Typography=/*#__PURE__*/function(a){return a.DISPLAY_EXTRA_LARGE="display-extra-large",a.DISPLAY_LARGE="display-large",a.DISPLAY_MEDIUM="display-medium",a.DISPLAY_SMALL="display-small",a.TITLE_SCREEN="title-screen",a.TITLE_SECTION="title-section",a.TITLE_SUBSECTION="title-subsection",a.TITLE_BODY="title-body",a.TITLE_GROUP="title-group",a.BODY_LARGE="body-large",a.BODY_DEFAULT="body-default",a.BODY_DEFAULT_BOLD="body-default-bold",a.BODY_LARGE_BOLD="body-large-bold",a.LINK_LARGE="link-large",a.LINK_DEFAULT="link-default",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Variant=/*#__PURE__*/function(a){return a.DESKTOP="desktop",a.MOBILE="mobile",a}({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export var Width=/*#__PURE__*/function(a){return a.BLOCK="block",a.AUTO="auto",a}({});
|