@transferwise/components 0.0.0-experimental-033dd15 → 0.0.0-experimental-64ea603
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 -5
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +0 -2
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/card/Card.js +6 -4
- package/build/card/Card.js.map +1 -1
- package/build/carousel/Carousel.js +8 -8
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs +1 -3
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/checkbox/Checkbox.js +6 -4
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js +4 -2
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs +1 -1
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js +5 -3
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.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/bottomSheet/BottomSheet.mjs.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/dateUtils/isDateValid/isDateValid.js +3 -3
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.mjs +3 -3
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.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 +6 -9
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +3 -8
- package/build/common/panel/Panel.mjs.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 +33 -26
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +27 -22
- package/build/dateLookup/dateHeader/DateHeader.mjs.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/dimmer/dimmerManager/DimmerManager.mjs.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/dropFade/DropFade.mjs.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/emphasis/EmphasisHtmlTransformer.mjs.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 +83 -42
- package/build/header/Header.js.map +1 -1
- package/build/header/Header.mjs +76 -38
- package/build/header/Header.mjs.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/nl.json +73 -0
- 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 +85 -84
- package/build/index.js.map +1 -1
- package/build/index.mjs +5 -4
- package/build/index.mjs.map +1 -1
- package/build/info/Info.js +13 -17
- 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/info/Info.mjs +7 -13
- package/build/info/Info.mjs.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/Input.js +1 -3
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs +1 -3
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/SelectInput.js +5 -7
- 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 +4 -6
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/_ButtonInput.js +1 -3
- package/build/inputs/_ButtonInput.js.map +1 -1
- package/build/inputs/_ButtonInput.mjs +1 -3
- package/build/inputs/_ButtonInput.mjs.map +1 -1
- package/build/inputs/_Popover.js +1 -3
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +1 -3
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/instructionsList/InstructionsList.js +4 -2
- package/build/instructionsList/InstructionsList.js.map +1 -1
- package/build/label/Label.js +3 -3
- package/build/label/Label.js.map +1 -1
- package/build/label/Label.messages.js +3 -1
- package/build/label/Label.messages.js.map +1 -1
- package/build/link/Link.js +5 -3
- package/build/link/Link.js.map +1 -1
- package/build/link/Link.messages.js +3 -1
- package/build/link/Link.messages.js.map +1 -1
- package/build/listItem/ListItem.js +6 -4
- package/build/listItem/ListItem.js.map +1 -1
- package/build/listItem/ListItem.mjs +1 -1
- package/build/listItem/ListItem.mjs.map +1 -1
- package/build/loader/Loader.js +3 -1
- package/build/loader/Loader.js.map +1 -1
- package/build/main.css +55 -102
- 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/moneyInput/currencyFormatting.js +2 -2
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs +2 -2
- package/build/moneyInput/currencyFormatting.mjs.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 -4
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +0 -2
- package/build/nudge/Nudge.mjs.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/PromoCardContext.js +0 -1
- package/build/promoCard/PromoCardContext.js.map +1 -1
- package/build/promoCard/PromoCardContext.mjs +0 -1
- package/build/promoCard/PromoCardContext.mjs.map +1 -1
- package/build/promoCard/PromoCardGroup.js +3 -2
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardGroup.mjs +0 -1
- package/build/promoCard/PromoCardGroup.mjs.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 +31 -35
- 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/Select.mjs +19 -25
- package/build/select/Select.mjs.map +1 -1
- package/build/select/option/Option.js +9 -5
- package/build/select/option/Option.js.map +1 -1
- package/build/select/option/Option.mjs +3 -1
- package/build/select/option/Option.mjs.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 +11 -9
- 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/selectOption/SelectOption.mjs +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/button/Button.css +2 -2
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +0 -5
- package/build/styles/divider/Divider.css +24 -0
- package/build/styles/header/Header.css +28 -11
- package/build/styles/info/Info.css +0 -23
- package/build/styles/main.css +55 -102
- package/build/summary/Summary.js +11 -9
- package/build/summary/Summary.js.map +1 -1
- package/build/summary/Summary.messages.js +3 -1
- package/build/summary/Summary.messages.js.map +1 -1
- package/build/summary/Summary.mjs +2 -2
- package/build/summary/Summary.mjs.map +1 -1
- package/build/switch/Switch.js +3 -1
- package/build/switch/Switch.js.map +1 -1
- package/build/switchOption/SwitchOption.js +5 -3
- package/build/switchOption/SwitchOption.js.map +1 -1
- package/build/table/Table.js +17 -17
- 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/Table.mjs +1 -3
- package/build/table/Table.mjs.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 +9 -5
- package/build/title/Title.js.map +1 -1
- package/build/title/Title.mjs +6 -4
- package/build/title/Title.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +5 -7
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +2 -6
- package/build/tooltip/Tooltip.mjs.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/button/LegacyButton.d.ts.map +1 -1
- package/build/types/carousel/Carousel.d.ts.map +1 -1
- package/build/types/checkbox/Checkbox.d.ts.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +1 -2
- package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/dateUtils/isDateValid/isDateValid.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/common/panel/Panel.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/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/dimmer/dimmerManager/DimmerManager.d.ts +1 -1
- package/build/types/dimmer/dimmerManager/DimmerManager.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/dropFade/DropFade.d.ts.map +1 -1
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +2 -2
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts.map +1 -1
- package/build/types/header/Header.d.ts +28 -11
- package/build/types/header/Header.d.ts.map +1 -1
- package/build/types/header/index.d.ts +1 -0
- package/build/types/header/index.d.ts.map +1 -1
- package/build/types/index.d.ts +3 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardContext.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardGroup.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/select/option/Option.d.ts +2 -1
- package/build/types/select/option/Option.d.ts.map +1 -1
- package/build/types/table/Table.d.ts.map +1 -1
- package/build/types/title/Title.d.ts +3 -4
- package/build/types/title/Title.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/upload/Upload.js +20 -18
- 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/Upload.mjs +3 -1
- package/build/upload/Upload.mjs.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 +12 -10
- package/src/accordion/Accordion.story.tsx +2 -2
- package/src/accordion/AccordionItem/__snapshots__/AccordionItem.spec.js.snap +6 -2
- package/src/alert/Alert.story.tsx +2 -2
- package/src/alert/Alert.tests.story.tsx +1 -1
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +12 -4
- package/src/badge/Badge.tsx +1 -1
- package/src/badge/BadgeAssets.tsx +2 -2
- package/src/button/Button.css +2 -2
- package/src/button/Button.less +2 -2
- package/src/button/LegacyButton.tsx +0 -2
- package/src/carousel/Carousel.spec.tsx +0 -4
- package/src/carousel/Carousel.tsx +0 -1
- package/src/checkbox/Checkbox.tsx +0 -1
- package/src/checkboxButton/CheckboxButton.story.tsx +0 -2
- package/src/checkboxButton/CheckboxButton.tsx +1 -1
- package/src/checkboxOption/CheckboxOption.tsx +1 -2
- package/src/chips/__snapshots__/Chips.spec.tsx.snap +1 -1
- 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/bottomSheet/BottomSheet.spec.tsx +0 -1
- package/src/common/bottomSheet/BottomSheet.story.tsx +1 -1
- package/src/common/bottomSheet/BottomSheet.tsx +0 -1
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +1 -1
- package/src/common/closeButton/__snapshots__/CloseButton.spec.tsx.snap +1 -1
- package/src/common/dateUtils/isDateValid/isDateValid.ts +5 -3
- package/src/common/hooks/useHasIntersected/useHasIntersected.spec.js +0 -2
- package/src/common/locale/index.ts +1 -1
- package/src/common/panel/Panel.tsx +2 -13
- package/src/dateInput/DateInput.tsx +7 -1
- package/src/dateLookup/DateLookup.css +0 -5
- package/src/dateLookup/DateLookup.less +0 -4
- package/src/dateLookup/dateHeader/DateHeader.tsx +24 -26
- package/src/dimmer/Dimmer.story.tsx +0 -1
- package/src/dimmer/dimmerManager/DimmerManager.ts +1 -1
- package/src/display/Display.story.tsx +0 -2
- 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/dropFade/DropFade.story.tsx +0 -1
- package/src/dropFade/DropFade.tsx +0 -1
- package/src/emphasis/EmphasisHtmlTransformer.spec.tsx +4 -4
- package/src/emphasis/EmphasisHtmlTransformer.ts +2 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +5 -3
- package/src/header/Header.accessibility.docs.mdx +85 -0
- package/src/header/Header.css +28 -11
- package/src/header/Header.less +29 -7
- package/src/header/Header.spec.tsx +68 -50
- package/src/header/Header.story.tsx +184 -39
- package/src/header/Header.tsx +123 -69
- package/src/header/index.ts +1 -0
- package/src/i18n/cs.json +22 -5
- package/src/i18n/nl.json +73 -0
- package/src/index.ts +3 -2
- package/src/info/Info.css +0 -23
- package/src/info/Info.less +0 -28
- package/src/info/Info.tsx +8 -14
- package/src/inputs/Input.tsx +0 -1
- package/src/inputs/SelectInput.tsx +1 -7
- package/src/inputs/_ButtonInput.tsx +0 -1
- package/src/inputs/_Popover.tsx +0 -1
- package/src/link/Link.story.tsx +0 -1
- package/src/listItem/ListItem.story.tsx +4 -11
- package/src/listItem/ListItem.tests.story.tsx +52 -0
- package/src/listItem/ListItem.tsx +1 -1
- package/src/main.css +55 -102
- package/src/main.less +1 -1
- package/src/markdown/Markdown.spec.tsx +0 -1
- package/src/modal/Modal.story.tsx +1 -1
- package/src/moneyInput/currencyFormatting.ts +3 -3
- package/src/nudge/Nudge.tsx +0 -2
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +1 -1
- package/src/promoCard/PromoCardContext.tsx +0 -1
- package/src/promoCard/PromoCardGroup.story.tsx +3 -15
- package/src/promoCard/PromoCardGroup.tsx +0 -1
- package/src/provider/theme/ThemeProvider.story.tsx +3 -5
- package/src/select/Select.spec.tsx +0 -1
- package/src/select/Select.tsx +0 -3
- package/src/select/option/Option.spec.tsx +51 -0
- package/src/select/option/Option.tsx +3 -1
- package/src/selectOption/SelectOption.story.tsx +1 -2
- package/src/summary/Summary.tests.story.tsx +55 -0
- package/src/summary/Summary.tsx +2 -2
- package/src/table/Table.tsx +0 -1
- package/src/test-utils/jest.setup.ts +0 -1
- package/src/title/Title.tsx +25 -11
- package/src/tooltip/Tooltip.tsx +0 -2
- package/src/upload/Upload.spec.tsx +295 -0
- package/src/upload/Upload.tsx +5 -1
- package/src/upload/steps/completeStep/completeStep.spec.tsx +51 -0
- package/src/upload/steps/completeStep/completeStep.tsx +1 -1
- package/src/upload/steps/processingStep/processingStep.spec.tsx +59 -0
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.tsx +79 -0
- package/build/styles/item/Item.css +0 -60
- package/build/types/item/Item.d.ts +0 -39
- package/build/types/item/Item.d.ts.map +0 -1
- package/build/types/item/ItemAdditionalInfo.d.ts +0 -7
- package/build/types/item/ItemAdditionalInfo.d.ts.map +0 -1
- package/build/types/item/ItemCheckbox.d.ts +0 -4
- package/build/types/item/ItemCheckbox.d.ts.map +0 -1
- package/build/types/item/ItemIconButton.d.ts +0 -4
- package/build/types/item/ItemIconButton.d.ts.map +0 -1
- package/build/types/item/ItemImage.d.ts +0 -4
- package/build/types/item/ItemImage.d.ts.map +0 -1
- package/build/types/item/ItemNavigation.d.ts +0 -4
- package/build/types/item/ItemNavigation.d.ts.map +0 -1
- package/build/types/item/index.d.ts +0 -5
- package/build/types/item/index.d.ts.map +0 -1
- package/src/item/Item.css +0 -60
- package/src/item/Item.less +0 -60
- package/src/item/Item.story.tsx +0 -39
- package/src/item/Item.tsx +0 -153
- package/src/item/ItemAdditionalInfo.tsx +0 -14
- package/src/item/ItemCheckbox.tsx +0 -16
- package/src/item/ItemIconButton.tsx +0 -15
- package/src/item/ItemImage.tsx +0 -11
- package/src/item/ItemNavigation.tsx +0 -16
- package/src/item/index.ts +0 -4
- package/src/select/option/Option.spec.js +0 -43
- package/src/upload/Upload.events.spec.js +0 -49
- package/src/upload/Upload.spec.js +0 -305
- package/src/upload/steps/completeStep/completeStep.spec.js +0 -51
- package/src/upload/steps/processingStep/processingStep.spec.js +0 -55
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.js +0 -91
|
@@ -110,7 +110,7 @@ button.np-option {
|
|
|
110
110
|
max-width: fit-content;
|
|
111
111
|
}
|
|
112
112
|
@media (max-width: 480px) {
|
|
113
|
-
.np-theme-personal .np-option-additional-content {
|
|
113
|
+
.np-theme-personal :not(.np-option__sm-media) > .np-option-additional-content {
|
|
114
114
|
margin-left: 16px;
|
|
115
115
|
margin-left: var(--size-16);
|
|
116
116
|
}
|
|
@@ -101,11 +101,11 @@ button.np-option {
|
|
|
101
101
|
margin-right: var(--size-16);
|
|
102
102
|
margin-top: -10px;
|
|
103
103
|
padding-bottom: var(--size-16);
|
|
104
|
-
max-width:fit-content
|
|
104
|
+
max-width:fit-content;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
@media (max-width: 480px) {
|
|
108
|
-
.np-option-additional-content
|
|
108
|
+
:not(.np-option__sm-media) > .np-option-additional-content {
|
|
109
109
|
margin-left: var(--size-16);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -105,7 +105,7 @@ const Option = forwardRef<ReferenceType, OptionProps>(
|
|
|
105
105
|
<div className="media-right">{button}</div>
|
|
106
106
|
</div>
|
|
107
107
|
{additionalContent ? (
|
|
108
|
-
<div className="np-option-additional-content">
|
|
108
|
+
<div className="np-option-additional-content">{additionalContent}</div>
|
|
109
109
|
) : null}
|
|
110
110
|
</Element>
|
|
111
111
|
);
|
|
@@ -19,8 +19,8 @@ export default {
|
|
|
19
19
|
open: true,
|
|
20
20
|
},
|
|
21
21
|
render: (args) => {
|
|
22
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
23
22
|
const [open, setOpen] = useState(args.open);
|
|
23
|
+
|
|
24
24
|
return (
|
|
25
25
|
<div style={{ height: '2000px' }}>
|
|
26
26
|
<Button onClick={() => setOpen(true)}>Open BottomSheet</Button>
|
|
@@ -201,7 +201,6 @@ const BottomSheet = ({ role = 'dialog', ...props }: BottomSheetProps) => {
|
|
|
201
201
|
position={Position.BOTTOM}
|
|
202
202
|
className={clsx('np-bottom-sheet', props.className)}
|
|
203
203
|
>
|
|
204
|
-
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
|
|
205
204
|
<div
|
|
206
205
|
id={overlayId}
|
|
207
206
|
aria-labelledby={props['aria-labelledby'] || undefined}
|
|
@@ -52,7 +52,7 @@ exports[`BottomSheet renders content when open 1`] = `
|
|
|
52
52
|
width="16"
|
|
53
53
|
>
|
|
54
54
|
<path
|
|
55
|
-
d="
|
|
55
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
56
56
|
/>
|
|
57
57
|
</svg>
|
|
58
58
|
</span>
|
|
@@ -21,7 +21,7 @@ exports[`CloseButton renders as expected 1`] = `
|
|
|
21
21
|
width="24"
|
|
22
22
|
>
|
|
23
23
|
<path
|
|
24
|
-
d="
|
|
24
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
25
25
|
/>
|
|
26
26
|
</svg>
|
|
27
27
|
</span>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const isDateValid = (date: Date | string | null) => {
|
|
2
2
|
if (date === null) {
|
|
3
3
|
return false;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
if (date instanceof Date) {
|
|
5
7
|
return validDateObject(date);
|
|
6
|
-
} else {
|
|
7
|
-
return validDateString(date);
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
return validDateString(date);
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
export const validDateString = (dateString: string) => validDateObject(new Date(dateString));
|
|
@@ -65,7 +65,6 @@ describe('useHasIntersected', () => {
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
it('calls observer', () => {
|
|
68
|
-
// eslint-disable-next-line jest/prefer-spy-on
|
|
69
68
|
window.IntersectionObserver = jest.fn(() => ({
|
|
70
69
|
observe,
|
|
71
70
|
unobserve,
|
|
@@ -107,7 +106,6 @@ describe('useHasIntersected', () => {
|
|
|
107
106
|
});
|
|
108
107
|
|
|
109
108
|
const setupIntersectionObserver = (isIntersecting) => {
|
|
110
|
-
// eslint-disable-next-line jest/prefer-spy-on
|
|
111
109
|
window.IntersectionObserver = jest.fn((callback) => {
|
|
112
110
|
callback([{ isIntersecting }], { unobserve });
|
|
113
111
|
return {
|
|
@@ -119,26 +119,15 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
|
|
|
119
119
|
{...rest}
|
|
120
120
|
ref={setPopperElement}
|
|
121
121
|
role="dialog"
|
|
122
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
123
122
|
style={{ ...styles.popper }}
|
|
124
123
|
{...attributes.popper}
|
|
125
124
|
className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}
|
|
126
125
|
>
|
|
127
|
-
<div
|
|
128
|
-
ref={reference}
|
|
129
|
-
/* eslint-disable-next-line react/forbid-dom-props */
|
|
130
|
-
style={contentStyle}
|
|
131
|
-
className={clsx('np-panel__content')}
|
|
132
|
-
>
|
|
126
|
+
<div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>
|
|
133
127
|
{children}
|
|
134
128
|
{/* Arrow has to stay inside content to get the same animations as the "dialog" and to get hidden when panel is closed. */}
|
|
135
129
|
{arrow && (
|
|
136
|
-
<div
|
|
137
|
-
ref={setArrowElement}
|
|
138
|
-
className={clsx('np-panel__arrow')}
|
|
139
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
140
|
-
style={styles.arrow}
|
|
141
|
-
/>
|
|
130
|
+
<div ref={setArrowElement} className={clsx('np-panel__arrow')} style={styles.arrow} />
|
|
142
131
|
)}
|
|
143
132
|
</div>
|
|
144
133
|
</div>
|
|
@@ -2,7 +2,13 @@ import { clsx } from 'clsx';
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import Body from '../body';
|
|
6
|
+
import { Input } from '../inputs/Input';
|
|
7
|
+
import {
|
|
8
|
+
SelectInput,
|
|
9
|
+
SelectInputOptionContent,
|
|
10
|
+
type SelectInputProps,
|
|
11
|
+
} from '../inputs/SelectInput';
|
|
6
12
|
import {
|
|
7
13
|
DateMode,
|
|
8
14
|
MonthFormat,
|
|
@@ -91,8 +91,3 @@
|
|
|
91
91
|
.np-theme-personal .tw-date-lookup-menu td {
|
|
92
92
|
border: none;
|
|
93
93
|
}
|
|
94
|
-
.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current,
|
|
95
|
-
.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current {
|
|
96
|
-
color: #37517e;
|
|
97
|
-
color: var(--color-content-primary);
|
|
98
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import { Position, Size, Typography } from '../../common';
|
|
4
|
+
import { Typography } from '../../common';
|
|
6
5
|
import { useLayout } from '../../common/hooks';
|
|
7
6
|
import Title from '../../title';
|
|
8
7
|
import messages from '../DateLookup.messages';
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import Button from '../../button/Button';
|
|
9
|
+
import { ChevronDown, ChevronLeft, ChevronRight } from '@transferwise/icons';
|
|
10
|
+
import IconButton from '../../iconButton';
|
|
11
11
|
|
|
12
12
|
interface DateHeaderProps {
|
|
13
13
|
label?: string;
|
|
@@ -29,44 +29,42 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
29
29
|
return (
|
|
30
30
|
<div className={clsx('text-xs-center', !isMobile && ['clearfix', 'p-y-1'])}>
|
|
31
31
|
<div className="pull-left-single-direction">
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<IconButton
|
|
33
|
+
size={40}
|
|
34
|
+
priority="minimal"
|
|
35
|
+
className="d-inline-flex"
|
|
35
36
|
aria-label={`${intl.formatMessage(messages.previous)} ${dateMode}`}
|
|
36
37
|
onClick={onPreviousClick}
|
|
37
38
|
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
className="left-single-direction"
|
|
41
|
-
size={Size.MEDIUM}
|
|
42
|
-
/>
|
|
43
|
-
</button>
|
|
39
|
+
<ChevronLeft className="left-single-direction" />
|
|
40
|
+
</IconButton>
|
|
44
41
|
</div>
|
|
45
42
|
{label && (
|
|
46
43
|
<Title type={Typography.TITLE_BODY} className="tw-date-lookup-header-current-container">
|
|
47
|
-
<
|
|
44
|
+
<Button
|
|
45
|
+
v2
|
|
46
|
+
size="md"
|
|
48
47
|
type="button"
|
|
49
|
-
|
|
48
|
+
priority="tertiary"
|
|
49
|
+
className="tw-date-lookup-header-current"
|
|
50
50
|
aria-label={intl.formatMessage(messages.goTo20YearView)}
|
|
51
|
+
addonEnd={{ type: 'icon', value: <ChevronDown /> }}
|
|
51
52
|
onClick={onLabelClick}
|
|
52
53
|
>
|
|
53
54
|
{label}
|
|
54
|
-
</
|
|
55
|
+
</Button>
|
|
55
56
|
</Title>
|
|
56
57
|
)}
|
|
57
58
|
<div className="pull-right-single-direction">
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
className=
|
|
61
|
-
aria-label={`${
|
|
59
|
+
<IconButton
|
|
60
|
+
size={40}
|
|
61
|
+
className="d-inline-flex"
|
|
62
|
+
aria-label={`${intl.formatMessage(messages.next)} ${dateMode}`}
|
|
63
|
+
priority="minimal"
|
|
62
64
|
onClick={onNextClick}
|
|
63
65
|
>
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
className="right-single-direction"
|
|
67
|
-
size={Size.MEDIUM}
|
|
68
|
-
/>
|
|
69
|
-
</button>
|
|
66
|
+
<ChevronRight className="right-single-direction" />
|
|
67
|
+
</IconButton>
|
|
70
68
|
</div>
|
|
71
69
|
</div>
|
|
72
70
|
);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Meta, Canvas, Source } from '@storybook/blocks';
|
|
2
|
+
import { NavigationOption } from '..';
|
|
3
|
+
import { Bulb } from '@transferwise/icons';
|
|
4
|
+
|
|
5
|
+
<Meta title="Layouts/Divider/Accessibility" />
|
|
6
|
+
|
|
7
|
+
# Accessibility
|
|
8
|
+
|
|
9
|
+
A Divider is used to separate sections of content. While it doesn't directly announce anything to screen readers, there are a few considerations:
|
|
10
|
+
|
|
11
|
+
<NavigationOption
|
|
12
|
+
media={<Bulb size={24} />}
|
|
13
|
+
title="Design guidance"
|
|
14
|
+
content="Before you start, please review the documentation on how separators should be used, announced or hidden from assistive tech."
|
|
15
|
+
href="https://wise.design/components/divider"
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<br />
|
|
19
|
+
<br />
|
|
20
|
+
|
|
21
|
+
## Using `<hr />` vs `<div />`
|
|
22
|
+
|
|
23
|
+
By default, our Divider is rendered as `<div role="presentation" />`. However, you can optionally set `isContent` to true, which many screen readers interpret as a “separator.”
|
|
24
|
+
|
|
25
|
+
<Source dark code={`
|
|
26
|
+
// By default: non-semantic divider
|
|
27
|
+
<Divider isContent={false} />
|
|
28
|
+
|
|
29
|
+
// Alternatively, to provide a semantic HR:
|
|
30
|
+
|
|
31
|
+
<Divider isContent={true} />
|
|
32
|
+
`}/>
|
|
33
|
+
|
|
34
|
+
Compared to a `<div>`, `<hr>` tells assistive technologies that a thematic break or separation has occurred. However, sometimes you may not want an audible separation. In that case, using `<div>` (which omits semantic meaning) might be preferable.
|
|
35
|
+
|
|
36
|
+
<br />
|
|
37
|
+
|
|
38
|
+
## Levels
|
|
39
|
+
|
|
40
|
+
The Divider supports levels like “section”, “subsection”, or “content” to visually change the separation style:
|
|
41
|
+
|
|
42
|
+
<Source
|
|
43
|
+
dark
|
|
44
|
+
code={`
|
|
45
|
+
// A few level examples
|
|
46
|
+
<>
|
|
47
|
+
<Divider level="section" />
|
|
48
|
+
<Divider level="subsection" />
|
|
49
|
+
<Divider level="content" />
|
|
50
|
+
</>
|
|
51
|
+
`}
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
Screen readers generally ignore these visual styling changes unless you explicitly provide more context (e.g., additional text or heading tags).
|
|
55
|
+
|
|
56
|
+
<br />
|
|
57
|
+
|
|
58
|
+
**Additional resources:**
|
|
59
|
+
|
|
60
|
+
1. [WAI-ARIA Authoring Practices: Separator Role](https://www.w3.org/TR/wai-aria-practices-1.2/#separator)
|
|
61
|
+
2. [MDN Web Docs: <hr />](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.wds-Divider {
|
|
2
|
+
--Divider-border-width: 4px;
|
|
3
|
+
--Divider-border-color: var(--color-border-neutral);
|
|
4
|
+
--Divider-border-style: solid;
|
|
5
|
+
--Divider-dash-length: 4px;
|
|
6
|
+
--Divider-dash-spacing: 4px;
|
|
7
|
+
border-top: 4px solid rgba(0,0,0,0.10196);
|
|
8
|
+
border-top: var(--Divider-border-width) var(--Divider-border-style) var(--Divider-border-color);
|
|
9
|
+
display: inline-block;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
height: 4px;
|
|
13
|
+
height: var(--Divider-border-width);
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
.wds-Divider--content {
|
|
17
|
+
border-top: none;
|
|
18
|
+
background: repeating-linear-gradient(to right, var(--Divider-border-color), var(--Divider-border-color) var(--Divider-dash-length), transparent var(--Divider-dash-length), transparent calc(var(--Divider-dash-length) + var(--Divider-dash-spacing)));
|
|
19
|
+
height: var(--Divider-border-width);
|
|
20
|
+
}
|
|
21
|
+
.wds-Divider--content,
|
|
22
|
+
.wds-Divider--subsection {
|
|
23
|
+
--Divider-border-width: 1px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.wds-Divider {
|
|
2
|
+
--Divider-border-width: 4px;
|
|
3
|
+
--Divider-border-color: var(--color-border-neutral);
|
|
4
|
+
--Divider-border-style: solid;
|
|
5
|
+
--Divider-dash-length: 4px;
|
|
6
|
+
--Divider-dash-spacing: 4px;
|
|
7
|
+
|
|
8
|
+
border-top: var(--Divider-border-width) var(--Divider-border-style) var(--Divider-border-color);
|
|
9
|
+
display: inline-block;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
height: var(--Divider-border-width);
|
|
13
|
+
width: 100%;
|
|
14
|
+
|
|
15
|
+
&--content {
|
|
16
|
+
border-top: none;
|
|
17
|
+
background: repeating-linear-gradient(
|
|
18
|
+
to right,
|
|
19
|
+
var(--Divider-border-color),
|
|
20
|
+
var(--Divider-border-color) var(--Divider-dash-length),
|
|
21
|
+
transparent var(--Divider-dash-length),
|
|
22
|
+
transparent calc(var(--Divider-dash-length) + var(--Divider-dash-spacing))
|
|
23
|
+
);
|
|
24
|
+
height: var(--Divider-border-width);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&--content,
|
|
28
|
+
&--subsection {
|
|
29
|
+
--Divider-border-width: 1px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import Divider, { DividerProps } from './Divider';
|
|
4
|
+
|
|
5
|
+
describe('Divider', () => {
|
|
6
|
+
const defaultProps: DividerProps = {
|
|
7
|
+
testId: 'test-divider',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const renderDivider = (props: Partial<DividerProps> = {}) => {
|
|
11
|
+
const utils = render(<Divider {...defaultProps} {...props} />);
|
|
12
|
+
const rerender = (newProps: Partial<DividerProps> = {}) =>
|
|
13
|
+
utils.rerender(<Divider {...defaultProps} {...newProps} />);
|
|
14
|
+
return { ...utils, rerender };
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
it('should render the Divider component', () => {
|
|
18
|
+
renderDivider();
|
|
19
|
+
expect(screen.getByTestId('test-divider')).toBeInTheDocument();
|
|
20
|
+
expect(screen.getByTestId('test-divider')).toHaveClass('wds-Divider');
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('should render as a semantic <hr> when `isContent` is true', () => {
|
|
24
|
+
renderDivider({ isContent: true });
|
|
25
|
+
expect(screen.getByTestId('test-divider')).not.toHaveAttribute('role', 'presentation');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('should render as a non-semantic <div> when `isContent` is false', () => {
|
|
29
|
+
renderDivider({ isContent: false });
|
|
30
|
+
expect(screen.getByTestId('test-divider')).toHaveAttribute('role', 'presentation');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should apply custom class names when provided', () => {
|
|
34
|
+
const { rerender } = renderDivider();
|
|
35
|
+
expect(screen.getByTestId('test-divider')).not.toHaveClass('custom-class');
|
|
36
|
+
|
|
37
|
+
// Re-render with updated props
|
|
38
|
+
rerender({ className: 'custom-class' });
|
|
39
|
+
expect(screen.getByTestId('test-divider')).toHaveClass('custom-class');
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should apply the "content" level styling', () => {
|
|
43
|
+
const { rerender } = renderDivider();
|
|
44
|
+
expect(screen.getByTestId('test-divider')).not.toHaveClass('wds-Divider--content');
|
|
45
|
+
|
|
46
|
+
rerender({ level: 'content' });
|
|
47
|
+
expect(screen.getByTestId('test-divider')).toHaveClass('wds-Divider', 'wds-Divider--content');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('should apply the "subsection" level styling', () => {
|
|
51
|
+
const { rerender } = renderDivider();
|
|
52
|
+
expect(screen.getByTestId('test-divider')).not.toHaveClass('wds-Divider--subsection');
|
|
53
|
+
|
|
54
|
+
rerender({ level: 'subsection' });
|
|
55
|
+
expect(screen.getByTestId('test-divider')).toHaveClass(
|
|
56
|
+
'wds-Divider',
|
|
57
|
+
'wds-Divider--subsection',
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Divider from './Divider';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wraps stories with a container (e.g., centered or padded).
|
|
6
|
+
* Adjust styles to your needs.
|
|
7
|
+
*/
|
|
8
|
+
const withContainer = (Story: any) => (
|
|
9
|
+
<div style={{ padding: '1rem' }}>
|
|
10
|
+
<Story />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Not all stories need access to all controls as it causes unnecessary UI noise.
|
|
16
|
+
*/
|
|
17
|
+
const hideControls = (args: string[]) => {
|
|
18
|
+
const hidden = ['level', 'as', 'className', 'testId', ...args];
|
|
19
|
+
|
|
20
|
+
return Object.fromEntries(hidden.map((item) => [item, { table: { disable: true } }]));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The stories below document the `<Divider />` component, which can be rendered as either a semantic `<hr>` or a non-semantic `<div>`.
|
|
25
|
+
* levels allow customization for different visual separation needs.
|
|
26
|
+
*
|
|
27
|
+
* For more details, please refer to the [design documentation](https://wise.design/components/divider).
|
|
28
|
+
*/
|
|
29
|
+
const meta: Meta<typeof Divider> = {
|
|
30
|
+
component: Divider,
|
|
31
|
+
title: 'Layouts/Divider',
|
|
32
|
+
tags: ['autodocs'],
|
|
33
|
+
decorators: [withContainer],
|
|
34
|
+
parameters: {
|
|
35
|
+
actions: { argTypesRegex: null },
|
|
36
|
+
},
|
|
37
|
+
argTypes: {
|
|
38
|
+
level: {
|
|
39
|
+
control: 'select',
|
|
40
|
+
options: ['section', 'subsection', 'content'],
|
|
41
|
+
description: 'Choose the Divider level.',
|
|
42
|
+
table: {
|
|
43
|
+
category: 'Appearance',
|
|
44
|
+
type: { summary: 'string' },
|
|
45
|
+
defaultValue: { summary: 'section' },
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
isContent: {
|
|
49
|
+
control: 'boolean',
|
|
50
|
+
description: 'Render as a semantic <hr> (true) or non-semantic <div> (false).',
|
|
51
|
+
table: {
|
|
52
|
+
category: 'Appearance',
|
|
53
|
+
type: { summary: 'boolean' },
|
|
54
|
+
defaultValue: { summary: 'false' },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
className: {
|
|
58
|
+
description: 'Add custom class names to the Divider.',
|
|
59
|
+
table: {
|
|
60
|
+
category: 'Appearance',
|
|
61
|
+
type: { summary: 'string' },
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
testId: {
|
|
65
|
+
description: 'Add a data-testid attribute for testing.',
|
|
66
|
+
table: {
|
|
67
|
+
category: 'Testing',
|
|
68
|
+
type: { summary: 'string' },
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
args: {
|
|
73
|
+
isContent: false,
|
|
74
|
+
className: '',
|
|
75
|
+
testId: '',
|
|
76
|
+
level: 'section',
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export default meta;
|
|
80
|
+
|
|
81
|
+
type Story = StoryObj<typeof Divider>;
|
|
82
|
+
|
|
83
|
+
export const Playground: Story = {
|
|
84
|
+
args: {
|
|
85
|
+
level: 'section',
|
|
86
|
+
},
|
|
87
|
+
tags: ['!autodocs'],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* There are three different types of divider – `section`, `subsection`, and `content` –
|
|
92
|
+
* each designed to visually separate or group content. <br />
|
|
93
|
+
* [Design documentation](https://wise.design/components/divider)
|
|
94
|
+
*/
|
|
95
|
+
export const Level: Story = {
|
|
96
|
+
argTypes: {
|
|
97
|
+
...hideControls(['testId', 'className', 'isContent']),
|
|
98
|
+
},
|
|
99
|
+
args: {
|
|
100
|
+
level: 'section',
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The `isContent` prop determines whether the divider is rendered as a semantic `<hr>` or a non-semantic `<div>`.
|
|
106
|
+
*/
|
|
107
|
+
export const ContentDivider: Story = {
|
|
108
|
+
argTypes: {
|
|
109
|
+
...hideControls(['level', 'testId', 'className']),
|
|
110
|
+
},
|
|
111
|
+
args: {
|
|
112
|
+
isContent: true,
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const AllVariants: Story = {
|
|
117
|
+
render: function Render() {
|
|
118
|
+
return (
|
|
119
|
+
<>
|
|
120
|
+
<Divider level="section" />
|
|
121
|
+
<Divider level="subsection" />
|
|
122
|
+
<Divider level="content" />
|
|
123
|
+
</>
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
argTypes: {
|
|
127
|
+
...hideControls(['level', 'testId', 'className', 'isContent']),
|
|
128
|
+
},
|
|
129
|
+
tags: ['!autodocs'],
|
|
130
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { clsx } from 'clsx';
|
|
2
|
+
import React, { FunctionComponent } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface DividerProps {
|
|
5
|
+
/**
|
|
6
|
+
* If `true`, renders the Divider as a semantic `<hr>`, providing clear separation to assistive technologies.
|
|
7
|
+
* Otherwise, a non-semantic `<div role="presentation">` is used for purely visual separation.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
isContent?: boolean;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Alters the visual style of the divider, accommodating different types
|
|
14
|
+
* of separated content. Accepts `'section'`, `'subsection'`, or `'content'`.
|
|
15
|
+
* @default 'section'
|
|
16
|
+
*/
|
|
17
|
+
level?: 'section' | 'subsection' | 'content';
|
|
18
|
+
|
|
19
|
+
className?: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @param {boolean} [isContent=false] - If `true`, uses a semantic `<hr>` for accessible separation; otherwise uses `<div role="presentation">`.
|
|
25
|
+
* @param {string} [className] - Optional class names for adding custom styling to the divider.
|
|
26
|
+
* @param {string} [testId] - Provides a `data-testid` for testing frameworks.
|
|
27
|
+
* @param {'section' | 'subsection' | 'content'} [level='section'] - Defines the visual style for the divider.
|
|
28
|
+
*
|
|
29
|
+
* @see {@link Divider} for further information.
|
|
30
|
+
* @see {@link https://storybook.wise.design/?path=/docs/layouts-divider--docs|Storybook Wise Design}
|
|
31
|
+
*/
|
|
32
|
+
const Divider: FunctionComponent<DividerProps> = ({
|
|
33
|
+
className,
|
|
34
|
+
isContent = false,
|
|
35
|
+
testId,
|
|
36
|
+
level = 'section',
|
|
37
|
+
...props
|
|
38
|
+
}) => {
|
|
39
|
+
const levelClass = level && level !== 'section' ? `wds-Divider--${level}` : '';
|
|
40
|
+
|
|
41
|
+
const commonProps = {
|
|
42
|
+
className: clsx('wds-Divider', levelClass, className),
|
|
43
|
+
'data-testid': testId,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const divProps = {
|
|
47
|
+
...commonProps,
|
|
48
|
+
role: 'presentation',
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
return isContent ? <hr {...commonProps} {...props} /> : <div {...divProps} {...props} />;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default Divider;
|