@transferwise/components 46.94.2 → 46.95.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/accordion/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 +6 -4
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +1 -1
- package/build/listItem/ListItem.mjs.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 +11 -9
- 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/summary/Summary.mjs +2 -2
- package/build/summary/Summary.mjs.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 +8 -9
- 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/listItem/ListItem.tests.story.tsx +52 -0
- package/src/listItem/ListItem.tsx +1 -1
- package/src/main.css +25 -1
- package/src/main.less +1 -0
- package/src/summary/Summary.tests.story.tsx +55 -0
- package/src/summary/Summary.tsx +2 -2
- package/src/upload/Upload.spec.tsx +3 -1
- package/src/upload/steps/completeStep/completeStep.tsx +1 -1
- package/src/upload/steps/processingStep/processingStep.spec.tsx +1 -1
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.tsx +4 -4
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Divider from './Divider';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wraps stories with a container (e.g., centered or padded).
|
|
6
|
+
* Adjust styles to your needs.
|
|
7
|
+
*/
|
|
8
|
+
const withContainer = (Story: any) => (
|
|
9
|
+
<div style={{ padding: '1rem' }}>
|
|
10
|
+
<Story />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Not all stories need access to all controls as it causes unnecessary UI noise.
|
|
16
|
+
*/
|
|
17
|
+
const hideControls = (args: string[]) => {
|
|
18
|
+
const hidden = ['level', 'as', 'className', 'testId', ...args];
|
|
19
|
+
|
|
20
|
+
return Object.fromEntries(hidden.map((item) => [item, { table: { disable: true } }]));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The stories below document the `<Divider />` component, which can be rendered as either a semantic `<hr>` or a non-semantic `<div>`.
|
|
25
|
+
* levels allow customization for different visual separation needs.
|
|
26
|
+
*
|
|
27
|
+
* For more details, please refer to the [design documentation](https://wise.design/components/divider).
|
|
28
|
+
*/
|
|
29
|
+
const meta: Meta<typeof Divider> = {
|
|
30
|
+
component: Divider,
|
|
31
|
+
title: 'Layouts/Divider',
|
|
32
|
+
tags: ['autodocs'],
|
|
33
|
+
decorators: [withContainer],
|
|
34
|
+
parameters: {
|
|
35
|
+
actions: { argTypesRegex: null },
|
|
36
|
+
},
|
|
37
|
+
argTypes: {
|
|
38
|
+
level: {
|
|
39
|
+
control: 'select',
|
|
40
|
+
options: ['section', 'subsection', 'content'],
|
|
41
|
+
description: 'Choose the Divider level.',
|
|
42
|
+
table: {
|
|
43
|
+
category: 'Appearance',
|
|
44
|
+
type: { summary: 'string' },
|
|
45
|
+
defaultValue: { summary: 'section' },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
isContent: {
|
|
49
|
+
control: 'boolean',
|
|
50
|
+
description: 'Render as a semantic <hr> (true) or non-semantic <div> (false).',
|
|
51
|
+
table: {
|
|
52
|
+
category: 'Appearance',
|
|
53
|
+
type: { summary: 'boolean' },
|
|
54
|
+
defaultValue: { summary: 'false' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
className: {
|
|
58
|
+
description: 'Add custom class names to the Divider.',
|
|
59
|
+
table: {
|
|
60
|
+
category: 'Appearance',
|
|
61
|
+
type: { summary: 'string' },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
testId: {
|
|
65
|
+
description: 'Add a data-testid attribute for testing.',
|
|
66
|
+
table: {
|
|
67
|
+
category: 'Testing',
|
|
68
|
+
type: { summary: 'string' },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
args: {
|
|
73
|
+
isContent: false,
|
|
74
|
+
className: '',
|
|
75
|
+
testId: '',
|
|
76
|
+
level: 'section',
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export default meta;
|
|
80
|
+
|
|
81
|
+
type Story = StoryObj<typeof Divider>;
|
|
82
|
+
|
|
83
|
+
export const Playground: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
level: 'section',
|
|
86
|
+
},
|
|
87
|
+
tags: ['!autodocs'],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* There are three different types of divider – `section`, `subsection`, and `content` –
|
|
92
|
+
* each designed to visually separate or group content. <br />
|
|
93
|
+
* [Design documentation](https://wise.design/components/divider)
|
|
94
|
+
*/
|
|
95
|
+
export const Level: Story = {
|
|
96
|
+
argTypes: {
|
|
97
|
+
...hideControls(['testId', 'className', 'isContent']),
|
|
98
|
+
},
|
|
99
|
+
args: {
|
|
100
|
+
level: 'section',
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The `isContent` prop determines whether the divider is rendered as a semantic `<hr>` or a non-semantic `<div>`.
|
|
106
|
+
*/
|
|
107
|
+
export const ContentDivider: Story = {
|
|
108
|
+
argTypes: {
|
|
109
|
+
...hideControls(['level', 'testId', 'className']),
|
|
110
|
+
},
|
|
111
|
+
args: {
|
|
112
|
+
isContent: true,
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const AllVariants: Story = {
|
|
117
|
+
render: function Render() {
|
|
118
|
+
return (
|
|
119
|
+
<>
|
|
120
|
+
<Divider level="section" />
|
|
121
|
+
<Divider level="subsection" />
|
|
122
|
+
<Divider level="content" />
|
|
123
|
+
</>
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
argTypes: {
|
|
127
|
+
...hideControls(['level', 'testId', 'className', 'isContent']),
|
|
128
|
+
},
|
|
129
|
+
tags: ['!autodocs'],
|
|
130
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import React, { FunctionComponent } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface DividerProps {
|
|
5
|
+
/**
|
|
6
|
+
* If `true`, renders the Divider as a semantic `<hr>`, providing clear separation to assistive technologies.
|
|
7
|
+
* Otherwise, a non-semantic `<div role="presentation">` is used for purely visual separation.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
isContent?: boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Alters the visual style of the divider, accommodating different types
|
|
14
|
+
* of separated content. Accepts `'section'`, `'subsection'`, or `'content'`.
|
|
15
|
+
* @default 'section'
|
|
16
|
+
*/
|
|
17
|
+
level?: 'section' | 'subsection' | 'content';
|
|
18
|
+
|
|
19
|
+
className?: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {boolean} [isContent=false] - If `true`, uses a semantic `<hr>` for accessible separation; otherwise uses `<div role="presentation">`.
|
|
25
|
+
* @param {string} [className] - Optional class names for adding custom styling to the divider.
|
|
26
|
+
* @param {string} [testId] - Provides a `data-testid` for testing frameworks.
|
|
27
|
+
* @param {'section' | 'subsection' | 'content'} [level='section'] - Defines the visual style for the divider.
|
|
28
|
+
*
|
|
29
|
+
* @see {@link Divider} for further information.
|
|
30
|
+
* @see {@link https://storybook.wise.design/?path=/docs/layouts-divider--docs|Storybook Wise Design}
|
|
31
|
+
*/
|
|
32
|
+
const Divider: FunctionComponent<DividerProps> = ({
|
|
33
|
+
className,
|
|
34
|
+
isContent = false,
|
|
35
|
+
testId,
|
|
36
|
+
level = 'section',
|
|
37
|
+
...props
|
|
38
|
+
}) => {
|
|
39
|
+
const levelClass = level && level !== 'section' ? `wds-Divider--${level}` : '';
|
|
40
|
+
|
|
41
|
+
const commonProps = {
|
|
42
|
+
className: clsx('wds-Divider', levelClass, className),
|
|
43
|
+
'data-testid': testId,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const divProps = {
|
|
47
|
+
...commonProps,
|
|
48
|
+
role: 'presentation',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return isContent ? <hr {...commonProps} {...props} /> : <div {...divProps} {...props} />;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default Divider;
|
package/src/i18n/cs.json
CHANGED
|
@@ -9,35 +9,52 @@
|
|
|
9
9
|
"neptune.DateInput.year.label": "Rok",
|
|
10
10
|
"neptune.DateInput.year.placeholder": "RRRR",
|
|
11
11
|
"neptune.DateLookup.day": "den",
|
|
12
|
-
"neptune.DateLookup.goTo20YearView": "
|
|
12
|
+
"neptune.DateLookup.goTo20YearView": "Přejít na zobrazení 20 let",
|
|
13
13
|
"neptune.DateLookup.month": "měsíc",
|
|
14
14
|
"neptune.DateLookup.next": "další",
|
|
15
15
|
"neptune.DateLookup.previous": "předchozí",
|
|
16
16
|
"neptune.DateLookup.selected": "vybráno",
|
|
17
17
|
"neptune.DateLookup.twentyYears": "20 let",
|
|
18
18
|
"neptune.DateLookup.year": "rok",
|
|
19
|
-
"neptune.FlowNavigation.back": "
|
|
19
|
+
"neptune.FlowNavigation.back": "zpět na předchozí krok",
|
|
20
20
|
"neptune.Info.ariaLabel": "Více informací",
|
|
21
|
-
"neptune.
|
|
21
|
+
"neptune.Label.optional": "(Volitelné)",
|
|
22
|
+
"neptune.Link.opensInNewTab": "(otevře se v nové kartě)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Vybrat možnost...",
|
|
24
|
+
"neptune.MoneyInput.Select.selectCurrencyLabel": "Vybrat měnu",
|
|
25
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
23
26
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
24
27
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
28
|
+
"neptune.SelectOption.action.label": "Vybrat",
|
|
29
|
+
"neptune.SelectOption.selected.action.label": "Změnit zvolenou možnost",
|
|
30
|
+
"neptune.StatusIcon.iconLabel.error": "Chyba:",
|
|
31
|
+
"neptune.StatusIcon.iconLabel.information": "Informace:",
|
|
32
|
+
"neptune.StatusIcon.iconLabel.pending": "Vyřizuje se:",
|
|
33
|
+
"neptune.StatusIcon.iconLabel.success": "Úspěšné:",
|
|
34
|
+
"neptune.StatusIcon.iconLabel.warning": "Upozornění:",
|
|
25
35
|
"neptune.Summary.statusDone": "Položka dokončena",
|
|
26
36
|
"neptune.Summary.statusNotDone": "Položka k dokončení",
|
|
27
37
|
"neptune.Summary.statusPending": "Čekající položka",
|
|
38
|
+
"neptune.Table.actionHeader": "Akce",
|
|
39
|
+
"neptune.Table.emptyData": "Nebyly nalezeny žádné výsledky",
|
|
40
|
+
"neptune.Table.loaded": "Data tabulky byla načtena",
|
|
41
|
+
"neptune.Table.loading": "Data tabulky se načítají",
|
|
42
|
+
"neptune.Table.refreshPage": "Aktualizovat stránku",
|
|
28
43
|
"neptune.Upload.csButtonText": "Nahrát další soubor?",
|
|
29
44
|
"neptune.Upload.csFailureText": "Nahrání se nezdařilo. Zkuste to prosím později",
|
|
30
45
|
"neptune.Upload.csSuccessText": "Úspěšně nahráno!",
|
|
31
|
-
"neptune.Upload.csTooLargeMessage": "
|
|
46
|
+
"neptune.Upload.csTooLargeMessage": "Nahrajte soubor menší než {maxSize} MB",
|
|
32
47
|
"neptune.Upload.csWrongTypeMessage": "Tento formát souboru není podporován. Zkuste to znovu s jiným souborem",
|
|
33
48
|
"neptune.Upload.psButtonText": "Zrušit",
|
|
34
49
|
"neptune.Upload.psProcessingText": "Načítání...",
|
|
50
|
+
"neptune.Upload.retry": "Opakovat",
|
|
35
51
|
"neptune.Upload.usButtonText": "Nebo vyberte soubor",
|
|
36
52
|
"neptune.Upload.usDropMessage": "Pusťte sem soubor pro jeho nahrání",
|
|
37
|
-
"neptune.Upload.usPlaceholder": "Přetáhněte
|
|
53
|
+
"neptune.Upload.usPlaceholder": "Přetáhněte soubor menší než {maxSize} MB",
|
|
38
54
|
"neptune.UploadButton.allFileTypes": "Všechny typy souborů",
|
|
39
55
|
"neptune.UploadButton.dropFiles": "Pusťte sem soubor pro jeho nahrání",
|
|
40
56
|
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size}MB",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "Max. počet souborů: {maxFiles}.",
|
|
41
58
|
"neptune.UploadButton.uploadFile": "Nahrát soubor",
|
|
42
59
|
"neptune.UploadButton.uploadFiles": "Nahrát soubory",
|
|
43
60
|
"neptune.UploadInput.deleteModalBody": "Odstraněním tohoto souboru jej smažete z našeho systému.",
|
package/src/index.ts
CHANGED
|
@@ -31,6 +31,7 @@ export type { DecisionProps } from './decision/Decision';
|
|
|
31
31
|
export type { DefinitionListProps, DefinitionListDefinition } from './definitionList';
|
|
32
32
|
export type { DimmerProps } from './dimmer';
|
|
33
33
|
export type { DrawerProps } from './drawer';
|
|
34
|
+
export type { DividerProps } from './divider';
|
|
34
35
|
export type { EmphasisProps } from './emphasis';
|
|
35
36
|
export type { FieldProps } from './field/Field';
|
|
36
37
|
export type { InfoProps } from './info';
|
|
@@ -143,6 +144,7 @@ export { default as Decision } from './decision';
|
|
|
143
144
|
export { default as DefinitionList } from './definitionList';
|
|
144
145
|
export { default as Dimmer } from './dimmer';
|
|
145
146
|
export { default as Display } from './display';
|
|
147
|
+
export { default as Divider } from './divider';
|
|
146
148
|
export { default as Drawer } from './drawer';
|
|
147
149
|
export { default as DropFade } from './dropFade';
|
|
148
150
|
export { default as Emphasis } from './emphasis';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { FastFlag } from '@transferwise/icons';
|
|
2
|
+
import Button from '../button';
|
|
3
|
+
import AvatarView from '../avatarView';
|
|
4
|
+
import ListItem, { List, type ListItemProps } from '.';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
component: ListItem,
|
|
8
|
+
title: 'Other/ListItem/tests',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const LongText = () => {
|
|
12
|
+
const sharedProps: Partial<ListItemProps> = {
|
|
13
|
+
media: <AvatarView profileName="Super Pepa" badge={{ icon: <FastFlag /> }} />,
|
|
14
|
+
action: (
|
|
15
|
+
<Button v2 size="sm" onClick={() => {}}>
|
|
16
|
+
Action
|
|
17
|
+
</Button>
|
|
18
|
+
),
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div style={{ width: '35rem' }}>
|
|
23
|
+
<List>
|
|
24
|
+
<ListItem
|
|
25
|
+
{...sharedProps}
|
|
26
|
+
title="Default behaviour"
|
|
27
|
+
value="This is a test of a long word dontbreakme dontbreakme dontbreakme breakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakme word."
|
|
28
|
+
/>
|
|
29
|
+
|
|
30
|
+
<ListItem
|
|
31
|
+
{...sharedProps}
|
|
32
|
+
title="Wrapping the long word with a 'span.text-word-break'"
|
|
33
|
+
value={
|
|
34
|
+
<>
|
|
35
|
+
{'This is a test of a a very long word dontbreakme dontbreakme dontbreakme '}
|
|
36
|
+
<span className="text-word-break">
|
|
37
|
+
breakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakme
|
|
38
|
+
</span>
|
|
39
|
+
{' word.'}
|
|
40
|
+
</>
|
|
41
|
+
}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<ListItem
|
|
45
|
+
{...sharedProps}
|
|
46
|
+
title="Using '&shy;' HTML entitty"
|
|
47
|
+
value="This is a test of a a very long word dontbreakme dontbreakme dontbreakme break­me­break­me­break­me­break­me­break­me­break­me­break­me­break­me­break­me­break­me word."
|
|
48
|
+
/>
|
|
49
|
+
</List>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
package/src/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/src/main.less
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
@import "./definitionList/DefinitionList.less";
|
|
31
31
|
@import "./dimmer/Dimmer.less";
|
|
32
32
|
@import "./drawer/Drawer.less";
|
|
33
|
+
@import "./divider/Divider.less";
|
|
33
34
|
@import "./dropFade/DropFade.less";
|
|
34
35
|
@import "./emphasis/Emphasis.less";
|
|
35
36
|
@import "./flowNavigation/animatedLabel/AnimatedLabel.less";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Home as HomeIcon } from '@transferwise/icons';
|
|
2
|
+
import { Status } from '../common';
|
|
3
|
+
import Summary, { type SummaryProps } from '.';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
component: Summary,
|
|
7
|
+
title: 'Content/Summary/tests',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const LongText = () => {
|
|
11
|
+
const sharedProps: Partial<SummaryProps> = {
|
|
12
|
+
action: {
|
|
13
|
+
text: 'Change address',
|
|
14
|
+
href: '#change-address',
|
|
15
|
+
'aria-label': ' Click here to change address',
|
|
16
|
+
},
|
|
17
|
+
as: 'li',
|
|
18
|
+
icon: <HomeIcon size={24} />,
|
|
19
|
+
status: Status.NOT_DONE,
|
|
20
|
+
info: {
|
|
21
|
+
title: 'Title',
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
return (
|
|
25
|
+
<ul style={{ width: '34rem' }}>
|
|
26
|
+
<Summary
|
|
27
|
+
title="Default behaviour"
|
|
28
|
+
description="This is a test of a a very long word dontbreakme dontbreakme dontbreakme dontbreakme dontbreakme breakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakme word."
|
|
29
|
+
{...sharedProps}
|
|
30
|
+
/>
|
|
31
|
+
|
|
32
|
+
<Summary
|
|
33
|
+
title="Wrapping the long word with a 'span.text-word-break'"
|
|
34
|
+
description={
|
|
35
|
+
<>
|
|
36
|
+
{
|
|
37
|
+
'This is a test of a a very long word dontbreakme dontbreakme dontbreakme dontbreakme dontbreakme '
|
|
38
|
+
}
|
|
39
|
+
<span className="text-word-break">
|
|
40
|
+
breakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakmebreakme
|
|
41
|
+
</span>
|
|
42
|
+
{' word.'}
|
|
43
|
+
</>
|
|
44
|
+
}
|
|
45
|
+
{...sharedProps}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
<Summary
|
|
49
|
+
title="Using '&shy;' HTML entitty"
|
|
50
|
+
description="This is a test of a a very long word dontbreakme dontbreakme dontbreakme dontbreakme dontbreakme break­me­break­me­break­me­break­me­break­me­break­me­break­me­break­me­break­me­break­me word."
|
|
51
|
+
{...sharedProps}
|
|
52
|
+
/>
|
|
53
|
+
</ul>
|
|
54
|
+
);
|
|
55
|
+
};
|
package/src/summary/Summary.tsx
CHANGED
|
@@ -142,7 +142,7 @@ const Summary = ({
|
|
|
142
142
|
role="heading"
|
|
143
143
|
aria-level={6}
|
|
144
144
|
type={Typography.BODY_LARGE_BOLD}
|
|
145
|
-
className="text-primary m-b-1"
|
|
145
|
+
className="text-primary text-overflow-wrap m-b-1"
|
|
146
146
|
>
|
|
147
147
|
{title}
|
|
148
148
|
</Body>
|
|
@@ -163,7 +163,7 @@ const Summary = ({
|
|
|
163
163
|
<Body
|
|
164
164
|
as="span"
|
|
165
165
|
type={Typography.BODY_DEFAULT}
|
|
166
|
-
className={`d-block ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}
|
|
166
|
+
className={`d-block text-overflow-wrap ${icon ? 'np-summary__description' : 'np-summary__description-icon'}`}
|
|
167
167
|
>
|
|
168
168
|
{description}
|
|
169
169
|
</Body>
|
|
@@ -184,7 +184,9 @@ describe('Upload Component', () => {
|
|
|
184
184
|
|
|
185
185
|
await waitForUpload();
|
|
186
186
|
|
|
187
|
-
expect(
|
|
187
|
+
expect(
|
|
188
|
+
await screen.findByText(/File type not supported. Please try again with a different file/i),
|
|
189
|
+
).toBeInTheDocument();
|
|
188
190
|
});
|
|
189
191
|
|
|
190
192
|
test('should handle canceling the upload', async () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document as DocumentIcon } from '@transferwise/icons';
|
|
2
2
|
|
|
3
|
-
import { Typography } from '
|
|
3
|
+
import { Typography } from '../../../common';
|
|
4
4
|
import Body from '../../../body';
|
|
5
5
|
import Button from '../../../button';
|
|
6
6
|
import Title from '../../../title';
|
|
@@ -66,11 +66,11 @@ describe('uploadImageStep', () => {
|
|
|
66
66
|
const errorIconLabel = 'Error icon label';
|
|
67
67
|
const errorMessage = 'Maximum filesize is 2MB.';
|
|
68
68
|
const { container } = render(
|
|
69
|
-
<UploadImageStep
|
|
70
|
-
{...UPLOADIMAGE_STEP_PROPS}
|
|
69
|
+
<UploadImageStep
|
|
70
|
+
{...UPLOADIMAGE_STEP_PROPS}
|
|
71
71
|
errorMessage={errorMessage}
|
|
72
|
-
errorIconLabel={errorIconLabel}
|
|
73
|
-
|
|
72
|
+
errorIconLabel={errorIconLabel}
|
|
73
|
+
/>,
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
expect(screen.getByLabelText(errorIconLabel)).toBeInTheDocument();
|