@transferwise/components 46.94.2 → 46.95.0
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 +4 -2
- package/build/accordion/Accordion.js.map +1 -1
- package/build/accordion/AccordionItem/AccordionItem.js +6 -4
- package/build/accordion/AccordionItem/AccordionItem.js.map +1 -1
- package/build/actionButton/ActionButton.js +3 -1
- package/build/actionButton/ActionButton.js.map +1 -1
- package/build/actionOption/ActionOption.js +5 -3
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/alert/Alert.js +4 -4
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/inlineMarkdown/InlineMarkdown.js +4 -2
- package/build/alert/inlineMarkdown/InlineMarkdown.js.map +1 -1
- package/build/avatar/Avatar.js +3 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatarLayout/AvatarLayout.js +5 -3
- package/build/avatarLayout/AvatarLayout.js.map +1 -1
- package/build/avatarView/AvatarView.js +9 -7
- package/build/avatarView/AvatarView.js.map +1 -1
- package/build/avatarView/NotificationDot.js +3 -1
- package/build/avatarView/NotificationDot.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.js +8 -6
- package/build/avatarWrapper/AvatarWrapper.js.map +1 -1
- package/build/avatarWrapper/AvatarWrapper.mjs +1 -1
- package/build/avatarWrapper/index.js +3 -1
- package/build/avatarWrapper/index.js.map +1 -1
- package/build/badge/Badge.js +3 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/badge/BadgeAssets.js +9 -7
- package/build/badge/BadgeAssets.js.map +1 -1
- package/build/badge/BadgeAssets.mjs +2 -2
- package/build/badge/BadgeAssets.mjs.map +1 -1
- package/build/body/Body.js +3 -1
- package/build/body/Body.js.map +1 -1
- package/build/button/Button.js +8 -6
- package/build/button/Button.js.map +1 -1
- package/build/button/Button.resolver.js +5 -3
- package/build/button/Button.resolver.js.map +1 -1
- package/build/button/LegacyButton.js +5 -3
- package/build/button/LegacyButton.js.map +1 -1
- package/build/card/Card.js +6 -4
- package/build/card/Card.js.map +1 -1
- package/build/carousel/Carousel.js +7 -5
- package/build/carousel/Carousel.js.map +1 -1
- package/build/checkbox/Checkbox.js +6 -4
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.js +3 -1
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.js +5 -3
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/chevron/Chevron.js +3 -1
- package/build/chevron/Chevron.js.map +1 -1
- package/build/chips/Chip.js +4 -2
- package/build/chips/Chip.js.map +1 -1
- package/build/chips/Chips.js +5 -3
- package/build/chips/Chips.js.map +1 -1
- package/build/chips/Chips.messages.js +3 -1
- package/build/chips/Chips.messages.js.map +1 -1
- package/build/circularButton/CircularButton.js +5 -3
- package/build/circularButton/CircularButton.js.map +1 -1
- package/build/common/Option/Option.js +7 -5
- package/build/common/Option/Option.js.map +1 -1
- package/build/common/Option/Option.mjs +2 -2
- package/build/common/Option/Option.mjs.map +1 -1
- package/build/common/RadioButton/RadioButton.js +3 -1
- package/build/common/RadioButton/RadioButton.js.map +1 -1
- package/build/common/action/Action.js +2 -2
- package/build/common/action/Action.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js +4 -2
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/card/Card.js +3 -1
- package/build/common/card/Card.js.map +1 -1
- package/build/common/circle/Circle.js +3 -1
- package/build/common/circle/Circle.js.map +1 -1
- package/build/common/closeButton/CloseButton.js +1 -1
- package/build/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.messages.js +3 -1
- package/build/common/closeButton/CloseButton.messages.js.map +1 -1
- package/build/common/flowHeader/FlowHeader.js +3 -1
- package/build/common/flowHeader/FlowHeader.js.map +1 -1
- package/build/common/focusBoundary/FocusBoundary.js +3 -1
- package/build/common/focusBoundary/FocusBoundary.js.map +1 -1
- package/build/common/historyNavigator/historyNavigator.js +3 -1
- package/build/common/historyNavigator/historyNavigator.js.map +1 -1
- package/build/common/locale/index.js +0 -24
- package/build/common/locale/index.js.map +1 -1
- package/build/common/locale/index.mjs +0 -24
- package/build/common/locale/index.mjs.map +1 -1
- package/build/common/panel/Panel.js +3 -1
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/responsivePanel/ResponsivePanel.js +5 -3
- package/build/common/responsivePanel/ResponsivePanel.js.map +1 -1
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js +4 -2
- package/build/common/textFormat/formatWithPattern/formatWithPattern.js.map +1 -1
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js +4 -2
- package/build/common/textFormat/getCountOfSymbolsInSelection/getCountOfSymbolsInSelection.js.map +1 -1
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js +4 -2
- package/build/common/textFormat/getCursorPositionAfterKeystroke/getCursorPositionAfterKeystroke.js.map +1 -1
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js +2 -2
- package/build/common/textFormat/getDistanceToSymbol/getDistanceToSymbol.js.map +1 -1
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js +3 -1
- package/build/common/textFormat/getSymbolsInPatternWithPosition/getSymbolsInPatternWithPosition.js.map +1 -1
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js +3 -1
- package/build/common/textFormat/unformatWithPattern/unformatWithPattern.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +3 -1
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/dateInput/DateInput.js +15 -13
- package/build/dateInput/DateInput.js.map +1 -1
- package/build/dateInput/DateInput.messages.js +3 -1
- package/build/dateInput/DateInput.messages.js.map +1 -1
- package/build/dateInput/DateInput.mjs +3 -3
- package/build/dateInput/DateInput.mjs.map +1 -1
- package/build/dateLookup/DateLookup.js +8 -6
- package/build/dateLookup/DateLookup.js.map +1 -1
- package/build/dateLookup/DateLookup.messages.js +3 -1
- package/build/dateLookup/DateLookup.messages.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +10 -8
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.js +8 -6
- package/build/dateLookup/dateTrigger/DateTrigger.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js +4 -2
- package/build/dateLookup/dateTrigger/DateTrigger.messages.js.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs +2 -2
- package/build/dateLookup/dateTrigger/DateTrigger.messages.mjs.map +1 -1
- package/build/dateLookup/dateTrigger/DateTrigger.mjs +2 -2
- package/build/dateLookup/dateTrigger/DateTrigger.mjs.map +1 -1
- package/build/dateLookup/dayCalendar/DayCalendar.js +6 -4
- package/build/dateLookup/dayCalendar/DayCalendar.js.map +1 -1
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js +4 -2
- package/build/dateLookup/dayCalendar/table/DayCalendarTable.js.map +1 -1
- package/build/dateLookup/monthCalendar/MonthCalendar.js +6 -4
- package/build/dateLookup/monthCalendar/MonthCalendar.js.map +1 -1
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js +4 -2
- package/build/dateLookup/monthCalendar/table/MonthCalendarTable.js.map +1 -1
- package/build/dateLookup/tableLink/TableLink.js +4 -2
- package/build/dateLookup/tableLink/TableLink.js.map +1 -1
- package/build/dateLookup/yearCalendar/YearCalendar.js +6 -4
- package/build/dateLookup/yearCalendar/YearCalendar.js.map +1 -1
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js +4 -2
- package/build/dateLookup/yearCalendar/table/YearCalendarTable.js.map +1 -1
- package/build/decision/Decision.js +2 -2
- package/build/decision/Decision.js.map +1 -1
- package/build/definitionList/DefinitionList.js +4 -2
- package/build/definitionList/DefinitionList.js.map +1 -1
- package/build/dimmer/Dimmer.js +3 -3
- package/build/dimmer/Dimmer.js.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.js +3 -1
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
- package/build/display/Display.js +3 -1
- package/build/display/Display.js.map +1 -1
- package/build/divider/Divider.js +35 -0
- package/build/divider/Divider.js.map +1 -0
- package/build/divider/Divider.mjs +31 -0
- package/build/divider/Divider.mjs.map +1 -0
- package/build/drawer/Drawer.js +4 -2
- package/build/drawer/Drawer.js.map +1 -1
- package/build/dropFade/DropFade.js +3 -1
- package/build/dropFade/DropFade.js.map +1 -1
- package/build/emphasis/Emphasis.js +4 -2
- package/build/emphasis/Emphasis.js.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.js +3 -1
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
- package/build/field/Field.js +1 -1
- package/build/field/Field.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.js +8 -6
- package/build/flowNavigation/FlowNavigation.js.map +1 -1
- package/build/flowNavigation/FlowNavigation.messages.js +3 -1
- package/build/flowNavigation/FlowNavigation.messages.js.map +1 -1
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js +5 -3
- package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
- package/build/header/Header.js +4 -4
- package/build/header/Header.js.map +1 -1
- package/build/i18n/commonMessages/Button.messages.js +3 -1
- package/build/i18n/commonMessages/Button.messages.js.map +1 -1
- package/build/i18n/cs.json +22 -5
- package/build/i18n/cs.json.js +25 -6
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +22 -5
- package/build/i18n/cs.json.mjs.map +1 -1
- package/build/i18n/de.json.js +3 -1
- package/build/i18n/de.json.js.map +1 -1
- package/build/i18n/en.json.js +3 -1
- package/build/i18n/en.json.js.map +1 -1
- package/build/i18n/es.json.js +3 -1
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/fr.json.js +3 -1
- package/build/i18n/fr.json.js.map +1 -1
- package/build/i18n/hu.json.js +3 -1
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/id.json.js +3 -1
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/index.js +22 -20
- package/build/i18n/index.js.map +1 -1
- package/build/i18n/it.json.js +3 -1
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/ja.json.js +3 -1
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/pl.json.js +3 -1
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pt.json.js +3 -1
- package/build/i18n/pt.json.js.map +1 -1
- package/build/i18n/ro.json.js +3 -1
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ru.json.js +3 -1
- package/build/i18n/ru.json.js.map +1 -1
- package/build/i18n/th.json.js +3 -1
- package/build/i18n/th.json.js.map +1 -1
- package/build/i18n/tr.json.js +3 -1
- package/build/i18n/tr.json.js.map +1 -1
- package/build/i18n/uk.json.js +3 -1
- package/build/i18n/uk.json.js.map +1 -1
- package/build/i18n/zh-CN.json.js +3 -1
- package/build/i18n/zh-CN.json.js.map +1 -1
- package/build/i18n/zh-HK.json.js +3 -1
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/iconButton/IconButton.js +5 -3
- package/build/iconButton/IconButton.js.map +1 -1
- package/build/index.js +84 -82
- package/build/index.js.map +1 -1
- package/build/index.mjs +3 -2
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +8 -6
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.messages.js +3 -1
- package/build/info/Info.messages.js.map +1 -1
- package/build/inlineAlert/InlineAlert.js +5 -3
- package/build/inlineAlert/InlineAlert.js.map +1 -1
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js +4 -2
- package/build/inputWithDisplayFormat/InputWithDisplayFormat.js.map +1 -1
- package/build/inputs/SelectInput.js +3 -3
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.messages.js +3 -1
- package/build/inputs/SelectInput.messages.js.map +1 -1
- package/build/inputs/SelectInput.mjs +2 -2
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +4 -2
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/label/Label.js +3 -3
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.messages.js +3 -1
- package/build/label/Label.messages.js.map +1 -1
- package/build/link/Link.js +5 -3
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.messages.js +3 -1
- package/build/link/Link.messages.js.map +1 -1
- package/build/listItem/ListItem.js +5 -3
- package/build/listItem/ListItem.js.map +1 -1
- package/build/loader/Loader.js +3 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/main.css +25 -1
- package/build/markdown/Markdown.js +3 -1
- package/build/markdown/Markdown.js.map +1 -1
- package/build/modal/Modal.js +5 -3
- package/build/modal/Modal.js.map +1 -1
- package/build/money/Money.js +3 -1
- package/build/money/Money.js.map +1 -1
- package/build/moneyInput/MoneyInput.js +7 -5
- package/build/moneyInput/MoneyInput.js.map +1 -1
- package/build/moneyInput/MoneyInput.messages.js +3 -1
- package/build/moneyInput/MoneyInput.messages.js.map +1 -1
- package/build/navigationOption/NavigationOption.js +5 -3
- package/build/navigationOption/NavigationOption.js.map +1 -1
- package/build/navigationOptionsList/NavigationOptionsList.js +3 -1
- package/build/navigationOptionsList/NavigationOptionsList.js.map +1 -1
- package/build/nudge/Nudge.js +2 -2
- package/build/nudge/Nudge.js.map +1 -1
- package/build/overlayHeader/OverlayHeader.js +4 -2
- package/build/overlayHeader/OverlayHeader.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.js +5 -3
- package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.js +3 -1
- package/build/phoneNumberInput/PhoneNumberInput.messages.js.map +1 -1
- package/build/phoneNumberInput/data/countries.js +3 -1
- package/build/phoneNumberInput/data/countries.js.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByCode/index.js +1 -1
- package/build/phoneNumberInput/utils/findCountryByCode/index.js.map +1 -1
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js +1 -1
- package/build/phoneNumberInput/utils/findCountryByPrefix/index.js.map +1 -1
- package/build/popover/Popover.js +5 -3
- package/build/popover/Popover.js.map +1 -1
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js +3 -1
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js.map +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.js +4 -2
- package/build/primitives/PrimitiveButton/PrimitiveButton.js.map +1 -1
- package/build/processIndicator/ProcessIndicator.js +3 -1
- package/build/processIndicator/ProcessIndicator.js.map +1 -1
- package/build/progress/Progress.js +3 -1
- package/build/progress/Progress.js.map +1 -1
- package/build/progressBar/ProgressBar.js +7 -5
- package/build/progressBar/ProgressBar.js.map +1 -1
- package/build/promoCard/PromoCard.js +8 -6
- package/build/promoCard/PromoCard.js.map +1 -1
- package/build/promoCard/PromoCardGroup.js +3 -1
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardIndicator.js +5 -3
- package/build/promoCard/PromoCardIndicator.js.map +1 -1
- package/build/provider/Provider.js +4 -2
- package/build/provider/Provider.js.map +1 -1
- package/build/radio/Radio.js +6 -4
- package/build/radio/Radio.js.map +1 -1
- package/build/radioGroup/RadioGroup.js +4 -2
- package/build/radioGroup/RadioGroup.js.map +1 -1
- package/build/radioOption/RadioOption.js +5 -3
- package/build/radioOption/RadioOption.js.map +1 -1
- package/build/section/Section.js +3 -1
- package/build/section/Section.js.map +1 -1
- package/build/segmentedControl/SegmentedControl.js +5 -3
- package/build/segmentedControl/SegmentedControl.js.map +1 -1
- package/build/select/Select.js +13 -11
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.messages.js +3 -1
- package/build/select/Select.messages.js.map +1 -1
- package/build/select/option/Option.js +6 -4
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/index.js +3 -1
- package/build/select/option/index.js.map +1 -1
- package/build/select/searchBox/SearchBox.js +3 -1
- package/build/select/searchBox/SearchBox.js.map +1 -1
- package/build/selectOption/SelectOption.js +10 -8
- package/build/selectOption/SelectOption.js.map +1 -1
- package/build/selectOption/SelectOption.messages.js +3 -1
- package/build/selectOption/SelectOption.messages.js.map +1 -1
- package/build/snackbar/Snackbar.js +3 -3
- package/build/snackbar/Snackbar.js.map +1 -1
- package/build/snackbar/SnackbarProvider.js +3 -1
- package/build/snackbar/SnackbarProvider.js.map +1 -1
- package/build/snackbar/useSnackbar.js +3 -1
- package/build/snackbar/useSnackbar.js.map +1 -1
- package/build/statusIcon/StatusIcon.js +12 -10
- package/build/statusIcon/StatusIcon.js.map +1 -1
- package/build/statusIcon/StatusIcon.messages.js +3 -1
- package/build/statusIcon/StatusIcon.messages.js.map +1 -1
- package/build/stepper/Stepper.js +4 -2
- package/build/stepper/Stepper.js.map +1 -1
- package/build/sticky/Sticky.js +3 -1
- package/build/sticky/Sticky.js.map +1 -1
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/divider/Divider.css +24 -0
- package/build/styles/main.css +25 -1
- package/build/summary/Summary.js +9 -7
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.messages.js +3 -1
- package/build/summary/Summary.messages.js.map +1 -1
- package/build/switch/Switch.js +3 -1
- package/build/switch/Switch.js.map +1 -1
- package/build/switchOption/SwitchOption.js +5 -3
- package/build/switchOption/SwitchOption.js.map +1 -1
- package/build/table/Table.js +16 -14
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.messages.js +3 -1
- package/build/table/Table.messages.js.map +1 -1
- package/build/table/TableCell.js +9 -7
- package/build/table/TableCell.js.map +1 -1
- package/build/table/TableHeader.js +6 -4
- package/build/table/TableHeader.js.map +1 -1
- package/build/table/TableRow.js +6 -4
- package/build/table/TableRow.js.map +1 -1
- package/build/table/TableStatusText.js +4 -2
- package/build/table/TableStatusText.js.map +1 -1
- package/build/tabs/Tab.js +3 -1
- package/build/tabs/Tab.js.map +1 -1
- package/build/tabs/TabList.js +3 -1
- package/build/tabs/TabList.js.map +1 -1
- package/build/tabs/TabPanel.js +3 -1
- package/build/tabs/TabPanel.js.map +1 -1
- package/build/tabs/Tabs.js +6 -4
- package/build/tabs/Tabs.js.map +1 -1
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js +4 -2
- package/build/textareaWithDisplayFormat/TextareaWithDisplayFormat.js.map +1 -1
- package/build/tile/Tile.js +5 -3
- package/build/tile/Tile.js.map +1 -1
- package/build/title/Title.js +3 -1
- package/build/title/Title.js.map +1 -1
- package/build/tooltip/Tooltip.js +3 -1
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/typeahead/Typeahead.js +8 -6
- package/build/typeahead/Typeahead.js.map +1 -1
- package/build/typeahead/Typeahead.messages.js +3 -1
- package/build/typeahead/Typeahead.messages.js.map +1 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.js +3 -1
- package/build/typeahead/typeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/typeahead/typeaheadOption/TypeaheadOption.js +5 -3
- package/build/typeahead/typeaheadOption/TypeaheadOption.js.map +1 -1
- package/build/typeahead/util/highlight.js +3 -1
- package/build/typeahead/util/highlight.js.map +1 -1
- package/build/types/badge/Badge.d.ts +1 -1
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/badge/BadgeAssets.d.ts.map +1 -1
- package/build/types/common/locale/index.d.ts +1 -1
- package/build/types/common/locale/index.d.ts.map +1 -1
- package/build/types/dateInput/DateInput.d.ts +1 -1
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/divider/Divider.d.ts +29 -0
- package/build/types/divider/Divider.d.ts.map +1 -0
- package/build/types/divider/index.d.ts +3 -0
- package/build/types/divider/index.d.ts.map +1 -0
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/upload/Upload.js +17 -17
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.messages.js +3 -1
- package/build/upload/Upload.messages.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +30 -6
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +24 -2
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +6 -4
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/uploadImageStep/uploadImageStep.js +5 -3
- package/build/upload/steps/uploadImageStep/uploadImageStep.js.map +1 -1
- package/build/uploadInput/UploadInput.js +13 -11
- package/build/uploadInput/UploadInput.js.map +1 -1
- package/build/uploadInput/UploadInput.messages.js +3 -1
- package/build/uploadInput/UploadInput.messages.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.js +8 -8
- package/build/uploadInput/uploadButton/UploadButton.js.map +1 -1
- package/build/uploadInput/uploadButton/UploadButton.messages.js +3 -1
- package/build/uploadInput/uploadButton/UploadButton.messages.js.map +1 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js +3 -1
- package/build/uploadInput/uploadButton/getAllowedFileTypes.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.js +12 -12
- package/build/uploadInput/uploadItem/UploadItem.js.map +1 -1
- package/build/uploadInput/uploadItem/UploadItem.messages.js +3 -1
- package/build/uploadInput/uploadItem/UploadItem.messages.js.map +1 -1
- package/build/withDisplayFormat/WithDisplayFormat.js +19 -17
- package/build/withDisplayFormat/WithDisplayFormat.js.map +1 -1
- package/build/withId/withId.js +3 -1
- package/build/withId/withId.js.map +1 -1
- package/build/withNextPortal/withNextPortal.js +3 -1
- package/build/withNextPortal/withNextPortal.js.map +1 -1
- package/package.json +7 -8
- package/src/badge/Badge.tsx +1 -1
- package/src/badge/BadgeAssets.tsx +2 -2
- package/src/common/Option/Option.css +1 -1
- package/src/common/Option/Option.less +2 -2
- package/src/common/Option/Option.tsx +1 -1
- package/src/common/locale/index.ts +1 -1
- package/src/dateInput/DateInput.tsx +7 -1
- package/src/divider/Divider.accessibility.docs.mdx +61 -0
- package/src/divider/Divider.css +24 -0
- package/src/divider/Divider.less +31 -0
- package/src/divider/Divider.spec.tsx +60 -0
- package/src/divider/Divider.story.tsx +130 -0
- package/src/divider/Divider.tsx +54 -0
- package/src/divider/index.ts +2 -0
- package/src/i18n/cs.json +22 -5
- package/src/index.ts +2 -0
- package/src/main.css +25 -1
- package/src/main.less +1 -0
- package/src/upload/steps/completeStep/completeStep.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.js","sources":["../../src/selectOption/SelectOption.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { ActionButtonProps } from '../actionButton';\nimport { clsx } from 'clsx';\nimport Option from '../common/Option';\nimport type { OptionProps } from '../common/Option/Option';\nimport { Breakpoint, Position } from '../common';\nimport Section from '../section';\nimport Header from '../header';\nimport { HeaderProps } from '../header/Header';\nimport NavigationOption from '../navigationOption';\nimport NavigationOptionsList from '../navigationOptionsList';\nimport { useInputAttributes } from '../inputs/contexts';\nimport messages from './SelectOption.messages';\nimport { useIntl } from 'react-intl';\nimport ResponsivePanel from '../common/responsivePanel';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport { ChevronDown, Plus } from '@transferwise/icons';\n\nexport type SelectOptiopsSection<T = unknown> = {\n title?: HeaderProps['title'];\n options: SelectOptionValue<T>[];\n};\n\nexport type SelectOptionValue<T = unknown> = Pick<\n OptionProps,\n 'media' | 'title' | 'content' | 'disabled'\n> & {\n value?: T;\n};\n\nexport type SelectOptionPlaceholder = Pick<OptionProps, 'media' | 'title' | 'content'> & {\n actionLabel?: ActionButtonProps['children'];\n};\n\nexport type SelectOptionProps<T = unknown> = {\n onChange: (selected: SelectOptionValue<T>) => void;\n selected?: SelectOptionValue<T>;\n options: SelectOptiopsSection<T>[];\n placeholder: SelectOptionPlaceholder;\n} & Omit<\n OptionProps,\n 'as' | 'title' | 'media' | 'content' | 'onClick' | 'onChange' | 'showMediaAtAllSizes' | 'decision'\n>;\n\nexport default function SelectOption<T>({\n selected = undefined,\n options,\n onChange,\n placeholder,\n disabled,\n ...props\n}: SelectOptionProps<T>) {\n const intl = useIntl();\n const rootRef = useRef(null);\n const [showOptions, setShowOptions] = useState(false);\n\n const hasSelected = selected !== undefined;\n const isLargeScreen = useScreenSize(Breakpoint.SMALL);\n\n const inputAttributes = useInputAttributes();\n const ariaLabelledBy = props['aria-labelledby'] ?? inputAttributes?.['aria-labelledby'];\n\n function handleOnClick(showOptionsStatus: boolean) {\n return () => {\n setShowOptions(showOptionsStatus);\n };\n }\n\n function handleOnChange(data: SelectOptionValue<T>) {\n return () => {\n setShowOptions(false);\n onChange(data);\n };\n }\n\n function getOptions(isLargeScreen = false) {\n return (\n <div className={clsx({ 'np-select-option-list': isLargeScreen })}>\n {options.map((optionsSection, index) => (\n <Section key={index} className={clsx({ 'p-x-2 p-y-1': isLargeScreen })}>\n {optionsSection.title && <Header title={optionsSection.title} />}\n <NavigationOptionsList>\n {optionsSection.options.map((option, index) => {\n return (\n <NavigationOption\n key={index}\n isContainerAligned={!isLargeScreen}\n showMediaCircle\n showMediaAtAllSizes\n onClick={handleOnChange(option)}\n {...option}\n />\n );\n })}\n </NavigationOptionsList>\n </Section>\n ))}\n </div>\n );\n }\n\n return (\n <>\n <Option\n ref={rootRef}\n as=\"div\"\n showMediaAtAllSizes\n disabled={disabled}\n decision={false}\n media={hasSelected ? selected.media : (placeholder.media ?? <Plus size={24} />)}\n title={(hasSelected ? selected : placeholder).title}\n content={(hasSelected ? selected : placeholder).content}\n className={clsx(\n 'np-select-option',\n 'clickable',\n hasSelected ? 'np-select-option-selected' : 'np-select-option-placeholder',\n props.className,\n )}\n button={\n <button\n {...inputAttributes}\n type=\"button\"\n disabled={disabled}\n aria-labelledby={ariaLabelledBy}\n aria-haspopup=\"dialog\"\n aria-expanded={showOptions}\n className={hasSelected ? 'btn-unstyled' : 'np-action-btn'}\n aria-label={hasSelected ? undefined : props['aria-label']}\n onClick={handleOnClick(true)}\n >\n {hasSelected ? (\n <ChevronDown title={intl.formatMessage(messages.selectedActionLabel)} />\n ) : (\n placeholder.actionLabel || intl.formatMessage(messages.actionLabel)\n )}\n </button>\n }\n />\n <ResponsivePanel\n anchorWidth\n altAxis\n anchorRef={rootRef}\n open={showOptions}\n position={Position.BOTTOM}\n onClose={handleOnClick(false)}\n >\n {getOptions(isLargeScreen)}\n </ResponsivePanel>\n </>\n );\n}\n"],"names":["SelectOption","selected","undefined","options","onChange","placeholder","disabled","props","intl","useIntl","rootRef","useRef","showOptions","setShowOptions","useState","hasSelected","isLargeScreen","useScreenSize","Breakpoint","SMALL","inputAttributes","useInputAttributes","ariaLabelledBy","handleOnClick","showOptionsStatus","handleOnChange","data","getOptions","_jsx","className","clsx","children","map","optionsSection","index","_jsxs","Section","title","Header","NavigationOptionsList","option","NavigationOption","isContainerAligned","showMediaCircle","showMediaAtAllSizes","onClick","_Fragment","Option","ref","as","decision","media","Plus","size","content","button","type","ChevronDown","formatMessage","messages","selectedActionLabel","actionLabel","ResponsivePanel","anchorWidth","altAxis","anchorRef","open","position","Position","BOTTOM","onClose"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectOption.js","sources":["../../src/selectOption/SelectOption.tsx"],"sourcesContent":["import { useRef, useState } from 'react';\nimport { ActionButtonProps } from '../actionButton';\nimport { clsx } from 'clsx';\nimport Option from '../common/Option';\nimport type { OptionProps } from '../common/Option/Option';\nimport { Breakpoint, Position } from '../common';\nimport Section from '../section';\nimport Header from '../header';\nimport { HeaderProps } from '../header/Header';\nimport NavigationOption from '../navigationOption';\nimport NavigationOptionsList from '../navigationOptionsList';\nimport { useInputAttributes } from '../inputs/contexts';\nimport messages from './SelectOption.messages';\nimport { useIntl } from 'react-intl';\nimport ResponsivePanel from '../common/responsivePanel';\nimport { useScreenSize } from '../common/hooks/useScreenSize';\nimport { ChevronDown, Plus } from '@transferwise/icons';\n\nexport type SelectOptiopsSection<T = unknown> = {\n title?: HeaderProps['title'];\n options: SelectOptionValue<T>[];\n};\n\nexport type SelectOptionValue<T = unknown> = Pick<\n OptionProps,\n 'media' | 'title' | 'content' | 'disabled'\n> & {\n value?: T;\n};\n\nexport type SelectOptionPlaceholder = Pick<OptionProps, 'media' | 'title' | 'content'> & {\n actionLabel?: ActionButtonProps['children'];\n};\n\nexport type SelectOptionProps<T = unknown> = {\n onChange: (selected: SelectOptionValue<T>) => void;\n selected?: SelectOptionValue<T>;\n options: SelectOptiopsSection<T>[];\n placeholder: SelectOptionPlaceholder;\n} & Omit<\n OptionProps,\n 'as' | 'title' | 'media' | 'content' | 'onClick' | 'onChange' | 'showMediaAtAllSizes' | 'decision'\n>;\n\nexport default function SelectOption<T>({\n selected = undefined,\n options,\n onChange,\n placeholder,\n disabled,\n ...props\n}: SelectOptionProps<T>) {\n const intl = useIntl();\n const rootRef = useRef(null);\n const [showOptions, setShowOptions] = useState(false);\n\n const hasSelected = selected !== undefined;\n const isLargeScreen = useScreenSize(Breakpoint.SMALL);\n\n const inputAttributes = useInputAttributes();\n const ariaLabelledBy = props['aria-labelledby'] ?? inputAttributes?.['aria-labelledby'];\n\n function handleOnClick(showOptionsStatus: boolean) {\n return () => {\n setShowOptions(showOptionsStatus);\n };\n }\n\n function handleOnChange(data: SelectOptionValue<T>) {\n return () => {\n setShowOptions(false);\n onChange(data);\n };\n }\n\n function getOptions(isLargeScreen = false) {\n return (\n <div className={clsx({ 'np-select-option-list': isLargeScreen })}>\n {options.map((optionsSection, index) => (\n <Section key={index} className={clsx({ 'p-x-2 p-y-1': isLargeScreen })}>\n {optionsSection.title && <Header title={optionsSection.title} />}\n <NavigationOptionsList>\n {optionsSection.options.map((option, index) => {\n return (\n <NavigationOption\n key={index}\n isContainerAligned={!isLargeScreen}\n showMediaCircle\n showMediaAtAllSizes\n onClick={handleOnChange(option)}\n {...option}\n />\n );\n })}\n </NavigationOptionsList>\n </Section>\n ))}\n </div>\n );\n }\n\n return (\n <>\n <Option\n ref={rootRef}\n as=\"div\"\n showMediaAtAllSizes\n disabled={disabled}\n decision={false}\n media={hasSelected ? selected.media : (placeholder.media ?? <Plus size={24} />)}\n title={(hasSelected ? selected : placeholder).title}\n content={(hasSelected ? selected : placeholder).content}\n className={clsx(\n 'np-select-option',\n 'clickable',\n hasSelected ? 'np-select-option-selected' : 'np-select-option-placeholder',\n props.className,\n )}\n button={\n <button\n {...inputAttributes}\n type=\"button\"\n disabled={disabled}\n aria-labelledby={ariaLabelledBy}\n aria-haspopup=\"dialog\"\n aria-expanded={showOptions}\n className={hasSelected ? 'btn-unstyled' : 'np-action-btn'}\n aria-label={hasSelected ? undefined : props['aria-label']}\n onClick={handleOnClick(true)}\n >\n {hasSelected ? (\n <ChevronDown title={intl.formatMessage(messages.selectedActionLabel)} />\n ) : (\n placeholder.actionLabel || intl.formatMessage(messages.actionLabel)\n )}\n </button>\n }\n />\n <ResponsivePanel\n anchorWidth\n altAxis\n anchorRef={rootRef}\n open={showOptions}\n position={Position.BOTTOM}\n onClose={handleOnClick(false)}\n >\n {getOptions(isLargeScreen)}\n </ResponsivePanel>\n </>\n );\n}\n"],"names":["SelectOption","selected","undefined","options","onChange","placeholder","disabled","props","intl","useIntl","rootRef","useRef","showOptions","setShowOptions","useState","hasSelected","isLargeScreen","useScreenSize","Breakpoint","SMALL","inputAttributes","useInputAttributes","ariaLabelledBy","handleOnClick","showOptionsStatus","handleOnChange","data","getOptions","_jsx","className","clsx","children","map","optionsSection","index","_jsxs","Section","title","Header","NavigationOptionsList","option","NavigationOption","isContainerAligned","showMediaCircle","showMediaAtAllSizes","onClick","_Fragment","Option","ref","as","decision","media","Plus","size","content","button","type","ChevronDown","formatMessage","messages","selectedActionLabel","actionLabel","ResponsivePanel","anchorWidth","altAxis","anchorRef","open","position","Position","BOTTOM","onClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CwB,SAAAA,YAAYA,CAAI;AACtCC,EAAAA,QAAQ,GA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|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var reactIntl = require('react-intl');
|
|
4
6
|
|
|
5
7
|
var messages = reactIntl.defineMessages({
|
|
@@ -11,5 +13,5 @@ var messages = reactIntl.defineMessages({
|
|
|
11
13
|
}
|
|
12
14
|
});
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
exports.default = messages;
|
|
15
17
|
//# sourceMappingURL=SelectOption.messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.messages.js","sources":["../../src/selectOption/SelectOption.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n actionLabel: {\n id: 'neptune.SelectOption.action.label',\n defaultMessage: 'Choose',\n },\n selectedActionLabel: {\n id: 'neptune.SelectOption.selected.action.label',\n defaultMessage: 'Change chosen option',\n },\n});\n"],"names":["defineMessages","actionLabel","id","selectedActionLabel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelectOption.messages.js","sources":["../../src/selectOption/SelectOption.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n actionLabel: {\n id: 'neptune.SelectOption.action.label',\n defaultMessage: 'Choose',\n },\n selectedActionLabel: {\n id: 'neptune.SelectOption.selected.action.label',\n defaultMessage: 'Change chosen option',\n },\n});\n"],"names":["defineMessages","actionLabel","id","selectedActionLabel"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,WAAW,EAAE;IACXC,EAAE,EAAA,mCAAA;GAEH;AACDC,EAAAA,mBAAmB,EAAE;IACnBD,EAAE,EAAA,4CAAA;AAEH,GAAA;AACF,CAAA,CAAC;;;;"}
|
|
@@ -107,11 +107,11 @@ class Snackbar extends React.Component {
|
|
|
107
107
|
exit: CSS_TRANSITION_DURATION
|
|
108
108
|
},
|
|
109
109
|
unmountOnExit: true,
|
|
110
|
-
children: /*#__PURE__*/jsxRuntime.jsxs(Body, {
|
|
110
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Body.default, {
|
|
111
111
|
ref: this.bodyRef,
|
|
112
112
|
as: "span",
|
|
113
113
|
className: "snackbar__text",
|
|
114
|
-
children: [text, action ? /*#__PURE__*/jsxRuntime.jsx(Button_resolver, {
|
|
114
|
+
children: [text, action ? /*#__PURE__*/jsxRuntime.jsx(Button_resolver.default, {
|
|
115
115
|
className: "snackbar__text__action",
|
|
116
116
|
v2: true,
|
|
117
117
|
size: "sm",
|
|
@@ -124,7 +124,7 @@ class Snackbar extends React.Component {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
Snackbar.contextType = DirectionProvider.DirectionContext;
|
|
127
|
-
var SnackbarPortal = withNextPortal(Snackbar);
|
|
127
|
+
var SnackbarPortal = withNextPortal.default(Snackbar);
|
|
128
128
|
|
|
129
129
|
exports.Snackbar = Snackbar;
|
|
130
130
|
exports.default = SnackbarPortal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.js","sources":["../../src/snackbar/Snackbar.tsx"],"sourcesContent":["import { Component, createRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport Button from '../button';\nimport Body from '../body';\nimport { Theme, type ThemeDark, type ThemeLight } from '../common';\nimport { DirectionContext } from '../provider/direction';\nimport withNextPortal from '../withNextPortal/withNextPortal';\n\nconst CSS_TRANSITION_DURATION = 400;\n\nexport interface SnackbarProps {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n text: React.ReactNode;\n /** @deprecated */\n theme?: ThemeLight | ThemeDark;\n timeout: number;\n timestamp: number;\n}\n\ninterface SnackbarState extends Pick<SnackbarProps, 'action' | 'text' | 'theme'> {\n visible: boolean;\n}\n\nexport class Snackbar extends Component<SnackbarProps, SnackbarState> {\n bodyRef = createRef<HTMLSpanElement>();\n timeout = 0;\n transitionTimeout = 0;\n\n constructor(props: SnackbarProps) {\n super(props);\n this.state = {\n visible: false,\n text: '',\n };\n }\n\n componentWillUnmount() {\n window.clearTimeout(this.timeout);\n window.clearTimeout(this.transitionTimeout);\n }\n\n shouldComponentUpdate(nextProps: SnackbarProps, nextState: SnackbarState) {\n if (!nextProps.text) {\n return false;\n }\n if (\n nextProps.timestamp === this.props.timestamp &&\n nextState.visible === this.state.visible &&\n nextState.text === this.state.text\n ) {\n return false;\n }\n\n return true;\n }\n\n setLeaveTimeout = () => {\n const { timeout } = this.props;\n\n this.timeout = window.setTimeout(() => {\n this.setState({ visible: false });\n }, timeout);\n };\n\n componentDidUpdate(previousProps: SnackbarProps) {\n const { action, text, timestamp } = this.props;\n\n if (!previousProps.text) {\n this.setState({ visible: true, action, text }, () => {\n this.setLeaveTimeout();\n });\n } else if (previousProps.timestamp !== timestamp) {\n window.clearTimeout(this.timeout);\n\n if (this.state.visible) {\n this.setState({ visible: false }, () => {\n this.transitionTimeout = window.setTimeout(() => {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }, CSS_TRANSITION_DURATION);\n });\n } else {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }\n }\n }\n\n render() {\n const { action, text, visible } = this.state;\n const { timeout } = this.props;\n\n return (\n <div className=\"snackbar\" aria-live=\"assertive\" role=\"alert\">\n <CSSTransition\n nodeRef={this.bodyRef}\n in={visible}\n classNames=\"snackbar__text-container\"\n timeout={{\n appear: 0,\n enter: timeout,\n exit: CSS_TRANSITION_DURATION,\n }}\n unmountOnExit\n >\n <Body ref={this.bodyRef} as=\"span\" className=\"snackbar__text\">\n {text}\n {action ? (\n <Button className=\"snackbar__text__action\" v2 size=\"sm\" onClick={action.onClick}>\n {action.label}\n </Button>\n ) : null}\n </Body>\n </CSSTransition>\n </div>\n );\n }\n}\n\nSnackbar.contextType = DirectionContext;\n\nexport default withNextPortal(Snackbar);\n"],"names":["CSS_TRANSITION_DURATION","Snackbar","Component","bodyRef","createRef","timeout","transitionTimeout","constructor","props","state","visible","text","componentWillUnmount","window","clearTimeout","shouldComponentUpdate","nextProps","nextState","timestamp","setLeaveTimeout","setTimeout","setState","componentDidUpdate","previousProps","action","render","_jsx","className","role","children","CSSTransition","nodeRef","in","classNames","appear","enter","exit","unmountOnExit","_jsxs","Body","ref","as","Button","v2","size","onClick","label","contextType","DirectionContext","withNextPortal"],"mappings":";;;;;;;;;;;;AASA,MAAMA,uBAAuB,GAAG,GAAG,CAAA;AAkB7B,MAAOC,QAAS,SAAQC,eAAuC,CAAA;EACnEC,OAAO,gBAAGC,eAAS,EAAmB,CAAA;AACtCC,EAAAA,OAAO,GAAG,CAAC,CAAA;AACXC,EAAAA,iBAAiB,GAAG,CAAC,CAAA;EAErBC,WAAAA,CAAYC,KAAoB,EAAA;IAC9B,KAAK,CAACA,KAAK,CAAC,CAAA;IACZ,IAAI,CAACC,KAAK,GAAG;AACXC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,IAAI,EAAE,EAAA;KACP,CAAA;AACH,GAAA;AAEAC,EAAAA,oBAAoBA,GAAA;AAClBC,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACT,OAAO,CAAC,CAAA;AACjCQ,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACR,iBAAiB,CAAC,CAAA;AAC7C,GAAA;AAEAS,EAAAA,qBAAqBA,CAACC,SAAwB,EAAEC,SAAwB,EAAA;AACtE,IAAA,IAAI,CAACD,SAAS,CAACL,IAAI,EAAE;AACnB,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AACA,IAAA,IACEK,SAAS,CAACE,SAAS,KAAK,IAAI,CAACV,KAAK,CAACU,SAAS,IAC5CD,SAAS,CAACP,OAAO,KAAK,IAAI,CAACD,KAAK,CAACC,OAAO,IACxCO,SAAS,CAACN,IAAI,KAAK,IAAI,CAACF,KAAK,CAACE,IAAI,EAClC;AACA,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AAEA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;E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;AACJ,OAAC,MAAM;QACL,IAAI,CAACqB,QAAQ,CAAC;AAAEX,UAAAA,OAAO,EAAE,IAAI;UAAEc,MAAM;AAAEb,UAAAA,IAAAA;AAAI,SAAE,CAAC,CAAA;QAC9C,IAAI,CAACQ,eAAe,EAAE,CAAA;AACxB,OAAA;AACF,KAAA;AACF,GAAA;AAEAM,EAAAA,MAAMA,GAAA;IACJ,MAAM;MAAED,MAAM;MAAEb,IAAI;AAAED,MAAAA,OAAAA;KAAS,GAAG,IAAI,CAACD,KAAK,CAAA;IAC5C,MAAM;AAAEJ,MAAAA,OAAAA;KAAS,GAAG,IAAI,CAACG,KAAK,CAAA;AAE9B,IAAA,oBACEkB,cAAA,CAAA,KAAA,EAAA;AAAKC,MAAAA,SAAS,EAAC,UAAU;AAAC,MAAA,WAAA,EAAU,WAAW;AAACC,MAAAA,IAAI,EAAC,OAAO;MAAAC,QAAA,eAC1DH,cAAA,CAACI,kCAAa,EAAA;QACZC,OAAO,EAAE,IAAI,CAAC5B,OAAQ;AACtB6B,QAAAA,EAAE,EAAEtB,OAAQ;AACZuB,QAAAA,UAAU,EAAC,0BAA0B;AACrC5B,QAAAA,OAAO,EAAE;AACP6B,UAAAA,MAAM,EAAE,CAAC;AACTC,UAAAA,KAAK,EAAE9B,OAAO;AACd+B,UAAAA,IAAI,EAAEpC,uBAAAA;SACN;QACFqC,aAAa,EAAA,IAAA;QAAAR,QAAA,eAEbS,eAAA,CAACC,
|
|
1
|
+
{"version":3,"file":"Snackbar.js","sources":["../../src/snackbar/Snackbar.tsx"],"sourcesContent":["import { Component, createRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport Button from '../button';\nimport Body from '../body';\nimport { Theme, type ThemeDark, type ThemeLight } from '../common';\nimport { DirectionContext } from '../provider/direction';\nimport withNextPortal from '../withNextPortal/withNextPortal';\n\nconst CSS_TRANSITION_DURATION = 400;\n\nexport interface SnackbarProps {\n action?: {\n label: string;\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n };\n text: React.ReactNode;\n /** @deprecated */\n theme?: ThemeLight | ThemeDark;\n timeout: number;\n timestamp: number;\n}\n\ninterface SnackbarState extends Pick<SnackbarProps, 'action' | 'text' | 'theme'> {\n visible: boolean;\n}\n\nexport class Snackbar extends Component<SnackbarProps, SnackbarState> {\n bodyRef = createRef<HTMLSpanElement>();\n timeout = 0;\n transitionTimeout = 0;\n\n constructor(props: SnackbarProps) {\n super(props);\n this.state = {\n visible: false,\n text: '',\n };\n }\n\n componentWillUnmount() {\n window.clearTimeout(this.timeout);\n window.clearTimeout(this.transitionTimeout);\n }\n\n shouldComponentUpdate(nextProps: SnackbarProps, nextState: SnackbarState) {\n if (!nextProps.text) {\n return false;\n }\n if (\n nextProps.timestamp === this.props.timestamp &&\n nextState.visible === this.state.visible &&\n nextState.text === this.state.text\n ) {\n return false;\n }\n\n return true;\n }\n\n setLeaveTimeout = () => {\n const { timeout } = this.props;\n\n this.timeout = window.setTimeout(() => {\n this.setState({ visible: false });\n }, timeout);\n };\n\n componentDidUpdate(previousProps: SnackbarProps) {\n const { action, text, timestamp } = this.props;\n\n if (!previousProps.text) {\n this.setState({ visible: true, action, text }, () => {\n this.setLeaveTimeout();\n });\n } else if (previousProps.timestamp !== timestamp) {\n window.clearTimeout(this.timeout);\n\n if (this.state.visible) {\n this.setState({ visible: false }, () => {\n this.transitionTimeout = window.setTimeout(() => {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }, CSS_TRANSITION_DURATION);\n });\n } else {\n this.setState({ visible: true, action, text });\n this.setLeaveTimeout();\n }\n }\n }\n\n render() {\n const { action, text, visible } = this.state;\n const { timeout } = this.props;\n\n return (\n <div className=\"snackbar\" aria-live=\"assertive\" role=\"alert\">\n <CSSTransition\n nodeRef={this.bodyRef}\n in={visible}\n classNames=\"snackbar__text-container\"\n timeout={{\n appear: 0,\n enter: timeout,\n exit: CSS_TRANSITION_DURATION,\n }}\n unmountOnExit\n >\n <Body ref={this.bodyRef} as=\"span\" className=\"snackbar__text\">\n {text}\n {action ? (\n <Button className=\"snackbar__text__action\" v2 size=\"sm\" onClick={action.onClick}>\n {action.label}\n </Button>\n ) : null}\n </Body>\n </CSSTransition>\n </div>\n );\n }\n}\n\nSnackbar.contextType = DirectionContext;\n\nexport default withNextPortal(Snackbar);\n"],"names":["CSS_TRANSITION_DURATION","Snackbar","Component","bodyRef","createRef","timeout","transitionTimeout","constructor","props","state","visible","text","componentWillUnmount","window","clearTimeout","shouldComponentUpdate","nextProps","nextState","timestamp","setLeaveTimeout","setTimeout","setState","componentDidUpdate","previousProps","action","render","_jsx","className","role","children","CSSTransition","nodeRef","in","classNames","appear","enter","exit","unmountOnExit","_jsxs","Body","ref","as","Button","v2","size","onClick","label","contextType","DirectionContext","withNextPortal"],"mappings":";;;;;;;;;;;;AASA,MAAMA,uBAAuB,GAAG,GAAG,CAAA;AAkB7B,MAAOC,QAAS,SAAQC,eAAuC,CAAA;EACnEC,OAAO,gBAAGC,eAAS,EAAmB,CAAA;AACtCC,EAAAA,OAAO,GAAG,CAAC,CAAA;AACXC,EAAAA,iBAAiB,GAAG,CAAC,CAAA;EAErBC,WAAAA,CAAYC,KAAoB,EAAA;IAC9B,KAAK,CAACA,KAAK,CAAC,CAAA;IACZ,IAAI,CAACC,KAAK,GAAG;AACXC,MAAAA,OAAO,EAAE,KAAK;AACdC,MAAAA,IAAI,EAAE,EAAA;KACP,CAAA;AACH,GAAA;AAEAC,EAAAA,oBAAoBA,GAAA;AAClBC,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACT,OAAO,CAAC,CAAA;AACjCQ,IAAAA,MAAM,CAACC,YAAY,CAAC,IAAI,CAACR,iBAAiB,CAAC,CAAA;AAC7C,GAAA;AAEAS,EAAAA,qBAAqBA,CAACC,SAAwB,EAAEC,SAAwB,EAAA;AACtE,IAAA,IAAI,CAACD,SAAS,CAACL,IAAI,EAAE;AACnB,MAAA,OAAO,KAAK,CAAA;AACd,KAAA;AACA,IAAA,I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AA,EAAE,EAAC,MAAM;AAACd,UAAAA,SAAS,EAAC,gBAAgB;AAAAE,UAAAA,QAAA,GAC1DlB,IAAI,EACJa,MAAM,gBACLE,cAAA,CAACgB,uBAAM,EAAA;AAACf,YAAAA,SAAS,EAAC,wBAAwB;YAACgB,EAAE,EAAA,IAAA;AAACC,YAAAA,IAAI,EAAC,IAAI;YAACC,OAAO,EAAErB,MAAM,CAACqB,OAAQ;YAAAhB,QAAA,EAC7EL,MAAM,CAACsB,KAAAA;WACF,CAAC,GACP,IAAI,CAAA;SACJ,CAAA;OACO,CAAA;AACjB,KAAK,CAAC,CAAA;AAEV,GAAA;AACD,CAAA;AAED7C,QAAQ,CAAC8C,WAAW,GAAGC,kCAAgB,CAAA;AAEvC,qBAAeC,sBAAc,CAAChD,QAAQ,CAAC;;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var React = require('react');
|
|
4
6
|
var Snackbar = require('./Snackbar.js');
|
|
5
7
|
var SnackbarContext = require('./SnackbarContext.js');
|
|
@@ -44,5 +46,5 @@ function SnackbarProvider({
|
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
|
|
49
|
+
exports.default = SnackbarProvider;
|
|
48
50
|
//# sourceMappingURL=SnackbarProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnackbarProvider.js","sources":["../../src/snackbar/SnackbarProvider.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport SnackbarPortal, { SnackbarProps } from './Snackbar';\nimport { SnackbarContext } from './SnackbarContext';\n\nexport interface SnackbarProviderProps {\n timeout?: number;\n children?: React.ReactNode;\n}\n\nexport default function SnackbarProvider({ timeout = 4500, children }: SnackbarProviderProps) {\n const [state, setState] = useState<Omit<SnackbarProps, 'timeout'>>({\n text: '',\n timestamp: 0,\n });\n const { action, text, theme, timestamp } = state;\n\n return (\n <SnackbarContext.Provider\n value={useMemo(\n () => ({\n createSnackbar: ({ action, text, theme }) => {\n setState({ action, text, theme, timestamp: Date.now() });\n },\n }),\n [],\n )}\n >\n <SnackbarPortal\n action={action}\n text={text}\n timestamp={timestamp}\n timeout={timeout}\n theme={theme}\n />\n {children}\n </SnackbarContext.Provider>\n );\n}\n"],"names":["SnackbarProvider","timeout","children","state","setState","useState","text","timestamp","action","theme","_jsxs","SnackbarContext","Provider","value","useMemo","createSnackbar","Date","now","_jsx","SnackbarPortal"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SnackbarProvider.js","sources":["../../src/snackbar/SnackbarProvider.tsx"],"sourcesContent":["import { useMemo, useState } from 'react';\n\nimport SnackbarPortal, { SnackbarProps } from './Snackbar';\nimport { SnackbarContext } from './SnackbarContext';\n\nexport interface SnackbarProviderProps {\n timeout?: number;\n children?: React.ReactNode;\n}\n\nexport default function SnackbarProvider({ timeout = 4500, children }: SnackbarProviderProps) {\n const [state, setState] = useState<Omit<SnackbarProps, 'timeout'>>({\n text: '',\n timestamp: 0,\n });\n const { action, text, theme, timestamp } = state;\n\n return (\n <SnackbarContext.Provider\n value={useMemo(\n () => ({\n createSnackbar: ({ action, text, theme }) => {\n setState({ action, text, theme, timestamp: Date.now() });\n },\n }),\n [],\n )}\n >\n <SnackbarPortal\n action={action}\n text={text}\n timestamp={timestamp}\n timeout={timeout}\n theme={theme}\n />\n {children}\n </SnackbarContext.Provider>\n );\n}\n"],"names":["SnackbarProvider","timeout","children","state","setState","useState","text","timestamp","action","theme","_jsxs","SnackbarContext","Provider","value","useMemo","createSnackbar","Date","now","_jsx","SnackbarPortal"],"mappings":";;;;;;;;;AAUc,SAAUA,gBAAgBA,CAAC;AAAEC,EAAAA,OAAO,GAAG,IAAI;AAAEC,EAAAA,QAAAA;AAAiC,CAAA,EAAA;AAC1F,EAAA,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGC,cAAQ,CAAiC;AACjEC,IAAAA,IAAI,EAAE,EAAE;AACRC,IAAAA,SAAS,EAAE,CAAA;AACZ,GAAA,CAAC,CAAA;EACF,MAAM;IAAEC,MAAM;IAAEF,IAAI;IAAEG,KAAK;AAAEF,IAAAA,SAAAA;AAAS,GAAE,GAAGJ,KAAK,CAAA;AAEhD,EAAA,oBACEO,eAAA,CAACC,+BAAe,CAACC,QAAQ,EAAA;IACvBC,KAAK,EAAEC,aAAO,CACZ,OAAO;AACLC,MAAAA,cAAc,EAAEA,CAAC;QAAEP,MAAM;QAAEF,IAAI;AAAEG,QAAAA,KAAAA;AAAO,OAAA,KAAI;AAC1CL,QAAAA,QAAQ,CAAC;UAAEI,MAAM;UAAEF,IAAI;UAAEG,KAAK;AAAEF,UAAAA,SAAS,EAAES,IAAI,CAACC,GAAG,EAAE;AAAA,SAAE,CAAC,CAAA;AAC1D,OAAA;KACD,CAAC,EACF,EAAE,CACF;IAAAf,QAAA,EAAA,cAEFgB,cAAA,CAACC,gBAAc,EAAA;AACbX,MAAAA,MAAM,EAAEA,MAAO;AACfF,MAAAA,IAAI,EAAEA,IAAK;AACXC,MAAAA,SAAS,EAAEA,SAAU;AACrBN,MAAAA,OAAO,EAAEA,OAAQ;AACjBQ,MAAAA,KAAK,EAAEA,KAAAA;KAET,CAAA,EAACP,QAAQ,CAAA;AAAA,GACe,CAAC,CAAA;AAE/B;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var React = require('react');
|
|
4
6
|
var SnackbarContext = require('./SnackbarContext.js');
|
|
5
7
|
|
|
@@ -10,5 +12,5 @@ function useSnackbar() {
|
|
|
10
12
|
return createSnackbar;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
exports.default = useSnackbar;
|
|
14
16
|
//# sourceMappingURL=useSnackbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSnackbar.js","sources":["../../src/snackbar/useSnackbar.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { SnackbarContext } from './SnackbarContext';\n\nfunction useSnackbar() {\n const { createSnackbar } = useContext(SnackbarContext);\n\n return createSnackbar;\n}\n\nexport default useSnackbar;\n"],"names":["useSnackbar","createSnackbar","useContext","SnackbarContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSnackbar.js","sources":["../../src/snackbar/useSnackbar.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { SnackbarContext } from './SnackbarContext';\n\nfunction useSnackbar() {\n const { createSnackbar } = useContext(SnackbarContext);\n\n return createSnackbar;\n}\n\nexport default useSnackbar;\n"],"names":["useSnackbar","createSnackbar","useContext","SnackbarContext"],"mappings":";;;;;;;AAIA,SAASA,WAAWA,GAAA;EAClB,MAAM;AAAEC,IAAAA,cAAAA;AAAgB,GAAA,GAAGC,gBAAU,CAACC,+BAAe,CAAC,CAAA;AAEtD,EAAA,OAAOF,cAAc,CAAA;AACvB;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var icons = require('@transferwise/icons');
|
|
4
6
|
var clsx = require('clsx');
|
|
5
7
|
var reactIntl = require('react-intl');
|
|
@@ -43,36 +45,36 @@ const StatusIcon = ({
|
|
|
43
45
|
const iconMetaBySentiment = {
|
|
44
46
|
[sentiment.Sentiment.NEGATIVE]: {
|
|
45
47
|
Icon: icons.Cross,
|
|
46
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.errorLabel)
|
|
48
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.errorLabel)
|
|
47
49
|
},
|
|
48
50
|
[sentiment.Sentiment.POSITIVE]: {
|
|
49
51
|
Icon: icons.Check,
|
|
50
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.successLabel)
|
|
52
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.successLabel)
|
|
51
53
|
},
|
|
52
54
|
[sentiment.Sentiment.WARNING]: {
|
|
53
55
|
Icon: icons.Alert,
|
|
54
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.warningLabel)
|
|
56
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.warningLabel)
|
|
55
57
|
},
|
|
56
58
|
[sentiment.Sentiment.PENDING]: {
|
|
57
59
|
Icon: icons.ClockBorderless,
|
|
58
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.pendingLabel)
|
|
60
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.pendingLabel)
|
|
59
61
|
},
|
|
60
62
|
[sentiment.Sentiment.NEUTRAL]: {
|
|
61
63
|
Icon: icons.Info,
|
|
62
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.informationLabel)
|
|
64
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.informationLabel)
|
|
63
65
|
},
|
|
64
66
|
// deprecated
|
|
65
67
|
[sentiment.Sentiment.ERROR]: {
|
|
66
68
|
Icon: icons.Cross,
|
|
67
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.errorLabel)
|
|
69
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.errorLabel)
|
|
68
70
|
},
|
|
69
71
|
[sentiment.Sentiment.INFO]: {
|
|
70
72
|
Icon: icons.Info,
|
|
71
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.informationLabel)
|
|
73
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.informationLabel)
|
|
72
74
|
},
|
|
73
75
|
[sentiment.Sentiment.SUCCESS]: {
|
|
74
76
|
Icon: icons.Check,
|
|
75
|
-
defaultIconLabel: intl.formatMessage(StatusIcon_messages.successLabel)
|
|
77
|
+
defaultIconLabel: intl.formatMessage(StatusIcon_messages.default.successLabel)
|
|
76
78
|
}
|
|
77
79
|
};
|
|
78
80
|
const {
|
|
@@ -82,7 +84,7 @@ const StatusIcon = ({
|
|
|
82
84
|
const iconColor = sentiment$1 === 'warning' || sentiment$1 === 'pending' ? 'dark' : 'light';
|
|
83
85
|
const isTinyViewport = useMedia.useMedia(`(max-width: ${breakpoint.Breakpoint.ZOOM_400}px)`);
|
|
84
86
|
const size = mapLegacySize[sizeProp] ?? sizeProp;
|
|
85
|
-
return /*#__PURE__*/jsxRuntime.jsx(Circle, {
|
|
87
|
+
return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
|
|
86
88
|
as: "span",
|
|
87
89
|
size: isTinyViewport && size < 40 ? 32 : size,
|
|
88
90
|
"data-testid": "status-icon",
|
|
@@ -94,5 +96,5 @@ const StatusIcon = ({
|
|
|
94
96
|
});
|
|
95
97
|
};
|
|
96
98
|
|
|
97
|
-
|
|
99
|
+
exports.default = StatusIcon;
|
|
98
100
|
//# sourceMappingURL=StatusIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconProps = {\n sentiment?: `${Sentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}`,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Sentiment.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n return (\n <Circle\n as=\"span\"\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children","title","undefined"],"mappings":"
|
|
1
|
+
{"version":3,"file":"StatusIcon.js","sources":["../../src/statusIcon/StatusIcon.tsx"],"sourcesContent":["import { Info, Alert, Cross, Check, ClockBorderless } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\n\nimport { SizeSmall, SizeMedium, SizeLarge, Sentiment, Size, Breakpoint } from '../common';\nimport Circle, { CircleProps } from '../common/circle';\nimport { useMedia } from '../common/hooks/useMedia';\n\nimport messages from './StatusIcon.messages';\n\n/**\n * @deprecated use `16 | 24 | 32 | 40 | 48 | 56 | 72` component instead\n */\ntype LegacySizes = SizeSmall | SizeMedium | SizeLarge;\n\nexport type StatusIconProps = {\n sentiment?: `${Sentiment}`;\n size?: LegacySizes | 16 | 24 | 32 | 40 | 48 | 56 | 72;\n /**\n * Override for the sentiment's-derived, default, accessible\n * name announced by the screen readers. <br />\n * Using `null` will render the icon purely presentational.\n * */\n iconLabel?: string | null;\n};\n\nconst mapLegacySize = {\n [String(Size.SMALL)]: 16,\n [String(Size.MEDIUM)]: 40,\n [String(Size.LARGE)]: 48,\n} satisfies Record<string, CircleProps['size']>;\n\nconst StatusIcon = ({ sentiment = 'neutral', size: sizeProp = 40, iconLabel }: StatusIconProps) => {\n const intl = useIntl();\n\n const iconMetaBySentiment: Record<\n `${Sentiment}`,\n {\n Icon: React.ElementType;\n defaultIconLabel: string;\n }\n > = {\n [Sentiment.NEGATIVE]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.POSITIVE]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n [Sentiment.WARNING]: {\n Icon: Alert,\n defaultIconLabel: intl.formatMessage(messages.warningLabel),\n },\n [Sentiment.PENDING]: {\n Icon: ClockBorderless,\n defaultIconLabel: intl.formatMessage(messages.pendingLabel),\n },\n [Sentiment.NEUTRAL]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n // deprecated\n [Sentiment.ERROR]: {\n Icon: Cross,\n defaultIconLabel: intl.formatMessage(messages.errorLabel),\n },\n [Sentiment.INFO]: {\n Icon: Info,\n defaultIconLabel: intl.formatMessage(messages.informationLabel),\n },\n [Sentiment.SUCCESS]: {\n Icon: Check,\n defaultIconLabel: intl.formatMessage(messages.successLabel),\n },\n };\n const { Icon, defaultIconLabel } = iconMetaBySentiment[sentiment];\n\n const iconColor = sentiment === 'warning' || sentiment === 'pending' ? 'dark' : 'light';\n const isTinyViewport = useMedia(`(max-width: ${Breakpoint.ZOOM_400}px)`);\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n return (\n <Circle\n as=\"span\"\n size={isTinyViewport && size < 40 ? 32 : size}\n data-testid=\"status-icon\"\n className={clsx('status-circle', sentiment)}\n >\n <Icon\n className={clsx('status-icon', iconColor)}\n title={iconLabel === null ? undefined : iconLabel || defaultIconLabel}\n />\n </Circle>\n );\n};\n\nexport default StatusIcon;\n"],"names":["mapLegacySize","String","Size","SMALL","MEDIUM","LARGE","StatusIcon","sentiment","size","sizeProp","iconLabel","intl","useIntl","iconMetaBySentiment","Sentiment","NEGATIVE","Icon","Cross","defaultIconLabel","formatMessage","messages","errorLabel","POSITIVE","Check","successLabel","WARNING","Alert","warningLabel","PENDING","ClockBorderless","pendingLabel","NEUTRAL","Info","informationLabel","ERROR","INFO","SUCCESS","iconColor","isTinyViewport","useMedia","Breakpoint","ZOOM_400","_jsx","Circle","as","className","clsx","children","title","undefined"],"mappings":";;;;;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AE5CL,cAAA,CAAC1B,IAAI,EAAA;AACH6B,MAAAA,SAAS,EAAEC,SAAI,CAAC,aAAa,EAAET,SAAS,CAAE;MAC1CW,KAAK,EAAEtC,SAAS,KAAK,IAAI,GAAGuC,SAAS,GAAGvC,SAAS,IAAIQ,gBAAAA;KAEzD,CAAA;AAAA,GAAQ,CAAC,CAAA;AAEb;;;;"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var reactIntl = require('react-intl');
|
|
4
6
|
|
|
5
7
|
var messages = reactIntl.defineMessages({
|
|
@@ -20,5 +22,5 @@ var messages = reactIntl.defineMessages({
|
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
exports.default = messages;
|
|
24
26
|
//# sourceMappingURL=StatusIcon.messages.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusIcon.messages.js","sources":["../../src/statusIcon/StatusIcon.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n errorLabel: {\n id: 'neptune.StatusIcon.iconLabel.error',\n defaultMessage: 'Error:',\n description:\n 'Visually hidden label read by screen readers, describing the Error icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n successLabel: {\n id: 'neptune.StatusIcon.iconLabel.success',\n defaultMessage: 'Success:',\n description:\n 'Visually hidden label read by screen readers, describing the Success icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n warningLabel: {\n id: 'neptune.StatusIcon.iconLabel.warning',\n defaultMessage: 'Warning:',\n description:\n 'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n pendingLabel: {\n id: 'neptune.StatusIcon.iconLabel.pending',\n defaultMessage: 'Pending:',\n description:\n 'Visually hidden label read by screen readers, describing the Pending icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n informationLabel: {\n id: 'neptune.StatusIcon.iconLabel.information',\n defaultMessage: 'Information:',\n description:\n 'Visually hidden label read by screen readers, describing the Information icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n});\n"],"names":["defineMessages","errorLabel","id","successLabel","warningLabel","pendingLabel","informationLabel"],"mappings":"
|
|
1
|
+
{"version":3,"file":"StatusIcon.messages.js","sources":["../../src/statusIcon/StatusIcon.messages.ts"],"sourcesContent":["import { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n errorLabel: {\n id: 'neptune.StatusIcon.iconLabel.error',\n defaultMessage: 'Error:',\n description:\n 'Visually hidden label read by screen readers, describing the Error icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n successLabel: {\n id: 'neptune.StatusIcon.iconLabel.success',\n defaultMessage: 'Success:',\n description:\n 'Visually hidden label read by screen readers, describing the Success icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n warningLabel: {\n id: 'neptune.StatusIcon.iconLabel.warning',\n defaultMessage: 'Warning:',\n description:\n 'Visually hidden label read by screen readers, describing the Warning icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n pendingLabel: {\n id: 'neptune.StatusIcon.iconLabel.pending',\n defaultMessage: 'Pending:',\n description:\n 'Visually hidden label read by screen readers, describing the Pending icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n informationLabel: {\n id: 'neptune.StatusIcon.iconLabel.information',\n defaultMessage: 'Information:',\n description:\n 'Visually hidden label read by screen readers, describing the Information icon – normally a prefix to remaining visible content, e.g. validation result.',\n },\n});\n"],"names":["defineMessages","errorLabel","id","successLabel","warningLabel","pendingLabel","informationLabel"],"mappings":";;;;;;AAEA,eAAeA,wBAAc,CAAC;AAC5BC,EAAAA,UAAU,EAAE;IACVC,EAAE,EAAA,oCAAA;GAIH;AACDC,EAAAA,YAAY,EAAE;IACZD,EAAE,EAAA,sCAAA;GAIH;AACDE,EAAAA,YAAY,EAAE;IACZF,EAAE,EAAA,sCAAA;GAIH;AACDG,EAAAA,YAAY,EAAE;IACZH,EAAE,EAAA,sCAAA;GAIH;AACDI,EAAAA,gBAAgB,EAAE;IAChBJ,EAAE,EAAA,0CAAA;AAIH,GAAA;AACF,CAAA,CAAC;;;;"}
|
package/build/stepper/Stepper.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var clsx = require('clsx');
|
|
4
6
|
require('react');
|
|
5
7
|
require('../common/theme.js');
|
|
@@ -85,7 +87,7 @@ const Stepper = ({
|
|
|
85
87
|
} : {
|
|
86
88
|
left: `${index * stepPercentage * 100}%`
|
|
87
89
|
},
|
|
88
|
-
children: step.hoverLabel && !deviceDetection.isTouchDevice() ? /*#__PURE__*/jsxRuntime.jsx(Tooltip, {
|
|
90
|
+
children: step.hoverLabel && !deviceDetection.isTouchDevice() ? /*#__PURE__*/jsxRuntime.jsx(Tooltip.default, {
|
|
89
91
|
position: position.Position.BOTTOM,
|
|
90
92
|
label: step.hoverLabel,
|
|
91
93
|
children: labelButton
|
|
@@ -111,5 +113,5 @@ const Stepper = ({
|
|
|
111
113
|
});
|
|
112
114
|
};
|
|
113
115
|
|
|
114
|
-
|
|
116
|
+
exports.default = Stepper;
|
|
115
117
|
//# sourceMappingURL=Stepper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.js","sources":["../../src/stepper/Stepper.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport { Position } from '../common';\nimport { useDirection } from '../common/hooks';\nimport Tooltip from '../tooltip';\n\nimport { isTouchDevice } from './deviceDetection';\n\nfunction clamp(from: number, to: number, value: number) {\n return Math.max(Math.min(to, value), from);\n}\n\nexport interface Step {\n label: React.ReactNode;\n onClick?: () => void;\n hoverLabel?: React.ReactNode;\n}\n\nexport interface StepperProps {\n steps: readonly Step[];\n activeStep?: number;\n className?: string;\n testId?: string;\n}\n\n/**\n * This component is considered user-unfriendly and inaccessible on its own and will likely be made internal in the future. Please use `FlowNavigation` instead.\n * @see https://storybook.wise.design/?path=/story/navigation-flownavigation--variants\n */\nconst Stepper = ({ steps, activeStep = 0, className, testId }: StepperProps) => {\n const { isRTL } = useDirection();\n\n if (steps.length === 0) {\n return null;\n }\n\n const activeStepIndex = clamp(0, steps.length - 1, activeStep);\n const stepPercentage = 1 / (steps.length - 1);\n const percentageCompleted = activeStepIndex / (steps.length - 1);\n\n const getProgressWidth = (): string => {\n if (percentageCompleted === 0) {\n return '0%';\n }\n /**\n * Progress bar starts with left/right (depends on rtl) shift `--progress-bar-start-shift` for hiding Progress bar's left and right borders\n * which are used for progress vertical delimiter.\n * When progress is completed, we need to add `--progress-bar-border-width` to the width to allow the right border be outside of the progress area.\n */\n return `calc(${percentageCompleted * 100}% + var(--progress-bar-start-shift) + var(--progress-bar-border-width))`;\n };\n\n const renderStep = (step: Step, index: number) => {\n const active = index === activeStepIndex;\n const clickable = step.onClick && !active;\n\n const labelButton = clickable ? (\n <button\n type=\"button\"\n className=\"btn-unstyled tw-stepper__step-label\"\n onClick={() => clickable && step.onClick?.()}\n >\n <small>{step.label}</small>\n </button>\n ) : (\n <span className=\"tw-stepper__step-label\">{step.label}</span>\n );\n\n return (\n <li\n key={index}\n className={clsx(\n 'hidden-xs',\n 'tw-stepper__step',\n active ? 'np-text-body-default-bold tw-stepper__step--active' : 'np-text-body-default',\n clickable && 'tw-stepper__step--clickable',\n step.hoverLabel && 'tw-stepper__step--has-tooltip',\n )}\n aria-current={active ? 'step' : false}\n style={\n isRTL\n ? { right: `${index * stepPercentage * 100}%` }\n : { left: `${index * stepPercentage * 100}%` }\n }\n >\n {step.hoverLabel && !isTouchDevice() ? (\n <Tooltip position={Position.BOTTOM} label={step.hoverLabel}>\n {labelButton}\n </Tooltip>\n ) : (\n labelButton\n )}\n </li>\n );\n };\n\n return (\n <div className={clsx('tw-stepper', className)} data-testid={testId}>\n <div className=\"progress\">\n <div\n className=\"progress-bar\"\n style={{ width: getProgressWidth() }}\n data-testid=\"progress-bar\"\n />\n </div>\n <ol className=\"tw-stepper-steps p-t-1 m-b-0\">{steps.map(renderStep)}</ol>\n </div>\n );\n};\n\nexport default Stepper;\n"],"names":["clamp","from","to","value","Math","max","min","Stepper","steps","activeStep","className","testId","isRTL","useDirection","length","activeStepIndex","stepPercentage","percentageCompleted","getProgressWidth","renderStep","step","index","active","clickable","onClick","labelButton","_jsx","type","children","label","clsx","hoverLabel","style","right","left","isTouchDevice","Tooltip","position","Position","BOTTOM","_jsxs","width","map"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stepper.js","sources":["../../src/stepper/Stepper.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport * as React from 'react';\n\nimport { Position } from '../common';\nimport { useDirection } from '../common/hooks';\nimport Tooltip from '../tooltip';\n\nimport { isTouchDevice } from './deviceDetection';\n\nfunction clamp(from: number, to: number, value: number) {\n return Math.max(Math.min(to, value), from);\n}\n\nexport interface Step {\n label: React.ReactNode;\n onClick?: () => void;\n hoverLabel?: React.ReactNode;\n}\n\nexport interface StepperProps {\n steps: readonly Step[];\n activeStep?: number;\n className?: string;\n testId?: string;\n}\n\n/**\n * This component is considered user-unfriendly and inaccessible on its own and will likely be made internal in the future. Please use `FlowNavigation` instead.\n * @see https://storybook.wise.design/?path=/story/navigation-flownavigation--variants\n */\nconst Stepper = ({ steps, activeStep = 0, className, testId }: StepperProps) => {\n const { isRTL } = useDirection();\n\n if (steps.length === 0) {\n return null;\n }\n\n const activeStepIndex = clamp(0, steps.length - 1, activeStep);\n const stepPercentage = 1 / (steps.length - 1);\n const percentageCompleted = activeStepIndex / (steps.length - 1);\n\n const getProgressWidth = (): string => {\n if (percentageCompleted === 0) {\n return '0%';\n }\n /**\n * Progress bar starts with left/right (depends on rtl) shift `--progress-bar-start-shift` for hiding Progress bar's left and right borders\n * which are used for progress vertical delimiter.\n * When progress is completed, we need to add `--progress-bar-border-width` to the width to allow the right border be outside of the progress area.\n */\n return `calc(${percentageCompleted * 100}% + var(--progress-bar-start-shift) + var(--progress-bar-border-width))`;\n };\n\n const renderStep = (step: Step, index: number) => {\n const active = index === activeStepIndex;\n const clickable = step.onClick && !active;\n\n const labelButton = clickable ? (\n <button\n type=\"button\"\n className=\"btn-unstyled tw-stepper__step-label\"\n onClick={() => clickable && step.onClick?.()}\n >\n <small>{step.label}</small>\n </button>\n ) : (\n <span className=\"tw-stepper__step-label\">{step.label}</span>\n );\n\n return (\n <li\n key={index}\n className={clsx(\n 'hidden-xs',\n 'tw-stepper__step',\n active ? 'np-text-body-default-bold tw-stepper__step--active' : 'np-text-body-default',\n clickable && 'tw-stepper__step--clickable',\n step.hoverLabel && 'tw-stepper__step--has-tooltip',\n )}\n aria-current={active ? 'step' : false}\n style={\n isRTL\n ? { right: `${index * stepPercentage * 100}%` }\n : { left: `${index * stepPercentage * 100}%` }\n }\n >\n {step.hoverLabel && !isTouchDevice() ? (\n <Tooltip position={Position.BOTTOM} label={step.hoverLabel}>\n {labelButton}\n </Tooltip>\n ) : (\n labelButton\n )}\n </li>\n );\n };\n\n return (\n <div className={clsx('tw-stepper', className)} data-testid={testId}>\n <div className=\"progress\">\n <div\n className=\"progress-bar\"\n style={{ width: getProgressWidth() }}\n data-testid=\"progress-bar\"\n />\n </div>\n <ol className=\"tw-stepper-steps p-t-1 m-b-0\">{steps.map(renderStep)}</ol>\n </div>\n );\n};\n\nexport default Stepper;\n"],"names":["clamp","from","to","value","Math","max","min","Stepper","steps","activeStep","className","testId","isRTL","useDirection","length","activeStepIndex","stepPercentage","percentageCompleted","getProgressWidth","renderStep","step","index","active","clickable","onClick","labelButton","_jsx","type","children","label","clsx","hoverLabel","style","right","left","isTouchDevice","Tooltip","position","Position","BOTTOM","_jsxs","width","map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,SAASA,KAAKA,CAACC,IAAY,EAAEC,EAAU,EAAEC,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A;AAAK9B,IAAAA,SAAS,EAAEoB,SAAI,CAAC,YAAY,EAAEpB,SAAS,CAAE;AAAC,IAAA,aAAA,EAAaC,MAAO;AAAAiB,IAAAA,QAAA,gBACjEF,cAAA,CAAA,KAAA,EAAA;AAAKhB,MAAAA,SAAS,EAAC,UAAU;AAAAkB,MAAAA,QAAA,eACvBF,cAAA,CAAA,KAAA,EAAA;AACEhB,QAAAA,SAAS,EAAC,cAAc;AACxBsB,QAAAA,KAAK,EAAE;UAAES,KAAK,EAAEvB,gBAAgB;SAAK;QACrC,aAAY,EAAA,cAAA;OAEhB,CAAA;KAAK,CACL,eAAAQ,cAAA,CAAA,IAAA,EAAA;AAAIhB,MAAAA,SAAS,EAAC,8BAA8B;AAAAkB,MAAAA,QAAA,EAAEpB,KAAK,CAACkC,GAAG,CAACvB,UAAU,CAAA;AAAC,KAAK,CAC1E,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
package/build/sticky/Sticky.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
require('../common/theme.js');
|
|
4
6
|
require('../common/direction.js');
|
|
5
7
|
require('../common/propsValues/control.js');
|
|
@@ -43,5 +45,5 @@ const Sticky = ({
|
|
|
43
45
|
});
|
|
44
46
|
};
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
exports.default = Sticky;
|
|
47
49
|
//# sourceMappingURL=Sticky.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sticky.js","sources":["../../src/sticky/Sticky.tsx"],"sourcesContent":["import { Position } from '../common';\nimport SlidingPanel from '../slidingPanel';\nimport { FunctionComponent } from 'react';\n\nexport interface StickyProps {\n /** Optional prop for children components to be rendered inside the Sticky component. */\n children?: React.ReactNode;\n\n /** Optional props that determines if the Sticky component is open or closed. Default value is `true`. */\n open?: boolean;\n\n /** Optional props that specifies the position of the Sticky component on the screen. Can be either `top` or `bottom`. */\n position?: `${Position.TOP}` | `${Position.BOTTOM}`;\n\n /** Optional prop to specify the ID used for testing */\n testId?: string;\n}\n\n/**\n * ### Sticky Component\n *\n * `<Sticky />` is a component that renders a `<SlidingPanel />` with specified props.\n * It uses the `<SlidingPanel />` component to create a panel that can slide in and out of view,\n * based on the `open` prop. It can be positioned at the top or bottom of the container,\n * as specified by the `position` prop.\n *\n * @component\n * @param {ReactNode} children - Children content.\n * @param {boolean} open - Determines if the Sticky component is open or closed.\n * @param {('top'|'bottom')} position - Specifies the position.\n * @param {string} testId - ID used for testing.\n * @returns {React.JSX.Element} The `SlidingPanel` component with applied props.\n * @example\n * <Button onClick={() => setOpen(!open)}>Open Sticky</Button>\n * <Sticky open={open} position={'bottom'}>\n * <div>\n * <Button onClick={() => setOpen(!open)}>Close Sticky</Button>\n * </div>\n * </Sticky>\n */\nconst Sticky: FunctionComponent<StickyProps> = ({\n children,\n open = true,\n position = Position.BOTTOM,\n testId,\n}: StickyProps) => {\n return (\n <SlidingPanel\n testId={testId}\n open={open}\n position={position}\n slidingPanelPositionFixed\n showSlidingPanelBorder\n >\n {children}\n </SlidingPanel>\n );\n};\n\nexport default Sticky;\n"],"names":["Sticky","children","open","position","Position","BOTTOM","testId","_jsx","SlidingPanel","slidingPanelPositionFixed","showSlidingPanelBorder"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sticky.js","sources":["../../src/sticky/Sticky.tsx"],"sourcesContent":["import { Position } from '../common';\nimport SlidingPanel from '../slidingPanel';\nimport { FunctionComponent } from 'react';\n\nexport interface StickyProps {\n /** Optional prop for children components to be rendered inside the Sticky component. */\n children?: React.ReactNode;\n\n /** Optional props that determines if the Sticky component is open or closed. Default value is `true`. */\n open?: boolean;\n\n /** Optional props that specifies the position of the Sticky component on the screen. Can be either `top` or `bottom`. */\n position?: `${Position.TOP}` | `${Position.BOTTOM}`;\n\n /** Optional prop to specify the ID used for testing */\n testId?: string;\n}\n\n/**\n * ### Sticky Component\n *\n * `<Sticky />` is a component that renders a `<SlidingPanel />` with specified props.\n * It uses the `<SlidingPanel />` component to create a panel that can slide in and out of view,\n * based on the `open` prop. It can be positioned at the top or bottom of the container,\n * as specified by the `position` prop.\n *\n * @component\n * @param {ReactNode} children - Children content.\n * @param {boolean} open - Determines if the Sticky component is open or closed.\n * @param {('top'|'bottom')} position - Specifies the position.\n * @param {string} testId - ID used for testing.\n * @returns {React.JSX.Element} The `SlidingPanel` component with applied props.\n * @example\n * <Button onClick={() => setOpen(!open)}>Open Sticky</Button>\n * <Sticky open={open} position={'bottom'}>\n * <div>\n * <Button onClick={() => setOpen(!open)}>Close Sticky</Button>\n * </div>\n * </Sticky>\n */\nconst Sticky: FunctionComponent<StickyProps> = ({\n children,\n open = true,\n position = Position.BOTTOM,\n testId,\n}: StickyProps) => {\n return (\n <SlidingPanel\n testId={testId}\n open={open}\n position={position}\n slidingPanelPositionFixed\n showSlidingPanelBorder\n >\n {children}\n </SlidingPanel>\n );\n};\n\nexport default Sticky;\n"],"names":["Sticky","children","open","position","Position","BOTTOM","testId","_jsx","SlidingPanel","slidingPanelPositionFixed","showSlidingPanelBorder"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCMA,MAAAA,MAAM,GAAmCA,CAAC;EAC9CC,QAAQ;AACRC,EAAAA,IAAI,GAAG,IAAI;YACXC,UAAQ,GAAGC,iBAAQ,CAACC,MAAM;AAC1BC,EAAAA,MAAAA;AAAM,CACM,KAAI;EAChB,oBACEC,cAAA,CAACC,oBAAY,EAAA;AACXF,IAAAA,MAAM,EAAEA,MAAO;AACfJ,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEA,UAAS;IACnBM,yBAAyB,EAAA,IAAA;IACzBC,sBAAsB,EAAA,IAAA;AAAAT,IAAAA,QAAA,EAErBA,QAAAA;AAAQ,GACG,CAAC,CAAA;AAEnB;;;;"}
|
|
@@ -110,7 +110,7 @@ button.np-option {
|
|
|
110
110
|
max-width: fit-content;
|
|
111
111
|
}
|
|
112
112
|
@media (max-width: 480px) {
|
|
113
|
-
.np-theme-personal .np-option-additional-content {
|
|
113
|
+
.np-theme-personal :not(.np-option__sm-media) > .np-option-additional-content {
|
|
114
114
|
margin-left: 16px;
|
|
115
115
|
margin-left: var(--size-16);
|
|
116
116
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.wds-Divider {
|
|
2
|
+
--Divider-border-width: 4px;
|
|
3
|
+
--Divider-border-color: var(--color-border-neutral);
|
|
4
|
+
--Divider-border-style: solid;
|
|
5
|
+
--Divider-dash-length: 4px;
|
|
6
|
+
--Divider-dash-spacing: 4px;
|
|
7
|
+
border-top: 4px solid rgba(0,0,0,0.10196);
|
|
8
|
+
border-top: var(--Divider-border-width) var(--Divider-border-style) var(--Divider-border-color);
|
|
9
|
+
display: inline-block;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
height: 4px;
|
|
13
|
+
height: var(--Divider-border-width);
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
.wds-Divider--content {
|
|
17
|
+
border-top: none;
|
|
18
|
+
background: repeating-linear-gradient(to right, var(--Divider-border-color), var(--Divider-border-color) var(--Divider-dash-length), transparent var(--Divider-dash-length), transparent calc(var(--Divider-dash-length) + var(--Divider-dash-spacing)));
|
|
19
|
+
height: var(--Divider-border-width);
|
|
20
|
+
}
|
|
21
|
+
.wds-Divider--content,
|
|
22
|
+
.wds-Divider--subsection {
|
|
23
|
+
--Divider-border-width: 1px;
|
|
24
|
+
}
|
package/build/styles/main.css
CHANGED
|
@@ -1782,7 +1782,7 @@ button.np-option {
|
|
|
1782
1782
|
max-width: fit-content;
|
|
1783
1783
|
}
|
|
1784
1784
|
@media (max-width: 480px) {
|
|
1785
|
-
.np-theme-personal .np-option-additional-content {
|
|
1785
|
+
.np-theme-personal :not(.np-option__sm-media) > .np-option-additional-content {
|
|
1786
1786
|
margin-left: 16px;
|
|
1787
1787
|
margin-left: var(--size-16);
|
|
1788
1788
|
}
|
|
@@ -2281,6 +2281,30 @@ button.np-option {
|
|
|
2281
2281
|
padding: var(--size-24);
|
|
2282
2282
|
}
|
|
2283
2283
|
}
|
|
2284
|
+
.wds-Divider {
|
|
2285
|
+
--Divider-border-width: 4px;
|
|
2286
|
+
--Divider-border-color: var(--color-border-neutral);
|
|
2287
|
+
--Divider-border-style: solid;
|
|
2288
|
+
--Divider-dash-length: 4px;
|
|
2289
|
+
--Divider-dash-spacing: 4px;
|
|
2290
|
+
border-top: 4px solid rgba(0,0,0,0.10196);
|
|
2291
|
+
border-top: var(--Divider-border-width) var(--Divider-border-style) var(--Divider-border-color);
|
|
2292
|
+
display: inline-block;
|
|
2293
|
+
margin: 0;
|
|
2294
|
+
padding: 0;
|
|
2295
|
+
height: 4px;
|
|
2296
|
+
height: var(--Divider-border-width);
|
|
2297
|
+
width: 100%;
|
|
2298
|
+
}
|
|
2299
|
+
.wds-Divider--content {
|
|
2300
|
+
border-top: none;
|
|
2301
|
+
background: repeating-linear-gradient(to right, var(--Divider-border-color), var(--Divider-border-color) var(--Divider-dash-length), transparent var(--Divider-dash-length), transparent calc(var(--Divider-dash-length) + var(--Divider-dash-spacing)));
|
|
2302
|
+
height: var(--Divider-border-width);
|
|
2303
|
+
}
|
|
2304
|
+
.wds-Divider--content,
|
|
2305
|
+
.wds-Divider--subsection {
|
|
2306
|
+
--Divider-border-width: 1px;
|
|
2307
|
+
}
|
|
2284
2308
|
.np-dropfade,
|
|
2285
2309
|
.np-dropfade-enter {
|
|
2286
2310
|
opacity: 0;
|
package/build/summary/Summary.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var icons = require('@transferwise/icons');
|
|
4
6
|
var clsx = require('clsx');
|
|
5
7
|
var React = require('react');
|
|
@@ -77,11 +79,11 @@ const Summary = ({
|
|
|
77
79
|
className: clsx.clsx('np-summary d-flex align-items-start', className)
|
|
78
80
|
// @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`
|
|
79
81
|
,
|
|
80
|
-
"aria-label": status && intl.formatMessage(Summary_messages[statusLabels[status]]),
|
|
82
|
+
"aria-label": status && intl.formatMessage(Summary_messages.default[statusLabels[status]]),
|
|
81
83
|
children: [icon && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
82
84
|
className: "np-summary__icon",
|
|
83
85
|
children: [media, Badge && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
84
|
-
children: /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
86
|
+
children: /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
|
|
85
87
|
size: size.Size.SMALL,
|
|
86
88
|
sentiment: statusMapping[status]
|
|
87
89
|
})
|
|
@@ -90,14 +92,14 @@ const Summary = ({
|
|
|
90
92
|
className: `np-summary__body ${icon ? 'm-l-2' : ''}`,
|
|
91
93
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
92
94
|
className: "np-summary__title d-flex",
|
|
93
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
95
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
94
96
|
as: "span",
|
|
95
97
|
role: "heading",
|
|
96
98
|
"aria-level": 6,
|
|
97
99
|
type: typography.Typography.BODY_LARGE_BOLD,
|
|
98
100
|
className: "text-primary m-b-1",
|
|
99
101
|
children: title
|
|
100
|
-
}), info && /*#__PURE__*/jsxRuntime.jsx(Info, {
|
|
102
|
+
}), info && /*#__PURE__*/jsxRuntime.jsx(Info.default, {
|
|
101
103
|
"aria-label": info['aria-label'],
|
|
102
104
|
className: "m-l-1 hidden-xs",
|
|
103
105
|
content: info.content,
|
|
@@ -106,7 +108,7 @@ const Summary = ({
|
|
|
106
108
|
title: info.title,
|
|
107
109
|
onClick: info.onClick
|
|
108
110
|
})]
|
|
109
|
-
}), description && /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
111
|
+
}), description && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
110
112
|
as: "span",
|
|
111
113
|
type: typography.Typography.BODY_DEFAULT,
|
|
112
114
|
className: `d-block ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`,
|
|
@@ -115,7 +117,7 @@ const Summary = ({
|
|
|
115
117
|
action: action,
|
|
116
118
|
className: "np-summary__action"
|
|
117
119
|
})]
|
|
118
|
-
}), info && /*#__PURE__*/jsxRuntime.jsx(Info, {
|
|
120
|
+
}), info && /*#__PURE__*/jsxRuntime.jsx(Info.default, {
|
|
119
121
|
"aria-label": info['aria-label'],
|
|
120
122
|
className: "m-l-2 hidden-sm hidden-md hidden-lg hidden-xl",
|
|
121
123
|
content: info.content,
|
|
@@ -127,5 +129,5 @@ const Summary = ({
|
|
|
127
129
|
});
|
|
128
130
|
};
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
exports.default = Summary;
|
|
131
133
|
//# sourceMappingURL=Summary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Summary.js","sources":["../../src/summary/Summary.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport {\n CheckCircleFill as CheckCircleIcon,\n ClockFill as PendingCircleIcon,\n} from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ElementType, cloneElement, ReactNode } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport Body from '../body';\nimport {\n Status,\n StatusDone,\n StatusNotDone,\n StatusPending,\n Size,\n Typography,\n Sentiment,\n} from '../common';\nimport Info, { InfoProps } from '../info';\nimport StatusIcon from '../statusIcon';\n\nimport messages from './Summary.messages';\nimport { Action, ActionOptions } from '../common/action/Action';\n\nconst BadgeIcons = {\n [Status.DONE]: CheckCircleIcon,\n [Status.PENDING]: PendingCircleIcon,\n};\n\nconst statusLabels = {\n [Status.NOT_DONE]: 'statusNotDone',\n [Status.DONE]: 'statusDone',\n [Status.PENDING]: 'statusPending',\n};\n\nconst statusMapping = {\n [Status.DONE]: Sentiment.POSITIVE,\n [Status.PENDING]: Sentiment.PENDING,\n};\n\nexport interface Props {\n /**\n * Action displayed at the bottom of the Summary\n */\n action?: ActionOptions;\n /**\n * Decides which html element should wrap the Summary\n */\n as?: ElementType;\n /**\n * Extra classes applied to Summary\n */\n className?: string;\n /**\n * @deprecated please use description instead\n */\n content?: ReactNode;\n /**\n * Summary description\n */\n description?: ReactNode;\n /**\n * @deprecated please use info instead\n */\n help?: {\n content: ReactNode;\n title?: ReactNode;\n };\n /**\n * Infos displayed on help Icon click inside Popover or Modal\n */\n info?: Pick<InfoProps, 'aria-label' | 'content' | 'onClick' | 'presentation' | 'title'>;\n /**\n * @deprecated please use icon instead\n */\n illustration?: ReactNode;\n /**\n * Main Summary Icon\n */\n icon?: ReactNode;\n /**\n * Decides the badge applied to Icon\n */\n status?: StatusNotDone | StatusDone | StatusPending;\n /**\n * Summary title\n */\n title: ReactNode;\n}\n\nconst Summary = ({\n action,\n as: Element = 'div',\n className,\n content = null,\n description = content,\n help,\n icon,\n illustration = null,\n info = help,\n status,\n title,\n}: Props) => {\n const intl = useIntl();\n\n let media = illustration;\n if (icon) {\n // @ts-expect-error if icon is present it has props and size prop\n const iconSize = icon?.props?.size as number;\n\n media =\n iconSize !== 24\n ? // @ts-expect-error we need icon to adjust it's size\n cloneElement(icon, { size: 24 })\n : icon;\n }\n // @ts-expect-error Badge can be null, this is handled in code\n const Badge = status && BadgeIcons[status];\n\n return (\n <Element\n className={clsx('np-summary d-flex align-items-start', className)}\n // @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`\n aria-label={status && intl.formatMessage(messages[statusLabels[status]])}\n >\n {icon && (\n <div className=\"np-summary__icon\">\n {media}\n {Badge && (\n <div>\n {/* @ts-expect-error it's okey to pass `undefined` into `sentiment` prop */}\n <StatusIcon size={Size.SMALL} sentiment={statusMapping[status]} />\n </div>\n )}\n </div>\n )}\n <div className={`np-summary__body ${icon ? 'm-l-2' : ''}`}>\n <div className=\"np-summary__title d-flex\">\n <Body\n as=\"span\"\n role=\"heading\"\n aria-level={6}\n type={Typography.BODY_LARGE_BOLD}\n className=\"text-primary m-b-1\"\n >\n {title}\n </Body>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-1 hidden-xs\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </div>\n\n {description && (\n <Body\n as=\"span\"\n type={Typography.BODY_DEFAULT}\n className={`d-block ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}\n >\n {description}\n </Body>\n )}\n {action && <Action action={action} className=\"np-summary__action\" />}\n </div>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </Element>\n );\n};\n\nexport default Summary;\n"],"names":["BadgeIcons","Status","DONE","CheckCircleIcon","PENDING","PendingCircleIcon","statusLabels","NOT_DONE","statusMapping","Sentiment","POSITIVE","Summary","action","as","Element","className","content","description","help","icon","illustration","info","status","title","intl","useIntl","media","iconSize","props","size","cloneElement","Badge","_jsxs","clsx","formatMessage","messages","children","_jsx","StatusIcon","Size","SMALL","sentiment","Body","role","type","Typography","BODY_LARGE_BOLD","Info","presentation","LARGE","onClick","BODY_DEFAULT","Action"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Summary.js","sources":["../../src/summary/Summary.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */\nimport {\n CheckCircleFill as CheckCircleIcon,\n ClockFill as PendingCircleIcon,\n} from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { ElementType, cloneElement, ReactNode } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport Body from '../body';\nimport {\n Status,\n StatusDone,\n StatusNotDone,\n StatusPending,\n Size,\n Typography,\n Sentiment,\n} from '../common';\nimport Info, { InfoProps } from '../info';\nimport StatusIcon from '../statusIcon';\n\nimport messages from './Summary.messages';\nimport { Action, ActionOptions } from '../common/action/Action';\n\nconst BadgeIcons = {\n [Status.DONE]: CheckCircleIcon,\n [Status.PENDING]: PendingCircleIcon,\n};\n\nconst statusLabels = {\n [Status.NOT_DONE]: 'statusNotDone',\n [Status.DONE]: 'statusDone',\n [Status.PENDING]: 'statusPending',\n};\n\nconst statusMapping = {\n [Status.DONE]: Sentiment.POSITIVE,\n [Status.PENDING]: Sentiment.PENDING,\n};\n\nexport interface Props {\n /**\n * Action displayed at the bottom of the Summary\n */\n action?: ActionOptions;\n /**\n * Decides which html element should wrap the Summary\n */\n as?: ElementType;\n /**\n * Extra classes applied to Summary\n */\n className?: string;\n /**\n * @deprecated please use description instead\n */\n content?: ReactNode;\n /**\n * Summary description\n */\n description?: ReactNode;\n /**\n * @deprecated please use info instead\n */\n help?: {\n content: ReactNode;\n title?: ReactNode;\n };\n /**\n * Infos displayed on help Icon click inside Popover or Modal\n */\n info?: Pick<InfoProps, 'aria-label' | 'content' | 'onClick' | 'presentation' | 'title'>;\n /**\n * @deprecated please use icon instead\n */\n illustration?: ReactNode;\n /**\n * Main Summary Icon\n */\n icon?: ReactNode;\n /**\n * Decides the badge applied to Icon\n */\n status?: StatusNotDone | StatusDone | StatusPending;\n /**\n * Summary title\n */\n title: ReactNode;\n}\n\nconst Summary = ({\n action,\n as: Element = 'div',\n className,\n content = null,\n description = content,\n help,\n icon,\n illustration = null,\n info = help,\n status,\n title,\n}: Props) => {\n const intl = useIntl();\n\n let media = illustration;\n if (icon) {\n // @ts-expect-error if icon is present it has props and size prop\n const iconSize = icon?.props?.size as number;\n\n media =\n iconSize !== 24\n ? // @ts-expect-error we need icon to adjust it's size\n cloneElement(icon, { size: 24 })\n : icon;\n }\n // @ts-expect-error Badge can be null, this is handled in code\n const Badge = status && BadgeIcons[status];\n\n return (\n <Element\n className={clsx('np-summary d-flex align-items-start', className)}\n // @ts-expect-error we check whether `status` is not null before index `statusLabels` and `messages`\n aria-label={status && intl.formatMessage(messages[statusLabels[status]])}\n >\n {icon && (\n <div className=\"np-summary__icon\">\n {media}\n {Badge && (\n <div>\n {/* @ts-expect-error it's okey to pass `undefined` into `sentiment` prop */}\n <StatusIcon size={Size.SMALL} sentiment={statusMapping[status]} />\n </div>\n )}\n </div>\n )}\n <div className={`np-summary__body ${icon ? 'm-l-2' : ''}`}>\n <div className=\"np-summary__title d-flex\">\n <Body\n as=\"span\"\n role=\"heading\"\n aria-level={6}\n type={Typography.BODY_LARGE_BOLD}\n className=\"text-primary m-b-1\"\n >\n {title}\n </Body>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-1 hidden-xs\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </div>\n\n {description && (\n <Body\n as=\"span\"\n type={Typography.BODY_DEFAULT}\n className={`d-block ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}\n >\n {description}\n </Body>\n )}\n {action && <Action action={action} className=\"np-summary__action\" />}\n </div>\n {info && (\n <Info\n aria-label={info['aria-label']}\n className=\"m-l-2 hidden-sm hidden-md hidden-lg hidden-xl\"\n content={info.content}\n presentation={info.presentation}\n size={Size.LARGE}\n title={info.title}\n onClick={info.onClick}\n />\n )}\n </Element>\n );\n};\n\nexport default Summary;\n"],"names":["BadgeIcons","Status","DONE","CheckCircleIcon","PENDING","PendingCircleIcon","statusLabels","NOT_DONE","statusMapping","Sentiment","POSITIVE","Summary","action","as","Element","className","content","description","help","icon","illustration","info","status","title","intl","useIntl","media","iconSize","props","size","cloneElement","Badge","_jsxs","clsx","formatMessage","messages","children","_jsx","StatusIcon","Size","SMALL","sentiment","Body","role","type","Typography","BODY_LARGE_BO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