@transferwise/components 46.97.4 → 46.97.5
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/accordion/Accordion.js.map +1 -1
- package/build/accordion/Accordion.mjs.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatar/avatarTypes.js.map +1 -1
- package/build/avatar/avatarTypes.mjs.map +1 -1
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/AvatarView.mjs.map +1 -1
- package/build/avatarView/NotificationDot.js.map +1 -1
- package/build/avatarView/NotificationDot.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js.map +1 -1
- package/build/badge/BadgeAssets.mjs.map +1 -1
- package/build/body/Body.js.map +1 -1
- package/build/body/Body.mjs.map +1 -1
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.mjs.map +1 -1
- package/build/button/Button.resolver.js.map +1 -1
- package/build/button/Button.resolver.mjs.map +1 -1
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +1 -1
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/button/classMap.js.map +1 -1
- package/build/button/classMap.mjs.map +1 -1
- package/build/button/legacyUtils/legacyUtils.js.map +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs.map +1 -1
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs.map +1 -1
- package/build/chips/Chips.js.map +1 -1
- package/build/chips/Chips.messages.js.map +1 -1
- package/build/chips/Chips.messages.mjs.map +1 -1
- package/build/chips/Chips.mjs.map +1 -1
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/DOMOperations/DOMOperations.js.map +1 -1
- package/build/common/DOMOperations/DOMOperations.mjs.map +1 -1
- package/build/common/Option/Option.js.map +1 -1
- package/build/common/Option/Option.mjs.map +1 -1
- package/build/common/RadioButton/RadioButton.js.map +1 -1
- package/build/common/RadioButton/RadioButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/card/Card.js.map +1 -1
- package/build/common/card/Card.mjs.map +1 -1
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/circle/Circle.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.messages.js.map +1 -1
- package/build/common/closeButton/CloseButton.messages.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/common/colors.js.map +1 -1
- package/build/common/colors.mjs.map +1 -1
- package/build/common/dateUtils/getDateView/getDateView.js.map +1 -1
- package/build/common/dateUtils/getDateView/getDateView.mjs.map +1 -1
- package/build/common/dateUtils/getDayNames/getDayNames.js.map +1 -1
- package/build/common/dateUtils/getDayNames/getDayNames.mjs.map +1 -1
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.js.map +1 -1
- package/build/common/dateUtils/getFormatForLocale/getFormatForLocale.mjs.map +1 -1
- package/build/common/dateUtils/getMonthNames/getMonthNames.js.map +1 -1
- package/build/common/dateUtils/getMonthNames/getMonthNames.mjs.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -1
- package/build/common/dateUtils/isWithinRange/isWithinRange.js.map +1 -1
- package/build/common/dateUtils/isWithinRange/isWithinRange.mjs.map +1 -1
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.js.map +1 -1
- package/build/common/dateUtils/moveToWithinRange/moveToWithinRange.mjs.map +1 -1
- package/build/common/deviceDetection/deviceDetection.js.map +1 -1
- package/build/common/deviceDetection/deviceDetection.mjs.map +1 -1
- package/build/common/direction.js.map +1 -1
- package/build/common/direction.mjs.map +1 -1
- package/build/common/domHelpers/documentIosClick.js.map +1 -1
- package/build/common/domHelpers/documentIosClick.mjs.map +1 -1
- package/build/common/fileType.js.map +1 -1
- package/build/common/fileType.mjs.map +1 -1
- package/build/common/flowHeader/FlowHeader.js.map +1 -1
- package/build/common/flowHeader/FlowHeader.mjs.map +1 -1
- package/build/common/focusBoundary/FocusBoundary.js.map +1 -1
- package/build/common/focusBoundary/FocusBoundary.mjs.map +1 -1
- package/build/common/historyNavigator/historyNavigator.js.map +1 -1
- package/build/common/historyNavigator/historyNavigator.mjs.map +1 -1
- package/build/common/hooks/useConditionalListener/useConditionalListener.js.map +1 -1
- package/build/common/hooks/useConditionalListener/useConditionalListener.mjs.map +1 -1
- package/build/common/hooks/useDirection/useDirection.js.map +1 -1
- package/build/common/hooks/useDirection/useDirection.mjs.map +1 -1
- package/build/common/hooks/useEffectEvent.js.map +1 -1
- package/build/common/hooks/useEffectEvent.mjs.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
- package/build/common/hooks/useLayout/useLayout.js.map +1 -1
- package/build/common/hooks/useLayout/useLayout.mjs.map +1 -1
- package/build/common/hooks/useMedia.js.map +1 -1
- package/build/common/hooks/useMedia.mjs.map +1 -1
- package/build/common/hooks/useResizeObserver.js.map +1 -1
- package/build/common/hooks/useResizeObserver.mjs.map +1 -1
- package/build/common/hooks/useScreenSize.js.map +1 -1
- package/build/common/hooks/useScreenSize.mjs.map +1 -1
- package/build/common/hooks/useVirtualKeyboard.js.map +1 -1
- package/build/common/hooks/useVirtualKeyboard.mjs.map +1 -1
- package/build/common/initials.js +3 -0
- package/build/common/initials.js.map +1 -1
- package/build/common/initials.mjs +3 -0
- package/build/common/initials.mjs.map +1 -1
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.js.map +1 -1
- package/build/common/polymorphicWithOverrides/PolymorphicWithOverrides.mjs.map +1 -1
- package/build/common/preventScroll/PreventScroll.js.map +1 -1
- package/build/common/preventScroll/PreventScroll.mjs.map +1 -1
- package/build/common/propsValues/breakpoint.js.map +1 -1
- package/build/common/propsValues/breakpoint.mjs.map +1 -1
- package/build/common/propsValues/control.js.map +1 -1
- package/build/common/propsValues/control.mjs.map +1 -1
- package/build/common/propsValues/dateMode.js.map +1 -1
- package/build/common/propsValues/dateMode.mjs.map +1 -1
- package/build/common/propsValues/layouts.js.map +1 -1
- package/build/common/propsValues/layouts.mjs.map +1 -1
- package/build/common/propsValues/markdownNodeType.js.map +1 -1
- package/build/common/propsValues/markdownNodeType.mjs.map +1 -1
- package/build/common/propsValues/monthFormat.js.map +1 -1
- package/build/common/propsValues/monthFormat.mjs.map +1 -1
- package/build/common/propsValues/position.js.map +1 -1
- package/build/common/propsValues/position.mjs.map +1 -1
- package/build/common/propsValues/profileType.js.map +1 -1
- package/build/common/propsValues/profileType.mjs.map +1 -1
- package/build/common/propsValues/scroll.js.map +1 -1
- package/build/common/propsValues/scroll.mjs.map +1 -1
- package/build/common/propsValues/sentiment.js.map +1 -1
- package/build/common/propsValues/sentiment.mjs.map +1 -1
- package/build/common/propsValues/size.js.map +1 -1
- package/build/common/propsValues/size.mjs.map +1 -1
- package/build/common/propsValues/status.js.map +1 -1
- package/build/common/propsValues/status.mjs.map +1 -1
- package/build/common/propsValues/type.js.map +1 -1
- package/build/common/propsValues/type.mjs.map +1 -1
- package/build/common/propsValues/typography.js.map +1 -1
- package/build/common/propsValues/typography.mjs.map +1 -1
- package/build/common/propsValues/variant.js.map +1 -1
- package/build/common/propsValues/variant.mjs.map +1 -1
- package/build/common/propsValues/width.js.map +1 -1
- package/build/common/propsValues/width.mjs.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -1
- package/build/common/textFormat/formatWithPattern/formatWithPattern.mjs.map +1 -1
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -1
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.mjs.map +1 -1
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -1
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.mjs.map +1 -1
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -1
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.mjs.map +1 -1
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -1
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.mjs.map +1 -1
- package/build/common/theme.js.map +1 -1
- package/build/common/theme.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.messages.js.map +1 -1
- package/build/dateInput/DateInput.messages.mjs.map +1 -1
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.js.map +1 -1
- package/build/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +4 -4
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.messages.js.map +1 -1
- package/build/dateLookup/DateLookup.messages.mjs.map +1 -1
- package/build/dateLookup/DateLookup.mjs +4 -4
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -1
- package/build/dateLookup/dayCalendar/DayCalendar.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +3 -3
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +3 -3
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
- package/build/dateLookup/getFocusableTime/getFocusableTime.js.map +1 -1
- package/build/dateLookup/getFocusableTime/getFocusableTime.mjs.map +1 -1
- package/build/dateLookup/getStartOfDay/getStartOfDay.js.map +1 -1
- package/build/dateLookup/getStartOfDay/getStartOfDay.mjs.map +1 -1
- package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -1
- package/build/dateLookup/monthCalendar/MonthCalendar.mjs.map +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.mjs.map +1 -1
- package/build/dateLookup/tableLink/TableLink.js.map +1 -1
- package/build/dateLookup/tableLink/TableLink.mjs.map +1 -1
- package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -1
- package/build/dateLookup/yearCalendar/YearCalendar.mjs.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.mjs.map +1 -1
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -1
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs.map +1 -1
- package/build/divider/Divider.js.map +1 -1
- package/build/divider/Divider.mjs.map +1 -1
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/dropFade/DropFade.js.map +1 -1
- package/build/dropFade/DropFade.mjs.map +1 -1
- package/build/emphasis/Emphasis.js.map +1 -1
- package/build/emphasis/Emphasis.mjs.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -1
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.messages.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.messages.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs.map +1 -1
- package/build/i18n/commonMessages/Button.messages.js.map +1 -1
- package/build/i18n/commonMessages/Button.messages.mjs.map +1 -1
- package/build/i18n/cs.json +9 -9
- package/build/i18n/cs.json.js +9 -9
- package/build/i18n/cs.json.mjs +9 -9
- package/build/i18n/index.js.map +1 -1
- package/build/i18n/index.mjs.map +1 -1
- package/build/iconButton/IconButton.js.map +1 -1
- package/build/iconButton/IconButton.mjs.map +1 -1
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs.map +1 -1
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.messages.js.map +1 -1
- package/build/info/Info.messages.mjs.map +1 -1
- package/build/info/Info.mjs.map +1 -1
- package/build/info/infoPresentations.js.map +1 -1
- package/build/info/infoPresentations.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js.map +1 -1
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.mjs.map +1 -1
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/InputGroup.js +16 -20
- package/build/inputs/InputGroup.js.map +1 -1
- package/build/inputs/InputGroup.mjs +17 -21
- package/build/inputs/InputGroup.mjs.map +1 -1
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/inputs/SelectInput.js +6 -1
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.messages.js.map +1 -1
- package/build/inputs/SelectInput.messages.mjs.map +1 -1
- package/build/inputs/SelectInput.mjs +6 -1
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/TextArea.js.map +1 -1
- package/build/inputs/TextArea.mjs.map +1 -1
- package/build/inputs/_BottomSheet.js.map +1 -1
- package/build/inputs/_BottomSheet.mjs.map +1 -1
- package/build/inputs/_ButtonInput.js.map +1 -1
- package/build/inputs/_ButtonInput.mjs.map +1 -1
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +1 -1
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/inputs/_common.js.map +1 -1
- package/build/inputs/_common.mjs.map +1 -1
- package/build/inputs/contexts.js.map +1 -1
- package/build/inputs/contexts.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.messages.js.map +1 -1
- package/build/label/Label.messages.mjs.map +1 -1
- package/build/label/Label.mjs.map +1 -1
- package/build/legacylistItem/LegacyListItem.js.map +1 -1
- package/build/legacylistItem/LegacyListItem.mjs.map +1 -1
- package/build/legacylistItem/List.js.map +1 -1
- package/build/legacylistItem/List.mjs.map +1 -1
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.messages.js.map +1 -1
- package/build/link/Link.messages.mjs.map +1 -1
- package/build/link/Link.mjs.map +1 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs.map +1 -1
- package/build/logo/Logo.js.map +1 -1
- package/build/logo/Logo.mjs +1 -1
- package/build/logo/Logo.mjs.map +1 -1
- package/build/logo/logo-assets.js.map +1 -1
- package/build/logo/logo-assets.mjs.map +1 -1
- package/build/main.css +15 -0
- package/build/markdown/Markdown.js +20 -4
- package/build/markdown/Markdown.js.map +1 -1
- package/build/markdown/Markdown.mjs +1 -1
- package/build/markdown/Markdown.mjs.map +1 -1
- package/build/mocks.js.map +1 -1
- package/build/mocks.mjs.map +1 -1
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs.map +1 -1
- package/build/money/Money.js.map +1 -1
- package/build/money/Money.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +2 -2
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +2 -2
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.mjs.map +1 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +2 -2
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +2 -2
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/phoneNumberInput/data/countries.js.map +1 -1
- package/build/phoneNumberInput/data/countries.mjs.map +1 -1
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.js.map +1 -1
- package/build/phoneNumberInput/utils/cleanNumber/cleanNumber.mjs.map +1 -1
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.js.map +1 -1
- package/build/phoneNumberInput/utils/excludeCountries/excludeCountries.mjs.map +1 -1
- package/build/phoneNumberInput/utils/explodeNumberModel/index.js.map +1 -1
- package/build/phoneNumberInput/utils/explodeNumberModel/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByCode/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.js.map +1 -1
- package/build/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.mjs.map +1 -1
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.js.map +1 -1
- package/build/phoneNumberInput/utils/setDefaultPrefix/index.mjs.map +1 -1
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.js.map +1 -1
- package/build/phoneNumberInput/utils/sortArrayByProperty/sortArrayByProperty.mjs.map +1 -1
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +1 -1
- package/build/popover/Popover.mjs.map +1 -1
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.mjs.map +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.js.map +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progress/Progress.js.map +1 -1
- package/build/progress/Progress.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardContext.js.map +1 -1
- package/build/promoCard/PromoCardContext.mjs.map +1 -1
- package/build/promoCard/PromoCardGroup.js +1 -1
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardGroup.mjs +1 -1
- package/build/promoCard/PromoCardGroup.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +1 -1
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/provider/Provider.js.map +1 -1
- package/build/provider/Provider.mjs.map +1 -1
- package/build/provider/direction/DirectionProvider.js.map +1 -1
- package/build/provider/direction/DirectionProvider.mjs.map +1 -1
- package/build/provider/language/LanguageProvider.js.map +1 -1
- package/build/provider/language/LanguageProvider.mjs.map +1 -1
- package/build/provider/overlay/OverlayIdProvider.js.map +1 -1
- package/build/provider/overlay/OverlayIdProvider.mjs +1 -1
- package/build/provider/overlay/OverlayIdProvider.mjs.map +1 -1
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs.map +1 -1
- package/build/radioGroup/RadioGroup.js.map +1 -1
- package/build/radioGroup/RadioGroup.mjs.map +1 -1
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/radioOption/RadioOption.mjs.map +1 -1
- package/build/section/Section.js.map +1 -1
- package/build/section/Section.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +14 -22
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.messages.js.map +1 -1
- package/build/select/Select.messages.mjs.map +1 -1
- package/build/select/Select.mjs +14 -22
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs.map +1 -1
- package/build/select/searchBox/SearchBox.js.map +1 -1
- package/build/select/searchBox/SearchBox.mjs.map +1 -1
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.messages.js.map +1 -1
- package/build/selectOption/SelectOption.messages.mjs.map +1 -1
- package/build/selectOption/SelectOption.mjs +1 -1
- package/build/selectOption/SelectOption.mjs.map +1 -1
- package/build/slidingPanel/SlidingPanel.js.map +1 -1
- package/build/slidingPanel/SlidingPanel.mjs.map +1 -1
- package/build/snackbar/Snackbar.js +1 -1
- package/build/snackbar/Snackbar.js.map +1 -1
- package/build/snackbar/Snackbar.mjs +1 -1
- package/build/snackbar/Snackbar.mjs.map +1 -1
- package/build/snackbar/SnackbarContext.js.map +1 -1
- package/build/snackbar/SnackbarContext.mjs.map +1 -1
- package/build/snackbar/SnackbarProvider.js.map +1 -1
- package/build/snackbar/SnackbarProvider.mjs.map +1 -1
- package/build/snackbar/useSnackbar.js.map +1 -1
- package/build/snackbar/useSnackbar.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +1 -1
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/stepper/deviceDetection.js.map +1 -1
- package/build/stepper/deviceDetection.mjs.map +1 -1
- package/build/sticky/Sticky.js.map +1 -1
- package/build/sticky/Sticky.mjs.map +1 -1
- package/build/styles/inputs/Input.css +10 -0
- package/build/styles/inputs/TextArea.css +10 -0
- package/build/styles/main.css +15 -0
- package/build/styles/upload/Upload.css +3 -0
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.messages.js.map +1 -1
- package/build/summary/Summary.messages.mjs.map +1 -1
- package/build/summary/Summary.mjs +1 -1
- package/build/summary/Summary.mjs.map +1 -1
- package/build/switch/Switch.js.map +1 -1
- package/build/switch/Switch.mjs.map +1 -1
- package/build/switchOption/SwitchOption.js.map +1 -1
- package/build/switchOption/SwitchOption.mjs.map +1 -1
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.messages.js.map +1 -1
- package/build/table/Table.messages.mjs.map +1 -1
- package/build/table/Table.mjs.map +1 -1
- package/build/table/TableCell.js.map +1 -1
- package/build/table/TableCell.mjs.map +1 -1
- package/build/table/TableHeader.js.map +1 -1
- package/build/table/TableHeader.mjs.map +1 -1
- package/build/table/TableRow.js.map +1 -1
- package/build/table/TableRow.mjs.map +1 -1
- package/build/table/TableStatusText.js.map +1 -1
- package/build/table/TableStatusText.mjs.map +1 -1
- package/build/tabs/Tab.js.map +1 -1
- package/build/tabs/Tab.mjs.map +1 -1
- package/build/tabs/TabList.js.map +1 -1
- package/build/tabs/TabList.mjs.map +1 -1
- package/build/tabs/TabPanel.js.map +1 -1
- package/build/tabs/TabPanel.mjs.map +1 -1
- package/build/tabs/Tabs.js +3 -3
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +4 -4
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tabs/utils.js +1 -1
- package/build/tabs/utils.js.map +1 -1
- package/build/tabs/utils.mjs +1 -1
- package/build/tabs/utils.mjs.map +1 -1
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js.map +1 -1
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.mjs.map +1 -1
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +57 -61
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.messages.js.map +1 -1
- package/build/typeahead/Typeahead.messages.mjs.map +1 -1
- package/build/typeahead/Typeahead.mjs +57 -61
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs +2 -2
- package/build/typeahead/typeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.mjs.map +1 -1
- package/build/typeahead/util/highlight.js.map +1 -1
- package/build/typeahead/util/highlight.mjs.map +1 -1
- package/build/types/actionOption/ActionOption.d.ts.map +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/chevron/Chevron.d.ts.map +1 -1
- package/build/types/chips/Chip.d.ts.map +1 -1
- package/build/types/chips/Chips.d.ts.map +1 -1
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/colors.d.ts.map +1 -1
- package/build/types/common/dateUtils/getDateView/getDateView.d.ts.map +1 -1
- package/build/types/common/dateUtils/getMonthNames/getMonthNames.d.ts.map +1 -1
- package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts.map +1 -1
- package/build/types/common/dateUtils/isMonthAndYearFormat/isMonthAndYearFormat.d.ts.map +1 -1
- package/build/types/common/fakeEvents.d.ts.map +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
- package/build/types/common/historyNavigator/historyNavigator.d.ts.map +1 -1
- package/build/types/common/hooks/useConditionalListener/useConditionalListener.d.ts.map +1 -1
- package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
- package/build/types/common/initials.d.ts.map +1 -1
- package/build/types/common/textFormat/formatWithPattern/formatWithPattern.d.ts.map +1 -1
- package/build/types/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.d.ts.map +1 -1
- package/build/types/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.d.ts.map +1 -1
- package/build/types/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.d.ts.map +1 -1
- package/build/types/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.d.ts.map +1 -1
- package/build/types/common/textFormat/unformatWithPattern/unformatWithPattern.d.ts.map +1 -1
- package/build/types/common/theme.d.ts.map +1 -1
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/dateInput/utils/convertToLocalMidnight/convertToLocalMidnight.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/monthCalendar/table/MonthCalendarTable.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/table/YearCalendarTable.d.ts.map +1 -1
- package/build/types/decision/Decision.d.ts.map +1 -1
- package/build/types/dimmer/Dimmer.d.ts.map +1 -1
- package/build/types/dropFade/DropFade.d.ts.map +1 -1
- package/build/types/emphasis/Emphasis.d.ts.map +1 -1
- package/build/types/field/Field.d.ts.map +1 -1
- package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/flowNavigation/animatedLabel/AnimatedLabel.d.ts.map +1 -1
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/image/Image.d.ts.map +1 -1
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/link/Link.d.ts.map +1 -1
- package/build/types/loader/Loader.d.ts.map +1 -1
- package/build/types/markdown/Markdown.d.ts.map +1 -1
- package/build/types/modal/Modal.d.ts.map +1 -1
- package/build/types/money/Money.d.ts.map +1 -1
- package/build/types/navigationOptionsList/NavigationOptionsList.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/cleanNumber/cleanNumber.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/explodeNumberModel/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/findCountryByCode/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/findCountryByPrefix/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/groupCountriesByPrefix/groupCountriesByPrefix.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/isStringNumeric/isStringNumeric.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/isValidPhoneNumber/isValidPhoneNumber.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/longestMatchingPrefix/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/utils/setDefaultPrefix/index.d.ts.map +1 -1
- package/build/types/progress/Progress.d.ts.map +1 -1
- package/build/types/progressBar/ProgressBar.d.ts.map +1 -1
- package/build/types/provider/direction/DirectionProvider.d.ts.map +1 -1
- package/build/types/provider/language/LanguageProvider.d.ts.map +1 -1
- package/build/types/provider/overlay/OverlayIdProvider.d.ts.map +1 -1
- package/build/types/section/Section.d.ts.map +1 -1
- package/build/types/segmentedControl/SegmentedControl.d.ts.map +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts.map +1 -1
- package/build/types/stepper/Stepper.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/build/types/switchOption/SwitchOption.d.ts.map +1 -1
- package/build/types/table/Table.d.ts.map +1 -1
- package/build/types/table/TableCell.d.ts.map +1 -1
- package/build/types/table/TableHeader.d.ts.map +1 -1
- package/build/types/table/TableRow.d.ts.map +1 -1
- package/build/types/table/TableStatusText.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/tabs/utils.d.ts.map +1 -1
- package/build/types/test-utils/story-config.d.ts.map +1 -1
- package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +1 -0
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts.map +1 -1
- package/build/types/uploadInput/UploadInput.d.ts.map +1 -1
- package/build/types/uploadInput/uploadButton/getAllowedFileTypes.d.ts.map +1 -1
- package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts.map +1 -1
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
- package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
- package/build/upload/Upload.js +2 -2
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.messages.js.map +1 -1
- package/build/upload/Upload.messages.mjs.map +1 -1
- package/build/upload/Upload.mjs +2 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +8 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +8 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/upload/utils/asyncFileRead/asyncFileRead.js.map +1 -1
- package/build/upload/utils/asyncFileRead/asyncFileRead.mjs.map +1 -1
- package/build/upload/utils/getFileType/getFileType.js.map +1 -1
- package/build/upload/utils/getFileType/getFileType.mjs.map +1 -1
- package/build/upload/utils/isSizeValid/isSizeValid.js.map +1 -1
- package/build/upload/utils/isSizeValid/isSizeValid.mjs.map +1 -1
- package/build/upload/utils/isTypeValid/isTypeValid.js.map +1 -1
- package/build/upload/utils/isTypeValid/isTypeValid.mjs.map +1 -1
- package/build/upload/utils/postData/postData.js.map +1 -1
- package/build/upload/utils/postData/postData.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.messages.js.map +1 -1
- package/build/uploadInput/UploadInput.messages.mjs.map +1 -1
- package/build/uploadInput/UploadInput.mjs +2 -2
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.messages.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.messages.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadButton/defaults.js.map +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.messages.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.messages.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItemLink.mjs.map +1 -1
- package/build/utilities/cssValueWithUnit.js.map +1 -1
- package/build/utilities/cssValueWithUnit.mjs.map +1 -1
- package/build/utilities/logActionRequired.js.map +1 -1
- package/build/utilities/logActionRequired.mjs.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +3 -5
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +3 -5
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/build/withId/withId.js.map +1 -1
- package/build/withId/withId.mjs.map +1 -1
- package/build/withNextPortal/withNextPortal.js +1 -1
- package/build/withNextPortal/withNextPortal.js.map +1 -1
- package/build/withNextPortal/withNextPortal.mjs +1 -1
- package/build/withNextPortal/withNextPortal.mjs.map +1 -1
- package/package.json +52 -52
- package/src/alert/Alert.spec.tsx +2 -4
- package/src/card/Card.story.tsx +4 -2
- package/src/checkbox/Checkbox.story.tsx +3 -2
- package/src/common/initials.spec.tsx +42 -0
- package/src/common/initials.ts +4 -0
- package/src/dateInput/DateInput.story.tsx +2 -2
- package/src/dateInput/DateInput.tests.story.tsx +11 -10
- package/src/i18n/cs.json +9 -9
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +1 -1
- package/src/inputs/Input.css +10 -0
- package/src/inputs/SelectInput.tsx +11 -2
- package/src/inputs/TextArea.css +10 -0
- package/src/inputs/_common.less +6 -0
- package/src/main.css +15 -0
- package/src/markdown/Markdown.tsx +2 -1
- package/src/phoneNumberInput/PhoneNumberInput.tsx +2 -2
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +3 -2
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +3 -2
- package/src/radioGroup/RadioGroup.story.tsx +2 -2
- package/src/tabs/Tabs.spec.tsx +137 -0
- package/src/tabs/Tabs.story.tsx +1 -0
- package/src/tabs/Tabs.tsx +0 -1
- package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.spec.js +9 -8
- package/src/typeahead/Typeahead.story.tsx +3 -2
- package/src/upload/Upload.css +3 -0
- package/src/upload/Upload.less +7 -1
- package/src/upload/Upload.story.tsx +1 -1
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.tsx +15 -0
- package/src/upload/steps/uploadImageStep/uploadImageStep.tsx +8 -0
- package/src/withDisplayFormat/WithDisplayFormat.spec.js +120 -209
- package/src/withDisplayFormat/WithDisplayFormat.tsx +4 -6
- package/src/tabs/Tabs.spec.js +0 -423
- package/src/withDisplayFormat/WithDisplayFormat.state.spec.js +0 -42
|
@@ -115,17 +115,16 @@ class WithDisplayFormat<T extends TextElementProps> extends React.Component<
|
|
|
115
115
|
const { displayPattern } = this.props;
|
|
116
116
|
|
|
117
117
|
if (triggerEvent) {
|
|
118
|
-
const charCode = String.fromCharCode(triggerEvent.which).toLowerCase();
|
|
119
|
-
|
|
120
118
|
if (triggerType === 'Paste' || triggerType === 'Cut') {
|
|
121
119
|
return triggerType;
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
if ((triggerEvent.ctrlKey || triggerEvent.metaKey) &&
|
|
122
|
+
if ((triggerEvent.ctrlKey || triggerEvent.metaKey) && triggerEvent.key === 'z') {
|
|
125
123
|
return triggerEvent.shiftKey ? 'Redo' : 'Undo';
|
|
126
124
|
}
|
|
125
|
+
|
|
127
126
|
// Detect mouse event redo
|
|
128
|
-
if (triggerEvent.ctrlKey &&
|
|
127
|
+
if (triggerEvent.ctrlKey && triggerEvent.key === 'd') {
|
|
129
128
|
return 'Delete';
|
|
130
129
|
}
|
|
131
130
|
|
|
@@ -151,8 +150,7 @@ class WithDisplayFormat<T extends TextElementProps> extends React.Component<
|
|
|
151
150
|
};
|
|
152
151
|
|
|
153
152
|
detectUndoRedo = (event: React.KeyboardEvent<HTMLTextElement>) => {
|
|
154
|
-
|
|
155
|
-
if ((event.ctrlKey || event.metaKey) && charCode === 'z') {
|
|
153
|
+
if ((event.ctrlKey || event.metaKey) && event.key === 'z') {
|
|
156
154
|
return event.shiftKey ? 'Redo' : 'Undo';
|
|
157
155
|
}
|
|
158
156
|
return null;
|
package/src/tabs/Tabs.spec.js
DELETED
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
import { Spring } from '@react-spring/web';
|
|
2
|
-
import { mount } from 'enzyme';
|
|
3
|
-
import { act } from 'react';
|
|
4
|
-
|
|
5
|
-
import { Size, Width } from '../common';
|
|
6
|
-
|
|
7
|
-
import Tab from './Tab';
|
|
8
|
-
import TabPanel from './TabPanel';
|
|
9
|
-
import Tabs from './Tabs';
|
|
10
|
-
import { getElasticDragDifference } from './utils';
|
|
11
|
-
|
|
12
|
-
jest.mock('@react-spring/web', () => ({
|
|
13
|
-
animated: {
|
|
14
|
-
div: ({ children, style }) => (
|
|
15
|
-
<div id="wrapped" style={style}>
|
|
16
|
-
{children}
|
|
17
|
-
</div>
|
|
18
|
-
),
|
|
19
|
-
},
|
|
20
|
-
Spring: jest.fn((props) => {
|
|
21
|
-
const { children, to, onRest, config } = props;
|
|
22
|
-
|
|
23
|
-
// Queue this behind a timer so we can control when it runs
|
|
24
|
-
setTimeout(onRest, 0);
|
|
25
|
-
|
|
26
|
-
return children({
|
|
27
|
-
config,
|
|
28
|
-
onRest,
|
|
29
|
-
...to, // Assuming Spring is doing the right stuff and just pass in the end result as props
|
|
30
|
-
});
|
|
31
|
-
}),
|
|
32
|
-
}));
|
|
33
|
-
|
|
34
|
-
describe('Tabs', () => {
|
|
35
|
-
let component;
|
|
36
|
-
let props;
|
|
37
|
-
|
|
38
|
-
beforeEach(() => {
|
|
39
|
-
jest.useFakeTimers();
|
|
40
|
-
props = {
|
|
41
|
-
animatePanelsOnClick: true,
|
|
42
|
-
tabs: generateTabs(),
|
|
43
|
-
changeTabOnSwipe: true,
|
|
44
|
-
name: 'test',
|
|
45
|
-
headerWidth: 'block',
|
|
46
|
-
selected: 0,
|
|
47
|
-
transitionSpacing: 'default',
|
|
48
|
-
onTabSelect: jest.fn(),
|
|
49
|
-
className: 'custom-class-name',
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
jest.spyOn(HTMLLIElement.prototype, 'getBoundingClientRect').mockReturnValue({ width: 60 });
|
|
53
|
-
jest.spyOn(HTMLDivElement.prototype, 'getBoundingClientRect').mockReturnValue({ width: 300 });
|
|
54
|
-
|
|
55
|
-
component = mount(<Tabs {...props} />);
|
|
56
|
-
|
|
57
|
-
jest.clearAllMocks();
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
afterEach(async () => {
|
|
61
|
-
await jest.runOnlyPendingTimersAsync();
|
|
62
|
-
jest.useRealTimers();
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('renders with right props', () => {
|
|
66
|
-
expect(component.find(Tabs)).toHaveLength(1);
|
|
67
|
-
expect(component.find(Tabs).props()).toStrictEqual({ ...props });
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('uses a ref to get the components width', () => {
|
|
71
|
-
expect(component.instance().containerWidth).toBe(300);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
it('passes the x position to translate to Spring', () => {
|
|
75
|
-
component.setProps({ selected: 1 });
|
|
76
|
-
|
|
77
|
-
component.update();
|
|
78
|
-
|
|
79
|
-
expect(component.find(Spring).props()).toStrictEqual(
|
|
80
|
-
expect.objectContaining({
|
|
81
|
-
config: { clamp: true, precision: 0.01, velocity: expect.any(Number) },
|
|
82
|
-
from: { transform: 'translateX(0px)' },
|
|
83
|
-
to: { transform: 'translateX(-300px)' },
|
|
84
|
-
}),
|
|
85
|
-
);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it('calls spring with precise transforms when dragging', () => {
|
|
89
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
90
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: -10, y: 0 }));
|
|
91
|
-
|
|
92
|
-
expect(component.find(Spring).props()).toStrictEqual(
|
|
93
|
-
expect.objectContaining({
|
|
94
|
-
config: { clamp: true, precision: 1, velocity: expect.any(Number) },
|
|
95
|
-
to: { transform: 'translateX(-10px)' },
|
|
96
|
-
}),
|
|
97
|
-
);
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it('resets back to the current selected tab if not dragged beyond half the container width', () => {
|
|
101
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
102
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: -10, y: 0 }));
|
|
103
|
-
|
|
104
|
-
expect(component.find(Spring).props()).toStrictEqual(
|
|
105
|
-
expect.objectContaining({
|
|
106
|
-
to: { transform: 'translateX(-10px)' },
|
|
107
|
-
}),
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
component.simulate('touchend', createMoveTouchEventObject({ x: -10, y: 0 }));
|
|
111
|
-
|
|
112
|
-
expect(component.find(Spring).props()).toStrictEqual(
|
|
113
|
-
expect.objectContaining({
|
|
114
|
-
from: { transform: 'translateX(-10px)' },
|
|
115
|
-
to: { transform: 'translateX(0px)' },
|
|
116
|
-
}),
|
|
117
|
-
);
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('applies resistence to the touchmove when on the first/last tab', () => {
|
|
121
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
122
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: 10, y: 0 }));
|
|
123
|
-
|
|
124
|
-
expect(component.find(Spring).props()).toStrictEqual(
|
|
125
|
-
expect.objectContaining({
|
|
126
|
-
to: { transform: `translateX(${getElasticDragDifference(10)}px)` },
|
|
127
|
-
}),
|
|
128
|
-
);
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
it('applies resistence when transitioning toward disabled tabs when the selected tab is the last enabled one', () => {
|
|
132
|
-
component = mount(<Tabs {...props} tabs={generateTabs([true, false, false])} selected={1} />);
|
|
133
|
-
|
|
134
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
135
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: 10, y: 0 }));
|
|
136
|
-
|
|
137
|
-
expect(component.find(Spring).props()).toStrictEqual(
|
|
138
|
-
expect.objectContaining({
|
|
139
|
-
to: { transform: `translateX(${getElasticDragDifference(10)}px)` },
|
|
140
|
-
}),
|
|
141
|
-
);
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
it('disables vertical movement after swiping', () => {
|
|
145
|
-
expect(component.state().isSwiping).toBe(false);
|
|
146
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
147
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: 10, y: 0 }));
|
|
148
|
-
expect(component.state().isSwiping).toBe(true);
|
|
149
|
-
component.simulate('touchend', createMoveTouchEventObject({ x: 10, y: 0 }));
|
|
150
|
-
expect(component.state().isSwiping).toBe(false);
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
it('disables horizontal movement after scrolling', () => {
|
|
154
|
-
expect(component.state().isScrolling).toBe(false);
|
|
155
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
156
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: 0, y: 10 }));
|
|
157
|
-
expect(component.state().isScrolling).toBe(true);
|
|
158
|
-
component.simulate('touchend', createMoveTouchEventObject({ x: 0, y: 10 }));
|
|
159
|
-
expect(component.state().isScrolling).toBe(false);
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
it('calls onTabSelect when switching tabs', () => {
|
|
163
|
-
component.find(Tab).at(2).simulate('click');
|
|
164
|
-
expect(props.onTabSelect).toHaveBeenCalledTimes(1);
|
|
165
|
-
|
|
166
|
-
component.simulate('touchstart', createStartTouchEventObject({ x: 0, y: 0 }));
|
|
167
|
-
component.simulate('touchmove', createMoveTouchEventObject({ x: -160, y: 0 }));
|
|
168
|
-
component.simulate('touchend', createMoveTouchEventObject({ x: -175, y: 0 }));
|
|
169
|
-
|
|
170
|
-
expect(props.onTabSelect).toHaveBeenCalledTimes(2);
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
it('renders the correct amount of tab titles and panels', () => {
|
|
174
|
-
const enabledTabsLength = props.tabs.filter(({ disabled }) => !disabled).length;
|
|
175
|
-
|
|
176
|
-
expect(component.find(TabPanel)).toHaveLength(enabledTabsLength);
|
|
177
|
-
expect(component.find(Tab)).toHaveLength(props.tabs.length);
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
it('does not animate when a tab before the selected tab goes from disabled to enabled', async () => {
|
|
181
|
-
component.setProps({ selected: 2 });
|
|
182
|
-
expect(component.state('isAnimating')).toBe(true);
|
|
183
|
-
|
|
184
|
-
await act(async () => {
|
|
185
|
-
await jest.runOnlyPendingTimersAsync();
|
|
186
|
-
});
|
|
187
|
-
expect(component.state('isAnimating')).toBe(false);
|
|
188
|
-
|
|
189
|
-
component.setProps({ tabs: generateTabs([false, false, false]) });
|
|
190
|
-
expect(component.state('isAnimating')).toBe(false);
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
it('does not animate when animatePanels is false', () => {
|
|
194
|
-
component.setProps({ animatePanelsOnClick: false, selected: 2 });
|
|
195
|
-
expect(component.state('isAnimating')).toBe(false);
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
describe('spacing between panels when animating', () => {
|
|
199
|
-
it('doesnt render a spacer when no transitionSpacing is provided', () => {
|
|
200
|
-
component.setState({ isAnimating: true });
|
|
201
|
-
expect(leftSpacer(component).children()).toHaveLength(0);
|
|
202
|
-
expect(leftSpacer(component).children()).toHaveLength(0);
|
|
203
|
-
|
|
204
|
-
component.setProps({ transitionSpacing: Size.LARGE });
|
|
205
|
-
|
|
206
|
-
expect(leftSpacer(component).children()).toHaveLength(1);
|
|
207
|
-
expect(rightSpacer(component).children()).toHaveLength(1);
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
it('adds the spacers on either side of the selected panel', () => {
|
|
211
|
-
expect(component.find('#wrapped').childAt(0).is('[id="left-spacer"]')).toBe(true);
|
|
212
|
-
|
|
213
|
-
expect(component.find('#wrapped').childAt(2).is('[id="right-spacer"]')).toBe(true);
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
it('sets the width of the spacer based on the transitionSpacing provided', () => {
|
|
217
|
-
const spacerWidth = () => getComputedStyle(leftSpacer(component).getDOMNode()).width;
|
|
218
|
-
|
|
219
|
-
component.setState({ isAnimating: true });
|
|
220
|
-
|
|
221
|
-
component.setProps({ transitionSpacing: Size.EXTRA_SMALL });
|
|
222
|
-
expect(spacerWidth()).toBe('8px');
|
|
223
|
-
|
|
224
|
-
component.setProps({ transitionSpacing: Size.SMALL });
|
|
225
|
-
expect(spacerWidth()).toBe('16px');
|
|
226
|
-
|
|
227
|
-
component.setProps({ transitionSpacing: Size.MEDIUM });
|
|
228
|
-
expect(spacerWidth()).toBe('24px');
|
|
229
|
-
|
|
230
|
-
component.setProps({ transitionSpacing: Size.LARGE });
|
|
231
|
-
expect(spacerWidth()).toBe('32px');
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
describe('updating the translate values', () => {
|
|
236
|
-
beforeEach(() => {
|
|
237
|
-
props = {
|
|
238
|
-
...props,
|
|
239
|
-
tabs: generateTabs([false, true, false, false, false]),
|
|
240
|
-
};
|
|
241
|
-
component = mount(<Tabs {...props} />);
|
|
242
|
-
});
|
|
243
|
-
|
|
244
|
-
it.each`
|
|
245
|
-
selected | headerWidth | lineTranslateX | sliderTranslateX
|
|
246
|
-
${1} | ${Width.BLOCK} | ${'100%'} | ${'-300px'}
|
|
247
|
-
${99} | ${Width.BLOCK} | ${'400%'} | ${'-900px'}
|
|
248
|
-
${3} | ${Width.BLOCK} | ${'300%'} | ${'-600px'}
|
|
249
|
-
${4} | ${Width.BLOCK} | ${'400%'} | ${'-900px'}
|
|
250
|
-
${5} | ${Width.BLOCK} | ${'400%'} | ${'-900px'}
|
|
251
|
-
${1} | ${Width.AUTO} | ${'60px'} | ${'-300px'}
|
|
252
|
-
${99} | ${Width.AUTO} | ${'240px'} | ${'-900px'}
|
|
253
|
-
${3} | ${Width.AUTO} | ${'180px'} | ${'-600px'}
|
|
254
|
-
${4} | ${Width.AUTO} | ${'240px'} | ${'-900px'}
|
|
255
|
-
${5} | ${Width.AUTO} | ${'240px'} | ${'-900px'}
|
|
256
|
-
`(
|
|
257
|
-
'when selecting tab number %selected when headerWidth is set to %headerWidth',
|
|
258
|
-
async ({ selected, headerWidth, lineTranslateX, sliderTranslateX }) => {
|
|
259
|
-
component.setProps({ headerWidth });
|
|
260
|
-
|
|
261
|
-
const getLineStyles = () => getComputedStyle(component.find('.tabs__line').getDOMNode());
|
|
262
|
-
const getSliderStyles = () =>
|
|
263
|
-
getComputedStyle(component.find('.tabs__slider').getDOMNode());
|
|
264
|
-
|
|
265
|
-
await act(async () => {
|
|
266
|
-
component.setProps({ selected });
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
expect(component.state('isAnimating')).toBe(true);
|
|
270
|
-
expect(getLineStyles().getPropertyValue('transform')).toBe(`translateX(${lineTranslateX})`);
|
|
271
|
-
expect(getSliderStyles().getPropertyValue('transform')).toBe(
|
|
272
|
-
`translateX(${sliderTranslateX})`,
|
|
273
|
-
);
|
|
274
|
-
|
|
275
|
-
await act(async () => {
|
|
276
|
-
await jest.runOnlyPendingTimersAsync();
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
expect(component.state('isAnimating')).toBe(false);
|
|
280
|
-
expect(getLineStyles().getPropertyValue('transform')).toBe(`translateX(${lineTranslateX})`);
|
|
281
|
-
expect(getSliderStyles().getPropertyValue('transform')).toBe('translateX(0px)');
|
|
282
|
-
},
|
|
283
|
-
);
|
|
284
|
-
|
|
285
|
-
it('changes to full width tabs and updates translation value when width is larger than container', () => {
|
|
286
|
-
component.setProps({ headerWidth: Width.AUTO, selected: 1 });
|
|
287
|
-
|
|
288
|
-
const getLineStyles = () => getComputedStyle(component.find('.tabs__line').getDOMNode());
|
|
289
|
-
|
|
290
|
-
expect(getLineStyles().getPropertyValue('transform')).toBe(`translateX(60px)`);
|
|
291
|
-
expect(component.state('fullWidthTabs')).toBeFalsy();
|
|
292
|
-
|
|
293
|
-
component.setProps({ tabs: generateTabs([false, true, false, false, false, false, false]) });
|
|
294
|
-
|
|
295
|
-
expect(getLineStyles().getPropertyValue('transform')).toBe(`translateX(100%)`);
|
|
296
|
-
expect(component.state('fullWidthTabs')).toBeTruthy();
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
it('starts the transition offset by the spacer when one is provided', () => {
|
|
300
|
-
const getSliderStyles = () => getComputedStyle(component.find('.tabs__slider').getDOMNode());
|
|
301
|
-
|
|
302
|
-
component.setProps({ transitionSpacing: Size.NONE, selected: 3 });
|
|
303
|
-
component.setState({ isAnimating: true });
|
|
304
|
-
|
|
305
|
-
expect(getSliderStyles().getPropertyValue('transform')).toBe('translateX(-600px)');
|
|
306
|
-
|
|
307
|
-
component.setProps({ transitionSpacing: Size.LARGE });
|
|
308
|
-
|
|
309
|
-
expect(getSliderStyles().getPropertyValue('transform')).toBe('translateX(-632px)');
|
|
310
|
-
});
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
describe('handling overflow', () => {
|
|
314
|
-
it('only displays the selected tab when not animating or swiping', () => {
|
|
315
|
-
const selected = component.prop('selected');
|
|
316
|
-
|
|
317
|
-
expect(component.state('isAnimating')).toBe(false);
|
|
318
|
-
expect(component.state('isSwiping')).toBe(false);
|
|
319
|
-
|
|
320
|
-
component.find(TabPanel).forEach((tab, index) => {
|
|
321
|
-
if (selected === index) {
|
|
322
|
-
expect(tab.prop('style').display).toBe('block');
|
|
323
|
-
} else {
|
|
324
|
-
expect(tab.prop('style').display).toBe('none');
|
|
325
|
-
}
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
it('displays all tabs when animating', async () => {
|
|
330
|
-
await act(async () => {
|
|
331
|
-
component.setState({ isAnimating: true });
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
component.find(TabPanel).forEach((tab) => {
|
|
335
|
-
expect(tab.prop('style').display).toBe('block');
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
it('displays all tabs when swiping', async () => {
|
|
340
|
-
await act(async () => {
|
|
341
|
-
component.setState({ isSwiping: true });
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
component.find(TabPanel).forEach((tab) => {
|
|
345
|
-
expect(tab.prop('style').display).toBe('block');
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
|
|
349
|
-
it('has `overflow: hidden` on the parent when animating/swiping', async () => {
|
|
350
|
-
await act(async () => {
|
|
351
|
-
component.setState({ isSwiping: false, isAnimating: false });
|
|
352
|
-
});
|
|
353
|
-
expect(getPanelContainerOverflow(component)).toBe('visible');
|
|
354
|
-
|
|
355
|
-
await act(async () => {
|
|
356
|
-
component.setState({ isSwiping: true });
|
|
357
|
-
});
|
|
358
|
-
expect(getPanelContainerOverflow(component)).toBe('hidden');
|
|
359
|
-
|
|
360
|
-
await act(async () => {
|
|
361
|
-
component.setState({ isSwiping: false, isAnimating: true });
|
|
362
|
-
});
|
|
363
|
-
expect(getPanelContainerOverflow(component)).toBe('hidden');
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
it('sets the panel width according to if animating/swiping', async () => {
|
|
367
|
-
await act(async () => {
|
|
368
|
-
component.setState({ isSwiping: false, isAnimating: false });
|
|
369
|
-
});
|
|
370
|
-
expect(getPanelWidth(component)).toBe('100%');
|
|
371
|
-
|
|
372
|
-
await act(async () => {
|
|
373
|
-
component.setState({ isSwiping: true });
|
|
374
|
-
});
|
|
375
|
-
expect(getPanelWidth(component)).toBe('300px');
|
|
376
|
-
|
|
377
|
-
await act(async () => {
|
|
378
|
-
component.setState({ isSwiping: false, isAnimating: true });
|
|
379
|
-
});
|
|
380
|
-
expect(getPanelWidth(component)).toBe('300px');
|
|
381
|
-
});
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
const defaultDisableds = [false, true, false];
|
|
386
|
-
|
|
387
|
-
function generateTabs(disableds = defaultDisableds) {
|
|
388
|
-
return disableds.map((disabled, index) => ({
|
|
389
|
-
disabled,
|
|
390
|
-
title: `Title ${index}`,
|
|
391
|
-
content: <p>Content {index}</p>,
|
|
392
|
-
}));
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
function createClientXY(x, y) {
|
|
396
|
-
return { clientX: x, clientY: y };
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
function getPanelContainerOverflow(component) {
|
|
400
|
-
return component.find('.tabs__panel-container').prop('style').overflow;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
function getPanelWidth(component) {
|
|
404
|
-
return component.find(TabPanel).at(0).prop('style').width;
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
function leftSpacer(component) {
|
|
408
|
-
return component.find('[id="left-spacer"]');
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function rightSpacer(component) {
|
|
412
|
-
return component.find('[id="right-spacer"]');
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
function createStartTouchEventObject({ x = 0, y = 0 }) {
|
|
416
|
-
return { nativeEvent: { touches: [createClientXY(x, y)] } };
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
function createMoveTouchEventObject({ x = 0, y = 0 }) {
|
|
420
|
-
return {
|
|
421
|
-
nativeEvent: { changedTouches: [createClientXY(x, y)] },
|
|
422
|
-
};
|
|
423
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import WithDisplayFormat from '.';
|
|
2
|
-
|
|
3
|
-
describe('WithDisplayFormat', () => {
|
|
4
|
-
it('should return null if props change to the same value', () => {
|
|
5
|
-
const nextProps = { displayPattern: '**-**' };
|
|
6
|
-
const previousState = {
|
|
7
|
-
value: '11/11',
|
|
8
|
-
prevDisplayPattern: '**-**',
|
|
9
|
-
historyNavigator: { reset: jest.fn() },
|
|
10
|
-
triggerEvent: null,
|
|
11
|
-
triggerType: null,
|
|
12
|
-
pastedLength: 0,
|
|
13
|
-
};
|
|
14
|
-
const expectedState = null;
|
|
15
|
-
|
|
16
|
-
expect(WithDisplayFormat.getDerivedStateFromProps(nextProps, previousState)).toStrictEqual(
|
|
17
|
-
expectedState,
|
|
18
|
-
);
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
it('should update displayPattern on props change', () => {
|
|
22
|
-
const nextProps = { displayPattern: '**-**' };
|
|
23
|
-
const previousState = {
|
|
24
|
-
value: '11/11',
|
|
25
|
-
prevDisplayPattern: '**/**',
|
|
26
|
-
historyNavigator: { reset: jest.fn() },
|
|
27
|
-
triggerEvent: null,
|
|
28
|
-
triggerType: null,
|
|
29
|
-
pastedLength: 0,
|
|
30
|
-
};
|
|
31
|
-
const expectedState = {
|
|
32
|
-
value: '11-11',
|
|
33
|
-
prevDisplayPattern: '**-**',
|
|
34
|
-
triggerEvent: null,
|
|
35
|
-
triggerType: null,
|
|
36
|
-
pastedLength: 0,
|
|
37
|
-
};
|
|
38
|
-
expect(WithDisplayFormat.getDerivedStateFromProps(nextProps, previousState)).toStrictEqual(
|
|
39
|
-
expectedState,
|
|
40
|
-
);
|
|
41
|
-
});
|
|
42
|
-
});
|