@transferwise/components 46.78.0 → 46.79.1
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/AccordionItem/AccordionItem.js +22 -3
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.mjs +22 -3
- package/build/accordion/AccordionItem/AccordionItem.mjs.map +1 -1
- package/build/actionButton/ActionButton.js +22 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs +22 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js +24 -2
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs +24 -2
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +22 -6
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +22 -6
- package/build/alert/Alert.mjs.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +25 -2
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs +25 -2
- package/build/alert/inlineMarkdown/InlineMarkdown.mjs.map +1 -1
- package/build/avatar/Avatar.js +23 -2
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs +23 -2
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +23 -3
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +23 -3
- package/build/avatarWrapper/AvatarWrapper.mjs.map +1 -1
- package/build/badge/Badge.js +23 -2
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs +23 -2
- package/build/badge/Badge.mjs.map +1 -1
- package/build/button/Button.js +22 -6
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.messages.js.map +1 -1
- package/build/button/Button.messages.mjs.map +1 -1
- package/build/button/Button.mjs +22 -6
- package/build/button/Button.mjs.map +1 -1
- package/build/button/classMap.js +24 -0
- package/build/button/classMap.js.map +1 -1
- package/build/button/classMap.mjs +24 -0
- package/build/button/classMap.mjs.map +1 -1
- package/build/button/legacyUtils/legacyUtils.js +30 -7
- package/build/button/legacyUtils/legacyUtils.js.map +1 -1
- package/build/button/legacyUtils/legacyUtils.mjs +30 -7
- package/build/button/legacyUtils/legacyUtils.mjs.map +1 -1
- package/build/card/Card.js +23 -3
- package/build/card/Card.js.map +1 -1
- package/build/card/Card.mjs +23 -3
- package/build/card/Card.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +23 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs +23 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js +1 -1
- package/build/checkboxOption/CheckboxOption.mjs +1 -1
- package/build/chevron/Chevron.js +21 -1
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chevron/Chevron.mjs +21 -1
- package/build/chevron/Chevron.mjs.map +1 -1
- package/build/chips/Chip.js +19 -1
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chip.mjs +19 -1
- package/build/chips/Chip.mjs.map +1 -1
- package/build/circularButton/CircularButton.js +23 -4
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/circularButton/CircularButton.mjs +23 -4
- package/build/circularButton/CircularButton.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +3 -2
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs +3 -2
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/dateUtils/getDateView/getDateView.js +10 -0
- package/build/common/dateUtils/getDateView/getDateView.js.map +1 -0
- package/build/common/dateUtils/getDateView/getDateView.mjs +8 -0
- package/build/common/dateUtils/getDateView/getDateView.mjs.map +1 -0
- package/build/common/hooks/useHasIntersected/useHasIntersected.js +10 -10
- package/build/common/hooks/useHasIntersected/useHasIntersected.js.map +1 -1
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs +10 -10
- package/build/common/hooks/useHasIntersected/useHasIntersected.mjs.map +1 -1
- package/build/common/locale/index.js +24 -0
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs +24 -0
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js +23 -2
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +23 -2
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +27 -3
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.mjs +27 -3
- package/build/common/responsivePanel/ResponsivePanel.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +22 -3
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +22 -3
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/dateInput/DateInput.js +22 -5
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.mjs +22 -5
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +30 -12
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.mjs +30 -12
- package/build/dateLookup/DateLookup.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +26 -5
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +26 -5
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +19 -3
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +19 -3
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs +4 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.mjs.map +1 -1
- package/build/decision/Decision.js +24 -3
- package/build/decision/Decision.js.map +1 -1
- package/build/decision/Decision.mjs +24 -3
- package/build/decision/Decision.mjs.map +1 -1
- package/build/definitionList/DefinitionList.js +23 -1
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/definitionList/DefinitionList.mjs +23 -1
- package/build/definitionList/DefinitionList.mjs.map +1 -1
- package/build/dimmer/Dimmer.js +24 -2
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/Dimmer.mjs +24 -2
- package/build/dimmer/Dimmer.mjs.map +1 -1
- package/build/display/Display.js +23 -1
- package/build/display/Display.js.map +1 -1
- package/build/display/Display.mjs +23 -1
- package/build/display/Display.mjs.map +1 -1
- package/build/drawer/Drawer.js +23 -4
- package/build/drawer/Drawer.js.map +1 -1
- package/build/drawer/Drawer.mjs +23 -4
- package/build/drawer/Drawer.mjs.map +1 -1
- package/build/field/Field.js +23 -2
- package/build/field/Field.js.map +1 -1
- package/build/field/Field.mjs +23 -2
- package/build/field/Field.mjs.map +1 -1
- package/build/flowNavigation/FlowNavigation.js +19 -2
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.mjs +19 -2
- package/build/flowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/header/Header.js +24 -2
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +24 -2
- package/build/header/Header.mjs.map +1 -1
- package/build/image/Image.js +4 -1
- package/build/image/Image.js.map +1 -1
- package/build/image/Image.mjs +4 -1
- package/build/image/Image.mjs.map +1 -1
- package/build/index.js +69 -62
- package/build/index.js.map +1 -1
- package/build/index.mjs +27 -20
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +21 -3
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.mjs +21 -3
- package/build/info/Info.mjs.map +1 -1
- package/build/inlineAlert/InlineAlert.js +24 -3
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inlineAlert/InlineAlert.mjs +24 -3
- package/build/inlineAlert/InlineAlert.mjs.map +1 -1
- package/build/inputs/SearchInput.js +23 -2
- package/build/inputs/SearchInput.js.map +1 -1
- package/build/inputs/SearchInput.mjs +23 -2
- package/build/inputs/SearchInput.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +22 -1
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/instructionsList/InstructionsList.mjs +22 -1
- package/build/instructionsList/InstructionsList.mjs.map +1 -1
- package/build/loader/Loader.js +22 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/loader/Loader.mjs +22 -1
- package/build/loader/Loader.mjs.map +1 -1
- package/build/markdown/Markdown.js +24 -1
- package/build/markdown/Markdown.js.map +1 -1
- package/build/markdown/Markdown.mjs +24 -1
- package/build/markdown/Markdown.mjs.map +1 -1
- package/build/modal/Modal.js +22 -5
- package/build/modal/Modal.js.map +1 -1
- package/build/modal/Modal.mjs +22 -5
- package/build/modal/Modal.mjs.map +1 -1
- package/build/moneyInput/MoneyInput.js +22 -3
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.mjs +22 -3
- package/build/moneyInput/MoneyInput.mjs.map +1 -1
- package/build/navigationOption/NavigationOption.js +23 -2
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOption/NavigationOption.mjs +23 -2
- package/build/navigationOption/NavigationOption.mjs.map +1 -1
- package/build/nudge/Nudge.js +19 -1
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +19 -1
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/overlayHeader/OverlayHeader.js +19 -1
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.mjs +19 -1
- package/build/overlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +23 -2
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.mjs +23 -2
- package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/popover/Popover.js +24 -4
- package/build/popover/Popover.js.map +1 -1
- package/build/popover/Popover.mjs +24 -4
- package/build/popover/Popover.mjs.map +1 -1
- package/build/processIndicator/ProcessIndicator.js +22 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.mjs +22 -1
- package/build/processIndicator/ProcessIndicator.mjs.map +1 -1
- package/build/progressBar/ProgressBar.js +24 -2
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/progressBar/ProgressBar.mjs +24 -2
- package/build/progressBar/ProgressBar.mjs.map +1 -1
- package/build/promoCard/PromoCard.js +22 -2
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCard.mjs +22 -2
- package/build/promoCard/PromoCard.mjs.map +1 -1
- package/build/promoCard/PromoCardIndicator.js +22 -1
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.mjs +22 -1
- package/build/promoCard/PromoCardIndicator.mjs.map +1 -1
- package/build/provider/Provider.js +25 -2
- package/build/provider/Provider.js.map +1 -1
- package/build/provider/Provider.mjs +25 -2
- package/build/provider/Provider.mjs.map +1 -1
- package/build/radio/Radio.js +24 -2
- package/build/radio/Radio.js.map +1 -1
- package/build/radio/Radio.mjs +24 -2
- package/build/radio/Radio.mjs.map +1 -1
- package/build/segmentedControl/SegmentedControl.js +22 -1
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.mjs +22 -1
- package/build/segmentedControl/SegmentedControl.mjs.map +1 -1
- package/build/select/Select.js +26 -4
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +26 -4
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js +22 -1
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs +22 -1
- package/build/select/option/Option.mjs.map +1 -1
- package/build/selectOption/SelectOption.js +24 -6
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.mjs +24 -6
- package/build/selectOption/SelectOption.mjs.map +1 -1
- package/build/statusIcon/StatusIcon.js +22 -4
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.mjs +22 -4
- package/build/statusIcon/StatusIcon.mjs.map +1 -1
- package/build/stepper/Stepper.js +25 -3
- package/build/stepper/Stepper.js.map +1 -1
- package/build/stepper/Stepper.mjs +25 -3
- package/build/stepper/Stepper.mjs.map +1 -1
- package/build/stepper/deviceDetection.js +2 -3
- package/build/stepper/deviceDetection.js.map +1 -1
- package/build/stepper/deviceDetection.mjs +2 -3
- package/build/stepper/deviceDetection.mjs.map +1 -1
- package/build/sticky/Sticky.js +25 -2
- package/build/sticky/Sticky.js.map +1 -1
- package/build/sticky/Sticky.mjs +25 -2
- package/build/sticky/Sticky.mjs.map +1 -1
- package/build/summary/Summary.js +21 -5
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.mjs +21 -5
- package/build/summary/Summary.mjs.map +1 -1
- package/build/tabs/Tabs.js +23 -3
- package/build/tabs/Tabs.js.map +1 -1
- package/build/tabs/Tabs.mjs +23 -3
- package/build/tabs/Tabs.mjs.map +1 -1
- package/build/tile/Tile.js +24 -2
- package/build/tile/Tile.js.map +1 -1
- package/build/tile/Tile.mjs +24 -2
- package/build/tile/Tile.mjs.map +1 -1
- package/build/title/Title.js +23 -1
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +23 -1
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +22 -1
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +22 -1
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/typeahead/Typeahead.js +22 -4
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.mjs +22 -4
- package/build/typeahead/Typeahead.mjs.map +1 -1
- package/build/types/button/Button.d.ts.map +1 -1
- package/build/types/button/Button.messages.d.ts +7 -7
- package/build/types/button/Button.messages.d.ts.map +1 -1
- package/build/types/button/classMap.d.ts +10 -10
- package/build/types/button/classMap.d.ts.map +1 -1
- package/build/types/button/legacyUtils/index.d.ts +1 -1
- package/build/types/button/legacyUtils/index.d.ts.map +1 -1
- package/build/types/button/legacyUtils/legacyUtils.d.ts +20 -6
- package/build/types/button/legacyUtils/legacyUtils.d.ts.map +1 -1
- package/build/types/checkboxButton/index.d.ts +1 -1
- package/build/types/checkboxButton/index.d.ts.map +1 -1
- package/build/types/common/dateUtils/getDateView/getDateView.d.ts +2 -0
- package/build/types/common/dateUtils/getDateView/getDateView.d.ts.map +1 -0
- package/build/types/common/dateUtils/index.d.ts +1 -0
- package/build/types/common/dateUtils/index.d.ts.map +1 -1
- package/build/types/common/fakeEvents.d.ts +23 -0
- package/build/types/common/fakeEvents.d.ts.map +1 -0
- package/build/types/common/hooks/index.d.ts +4 -4
- package/build/types/common/hooks/index.d.ts.map +1 -1
- package/build/types/common/hooks/useConditionalListener/index.d.ts +1 -1
- package/build/types/common/hooks/useConditionalListener/index.d.ts.map +1 -1
- package/build/types/common/hooks/useDirection/index.d.ts +1 -1
- package/build/types/common/hooks/useDirection/index.d.ts.map +1 -1
- package/build/types/common/hooks/useHasIntersected/index.d.ts +1 -1
- package/build/types/common/hooks/useHasIntersected/index.d.ts.map +1 -1
- package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts +15 -4
- package/build/types/common/hooks/useHasIntersected/useHasIntersected.d.ts.map +1 -1
- package/build/types/common/index.d.ts +28 -28
- package/build/types/common/index.d.ts.map +1 -1
- package/build/types/common/responsivePanel/index.d.ts +1 -1
- package/build/types/common/responsivePanel/index.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.d.ts +1 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts +1 -1
- package/build/types/dateLookup/dayCalendar/table/DayCalendarTable.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/navigationOption/NavigationOption.d.ts +1 -0
- package/build/types/navigationOption/NavigationOption.d.ts.map +1 -1
- package/build/types/stepper/deviceDetection.d.ts +1 -1
- package/build/types/stepper/deviceDetection.d.ts.map +1 -1
- package/build/types/test-utils/style-mock.d.ts +1 -0
- package/build/types/test-utils/style-mock.d.ts.map +1 -0
- package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts +8 -6
- package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts.map +1 -1
- package/build/types/utilities/deprecatedProperty/index.d.ts +1 -1
- package/build/types/utilities/deprecatedProperty/index.d.ts.map +1 -1
- package/build/types/utilities/index.d.ts +2 -2
- package/build/types/utilities/index.d.ts.map +1 -1
- package/build/types/utilities/logActionRequired.d.ts +2 -2
- package/build/types/utilities/logActionRequired.d.ts.map +1 -1
- package/build/upload/Upload.js +21 -2
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +21 -2
- package/build/upload/Upload.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +25 -3
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +25 -3
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +23 -3
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs +23 -3
- package/build/upload/steps/uploadImageStep/uploadImageStep.mjs.map +1 -1
- package/build/uploadInput/UploadInput.js +22 -3
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.mjs +22 -3
- package/build/uploadInput/UploadInput.mjs.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +21 -2
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.mjs +21 -2
- package/build/uploadInput/uploadButton/UploadButton.mjs.map +1 -1
- package/build/uploadInput/uploadButton/defaults.js +24 -0
- package/build/uploadInput/uploadButton/defaults.js.map +1 -1
- package/build/uploadInput/uploadButton/defaults.mjs +24 -0
- package/build/uploadInput/uploadButton/defaults.mjs.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +21 -4
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.mjs +21 -4
- package/build/uploadInput/uploadItem/UploadItem.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 +25 -1
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs +25 -1
- package/build/withDisplayFormat/WithDisplayFormat.mjs.map +1 -1
- package/package.json +2 -2
- package/src/button/Button.tsx +0 -3
- package/src/button/legacyUtils/legacyUtils.ts +74 -0
- package/src/common/dateUtils/getDateView/getDateView.ts +5 -0
- package/src/common/dateUtils/index.ts +1 -0
- package/src/common/{fakeEvents.js → fakeEvents.ts} +1 -1
- package/src/common/hooks/useHasIntersected/{useHasIntersected.js → useHasIntersected.ts} +20 -11
- package/src/dateLookup/DateLookup.tests.story.tsx +40 -5
- package/src/dateLookup/DateLookup.tsx +9 -11
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.tsx +5 -2
- package/src/flowNavigation/{FlowNavigation.story.js → FlowNavigation.story.tsx} +34 -16
- package/src/index.ts +1 -0
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +78 -0
- package/src/navigationOption/{NavigationOption.story.js → NavigationOption.story.tsx} +23 -5
- package/src/navigationOption/NavigationOption.tsx +1 -1
- package/src/select/{Select.story.js → Select.story.tsx} +97 -47
- package/src/stepper/{deviceDetection.js → deviceDetection.ts} +2 -6
- package/src/utilities/deprecatedProperty/{deprecatedProperty.spec.js → deprecatedProperty.spec.ts} +7 -13
- package/src/utilities/deprecatedProperty/{deprecatedProperty.js → deprecatedProperty.ts} +23 -4
- package/src/utilities/{logActionRequired.js → logActionRequired.ts} +2 -2
- package/src/button/legacyUtils/legacyUtils.js +0 -54
- package/src/common/requirements.js +0 -440
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +0 -85
- /package/src/button/{Button.messages.js → Button.messages.ts} +0 -0
- /package/src/button/{classMap.js → classMap.ts} +0 -0
- /package/src/button/legacyUtils/{index.js → index.ts} +0 -0
- /package/src/checkboxButton/{index.js → index.ts} +0 -0
- /package/src/common/hooks/{index.js → index.ts} +0 -0
- /package/src/common/hooks/useConditionalListener/{index.js → index.ts} +0 -0
- /package/src/common/hooks/useDirection/{index.js → index.ts} +0 -0
- /package/src/common/hooks/useHasIntersected/{index.js → index.ts} +0 -0
- /package/src/common/{index.js → index.ts} +0 -0
- /package/src/common/responsivePanel/{index.js → index.ts} +0 -0
- /package/src/test-utils/{style-mock.js → style-mock.ts} +0 -0
- /package/src/utilities/deprecatedProperty/{index.js → index.ts} +0 -0
- /package/src/utilities/{index.js → index.ts} +0 -0
|
@@ -1,21 +1,30 @@
|
|
|
1
1
|
import { StoryFn } from '@storybook/react';
|
|
2
2
|
import { expect, userEvent, within } from '@storybook/test';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
3
4
|
import { useState } from 'react';
|
|
4
5
|
|
|
5
|
-
import DateLookup from './DateLookup';
|
|
6
|
+
import DateLookup, { type DateLookupProps } from './DateLookup';
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
component: DateLookup,
|
|
9
10
|
title: 'Forms/DateLookup/Tests',
|
|
10
11
|
};
|
|
11
12
|
|
|
13
|
+
const props: DateLookupProps = {
|
|
14
|
+
value: new Date(1987, 0, 10, 12, 0, 0),
|
|
15
|
+
onChange: (value: Date | null) => {
|
|
16
|
+
action(value?.toString() || 'null');
|
|
17
|
+
},
|
|
18
|
+
};
|
|
12
19
|
type Story = StoryFn<typeof DateLookup>;
|
|
13
20
|
|
|
14
|
-
const Template: Story = () => {
|
|
15
|
-
const
|
|
21
|
+
const Template: Story = (args: DateLookupProps) => {
|
|
22
|
+
const { value: initialValue } = args;
|
|
23
|
+
const [value, setValue] = useState<Date | null>(initialValue);
|
|
16
24
|
|
|
17
25
|
return (
|
|
18
26
|
<DateLookup
|
|
27
|
+
{...args}
|
|
19
28
|
value={value}
|
|
20
29
|
clearable
|
|
21
30
|
placeholder="placeholder"
|
|
@@ -27,7 +36,7 @@ const Template: Story = () => {
|
|
|
27
36
|
};
|
|
28
37
|
|
|
29
38
|
export const ClearSpace = Template.bind({});
|
|
30
|
-
|
|
39
|
+
ClearSpace.args = { ...props };
|
|
31
40
|
ClearSpace.play = async ({ canvasElement, step }) => {
|
|
32
41
|
const canvas = within(canvasElement);
|
|
33
42
|
|
|
@@ -46,7 +55,7 @@ ClearSpace.play = async ({ canvasElement, step }) => {
|
|
|
46
55
|
};
|
|
47
56
|
|
|
48
57
|
export const ClearEnter = Template.bind({});
|
|
49
|
-
|
|
58
|
+
ClearEnter.args = { ...props };
|
|
50
59
|
ClearEnter.play = async ({ canvasElement, step }) => {
|
|
51
60
|
const canvas = within(canvasElement);
|
|
52
61
|
|
|
@@ -63,3 +72,29 @@ ClearEnter.play = async ({ canvasElement, step }) => {
|
|
|
63
72
|
await expect(placeholder).toBeInTheDocument();
|
|
64
73
|
});
|
|
65
74
|
};
|
|
75
|
+
|
|
76
|
+
export const FocusOnSelectedDay = Template.bind({});
|
|
77
|
+
FocusOnSelectedDay.args = { ...props };
|
|
78
|
+
FocusOnSelectedDay.play = async () => {
|
|
79
|
+
await userEvent.tab();
|
|
80
|
+
await userEvent.keyboard(' ');
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const FocusOnToday = Template.bind({});
|
|
84
|
+
FocusOnToday.args = { ...props, value: null };
|
|
85
|
+
FocusOnToday.play = async () => {
|
|
86
|
+
await userEvent.tab();
|
|
87
|
+
await userEvent.keyboard(' ');
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const FocusOnFirstNonDisabledDate = Template.bind({});
|
|
91
|
+
FocusOnFirstNonDisabledDate.args = {
|
|
92
|
+
...props,
|
|
93
|
+
value: null,
|
|
94
|
+
min: new Date(1987, 0, 10, 12, 0, 0),
|
|
95
|
+
max: new Date(1987, 0, 12, 12, 0, 0),
|
|
96
|
+
};
|
|
97
|
+
FocusOnFirstNonDisabledDate.play = async () => {
|
|
98
|
+
await userEvent.tab();
|
|
99
|
+
await userEvent.keyboard(' ');
|
|
100
|
+
};
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
MonthFormat,
|
|
7
7
|
Position,
|
|
8
8
|
Breakpoint,
|
|
9
|
-
SizeSmall,
|
|
10
|
-
SizeMedium,
|
|
11
|
-
SizeLarge,
|
|
9
|
+
type SizeSmall,
|
|
10
|
+
type SizeMedium,
|
|
11
|
+
type SizeLarge,
|
|
12
12
|
} from '../common';
|
|
13
|
-
import { isWithinRange, moveToWithinRange } from '../common/dateUtils';
|
|
13
|
+
import { isWithinRange, moveToWithinRange, returnDateView } from '../common/dateUtils';
|
|
14
14
|
import ResponsivePanel from '../common/responsivePanel';
|
|
15
15
|
import { WithInputAttributesProps, withInputAttributes } from '../inputs/contexts';
|
|
16
16
|
import { OverlayIdContext, OverlayIdProvider } from '../provider/overlay/OverlayIdProvider';
|
|
@@ -72,13 +72,14 @@ class DateLookup extends PureComponent<DateLookupPropsWithInputAttributes, DateL
|
|
|
72
72
|
|
|
73
73
|
constructor(props: DateLookup['props']) {
|
|
74
74
|
super(props);
|
|
75
|
+
const dateView = returnDateView(props.value, props.min, props.max);
|
|
75
76
|
this.state = {
|
|
76
77
|
selectedDate: getStartOfDay(props.value),
|
|
77
78
|
originalDate: null,
|
|
78
79
|
min: getStartOfDay(props.min),
|
|
79
80
|
max: getStartOfDay(props.max),
|
|
80
|
-
viewMonth:
|
|
81
|
-
viewYear:
|
|
81
|
+
viewMonth: dateView.getMonth(),
|
|
82
|
+
viewYear: dateView.getFullYear(),
|
|
82
83
|
open: false,
|
|
83
84
|
mode: 'day',
|
|
84
85
|
isMobile: false,
|
|
@@ -100,8 +101,7 @@ class DateLookup extends PureComponent<DateLookupPropsWithInputAttributes, DateL
|
|
|
100
101
|
props.onChange(moveToWithinRange(selectedDate, min, max));
|
|
101
102
|
return null;
|
|
102
103
|
}
|
|
103
|
-
const viewDateThatIsWithinRange: Date =
|
|
104
|
-
selectedDate || ((min || max) && moveToWithinRange(new Date(), min, max)) || new Date();
|
|
104
|
+
const viewDateThatIsWithinRange: Date = returnDateView(selectedDate, min, max);
|
|
105
105
|
const viewMonth = viewDateThatIsWithinRange.getMonth();
|
|
106
106
|
const viewYear = viewDateThatIsWithinRange.getFullYear();
|
|
107
107
|
return { selectedDate, min, max, viewMonth, viewYear };
|
|
@@ -209,9 +209,7 @@ class DateLookup extends PureComponent<DateLookupPropsWithInputAttributes, DateL
|
|
|
209
209
|
} else {
|
|
210
210
|
date = getStartOfDay(new Date());
|
|
211
211
|
}
|
|
212
|
-
|
|
213
|
-
date = moveToWithinRange(date, min, max);
|
|
214
|
-
}
|
|
212
|
+
date &&= moveToWithinRange(date, min, max);
|
|
215
213
|
if (date?.getTime() !== selectedDate?.getTime()) {
|
|
216
214
|
this.props.onChange(date);
|
|
217
215
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formatDate } from '@transferwise/formatting';
|
|
2
2
|
import { PureComponent } from 'react';
|
|
3
|
-
import { injectIntl, WrappedComponentProps } from 'react-intl';
|
|
3
|
+
import { injectIntl, type WrappedComponentProps } from 'react-intl';
|
|
4
4
|
|
|
5
5
|
import { getDayNames, isWithinRange } from '../../../common/dateUtils';
|
|
6
6
|
import { getFocusableTime } from '../../getFocusableTime/getFocusableTime';
|
|
@@ -64,6 +64,9 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
isDisabled = (day: number) => {
|
|
67
|
+
if (day < 0) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
67
70
|
const { min, max, viewMonth, viewYear } = this.props;
|
|
68
71
|
const date = new Date(viewYear, viewMonth, day);
|
|
69
72
|
|
|
@@ -72,7 +75,7 @@ class DayCalendarTable extends PureComponent<DayCalendarTableProps> {
|
|
|
72
75
|
|
|
73
76
|
isActive = (day: number) => {
|
|
74
77
|
const { selectedDate, viewMonth, viewYear } = this.props;
|
|
75
|
-
return !!(selectedDate &&
|
|
78
|
+
return !!(selectedDate && Number(new Date(viewYear, viewMonth, day)) === Number(selectedDate));
|
|
76
79
|
};
|
|
77
80
|
|
|
78
81
|
isToday = (day: number) => {
|
|
@@ -24,6 +24,10 @@ const avatarProfiles = {
|
|
|
24
24
|
Business: <BriefcaseIcon />,
|
|
25
25
|
Profile: <ProfileIcon />,
|
|
26
26
|
};
|
|
27
|
+
type ProfileTypeKeys = keyof typeof ProfileType;
|
|
28
|
+
|
|
29
|
+
const getAvatarProfile = (showAvatar: string) =>
|
|
30
|
+
showAvatar in avatarProfiles ? avatarProfiles[showAvatar as keyof typeof avatarProfiles] : null;
|
|
27
31
|
|
|
28
32
|
export const Variants = () => {
|
|
29
33
|
const [activeStep, setActiveStep] = useState(2);
|
|
@@ -32,7 +36,11 @@ export const Variants = () => {
|
|
|
32
36
|
const showCloseButton = boolean('show closeButton', true);
|
|
33
37
|
const showMobileBackButton = boolean('show mobile backButton', true);
|
|
34
38
|
const done = boolean('done', false);
|
|
35
|
-
const profileType = select(
|
|
39
|
+
const profileType: ProfileTypeKeys | undefined = select(
|
|
40
|
+
'profileType',
|
|
41
|
+
Object.keys(ProfileType) as ProfileTypeKeys[],
|
|
42
|
+
undefined,
|
|
43
|
+
);
|
|
36
44
|
const avatarURL = text(
|
|
37
45
|
'avatarURL',
|
|
38
46
|
'https://wise.com/web-art/assets/illustrations/heart-small@2x.webp',
|
|
@@ -44,7 +52,7 @@ export const Variants = () => {
|
|
|
44
52
|
avatar={
|
|
45
53
|
!showAvatar ? null : (
|
|
46
54
|
<Avatar type={AvatarType.ICON} size={Size.MEDIUM}>
|
|
47
|
-
{
|
|
55
|
+
{getAvatarProfile(showAvatar)}
|
|
48
56
|
</Avatar>
|
|
49
57
|
)
|
|
50
58
|
}
|
|
@@ -70,9 +78,11 @@ export const Variants = () => {
|
|
|
70
78
|
onClick: () => setActiveStep(4),
|
|
71
79
|
},
|
|
72
80
|
]}
|
|
73
|
-
onClose={showCloseButton
|
|
81
|
+
onClose={showCloseButton ? () => setClosed(true) : undefined}
|
|
74
82
|
onGoBack={
|
|
75
|
-
showMobileBackButton
|
|
83
|
+
showMobileBackButton
|
|
84
|
+
? () => setActiveStep(activeStep > 0 ? activeStep - 1 : 0)
|
|
85
|
+
: undefined
|
|
76
86
|
}
|
|
77
87
|
/>
|
|
78
88
|
|
|
@@ -112,9 +122,11 @@ export const Variants = () => {
|
|
|
112
122
|
onClick: () => setActiveStep(4),
|
|
113
123
|
},
|
|
114
124
|
]}
|
|
115
|
-
onClose={showCloseButton
|
|
125
|
+
onClose={showCloseButton ? () => setClosed(true) : undefined}
|
|
116
126
|
onGoBack={
|
|
117
|
-
showMobileBackButton
|
|
127
|
+
showMobileBackButton
|
|
128
|
+
? () => setActiveStep(activeStep - 1 > 0 ? activeStep - 1 : 0)
|
|
129
|
+
: undefined
|
|
118
130
|
}
|
|
119
131
|
/>
|
|
120
132
|
|
|
@@ -155,9 +167,11 @@ export const Variants = () => {
|
|
|
155
167
|
onClick: () => setActiveStep(4),
|
|
156
168
|
},
|
|
157
169
|
]}
|
|
158
|
-
onClose={showCloseButton
|
|
170
|
+
onClose={showCloseButton ? () => setClosed(true) : undefined}
|
|
159
171
|
onGoBack={
|
|
160
|
-
showMobileBackButton
|
|
172
|
+
showMobileBackButton
|
|
173
|
+
? () => setActiveStep(activeStep - 1 > 0 ? activeStep - 1 : 0)
|
|
174
|
+
: undefined
|
|
161
175
|
}
|
|
162
176
|
/>
|
|
163
177
|
|
|
@@ -171,9 +185,11 @@ export const Variants = () => {
|
|
|
171
185
|
{ label: 'Review', hoverLabel: 'Antonio Dozortevo', onClick: () => setActiveStep(1) },
|
|
172
186
|
{ label: 'Pay', hoverLabel: 'Enrico Gusso', onClick: () => setActiveStep(2) },
|
|
173
187
|
]}
|
|
174
|
-
onClose={showCloseButton
|
|
188
|
+
onClose={showCloseButton ? () => setClosed(true) : undefined}
|
|
175
189
|
onGoBack={
|
|
176
|
-
showMobileBackButton
|
|
190
|
+
showMobileBackButton
|
|
191
|
+
? () => setActiveStep(activeStep - 1 > 0 ? activeStep - 1 : 0)
|
|
192
|
+
: undefined
|
|
177
193
|
}
|
|
178
194
|
/>
|
|
179
195
|
|
|
@@ -216,7 +232,7 @@ export const SendFlow = () => {
|
|
|
216
232
|
...(activeStep > 3 && { onClick: handleStepClick(3) }),
|
|
217
233
|
},
|
|
218
234
|
];
|
|
219
|
-
function handleStepClick(step) {
|
|
235
|
+
function handleStepClick(step: number) {
|
|
220
236
|
return () => {
|
|
221
237
|
setActiveStep(step);
|
|
222
238
|
};
|
|
@@ -268,16 +284,18 @@ export const WithOverlayHeaderComparison = () => {
|
|
|
268
284
|
avatar={
|
|
269
285
|
showAvatar ? (
|
|
270
286
|
<Avatar type={AvatarType.ICON} size={Size.MEDIUM}>
|
|
271
|
-
{
|
|
287
|
+
{getAvatarProfile(showAvatar)}
|
|
272
288
|
</Avatar>
|
|
273
289
|
) : null
|
|
274
290
|
}
|
|
275
291
|
activeStep={activeStep}
|
|
276
292
|
done={done}
|
|
277
293
|
steps={[]}
|
|
278
|
-
onClose={showCloseButton
|
|
294
|
+
onClose={showCloseButton ? () => setClosed(true) : undefined}
|
|
279
295
|
onGoBack={
|
|
280
|
-
showMobileBackButton
|
|
296
|
+
showMobileBackButton
|
|
297
|
+
? () => setActiveStep(activeStep > 0 ? activeStep - 1 : 0)
|
|
298
|
+
: undefined
|
|
281
299
|
}
|
|
282
300
|
/>
|
|
283
301
|
</div>
|
|
@@ -286,11 +304,11 @@ export const WithOverlayHeaderComparison = () => {
|
|
|
286
304
|
avatar={
|
|
287
305
|
showAvatar ? (
|
|
288
306
|
<Avatar type={AvatarType.ICON} size={Size.MEDIUM}>
|
|
289
|
-
{
|
|
307
|
+
{getAvatarProfile(showAvatar)}
|
|
290
308
|
</Avatar>
|
|
291
309
|
) : null
|
|
292
310
|
}
|
|
293
|
-
onClose={showCloseButton
|
|
311
|
+
onClose={showCloseButton ? () => setClosed(true) : undefined}
|
|
294
312
|
/>
|
|
295
313
|
</div>
|
|
296
314
|
</>
|
package/src/index.ts
CHANGED
|
@@ -59,6 +59,7 @@ export type {
|
|
|
59
59
|
MoneyInputProps,
|
|
60
60
|
} from './moneyInput';
|
|
61
61
|
export type { NavigationOptionListProps } from './navigationOptionsList';
|
|
62
|
+
export type { NavigationOptionProps } from './navigationOption/NavigationOption';
|
|
62
63
|
export type { OverlayHeaderProps } from './overlayHeader';
|
|
63
64
|
export type { PanelProps } from './common/panel';
|
|
64
65
|
export type { PhoneNumberInputProps } from './phoneNumberInput/PhoneNumberInput';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { userEvent, within, fn } from '@storybook/test';
|
|
2
|
+
|
|
3
|
+
import InputWithDisplayFormat, { InputWithDisplayFormatProps } from '.';
|
|
4
|
+
import { Field, FieldProps } from '../field/Field';
|
|
5
|
+
import { Meta, type StoryObj } from '@storybook/react';
|
|
6
|
+
|
|
7
|
+
type Story = StoryObj<InputWithDisplayFormatProps & { label: string }>;
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: 'Forms/InputWithDisplayFormat',
|
|
11
|
+
component: InputWithDisplayFormat,
|
|
12
|
+
render: function Render({ label, ...args }: InputWithDisplayFormatProps & FieldProps) {
|
|
13
|
+
return (
|
|
14
|
+
<Field label={label} id={args.id}>
|
|
15
|
+
<InputWithDisplayFormat id={args.id} {...args} />
|
|
16
|
+
</Field>
|
|
17
|
+
);
|
|
18
|
+
},
|
|
19
|
+
args: {
|
|
20
|
+
onFocus: fn(),
|
|
21
|
+
onBlur: fn(),
|
|
22
|
+
onChange: fn(),
|
|
23
|
+
},
|
|
24
|
+
} satisfies Meta<typeof InputWithDisplayFormat>;
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
export const Basic: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
label: 'Sort Code',
|
|
30
|
+
placeholder: '**-**-**',
|
|
31
|
+
displayPattern: '**-**-**',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const CardNumber: Story = {
|
|
36
|
+
args: {
|
|
37
|
+
label: 'Card Number',
|
|
38
|
+
placeholder: '**** **** **** **** ***',
|
|
39
|
+
displayPattern: '**** **** **** **** ***',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const CVC: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
label: 'CVC',
|
|
46
|
+
placeholder: '***',
|
|
47
|
+
displayPattern: '***',
|
|
48
|
+
value: '',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const ExpiryDate: Story = {
|
|
53
|
+
args: {
|
|
54
|
+
label: 'Expiry Date',
|
|
55
|
+
placeholder: '** / **',
|
|
56
|
+
displayPattern: '** / **',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const SecurityPin: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
label: 'Security Pin',
|
|
63
|
+
placeholder: '*-*-*-*-*-*',
|
|
64
|
+
displayPattern: '*-*-*-*-*-*',
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const SecurityPinPlay: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
label: 'Security Pin Play',
|
|
71
|
+
placeholder: '*-*-*-*-*-*',
|
|
72
|
+
displayPattern: '*-*-*-*-*-*',
|
|
73
|
+
},
|
|
74
|
+
play: async ({ canvasElement }) => {
|
|
75
|
+
const canvas = within(canvasElement);
|
|
76
|
+
await userEvent.type(canvas.getByPlaceholderText('*-*-*-*-*-*'), '123456');
|
|
77
|
+
},
|
|
78
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { action } from '@storybook/addon-actions';
|
|
2
3
|
import { text, boolean } from '@storybook/addon-knobs';
|
|
3
4
|
import {
|
|
@@ -19,8 +20,22 @@ export default {
|
|
|
19
20
|
tags: ['autodocs'],
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
type TemplateTypes = {
|
|
24
|
+
href?: string;
|
|
25
|
+
title?: string;
|
|
26
|
+
content?: string;
|
|
27
|
+
complex?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
showMediaAtAllSizes?: boolean;
|
|
30
|
+
showMediaCircle?: boolean;
|
|
31
|
+
isContainerAligned?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
hasTitleOnly?: boolean;
|
|
34
|
+
media?: ReactNode;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const Template = (props: TemplateTypes) => {
|
|
38
|
+
const href = text('href', props.href ?? '');
|
|
24
39
|
const title = text('title', props.title ?? 'Navigation option');
|
|
25
40
|
const content = text('content', props.content ?? 'Button and icon are vertically centered.');
|
|
26
41
|
const complex = boolean('complex', props.complex ?? false);
|
|
@@ -28,7 +43,7 @@ const Template = (props) => {
|
|
|
28
43
|
const showMediaAtAllSizes = boolean('showMediaAtAllSizes', props.showMediaAtAllSizes ?? false);
|
|
29
44
|
const showMediaCircle = props.showMediaCircle ?? boolean('showMediaCircle', true);
|
|
30
45
|
const isContainerAligned = boolean('isContainerAligned', false);
|
|
31
|
-
const className = text('className', props.className);
|
|
46
|
+
const className = text('className', props.className ?? '');
|
|
32
47
|
|
|
33
48
|
return (
|
|
34
49
|
<NavigationOption
|
|
@@ -140,7 +155,10 @@ export const Multiple = () => (
|
|
|
140
155
|
|
|
141
156
|
export const WithIllustration = () => {
|
|
142
157
|
return (
|
|
143
|
-
<Template
|
|
158
|
+
<Template
|
|
159
|
+
media={<Illustration name={Assets.GLOBE} disablePadding alt="" />}
|
|
160
|
+
showMediaCircle={false}
|
|
161
|
+
/>
|
|
144
162
|
);
|
|
145
163
|
};
|
|
146
164
|
|
|
@@ -166,7 +184,7 @@ export const WithContainerContent = () => (
|
|
|
166
184
|
</>
|
|
167
185
|
);
|
|
168
186
|
|
|
169
|
-
const NavigationOptionTemplate = (props) => {
|
|
187
|
+
const NavigationOptionTemplate = (props: TemplateTypes) => {
|
|
170
188
|
const {
|
|
171
189
|
href,
|
|
172
190
|
title,
|
|
@@ -6,7 +6,7 @@ import { Position } from '../common';
|
|
|
6
6
|
import Option from '../common/Option';
|
|
7
7
|
import { OptionProps, ReferenceType } from '../common/Option/Option';
|
|
8
8
|
|
|
9
|
-
type NavigationOptionProps = OptionProps;
|
|
9
|
+
export type NavigationOptionProps = OptionProps;
|
|
10
10
|
|
|
11
11
|
const NavigationOption = forwardRef<ReferenceType, NavigationOptionProps>(
|
|
12
12
|
({ as: component = 'button', disabled = false, onClick, className, ...rest }, reference) => {
|