@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,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var icons = require('@transferwise/icons');
|
|
4
6
|
var React = require('react');
|
|
5
7
|
var avatarTypes = require('../avatar/avatarTypes.js');
|
|
6
8
|
var Avatar = require('../avatar/Avatar.js');
|
|
7
9
|
var Badge = require('../badge/Badge.js');
|
|
8
|
-
var StatusIcon = require('../statusIcon/StatusIcon.js');
|
|
9
10
|
require('@wise/art');
|
|
11
|
+
var StatusIcon = require('../statusIcon/StatusIcon.js');
|
|
10
12
|
require('clsx');
|
|
11
13
|
require('../common/propsValues/breakpoint.js');
|
|
12
14
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -43,7 +45,7 @@ const OptionalBadge = ({
|
|
|
43
45
|
...rest
|
|
44
46
|
}) => {
|
|
45
47
|
if (url) {
|
|
46
|
-
return /*#__PURE__*/jsxRuntime.jsx(Badge, {
|
|
48
|
+
return /*#__PURE__*/jsxRuntime.jsx(Badge.default, {
|
|
47
49
|
"aria-label": ariaLabel,
|
|
48
50
|
badge: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
49
51
|
src: url,
|
|
@@ -54,9 +56,9 @@ const OptionalBadge = ({
|
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
58
|
if (statusIcon) {
|
|
57
|
-
return /*#__PURE__*/jsxRuntime.jsx(Badge, {
|
|
59
|
+
return /*#__PURE__*/jsxRuntime.jsx(Badge.default, {
|
|
58
60
|
"aria-label": ariaLabel,
|
|
59
|
-
badge: /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
61
|
+
badge: /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
|
|
60
62
|
sentiment: statusIcon,
|
|
61
63
|
size: size.Size.SMALL
|
|
62
64
|
}),
|
|
@@ -141,12 +143,12 @@ const AvatarWrapper = ({
|
|
|
141
143
|
altText: badgeAltText,
|
|
142
144
|
statusIcon: badgeStatusIcon,
|
|
143
145
|
...badgeProps,
|
|
144
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Avatar, {
|
|
146
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Avatar.default, {
|
|
145
147
|
size: size.Size.MEDIUM,
|
|
146
148
|
...getAvatarProps()
|
|
147
149
|
})
|
|
148
150
|
});
|
|
149
151
|
};
|
|
150
152
|
|
|
151
|
-
|
|
153
|
+
exports.default = AvatarWrapper;
|
|
152
154
|
//# sourceMappingURL=AvatarWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarWrapper.js","sources":["../../src/avatarWrapper/AvatarWrapper.tsx"],"sourcesContent":["import { Person as ProfileIcon, Briefcase as BriefcaseIcon } from '@transferwise/icons';\nimport { useState, useEffect } from 'react';\n\nimport Avatar, { AvatarProps, AvatarType } from '../avatar';\nimport Badge, { BadgeProps } from '../badge';\nimport {\n ProfileType,\n ProfileTypePersonal,\n ProfileTypeBusiness,\n Size,\n Sentiment,\n getInitials,\n} from '../common';\nimport StatusIcon from '../statusIcon/StatusIcon';\n\ninterface OptionalBadgeProps extends Omit<BadgeProps, 'badge'> {\n url?: string;\n ariaLabel?: string;\n altText?: string;\n statusIcon?: Sentiment;\n}\n\nconst OptionalBadge = ({\n url,\n altText,\n statusIcon,\n children,\n ariaLabel,\n ...rest\n}: OptionalBadgeProps) => {\n if (url) {\n return (\n <Badge aria-label={ariaLabel} badge={<img src={url} alt={altText} />} {...rest}>\n {children}\n </Badge>\n );\n }\n if (statusIcon) {\n return (\n <Badge\n aria-label={ariaLabel}\n badge={<StatusIcon sentiment={statusIcon} size={Size.SMALL} />}\n {...rest}\n >\n {children}\n </Badge>\n );\n }\n return <>{children}</>;\n};\n\nexport type AvatarWrapperProps = {\n url?: string;\n 'aria-label'?: string;\n profileType?: ProfileTypeBusiness | ProfileTypePersonal;\n profileId?: string;\n name?: string;\n avatarProps?: AvatarProps;\n badgeProps?: BadgeProps;\n} & (\n | {\n badgeUrl: string;\n badgeAltText: string;\n badgeStatusIcon?: never;\n }\n | {\n badgeUrl?: never;\n badgeAltText?: never;\n badgeStatusIcon: Sentiment;\n }\n | {\n badgeUrl?: never;\n badgeAltText?: never;\n badgeStatusIcon?: never;\n }\n);\n\n/**\n * @deprecated Use `AvatarView` component instead\n */\nconst AvatarWrapper = ({\n url,\n 'aria-label': ariaLabel,\n profileType,\n profileId,\n badgeUrl,\n badgeAltText,\n badgeStatusIcon,\n name,\n avatarProps,\n badgeProps,\n}: AvatarWrapperProps) => {\n const [hasImageLoadError, setImageLoadError] = useState(false);\n const isBusinessProfile = profileType === ProfileType.BUSINESS;\n\n // Reset the errored state when url changes\n useEffect(() => setImageLoadError(false), [url]);\n\n const getAvatarProps = () => {\n let updatedAvatarProps = avatarProps;\n if (!badgeUrl && !badgeStatusIcon && ariaLabel) {\n updatedAvatarProps = { ...updatedAvatarProps, 'aria-label': ariaLabel };\n }\n if (url && !hasImageLoadError) {\n return {\n type: AvatarType.THUMBNAIL,\n children: <img src={url} alt=\"\" onError={() => setImageLoadError(true)} />,\n ...updatedAvatarProps,\n };\n }\n if (profileType) {\n return {\n type: AvatarType.ICON,\n children: isBusinessProfile ? <BriefcaseIcon size=\"24\" /> : <ProfileIcon size=\"24\" />,\n ...updatedAvatarProps,\n };\n }\n if (name) {\n return {\n type: AvatarType.INITIALS,\n children: <>{getInitials(name)}</>,\n backgroundColorSeed: profileId?.toString(),\n ...updatedAvatarProps,\n };\n }\n return {\n type: AvatarType.ICON,\n children: <ProfileIcon size=\"24\" />,\n ...updatedAvatarProps,\n };\n };\n\n return (\n <OptionalBadge\n url={badgeUrl}\n ariaLabel={ariaLabel}\n altText={badgeAltText}\n statusIcon={badgeStatusIcon}\n {...badgeProps}\n >\n <Avatar size={Size.MEDIUM} {...getAvatarProps()} />\n </OptionalBadge>\n );\n};\n\nexport default AvatarWrapper;\n"],"names":["OptionalBadge","url","altText","statusIcon","children","ariaLabel","rest","_jsx","Badge","badge","src","alt","StatusIcon","sentiment","size","Size","SMALL","_Fragment","AvatarWrapper","profileType","profileId","badgeUrl","badgeAltText","badgeStatusIcon","name","avatarProps","badgeProps","hasImageLoadError","setImageLoadError","useState","isBusinessProfile","ProfileType","BUSINESS","useEffect","getAvatarProps","updatedAvatarProps","type","AvatarType","THUMBNAIL","onError","ICON","BriefcaseIcon","ProfileIcon","INITIALS","getInitials","backgroundColorSeed","toString","Avatar","MEDIUM"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AvatarWrapper.js","sources":["../../src/avatarWrapper/AvatarWrapper.tsx"],"sourcesContent":["import { Person as ProfileIcon, Briefcase as BriefcaseIcon } from '@transferwise/icons';\nimport { useState, useEffect } from 'react';\n\nimport Avatar, { AvatarProps, AvatarType } from '../avatar';\nimport Badge, { BadgeProps } from '../badge';\nimport {\n ProfileType,\n ProfileTypePersonal,\n ProfileTypeBusiness,\n Size,\n Sentiment,\n getInitials,\n} from '../common';\nimport StatusIcon from '../statusIcon/StatusIcon';\n\ninterface OptionalBadgeProps extends Omit<BadgeProps, 'badge'> {\n url?: string;\n ariaLabel?: string;\n altText?: string;\n statusIcon?: Sentiment;\n}\n\nconst OptionalBadge = ({\n url,\n altText,\n statusIcon,\n children,\n ariaLabel,\n ...rest\n}: OptionalBadgeProps) => {\n if (url) {\n return (\n <Badge aria-label={ariaLabel} badge={<img src={url} alt={altText} />} {...rest}>\n {children}\n </Badge>\n );\n }\n if (statusIcon) {\n return (\n <Badge\n aria-label={ariaLabel}\n badge={<StatusIcon sentiment={statusIcon} size={Size.SMALL} />}\n {...rest}\n >\n {children}\n </Badge>\n );\n }\n return <>{children}</>;\n};\n\nexport type AvatarWrapperProps = {\n url?: string;\n 'aria-label'?: string;\n profileType?: ProfileTypeBusiness | ProfileTypePersonal;\n profileId?: string;\n name?: string;\n avatarProps?: AvatarProps;\n badgeProps?: BadgeProps;\n} & (\n | {\n badgeUrl: string;\n badgeAltText: string;\n badgeStatusIcon?: never;\n }\n | {\n badgeUrl?: never;\n badgeAltText?: never;\n badgeStatusIcon: Sentiment;\n }\n | {\n badgeUrl?: never;\n badgeAltText?: never;\n badgeStatusIcon?: never;\n }\n);\n\n/**\n * @deprecated Use `AvatarView` component instead\n */\nconst AvatarWrapper = ({\n url,\n 'aria-label': ariaLabel,\n profileType,\n profileId,\n badgeUrl,\n badgeAltText,\n badgeStatusIcon,\n name,\n avatarProps,\n badgeProps,\n}: AvatarWrapperProps) => {\n const [hasImageLoadError, setImageLoadError] = useState(false);\n const isBusinessProfile = profileType === ProfileType.BUSINESS;\n\n // Reset the errored state when url changes\n useEffect(() => setImageLoadError(false), [url]);\n\n const getAvatarProps = () => {\n let updatedAvatarProps = avatarProps;\n if (!badgeUrl && !badgeStatusIcon && ariaLabel) {\n updatedAvatarProps = { ...updatedAvatarProps, 'aria-label': ariaLabel };\n }\n if (url && !hasImageLoadError) {\n return {\n type: AvatarType.THUMBNAIL,\n children: <img src={url} alt=\"\" onError={() => setImageLoadError(true)} />,\n ...updatedAvatarProps,\n };\n }\n if (profileType) {\n return {\n type: AvatarType.ICON,\n children: isBusinessProfile ? <BriefcaseIcon size=\"24\" /> : <ProfileIcon size=\"24\" />,\n ...updatedAvatarProps,\n };\n }\n if (name) {\n return {\n type: AvatarType.INITIALS,\n children: <>{getInitials(name)}</>,\n backgroundColorSeed: profileId?.toString(),\n ...updatedAvatarProps,\n };\n }\n return {\n type: AvatarType.ICON,\n children: <ProfileIcon size=\"24\" />,\n ...updatedAvatarProps,\n };\n };\n\n return (\n <OptionalBadge\n url={badgeUrl}\n ariaLabel={ariaLabel}\n altText={badgeAltText}\n statusIcon={badgeStatusIcon}\n {...badgeProps}\n >\n <Avatar size={Size.MEDIUM} {...getAvatarProps()} />\n </OptionalBadge>\n );\n};\n\nexport default AvatarWrapper;\n"],"names":["OptionalBadge","url","altText","statusIcon","children","ariaLabel","rest","_jsx","Badge","badge","src","alt","StatusIcon","sentiment","size","Size","SMALL","_Fragment","AvatarWrapper","profileType","profileId","badgeUrl","badgeAltText","badgeStatusIcon","name","avatarProps","badgeProps","hasImageLoadError","setImageLoadError","useState","isBusinessProfile","ProfileType","BUSINESS","useEffect","getAvatarProps","updatedAvatarProps","type","AvatarType","THUMBNAIL","onError","ICON","BriefcaseIcon","ProfileIcon","INITIALS","getInitials","backgroundColorSeed","toString","Avatar","MEDIUM"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAMA,aAAa,GAAGA,CAAC;EACrBC,GAAG;EACHC,OAAO;EACPC,UAAU;EACVC,QAAQ;EACRC,SAAS;EACT,GAAGC,IAAAA;AAAI,CACY,KAAI;AACvB,EAAA,IAAIL,GAAG,EAAE;IACP,oBACEM,cAAA,CAACC,aAAK,EAAA;AAAC,MAAA,YAAA,EAAYH,SAAU;AAACI,MAAAA,KAAK,eAAEF,cAAA,CAAA,KAAA,EAAA;AAAKG,QAAAA,GAAG,EAAET,GAAI;AAACU,QAAAA,GAAG,EAAET,OAAAA;AAAQ,QAAI;AAAA,MAAA,GAAKI,IAAI;AAAAF,MAAAA,QAAA,EAC3EA,QAAAA;AAAQ,KACJ,CAAC,CAAA;AAEZ,GAAA;AACA,EAAA,IAAID,UAAU,EAAE;IACd,oBACEI,cAAA,CAACC,aAAK,EAAA;AACJ,MAAA,YAAA,EAAYH,SAAU;MACtBI,KAAK,eAAEF,cAAA,CAACK,kBAAU,EAAA;AAACC,QAAAA,SAAS,EAAEV,UAAW;QA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AACiC,MAAO;AAAA,MAAA,GAAKd,cAAc,EAAA;KAC/C,CAAA;AAAA,GAAe,CAAC,CAAA;AAEpB;;;;"}
|
|
@@ -3,8 +3,8 @@ import { useState, useEffect } from 'react';
|
|
|
3
3
|
import { AvatarType } from '../avatar/avatarTypes.mjs';
|
|
4
4
|
import Avatar from '../avatar/Avatar.mjs';
|
|
5
5
|
import Badge from '../badge/Badge.mjs';
|
|
6
|
-
import StatusIcon from '../statusIcon/StatusIcon.mjs';
|
|
7
6
|
import '@wise/art';
|
|
7
|
+
import StatusIcon from '../statusIcon/StatusIcon.mjs';
|
|
8
8
|
import 'clsx';
|
|
9
9
|
import '../common/propsValues/breakpoint.mjs';
|
|
10
10
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/build/badge/Badge.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
|
var theme = require('../common/theme.js');
|
|
5
7
|
require('../common/direction.js');
|
|
@@ -65,5 +67,5 @@ const Badge = ({
|
|
|
65
67
|
});
|
|
66
68
|
};
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
exports.default = Badge;
|
|
69
71
|
//# sourceMappingURL=Badge.js.map
|
package/build/badge/Badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../src/badge/Badge.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport {\n Size,\n Theme,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n ThemeDark,\n ThemeLight,\n CommonProps,\n} from '../common';\nimport { BadgeAssetsProps } from '.';\n\n/**\n * @deprecated Use `16` or `24` instead.\n */\ntype DeprecatedSizes = SizeSmall | SizeMedium | SizeLarge;\n\n/**\n * @deprecated `Badge` is deprecated please use `<AvatarView badge={..} />` instead\n */\nexport type BadgeProps = {\n badge: ReactNode;\n children: ReactNode;\n /**\n * `md` is deprecated, it will fallback to `sm` instead.\n */\n size?: DeprecatedSizes | BadgeAssetsProps['size'];\n border?: ThemeDark | ThemeLight;\n 'aria-label'?: string;\n style?: React.CSSProperties;\n} & CommonProps;\n\nconst mapLegacySize = {\n 16: Size.SMALL,\n 24: Size.LARGE,\n // medium is no longer exists, so we map it to small\n [String(Size.MEDIUM)]: Size.SMALL,\n};\n\n// Note: Badge component is not deprecated, we want stop it's direct usage on consumer side.\n// Deprecation notice will hint consumers to migrate. Eventually the component will become internal.\n/**\n * @deprecated Use `<AvatarView badge={..} />` instead.\n */\nconst Badge = ({\n badge,\n className = undefined,\n size: sizeProp = Size.SMALL,\n border = Theme.LIGHT,\n 'aria-label': ariaLabel,\n children,\n style,\n}: BadgeProps) => {\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n const classes: string = clsx(\n 'tw-badge',\n {\n [`tw-badge-border-${border}`]: border,\n [`tw-badge-${size}`]: size,\n },\n className,\n );\n\n return (\n <div aria-label={ariaLabel} className={classes} style={style}>\n <div className=\"tw-badge__children\">{children}</div>\n <div className=\"tw-badge__content\">{badge}</div>\n </div>\n );\n};\n\nexport default Badge;\n"],"names":["mapLegacySize","Size","SMALL","LARGE","String","MEDIUM","Badge","badge","className","undefined","size","sizeProp","border","Theme","LIGHT","ariaLabel","children","style","classes","clsx","_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../src/badge/Badge.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport {\n Size,\n Theme,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n ThemeDark,\n ThemeLight,\n CommonProps,\n} from '../common';\nimport type { BadgeAssetsProps } from '.';\n\n/**\n * @deprecated Use `16` or `24` instead.\n */\ntype DeprecatedSizes = SizeSmall | SizeMedium | SizeLarge;\n\n/**\n * @deprecated `Badge` is deprecated please use `<AvatarView badge={..} />` instead\n */\nexport type BadgeProps = {\n badge: ReactNode;\n children: ReactNode;\n /**\n * `md` is deprecated, it will fallback to `sm` instead.\n */\n size?: DeprecatedSizes | BadgeAssetsProps['size'];\n border?: ThemeDark | ThemeLight;\n 'aria-label'?: string;\n style?: React.CSSProperties;\n} & CommonProps;\n\nconst mapLegacySize = {\n 16: Size.SMALL,\n 24: Size.LARGE,\n // medium is no longer exists, so we map it to small\n [String(Size.MEDIUM)]: Size.SMALL,\n};\n\n// Note: Badge component is not deprecated, we want stop it's direct usage on consumer side.\n// Deprecation notice will hint consumers to migrate. Eventually the component will become internal.\n/**\n * @deprecated Use `<AvatarView badge={..} />` instead.\n */\nconst Badge = ({\n badge,\n className = undefined,\n size: sizeProp = Size.SMALL,\n border = Theme.LIGHT,\n 'aria-label': ariaLabel,\n children,\n style,\n}: BadgeProps) => {\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n const classes: string = clsx(\n 'tw-badge',\n {\n [`tw-badge-border-${border}`]: border,\n [`tw-badge-${size}`]: size,\n },\n className,\n );\n\n return (\n <div aria-label={ariaLabel} className={classes} style={style}>\n <div className=\"tw-badge__children\">{children}</div>\n <div className=\"tw-badge__content\">{badge}</div>\n </div>\n );\n};\n\nexport default Badge;\n"],"names":["mapLegacySize","Size","SMALL","LARGE","String","MEDIUM","Badge","badge","className","undefined","size","sizeProp","border","Theme","LIGHT","ariaLabel","children","style","classes","clsx","_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAMA,aAAa,GAAG;EACpB,EAAE,EAAEC,SAAI,CAACC,KAAK;EACd,EAAE,EAAED,SAAI,CAACE,KAAK;AACd;EACA,CAACC,MAAM,CAACH,SAAI,CAACI,MAAM,CAAC,GAAGJ,SAAI,CAACC,KAAAA;CAC7B,CAAA;AAED;AACA;AACA;;AAEG;AACGI,MAAAA,KAAK,GAAGA,CAAC;EACbC,KAAK;AACLC,EAAAA,SAAS,GAAGC,SAAS;AACrBC,EAAAA,IAAI,EAAEC,QAAQ,GAAGV,SAAI,CAACC,KAAK;EAC3BU,MAAM,GAAGC,WAAK,CAACC,KAAK;AACpB,EAAA,YAAY,EAAEC,SAAS;EACvBC,QAAQ;AACRC,EAAAA,KAAAA;AAAK,CACM,KAAI;AACf,EAAA,MAAMP,IAAI,GAAGV,aAAa,CAACW,QAAQ,CAAC,IAAIA,QAAQ,CAAA;AAChD,EAAA,MAAMO,OAAO,GAAWC,SAAI,CAC1B,UAAU,EACV;AACE,IAAA,CAAC,CAAmBP,gBAAAA,EAAAA,MAAM,CAAE,CAAA,GAAGA,MAAM;IACrC,CAAC,CAAA,SAAA,EAAYF,IAAI,CAAA,CAAE,GAAGA,IAAAA;GACvB,EACDF,SAAS,CACV,CAAA;AAED,EAAA,oBACEY,eAAA,CAAA,KAAA,EAAA;AAAK,IAAA,YAAA,EAAYL,SAAU;AAACP,IAAAA,SAAS,EAAEU,OAAQ;AAACD,IAAAA,KAAK,EAAEA,KAAM;AAAAD,IAAAA,QAAA,gBAC3DK,cAAA,CAAA,KAAA,EAAA;AAAKb,MAAAA,SAAS,EAAC,oBAAoB;AAAAQ,MAAAA,QAAA,EAAEA,QAAAA;KAAc,CACnD,eAAAK,cAAA,CAAA,KAAA,EAAA;AAAKb,MAAAA,SAAS,EAAC,mBAAmB;AAAAQ,MAAAA,QAAA,EAAET,KAAAA;AAAK,KAAM,CACjD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.mjs","sources":["../../src/badge/Badge.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport {\n Size,\n Theme,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n ThemeDark,\n ThemeLight,\n CommonProps,\n} from '../common';\nimport { BadgeAssetsProps } from '.';\n\n/**\n * @deprecated Use `16` or `24` instead.\n */\ntype DeprecatedSizes = SizeSmall | SizeMedium | SizeLarge;\n\n/**\n * @deprecated `Badge` is deprecated please use `<AvatarView badge={..} />` instead\n */\nexport type BadgeProps = {\n badge: ReactNode;\n children: ReactNode;\n /**\n * `md` is deprecated, it will fallback to `sm` instead.\n */\n size?: DeprecatedSizes | BadgeAssetsProps['size'];\n border?: ThemeDark | ThemeLight;\n 'aria-label'?: string;\n style?: React.CSSProperties;\n} & CommonProps;\n\nconst mapLegacySize = {\n 16: Size.SMALL,\n 24: Size.LARGE,\n // medium is no longer exists, so we map it to small\n [String(Size.MEDIUM)]: Size.SMALL,\n};\n\n// Note: Badge component is not deprecated, we want stop it's direct usage on consumer side.\n// Deprecation notice will hint consumers to migrate. Eventually the component will become internal.\n/**\n * @deprecated Use `<AvatarView badge={..} />` instead.\n */\nconst Badge = ({\n badge,\n className = undefined,\n size: sizeProp = Size.SMALL,\n border = Theme.LIGHT,\n 'aria-label': ariaLabel,\n children,\n style,\n}: BadgeProps) => {\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n const classes: string = clsx(\n 'tw-badge',\n {\n [`tw-badge-border-${border}`]: border,\n [`tw-badge-${size}`]: size,\n },\n className,\n );\n\n return (\n <div aria-label={ariaLabel} className={classes} style={style}>\n <div className=\"tw-badge__children\">{children}</div>\n <div className=\"tw-badge__content\">{badge}</div>\n </div>\n );\n};\n\nexport default Badge;\n"],"names":["mapLegacySize","Size","SMALL","LARGE","String","MEDIUM","Badge","badge","className","undefined","size","sizeProp","border","Theme","LIGHT","ariaLabel","children","style","classes","clsx","_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAMA,aAAa,GAAG;EACpB,EAAE,EAAEC,IAAI,CAACC,KAAK;EACd,EAAE,EAAED,IAAI,CAACE,KAAK;AACd;EACA,CAACC,MAAM,CAACH,IAAI,CAACI,MAAM,CAAC,GAAGJ,IAAI,CAACC,KAAAA;CAC7B,CAAA;AAED;AACA;AACA;;AAEG;AACGI,MAAAA,KAAK,GAAGA,CAAC;EACbC,KAAK;AACLC,EAAAA,SAAS,GAAGC,SAAS;AACrBC,EAAAA,IAAI,EAAEC,QAAQ,GAAGV,IAAI,CAACC,KAAK;EAC3BU,MAAM,GAAGC,KAAK,CAACC,KAAK;AACpB,EAAA,YAAY,EAAEC,SAAS;EACvBC,QAAQ;AACRC,EAAAA,KAAAA;AAAK,CACM,KAAI;AACf,EAAA,MAAMP,IAAI,GAAGV,aAAa,CAACW,QAAQ,CAAC,IAAIA,QAAQ,CAAA;AAChD,EAAA,MAAMO,OAAO,GAAWC,IAAI,CAC1B,UAAU,EACV;AACE,IAAA,CAAC,CAAmBP,gBAAAA,EAAAA,MAAM,CAAE,CAAA,GAAGA,MAAM;IACrC,CAAC,CAAA,SAAA,EAAYF,IAAI,CAAA,CAAE,GAAGA,IAAAA;GACvB,EACDF,SAAS,CACV,CAAA;AAED,EAAA,oBACEY,IAAA,CAAA,KAAA,EAAA;AAAK,IAAA,YAAA,EAAYL,SAAU;AAACP,IAAAA,SAAS,EAAEU,OAAQ;AAACD,IAAAA,KAAK,EAAEA,KAAM;AAAAD,IAAAA,QAAA,gBAC3DK,GAAA,CAAA,KAAA,EAAA;AAAKb,MAAAA,SAAS,EAAC,oBAAoB;AAAAQ,MAAAA,QAAA,EAAEA,QAAAA;KAAc,CACnD,eAAAK,GAAA,CAAA,KAAA,EAAA;AAAKb,MAAAA,SAAS,EAAC,mBAAmB;AAAAQ,MAAAA,QAAA,EAAET,KAAAA;AAAK,KAAM,CACjD,CAAA;AAAA,GAAK,CAAC,CAAA;AAEV;;;;"}
|
|
1
|
+
{"version":3,"file":"Badge.mjs","sources":["../../src/badge/Badge.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ReactNode } from 'react';\n\nimport {\n Size,\n Theme,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n ThemeDark,\n ThemeLight,\n CommonProps,\n} from '../common';\nimport type { BadgeAssetsProps } from '.';\n\n/**\n * @deprecated Use `16` or `24` instead.\n */\ntype DeprecatedSizes = SizeSmall | SizeMedium | SizeLarge;\n\n/**\n * @deprecated `Badge` is deprecated please use `<AvatarView badge={..} />` instead\n */\nexport type BadgeProps = {\n badge: ReactNode;\n children: ReactNode;\n /**\n * `md` is deprecated, it will fallback to `sm` instead.\n */\n size?: DeprecatedSizes | BadgeAssetsProps['size'];\n border?: ThemeDark | ThemeLight;\n 'aria-label'?: string;\n style?: React.CSSProperties;\n} & CommonProps;\n\nconst mapLegacySize = {\n 16: Size.SMALL,\n 24: Size.LARGE,\n // medium is no longer exists, so we map it to small\n [String(Size.MEDIUM)]: Size.SMALL,\n};\n\n// Note: Badge component is not deprecated, we want stop it's direct usage on consumer side.\n// Deprecation notice will hint consumers to migrate. Eventually the component will become internal.\n/**\n * @deprecated Use `<AvatarView badge={..} />` instead.\n */\nconst Badge = ({\n badge,\n className = undefined,\n size: sizeProp = Size.SMALL,\n border = Theme.LIGHT,\n 'aria-label': ariaLabel,\n children,\n style,\n}: BadgeProps) => {\n const size = mapLegacySize[sizeProp] ?? sizeProp;\n const classes: string = clsx(\n 'tw-badge',\n {\n [`tw-badge-border-${border}`]: border,\n [`tw-badge-${size}`]: size,\n },\n className,\n );\n\n return (\n <div aria-label={ariaLabel} className={classes} style={style}>\n <div className=\"tw-badge__children\">{children}</div>\n <div className=\"tw-badge__content\">{badge}</div>\n </div>\n );\n};\n\nexport default Badge;\n"],"names":["mapLegacySize","Size","SMALL","LARGE","String","MEDIUM","Badge","badge","className","undefined","size","sizeProp","border","Theme","LIGHT","ariaLabel","children","style","classes","clsx","_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,MAAMA,aAAa,GAAG;EACpB,EAAE,EAAEC,IAAI,CAACC,KAAK;EACd,EAA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ports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var icons = require('@transferwise/icons');
|
|
4
6
|
var art = require('@wise/art');
|
|
7
|
+
var StatusIcon = require('../statusIcon/StatusIcon.js');
|
|
5
8
|
var Circle = require('../common/circle/Circle.js');
|
|
6
9
|
var Image = require('../image/Image.js');
|
|
7
|
-
var icons = require('@transferwise/icons');
|
|
8
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
11
|
|
|
10
12
|
function BadgeAssets({
|
|
@@ -16,13 +18,13 @@ function BadgeAssets({
|
|
|
16
18
|
size
|
|
17
19
|
}) {
|
|
18
20
|
if (status) {
|
|
19
|
-
return /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
21
|
+
return /*#__PURE__*/jsxRuntime.jsx(StatusIcon.default, {
|
|
20
22
|
sentiment: status,
|
|
21
23
|
size: size
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
26
|
if (flagCode) {
|
|
25
|
-
return /*#__PURE__*/jsxRuntime.jsx(Circle, {
|
|
27
|
+
return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
|
|
26
28
|
size: size,
|
|
27
29
|
fixedSize: true,
|
|
28
30
|
enableBorder: true,
|
|
@@ -33,7 +35,7 @@ function BadgeAssets({
|
|
|
33
35
|
});
|
|
34
36
|
}
|
|
35
37
|
if (imgSrc) {
|
|
36
|
-
return /*#__PURE__*/jsxRuntime.jsx(Circle, {
|
|
38
|
+
return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
|
|
37
39
|
size: size,
|
|
38
40
|
fixedSize: true,
|
|
39
41
|
enableBorder: true,
|
|
@@ -44,7 +46,7 @@ function BadgeAssets({
|
|
|
44
46
|
});
|
|
45
47
|
}
|
|
46
48
|
if (['action', 'reference'].includes(type)) {
|
|
47
|
-
return /*#__PURE__*/jsxRuntime.jsx(Circle, {
|
|
49
|
+
return /*#__PURE__*/jsxRuntime.jsx(Circle.default, {
|
|
48
50
|
size: size,
|
|
49
51
|
fixedSize: true,
|
|
50
52
|
style: {
|
|
@@ -56,5 +58,5 @@ function BadgeAssets({
|
|
|
56
58
|
return null;
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
|
|
61
|
+
exports.default = BadgeAssets;
|
|
60
62
|
//# sourceMappingURL=BadgeAssets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeAssets.js","sources":["../../src/badge/BadgeAssets.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"BadgeAssets.js","sources":["../../src/badge/BadgeAssets.tsx"],"sourcesContent":["import { Plus } from '@transferwise/icons';\nimport { Flag } from '@wise/art';\nimport StatusIcon, { StatusIconProps } from '../statusIcon';\nimport Circle from '../common/circle';\nimport Image from '../image';\n\nexport type Props = {\n status?: StatusIconProps['sentiment'];\n flagCode?: string;\n imgSrc?: string;\n icon?: React.ReactNode;\n type?: 'action' | 'reference';\n size?: 16 | 24;\n};\n\n/**\n * Common pre-built badge variants.\n */\nexport default function BadgeAssets({\n status,\n flagCode,\n imgSrc,\n icon = null,\n type = 'action',\n size,\n}: Props) {\n if (status) {\n return <StatusIcon sentiment={status} size={size} />;\n }\n if (flagCode) {\n return (\n <Circle size={size} fixedSize enableBorder>\n <Flag code={flagCode} intrinsicSize={size} />\n </Circle>\n );\n }\n if (imgSrc) {\n return (\n <Circle size={size} fixedSize enableBorder>\n <Image src={imgSrc} alt=\"\" />\n </Circle>\n );\n }\n if (['action', 'reference'].includes(type)) {\n return (\n <Circle\n size={size}\n fixedSize\n style={{\n backgroundColor:\n type === 'action'\n ? 'var(--color-interactive-accent)'\n : 'var(--color-background-neutral)',\n }}\n >\n {icon ?? <Plus />}\n </Circle>\n );\n }\n return null;\n}\n"],"names":["BadgeAssets","status","flagCode","imgSrc","icon","type","size","_jsx","StatusIcon","sentiment","Circle","fixedSize","enableBorder","children","Flag","code","intrinsicSize","Image","src","alt","includes","style","backgroundColor","Plus"],"mappings":";;;;;;;;;;;AAkBwB,SAAAA,W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A,EAEDT,IAAI,iBAAIG,cAAA,CAACgB,UAAI;AAAG,KACX,CAAC,CAAA;AAEb,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Plus } from '@transferwise/icons';
|
|
2
2
|
import { Flag } from '@wise/art';
|
|
3
|
+
import StatusIcon from '../statusIcon/StatusIcon.mjs';
|
|
3
4
|
import Circle from '../common/circle/Circle.mjs';
|
|
4
5
|
import Image from '../image/Image.mjs';
|
|
5
|
-
import { Plus } from '@transferwise/icons';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
function BadgeAssets({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeAssets.mjs","sources":["../../src/badge/BadgeAssets.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"BadgeAssets.mjs","sources":["../../src/badge/BadgeAssets.tsx"],"sourcesContent":["import { Plus } from '@transferwise/icons';\nimport { Flag } from '@wise/art';\nimport StatusIcon, { StatusIconProps } from '../statusIcon';\nimport Circle from '../common/circle';\nimport Image from '../image';\n\nexport type Props = {\n status?: StatusIconProps['sentiment'];\n flagCode?: string;\n imgSrc?: string;\n icon?: React.ReactNode;\n type?: 'action' | 'reference';\n size?: 16 | 24;\n};\n\n/**\n * Common pre-built badge variants.\n */\nexport default function BadgeAssets({\n status,\n flagCode,\n imgSrc,\n icon = null,\n type = 'action',\n size,\n}: Props) {\n if (status) {\n return <StatusIcon sentiment={status} size={size} />;\n }\n if (flagCode) {\n return (\n <Circle size={size} fixedSize enableBorder>\n <Flag code={flagCode} intrinsicSize={size} />\n </Circle>\n );\n }\n if (imgSrc) {\n return (\n <Circle size={size} fixedSize enableBorder>\n <Image src={imgSrc} alt=\"\" />\n </Circle>\n );\n }\n if (['action', 'reference'].includes(type)) {\n return (\n <Circle\n size={size}\n fixedSize\n style={{\n backgroundColor:\n type === 'action'\n ? 'var(--color-interactive-accent)'\n : 'var(--color-background-neutral)',\n }}\n >\n {icon ?? <Plus />}\n </Circle>\n );\n }\n return null;\n}\n"],"names":["BadgeAssets","status","flagCode","imgSrc","icon","type","size","_jsx","StatusIcon","sentiment","Circle","fixedSize","enableBorder","children","Flag","code","intrinsicSize","Image","src","alt","includes","style","backgroundColor","Plus"],"mappings":";;;;;;;AAkBwB,SAAAA,WAAWA,CAAC;EAClCC,MAAM;EACNC,QAAQ;EACRC,MAAM;AACNC,EAAAA,IAAI,GAAG,IAAI;AACXC,EAAAA,IAAI,GAAG,QAAQ;AACfC,EAAAA,IAAAA;AACM,CAAA,EAAA;AACN,EAAA,IAAIL,MAAM,EAAE;IACV,oBAAOM,GAAA,CAACC,UAAU,EAAA;AAACC,MAAAA,SAAS,EAAER,MAAO;AAACK,MAAAA,IAAI,EAAEA,IAAAA;AAAK,MAAG,CAAA;AACtD,GAAA;AACA,EAAA,IAAIJ,QAAQ,EAAE;IACZ,oBACEK,GAAA,CAACG,MAAM,EAAA;AAACJ,MAAAA,IAAI,EAAEA,IAAK;MAACK,SAAS,EAAA,IAAA;MAACC,YAAY,EAAA,IAAA;MAAAC,QAAA,eACxCN,GAAA,CAACO,IAAI,EAAA;AAACC,QAAAA,IAAI,EAAEb,QAAS;AAACc,QAAAA,aAAa,EAAEV,IAAAA;OACvC,CAAA;AAAA,KAAQ,CAAC,CAAA;AAEb,GAAA;AACA,EAAA,IAAIH,MAAM,EAAE;IACV,oBACEI,GAAA,CAACG,MAAM,EAAA;AAACJ,MAAAA,IAAI,EAAEA,IAAK;MAACK,SAAS,EAAA,IAAA;MAACC,YAAY,EAAA,IAAA;MAAAC,QAAA,eACxCN,GAAA,CAACU,KAAK,EAAA;AAACC,QAAAA,GAAG,EAAEf,MAAO;AAACgB,QAAAA,GAAG,EAAC,EAAA;OAC1B,CAAA;AAAA,KAAQ,CAAC,CAAA;AAEb,GAAA;EACA,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAACC,QAAQ,CAACf,IAAI,CAAC,EAAE;IAC1C,oBACEE,GAAA,CAACG,MAAM,EAAA;AACLJ,MAAAA,IAAI,EAAEA,IAAK;MACXK,SAAS,EAAA,IAAA;AACTU,MAAAA,KAAK,EAAE;AACLC,QAAAA,eAAe,EACbjB,IAAI,KAAK,QAAQ,GACb,iCAAiC,GACjC,iCAAA;OACN;AAAAQ,MAAAA,QAAA,EAEDT,IAAI,iBAAIG,GAAA,CAACgB,IAAI;AAAG,KACX,CAAC,CAAA;AAEb,GAAA;AACA,EAAA,OAAO,IAAI,CAAA;AACb;;;;"}
|
package/build/body/Body.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
|
var React = require('react');
|
|
5
7
|
var typography = require('../common/propsValues/typography.js');
|
|
@@ -23,5 +25,5 @@ const Body = /*#__PURE__*/React.forwardRef(function Body({
|
|
|
23
25
|
});
|
|
24
26
|
});
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
exports.default = Body;
|
|
27
29
|
//# sourceMappingURL=Body.js.map
|
package/build/body/Body.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body.js","sources":["../../src/body/Body.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef, HTMLAttributes } from 'react';\n\nimport { Typography, BodyTypes } from '../common/propsValues/typography';\n\nconst DEFAULT_TYPE = Typography.BODY_DEFAULT;\n\nconst bodyTypes = new Set<BodyTypes>([\n Typography.BODY_DEFAULT,\n Typography.BODY_DEFAULT_BOLD,\n Typography.BODY_LARGE,\n Typography.BODY_LARGE_BOLD,\n]);\n\ntype Props = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> & {\n /**\n * Default value: {@link DEFAULT_TYPE}\n */\n type?: BodyTypes;\n /**\n * Default value: `div`\n */\n as?: 'span' | 'p' | 'div';\n};\n\nconst Body = forwardRef(function Body(\n { as: Element = 'div', type = DEFAULT_TYPE, className, ...props }: Props,\n reference: React.ForwardedRef<\n | {\n [key in typeof Element]: React.ElementRef<key>;\n }[typeof Element]\n | null\n >,\n) {\n const isTypeSupported = bodyTypes.has(type);\n return (\n <Element\n {...props}\n // @ts-expect-error TODO: Remove when component could be rewritten with generics\n // See: https://fettblog.eu/typescript-react-generic-forward-refs/\n ref={reference}\n className={clsx(`np-text-${isTypeSupported ? type : DEFAULT_TYPE}`, className)}\n />\n );\n});\n\nexport default Body;\n"],"names":["DEFAULT_TYPE","Typography","BODY_DEFAULT","bodyTypes","Set","BODY_DEFAULT_BOLD","BODY_LARGE","BODY_LARGE_BOLD","Body","forwardRef","as","Element","type","className","props","reference","isTypeSupported","has","_jsx","ref","clsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Body.js","sources":["../../src/body/Body.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef, HTMLAttributes } from 'react';\n\nimport { Typography, BodyTypes } from '../common/propsValues/typography';\n\nconst DEFAULT_TYPE = Typography.BODY_DEFAULT;\n\nconst bodyTypes = new Set<BodyTypes>([\n Typography.BODY_DEFAULT,\n Typography.BODY_DEFAULT_BOLD,\n Typography.BODY_LARGE,\n Typography.BODY_LARGE_BOLD,\n]);\n\ntype Props = HTMLAttributes<HTMLSpanElement | HTMLParagraphElement> & {\n /**\n * Default value: {@link DEFAULT_TYPE}\n */\n type?: BodyTypes;\n /**\n * Default value: `div`\n */\n as?: 'span' | 'p' | 'div';\n};\n\nconst Body = forwardRef(function Body(\n { as: Element = 'div', type = DEFAULT_TYPE, className, ...props }: Props,\n reference: React.ForwardedRef<\n | {\n [key in typeof Element]: React.ElementRef<key>;\n }[typeof Element]\n | null\n >,\n) {\n const isTypeSupported = bodyTypes.has(type);\n return (\n <Element\n {...props}\n // @ts-expect-error TODO: Remove when component could be rewritten with generics\n // See: https://fettblog.eu/typescript-react-generic-forward-refs/\n ref={reference}\n className={clsx(`np-text-${isTypeSupported ? type : DEFAULT_TYPE}`, className)}\n />\n );\n});\n\nexport default Body;\n"],"names":["DEFAULT_TYPE","Typography","BODY_DEFAULT","bodyTypes","Set","BODY_DEFAULT_BOLD","BODY_LARGE","BODY_LARGE_BOLD","Body","forwardRef","as","Element","type","className","props","reference","isTypeSupported","has","_jsx","ref","clsx"],"mappings":";;;;;;;;;AAKA,MAAMA,YAAY,GAAGC,qBAAU,CAACC,YAAY,CAAA;AAE5C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAY,CACnCH,qBAAU,CAACC,YAAY,EACvBD,qBAAU,CAACI,iBAAiB,EAC5BJ,qBAAU,CAACK,UAAU,EACrBL,qBAAU,CAACM,eAAe,CAC3B,CAAC,CAAA;AAaF,MAAMC,IAAI,gBAAGC,gBAAU,CAAC,SAASD,IAAIA,CACnC;EAAEE,EAAE,EAAEC,OAAO,GAAG,KAAK;AAAEC,EAAAA,IAAI,GAAGZ,YAAY;EAAEa,SAAS;EAAE,GAAGC,KAAAA;AAAc,CAAA,EACxEC,SAKC,EAAA;AAED,EAAA,MAAMC,eAAe,GAAGb,SAAS,CAACc,GAAG,CAACL,IAAI,CAAC,CAAA;EAC3C,oBACEM,cAAA,CAACP,OAAO,EAAA;AAAA,IAAA,GACFG,KAAK;AACT;AACA;AACAK,IAAAA,GAAG,EAAEJ,SAAU;IACfF,SAAS,EAAEO,SAAI,CAAC,CAAWJ,QAAAA,EAAAA,eAAe,GAAGJ,IAAI,GAAGZ,YAAY,CAAE,CAAA,EAAEa,SAAS,CAAA;AAAE,GAC/E,CAAA,CAAA;AAEN,CAAC;;;;"}
|
package/build/button/Button.js
CHANGED
|
@@ -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 PrimitiveButton = require('../primitives/PrimitiveButton/PrimitiveButton.js');
|
|
5
7
|
var PrimitiveAnchor = require('../primitives/PrimitiveAnchor/PrimitiveAnchor.js');
|
|
@@ -63,11 +65,11 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
63
65
|
const contentClassNames = clsx.clsx('wds-Button-content', {
|
|
64
66
|
[`wds-Button-content--loading`]: loading
|
|
65
67
|
});
|
|
66
|
-
const content = /*#__PURE__*/jsxRuntime.jsxs(Body, {
|
|
68
|
+
const content = /*#__PURE__*/jsxRuntime.jsxs(Body.default, {
|
|
67
69
|
as: "span",
|
|
68
70
|
type: size === 'sm' ? typography.Typography.BODY_DEFAULT_BOLD : typography.Typography.BODY_LARGE_BOLD,
|
|
69
71
|
className: contentClassNames,
|
|
70
|
-
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator, {
|
|
72
|
+
children: [loading && /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator.default, {
|
|
71
73
|
size: size === 'sm' ? 'xxs' : 'xs',
|
|
72
74
|
className: "wds-Button-loader",
|
|
73
75
|
"data-testid": "button-loader-indicator"
|
|
@@ -80,7 +82,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
80
82
|
}) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
81
83
|
children: [size === 'md' && addonStart?.type === 'avatar' && addonStart.value && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
82
84
|
className: "wds-Button-avatars",
|
|
83
|
-
children: /*#__PURE__*/jsxRuntime.jsx(AvatarLayout, {
|
|
85
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AvatarLayout.default, {
|
|
84
86
|
orientation: "horizontal",
|
|
85
87
|
avatars: addonStart?.value,
|
|
86
88
|
size: 24
|
|
@@ -99,7 +101,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
99
101
|
})]
|
|
100
102
|
});
|
|
101
103
|
if (href && as !== 'button' || as === 'a') {
|
|
102
|
-
return /*#__PURE__*/jsxRuntime.jsx(PrimitiveAnchor, {
|
|
104
|
+
return /*#__PURE__*/jsxRuntime.jsx(PrimitiveAnchor.default, {
|
|
103
105
|
ref: ref,
|
|
104
106
|
...props,
|
|
105
107
|
href: href,
|
|
@@ -110,7 +112,7 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
110
112
|
children: content
|
|
111
113
|
});
|
|
112
114
|
}
|
|
113
|
-
return /*#__PURE__*/jsxRuntime.jsx(PrimitiveButton, {
|
|
115
|
+
return /*#__PURE__*/jsxRuntime.jsx(PrimitiveButton.default, {
|
|
114
116
|
ref: ref,
|
|
115
117
|
...props,
|
|
116
118
|
className: classNames,
|
|
@@ -123,5 +125,5 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
123
125
|
});
|
|
124
126
|
});
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
exports.default = Button;
|
|
127
129
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../src/button/Button.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport { forwardRef } from 'react';\nimport { ButtonReferenceType, ButtonProps as NewButtonProps } from './Button.types';\nimport { PrimitiveAnchor, PrimitiveButton } from '../primitives';\nimport AvatarLayout from '../avatarLayout';\nimport ProcessIndicator from '../processIndicator';\nimport { clsx } from 'clsx';\nimport { Typography } from '../common';\nimport Body from '../body';\nimport type { CommonProps, LegacyButtonProps, ButtonProps } from './LegacyButton';\n\nconst Button = forwardRef<ButtonReferenceType, NewButtonProps>(\n (\n {\n as,\n children,\n className,\n size = 'lg',\n href,\n disabled = false,\n priority = 'primary',\n sentiment = 'default',\n addonStart,\n addonEnd,\n // @ts-expect-error NewButtonProps has `type` prop\n type = 'button',\n loading = false,\n block = false,\n v2,\n ...props\n },\n ref,\n ) => {\n const classNames = clsx(\n 'wds-Button',\n {\n [`wds-Button--block`]: block,\n [`wds-Button--disabled`]: disabled,\n [`wds-Button--loading`]: loading,\n },\n `wds-Button--${{ sm: 'small', md: 'medium', lg: 'large' }[size]}`,\n `wds-Button--${priority}`,\n `wds-Button--${sentiment}`,\n className,\n );\n\n const contentClassNames = clsx('wds-Button-content', {\n [`wds-Button-content--loading`]: loading,\n });\n\n const content = (\n <Body\n as=\"span\"\n type={size === 'sm' ? Typography.BODY_DEFAULT_BOLD : Typography.BODY_LARGE_BOLD}\n className={contentClassNames}\n >\n {loading && (\n <ProcessIndicator\n size={size === 'sm' ? 'xxs' : 'xs'}\n className=\"wds-Button-loader\"\n data-testid=\"button-loader-indicator\"\n />\n )}\n <span className=\"wds-Button-label\" aria-hidden={loading}>\n {size === 'lg' ? (\n <span className=\"wds-Button-labelText\">{children}</span>\n ) : (\n <>\n {size === 'md' && addonStart?.type === 'avatar' && addonStart.value && (\n <span className=\"wds-Button-avatars\">\n <AvatarLayout orientation=\"horizontal\" avatars={addonStart?.value} size={24} />\n </span>\n )}\n\n {addonStart?.type === 'icon' && addonStart.value && (\n <span className={`wds-Button-icon wds-Button-icon--${size} wds-Button-icon--start`}>\n {addonStart.value}\n </span>\n )}\n\n <span className=\"wds-Button-labelText\">{children}</span>\n\n {addonEnd?.type === 'icon' && addonEnd?.value && (\n <span className={`wds-Button-icon wds-Button-icon--${size} wds-Button-icon--end`}>\n {addonEnd.value}\n </span>\n )}\n </>\n )}\n </span>\n </Body>\n );\n\n if ((href && as !== 'button') || as === 'a') {\n return (\n <PrimitiveAnchor\n ref={ref as React.Ref<HTMLAnchorElement>}\n {...(props as any)}\n href={href}\n className={classNames}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n type={undefined}\n >\n {content}\n </PrimitiveAnchor>\n );\n }\n\n return (\n <PrimitiveButton\n ref={ref as React.Ref<HTMLButtonElement>}\n {...(props as any)}\n className={classNames}\n disabled={disabled}\n loading={loading}\n type={type}\n href={undefined}\n target={undefined}\n >\n {content}\n </PrimitiveButton>\n );\n },\n);\n\nexport default Button;\n\n// re-export APIs for backwards compatibility with legacy Button interface\n// delete this when migration to new Button is done (or aleast no more deep imports, use following query)\n// https://github.com/search?q=org%3Atransferwise+%2Fbuild%5C%2Ftypes%5C%2Fbutton%2F+-is%3Aarchived&type=code\nexport { CommonProps, LegacyButtonProps as Props, ButtonProps };\n"],"names":["Button","forwardRef","as","children","className","size","href","disabled","priority","sentiment","addonStart","addonEnd","type","loading","block","v2","props","ref","classNames","clsx","sm","md","lg","contentClassNames","content","_jsxs","Body","Typography","BODY_DEFAULT_BOLD","BODY_LARGE_BOLD","_jsx","ProcessIndicator","_Fragment","value","AvatarLayout","orientation","avatars","PrimitiveAnchor","undefined","PrimitiveButton","target"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/button/Button.tsx"],"sourcesContent":["/* eslint-disable react/display-name */\n/* eslint-disable @typescript-eslint/no-unsafe-assignment */\nimport { forwardRef } from 'react';\nimport { ButtonReferenceType, ButtonProps as NewButtonProps } from './Button.types';\nimport { PrimitiveAnchor, PrimitiveButton } from '../primitives';\nimport AvatarLayout from '../avatarLayout';\nimport ProcessIndicator from '../processIndicator';\nimport { clsx } from 'clsx';\nimport { Typography } from '../common';\nimport Body from '../body';\nimport type { CommonProps, LegacyButtonProps, ButtonProps } from './LegacyButton';\n\nconst Button = forwardRef<ButtonReferenceType, NewButtonProps>(\n (\n {\n as,\n children,\n className,\n size = 'lg',\n href,\n disabled = false,\n priority = 'primary',\n sentiment = 'default',\n addonStart,\n addonEnd,\n // @ts-expect-error NewButtonProps has `type` prop\n type = 'button',\n loading = false,\n block = false,\n v2,\n ...props\n },\n ref,\n ) => {\n const classNames = clsx(\n 'wds-Button',\n {\n [`wds-Button--block`]: block,\n [`wds-Button--disabled`]: disabled,\n [`wds-Button--loading`]: loading,\n },\n `wds-Button--${{ sm: 'small', md: 'medium', lg: 'large' }[size]}`,\n `wds-Button--${priority}`,\n `wds-Button--${sentiment}`,\n className,\n );\n\n const contentClassNames = clsx('wds-Button-content', {\n [`wds-Button-content--loading`]: loading,\n });\n\n const content = (\n <Body\n as=\"span\"\n type={size === 'sm' ? Typography.BODY_DEFAULT_BOLD : Typography.BODY_LARGE_BOLD}\n className={contentClassNames}\n >\n {loading && (\n <ProcessIndicator\n size={size === 'sm' ? 'xxs' : 'xs'}\n className=\"wds-Button-loader\"\n data-testid=\"button-loader-indicator\"\n />\n )}\n <span className=\"wds-Button-label\" aria-hidden={loading}>\n {size === 'lg' ? (\n <span className=\"wds-Button-labelText\">{children}</span>\n ) : (\n <>\n {size === 'md' && addonStart?.type === 'avatar' && addonStart.value && (\n <span className=\"wds-Button-avatars\">\n <AvatarLayout orientation=\"horizontal\" avatars={addonStart?.value} size={24} />\n </span>\n )}\n\n {addonStart?.type === 'icon' && addonStart.value && (\n <span className={`wds-Button-icon wds-Button-icon--${size} wds-Button-icon--start`}>\n {addonStart.value}\n </span>\n )}\n\n <span className=\"wds-Button-labelText\">{children}</span>\n\n {addonEnd?.type === 'icon' && addonEnd?.value && (\n <span className={`wds-Button-icon wds-Button-icon--${size} wds-Button-icon--end`}>\n {addonEnd.value}\n </span>\n )}\n </>\n )}\n </span>\n </Body>\n );\n\n if ((href && as !== 'button') || as === 'a') {\n return (\n <PrimitiveAnchor\n ref={ref as React.Ref<HTMLAnchorElement>}\n {...(props as any)}\n href={href}\n className={classNames}\n disabled={disabled || loading}\n aria-busy={loading || undefined}\n type={undefined}\n >\n {content}\n </PrimitiveAnchor>\n );\n }\n\n return (\n <PrimitiveButton\n ref={ref as React.Ref<HTMLButtonElement>}\n {...(props as any)}\n className={classNames}\n disabled={disabled}\n loading={loading}\n type={type}\n href={undefined}\n target={undefined}\n >\n {content}\n </PrimitiveButton>\n );\n },\n);\n\nexport default Button;\n\n// re-export APIs for backwards compatibility with legacy Button interface\n// delete this when migration to new Button is done (or aleast no more deep imports, use following query)\n// https://github.com/search?q=org%3Atransferwise+%2Fbuild%5C%2Ftypes%5C%2Fbutton%2F+-is%3Aarchived&type=code\nexport { CommonProps, LegacyButtonProps as Props, ButtonProps };\n"],"names":["Button","forwardRef","as","children","className","size","href","disabled","priority","sentiment","addonStart","addonEnd","type","loading","block","v2","props","ref","classNames","clsx","sm","md","lg","contentClassNames","content","_jsxs","Body","Typography","BODY_DEFAULT_BOLD","BODY_LARGE_BOLD","_jsx","ProcessIndicator","_Fragment","value","AvatarLayout","orientation","avatars","PrimitiveAnchor","undefined","PrimitiveButton","target"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAWA,MAAMA,MAAM,gBAAGC,gBAAU,CACvB,CACE;EACEC,EAAE;EACFC,QAAQ;EACRC,SAAS;AACTC,EAAAA,IAAI,GAAG,IAAI;EACXC,IAAI;AACJC,EAAAA,QAAQ,GAAG,KAAK;AAChBC,EAAAA,QAAQ,GAAG,SAAS;AACpBC,EAAAA,SAAS,GAAG,SAAS;EACrBC,UAAU;EACVC,QAAQ;AACR;AACAC,EAAAA,IAAI,GAAG,QAAQ;AACfC,EAAAA,OAAO,GAAG,KAAK;AACfC,EAAAA,KAAK,GAAG,KAAK;EACbC,EAAE;EACF,GAAGC,KAAAA;CACJ,EACDC,GAAG,KACD;AACF,EAAA,MAAMC,UAAU,GAAGC,SAAI,CACrB,YAAY,EACZ;IACE,CAAC,CAAA,iBAAA,CAAmB,GAAGL,KAAK;IAC5B,CAAC,CAAA,oBAAA,CAAsB,GAAGP,QAAQ;AAClC,IAAA,CAAC,qBAAqB,GAAGM,OAAAA;AAC1B,GAAA,EACD,CAAe,YAAA,EAAA;AAAEO,IAAAA,EAAE,EAAE,OAAO;AAAEC,IAAAA,EAAE,EAAE,QAAQ;AAAEC,IAAAA,EAAE,EAAE,OAAA;AAAO,GAAE,CAACjB,IAAI,CAAC,CAAA,CAAE,EACjE,CAAeG,YAAAA,EAAAA,QAAQ,CAAE,CAAA,EACzB,CAAeC,YAAAA,EAAAA,SAAS,CAAE,CAAA,EAC1BL,SAAS,CACV,CAAA;AAED,EAAA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Q,EAAEA,QAAS;AACnBM,IAAAA,OAAO,EAAEA,OAAQ;AACjBD,IAAAA,IAAI,EAAEA,IAAK;AACXN,IAAAA,IAAI,EAAEgC,SAAU;AAChBE,IAAAA,MAAM,EAAEF,SAAU;AAAAnC,IAAAA,QAAA,EAEjBqB,OAAAA;AAAO,GACO,CAAC,CAAA;AAEtB,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 LegacyButton = require('./LegacyButton.js');
|
|
5
7
|
var Button$1 = require('./Button.js');
|
|
@@ -58,17 +60,17 @@ const Button = /*#__PURE__*/React.forwardRef(({
|
|
|
58
60
|
}, ref) => {
|
|
59
61
|
if (v2) {
|
|
60
62
|
const mappedProps = mapProps(props);
|
|
61
|
-
return /*#__PURE__*/jsxRuntime.jsx(Button$1, {
|
|
63
|
+
return /*#__PURE__*/jsxRuntime.jsx(Button$1.default, {
|
|
62
64
|
...mappedProps,
|
|
63
65
|
ref: ref
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
|
-
return /*#__PURE__*/jsxRuntime.jsx(LegacyButton, {
|
|
68
|
+
return /*#__PURE__*/jsxRuntime.jsx(LegacyButton.default, {
|
|
67
69
|
...props,
|
|
68
70
|
ref: ref
|
|
69
71
|
});
|
|
70
72
|
});
|
|
71
73
|
Button.displayName = 'Button';
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
exports.default = Button;
|
|
74
76
|
//# sourceMappingURL=Button.resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.resolver.js","sources":["../../src/button/Button.resolver.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport LegacyButton, { LegacyButtonProps } from './LegacyButton';\nimport { ButtonReferenceType, ButtonProps as NewButtonProps } from './Button.types';\nimport NewButton from './Button';\n\nexport type ButtonProps = LegacyButtonProps | NewButtonProps;\n\nconst mapProps = (props: LegacyButtonProps): NewButtonProps => {\n const { priority, size, type, ...newProps } = props;\n\n const priorityMapping: Record<string, Record<string, NewButtonProps['priority']>> = {\n accent: {\n primary: 'primary',\n secondary: 'secondary-neutral',\n tertiary: 'tertiary',\n },\n positive: {\n primary: 'primary',\n secondary: 'secondary-neutral',\n tertiary: 'secondary-neutral',\n },\n negative: {\n primary: 'primary',\n secondary: 'secondary',\n tertiary: 'secondary',\n },\n };\n\n const mappedPriority =\n type && priority ? priorityMapping[type]?.[priority] || priority : priority || undefined;\n const mappedSentiment = type === 'negative' ? 'negative' : undefined;\n\n const legacyButtonTypes: LegacyButtonProps['type'][] = [\n 'accent',\n 'negative',\n 'positive',\n 'primary',\n 'pay',\n 'secondary',\n 'danger',\n 'link',\n ];\n\n const resolveSize = () => {\n if (size) {\n return { xs: 'sm', sm: 'sm', md: 'md', lg: 'lg' }[size] || size;\n }\n\n return size;\n };\n\n return {\n ...newProps,\n size: resolveSize(),\n priority: mappedPriority,\n sentiment: mappedSentiment || ('sentiment' in props ? props.sentiment : null),\n type: type && !legacyButtonTypes.includes(type) ? type : props.htmlType || null,\n v2: true,\n } as NewButtonProps;\n};\n\nconst Button = forwardRef<ButtonReferenceType, ButtonProps>(({ v2 = false, ...props }, ref) => {\n if (v2) {\n const mappedProps = mapProps(props as LegacyButtonProps);\n return <NewButton {...mappedProps} ref={ref} />;\n }\n\n return <LegacyButton {...(props as LegacyButtonProps)} ref={ref} />;\n});\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["mapProps","props","priority","size","type","newProps","priorityMapping","accent","primary","secondary","tertiary","positive","negative","mappedPriority","undefined","mappedSentiment","legacyButtonTypes","resolveSize","xs","sm","md","lg","sentiment","includes","htmlType","v2","Button","forwardRef","ref","mappedProps","_jsx","NewButton","LegacyButton","displayName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.resolver.js","sources":["../../src/button/Button.resolver.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport LegacyButton, { LegacyButtonProps } from './LegacyButton';\nimport { ButtonReferenceType, ButtonProps as NewButtonProps } from './Button.types';\nimport NewButton from './Button';\n\nexport type ButtonProps = LegacyButtonProps | NewButtonProps;\n\nconst mapProps = (props: LegacyButtonProps): NewButtonProps => {\n const { priority, size, type, ...newProps } = props;\n\n const priorityMapping: Record<string, Record<string, NewButtonProps['priority']>> = {\n accent: {\n primary: 'primary',\n secondary: 'secondary-neutral',\n tertiary: 'tertiary',\n },\n positive: {\n primary: 'primary',\n secondary: 'secondary-neutral',\n tertiary: 'secondary-neutral',\n },\n negative: {\n primary: 'primary',\n secondary: 'secondary',\n tertiary: 'secondary',\n },\n };\n\n const mappedPriority =\n type && priority ? priorityMapping[type]?.[priority] || priority : priority || undefined;\n const mappedSentiment = type === 'negative' ? 'negative' : undefined;\n\n const legacyButtonTypes: LegacyButtonProps['type'][] = [\n 'accent',\n 'negative',\n 'positive',\n 'primary',\n 'pay',\n 'secondary',\n 'danger',\n 'link',\n ];\n\n const resolveSize = () => {\n if (size) {\n return { xs: 'sm', sm: 'sm', md: 'md', lg: 'lg' }[size] || size;\n }\n\n return size;\n };\n\n return {\n ...newProps,\n size: resolveSize(),\n priority: mappedPriority,\n sentiment: mappedSentiment || ('sentiment' in props ? props.sentiment : null),\n type: type && !legacyButtonTypes.includes(type) ? type : props.htmlType || null,\n v2: true,\n } as NewButtonProps;\n};\n\nconst Button = forwardRef<ButtonReferenceType, ButtonProps>(({ v2 = false, ...props }, ref) => {\n if (v2) {\n const mappedProps = mapProps(props as LegacyButtonProps);\n return <NewButton {...mappedProps} ref={ref} />;\n }\n\n return <LegacyButton {...(props as LegacyButtonProps)} ref={ref} />;\n});\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["mapProps","props","priority","size","type","newProps","priorityMapping","accent","primary","secondary","tertiary","positive","negative","mappedPriority","undefined","mappedSentiment","legacyButtonTypes","resolveSize","xs","sm","md","lg","sentiment","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AE,IAAA;AAAI,OAAE,CAAClB,IAAI,CAAC,IAAIA,IAAI,CAAA;AACjE,KAAA;AAEA,IAAA,OAAOA,IAAI,CAAA;GACZ,CAAA;EAED,OAAO;AACL,IAAA,GAAGE,QAAQ;IACXF,IAAI,EAAEc,WAAW,EAAE;AACnBf,IAAAA,QAAQ,EAAEW,cAAc;AACxBS,IAAAA,SAAS,EAAEP,eAAe,KAAK,WAAW,IAAId,KAAK,GAAGA,KAAK,CAACqB,SAAS,GAAG,IAAI,CAAC;AAC7ElB,IAAAA,IAAI,EAAEA,IAAI,IAAI,CAACY,iBAAiB,CAACO,QAAQ,CAACnB,IAAI,CAAC,GAAGA,IAAI,GAAGH,KAAK,CAACuB,QAAQ,IAAI,IAAI;AAC/EC,IAAAA,EAAE,EAAE,IAAA;GACa,CAAA;AACrB,CAAC,CAAA;AAED,MAAMC,MAAM,gBAAGC,gBAAU,CAAmC,CAAC;AAAEF,EAAAA,EAAE,GAAG,KAAK;EAAE,GAAGxB,KAAAA;AAAK,CAAE,EAAE2B,GAAG,KAAI;AAC5F,EAAA,IAAIH,EAAE,EAAE;AACN,IAAA,MAAMI,WAAW,GAAG7B,QAAQ,CAACC,KAA0B,CAAC,CAAA;IACxD,oBAAO6B,cAAA,CAACC,gBAAS,EAAA;AAAA,MAAA,GAAKF,WAAW;AAAED,MAAAA,GAAG,EAAEA,GAAAA;AAAI,MAAG,CAAA;AACjD,GAAA;EAEA,oBAAOE,cAAA,CAACE,oBAAY,EAAA;AAAA,IAAA,GAAM/B,KAA2B;AAAE2B,IAAAA,GAAG,EAAEA,GAAAA;AAAI,IAAG,CAAA;AACrE,CAAC,EAAC;AAEFF,MAAM,CAACO,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -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
|
var React = require('react');
|
|
5
7
|
var reactIntl = require('react-intl');
|
|
@@ -99,8 +101,8 @@ const LegacyButton = /*#__PURE__*/React.forwardRef(({
|
|
|
99
101
|
...props,
|
|
100
102
|
"aria-live": loading ? 'polite' : 'off',
|
|
101
103
|
"aria-busy": loading,
|
|
102
|
-
"aria-label": loading ? intl.formatMessage(Button_messages.loadingAriaLabel) : rest['aria-label'],
|
|
103
|
-
children: [children, loading && /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator, {
|
|
104
|
+
"aria-label": loading ? intl.formatMessage(Button_messages.default.loadingAriaLabel) : rest['aria-label'],
|
|
105
|
+
children: [children, loading && /*#__PURE__*/jsxRuntime.jsx(ProcessIndicator.default, {
|
|
104
106
|
size: processIndicatorSize(),
|
|
105
107
|
className: "btn-loader",
|
|
106
108
|
"data-testid": "ButtonProgressIndicator"
|
|
@@ -108,5 +110,5 @@ const LegacyButton = /*#__PURE__*/React.forwardRef(({
|
|
|
108
110
|
});
|
|
109
111
|
});
|
|
110
112
|
|
|
111
|
-
|
|
113
|
+
exports.default = LegacyButton;
|
|
112
114
|
//# sourceMappingURL=LegacyButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyButton.js","sources":["../../src/button/LegacyButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, forwardRef, MouseEvent } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n ControlType,\n Priority,\n ControlTypeAccent,\n ControlTypeNegative,\n ControlTypePositive,\n PriorityPrimary,\n PrioritySecondary,\n PriorityTertiary,\n SizeExtraSmall,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n} from '../common';\nimport ProcessIndicator from '../processIndicator';\n\nimport messages from '../i18n/commonMessages/Button.messages';\nimport { typeClassMap, priorityClassMap } from './classMap';\nimport { establishNewPriority, establishNewType, logDeprecationNotices } from './legacyUtils';\nimport { ButtonReferenceType } from './Button.types';\n\n/** @deprecated */\ntype DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';\n\n/** @deprecated */\ntype DeprecatedSizes = SizeExtraSmall;\n\n/**\n * @deprecated use new button instead APIs\n * @example\n * ```\n * import { Button, ButtonProps } from '@transferwise/components';\n *\n * <Button v2>...</Button>\n * ```\n */\nexport type CommonProps = {\n v2?: false;\n\n /** Makes the button take up the full width of its container */\n block?: boolean;\n\n /**\n * The `target` attribute for HTML anchor.\n * If set to `_blank`, `rel=\"noopener noreferrer\"` is automatically added to the rendered node.\n */\n target?: string;\n /**\n * Toggles the disabled state\n * @default false\n */\n\n disabled?: boolean;\n /**\n * Toggles the loading state\n * @default false\n */\n loading?: boolean;\n type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null;\n priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null;\n size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;\n htmlType?: 'submit' | 'reset' | 'button';\n};\n\n/**\n * @deprecated use new button instead APIs\n * @example\n * ```\n * import { Button, ButtonProps } from '@transferwise/components';\n *\n * <Button v2>...</Button>\n * ```\n */\nexport type ButtonProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'button'>, 'type'> & {\n as?: 'button';\n };\n\ntype AnchorProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'a'>, 'type'> & {\n as?: 'a';\n };\n\n/**\n * @deprecated use new button instead APIs\n * @example\n * ```\n * import { Button, ButtonProps } from '@transferwise/components';\n *\n * <Button v2>...</Button>\n * ```\n */\nexport type LegacyButtonProps = ButtonProps | AnchorProps;\n\n/**\n * @deprecated make sure you use new Button component via `<Button v2 .. />` and new props\n */\nconst LegacyButton = forwardRef<ButtonReferenceType, LegacyButtonProps>(\n (\n {\n as: component = 'button',\n block = false,\n children,\n className,\n disabled,\n loading = false,\n priority = Priority.PRIMARY,\n size = Size.MEDIUM,\n type = ControlType.ACCENT,\n onClick,\n ...rest\n }: LegacyButtonProps,\n ref,\n ) => {\n const intl = useIntl();\n\n logDeprecationNotices({ size, type });\n\n const newType = establishNewType(type);\n const newPriority = establishNewPriority(priority, type);\n\n const classes = clsx(\n `btn btn-${size}`,\n `np-btn np-btn-${size}`,\n {\n 'btn-loading': loading,\n 'btn-block np-btn-block': block,\n disabled,\n },\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n typeClassMap[newType],\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n priorityClassMap[newPriority],\n className,\n );\n\n function processIndicatorSize() {\n return ['sm', 'xs'].includes(size) ? 'xxs' : 'xs';\n }\n\n const Element = (component as ElementType) ?? 'button';\n let props;\n\n if (Element === 'button') {\n const { htmlType = 'button', ...restProps } = rest as ButtonProps;\n props = {\n ...restProps,\n disabled,\n 'aria-disabled': loading,\n type: htmlType,\n };\n } else {\n props = {\n ...rest,\n 'aria-disabled': loading,\n } as AnchorProps;\n }\n\n /**\n * Ensures that the button cannot be activated in loading or disabled mode,\n * when `aria-disabled` might be used over the `disabled` HTML attribute\n */\n const handleClick =\n (handler: LegacyButtonProps['onClick']) =>\n (event: MouseEvent<HTMLButtonElement> & MouseEvent<HTMLAnchorElement>) => {\n if (disabled || loading) {\n event.preventDefault();\n } else if (typeof handler === 'function') {\n handler(event);\n }\n };\n\n return (\n <Element\n ref={ref as React.Ref<ButtonReferenceType>}\n className={classes}\n onClick={handleClick(onClick)}\n {...props}\n aria-live={loading ? 'polite' : 'off'}\n aria-busy={loading}\n aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) : rest['aria-label']}\n >\n {children}\n {loading && (\n <ProcessIndicator\n size={processIndicatorSize()}\n className=\"btn-loader\"\n data-testid=\"ButtonProgressIndicator\"\n />\n )}\n </Element>\n );\n },\n);\n\nexport default LegacyButton;\n"],"names":["LegacyButton","forwardRef","as","component","block","children","className","disabled","loading","priority","Priority","PRIMARY","size","Size","MEDIUM","type","ControlType","ACCENT","onClick","rest","ref","intl","useIntl","logDeprecationNotices","newType","establishNewType","newPriority","establishNewPriority","classes","clsx","typeClassMap","priorityClassMap","processIndicatorSize","includes","Element","props","htmlType","restProps","handleClick","handler","event","preventDefault","_jsxs","formatMessage","messages","loadingAriaLabel","_jsx","ProcessIndicator"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LegacyButton.js","sources":["../../src/button/LegacyButton.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { ElementType, forwardRef, MouseEvent } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport {\n Size,\n ControlType,\n Priority,\n ControlTypeAccent,\n ControlTypeNegative,\n ControlTypePositive,\n PriorityPrimary,\n PrioritySecondary,\n PriorityTertiary,\n SizeExtraSmall,\n SizeSmall,\n SizeMedium,\n SizeLarge,\n} from '../common';\nimport ProcessIndicator from '../processIndicator';\n\nimport messages from '../i18n/commonMessages/Button.messages';\nimport { typeClassMap, priorityClassMap } from './classMap';\nimport { establishNewPriority, establishNewType, logDeprecationNotices } from './legacyUtils';\nimport { ButtonReferenceType } from './Button.types';\n\n/** @deprecated */\ntype DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';\n\n/** @deprecated */\ntype DeprecatedSizes = SizeExtraSmall;\n\n/**\n * @deprecated use new button instead APIs\n * @example\n * ```\n * import { Button, ButtonProps } from '@transferwise/components';\n *\n * <Button v2>...</Button>\n * ```\n */\nexport type CommonProps = {\n v2?: false;\n\n /** Makes the button take up the full width of its container */\n block?: boolean;\n\n /**\n * The `target` attribute for HTML anchor.\n * If set to `_blank`, `rel=\"noopener noreferrer\"` is automatically added to the rendered node.\n */\n target?: string;\n /**\n * Toggles the disabled state\n * @default false\n */\n\n disabled?: boolean;\n /**\n * Toggles the loading state\n * @default false\n */\n loading?: boolean;\n type?: ControlTypeAccent | ControlTypeNegative | ControlTypePositive | DeprecatedTypes | null;\n priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary | null;\n size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;\n htmlType?: 'submit' | 'reset' | 'button';\n};\n\n/**\n * @deprecated use new button instead APIs\n * @example\n * ```\n * import { Button, ButtonProps } from '@transferwise/components';\n *\n * <Button v2>...</Button>\n * ```\n */\nexport type ButtonProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'button'>, 'type'> & {\n as?: 'button';\n };\n\ntype AnchorProps = CommonProps &\n Omit<React.ComponentPropsWithRef<'a'>, 'type'> & {\n as?: 'a';\n };\n\n/**\n * @deprecated use new button instead APIs\n * @example\n * ```\n * import { Button, ButtonProps } from '@transferwise/components';\n *\n * <Button v2>...</Button>\n * ```\n */\nexport type LegacyButtonProps = ButtonProps | AnchorProps;\n\n/**\n * @deprecated make sure you use new Button component via `<Button v2 .. />` and new props\n */\nconst LegacyButton = forwardRef<ButtonReferenceType, LegacyButtonProps>(\n (\n {\n as: component = 'button',\n block = false,\n children,\n className,\n disabled,\n loading = false,\n priority = Priority.PRIMARY,\n size = Size.MEDIUM,\n type = ControlType.ACCENT,\n onClick,\n ...rest\n }: LegacyButtonProps,\n ref,\n ) => {\n const intl = useIntl();\n\n logDeprecationNotices({ size, type });\n\n const newType = establishNewType(type);\n const newPriority = establishNewPriority(priority, type);\n\n const classes = clsx(\n `btn btn-${size}`,\n `np-btn np-btn-${size}`,\n {\n 'btn-loading': loading,\n 'btn-block np-btn-block': block,\n disabled,\n },\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n typeClassMap[newType],\n // @ts-expect-error fix when refactor `typeClassMap` to TypeScript\n priorityClassMap[newPriority],\n className,\n );\n\n function processIndicatorSize() {\n return ['sm', 'xs'].includes(size) ? 'xxs' : 'xs';\n }\n\n const Element = (component as ElementType) ?? 'button';\n let props;\n\n if (Element === 'button') {\n const { htmlType = 'button', ...restProps } = rest as ButtonProps;\n props = {\n ...restProps,\n disabled,\n 'aria-disabled': loading,\n type: htmlType,\n };\n } else {\n props = {\n ...rest,\n 'aria-disabled': loading,\n } as AnchorProps;\n }\n\n /**\n * Ensures that the button cannot be activated in loading or disabled mode,\n * when `aria-disabled` might be used over the `disabled` HTML attribute\n */\n const handleClick =\n (handler: LegacyButtonProps['onClick']) =>\n (event: MouseEvent<HTMLButtonElement> & MouseEvent<HTMLAnchorElement>) => {\n if (disabled || loading) {\n event.preventDefault();\n } else if (typeof handler === 'function') {\n handler(event);\n }\n };\n\n return (\n <Element\n ref={ref as React.Ref<ButtonReferenceType>}\n className={classes}\n onClick={handleClick(onClick)}\n {...props}\n aria-live={loading ? 'polite' : 'off'}\n aria-busy={loading}\n aria-label={loading ? intl.formatMessage(messages.loadingAriaLabel) : rest['aria-label']}\n >\n {children}\n {loading && (\n <ProcessIndicator\n size={processIndicatorSize()}\n className=\"btn-loader\"\n data-testid=\"ButtonProgressIndicator\"\n />\n )}\n </Element>\n );\n },\n);\n\nexport default LegacyButton;\n"],"names":["LegacyButton","forwardRef","as","component","block","children","className","disabled","loading","priority","Priority","PRIMARY","size","Size","MEDIUM","type","ControlType","ACCENT","onClick","rest","ref","intl","useIntl","logDeprecationNotices","newType","establishNewType","newPriority","establishNewPriority","classes","clsx","typeClassMap","priorityClassMap","processIndicatorSize","includes","Element","props","htmlType","restProps","handleClick","handler","event","preventDefault","_jsxs","formatMessage","messages","loadingAriaLabel","_jsx","ProcessIndicator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,MAAMA,YAAY,gBAAGC,gBAAU,CAC7B,CACE;EACEC,EAAE,EAAEC,SAAS,GAAG,QAAQ;AACxBC,EAAAA,KAAK,GAAG,KAAK;EACbC,QAAQ;EACRC,SAAS;EACTC,QAAQ;AACRC,EAAAA,OAAO,GAAG,KAAK;EACfC,QAAQ,GAAGC,gBAAQ,CAACC,OAAO;QAC3BC,MAAI,GAAGC,SAAI,CAACC,MAAM;EAClBC,IAAI,GAAGC,mBAAW,CAACC,MAAM;EACzBC,OAAO;EACP,GAAGC,IAAAA;AACe,CAAA,EACpBC,GAAG,KACD;AACF,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE,CAAA;AAEtBC,EAAAA,iCAAqB,CAAC;UAAE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,IACrCC,KAAoE,IAAI;IACvE,IAAIjC,QAAQ,IAAIC,OAAO,EAAE;MACvBgC,KAAK,CAACC,cAAc,EAAE,CAAA;AACxB,KAAC,MAAM,IAAI,OAAOF,OAAO,KAAK,UAAU,EAAE;MACxCA,OAAO,CAACC,KAAK,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;EAEH,oBACEE,eAAA,CAACR,OAAO,EAAA;AACNd,IAAAA,GAAG,EAAEA,GAAsC;AAC3Cd,IAAAA,SAAS,EAAEsB,OAAQ;AACnBV,IAAAA,OAAO,EAAEoB,WAAW,CAACpB,OAAO,CAAE;AAAA,IAAA,GAC1BiB,KAAK;AACT,IAAA,WAAA,EAAW3B,OAAO,GAAG,QAAQ,GAAG,KAAM;AACtC,IAAA,WAAA,EAAWA,OAAQ;AACnB,IAAA,YAAA,EAAYA,OAAO,GAAGa,IAAI,CAACsB,aAAa,CAACC,uBAAQ,CAACC,gBAAgB,CAAC,GAAG1B,IAAI,CAAC,YAAY,CAAE;AAAAd,IAAAA,QAAA,GAExFA,QAAQ,EACRG,OAAO,iBACNsC,cAAA,CAACC,wBAAgB,EAAA;MACfnC,IAAI,EAAEoB,oBAAoB,EAAG;AAC7B1B,MAAAA,SAAS,EAAC,YAAY;MACtB,aAAY,EAAA,yBAAA;AAAyB,KACrC,CACH,CAAA;AAAA,GACM,CAAC,CAAA;AAEd,CAAC;;;;"}
|
package/build/card/Card.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
|
var React = require('react');
|
|
5
7
|
var Body = require('../body/Body.js');
|
|
@@ -54,7 +56,7 @@ const Card = /*#__PURE__*/React.forwardRef(function Card({
|
|
|
54
56
|
}),
|
|
55
57
|
id: id,
|
|
56
58
|
"data-testid": dataTestId,
|
|
57
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(Option, {
|
|
59
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Option.default, {
|
|
58
60
|
"aria-expanded": isExpandable ? isExpanded : undefined,
|
|
59
61
|
"aria-controls": isExpanded ? contentId : undefined,
|
|
60
62
|
id: labelId,
|
|
@@ -65,7 +67,7 @@ const Card = /*#__PURE__*/React.forwardRef(function Card({
|
|
|
65
67
|
title: title,
|
|
66
68
|
content: details,
|
|
67
69
|
showMediaAtAllSizes: true,
|
|
68
|
-
button: isExpandable ? /*#__PURE__*/jsxRuntime.jsx(Chevron, {
|
|
70
|
+
button: isExpandable ? /*#__PURE__*/jsxRuntime.jsx(Chevron.default, {
|
|
69
71
|
orientation: isExpanded ? position.Position.TOP : position.Position.BOTTOM
|
|
70
72
|
}) : null,
|
|
71
73
|
onClick: isExpandable ? () => onClick?.(!isExpanded) : undefined
|
|
@@ -73,7 +75,7 @@ const Card = /*#__PURE__*/React.forwardRef(function Card({
|
|
|
73
75
|
className: clsx.clsx('np-card__divider', {
|
|
74
76
|
'np-card__divider--expanded': isExpanded
|
|
75
77
|
})
|
|
76
|
-
}), isExpandable && isExpanded && /*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
78
|
+
}), isExpandable && isExpanded && /*#__PURE__*/jsxRuntime.jsx(Body.default, {
|
|
77
79
|
as: "div",
|
|
78
80
|
type: typography.Typography.BODY_LARGE,
|
|
79
81
|
className: clsx.clsx('np-card__content', isExpanded ? 'd-block' : 'hide'),
|
|
@@ -84,5 +86,5 @@ const Card = /*#__PURE__*/React.forwardRef(function Card({
|
|
|
84
86
|
});
|
|
85
87
|
});
|
|
86
88
|
|
|
87
|
-
|
|
89
|
+
exports.default = Card;
|
|
88
90
|
//# sourceMappingURL=Card.js.map
|
package/build/card/Card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../src/card/Card.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef, useId } from 'react';\n\nimport Body from '../body';\nimport Chevron from '../chevron';\nimport { Position, Typography } from '../common';\nimport Option from '../common/Option';\n\nexport interface CardProps {\n 'aria-label'?: string;\n as?: React.ElementType;\n isExpanded?: boolean;\n title: React.ReactNode;\n details: React.ReactNode;\n icon?: React.ReactNode;\n children?: React.ReactNode;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n onClick?: (nextIsExpanded: boolean) => void;\n}\n\n/**\n * @deprecated use Navigation pattern (via `NavigationOption` component)\n * @see https://transferwise.atlassian.net/wiki/spaces/DS/pages/2387314550/Instructions+for+killing+expanding+cards+on+web+design+pattern\n */\nconst Card = forwardRef(function Card(\n {\n 'aria-label': ariaLabel,\n as: Element = 'div',\n isExpanded,\n title,\n details,\n children,\n onClick,\n icon,\n id,\n className,\n 'data-testid': dataTestId,\n }: CardProps,\n reference,\n) {\n const labelId = useId();\n const contentId = useId();\n const isExpandable = Boolean(children);\n\n return (\n <Element\n ref={reference}\n className={clsx('np-card', className, {\n 'np-card--expanded': isExpandable && isExpanded,\n 'np-card--inactive': !children,\n 'np-card--has-icon': !!icon,\n })}\n id={id}\n data-testid={dataTestId}\n >\n <Option\n aria-expanded={isExpandable ? isExpanded : undefined}\n aria-controls={isExpanded ? contentId : undefined}\n id={labelId}\n aria-label={ariaLabel}\n as={isExpandable ? 'button' : 'div'}\n className=\"np-card__button\"\n media={icon}\n title={title}\n content={details}\n showMediaAtAllSizes\n button={\n isExpandable ? (\n <Chevron orientation={isExpanded ? Position.TOP : Position.BOTTOM} />\n ) : null\n }\n onClick={isExpandable ? () => onClick?.(!isExpanded) : undefined}\n />\n\n {isExpandable && (\n <div\n className={clsx('np-card__divider', {\n 'np-card__divider--expanded': isExpanded,\n })}\n />\n )}\n\n {isExpandable && isExpanded && (\n <Body\n as=\"div\"\n type={Typography.BODY_LARGE}\n className={clsx('np-card__content', isExpanded ? 'd-block' : 'hide')}\n id={contentId}\n aria-labelledby={labelId}\n >\n {children}\n </Body>\n )}\n </Element>\n );\n});\n\nexport default Card;\n"],"names":["Card","forwardRef","ariaLabel","as","Element","isExpanded","title","details","children","onClick","icon","id","className","dataTestId","reference","labelId","useId","contentId","isExpandable","Boolean","_jsxs","ref","clsx","_jsx","Option","undefined","media","content","showMediaAtAllSizes","button","Chevron","orientation","Position","TOP","BOTTOM","Body","type","Typography","BODY_LARGE"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../src/card/Card.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef, useId } from 'react';\n\nimport Body from '../body';\nimport Chevron from '../chevron';\nimport { Position, Typography } from '../common';\nimport Option from '../common/Option';\n\nexport interface CardProps {\n 'aria-label'?: string;\n as?: React.ElementType;\n isExpanded?: boolean;\n title: React.ReactNode;\n details: React.ReactNode;\n icon?: React.ReactNode;\n children?: React.ReactNode;\n id?: string;\n className?: string;\n 'data-testid'?: string;\n onClick?: (nextIsExpanded: boolean) => void;\n}\n\n/**\n * @deprecated use Navigation pattern (via `NavigationOption` component)\n * @see https://transferwise.atlassian.net/wiki/spaces/DS/pages/2387314550/Instructions+for+killing+expanding+cards+on+web+design+pattern\n */\nconst Card = forwardRef(function Card(\n {\n 'aria-label': ariaLabel,\n as: Element = 'div',\n isExpanded,\n title,\n details,\n children,\n onClick,\n icon,\n id,\n className,\n 'data-testid': dataTestId,\n }: CardProps,\n reference,\n) {\n const labelId = useId();\n const contentId = useId();\n const isExpandable = Boolean(children);\n\n return (\n <Element\n ref={reference}\n className={clsx('np-card', className, {\n 'np-card--expanded': isExpandable && isExpanded,\n 'np-card--inactive': !children,\n 'np-card--has-icon': !!icon,\n })}\n id={id}\n data-testid={dataTestId}\n >\n <Option\n aria-expanded={isExpandable ? isExpanded : undefined}\n aria-controls={isExpanded ? contentId : undefined}\n id={labelId}\n aria-label={ariaLabel}\n as={isExpandable ? 'button' : 'div'}\n className=\"np-card__button\"\n media={icon}\n title={title}\n content={details}\n showMediaAtAllSizes\n button={\n isExpandable ? (\n <Chevron orientation={isExpanded ? Position.TOP : Position.BOTTOM} />\n ) : null\n }\n onClick={isExpandable ? () => onClick?.(!isExpanded) : undefined}\n />\n\n {isExpandable && (\n <div\n className={clsx('np-card__divider', {\n 'np-card__divider--expanded': isExpanded,\n })}\n />\n )}\n\n {isExpandable && isExpanded && (\n <Body\n as=\"div\"\n type={Typography.BODY_LARGE}\n className={clsx('np-card__content', isExpanded ? 'd-block' : 'hide')}\n id={contentId}\n aria-labelledby={labelId}\n >\n {children}\n </Body>\n )}\n </Element>\n );\n});\n\nexport default Card;\n"],"names":["Card","forwardRef","ariaLabel","as","Element","isExpanded","title","details","children","onClick","icon","id","className","dataTestId","reference","labelId","useId","contentId","isExpandable","Boolean","_jsxs","ref","clsx","_jsx","Option","undefined","media","content","showMediaAtAllSizes","button","Chevron","orientation","Position","TOP","BOTTOM","Body","type","Typography","BODY_LARGE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAMA,IAAI,gBAAGC,gBAAU,CAAC,SAASD,IAAIA,CACnC;AACE,EAAA,YAAY,EAAEE,SAAS;EACvBC,EAAE,EAAEC,OAAO,GAAG,KAAK;EACnBC,UAAU;EACVC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,OAAO;EACPC,IAAI;EACJC,EAAE;EACFC,SAAS;AACT,EAAA,aAAa,EAAEC,UAAAA;AAAU,CACf,EACZC,SAAS,EAAA;AAET,EAAA,MAAMC,OAAO,GAAGC,WAAK,EAAE,CAAA;AACvB,EAAA,MAAMC,SAAS,GAAGD,WAAK,EAAE,CAAA;AACzB,EAAA,MAAME,YAAY,GAAGC,OAAO,CAACX,QAAQ,CAAC,CAAA;EAEtC,oBACEY,eAAA,CAAChB,OAAO,EAAA;AACNiB,IAAAA,GAAG,EAAEP,SAAU;AACfF,IAAAA,SAAS,EAAEU,SAAI,CAAC,SAAS,EAAEV,SAAS,EAAE;MACpC,mBAAmB,EAAEM,YAAY,IAAIb,UAAU;MAC/C,mBAAmB,EAAE,CAACG,QAA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